Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger records comparison bug #8120

Closed
garazdawi opened this issue Feb 15, 2024 · 0 comments
Closed

Debugger records comparison bug #8120

garazdawi opened this issue Feb 15, 2024 · 0 comments
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@garazdawi
Copy link
Contributor

The following code works when compiled but not when run in int.

-module(a_test).

%% This test works in OTP 22, but it fails in OTP 25 and OTP 26.
%%
%% Run this in the Erlang shell to reproduce it:
%%
%%   1> a_test:the_test().
%%   A TEST OK!!
%%   ok
%%   2> i:ii(a_test).
%%   {module,a_test}
%%   3> a_test:the_test().
%%   A TEST IS NOT OK!

-export([the_test/0]).

-define(is_foo(X), (((X#foo.the_baz)#baz.something == []))).

-record(baz, {something}).
-record(foo, {the_bar,
              the_baz}).
the_test() ->
    B = #baz{something = []},
    F = #foo{the_baz = B},
    if ?is_foo(F) ->
            io:format("A TEST OK!!~n",[]);
       true ->
            io:format("A TEST IS NOT OK!~n",[])
    end.
@garazdawi garazdawi added team:VM Assigned to OTP team VM bug Issue is reported as a bug labels Feb 15, 2024
bjorng added a commit to bjorng/otp that referenced this issue Mar 18, 2024
bjorng added a commit to bjorng/otp that referenced this issue Mar 18, 2024
bjorng added a commit that referenced this issue Mar 22, 2024
…P-18958

debugger: Fix incorrect evaluation of nested records in guard
@bjorng bjorng closed this as completed in 640339f Mar 22, 2024
rickard-green pushed a commit that referenced this issue Apr 12, 2024
* bjorn/debugger/guards/GH-8120/OTP-18958:
  debugger: Fix incorrect evaluation of nested records in guard
rickard-green pushed a commit that referenced this issue Apr 12, 2024
* bjorn/debugger/guards/GH-8120/OTP-18958:
  debugger: Fix incorrect evaluation of nested records in guard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

2 participants