aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/erl_nif.xml
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2019-03-06 08:58:19 +0100
committerJohn Högberg <[email protected]>2019-03-06 09:57:57 +0100
commit22daa7e4f0143b3c18642dd50822295d6cb8923a (patch)
treea3c81423a41d83705b862d051862be6dd7c552e9 /erts/doc/src/erl_nif.xml
parent6073a054e098820a87a3c19d133348bcbfc6556b (diff)
downloadotp-22daa7e4f0143b3c18642dd50822295d6cb8923a.tar.gz
otp-22daa7e4f0143b3c18642dd50822295d6cb8923a.tar.bz2
otp-22daa7e4f0143b3c18642dd50822295d6cb8923a.zip
beam_validator: Fix type subtraction on select_* and inequality
Type subtraction never resulted in the 'none' type, even when it was obvious that it should. Once that was fixed it became apparent that inequality checks also fell into the same subtraction trap that the type pass warned about in a comment. This then led to another funny problem with select_val, consider the following code: {bif,'>=',{f,0},[{x,0},{integer,1}],{x,0}}. {select_val,{x,0},{f,70},{list,[{atom,false},{f,69}, {atom,true},{f,68}]}}. The validator knows that '>=' can only return a boolean, so once it has subtracted 'false' and 'true' it killed the state because all all valid branches had been taken, so validation would crash once it tried to branch off the fail label.
Diffstat (limited to 'erts/doc/src/erl_nif.xml')
0 files changed, 0 insertions, 0 deletions