From b5ea7dacb9aeebf7f7a566cbc69b336e5d66988d Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Thu, 11 Jul 2019 22:05:19 +0300 Subject: [PATCH] fix #2042 --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 4 ++-- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- TestSuite/CompilationSamples/PABCSystem.pas | 12 ++++++------ TestSuite/StepReal.pas | 3 +++ bin/Lib/PABCSystem.pas | 12 ++++++------ 6 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 TestSuite/StepReal.pas diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index ca1fa18d8..12203715e 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 = "5"; public const string Build = "0"; - public const string Revision = "2191"; + public const string Revision = "2192"; 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 a708230fb..4eea306ce 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=5 -%REVISION%=2191 %COREVERSION%=0 +%REVISION%=2192 +%MINOR%=5 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 63912ee87..fe9cea5ef 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.5.0.2191' +!define VERSION '3.5.0.2192' diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index 47a5885a2..8565743af 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -8488,23 +8488,23 @@ begin end; end; -/// Возвращает бесконечную последовательность целых от текущего значения с шагом step -function Step(Self: integer; step: integer): sequence of integer; extensionmethod; +/// Возвращает бесконечную последовательность целых от текущего значения с шагом st +function Step(Self: integer; st: integer): sequence of integer; extensionmethod; begin while True do begin yield Self; - Self += step; + Self += st; end; end; -/// Возвращает бесконечную последовательность вещественных от текущего значения с шагом step -function Step(Self: real; step: real): sequence of real; extensionmethod; +/// Возвращает бесконечную последовательность вещественных от текущего значения с шагом st +function Step(Self: real; st: real): sequence of real; extensionmethod; begin while True do begin yield Self; - Self += step; + Self += st; end; end; diff --git a/TestSuite/StepReal.pas b/TestSuite/StepReal.pas new file mode 100644 index 000000000..7aefb98c4 --- /dev/null +++ b/TestSuite/StepReal.pas @@ -0,0 +1,3 @@ +begin + Assert(0.0.Step(0.3).Take(2).SequenceEqual(Seq(0.0,0.3))); +end. \ No newline at end of file diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index 47a5885a2..8565743af 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -8488,23 +8488,23 @@ begin end; end; -/// Возвращает бесконечную последовательность целых от текущего значения с шагом step -function Step(Self: integer; step: integer): sequence of integer; extensionmethod; +/// Возвращает бесконечную последовательность целых от текущего значения с шагом st +function Step(Self: integer; st: integer): sequence of integer; extensionmethod; begin while True do begin yield Self; - Self += step; + Self += st; end; end; -/// Возвращает бесконечную последовательность вещественных от текущего значения с шагом step -function Step(Self: real; step: real): sequence of real; extensionmethod; +/// Возвращает бесконечную последовательность вещественных от текущего значения с шагом st +function Step(Self: real; st: real): sequence of real; extensionmethod; begin while True do begin yield Self; - Self += step; + Self += st; end; end;