mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 12:55:24 +00:00
DIRECTOR: LINGO: Make var undefined warning stricter
Now it only warns if the var is inside a definition. If it's in scopeless Lingo, it should be fine.
This commit is contained in:
parent
150e819d3f
commit
fee4e419f8
@ -295,7 +295,8 @@ void LingoCompiler::codeVarRef(const Common::String &name) {
|
||||
if (_methodVars->contains(name)) {
|
||||
type = (*_methodVars)[name];
|
||||
} else {
|
||||
warning("BUILDBOT: LingoCompiler::codeVarRef: var %s referenced before definition", name.c_str());
|
||||
if (_indef)
|
||||
warning("BUILDBOT: LingoCompiler::codeVarRef: var %s referenced before definition", name.c_str());
|
||||
type = kVarGeneric;
|
||||
}
|
||||
switch (type) {
|
||||
@ -322,7 +323,8 @@ void LingoCompiler::codeVarGet(const Common::String &name) {
|
||||
if (_methodVars->contains(name)) {
|
||||
type = (*_methodVars)[name];
|
||||
} else {
|
||||
warning("BUILDBOT: LingoCompiler::codeVarGet: var %s referenced before definition", name.c_str());
|
||||
if (_indef)
|
||||
warning("BUILDBOT: LingoCompiler::codeVarGet: var %s referenced before definition", name.c_str());
|
||||
type = kVarGeneric;
|
||||
}
|
||||
switch (type) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user