Package org.ek9lang.compiler.phase3
Class CheckTypesCompatible
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.CheckTypesCompatible
- All Implemented Interfaces:
Consumer<TypeCompatibilityData>
final class CheckTypesCompatible
extends TypedSymbolAccess
implements Consumer<TypeCompatibilityData>
Check that the types of two symbol ar compatible with each other.
Or an error is emitted.
compatible means supers or traits are compatible or that the second var type can be
coerced to the first.
Note this also checks for abstract functions being on the right handside.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorsConstructorDescriptionCheckTypesCompatible
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Check symbols with types have compatible types. -
Method Summary
Methods inherited from class org.ek9lang.compiler.common.TypedSymbolAccess
getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
CheckTypesCompatible
CheckTypesCompatible(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Check symbols with types have compatible types.
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceConsumer<TypeCompatibilityData>
-