diff options
author | Björn Gustavsson <[email protected]> | 2014-03-19 16:17:22 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-10-27 15:41:16 +0100 |
commit | bad6a90f51a4e66a0c17910ff2791aaa09c564a1 (patch) | |
tree | b8e202c680ef1bf3e366c886e8bbb13bc2c12c45 /erts/emulator/hipe | |
parent | 50f396e81ad3a3f815c8ac42b78b284b4941bece (diff) | |
download | otp-bad6a90f51a4e66a0c17910ff2791aaa09c564a1.tar.gz otp-bad6a90f51a4e66a0c17910ff2791aaa09c564a1.tar.bz2 otp-bad6a90f51a4e66a0c17910ff2791aaa09c564a1.zip |
Extract annotations from filter qualifiers in a type-friendly way
Commit 78ce8917d started to use get_anno/1 to extract the line
annotation from filter qualifiers in comprehensions, but this does not
respect the spec of this function and resuls in a dialyzer warning.
To make the code more type-friendly, introduce a get_qual_anno/1
function.
Kostis Sagonas suggested that the function should be implemented
similar to this to also ensure that the qualifiers are of the
appropriate form:
get_qual_anno({call,Line,_,_}) -> Line;
get_qual_anno({op,Line,_,_,_}) -> Line;
.
.
.
get_qual_anno({var,Line,_}) -> Line.
The problem is that it is difficult to know exacly which forms
that may occur and the function will need to be updated if new
abstract forms are added. Thus this implementation would complicate
maintanance without any real payoff.
Reported-by: Kostis Sagonas
Diffstat (limited to 'erts/emulator/hipe')
0 files changed, 0 insertions, 0 deletions