Describe the bug
$ erlc /tmp/bug.erl
bug:1: function f/1+10:
Internal consistency check failed - please report this bug.
Instruction: {call_only,1,{f,4}}
Error: {bad_arg_type,{x,0},{t_integer,{-27,23}},{t_integer,{-26,22}}}:
To Reproduce
-module(bug).
-export([main/0]).
main() ->
f(10).
f(N) ->
f(((-1) rem N) - 2).
Expected behavior
Compiles and then
Affected versions
trunk: ab09c7f
seems like it is relatively new, e.g. 26.2.2 is not affected https://godbolt.org/z/oqhWbMnb1
Describe the bug
To Reproduce
Expected behavior
Compiles and then
Affected versions
trunk: ab09c7f
seems like it is relatively new, e.g. 26.2.2 is not affected https://godbolt.org/z/oqhWbMnb1