fix #1641
This commit is contained in:
parent
1977c9bcb2
commit
d5c603e1d6
|
|
@ -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 = "2155";
|
||||
public const string Revision = "2157";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=5
|
||||
%REVISION%=2155
|
||||
%REVISION%=2157
|
||||
%COREVERSION%=0
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.5.0.2155'
|
||||
!define VERSION '3.5.0.2157'
|
||||
|
|
|
|||
|
|
@ -339,6 +339,10 @@ namespace SyntaxVisitors
|
|||
bl.defs.Add(new label_definitions(gotoBreak.label, gotoContinue.label));
|
||||
}
|
||||
|
||||
public override void visit(function_lambda_definition fld)
|
||||
{
|
||||
// Нельзя Lowerить содержимое лямбды !!! Баг #1641!
|
||||
}
|
||||
|
||||
public override void visit(for_node fn)
|
||||
{
|
||||
|
|
|
|||
12
TestSuite/yield_lambda_with_foreach.pas
Normal file
12
TestSuite/yield_lambda_with_foreach.pas
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
function f1: sequence of string;
|
||||
begin
|
||||
var p: ()->() := procedure->
|
||||
begin
|
||||
foreach var i in Arr(0) do;
|
||||
end;
|
||||
yield 'a';
|
||||
end;
|
||||
|
||||
begin
|
||||
Assert(f1.First = 'a');
|
||||
end.
|
||||
|
|
@ -19849,7 +19849,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
|
||||
public override void visit(SyntaxTree.sequence_type _sequence_type) // сахарный узел
|
||||
{
|
||||
var pt = _sequence_type.elements_type.DescendantNodes().FirstOrDefault(s => s is procedure_header);
|
||||
var pt = _sequence_type.elements_type.DescendantNodes(TraversalType.PostOrder,null,true).FirstOrDefault(s => s is procedure_header);
|
||||
if (pt != null)
|
||||
{
|
||||
AddError(get_location(pt), "PROCEDURE_TYPE_SHOULD_BE_REPLACED_BY_TYPE_NAME_IN_THIS_CONTEXT");
|
||||
|
|
|
|||
Loading…
Reference in a new issue