Package org.ek9lang.compiler.phase2
Class TypeHierarchyChecks
java.lang.Object
org.ek9lang.compiler.CompilerPhase
org.ek9lang.compiler.phase2.TypeHierarchyChecks
- All Implemented Interfaces:
BiFunction<Workspace,
CompilerFlags, CompilationPhaseResult>
SINGLE THREADED - Run across sources to check for types, functions and traits for 'super loops'.
This is a bit nasty, basically there is a need to follow supers all the way back.
For aggregates this is just 'getSuperAggregateSymbol' for functions 'getSuperFunctionSymbol'.
But for traits - you need to get all its traits.
But note that it is important to flip between an aggregate hierarchy and a trait one.
TODO consider checking property loops, not when type typed but when loops in constructor calls.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.CompilerPhase
compilableProgramAccess, listener, reporter
-
Constructor Summary
ConstructorDescriptionTypeHierarchyChecks
(SharedThreadContext<CompilableProgram> compilableProgramAccess, Consumer<CompilationEvent> listener, CompilerReporter reporter) Create a new instance for checking of type hierarchies. -
Method Summary
Modifier and TypeMethodDescriptionboolean
doApply
(Workspace workspace, CompilerFlags compilerFlags) Do the compilation phase.Methods inherited from class org.ek9lang.compiler.CompilerPhase
apply
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
-
Constructor Details
-
Method Details
-
doApply
Description copied from class:CompilerPhase
Do the compilation phase.- Specified by:
doApply
in classCompilerPhase
-