Skip to content

Failing to compile functions with { on the start of next line #1792

Closed
@nicolasstucki

Description

@nicolasstucki

In scalac it is possible to compile the following:

def foo(x: Int) 
{
  x
}

In dotty with -language:Scala2 the following error is emitted.

    |    x
    |    ^
    |    not found: x

This kind of code can be found in scala/io/Source.scala and this is why it is not whitelisted.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions