-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugIssue is reported as a bugIssue is reported as a bugteam:PSAssigned to OTP team PSAssigned to OTP team PS
Description
Function clause matching does not work under debugger if the syntax #record.field is used as function parameter.
To reproduce use the following module:
-module(testrec).
-export([test/0]).
-record(test, {field1, field2}).
func1(Field) when Field =:= #test.field1 -> ok.
func2(#test.field1) -> ok.
test() ->
io:format("1: ~p~n", [func1(#test.field1)]),
io:format("2: ~p~n", [func2(#test.field1)]).
If it is run under debugger, test() call ends with
1: ok
** exception error: no function clause matching testrec:func2(2)
(testrec.erl, line 7)
in function testrec:test/0 (testrec.erl, line 11)
Without debugger it correctly prints two ok's. This is observed in Erlang/OTP 24.
dgud
Metadata
Metadata
Assignees
Labels
bugIssue is reported as a bugIssue is reported as a bugteam:PSAssigned to OTP team PSAssigned to OTP team PS