Skip to content

Commit

Permalink
Evaluate global before guessing current package
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed May 31, 2024
1 parent 74fa9c6 commit 761439a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions hld/Eval.hx
Original file line number Diff line number Diff line change
Expand Up @@ -743,16 +743,20 @@ class Eval {
}
}

// global
var g = getGlobalAddress([name]);
if( g != ANone )
return g;

// global (current package)
if( tpack != null && tpack.length > 0 ) {
tpack.push(name);
var g = getGlobalAddress(tpack);
if( g != null )
if( g != ANone )
return g;
}

// global
return getGlobalAddress([name]);
return ANone;
}

function evalPath( path : Array<String> ) : Value {
Expand Down

0 comments on commit 761439a

Please sign in to comment.