Skip to content

fewerBraces example does not actually work #18014

Closed
@Sporarum

Description

@Sporarum

Compiler version

Scala 3.3.0

Minimized code & Output

List(1,2,3).map:
  x => // error: indented definitions expected, identifier x found
    val y = x - 1
    y * y

https://scastie.scala-lang.org/2v7yp07mQLicgj9PPuC46g

Taken from optional braces for method arguments

More Minimised

List(1,2,3).map:
  x => // error: indented definitions expected, identifier x found
    x

https://scastie.scala-lang.org/uzRJEI6wTsCrQDAwucv8cg

Expectation

Should not throw an error
(or reference should be updated)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions