Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[erlc] internal error in erl_expand_records:in_guard/1 #8190

@RobinMorisset

Description

@RobinMorisset

Describe the bug
Running erlc on the following code:

-record(r0, {rf0}).
-record(r1, {rf1 = (#r0{rf0 = #{ok => ok || ok}})}).

f3() ->
    <<0 || #r1{}>>.

causes the following crash:

internal error in pass expand_records:
exception error: no match of right hand side value true
  in function  erl_expand_records:in_guard/1 (erl_expand_records.erl, line 215)
  in call from erl_expand_records:lc_tq/3 (erl_expand_records.erl, line 560)
  in call from erl_expand_records:expr/2 (erl_expand_records.erl, line 304)
  in call from erl_expand_records:expr_list/2 (erl_expand_records.erl, line 473)
  in call from erl_expand_records:expr_list/2 (erl_expand_records.erl, line 474)
  in call from erl_expand_records:expr/2 (erl_expand_records.erl, line 308)
  in call from erl_expand_records:expr_list/2 (erl_expand_records.erl, line 473)
  in call from erl_expand_records:expr_list/2 (erl_expand_records.erl, line 474)

Affected versions

  • master

Metadata

Metadata

Assignees

Labels

bugIssue is reported as a bugteam:VMAssigned to OTP team VM

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions