Index: pkg/analyzer/test/src/task/strong_mode_test.dart |
diff --git a/pkg/analyzer/test/src/task/strong_mode_test.dart b/pkg/analyzer/test/src/task/strong_mode_test.dart |
index b143a8355db7ecda72397a721780510e98e55874..b8be53957449b9f85e9914877c87e86dd70bdfe1 100644 |
--- a/pkg/analyzer/test/src/task/strong_mode_test.dart |
+++ b/pkg/analyzer/test/src/task/strong_mode_test.dart |
@@ -707,13 +707,17 @@ class C<E> implements A<E> { |
} |
'''); |
ClassElement classC = unit.getType('C'); |
+ DartType typeCE = classC.typeParameters[0].type; |
MethodElement methodC = classC.getMethod(methodName); |
ParameterElement parameterC = methodC.parameters[0]; |
expect(parameterC.type.isDynamic, isTrue); |
+ expect(methodC.type.typeArguments, [typeCE]); |
inferrer.inferCompilationUnit(unit); |
expect(parameterC.type, classC.typeParameters[0].type); |
+ expect(methodC.type.typeArguments, [typeCE], |
Jennifer Messerly
2015/09/24 22:35:56
this check was failing without the fix.
|
+ reason: 'function type should still have type arguments'); |
} |
void test_inferCompilationUnit_method_return_multiple_different() { |
@@ -917,12 +921,16 @@ class B<E> extends A<E> { |
} |
'''); |
ClassElement classB = unit.getType('B'); |
+ DartType typeBE = classB.typeParameters[0].type; |
MethodElement methodB = classB.getMethod(methodName); |
expect(methodB.returnType.isDynamic, isTrue); |
+ expect(methodB.type.typeArguments, [typeBE]); |
inferrer.inferCompilationUnit(unit); |
expect(methodB.returnType, classB.typeParameters[0].type); |
+ expect(methodB.type.typeArguments, [typeBE], |
+ reason: 'function type should still have type arguments'); |
} |
} |