mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker/parser: allow for fixed array with sizes defined with a const
This commit is contained in:
@ -56,7 +56,8 @@ pub fn (s &Scope) is_known(name string) bool {
|
||||
|
||||
pub fn (s &Scope) find_var(name string) ?Var {
|
||||
if obj := s.find(name) {
|
||||
match obj {
|
||||
v := ScopeObject(obj)
|
||||
match v {
|
||||
Var {
|
||||
return *it
|
||||
}
|
||||
@ -68,7 +69,8 @@ pub fn (s &Scope) find_var(name string) ?Var {
|
||||
|
||||
pub fn (s &Scope) find_const(name string) ?ConstField {
|
||||
if obj := s.find(name) {
|
||||
match obj {
|
||||
cf := ScopeObject(obj)
|
||||
match cf {
|
||||
ConstField {
|
||||
return *it
|
||||
}
|
||||
|
Reference in New Issue
Block a user