Search in sources :

Example 1 with TypeArgument

use of org.eclipse.n4js.ts.typeRefs.TypeArgument in project n4js by eclipse.

the class PolyfillValidatorFragment method holdsEqualTypeVariables.

/**
 * Constraint (Polyfill Class) 156.7
 */
private boolean holdsEqualTypeVariables(PolyfillValidationState state) {
    // simple string compare instead of type compare, we need identity anyway
    final String typeVars1 = Joiner.on(',').join(state.polyType.getTypeVars().stream().map(v -> v.getTypeAsString()).toArray());
    final String typeVars2 = Joiner.on(',').join(state.filledType.getTypeVars().stream().map(v -> v.getTypeAsString()).toArray());
    if (!typeVars1.equals(typeVars2)) {
        final String msg = getMessageForCLF_POLYFILL_DIFFERENT_TYPEPARS(state.name);
        addIssue(state, msg, CLF_POLYFILL_DIFFERENT_TYPEPARS);
        return false;
    }
    EList<TypeArgument> args = state.n4Class.getSuperClassRef().getTypeArgs();
    if (args.size() != state.polyType.getTypeVars().size()) {
        // consequential error
        return true;
    }
    for (int i = state.polyType.getTypeVars().size() - 1; i >= 0; i--) {
        TypeArgument arg = args.get(i);
        TypeVariable par = state.polyType.getTypeVars().get(i);
        String argString = arg.getTypeRefAsString();
        String parString = par.getName();
        if (!argString.equals(parString)) {
            final String msg = getMessageForCLF_POLYFILL_TYPEPARS_DIFFER_TYPEARGS(state.name, parString, argString);
            addIssue(state, msg, CLF_POLYFILL_TYPEPARS_DIFFER_TYPEARGS);
            return false;
        }
    }
    return true;
}
Also used : TypeVariable(org.eclipse.n4js.ts.types.TypeVariable) TypeArgument(org.eclipse.n4js.ts.typeRefs.TypeArgument)

Example 2 with TypeArgument

use of org.eclipse.n4js.ts.typeRefs.TypeArgument in project n4js by eclipse.

the class InternalTypeSystem method applyRuleSubtypeTypeTypeRef.

protected Result<Boolean> applyRuleSubtypeTypeTypeRef(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TypeTypeRef left, final TypeTypeRef right) throws RuleFailedException {
    final TypeArgument leftTypeArg = left.getTypeArg();
    final TypeArgument rightTypeArg = right.getTypeArg();
    final boolean leftIsCtorRef = left.isConstructorRef();
    final boolean rightIsCtorRef = right.isConstructorRef();
    final boolean rightHasTypeRef = (rightTypeArg instanceof TypeRef);
    if (((!leftIsCtorRef) && rightIsCtorRef)) {
        /* fail */
        throwForExplicitFail();
    } else {
        if ((rightHasTypeRef && (!rightIsCtorRef))) {
            /* G |- leftTypeArg <: rightTypeArg */
            subtypeInternal(G, _trace_, leftTypeArg, rightTypeArg);
        } else {
            if ((rightHasTypeRef && rightIsCtorRef)) {
                final Type left_staticType = this.typeSystemHelper.getStaticType(G, left);
                final Type right_staticType = this.typeSystemHelper.getStaticType(G, right);
                final boolean leftHasCovariantConstructor = ((left_staticType instanceof TClassifier) && N4JSLanguageUtils.hasCovariantConstructor(((TClassifier) left_staticType)));
                /* !(leftTypeArg instanceof Wildcard || leftTypeArg instanceof ExistentialTypeRef || leftTypeArg instanceof ThisTypeRef) || leftHasCovariantConstructor */
                if (!((!(((leftTypeArg instanceof Wildcard) || (leftTypeArg instanceof ExistentialTypeRef)) || (leftTypeArg instanceof ThisTypeRef))) || leftHasCovariantConstructor)) {
                    sneakyThrowRuleFailedException("!(leftTypeArg instanceof Wildcard || leftTypeArg instanceof ExistentialTypeRef || leftTypeArg instanceof ThisTypeRef) || leftHasCovariantConstructor");
                }
                /* G |- leftTypeArg <: rightTypeArg */
                subtypeInternal(G, _trace_, leftTypeArg, rightTypeArg);
                if (((left_staticType instanceof TypeVariable) || (right_staticType instanceof TypeVariable))) {
                    /* left_staticType === right_staticType */
                    if (!(left_staticType == right_staticType)) {
                        sneakyThrowRuleFailedException("left_staticType === right_staticType");
                    }
                } else {
                    final TMethod leftCtor = this.containerTypesHelper.fromContext(RuleEnvironmentExtensions.getContextResource(G)).findConstructor(((ContainerType<?>) left_staticType));
                    final TMethod rightCtor = this.containerTypesHelper.fromContext(RuleEnvironmentExtensions.getContextResource(G)).findConstructor(((ContainerType<?>) right_staticType));
                    /* leftCtor!==null && rightCtor!==null */
                    if (!((leftCtor != null) && (rightCtor != null))) {
                        sneakyThrowRuleFailedException("leftCtor!==null && rightCtor!==null");
                    }
                    /* G |- leftCtor : var TypeRef leftCtorRef */
                    TypeRef leftCtorRef = null;
                    Result<TypeRef> result = typeInternal(G, _trace_, leftCtor);
                    checkAssignableTo(result.getFirst(), TypeRef.class);
                    leftCtorRef = (TypeRef) result.getFirst();
                    /* G |- rightCtor : var TypeRef rightCtorRef */
                    TypeRef rightCtorRef = null;
                    Result<TypeRef> result_1 = typeInternal(G, _trace_, rightCtor);
                    checkAssignableTo(result_1.getFirst(), TypeRef.class);
                    rightCtorRef = (TypeRef) result_1.getFirst();
                    final RuleEnvironment G_left = RuleEnvironmentExtensions.wrap(G);
                    final RuleEnvironment G_right = RuleEnvironmentExtensions.wrap(G);
                    this.typeSystemHelper.addSubstitutions(G_left, TypeExtensions.ref(left_staticType));
                    RuleEnvironmentExtensions.addThisType(G_left, TypeExtensions.ref(left_staticType));
                    this.typeSystemHelper.addSubstitutions(G_right, TypeExtensions.ref(right_staticType));
                    RuleEnvironmentExtensions.addThisType(G_right, TypeExtensions.ref(right_staticType));
                    /* G_left |- leftCtorRef ~> var TypeRef leftCtorRefSubst */
                    TypeRef leftCtorRefSubst = null;
                    Result<TypeArgument> result_2 = substTypeVariablesInternal(G_left, _trace_, leftCtorRef);
                    checkAssignableTo(result_2.getFirst(), TypeRef.class);
                    leftCtorRefSubst = (TypeRef) result_2.getFirst();
                    /* G_right |- rightCtorRef ~> var TypeRef rightCtorRefSubst */
                    TypeRef rightCtorRefSubst = null;
                    Result<TypeArgument> result_3 = substTypeVariablesInternal(G_right, _trace_, rightCtorRef);
                    checkAssignableTo(result_3.getFirst(), TypeRef.class);
                    rightCtorRefSubst = (TypeRef) result_3.getFirst();
                    /* G |- leftCtorRefSubst <: rightCtorRefSubst */
                    subtypeInternal(G, _trace_, leftCtorRefSubst, rightCtorRefSubst);
                }
            } else {
                /* G |~ leftTypeArg /\ var TypeRef upperBoundLeft */
                TypeRef upperBoundLeft = null;
                Result<TypeRef> result_4 = upperBoundInternal(G, _trace_, leftTypeArg);
                checkAssignableTo(result_4.getFirst(), TypeRef.class);
                upperBoundLeft = (TypeRef) result_4.getFirst();
                /* G |~ leftTypeArg \/ var TypeRef lowerBoundLeft */
                TypeRef lowerBoundLeft = null;
                Result<TypeRef> result_5 = lowerBoundInternal(G, _trace_, leftTypeArg);
                checkAssignableTo(result_5.getFirst(), TypeRef.class);
                lowerBoundLeft = (TypeRef) result_5.getFirst();
                /* G |~ rightTypeArg /\ var TypeRef upperBoundRight */
                TypeRef upperBoundRight = null;
                Result<TypeRef> result_6 = upperBoundInternal(G, _trace_, rightTypeArg);
                checkAssignableTo(result_6.getFirst(), TypeRef.class);
                upperBoundRight = (TypeRef) result_6.getFirst();
                /* G |~ rightTypeArg \/ var TypeRef lowerBoundRight */
                TypeRef lowerBoundRight = null;
                Result<TypeRef> result_7 = lowerBoundInternal(G, _trace_, rightTypeArg);
                checkAssignableTo(result_7.getFirst(), TypeRef.class);
                lowerBoundRight = (TypeRef) result_7.getFirst();
                /* G |- upperBoundLeft <: upperBoundRight */
                subtypeInternal(G, _trace_, upperBoundLeft, upperBoundRight);
                /* G |- lowerBoundRight <: lowerBoundLeft */
                subtypeInternal(G, _trace_, lowerBoundRight, lowerBoundLeft);
            }
        }
    }
    return new Result<Boolean>(true);
}
Also used : TClassifier(org.eclipse.n4js.ts.types.TClassifier) ThisTypeRef(org.eclipse.n4js.ts.typeRefs.ThisTypeRef) BoundThisTypeRef(org.eclipse.n4js.ts.typeRefs.BoundThisTypeRef) TMethod(org.eclipse.n4js.ts.types.TMethod) ThisTypeRef(org.eclipse.n4js.ts.typeRefs.ThisTypeRef) ParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef) BaseTypeRef(org.eclipse.n4js.ts.typeRefs.BaseTypeRef) FunctionTypeRef(org.eclipse.n4js.ts.typeRefs.FunctionTypeRef) ExistentialTypeRef(org.eclipse.n4js.ts.typeRefs.ExistentialTypeRef) BoundThisTypeRef(org.eclipse.n4js.ts.typeRefs.BoundThisTypeRef) StructuralTypeRef(org.eclipse.n4js.ts.typeRefs.StructuralTypeRef) TypeRef(org.eclipse.n4js.ts.typeRefs.TypeRef) TypeTypeRef(org.eclipse.n4js.ts.typeRefs.TypeTypeRef) StaticBaseTypeRef(org.eclipse.n4js.ts.typeRefs.StaticBaseTypeRef) ComposedTypeRef(org.eclipse.n4js.ts.typeRefs.ComposedTypeRef) UnknownTypeRef(org.eclipse.n4js.ts.typeRefs.UnknownTypeRef) ContainerType(org.eclipse.n4js.ts.types.ContainerType) TypeArgument(org.eclipse.n4js.ts.typeRefs.TypeArgument) Result(org.eclipse.xsemantics.runtime.Result) StructuralTypingResult(org.eclipse.n4js.typesystem.StructuralTypingResult) ExistentialTypeRef(org.eclipse.n4js.ts.typeRefs.ExistentialTypeRef) Type(org.eclipse.n4js.ts.types.Type) PrimitiveType(org.eclipse.n4js.ts.types.PrimitiveType) VoidType(org.eclipse.n4js.ts.types.VoidType) AnyType(org.eclipse.n4js.ts.types.AnyType) ModuleNamespaceVirtualType(org.eclipse.n4js.ts.types.ModuleNamespaceVirtualType) NullType(org.eclipse.n4js.ts.types.NullType) UndefinedType(org.eclipse.n4js.ts.types.UndefinedType) ContainerType(org.eclipse.n4js.ts.types.ContainerType) TStructuralType(org.eclipse.n4js.ts.types.TStructuralType) Wildcard(org.eclipse.n4js.ts.typeRefs.Wildcard) TypeVariable(org.eclipse.n4js.ts.types.TypeVariable) RuleEnvironment(org.eclipse.xsemantics.runtime.RuleEnvironment)

Example 3 with TypeArgument

use of org.eclipse.n4js.ts.typeRefs.TypeArgument in project n4js by eclipse.

the class InternalTypeSystem method applyRuleSubstTypeVariablesWildcard.

protected Result<TypeArgument> applyRuleSubstTypeVariablesWildcard(final RuleEnvironment G, final RuleApplicationTrace _trace_, final Wildcard wildcard) throws RuleFailedException {
    // output parameter
    Wildcard T = null;
    TypeRef ub = wildcard.getDeclaredUpperBound();
    if ((ub != null)) {
        /* G |- ub ~> ub */
        Result<TypeArgument> result = substTypeVariablesInternal(G, _trace_, ub);
        checkAssignableTo(result.getFirst(), TypeRef.class);
        ub = (TypeRef) result.getFirst();
    }
    TypeRef lb = wildcard.getDeclaredLowerBound();
    if ((lb != null)) {
        /* G |- lb ~> lb */
        Result<TypeArgument> result_1 = substTypeVariablesInternal(G, _trace_, lb);
        checkAssignableTo(result_1.getFirst(), TypeRef.class);
        lb = (TypeRef) result_1.getFirst();
    }
    if (((ub != wildcard.getDeclaredUpperBound()) || (lb != wildcard.getDeclaredLowerBound()))) {
        T = TypeUtils.<Wildcard>copy(wildcard);
        T.setDeclaredUpperBound(TypeUtils.<TypeRef>copyIfContained(ub));
        T.setDeclaredLowerBound(TypeUtils.<TypeRef>copyIfContained(lb));
    } else {
        T = wildcard;
    }
    return new Result<TypeArgument>(T);
}
Also used : Wildcard(org.eclipse.n4js.ts.typeRefs.Wildcard) ThisTypeRef(org.eclipse.n4js.ts.typeRefs.ThisTypeRef) ParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef) BaseTypeRef(org.eclipse.n4js.ts.typeRefs.BaseTypeRef) FunctionTypeRef(org.eclipse.n4js.ts.typeRefs.FunctionTypeRef) ExistentialTypeRef(org.eclipse.n4js.ts.typeRefs.ExistentialTypeRef) BoundThisTypeRef(org.eclipse.n4js.ts.typeRefs.BoundThisTypeRef) StructuralTypeRef(org.eclipse.n4js.ts.typeRefs.StructuralTypeRef) TypeRef(org.eclipse.n4js.ts.typeRefs.TypeRef) TypeTypeRef(org.eclipse.n4js.ts.typeRefs.TypeTypeRef) StaticBaseTypeRef(org.eclipse.n4js.ts.typeRefs.StaticBaseTypeRef) ComposedTypeRef(org.eclipse.n4js.ts.typeRefs.ComposedTypeRef) UnknownTypeRef(org.eclipse.n4js.ts.typeRefs.UnknownTypeRef) TypeArgument(org.eclipse.n4js.ts.typeRefs.TypeArgument) Result(org.eclipse.xsemantics.runtime.Result) StructuralTypingResult(org.eclipse.n4js.typesystem.StructuralTypingResult)

Example 4 with TypeArgument

use of org.eclipse.n4js.ts.typeRefs.TypeArgument in project n4js by eclipse.

the class InternalTypeSystem method applyRuleSubstTypeVariablesInFunctionTypeRef.

protected Result<TypeArgument> applyRuleSubstTypeVariablesInFunctionTypeRef(final RuleEnvironment G, final RuleApplicationTrace _trace_, final FunctionTypeRef typeRef) throws RuleFailedException {
    // output parameter
    TypeRef result = null;
    TypeArgument _value = this.applyRuleSubstTypeVariablesInFunctionTypeExprOrRef(G, _trace_, typeRef).getValue();
    result = ((TypeRef) _value);
    return new Result<TypeArgument>(result);
}
Also used : ThisTypeRef(org.eclipse.n4js.ts.typeRefs.ThisTypeRef) ParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef) BaseTypeRef(org.eclipse.n4js.ts.typeRefs.BaseTypeRef) FunctionTypeRef(org.eclipse.n4js.ts.typeRefs.FunctionTypeRef) ExistentialTypeRef(org.eclipse.n4js.ts.typeRefs.ExistentialTypeRef) BoundThisTypeRef(org.eclipse.n4js.ts.typeRefs.BoundThisTypeRef) StructuralTypeRef(org.eclipse.n4js.ts.typeRefs.StructuralTypeRef) TypeRef(org.eclipse.n4js.ts.typeRefs.TypeRef) TypeTypeRef(org.eclipse.n4js.ts.typeRefs.TypeTypeRef) StaticBaseTypeRef(org.eclipse.n4js.ts.typeRefs.StaticBaseTypeRef) ComposedTypeRef(org.eclipse.n4js.ts.typeRefs.ComposedTypeRef) UnknownTypeRef(org.eclipse.n4js.ts.typeRefs.UnknownTypeRef) TypeArgument(org.eclipse.n4js.ts.typeRefs.TypeArgument) Result(org.eclipse.xsemantics.runtime.Result) StructuralTypingResult(org.eclipse.n4js.typesystem.StructuralTypingResult)

Example 5 with TypeArgument

use of org.eclipse.n4js.ts.typeRefs.TypeArgument in project n4js by eclipse.

the class InternalTypeSystem method applyRuleTypeAwaitExpression.

protected Result<TypeRef> applyRuleTypeAwaitExpression(final RuleEnvironment G, final RuleApplicationTrace _trace_, final AwaitExpression e) throws RuleFailedException {
    // output parameter
    TypeRef T = null;
    /* G |- e.expression : var TypeRef exprType */
    Expression _expression = e.getExpression();
    TypeRef exprType = null;
    Result<TypeRef> result = typeInternal(G, _trace_, _expression);
    checkAssignableTo(result.getFirst(), TypeRef.class);
    exprType = (TypeRef) result.getFirst();
    Type _declaredType = exprType.getDeclaredType();
    TClass _promiseType = RuleEnvironmentExtensions.promiseType(G);
    boolean _tripleEquals = (_declaredType == _promiseType);
    if (_tripleEquals) {
        /* G |~ exprType.typeArgs.get(0) /\ T */
        TypeArgument _get = exprType.getTypeArgs().get(0);
        Result<TypeRef> result_1 = upperBoundInternal(G, _trace_, _get);
        checkAssignableTo(result_1.getFirst(), TypeRef.class);
        T = (TypeRef) result_1.getFirst();
    } else {
        boolean _isPromisifiableExpression = this.promisifyHelper.isPromisifiableExpression(e.getExpression());
        if (_isPromisifiableExpression) {
            final TypeRef promisifiedReturnTypeRef = this.promisifyHelper.extractPromisifiedReturnType(e.getExpression());
            Type _declaredType_1 = promisifiedReturnTypeRef.getDeclaredType();
            TClass _promiseType_1 = RuleEnvironmentExtensions.promiseType(G);
            boolean _tripleEquals_1 = (_declaredType_1 == _promiseType_1);
            if (_tripleEquals_1) {
                /* G |~ promisifiedReturnTypeRef.typeArgs.get(0) /\ T */
                TypeArgument _get_1 = promisifiedReturnTypeRef.getTypeArgs().get(0);
                Result<TypeRef> result_2 = upperBoundInternal(G, _trace_, _get_1);
                checkAssignableTo(result_2.getFirst(), TypeRef.class);
                T = (TypeRef) result_2.getFirst();
            } else {
                T = promisifiedReturnTypeRef;
            }
        } else {
            T = exprType;
        }
    }
    return new Result<TypeRef>(T);
}
Also used : Type(org.eclipse.n4js.ts.types.Type) PrimitiveType(org.eclipse.n4js.ts.types.PrimitiveType) VoidType(org.eclipse.n4js.ts.types.VoidType) AnyType(org.eclipse.n4js.ts.types.AnyType) ModuleNamespaceVirtualType(org.eclipse.n4js.ts.types.ModuleNamespaceVirtualType) NullType(org.eclipse.n4js.ts.types.NullType) UndefinedType(org.eclipse.n4js.ts.types.UndefinedType) ContainerType(org.eclipse.n4js.ts.types.ContainerType) TStructuralType(org.eclipse.n4js.ts.types.TStructuralType) BinaryBitwiseExpression(org.eclipse.n4js.n4JS.BinaryBitwiseExpression) AssignmentExpression(org.eclipse.n4js.n4JS.AssignmentExpression) IndexedAccessExpression(org.eclipse.n4js.n4JS.IndexedAccessExpression) UnionTypeExpression(org.eclipse.n4js.ts.typeRefs.UnionTypeExpression) FunctionExpression(org.eclipse.n4js.n4JS.FunctionExpression) PromisifyExpression(org.eclipse.n4js.n4JS.PromisifyExpression) UnaryExpression(org.eclipse.n4js.n4JS.UnaryExpression) ParenExpression(org.eclipse.n4js.n4JS.ParenExpression) ParameterizedCallExpression(org.eclipse.n4js.n4JS.ParameterizedCallExpression) AdditiveExpression(org.eclipse.n4js.n4JS.AdditiveExpression) PostfixExpression(org.eclipse.n4js.n4JS.PostfixExpression) YieldExpression(org.eclipse.n4js.n4JS.YieldExpression) ConditionalExpression(org.eclipse.n4js.n4JS.ConditionalExpression) FunctionTypeExpression(org.eclipse.n4js.ts.typeRefs.FunctionTypeExpression) RelationalExpression(org.eclipse.n4js.n4JS.RelationalExpression) NewExpression(org.eclipse.n4js.n4JS.NewExpression) IntersectionTypeExpression(org.eclipse.n4js.ts.typeRefs.IntersectionTypeExpression) AwaitExpression(org.eclipse.n4js.n4JS.AwaitExpression) CommaExpression(org.eclipse.n4js.n4JS.CommaExpression) Expression(org.eclipse.n4js.n4JS.Expression) CastExpression(org.eclipse.n4js.n4JS.CastExpression) BinaryLogicalExpression(org.eclipse.n4js.n4JS.BinaryLogicalExpression) EqualityExpression(org.eclipse.n4js.n4JS.EqualityExpression) ShiftExpression(org.eclipse.n4js.n4JS.ShiftExpression) ParameterizedPropertyAccessExpression(org.eclipse.n4js.n4JS.ParameterizedPropertyAccessExpression) MultiplicativeExpression(org.eclipse.n4js.n4JS.MultiplicativeExpression) N4ClassExpression(org.eclipse.n4js.n4JS.N4ClassExpression) ThisTypeRef(org.eclipse.n4js.ts.typeRefs.ThisTypeRef) ParameterizedTypeRef(org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef) BaseTypeRef(org.eclipse.n4js.ts.typeRefs.BaseTypeRef) FunctionTypeRef(org.eclipse.n4js.ts.typeRefs.FunctionTypeRef) ExistentialTypeRef(org.eclipse.n4js.ts.typeRefs.ExistentialTypeRef) BoundThisTypeRef(org.eclipse.n4js.ts.typeRefs.BoundThisTypeRef) StructuralTypeRef(org.eclipse.n4js.ts.typeRefs.StructuralTypeRef) TypeRef(org.eclipse.n4js.ts.typeRefs.TypeRef) TypeTypeRef(org.eclipse.n4js.ts.typeRefs.TypeTypeRef) StaticBaseTypeRef(org.eclipse.n4js.ts.typeRefs.StaticBaseTypeRef) ComposedTypeRef(org.eclipse.n4js.ts.typeRefs.ComposedTypeRef) UnknownTypeRef(org.eclipse.n4js.ts.typeRefs.UnknownTypeRef) TypeArgument(org.eclipse.n4js.ts.typeRefs.TypeArgument) TClass(org.eclipse.n4js.ts.types.TClass) Result(org.eclipse.xsemantics.runtime.Result) StructuralTypingResult(org.eclipse.n4js.typesystem.StructuralTypingResult)

Aggregations

TypeArgument (org.eclipse.n4js.ts.typeRefs.TypeArgument)44 ParameterizedTypeRef (org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef)22 TypeTypeRef (org.eclipse.n4js.ts.typeRefs.TypeTypeRef)21 ComposedTypeRef (org.eclipse.n4js.ts.typeRefs.ComposedTypeRef)19 ExistentialTypeRef (org.eclipse.n4js.ts.typeRefs.ExistentialTypeRef)19 TypeRef (org.eclipse.n4js.ts.typeRefs.TypeRef)19 BoundThisTypeRef (org.eclipse.n4js.ts.typeRefs.BoundThisTypeRef)18 BaseTypeRef (org.eclipse.n4js.ts.typeRefs.BaseTypeRef)17 FunctionTypeRef (org.eclipse.n4js.ts.typeRefs.FunctionTypeRef)17 StructuralTypeRef (org.eclipse.n4js.ts.typeRefs.StructuralTypeRef)17 ThisTypeRef (org.eclipse.n4js.ts.typeRefs.ThisTypeRef)17 StructuralTypingResult (org.eclipse.n4js.typesystem.StructuralTypingResult)16 Result (org.eclipse.xsemantics.runtime.Result)16 StaticBaseTypeRef (org.eclipse.n4js.ts.typeRefs.StaticBaseTypeRef)15 UnknownTypeRef (org.eclipse.n4js.ts.typeRefs.UnknownTypeRef)15 RuleFailedException (org.eclipse.xsemantics.runtime.RuleFailedException)15 EObject (org.eclipse.emf.ecore.EObject)14 Type (org.eclipse.n4js.ts.types.Type)14 TStructuralType (org.eclipse.n4js.ts.types.TStructuralType)13 RuleEnvironment (org.eclipse.xsemantics.runtime.RuleEnvironment)12