Search in sources :

Example 1 with InferredGenericType

use of org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.InferredGenericType in project legend-pure by finos.

the class Shared method cleanUpFunctionType.

private static void cleanUpFunctionType(FunctionType functionType, UnbindState state, ProcessorSupport processorSupport) {
    GenericType returnType = functionType._returnType();
    if (returnType != null) {
        returnType._referenceUsagesRemove();
        cleanUpGenericType(returnType, state, processorSupport);
    }
    for (VariableExpression variableExpression : functionType._parameters()) {
        GenericType varGenericType = variableExpression._genericType();
        if (varGenericType != null) {
            cleanUpGenericType(varGenericType, state, processorSupport);
            if (varGenericType instanceof InferredGenericType) {
                variableExpression._genericTypeRemove();
                variableExpression._multiplicityRemove();
            }
        }
    }
}
Also used : GenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType) InferredGenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.InferredGenericType) VariableExpression(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.valuespecification.VariableExpression) InferredGenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.InferredGenericType)

Aggregations

GenericType (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType)1 InferredGenericType (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.InferredGenericType)1 VariableExpression (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.valuespecification.VariableExpression)1