diff options
author | Hans Bolinder <[email protected]> | 2014-02-23 12:21:32 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2014-02-23 12:21:32 +0100 |
commit | 502b13aaf568e351bc30e44d0e14c063cbf5fc5a (patch) | |
tree | 48792bcd4ed41c9e8a974c1dc42f425dc8c0a970 /lib/dialyzer/src | |
parent | db911c1f15372d2dadf06e8502506b0936a4fbb3 (diff) | |
parent | 85a5aca047ea4c3dcdeb1e47cdf523a48140bf18 (diff) | |
download | otp-502b13aaf568e351bc30e44d0e14c063cbf5fc5a.tar.gz otp-502b13aaf568e351bc30e44d0e14c063cbf5fc5a.tar.bz2 otp-502b13aaf568e351bc30e44d0e14c063cbf5fc5a.zip |
Merge branch 'hb/dialyzer/para_opaque/OTP-11625'
* hb/dialyzer/para_opaque/OTP-11625:
Introduce parameterized opaque types
Fix a bug concerning parameterized types
Solve remote types in parameters
Diffstat (limited to 'lib/dialyzer/src')
-rw-r--r-- | lib/dialyzer/src/dialyzer_contracts.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/dialyzer/src/dialyzer_contracts.erl b/lib/dialyzer/src/dialyzer_contracts.erl index 3467ab4e65..5b2c52b2d0 100644 --- a/lib/dialyzer/src/dialyzer_contracts.erl +++ b/lib/dialyzer/src/dialyzer_contracts.erl @@ -404,7 +404,8 @@ contract_from_form([{type, _, 'fun', [_, _]} = Form | Left], RecDict, throw({error, NewMsg}) end, NewType = erl_types:t_solve_remote(Type, ExpTypes, AllRecords), - {NewType, []} + NewTypeNoVars = erl_types:subst_all_vars_to_any(NewType), + {NewTypeNoVars, []} end, NewTypeAcc = [TypeFun | TypeAcc], NewFormAcc = [{Form, []} | FormAcc], @@ -418,7 +419,8 @@ contract_from_form([{type, _L1, bounded_fun, process_constraints(Constr, RecDict, ExpTypes, AllRecords), Type = erl_types:t_from_form(Form, RecDict, VarDict), NewType = erl_types:t_solve_remote(Type, ExpTypes, AllRecords), - {NewType, Constr1} + NewTypeNoVars = erl_types:subst_all_vars_to_any(NewType), + {NewTypeNoVars, Constr1} end, NewTypeAcc = [TypeFun | TypeAcc], NewFormAcc = [{Form, Constr} | FormAcc], |