Package org.ek9lang.compiler.phase3
Class CheckConflictingMethods
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.CheckConflictingMethods
- All Implemented Interfaces:
Predicate<AggregateSymbol>
Checks that methods from a super and one or more traits do not conflict.
This is due to the fact that both a super and also one or more traits can actually have
implementations of the same method signature.
The solution is to raise an error and get the ek9 developer to create a new method in the
aggregate that is using the super/traits and then pick the implementation they want or define a
totally new one.
Returns true if there are no conflicting methods.
TODO not quite sure this is working correctly. See JustTraits.ek9 - ExamplesConstructsTraitsTest.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorDescriptionCheckConflictingMethods
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Methods inherited from class org.ek9lang.compiler.common.TypedSymbolAccess
getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
CheckConflictingMethods
CheckConflictingMethods(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
test
- Specified by:
test
in interfacePredicate<AggregateSymbol>
-