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

all: c2v fixes

This commit is contained in:
Alexander Medvednikov
2021-12-28 07:37:03 +03:00
parent dadc965082
commit 6176ce9f03
8 changed files with 57 additions and 19 deletions

View File

@ -103,6 +103,11 @@ pub fn (s &Scope) known_var(name string) bool {
return true
}
pub fn (s &Scope) known_const(name string) bool {
s.find_const(name) or { return false }
return true
}
pub fn (mut s Scope) update_var_type(name string, typ Type) {
mut obj := unsafe { s.objects[name] }
if mut obj is Var {