aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-02-05 08:45:15 +0100
committerHans Bolinder <[email protected]>2014-02-22 14:24:33 +0100
commitf58b946a2d1c1b9c8fa9701932ca2ee21bd7dd5b (patch)
tree8f52827a3d3d9e66ebbdcb85eb0888c350c56369 /lib
parent8cc06c1c7862ff4342f9c9256f9cf4038cda4129 (diff)
downloadotp-f58b946a2d1c1b9c8fa9701932ca2ee21bd7dd5b.tar.gz
otp-f58b946a2d1c1b9c8fa9701932ca2ee21bd7dd5b.tar.bz2
otp-f58b946a2d1c1b9c8fa9701932ca2ee21bd7dd5b.zip
Fix a bug concerning parameterized types
This should fix a problem with variables in parameterized types. In particular it concerns parameterized opaque types and records.
Diffstat (limited to 'lib')
-rw-r--r--lib/hipe/cerl/erl_types.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index 97a135e3ce..7180dd3a2b 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -4407,8 +4407,10 @@ build_field_dict([], _TypeNames, _RecDict, _VarDict, Acc) ->
get_mod_record([{FieldName, DeclType}|Left1],
[{FieldName, ModType}|Left2], Acc) ->
- case t_is_var(ModType) orelse t_is_remote(ModType) orelse
- t_is_subtype(ModType, DeclType) of
+ ModTypeNoVars = subst_all_vars_to_any(ModType),
+ case
+ t_is_remote(ModTypeNoVars) orelse t_is_subtype(ModTypeNoVars, DeclType)
+ of
false -> {error, FieldName};
true -> get_mod_record(Left1, Left2, [{FieldName, ModType}|Acc])
end;