WarnOnImplicitlySetGlobalVar(): warn only on sins inside actual DSL code

This commit is contained in:
Alexander A. Klimov 2019-09-23 15:09:57 +02:00
parent 3a154516dc
commit b4e3736e31
1 changed files with 1 additions and 1 deletions

View File

@ -560,7 +560,7 @@ void WarnOnImplicitlySetGlobalVar(const std::unique_ptr<Expression>& setLhs, con
if (var && setLhsParent.IsObject()) {
auto ns (dynamic_pointer_cast<Namespace>(setLhsParent.Get<Object::Ptr>()));
if (ns && ns == ScriptGlobal::GetGlobals()) {
if (ns && ns == ScriptGlobal::GetGlobals() && debug.Path.GetLength()) {
const char *opStr = nullptr;
switch (setOp) {