bug fix #1418
This commit is contained in:
parent
e1d6336bee
commit
7f52cc8c5b
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "5";
|
||||
public const string Build = "0";
|
||||
public const string Revision = "2110";
|
||||
public const string Revision = "2111";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%COREVERSION%=0
|
||||
%REVISION%=2110
|
||||
%MINOR%=5
|
||||
%REVISION%=2111
|
||||
%COREVERSION%=0
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.5.0.2110'
|
||||
!define VERSION '3.5.0.2111'
|
||||
|
|
|
|||
16
TestSuite/lambda_capture_T_1.pas
Normal file
16
TestSuite/lambda_capture_T_1.pas
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
type
|
||||
t1<T>=class
|
||||
procedure p1();
|
||||
begin
|
||||
var t: byte := 2;
|
||||
var p: procedure(t1: integer) := t ->
|
||||
begin
|
||||
Assert(t=3);
|
||||
end;
|
||||
p(3);
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
t1&<integer>.Create.p1
|
||||
end.
|
||||
16
TestSuite/lambda_capture_T_2.pas
Normal file
16
TestSuite/lambda_capture_T_2.pas
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
type
|
||||
t1<T>=class
|
||||
procedure p1();
|
||||
begin
|
||||
var t: byte := 2;
|
||||
var p: procedure(t1: integer) := t1 ->
|
||||
begin
|
||||
Assert(t=2);
|
||||
end;
|
||||
p(3);
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
t1&<integer>.Create.p1
|
||||
end.
|
||||
17
TestSuite/lambda_capture_T_3.pas
Normal file
17
TestSuite/lambda_capture_T_3.pas
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
type
|
||||
t1<T>=class
|
||||
function p1(t: byte := 4): integer;
|
||||
end;
|
||||
|
||||
function t1<T>.p1(t: byte): integer;
|
||||
begin
|
||||
var p: procedure := () ->
|
||||
begin
|
||||
Assert(t=4);
|
||||
end;
|
||||
p;
|
||||
end;
|
||||
|
||||
begin
|
||||
t1&<integer>.Create.p1
|
||||
end.
|
||||
15
TestSuite/lambda_capture_T_4.pas
Normal file
15
TestSuite/lambda_capture_T_4.pas
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
type
|
||||
t1<T>=class
|
||||
procedure p1(t: byte := 2);
|
||||
begin
|
||||
var p: procedure(t1: integer) := t1 ->
|
||||
begin
|
||||
Assert(t=2);
|
||||
end;
|
||||
p(3);
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
t1&<integer>.Create.p1
|
||||
end.
|
||||
18
TestSuite/lambda_capture_T_5.pas
Normal file
18
TestSuite/lambda_capture_T_5.pas
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
type
|
||||
t1<T>=class
|
||||
function p1(t3: byte := 2): integer;
|
||||
end;
|
||||
|
||||
function t1<T>.p1(t3: byte): integer;
|
||||
begin
|
||||
var t: integer := 6;
|
||||
var p: procedure := () ->
|
||||
begin
|
||||
Assert(t=6);
|
||||
end;
|
||||
p;
|
||||
end;
|
||||
|
||||
begin
|
||||
t1&<integer>.Create.p1
|
||||
end.
|
||||
10
TestSuite/lambda_new_init_const.pas
Normal file
10
TestSuite/lambda_new_init_const.pas
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
procedure p1;
|
||||
begin
|
||||
var o: object;
|
||||
var p: procedure := procedure -> begin
|
||||
(new object[](o)).Sort;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
|
@ -130,6 +130,7 @@ namespace TreeConverter.LambdaExpressions.Closure
|
|||
expression expr = newExpr.params_list.expressions[i];
|
||||
ProcessNode(expr);
|
||||
}
|
||||
ProcessNode(newExpr.array_init_expr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2743,7 +2743,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
while (context._cmn.functions.Count > 0 && context._cmn.functions[context._cmn.functions.Count-1].function_code == null && context._cmn.functions[context._cmn.functions.Count - 1].name.StartsWith("<>lambda") && !context._cmn.functions[context._cmn.functions.Count - 1].name.StartsWith("<>lambda_initializer"))
|
||||
{
|
||||
#if DEBUG
|
||||
System.IO.File.AppendAllText("d:\\aa.txt", context._cmn.functions[context._cmn.functions.Count - 1].name+"\n");
|
||||
System.IO.File.AppendAllText("aa.txt", context._cmn.functions[context._cmn.functions.Count - 1].name+"\n");
|
||||
#endif
|
||||
context._cmn.functions.remove_at(context._cmn.functions.Count - 1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue