diff options
author | Stavros Aronis <[email protected]> | 2012-04-23 16:38:57 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-04-24 12:02:26 +0200 |
commit | 56e3930cf406228d1e946a38aa4e77c62e8badb3 (patch) | |
tree | e3384f3e6369e95ccdc683a7b4275e7abf34c43a /lib/hipe/cerl | |
parent | 3ab2dd6d490a3b0d1e8d8cad64b460e09b130c15 (diff) | |
download | otp-56e3930cf406228d1e946a38aa4e77c62e8badb3.tar.gz otp-56e3930cf406228d1e946a38aa4e77c62e8badb3.tar.bz2 otp-56e3930cf406228d1e946a38aa4e77c62e8badb3.zip |
Correct handling of type names in contracts
Variables in contracts can either be true type variables or simply names for
types thet are defined in the 'when' clauses. Consider the following example:
-spec foo(X, Options) -> {ok, X} | error when Options :: [{atom(), boolean()}].
Here X is a true variable whereas Options is a name for a type that is defined
in the when clause.
'when' clauses may further use names on the right side. These were not treated
properly by Dialyzer and could be generalized to the term() type. This patch
fixes this issue.
A further issue is the treatment of true type variables, but this is left for
another patch.
Diffstat (limited to 'lib/hipe/cerl')
0 files changed, 0 insertions, 0 deletions