This commit is contained in:
Ivan Bondarev 2024-09-22 12:39:03 +02:00
parent 7261231c9c
commit 20edd487e3
2 changed files with 11 additions and 1 deletions

9
TestSuite/lambdas25.pas Normal file
View file

@ -0,0 +1,9 @@
var
f: function: sequence of char :=
()-> 'aboba'.Select(x-> x);
v: function: function: integer := () -> () -> 1;
begin
assert(f().First = 'a');
assert(v()() = 1);
end.

View file

@ -2930,7 +2930,8 @@ namespace PascalABCCompiler.TreeConverter
#if DEBUG
//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);
context._cmn.functions[context._cmn.functions.Count - 1].function_code = new statements_list(null);
//context._cmn.functions.remove_at(context._cmn.functions.Count - 1);
}