ast.table: fix anonymous function declaration uniqueness for non-tcc c compilers (#10509)

pull/10521/head
crthpl 2021-06-19 09:02:26 -07:00 committed by GitHub
parent 1a52da9f62
commit 71b41d1042
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -180,7 +180,8 @@ pub fn (t &Table) fn_type_signature(f &Fn) string {
// TODO: for now ignore mut/pts in sig for now
typ := arg.typ.set_nr_muls(0)
arg_type_sym := t.get_type_symbol(typ)
sig += '$arg_type_sym.kind'
sig += arg_type_sym.str().to_lower().replace_each(['.', '__', '&', '', '[]', 'arr_', 'chan ',
'chan_', 'map[', 'map_of_', ']', '_to_'])
if i < f.params.len - 1 {
sig += '_'
}