Package org.ek9lang.compiler.phase2
Class CheckAndPopulateConstrainedType
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.phase2.CheckAndPopulateConstrainedType
- All Implemented Interfaces:
BiConsumer<AggregateSymbol,
ISymbol>
class CheckAndPopulateConstrainedType
extends RuleSupport
implements BiConsumer<AggregateSymbol,ISymbol>
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.
Note that it must also ensure that any constructors on the Constraining type if pure are also marked pure.
Once one constructor is pure all constructors must be pure.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final AggregateFactory
(package private) final AggregateHasPureConstruction
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorsConstructorDescriptionCheckAndPopulateConstrainedType
(SymbolsAndScopes symbolsAndScopes, AggregateFactory aggregateFactory, ErrorListener errorListener) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiConsumer
andThen
-
Field Details
-
aggregateFactory
-
methodNamesToAlsoRetrainOldSignature
-
methodNamesWithAlterableArgumentTypes
-
methodNamesWithAlterableReturnTypes
-
methodNamesWithNonAlterableReturnTypes
-
aggregateHasPureConstruction
-
-
Constructor Details
-
CheckAndPopulateConstrainedType
CheckAndPopulateConstrainedType(SymbolsAndScopes symbolsAndScopes, AggregateFactory aggregateFactory, ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceBiConsumer<AggregateSymbol,
ISymbol>
-