cgen: fix interface parameters in fn type aliases (#11247)
parent
a9fb24cb5f
commit
67e8031a08
|
@ -945,7 +945,7 @@ pub fn (mut g Gen) write_alias_typesymbol_declaration(sym ast.TypeSymbol) {
|
||||||
|
|
||||||
pub fn (mut g Gen) write_interface_typedef(sym ast.TypeSymbol) {
|
pub fn (mut g Gen) write_interface_typedef(sym ast.TypeSymbol) {
|
||||||
struct_name := c_name(sym.cname)
|
struct_name := c_name(sym.cname)
|
||||||
g.type_definitions.writeln('typedef struct $struct_name $struct_name;')
|
g.typedefs.writeln('typedef struct $struct_name $struct_name;')
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut g Gen) write_interface_typesymbol_declaration(sym ast.TypeSymbol) {
|
pub fn (mut g Gen) write_interface_typesymbol_declaration(sym ast.TypeSymbol) {
|
||||||
|
|
|
@ -47,6 +47,10 @@ type F7 = fn (time.Time, int)
|
||||||
type MyTime = time.Time
|
type MyTime = time.Time
|
||||||
type F8 = fn (MyTime)
|
type F8 = fn (MyTime)
|
||||||
|
|
||||||
|
interface MyInterface {}
|
||||||
|
|
||||||
|
type F9 = fn (MyInterface)
|
||||||
|
|
||||||
fn C.atoi(&byte) int
|
fn C.atoi(&byte) int
|
||||||
fn C.freec(ptr voidptr)
|
fn C.freec(ptr voidptr)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue