Skip to content

Improve error message for field accesses in secondary constructors #2631

Closed
@biboudis

Description

@biboudis
class Foo(x : Any) {
  val foo : Integer = 0

  def this() = {
    this(foo)
  }
}
-- [E006] Unbound Identifier Error: /Users/bibou/Projects/EPFL/dotty/compiler/../tests/run/tMain.scala:5:9 -------------
5 |    this(foo)
  |         ^^^
  |         not found: foo
    Compilation failed for: '../tests/run/tMain.scala'    

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