From 55550bf50bd6de2194f798361898df15574c8c14 Mon Sep 17 00:00:00 2001 From: Paulo Medeiros Date: Fri, 23 Feb 2024 21:21:41 -0100 Subject: [PATCH 1/3] Fix DisplayObject X and Y getters/setters --- lib/openfl/display/DisplayObject.as | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/openfl/display/DisplayObject.as b/lib/openfl/display/DisplayObject.as index b0806cc..f5a239e 100644 --- a/lib/openfl/display/DisplayObject.as +++ b/lib/openfl/display/DisplayObject.as @@ -741,10 +741,9 @@ package openfl.display { * rotated 90° counterclockwise. The object's coordinates refer to the * registration point position. */ - public var x:Number; - protected function get_x ():Number { return 0; } - protected function set_x (value:Number):Number { return 0; } + public function get x ():Number { return 0; } + public function set x (value:Number):Number; /** * Indicates the _y_ coordinate of the DisplayObject instance relative @@ -756,10 +755,9 @@ package openfl.display { * rotated 90° counterclockwise. The object's coordinates refer to the * registration point position. */ - public var y:Number; - protected function get_y ():Number { return 0; } - protected function set_y (value:Number):Number { return 0; } + public function get y ():Number { return 0; } + public function set y (value:Number):Number; // #if flash // @:noCompletion @:dox(hide) @:require(flash10) var z:Number { return 0; } From b2f93a64c543ac14dd586c35c252e46e059a1a31 Mon Sep 17 00:00:00 2001 From: Paulo Medeiros Date: Fri, 23 Feb 2024 21:26:37 -0100 Subject: [PATCH 2/3] remove returns and do proper fix --- lib/openfl/display/DisplayObject.as | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/openfl/display/DisplayObject.as b/lib/openfl/display/DisplayObject.as index f5a239e..7622611 100644 --- a/lib/openfl/display/DisplayObject.as +++ b/lib/openfl/display/DisplayObject.as @@ -743,7 +743,7 @@ package openfl.display { */ public function get x ():Number { return 0; } - public function set x (value:Number):Number; + public function set x (value:Number):Number {}; /** * Indicates the _y_ coordinate of the DisplayObject instance relative @@ -757,7 +757,7 @@ package openfl.display { */ public function get y ():Number { return 0; } - public function set y (value:Number):Number; + public function set y (value:Number):Number {}; // #if flash // @:noCompletion @:dox(hide) @:require(flash10) var z:Number { return 0; } From 6b74de36b8dc6e6eb93e7e4579a015e36ccfa1c1 Mon Sep 17 00:00:00 2001 From: Paulo Medeiros Date: Fri, 23 Feb 2024 21:30:33 -0100 Subject: [PATCH 3/3] Fix set type --- lib/openfl/display/DisplayObject.as | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/openfl/display/DisplayObject.as b/lib/openfl/display/DisplayObject.as index 7622611..d641f7e 100644 --- a/lib/openfl/display/DisplayObject.as +++ b/lib/openfl/display/DisplayObject.as @@ -743,7 +743,7 @@ package openfl.display { */ public function get x ():Number { return 0; } - public function set x (value:Number):Number {}; + public function set x (value:Number):void {}; /** * Indicates the _y_ coordinate of the DisplayObject instance relative @@ -757,7 +757,7 @@ package openfl.display { */ public function get y ():Number { return 0; } - public function set y (value:Number):Number {}; + public function set y (value:Number):void {}; // #if flash // @:noCompletion @:dox(hide) @:require(flash10) var z:Number { return 0; }