Skip to content

Error message for lazy var and inline var is wrong: says erased instead of lazy or inline #11872

Closed
@bjornregnell

Description

@bjornregnell

Compiler version

3.0.0-RC2-bin-20210323-d4f1c26-NIGHTLY

Minimized code and Output

scala> lazy var x = 42
1 |lazy var x = 42
  |         ^
  |         Modifier `erased` is not allowed for this definition

Expectation

Error message falsely says that the lazy modifier is erased, instead it should be:

scala> lazy var x = 42
1 |lazy var x = 42
  |         ^
  |         Modifier `lazy` is not allowed for this definition

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions