Skip to content

Commit 7908a03

Browse files
committed
Причёсываю PABCSystem.pas
1 parent 94c0db5 commit 7908a03

File tree

9 files changed

+934
-366
lines changed

9 files changed

+934
-366
lines changed

Configuration/GlobalAssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal static class RevisionClass
1515
public const string Major = "3";
1616
public const string Minor = "1";
1717
public const string Build = "0";
18-
public const string Revision = "1173";
18+
public const string Revision = "1174";
1919

2020
public const string MainVersion = Major + "." + Minor;
2121
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

Configuration/Version.defs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%COREVERSION%=0
2-
%REVISION%=1173
31
%MINOR%=1
2+
%REVISION%=1174
3+
%COREVERSION%=0
44
%MAJOR%=3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
!define VERSION '3.1.0.1173'
1+
!define VERSION '3.1.0.1174'

TestSuite/foreachvar1.pas

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
{begin
2-
var s := [1,2,3];
3-
foreach var x in s do
4-
begin
5-
var y := x + x;
6-
end;
7-
end.}
81
type
92
TPair = auto class
103
Key: string;

TestSuite/foreachvar3.pas

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
procedure p<T>(s: set of T; f: T->T);
2+
begin
3+
foreach var x in s do
4+
begin
5+
var y := f(x);
6+
Print(y);
7+
end;
8+
end;
9+
10+
begin
11+
var s := [1,2,3,7,2,4];
12+
p(s,x->x);
13+
end.

TreeConverter/TreeConversion/syntax_tree_visitor.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16287,12 +16287,11 @@ public bool FindIEnumerableElementType(SyntaxTree.foreach_stmt _foreach_stmt, ty
1628716287
}
1628816288
}
1628916289

16290-
foreach (SemanticTree.ITypeNode itn in tn.ImplementingInterfaces)
16290+
foreach (SemanticTree.ITypeNode itn in tn.ImplementingInterfaces) // если не нашли - ищем интерфейс IEnumerable и возвращаем object в качестве elem_type
1629116291
{
16292-
//if (itn == ctn)
1629316292
if (itn is compiled_type_node)
1629416293
{
16295-
var itnc = (itn as compiled_type_node).compiled_type;
16294+
/*var itnc = (itn as compiled_type_node).compiled_type;
1629616295
if (itnc.IsGenericType)
1629716296
{
1629816297
var my = itnc.GetGenericTypeDefinition();// = typeof(System.Collections.Generic.IEnumerable<>)
@@ -16303,7 +16302,8 @@ public bool FindIEnumerableElementType(SyntaxTree.foreach_stmt _foreach_stmt, ty
1630316302
return true;
1630416303
}
1630516304
}
16306-
else if (itn == ctn)
16305+
else */
16306+
if (itn == ctn)
1630716307
{
1630816308
elem_type = SystemLibrary.SystemLibrary.object_type;
1630916309
return true;

bin/Lib/PABCRtl.dll

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)