Package org.ek9lang.compiler.phase2
Class CheckSuitableToExtend
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.phase2.CheckSuitableToExtend
final class CheckSuitableToExtend
extends RuleSupport
implements Function<org.antlr.v4.runtime.ParserRuleContext,Optional<ISymbol>>
Checks for a type is resolved and is suitable to be extended from (in basic terms).
This does not include the 'allows only' graph that has to be done one the whole type hierarchy has been
established.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorsConstructorDescriptionCheckSuitableToExtend
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener, List<ISymbol.SymbolGenus> genus, boolean issueErrorIfNotResolved) Checks that the typedef/identifierReference passed in (when resolved) is suitable to be extended from.CheckSuitableToExtend
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener, ISymbol.SymbolGenus genus, boolean issueErrorIfNotResolved) Checks that the typedef/identifierReference passed in (when resolved) is suitable to be extended from. -
Method Summary
-
Constructor Details
-
CheckSuitableToExtend
CheckSuitableToExtend(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener, ISymbol.SymbolGenus genus, boolean issueErrorIfNotResolved) Checks that the typedef/identifierReference passed in (when resolved) is suitable to be extended from. -
CheckSuitableToExtend
public CheckSuitableToExtend(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener, List<ISymbol.SymbolGenus> genus, boolean issueErrorIfNotResolved) Checks that the typedef/identifierReference passed in (when resolved) is suitable to be extended from. Accepts multiple allowed genus. i.e. FUNCTION and FUNCTION_TRAIT.
-
-
Method Details