Skip to content

Prism backend raises wrong error for pattern key mismatch #9546

Description

@headius

This appears to be a gap in how the Prism-based backend compiles this pattern.

$ jruby -e 'kwargs = {a: 1}; case kwargs; in {b: 2}; end'           
NoMatchingPatternKeyError: {a: 1}: key not found: :b
  <main> at -e:1
$ jruby -Xparser.prism -e 'kwargs = {a: 1}; case kwargs; in {b: 2}; end'
NoMatchingPatternError: {a: 1}
  <main> at -e:1

This broke the Prism verification build on master when #9542 was merged forward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions