Class ReplacedInitialiserAnalyzer

java.lang.Object
org.ek9lang.compiler.common.CodeFlowMap
org.ek9lang.compiler.common.ReplacedInitialiserAnalyzer
All Implemented Interfaces:
CodeFlowAnalyzer

final class ReplacedInitialiserAnalyzer extends CodeFlowMap
THE question "has every path through the body given this returning variable a NEW value, so the value it was declared with can never be the one returned?" - asked of a returning variable that HAS an initialiser (<- rtn as Integer: Integer()). It is the definite-assignment analysis of UninitialisedVariableAnalyzer (E08050) on the same engine and the same branch pull-ups (IfStatementOrError, SwitchStatementOrError, ...): only the variables it follows differ - those declared WITH a value, where E08050 follows those declared without.

Nothing records a variable here unless a walk asks this question (phase 5's ordering-totality walk, E07188), so the other walks that share the pull-ups pay nothing for it.

  • Constructor Details

    • ReplacedInitialiserAnalyzer

      ReplacedInitialiserAnalyzer()