Skip to content

Named pattern matching parser error when adding indentation #24474

@soronpo

Description

@soronpo

Compiler version

v3.7.4

Minimized code

case class Foo(arg1: Int, arg2: Int)

object Test: 
  Foo(1, 2) match
    case Foo(arg1 =
      5
    ) =>

Note that the following compiles successfully:

case class Foo(arg1: Int, arg2: Int)

object Test: 
  Foo(1, 2) match
    case Foo(arg1 =
    5
    ) =>

Output

error: illegal start of simple pattern

Expectation

No errors.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions