diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 1171fd22f..7d794fcaa 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 = "1971"; + public const string Revision = "1972"; 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 b8c3cabb0..643254443 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=2 -%REVISION%=1971 %MINOR%=4 +%REVISION%=1972 +%COREVERSION%=2 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 198de8833..6eefe4da7 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.4.2.1971' +!define VERSION '3.4.2.1972' diff --git a/SyntaxTreeConverters/StandardSyntaxConverter.cs b/SyntaxTreeConverters/StandardSyntaxConverter.cs index 9becd6ee8..7b39026b3 100644 --- a/SyntaxTreeConverters/StandardSyntaxConverter.cs +++ b/SyntaxTreeConverters/StandardSyntaxConverter.cs @@ -64,7 +64,7 @@ namespace PascalABCCompiler.SyntaxTreeConverters cv.ProcessNode(root); cv.Output(@"Light1.txt");*/ - try + /*try { root.visit(new SimplePrettyPrinterVisitor(@"d:\\zzz4.txt")); } @@ -72,7 +72,7 @@ namespace PascalABCCompiler.SyntaxTreeConverters { System.IO.File.AppendAllText(@"d:\\zzz4.txt",e.Message); - } + }*/ #endif diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index e76344f41..586a8521b 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -6323,6 +6323,8 @@ procedure Reset(f: AbstractBinaryFile; en: Encoding); begin if f.fi = nil then raise new System.IO.IOException(GetTranslation(FILE_NOT_ASSIGNED)); + if (f is TypedFile) and not en.IsSingleByte then + raise new System.IO.IOException(GetTranslation(TYPED_FILE_CANBE_OPENED_IN_SINGLEBYTE_ENCODING_ONLY)); if f.fs = nil then begin f.fs := new FileStream(f.fi.FullName, FileMode.Open); @@ -6349,10 +6351,10 @@ end; procedure Rewrite(f: AbstractBinaryFile; en: Encoding); begin - if (f is TypedFile) and not en.IsSingleByte then - raise new System.IO.IOException(GetTranslation(TYPED_FILE_CANBE_OPENED_IN_SINGLEBYTE_ENCODING_ONLY)); if f.fi = nil then raise new System.IO.IOException(GetTranslation(FILE_NOT_ASSIGNED)); + if (f is TypedFile) and not en.IsSingleByte then + raise new System.IO.IOException(GetTranslation(TYPED_FILE_CANBE_OPENED_IN_SINGLEBYTE_ENCODING_ONLY)); if f.fs = nil then begin f.fs := new FileStream(f.fi.FullName, FileMode.Create); diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index e76344f41..586a8521b 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -6323,6 +6323,8 @@ procedure Reset(f: AbstractBinaryFile; en: Encoding); begin if f.fi = nil then raise new System.IO.IOException(GetTranslation(FILE_NOT_ASSIGNED)); + if (f is TypedFile) and not en.IsSingleByte then + raise new System.IO.IOException(GetTranslation(TYPED_FILE_CANBE_OPENED_IN_SINGLEBYTE_ENCODING_ONLY)); if f.fs = nil then begin f.fs := new FileStream(f.fi.FullName, FileMode.Open); @@ -6349,10 +6351,10 @@ end; procedure Rewrite(f: AbstractBinaryFile; en: Encoding); begin - if (f is TypedFile) and not en.IsSingleByte then - raise new System.IO.IOException(GetTranslation(TYPED_FILE_CANBE_OPENED_IN_SINGLEBYTE_ENCODING_ONLY)); if f.fi = nil then raise new System.IO.IOException(GetTranslation(FILE_NOT_ASSIGNED)); + if (f is TypedFile) and not en.IsSingleByte then + raise new System.IO.IOException(GetTranslation(TYPED_FILE_CANBE_OPENED_IN_SINGLEBYTE_ENCODING_ONLY)); if f.fs = nil then begin f.fs := new FileStream(f.fi.FullName, FileMode.Create);