1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

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

This commit is contained in:
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

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 += '_'
}