Исправил одну ошибку вывода типа короткого определения функции
This commit is contained in:
parent
0534187ee1
commit
847902e531
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "1";
|
||||
public const string Build = "0";
|
||||
public const string Revision = "1230";
|
||||
public const string Revision = "1231";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=1
|
||||
%REVISION%=1230
|
||||
%COREVERSION%=0
|
||||
%REVISION%=1231
|
||||
%MINOR%=1
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.1.0.1230'
|
||||
!define VERSION '3.1.0.1231'
|
||||
|
|
|
|||
|
|
@ -11442,8 +11442,11 @@ namespace PascalABCCompiler.TreeConverter
|
|||
AddError(context.top_function.loc, "IMPOSSIBLE!SHORT_FUNC_WITHOUT_BODY");
|
||||
}
|
||||
|
||||
statement_node aa = cd.statements[0];
|
||||
var bfc = cd.statements[0] as basic_function_call;
|
||||
// Проблема в том, что если в теле короткого определения функции - лямбда
|
||||
// и происходит захват переменной, то в тело выносится вызов конструктора сгенерированного класса
|
||||
// Поэтому result := ... - это не первый оператор, а последний!!!
|
||||
statement_node aa = cd.statements[cd.statements.Count-1];
|
||||
var bfc = aa as basic_function_call;
|
||||
if (bfc != null)
|
||||
{
|
||||
var ttt1 = bfc.type;
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in a new issue