diff options
author | Thomas Refis <thomas.refis@gmail.com> | 2018-09-26 23:14:43 +0100 |
---|---|---|
committer | Thomas Refis <thomas.refis@gmail.com> | 2018-10-05 10:51:26 +0100 |
commit | 2ccad26bd0b1fdb510582ec3159e405afa3952fb (patch) | |
tree | c107fb1be94376fa5ec19fe6cd3bbe45825d1510 /typing/datarepr.ml | |
parent | 2d3dc88315b921e2641ee324cb5766acb3c33df3 (diff) | |
download | ocaml-2ccad26bd0b1fdb510582ec3159e405afa3952fb.tar.gz |
always associate a scope to a type (previously it was optional)
Previously, not having a scope meant the type was used in every context,
now we set the scope to "Btype.lowest_level" to mean the same thing.
The equivalence was made obvious by the recent changes to identifiers
scoping.
Diffstat (limited to 'typing/datarepr.ml')
-rw-r--r-- | typing/datarepr.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/typing/datarepr.ml b/typing/datarepr.ml index 7bef64c9f2..bae3bd8bd6 100644 --- a/typing/datarepr.ml +++ b/typing/datarepr.ml @@ -86,7 +86,7 @@ let constructor_args priv cd_args cd_res path rep = type_manifest = None; type_variance = List.map (fun _ -> Variance.full) type_params; type_is_newtype = false; - type_expansion_scope = None; + type_expansion_scope = Btype.lowest_level; type_loc = Location.none; type_attributes = []; type_immediate = false; @@ -177,7 +177,7 @@ let extension_descr path_ext ext = cstr_inlined; } -let none = {desc = Ttuple []; level = -1; scope = None; id = -1} +let none = {desc = Ttuple []; level = -1; scope = Btype.generic_level; id = -1} (* Clearly ill-formed type *) let dummy_label = { lbl_name = ""; lbl_res = none; lbl_arg = none; lbl_mut = Immutable; |