make maps work with structs defined in different modules
parent
0a4a9a35c3
commit
830f63e86a
|
@ -537,9 +537,9 @@ fn type_default(typ string) string {
|
||||||
if typ.ends_with('*') {
|
if typ.ends_with('*') {
|
||||||
return '0'
|
return '0'
|
||||||
}
|
}
|
||||||
// ?
|
// User struct defined in another module.
|
||||||
if typ.contains('__') {
|
if typ.contains('__') {
|
||||||
return ''
|
return '{}'
|
||||||
}
|
}
|
||||||
// Default values for other types are not needed because of mandatory initialization
|
// Default values for other types are not needed because of mandatory initialization
|
||||||
switch typ {
|
switch typ {
|
||||||
|
@ -560,7 +560,6 @@ fn type_default(typ string) string {
|
||||||
case 'voidptr': return '0'
|
case 'voidptr': return '0'
|
||||||
}
|
}
|
||||||
return '{}'
|
return '{}'
|
||||||
return ''
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO PERF O(n)
|
// TODO PERF O(n)
|
||||||
|
|
Loading…
Reference in New Issue