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
Original reporter: cndenis
Affected versions: OTP-19.1.1, OTP-18.3
Fixed in version: OTP-19.2
Component: compiler
Migrated from: https://bugs.erlang.org/browse/ERL-301
A warning is generated when compiling the file in attachment with OTP 18 and 19.
No warning if not use inline.
No warning if delete the function compute/1.
No warning on OTP R16B03
{code:erlang}7> c(test).
test.erl:21: Warning: this clause cannot match because a previous clause at line 19 always matches
%% file test.erl
-module(test).
-compile([inline]).
-export([
compute1/1,
compute2/2
]).
compute1(X) ->
add(X, 0).
compute2(X, Y) ->
add(X, Y).
add(1, 0) ->
1;
add(1, Y) ->
1 + Y;
add(X, Y) ->
X + Y.{code}
The text was updated successfully, but these errors were encountered:
Original reporter:
cndenis
Affected versions:
OTP-19.1.1
,OTP-18.3
Fixed in version:
OTP-19.2
Component:
compiler
Migrated from: https://bugs.erlang.org/browse/ERL-301
The text was updated successfully, but these errors were encountered: