fix #2401
This commit is contained in:
parent
da47253f24
commit
07df31f762
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "7";
|
||||
public const string Build = "1";
|
||||
public const string Revision = "2792";
|
||||
public const string Revision = "2794";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%COREVERSION%=1
|
||||
%REVISION%=2792
|
||||
%REVISION%=2794
|
||||
%MINOR%=7
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.7.1.2792
|
||||
3.7.1.2794
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.7.1.2792'
|
||||
!define VERSION '3.7.1.2794'
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace PascalABCCompiler.SyntaxTreeConverters
|
|||
UnnamedRecordsCheckVisitor.New.ProcessNode(root);
|
||||
|
||||
// Выносим выражения с лямбдами из заголовка foreach + считаем максимум 10 вложенных лямбд
|
||||
StandOutExprWithLambdaInForeachSequenceVisitor.New.ProcessNode(root);
|
||||
StandOutExprWithLambdaInForeachSequenceAndNestedLambdasVisitor.New.ProcessNode(root);
|
||||
VarNamesInMethodsWithSameNameAsClassGenericParamsReplacer.New.ProcessNode(root); // SSM bug fix #1147
|
||||
FindOnExceptVarsAndApplyRenameVisitor.New.ProcessNode(root);
|
||||
#if DEBUG
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ namespace PascalABCCompiler.SyntaxTreeConverters
|
|||
|
||||
// Первое предназначение - вынести последовательность из заголовка в foreach до foreach как отдельное присваивание
|
||||
// Второе предназначение - переименовать все переменные, совпадающие по имени с типом T обобщенного класса, в котором находится метод, содержащий лямбду
|
||||
public class StandOutExprWithLambdaInForeachSequenceVisitor : BaseChangeVisitor
|
||||
public class StandOutExprWithLambdaInForeachSequenceAndNestedLambdasVisitor : BaseChangeVisitor
|
||||
{
|
||||
public static StandOutExprWithLambdaInForeachSequenceVisitor New
|
||||
public static StandOutExprWithLambdaInForeachSequenceAndNestedLambdasVisitor New
|
||||
{
|
||||
get
|
||||
{
|
||||
return new StandOutExprWithLambdaInForeachSequenceVisitor();
|
||||
return new StandOutExprWithLambdaInForeachSequenceAndNestedLambdasVisitor();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17050,11 +17050,14 @@ namespace PascalABCCompiler.TreeConverter
|
|||
{
|
||||
if ((context.converting_block() == block_type.function_block) && (context.top_function.return_variable != null))
|
||||
{
|
||||
List<SymbolInfo> sil = context.top_function.scope.FindOnlyInScope(_ident.name);//context.find_only_in_namespace(_ident.name);
|
||||
List<SymbolInfo> sil = context.top_function.scope.FindOnlyInScope(_ident.name); // почему-то не находит локальную переменную с этим именем
|
||||
// тут баг #2401
|
||||
// context.find_only_in_namespace(_ident.name); // это было закомментировано 10.01.21
|
||||
if (sil == null)
|
||||
{
|
||||
int comp = SystemLibrary.SystemLibrary.string_comparer.Compare(_ident.name, context.top_function.name);
|
||||
if (comp == 0)
|
||||
List<SymbolInfo> mysi = context.find(_ident.name);
|
||||
if (comp == 0 && mysi != null && mysi[0].sym_info is function_node) // мы нашли функцию и ее имя совпадает с ident
|
||||
{
|
||||
local_variable lv = context.top_function.return_variable;
|
||||
return new local_variable_reference(lv, 0, get_location(_ident));
|
||||
|
|
|
|||
Loading…
Reference in a new issue