This commit is contained in:
miks1965 2018-03-16 08:18:43 +03:00
commit 6e86ad9d32
3 changed files with 7 additions and 7 deletions

View file

@ -394,22 +394,22 @@ namespace SymbolTable
_instance_type = instance_type;
}
public override SymbolInfo Find(string name)
public override SymbolInfoList Find(string name)
{
return _instance_type.ConvertSymbolInfo(_orig_scope.Find(name));
}
public override SymbolInfo Find(string name, Scope CurrentScope)
public override SymbolInfoList Find(string name, Scope CurrentScope)
{
return _instance_type.ConvertSymbolInfo(_orig_scope.Find(name, CurrentScope));
}
public override SymbolInfo FindOnlyInScope(string name)
public override SymbolInfoList FindOnlyInScope(string name)
{
return _instance_type.ConvertSymbolInfo(_orig_scope.FindOnlyInScope(name));
}
public override SymbolInfo FindOnlyInScopeAndBlocks(string name)
public override SymbolInfoList FindOnlyInScopeAndBlocks(string name)
{
return _instance_type.ConvertSymbolInfo(_orig_scope.FindOnlyInScopeAndBlocks(name));
}

View file

@ -8253,6 +8253,8 @@ namespace PascalABCCompiler.TreeConverter
if (expr is typed_expression) expr = convert_typed_expression_to_function_call(expr as typed_expression);
if (expr != null)
{
if (expr.type is generic_instance_type_node)
AddError(get_location(s_expr), "UNEXPECTED_EXPRESSION_IN_WITH");
variable_reference vr = expr as variable_reference;
if (expr.type == null)
AddError(get_location(s_expr), "UNEXPECTED_EXPRESSION_IN_WITH");

View file

@ -1349,13 +1349,11 @@ namespace PascalABCCompiler.TreeRealization
protected type_node _original_generic;
//public SymbolTable.GenericTypeInstanceScope _scope;
public override SymbolTable.Scope Scope
{
get
{
return original_generic.Scope;//_scope;
return _original_generic.Scope;
}
}