|
@@ -112,10 +112,7 @@ module Constructor = struct
|
|
|
let p = pos con in
|
|
|
match fst con with
|
|
|
| ConEnum(en,ef) ->
|
|
|
- if Meta.has Meta.FakeEnum en.e_meta then begin
|
|
|
- let e_mt = TyperBase.type_module_type ctx (TEnumDecl en) None p in
|
|
|
- mk (TField(e_mt,FEnum(en,ef))) ef.ef_type p
|
|
|
- end else if match_debug then mk (TConst (TString ef.ef_name)) ctx.t.tstring p
|
|
|
+ if match_debug then mk (TConst (TString ef.ef_name)) ctx.t.tstring p
|
|
|
else mk (TConst (TInt (Int32.of_int ef.ef_index))) ctx.t.tint p
|
|
|
| ConConst ct -> make_const_texpr ctx.com.basic ct p
|
|
|
| ConArray i -> make_int ctx.com.basic i p
|
|
@@ -1200,7 +1197,6 @@ module TexprConverter = struct
|
|
|
type match_kind =
|
|
|
| SKValue
|
|
|
| SKEnum
|
|
|
- | SKFakeEnum
|
|
|
| SKLength
|
|
|
|
|
|
exception Not_exhaustive
|
|
@@ -1230,7 +1226,6 @@ module TexprConverter = struct
|
|
|
let s_match_kind = function
|
|
|
| SKValue -> "value"
|
|
|
| SKEnum -> "enum"
|
|
|
- | SKFakeEnum -> "fakeEnum"
|
|
|
| SKLength -> "length"
|
|
|
|
|
|
let unify_constructor ctx params t con =
|
|
@@ -1314,10 +1309,7 @@ module TexprConverter = struct
|
|
|
SKLength,Infinite
|
|
|
| TEnum(en,pl) ->
|
|
|
PMap.iter (fun _ ef -> add (ConEnum(en,ef),null_pos)) en.e_constrs;
|
|
|
- if Meta.has Meta.FakeEnum en.e_meta then
|
|
|
- SKFakeEnum,CompileTimeFinite
|
|
|
- else
|
|
|
- SKEnum,RunTimeFinite
|
|
|
+ SKEnum,RunTimeFinite
|
|
|
| TAnon _ ->
|
|
|
SKValue,CompileTimeFinite
|
|
|
| TInst(_,_) ->
|
|
@@ -1327,7 +1319,7 @@ module TexprConverter = struct
|
|
|
in
|
|
|
let kind,finiteness = loop t in
|
|
|
let compatible_kind con = match fst con with
|
|
|
- | ConEnum _ -> kind = SKEnum || kind = SKFakeEnum
|
|
|
+ | ConEnum _ -> kind = SKEnum
|
|
|
| ConArray _ -> kind = SKLength
|
|
|
| _ -> kind = SKValue
|
|
|
in
|
|
@@ -1435,7 +1427,7 @@ module TexprConverter = struct
|
|
|
end
|
|
|
) cases in
|
|
|
let e_subject = match kind with
|
|
|
- | SKValue | SKFakeEnum -> e_subject
|
|
|
+ | SKValue -> e_subject
|
|
|
| SKEnum -> if match_debug then mk_name_call e_subject else mk_index_call e_subject
|
|
|
| SKLength -> type_field_access ctx e_subject "length"
|
|
|
in
|