Skip to content

Commit fa57afc

Browse files
committed
[flash] change flash.utils.Object into a coreType abstract
Since it's also @:runtimeValue, we can actually reference Object, which is needed for interop sometimes
1 parent 3ea81db commit fa57afc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/generators/genswf9.ml

+1-2
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ let rec follow_basic t =
200200
| TAbstract ({ a_path = ([],"Bool") },[])
201201
| TInst ({ cl_path = (["haxe"],"Int32") },[]) -> t
202202
| t -> t)
203-
| TType ({ t_path = ["flash";"utils"],"Object" },[])
204203
| TType ({ t_path = ["flash";"utils"],"Function" },[])
205204
| TType ({ t_path = [],"UInt" },[]) ->
206205
t
@@ -280,7 +279,7 @@ let classify ctx t =
280279
(match !(a.a_status) with
281280
| Statics _ -> KNone
282281
| _ -> KDynamic)
283-
| TType ({ t_path = ["flash";"utils"],"Object" },[]) ->
282+
| TAbstract ({ a_path = ["flash";"utils"],"Object" },[]) ->
284283
KType (HMPath ([],"Object"))
285284
| TInst _ | TAbstract _ ->
286285
KType (type_id ctx t)

std/flash/utils/Object.hx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
package flash.utils;
22

3-
typedef Object = Dynamic
3+
@:coreType @:runtimeValue
4+
abstract Object from Dynamic to Dynamic {}

0 commit comments

Comments
 (0)