Skip to content

Null pointer exception raised when variable has not yet been declared #218

@agilot

Description

@agilot

The following code snippet causes a NullPointerException.

object A extends lisa.Main{
  val f = x === x
  val x = variable
}
object C extends lisa.Main {
  A.x
}

This is due to the fact that x is declared after f. In more substantial pieces of code, this is not always obvious to spot, especially when objects start to be nested and variables imported from other files. In those cases, we may want to hint the user that the variable has not been declared yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions