Package org.ek9lang.compiler.phase2
Class SynthesizeSuperFunction
java.lang.Object
org.ek9lang.compiler.phase2.SynthesizeSuperFunction
- All Implemented Interfaces:
Consumer<FunctionSymbol>
Looks at the function and if it has no super function, attempts to work out what would be the
best super function generic type it could implement. Also ensures that purity is retained.
So for some abstract generic functions like UnaryOperator of T for example the function must be pure.
i.e. is it really a Supplier of T and Consumer of T, etc.
The reason for this, is that it enables just functions to be defined but then accept them via their generic function signature. Less coding for the EK9 developer.
The reason for this, is that it enables just functions to be defined but then accept them via their generic function signature. Less coding for the EK9 developer.
-
Constructor Summary
ConstructorDescriptionSynthesizeSuperFunction
(SymbolsAndScopes symbolsAndScopes, SymbolFactory symbolFactory, ErrorListener errorListener) -
Method Summary
-
Constructor Details
-
SynthesizeSuperFunction
SynthesizeSuperFunction(SymbolsAndScopes symbolsAndScopes, SymbolFactory symbolFactory, ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceConsumer<FunctionSymbol>
-