mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix interface parameters in fn type aliases (#11247)
This commit is contained in:
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) {
|
||||
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) {
|
||||
|
@ -47,6 +47,10 @@ type F7 = fn (time.Time, int)
|
||||
type MyTime = time.Time
|
||||
type F8 = fn (MyTime)
|
||||
|
||||
interface MyInterface {}
|
||||
|
||||
type F9 = fn (MyInterface)
|
||||
|
||||
fn C.atoi(&byte) int
|
||||
fn C.freec(ptr voidptr)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user