Skip to content

Fix the syntax of if and while #9746

Closed
Closed
@smarter

Description

@smarter

This compiles but shouldn't (we should require then when using indentation syntax)

if cond
  fooA()
  fooB()

This compiles in Scala 2.13 but not in Dotty, but we should be able to support it:

var i = 0
while
  (i < 10) { i += 1 }

/cc @kpbochenek

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions