Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(652)

Unified Diff: pkg/analyzer/test/generated/static_type_warning_code_test.dart

Issue 1967583002: Check bounds of type parameters of function type aliases. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/test/generated/static_type_warning_code_test.dart
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index 9b3f0821524dcb4371b6956a3474018c00582194..381313efeae0ac578ff54f5f9c605a1c43067b10 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -1381,6 +1381,17 @@ f() { return new G<A>(); }
[StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
}
+ void test_typeArgumentNotMatchingBounds_ofFunctionTypeAlias() {
+ assertErrorsInCode(
+ r'''
+class A {}
+class B {}
+typedef F<T extends A>();
+F<B> fff;
+''',
+ [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+ }
+
void test_typeArgumentNotMatchingBounds_parameter() {
assertErrorsInCode(
r'''

Powered by Google App Engine
This is Rietveld 408576698