diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 315104e7b..2daacc513 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 = "1919"; + public const string Revision = "1920"; 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 754a33972..55f6104e6 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=2 -%REVISION%=1919 %MINOR%=4 +%REVISION%=1920 +%COREVERSION%=2 %MAJOR%=3 diff --git a/Localization/DefaultLang.resources b/Localization/DefaultLang.resources index ef1661b57..1a7c62fe7 100644 Binary files a/Localization/DefaultLang.resources and b/Localization/DefaultLang.resources differ diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index ab8f5140a..7fe6e0923 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.4.2.1919' +!define VERSION '3.4.2.1920' diff --git a/SyntaxVisitors/SugarVisitors/PatternsDesugaringVisitor.cs b/SyntaxVisitors/SugarVisitors/PatternsDesugaringVisitor.cs index 68afb482b..d99df9810 100644 --- a/SyntaxVisitors/SugarVisitors/PatternsDesugaringVisitor.cs +++ b/SyntaxVisitors/SugarVisitors/PatternsDesugaringVisitor.cs @@ -98,7 +98,8 @@ namespace SyntaxVisitors.SugarVisitors if (patternCase.pattern is deconstructor_pattern) { // Проверяем встречался ли уже такой тип при деконструкции - var deconstructionType = (patternCase.pattern as deconstructor_pattern). + // SSM 02.01.19 пока закомментировал этот кусок т.к. при этом коде падает стандартный пример ArithmSimplify.cs. #1408 снова открыл + /*var deconstructionType = (patternCase.pattern as deconstructor_pattern). type as named_type_reference; if (deconstructionType != null && deconstructionType.names != null && @@ -111,7 +112,7 @@ namespace SyntaxVisitors.SugarVisitors patternCase.pattern.source_context); } usedDeconstructionTypes.Add(deconstructionTypeName); - } + } */ DesugarDeconstructorPatternCase(matchWith.expr, patternCase); } diff --git a/TestSuite/CompilationSamples/WPFObjects.pas b/TestSuite/CompilationSamples/WPFObjects.pas index 6a472be2e..718400406 100644 --- a/TestSuite/CompilationSamples/WPFObjects.pas +++ b/TestSuite/CompilationSamples/WPFObjects.pas @@ -146,15 +146,14 @@ type gr: Grid; // Grid связан только с текстом t: TextBlock; r: RotateTransform; - _dx,_dy: real; ChildrenWPF := new List; procedure InitOb(x,y,w,h: real; o: FrameworkElement; SetWH: boolean := True); public /// Направление движения по оси X. Используется методом Move - property Dx: real read _dx write _dx; + auto property Dx: real; /// Направление движения по оси Y. Используется методом Move - property Dy: real read _dy write _dy; + auto property Dy: real; /// Отступ графического объекта от левого края property Left: real read InvokeReal(()->Canvas.GetLeft(can)) write Invoke(procedure->Canvas.SetLeft(can,value)); /// Отступ графического объекта от верхнего края @@ -163,6 +162,8 @@ type property Width: real read InvokeReal(()->gr.Width) write Invoke(procedure->begin gr.Width := value; ob.Width := value end); virtual; /// Высота графического объекта property Height: real read InvokeReal(()->gr.Height) write Invoke(procedure->begin gr.Height := value; ob.Height := value end); virtual; + /// Прямоугольник графического объекта + property Bounds: GRect read Invoke&(()->begin Result := new GRect(Canvas.GetLeft(can),Canvas.GetTop(can),gr.Width,gr.Height); end); /// Текст внутри графического объекта property Text: string read InvokeString(()->t.Text) write Invoke(procedure->t.Text := value); /// Целое число, выводимое в центре графического объекта. Используется свойство Text @@ -193,6 +194,10 @@ type Result.Transform := g; // версия end; public + /// Видимость графического объекта + property Visible: boolean + read InvokeBoolean(()->ob.Visibility = Visibility.Visible) + write Invoke(procedure -> if value then ob.Visibility := Visibility.Visible else ob.Visibility := Visibility.Hidden); /// Выравнивание текста внутри графического объекта property TextAlignment: Alignment write Invoke(WTA,Value); /// Размер текста внутри графического объекта @@ -237,7 +242,7 @@ type /// Перемещает графический объект на вектор (a,b) procedure MoveOn(a,b: real) := MoveTo(Left+a,Top+b); /// Перемещает графический объект на вектор (dx,dy) - procedure Move := MoveOn(dx,dy); + procedure Move; virtual := MoveOn(dx,dy); /// Поворачивает графический объект по часовой стрелке на угол da procedure Rotate(da: real) := RotateAngle += da; /// Добавляет к графическому объекту дочерний diff --git a/bin/Lib/PABCExtensions.pas b/bin/Lib/PABCExtensions.pas index f48f7c963..2d3adf7e1 100644 --- a/bin/Lib/PABCExtensions.pas +++ b/bin/Lib/PABCExtensions.pas @@ -32,7 +32,9 @@ end; /// Создаёт или обнуляет типизированный файл и возвращает значение для инициализации файловой переменной function CreateFile(fname: string): file of T; begin - PABCSystem.Rewrite(Result, fname); + var res: file of T; + PABCSystem.Rewrite(res, fname); + Result := res; end; /// Открывает типизированный файл целых и возвращает значение для инициализации файловой переменной