|
@@ -270,6 +270,12 @@ let type_field cfg ctx e i p mode (with_type : WithType.t) =
|
|
| None -> raise Not_found
|
|
| None -> raise Not_found
|
|
in
|
|
in
|
|
let type_field_by_et f e t =
|
|
let type_field_by_et f e t =
|
|
|
|
+ let e = match ctx.com.platform with
|
|
|
|
+ | Cs ->
|
|
|
|
+ {e with etype = t}
|
|
|
|
+ | _ ->
|
|
|
|
+ mk (TCast(e,None)) t e.epos
|
|
|
|
+ in
|
|
f e (follow_without_type t)
|
|
f e (follow_without_type t)
|
|
in
|
|
in
|
|
let type_field_by_e f e =
|
|
let type_field_by_e f e =
|
|
@@ -291,15 +297,7 @@ let type_field cfg ctx e i p mode (with_type : WithType.t) =
|
|
type_field_by_forward f Meta.ForwardStatics a
|
|
type_field_by_forward f Meta.ForwardStatics a
|
|
in
|
|
in
|
|
let type_field_by_forward_member f e a tl =
|
|
let type_field_by_forward_member f e a tl =
|
|
- let f () =
|
|
|
|
- let t = Abstract.get_underlying_type ~return_first:true a tl in
|
|
|
|
- let e = if Meta.has Meta.ForwardAccessOnAbstract a.a_meta then
|
|
|
|
- e
|
|
|
|
- else
|
|
|
|
- mk (TCast(e,None)) t e.epos
|
|
|
|
- in
|
|
|
|
- type_field_by_et f e t
|
|
|
|
- in
|
|
|
|
|
|
+ let f () = type_field_by_et f e (Abstract.get_underlying_type ~return_first:true a tl) in
|
|
type_field_by_forward f Meta.Forward a
|
|
type_field_by_forward f Meta.Forward a
|
|
in
|
|
in
|
|
let type_field_by_typedef f e td tl =
|
|
let type_field_by_typedef f e td tl =
|
|
@@ -382,10 +380,7 @@ let type_field cfg ctx e i p mode (with_type : WithType.t) =
|
|
field_access f FHAnon
|
|
field_access f FHAnon
|
|
)
|
|
)
|
|
| CTypes tl ->
|
|
| CTypes tl ->
|
|
- type_field_by_list (fun (t,_) ->
|
|
|
|
- let e = mk (TCast(e,None)) t e.epos in
|
|
|
|
- type_field_by_et type_field_by_type e t
|
|
|
|
- ) tl
|
|
|
|
|
|
+ type_field_by_list (fun (t,_) -> type_field_by_et type_field_by_type e t) tl
|
|
| CUnknown ->
|
|
| CUnknown ->
|
|
if not (List.exists (fun (m,_) -> m == r) ctx.monomorphs.perfunction) && not (ctx.untyped && ctx.com.platform = Neko) then
|
|
if not (List.exists (fun (m,_) -> m == r) ctx.monomorphs.perfunction) && not (ctx.untyped && ctx.com.platform = Neko) then
|
|
ctx.monomorphs.perfunction <- (r,p) :: ctx.monomorphs.perfunction;
|
|
ctx.monomorphs.perfunction <- (r,p) :: ctx.monomorphs.perfunction;
|