Class UninitialisedAtDeclaration

java.lang.Object
org.ek9lang.compiler.common.UninitialisedAtDeclaration
All Implemented Interfaces:
Predicate<ISymbol>

public final class UninitialisedAtDeclaration extends Object implements Predicate<ISymbol>
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 hold one, 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).

  • Constructor Details

    • UninitialisedAtDeclaration

      public UninitialisedAtDeclaration()
  • Method Details

    • test

      public boolean test(ISymbol symbol)
      True when the symbol was declared with no value: a property, local or returning variable that name as Type? left unset. Negate it for "was given a value where it was declared".
      Specified by:
      test in interface Predicate<ISymbol>