diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index e8963bc29..4dc5ff200 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "2"; public const string Build = "0"; - public const string Revision = "1429"; + public const string Revision = "1431"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index d23ad37e4..6ee1b0c1a 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %COREVERSION%=0 -%REVISION%=1429 +%REVISION%=1431 %MINOR%=2 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 7dbae6b63..940b84ded 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.2.0.1429' +!define VERSION '3.2.0.1431' diff --git a/SyntaxTreeConverters/StandardSyntaxConverter.cs b/SyntaxTreeConverters/StandardSyntaxConverter.cs index 0e09efd0d..9950e5bd7 100644 --- a/SyntaxTreeConverters/StandardSyntaxConverter.cs +++ b/SyntaxTreeConverters/StandardSyntaxConverter.cs @@ -42,7 +42,7 @@ namespace PascalABCCompiler.SyntaxTreeConverters /*#if DEBUG try { - //root.visit(new SimplePrettyPrinterVisitor(@"d:\\zzz3.txt")); + //root.visit(new SimplePrettyPrinterVisitor(@"d:\\zzz4.txt")); } catch { diff --git a/TestSuite/CompilationSamples/yield_foreach_x.pas b/TestSuite/CompilationSamples/yield_foreach_x.pas new file mode 100644 index 000000000..bbf2bf7ad --- /dev/null +++ b/TestSuite/CompilationSamples/yield_foreach_x.pas @@ -0,0 +1,12 @@ +function GetWords(sq:sequence of string):sequence of string; +begin + foreach var x in sq do + begin + var a := x.toWords; // , yield + yield a[0]; + end; +end; +begin + var sq := Seq('1 2 3', 'a b c d'); + GetWords(sq).Print; +end. \ No newline at end of file diff --git a/TestSuite/CompilationSamples/yield_q_Deque.pas b/TestSuite/CompilationSamples/yield_q_Deque.pas new file mode 100644 index 000000000..70df396f5 --- /dev/null +++ b/TestSuite/CompilationSamples/yield_q_Deque.pas @@ -0,0 +1,10 @@ +function SeqGen: sequence of integer; +begin + var q := new Queue; + var d := q.Dequeue; + yield 1; +end; + + +begin +end. \ No newline at end of file diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index ccac04f6c..d29cae014 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -15930,6 +15930,7 @@ namespace PascalABCCompiler.TreeConverter // SSM 26.06.16 - правка в связи с автовыведением типов в yieldах if (to.type is auto_type) { + try_convert_typed_expression_to_function_call(ref from); if (to is class_field_reference) { var cfr = to as class_field_reference; diff --git a/bin/Lib/PABCRtl.dll b/bin/Lib/PABCRtl.dll index 0696f5b88..8dad7922c 100644 Binary files a/bin/Lib/PABCRtl.dll and b/bin/Lib/PABCRtl.dll differ