Skip to content

given block doesn't work without braces #7403

Closed
@kubukoz

Description

@kubukoz

minimized code

given
  def (i: Int) pow2 = i * i

println(5.pow2)

expectation

Code compiles

reality

[error] 2 |  def (i: Int) pow2 = i * i
[error]   |^^^
[error]   |an identifier expected, but 'end of statement' found
[error] one error found

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions