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

compiler: small fixes + some logic for freeing strings

This commit is contained in:
Alexander Medvednikov
2019-09-24 22:30:30 +03:00
parent b1f0df0fd1
commit 04e4018228
8 changed files with 78 additions and 45 deletions

View File

@ -80,7 +80,7 @@ mut:
is_changed bool
scope_level int
is_c bool // todo remove once `typ` is `Type`, not string
moved bool
is_moved bool
scanner_pos ScannerPos // TODO: use only scanner_pos, remove line_nr
line_nr int
}
@ -321,7 +321,8 @@ fn (table &Table) known_type(typ_ string) bool {
}
fn (table &Table) known_type_fast(t &Type) bool {
return t.name.len > 0 && !t.is_placeholder
return t.name != '' && !t.is_placeholder
}
fn (t &Table) find_fn(name string) ?Fn {