Package org.ek9lang.compiler.phase2
package org.ek9lang.compiler.phase2
F - Resolution of Explicitly Defined Type Symbols at this point phase1 processing should have defined
most of the explicitly defined symbols, so they should be resolvable.
NonInferredTypeDefinition
is the main entry point here and it
delegates through to ResolveDefineExplicitTypeListener
.
Again the SymbolsAndScopes
class is used to manage the scopes.
The Symbols and scopes that were defined in phase1 are now lookup up using the
SymbolsAndScopes
and in some cases augmented or in other cases checked.
Following the pass described above and second pass of the 'AST' is done using
TypeHierarchyChecks
. This is focussed on checking for loops in type hierarchies.
See org.ek9lang.compiler.phase3
for the next stage of compilation.
-
ClassDescriptionChecks HTTP Access for service operations because some require HTTP_SOURCE, but others do not support it.Examines all the service operations on a service and looks at the verbs used and the uti proto paths.Just checks for duplicated trait names in the list.Can be MULTI THREADED for developer source, but single threaded for bootstrapping.Checks that the variable supplied (if not null and has a type), does not have a type that is a genericTypeParameter.For Constrained Types, focus on checking it is possible to constrain the type and if so then clones the appropriate methods/operators over and alters the types as appropriate.Checks for inferred declarations of variables in various contexts.A bit of a long-winded name, but this is really the second pass of the second phase of compilation.The Generic T used in parametric types will exist but won't have any methods on yet.Checks for a type is resolved and is suitable genus and category.Checks for a type is resolved and is suitable to be extended from (in basic terms).Only types of a specific genus can be used as constraints on the generic type 'T'.Looks at the function and if it has no super function, attempts to work out what would be the best super function generic type it could implement.Some aggregates like classes, components, etc.SINGLE THREADED - Run across sources to check for types, functions and traits for 'super loops'.Checks operators from various contexts, typically this is delegated to other functions.Checks the PATH value (if this is a path parameter) and ensures that the name appears in the path itself on the operation.Check that a service operation complies with ek9 rules or return types etc.Does a simple check (excluding any inheritance) for visibility rules on methods/operators on aggregates.