From 39fb57f8780ddcbf5fd4a13102c6b7185e8637cd Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Thu, 3 Jan 2019 01:53:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=82=D0=BA=D0=B0=D1=82=20=D1=84=D0=B8?= =?UTF-8?q?=D0=BA=D1=81=D0=B0=20#1408?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 4 ++-- Localization/DefaultLang.resources | Bin 88633 -> 88854 bytes ReleaseGenerators/PascalABCNET_version.nsh | 2 +- .../PatternsDesugaringVisitor.cs | 5 +++-- TestSuite/CompilationSamples/WPFObjects.pas | 13 +++++++++---- bin/Lib/PABCExtensions.pas | 4 +++- 7 files changed, 19 insertions(+), 11 deletions(-) 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 ef1661b5749f03789849bdb9172e3b087f70a9d8..1a7c62fe77215ab3938e9c8127c8d5408d9137fd 100644 GIT binary patch delta 214 zcmWlSK}y3w6hLXQcmg+~kRzxoH-cgEQv>l2c4nw`^H1Oj#5+_XdJa((Z{RV8u|ost z{4^04#URG*Mzrw)dX9`}F#FmO-9SYEY1f@jp5NZ6-(xE)1Xm zk}1U~ads|^q6Bgn#~Re*{?=gk(DBl(?Z&oURC81H6K7jrb%C26*}$P(g`e+e;Vb`X MTXt`!!@*|y2Nv>iTmS$7 delta 30 ocmV+(0O9|ZwgtJg1(4tZRavp({*#lD2OP6hl}2s19|HmRSK`7A#sB~S 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; /// Открывает типизированный файл целых и возвращает значение для инициализации файловой переменной