Skip to content

Commit 71b41d1

Browse files
authored
ast.table: fix anonymous function declaration uniqueness for non-tcc c compilers (#10509)
1 parent 1a52da9 commit 71b41d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vlib/v/ast/table.v

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ pub fn (t &Table) fn_type_signature(f &Fn) string {
180180
// TODO: for now ignore mut/pts in sig for now
181181
typ := arg.typ.set_nr_muls(0)
182182
arg_type_sym := t.get_type_symbol(typ)
183-
sig += '$arg_type_sym.kind'
183+
sig += arg_type_sym.str().to_lower().replace_each(['.', '__', '&', '', '[]', 'arr_', 'chan ',
184+
'chan_', 'map[', 'map_of_', ']', '_to_'])
184185
if i < f.params.len - 1 {
185186
sig += '_'
186187
}

0 commit comments

Comments
 (0)