mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: use typ() for array type
This commit is contained in:
parent
145b125155
commit
748b1d3381
@ -3216,8 +3216,8 @@ fn c_name(name_ string) string {
|
||||
fn (g Gen) type_default(typ table.Type) string {
|
||||
sym := g.table.get_type_symbol(typ)
|
||||
if sym.kind == .array {
|
||||
elem_sym := g.table.get_type_symbol(sym.array_info().elem_type)
|
||||
mut elem_type_str := elem_sym.name.replace('.', '__')
|
||||
elem_sym := g.typ(sym.array_info().elem_type)
|
||||
mut elem_type_str := elem_sym.replace('.', '__')
|
||||
if elem_type_str.starts_with('C__') {
|
||||
elem_type_str = elem_type_str[3..]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user