From 333f76cd6858a3e8768ba4de2d28dfd0434f085e Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Sat, 18 May 2019 00:40:21 +0300 Subject: [PATCH] fix #1941 --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 4 ++-- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- TestSuite/CompilationSamples/PABCSystem.pas | 6 +++--- TestSuite/symbol_table_test.pas | 6 +++--- TestSuite/with2.pas | 4 ++-- TreeConverter/NetWrappers/NetHelper.cs | 5 +++-- bin/Lib/PABCSystem.pas | 6 +++--- 8 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index e964cad6f..1ca5a33d2 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 = "4"; public const string Build = "2"; - public const string Revision = "2055"; + public const string Revision = "2062"; 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 d3c2b562a..1f8e89320 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=4 -%REVISION%=2055 %COREVERSION%=2 +%REVISION%=2062 +%MINOR%=4 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 3ff4752bd..5490114b5 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.4.2.2055' +!define VERSION '3.4.2.2062' diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index 4272c192e..736b2ab80 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -7968,8 +7968,8 @@ function StrToReal(s: string) := Convert.ToDouble(s, nfi); function StrToFloat(s: string) := StrToReal(s); function TryStrToInt64(s: string; var value: int64) := int64.TryParse(s, value); -function TryStrToReal(s: string; var value: real) := real.TryParse(s,System.Globalization.NumberStyles.Float,new Globalization.NumberFormatInfo,value); -function TryStrToSingle(s: string; var value: single) := single.TryParse(s,System.Globalization.NumberStyles.Float,new Globalization.NumberFormatInfo,value); +function TryStrToReal(s: string; var value: real) := real.TryParse(s,System.Globalization.NumberStyles.Float,new System.Globalization.NumberFormatInfo,value); +function TryStrToSingle(s: string; var value: single) := single.TryParse(s,System.Globalization.NumberStyles.Float,new System.Globalization.NumberFormatInfo,value); function TryStrToFloat(s: string; var value: real) := TryStrToReal(s, value); function TryStrToFloat(s: string; var value: single) := TryStrToSingle(s, value); @@ -11562,7 +11562,7 @@ var function ExecuteAssemlyIsDll: boolean; begin - Result := not __from_dll and (IO.Path.GetExtension(System.Reflection.Assembly.GetExecutingAssembly.ManifestModule.FullyQualifiedName).ToLower = '.dll'); + Result := not __from_dll and (System.IO.Path.GetExtension(System.Reflection.Assembly.GetExecutingAssembly.ManifestModule.FullyQualifiedName).ToLower = '.dll'); end; function IsUnix: boolean; diff --git a/TestSuite/symbol_table_test.pas b/TestSuite/symbol_table_test.pas index db806b1fb..1da54adfd 100644 --- a/TestSuite/symbol_table_test.pas +++ b/TestSuite/symbol_table_test.pas @@ -1,4 +1,4 @@ -//winonly +//winonly {$reference 'PresentationFramework.dll'} {$reference 'WindowsBase.dll'} {$reference 'PresentationCore.dll'} @@ -6,9 +6,9 @@ uses System, System.Windows, System.Collections, System.Collections.Generic; begin -var lst: Generic.List := new System.Collections.Generic.List(); +var lst: System.Collections.Generic.List := new System.Collections.Generic.List(); Convert.ToInt32('23'); var ic: System.Windows.Input.ICommand; -var ic2: Input.ICommand; +var ic2: System.Windows.Input.ICommand; end. \ No newline at end of file diff --git a/TestSuite/with2.pas b/TestSuite/with2.pas index a818dc710..de6eddeee 100644 --- a/TestSuite/with2.pas +++ b/TestSuite/with2.pas @@ -7,11 +7,11 @@ begin assert(CurrentDirectory = System.Environment.CurrentDirectory); end; - with System.Runtime.InteropServices do + with System.Runtime.InteropServices, System.Runtime.InteropServices.Expando do begin var hnd: GCHandle; var hnd2: System.Runtime.InteropServices.GCHandle; - var o: Expando.IExpando; + var o: IExpando; assert(hnd.GetType = hnd2.GetType); end; end. \ No newline at end of file diff --git a/TreeConverter/NetWrappers/NetHelper.cs b/TreeConverter/NetWrappers/NetHelper.cs index 908da96c5..49338a4a1 100644 --- a/TreeConverter/NetWrappers/NetHelper.cs +++ b/TreeConverter/NetWrappers/NetHelper.cs @@ -447,7 +447,8 @@ namespace PascalABCCompiler.NetHelper //if (namespaces[s] == null) ns_ht.Add(s,s); ns_ht[s] = s; namespaces[s] = t; - if (pos != -1) + // SSM 17.05.19 Пробую запретить uses Reflection: https://github.com/pascalabcnet/pascalabcnet/issues/1941 + /*if (pos != -1) { string[] sub_ns_arr = s.Split('.'); string sub_ns_str = sub_ns_arr[sub_ns_arr.Length - 1]; @@ -459,7 +460,7 @@ namespace PascalABCCompiler.NetHelper sub_ns_str = sub_ns_arr[ind] + "." + sub_ns_str; ind--; } - } + }*/ while (pos != -1) { s = s.Substring(0, pos); diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index 4272c192e..736b2ab80 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -7968,8 +7968,8 @@ function StrToReal(s: string) := Convert.ToDouble(s, nfi); function StrToFloat(s: string) := StrToReal(s); function TryStrToInt64(s: string; var value: int64) := int64.TryParse(s, value); -function TryStrToReal(s: string; var value: real) := real.TryParse(s,System.Globalization.NumberStyles.Float,new Globalization.NumberFormatInfo,value); -function TryStrToSingle(s: string; var value: single) := single.TryParse(s,System.Globalization.NumberStyles.Float,new Globalization.NumberFormatInfo,value); +function TryStrToReal(s: string; var value: real) := real.TryParse(s,System.Globalization.NumberStyles.Float,new System.Globalization.NumberFormatInfo,value); +function TryStrToSingle(s: string; var value: single) := single.TryParse(s,System.Globalization.NumberStyles.Float,new System.Globalization.NumberFormatInfo,value); function TryStrToFloat(s: string; var value: real) := TryStrToReal(s, value); function TryStrToFloat(s: string; var value: single) := TryStrToSingle(s, value); @@ -11562,7 +11562,7 @@ var function ExecuteAssemlyIsDll: boolean; begin - Result := not __from_dll and (IO.Path.GetExtension(System.Reflection.Assembly.GetExecutingAssembly.ManifestModule.FullyQualifiedName).ToLower = '.dll'); + Result := not __from_dll and (System.IO.Path.GetExtension(System.Reflection.Assembly.GetExecutingAssembly.ManifestModule.FullyQualifiedName).ToLower = '.dll'); end; function IsUnix: boolean;