Skip to content

Missing error: "local variables must be initialized" #2368

Closed
@smarter

Description

@smarter

This should be an error, like it is with scalac:

object Test {
  def main(args: Array[String]): Unit = {
    var foo: String = _
  }
}

But with dotty it isn't, until it crashes in the backend.

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