You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
it compiled success in OTP 25, but fail in OTP 27.
To Reproduce
-module(test).
-export([test/3]).
-record(test, {a,b,c}).
-record(test_a, {a,b,c,d,e,f}).
test(Test, Flag, Price) ->
Data = data:get_test(Test#test.a),
if
Data == [] ->
false;
true ->
C = Test#test.c,
Mina = proplists:get_value(C, Data#test_a.a),
Maxa = proplists:get_value(C, Data#test_a.b),
Minc = proplists:get_value(C, Data#test_a.c),
Maxc = proplists:get_value(C, Data#test_a.d),
if
Data#test_a.f == 0 andalso (Flag < Mina * Test#test.b) orelse (Flag > Maxa * Test#test.b) ->
false;
(Price < Minc * Test#test.b) orelse (Price > Maxc * Test#test.b) ->
true;
true ->
false
end
end.
ERROR:
Function: test/3
Sub pass ssa_opt_type_continue
Function: test/3
src/scene/test.erl: internal error in pass beam_ssa_opt:
exception error: no match of right hand side value #{{b_var,0} => {t_tuple,4,true,#{1 => {t_atom,[test]}}},
{b_var,1} => any,
{b_var,2} => any,
{b_var,23} => #Fun<beam_ssa_type.1.30313043>,
{b_var,85} => #Fun<beam_ssa_type.1.30313043>,
{b_var,88} => #Fun<beam_ssa_type.1.30313043>,
{b_var,98} => #Fun<beam_ssa_type.1.30313043>,
{b_var,105} => #Fun<beam_ssa_type.1.30313043>,
{b_var,112} => #Fun<beam_ssa_type.1.30313043>,
{b_var,119} => #Fun<beam_ssa_type.1.30313043>,
{b_var,'Data'} => {t_tuple,7,true,#{1 => {t_atom,[test_a]}}},
{b_var,'Maxa'} => any,
{b_var,'Maxc'} => any,
{b_var,'Mina'} => any,
{b_var,'Minc'} => any}
in function beam_ssa_type:concrete_type/2 (beam_ssa_type.erl, line 2482)
in call from beam_ssa_type:simplify_arg/3 (beam_ssa_type.erl, line 1850)
in call from beam_ssa_type:'-simplify_args/3-lc$^0/1-0-'/3 (beam_ssa_type.erl, line 1843)
in call from beam_ssa_type:'-simplify_args/3-lc$^0/1-0-'/3 (beam_ssa_type.erl, line 1843)
in call from beam_ssa_type:simplify/5 (beam_ssa_type.erl, line 1087)
in call from beam_ssa_type:opt_is/8 (beam_ssa_type.erl, line 582)
in call from beam_ssa_type:opt_bs/8 (beam_ssa_type.erl, line 524)
in call from beam_ssa_type:do_opt_function/6 (beam_ssa_type.erl, line 502)
The text was updated successfully, but these errors were encountered:
Describe the bug
it compiled success in OTP 25, but fail in OTP 27.
To Reproduce
ERROR:
The text was updated successfully, but these errors were encountered: