Class RetractedComparatorUseOrError
java.lang.Object
org.ek9lang.antlr.EK9BaseListener
org.ek9lang.compiler.common.AbstractEK9PhaseListener
org.ek9lang.compiler.common.ScopeStackConsistencyListener
org.ek9lang.compiler.phase5.RetractedComparatorUseOrError
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeListener, EK9Listener
PRE_IR_CHECKS use-site check for a RETRACTED bare default comparison operator.
DefaultComparatorRecheckOrError retracts a bare-inferred <=>,<,<=,>,>= when a field's type
is not orderable, so the operator is not generated. A use of that operator (holderA <=> holderB)
was resolved back in FULL_RESOLUTION (before the retraction), so its bound CallSymbol still points
at the now-retracted operator. This listener reports that as OPERATOR_NOT_DEFINED (E07620) - the
SAME outcome as a direct list <=> list: a comparison that cannot work is not available, so ordering
the wrapper is a compile error. Must run AFTER the retraction pass. Holds no shared state - safe in the
phase's parallel per-source walk.
-
Field Summary
Fields inherited from class AbstractEK9PhaseListener
symbolsAndScopes -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ScopeStackConsistencyListener
enterApplicationDeclaration, enterBlock, enterCatchStatementExpression, enterClassDeclaration, enterComponentDeclaration, enterDynamicClassDeclaration, enterDynamicFunctionDeclaration, enterDynamicVariableCapture, enterFinallyStatementExpression, enterForStatementExpression, enterFunctionDeclaration, enterIfStatement, enterInstructionBlock, enterMethodDeclaration, enterOperatorDeclaration, enterPackageBlock, enterRecordDeclaration, enterReturningParam, enterServiceDeclaration, enterServiceOperationDeclaration, enterSingleStatementBlock, enterSwitchStatementExpression, enterTernaryPart, enterTextBodyDeclaration, enterTextDeclaration, enterTraitDeclaration, enterTryStatementExpression, enterTypeDeclaration, enterWhileStatementExpressionMethods inherited from class AbstractEK9PhaseListener
exitApplicationDeclaration, exitBlock, exitCatchStatementExpression, exitClassDeclaration, exitComponentDeclaration, exitDynamicClassDeclaration, exitDynamicFunctionDeclaration, exitDynamicVariableCapture, exitFinallyStatementExpression, exitForStatementExpression, exitFunctionDeclaration, exitIfStatement, exitInstructionBlock, exitMethodDeclaration, exitModuleDeclaration, exitOperatorDeclaration, exitPackageBlock, exitRecordDeclaration, exitReturningParam, exitServiceDeclaration, exitServiceOperationDeclaration, exitSingleStatementBlock, exitSwitchStatementExpression, exitTernaryPart, exitTextBodyDeclaration, exitTextDeclaration, exitTraitDeclaration, exitTryStatementExpression, exitTypeDeclaration, exitWhileStatementExpression, getErrorListener, getParsedModule, isScopeStackEmpty, pullBlockTerminationUp, pullIfElseTerminationUp, pullSwitchCaseDefaultUp, pullTryCatchFinallyUpMethods inherited from class EK9BaseListener
enterAccessModifier, enterAggregateParts, enterAggregateProperty, enterAllowingOnly, enterApplicationBlock, enterArgumentParam, enterAspectDeclaration, enterAssertDoesNotThrowExpression, enterAssertPanicExpression, enterAssertStatement, enterAssertThrowsExpression, enterAssignmentExpression, enterAssignmentStatement, enterBinaryLit, enterBinaryLiteral, enterBlockStatement, enterBooleanLit, enterBooleanLiteral, enterCall, enterCaseExpression, enterCaseStatement, enterCharacterLit, enterCharacterLiteral, enterClassBlock, enterCloseStatement, enterColourLit, enterColourLiteral, enterCompilationUnit, enterComponentBlock, enterConstantBlock, enterConstantDeclaration, enterConstantInitialiser, enterConstrainDeclaration, enterConstrainType, enterDateLit, enterDateLiteral, enterDateTimeLit, enterDateTimeLiteral, enterDeclareArgumentParam, enterDecorationDimensionLiteral, enterDecorationResolutionLiteral, enterDefaultOperator, enterDict, enterDimensionLit, enterDirective, enterDirectivePart, enterDottedName, enterDurationLit, enterDurationLiteral, enterDynamicFunctionBody, enterElseOnlyBlock, enterEmptyBlock, enterEnumerationDeclaration, enterEveryRule, enterExcludedControlFlowStatement, enterExcludedInstantiation, enterExcludedListComprehension, enterExcludedLiteral, enterExpression, enterExpressionParam, enterExtendDeclaration, enterExtendPreamble, enterFloatingPointLit, enterFloatingPointLiteral, enterForLoop, enterForRange, enterFunctionBlock, enterGuardExpression, enterHttpAccess, enterHttpVerb, enterIdentifier, enterIdentifierReference, enterIfControlBlock, enterInitValuePair, enterIntegerLit, enterIntegerLiteral, enterList, enterMillisecondLit, enterMillisecondLiteral, enterModuleBlock, enterModuleDeclaration, enterModuleSegment, enterMoneyLit, enterMoneyLiteral, enterObjectAccess, enterObjectAccessExpression, enterObjectAccessStart, enterObjectAccessType, enterOperationCall, enterOperationDetails, enterOperator, enterParameterisedArgs, enterParameterisedDetail, enterParameterisedParams, enterParameterisedType, enterParamExpression, enterPathLit, enterPathLiteral, enterPipelinePart, enterPreFlowAndControl, enterPreFlowStatement, enterPrimary, enterPrimaryReference, enterProgramBlock, enterRange, enterRecordBlock, enterReferencesBlock, enterRegExLit, enterRegisterStatement, enterRegularExpressionLiteral, enterRequireStatement, enterReservedWord, enterResolutionLit, enterSecurityConstraint, enterServiceBlock, enterSheBang, enterStatement, enterStreamCat, enterStreamExpression, enterStreamExpressionTermination, enterStreamFor, enterStreamPart, enterStreamSource, enterStreamStatement, enterStreamStatementTermination, enterStringLit, enterStringLiteral, enterStringPart, enterTextBlock, enterThrowStatement, enterTimeLit, enterTimeLiteral, enterTraitBlock, enterTraitPreamble, enterTraitReference, enterTraitsList, enterTypeBlock, enterTypeDef, enterVariableDeclaration, enterVariableOnlyDeclaration, enterVersionNumberLit, enterVersionNumberLiteral, enterWebVariableCorrelation, exitAccessModifier, exitAggregateParts, exitAggregateProperty, exitAllowingOnly, exitApplicationBlock, exitArgumentParam, exitAspectDeclaration, exitAssertDoesNotThrowExpression, exitAssertPanicExpression, exitAssertStatement, exitAssertThrowsExpression, exitAssignmentExpression, exitAssignmentStatement, exitBinaryLit, exitBinaryLiteral, exitBlockStatement, exitBooleanLit, exitBooleanLiteral, exitCall, exitCaseExpression, exitCaseStatement, exitCharacterLit, exitCharacterLiteral, exitClassBlock, exitCloseStatement, exitColourLit, exitColourLiteral, exitCompilationUnit, exitComponentBlock, exitConstantBlock, exitConstantDeclaration, exitConstantInitialiser, exitConstrainDeclaration, exitConstrainType, exitDateLit, exitDateLiteral, exitDateTimeLit, exitDateTimeLiteral, exitDeclareArgumentParam, exitDecorationDimensionLiteral, exitDecorationResolutionLiteral, exitDefaultOperator, exitDict, exitDimensionLit, exitDirective, exitDirectivePart, exitDottedName, exitDurationLit, exitDurationLiteral, exitDynamicFunctionBody, exitElseOnlyBlock, exitEmptyBlock, exitEnumerationDeclaration, exitEveryRule, exitExcludedControlFlowStatement, exitExcludedInstantiation, exitExcludedListComprehension, exitExcludedLiteral, exitExpressionParam, exitExtendDeclaration, exitExtendPreamble, exitFloatingPointLit, exitFloatingPointLiteral, exitForLoop, exitForRange, exitFunctionBlock, exitGuardExpression, exitHttpAccess, exitHttpVerb, exitIdentifier, exitIdentifierReference, exitIfControlBlock, exitInitValuePair, exitIntegerLit, exitIntegerLiteral, exitList, exitMillisecondLit, exitMillisecondLiteral, exitModuleBlock, exitModuleSegment, exitMoneyLit, exitMoneyLiteral, exitObjectAccess, exitObjectAccessExpression, exitObjectAccessStart, exitObjectAccessType, exitOperationCall, exitOperationDetails, exitOperator, exitParameterisedArgs, exitParameterisedDetail, exitParameterisedParams, exitParameterisedType, exitParamExpression, exitPathLit, exitPathLiteral, exitPipelinePart, exitPreFlowAndControl, exitPreFlowStatement, exitPrimary, exitPrimaryReference, exitProgramBlock, exitRange, exitRecordBlock, exitReferencesBlock, exitRegExLit, exitRegisterStatement, exitRegularExpressionLiteral, exitRequireStatement, exitReservedWord, exitResolutionLit, exitSecurityConstraint, exitServiceBlock, exitSheBang, exitStatement, exitStreamCat, exitStreamExpression, exitStreamExpressionTermination, exitStreamFor, exitStreamPart, exitStreamSource, exitStreamStatement, exitStreamStatementTermination, exitStringLit, exitStringLiteral, exitStringPart, exitTextBlock, exitThrowStatement, exitTimeLit, exitTimeLiteral, exitTraitBlock, exitTraitPreamble, exitTraitReference, exitTraitsList, exitTypeBlock, exitTypeDef, exitVariableDeclaration, exitVariableOnlyDeclaration, exitVersionNumberLit, exitVersionNumberLiteral, exitWebVariableCorrelation, visitErrorNode, visitTerminal
-
Constructor Details
-
RetractedComparatorUseOrError
RetractedComparatorUseOrError(ParsedModule parsedModule)
-
-
Method Details
-
exitExpression
Description copied from class:EK9BaseListenerExit a parse tree produced byEK9Parser.expression().The default implementation does nothing.
- Specified by:
exitExpressionin interfaceEK9Listener- Overrides:
exitExpressionin classEK9BaseListener- Parameters:
ctx- the parse tree
-