Class UninitialisedAtDeclaration

java.lang.Object
org.ek9lang.compiler.common.UninitialisedAtDeclaration

public final class UninitialisedAtDeclaration extends Object
THE reading of "was this variable, property or returning variable declared with NO value" - the UNINITIALISED_AT_DECLARATION squirrel that phase 1 sets on name as Type? (and phase 3 on a synthesised returning variable). Nine places read it raw as TRUE_VALUE.equals(getSquirrelledData(..)) (front-end rationalisation F20/C-5); they ask here, so "has an initialiser" is one question with one answer.

The predicates that ask more of a symbol build on this: UninitialisedVariableToBeChecked (a local, not a property) and UninitialisedPropertyToBeChecked (a property).

  • Method Details

    • declaredWithNoValue

      public static boolean declaredWithNoValue(ISymbol symbol)
      True when the symbol was declared with no value: a property, local or returning variable that name as Type? left unset.
    • hasInitialiser

      public static boolean hasInitialiser(ISymbol symbol)
      True when the symbol was given a value where it was declared (the opposite of declaredWithNoValue(ISymbol)).