Search in sources :

Example 16 with BoundThisTypeRef

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

the class InternalTypeSystem method lowerBoundImpl.

protected Result<TypeRef> lowerBoundImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final BoundThisTypeRef boundThisTypeRef) throws RuleFailedException {
    try {
        final RuleApplicationTrace _subtrace_ = newTrace(_trace_);
        final Result<TypeRef> _result_ = applyRuleLowerBoundThisTypeRef(G, _subtrace_, boundThisTypeRef);
        addToTrace(_trace_, new Provider<Object>() {

            public Object get() {
                return ruleName("lowerBoundThisTypeRef") + stringRepForEnv(G) + " |~ " + stringRep(boundThisTypeRef) + " \\/ " + stringRep(_result_.getFirst());
            }
        });
        addAsSubtrace(_trace_, _subtrace_);
        return _result_;
    } catch (Exception e_applyRuleLowerBoundThisTypeRef) {
        lowerBoundThrowException(ruleName("lowerBoundThisTypeRef") + stringRepForEnv(G) + " |~ " + stringRep(boundThisTypeRef) + " \\/ " + "TypeRef", LOWERBOUNDTHISTYPEREF, e_applyRuleLowerBoundThisTypeRef, boundThisTypeRef, new ErrorInformation[] { new ErrorInformation(boundThisTypeRef) });
        return null;
    }
}
Also used : ErrorInformation(org.eclipse.xsemantics.runtime.ErrorInformation) 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) RuleApplicationTrace(org.eclipse.xsemantics.runtime.RuleApplicationTrace) EObject(org.eclipse.emf.ecore.EObject) RuleFailedException(org.eclipse.xsemantics.runtime.RuleFailedException)

Aggregations

BoundThisTypeRef (org.eclipse.n4js.ts.typeRefs.BoundThisTypeRef)16 ParameterizedTypeRef (org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef)15 TypeTypeRef (org.eclipse.n4js.ts.typeRefs.TypeTypeRef)14 ComposedTypeRef (org.eclipse.n4js.ts.typeRefs.ComposedTypeRef)13 ExistentialTypeRef (org.eclipse.n4js.ts.typeRefs.ExistentialTypeRef)13 StructuralTypeRef (org.eclipse.n4js.ts.typeRefs.StructuralTypeRef)13 TypeRef (org.eclipse.n4js.ts.typeRefs.TypeRef)13 BaseTypeRef (org.eclipse.n4js.ts.typeRefs.BaseTypeRef)12 FunctionTypeRef (org.eclipse.n4js.ts.typeRefs.FunctionTypeRef)12 StaticBaseTypeRef (org.eclipse.n4js.ts.typeRefs.StaticBaseTypeRef)12 ThisTypeRef (org.eclipse.n4js.ts.typeRefs.ThisTypeRef)12 UnknownTypeRef (org.eclipse.n4js.ts.typeRefs.UnknownTypeRef)12 StructuralTypingResult (org.eclipse.n4js.typesystem.StructuralTypingResult)9 Result (org.eclipse.xsemantics.runtime.Result)9 RuleFailedException (org.eclipse.xsemantics.runtime.RuleFailedException)9 TypeArgument (org.eclipse.n4js.ts.typeRefs.TypeArgument)5 EObject (org.eclipse.emf.ecore.EObject)4 AdditiveExpression (org.eclipse.n4js.n4JS.AdditiveExpression)3 AssignmentExpression (org.eclipse.n4js.n4JS.AssignmentExpression)3 AwaitExpression (org.eclipse.n4js.n4JS.AwaitExpression)3