This commit is contained in:
parent
87fba1e0c8
commit
8a9a56f989
|
|
@ -46374,6 +46374,7 @@ namespace PascalABCCompiler.SyntaxTree
|
|||
{
|
||||
yield_unknown_ident copy = new yield_unknown_ident();
|
||||
copy.Parent = this.Parent;
|
||||
copy.UnknownID = this.UnknownID;
|
||||
if (source_context != null)
|
||||
copy.source_context = new SourceContext(source_context);
|
||||
if (attributes != null)
|
||||
|
|
|
|||
17
TestSuite/yield6.pas
Normal file
17
TestSuite/yield6.pas
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
type
|
||||
t1 = class
|
||||
|
||||
function f1: sequence of byte;
|
||||
begin
|
||||
|
||||
var p: function: sequence of integer := ()->
|
||||
|(1,2)|.Select(\(a,b)->3);
|
||||
yield p().ToArray()[0];
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
begin
|
||||
var o := new t1;
|
||||
assert(o.f1.ToArray[0] = 3);
|
||||
end.
|
||||
Loading…
Reference in a new issue