fixed build issue related to ?System
This commit is contained in:
parent
e86dd93227
commit
d9094a5c22
|
|
@ -1035,8 +1035,17 @@ namespace SymbolTable
|
|||
// Нет. Как-то найти глобальное ПИ модуля
|
||||
while (scope != null && !(scope is UnitInterfaceScope))
|
||||
{
|
||||
if (scope is ClassMethodScope)
|
||||
scope = (scope as ClassMethodScope).DefScope;
|
||||
if (scope is ClassMethodScope)
|
||||
{
|
||||
// aab 17.05.19 begin
|
||||
// Поправил приоритет поиска для ?System
|
||||
var classMethodScope = scope as ClassMethodScope;
|
||||
if (classMethodScope.DefScope != null)
|
||||
scope = classMethodScope.DefScope;
|
||||
else
|
||||
scope = classMethodScope.CurrentLambdaDefScope;
|
||||
// aab 17.05.19 end
|
||||
}
|
||||
else scope = scope.TopScope;
|
||||
}
|
||||
if (scope != null)
|
||||
|
|
@ -1155,12 +1164,8 @@ namespace SymbolTable
|
|||
var defScope = (CurrentArea as ClassMethodScope).DefScope;
|
||||
if (defScope != null)
|
||||
{
|
||||
var defScopeRes = FindAll(defScope, Name, OnlyInType, OnlyInThisClass, defScope);
|
||||
|
||||
if (defScopeRes != null && defScopeRes.Count > 0)
|
||||
{
|
||||
return defScopeRes;
|
||||
}
|
||||
CurrentArea = defScope;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1179,7 +1179,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
// aab 26.04.19
|
||||
// Здесь topScope записывается именно в CurrentLambdaDefScope, а не в DefScope
|
||||
// Во всех остальных случаях записывается в DefScope
|
||||
SymbolTable.Scope scope = convertion_data_and_alghoritms.symbol_table.CreateClassMethodScope(_ctn.Scope, topScope, null, "lambda " + name); // aab 09.05.19 Временно вернул обратно
|
||||
SymbolTable.Scope scope = convertion_data_and_alghoritms.symbol_table.CreateClassMethodScope(_ctn.Scope, null, topScope, "lambda " + name);
|
||||
|
||||
//TODO:сделать static и virtual.
|
||||
//TODO: interface and implementation scopes.
|
||||
|
|
|
|||
Loading…
Reference in a new issue