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

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

Issue 2646983003: Issue 28100. Fix for indirect not instantiated types, tests. (Closed)
Patch Set: Created 3 years, 11 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/strong_mode_test.dart
diff --git a/pkg/analyzer/test/generated/strong_mode_test.dart b/pkg/analyzer/test/generated/strong_mode_test.dart
index b6589a60e62b6c59874869c76266945a9be2c9f6..99a2f4b18f5a5c30ed1b54189972bd32c478120d 100644
--- a/pkg/analyzer/test/generated/strong_mode_test.dart
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart
@@ -1959,6 +1959,38 @@ void test() {
expectIdentifierType('cc', "C<int, B<int>, B<dynamic>>");
}
+ test_notInstantiatedBound_direct() async {
+ String code = r'''
+class A<T> {}
+class C<T extends A> {}
+''';
+ await resolveTestUnit(code, noErrors: false);
+ assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
+ }
+
+ test_notInstantiatedBound_indirect() async {
+ String code = r'''
+class A<T> {}
+class B<T> {}
+class C<T extends A<B>> {}
+''';
+ await resolveTestUnit(code, noErrors: false);
+ assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
+ }
+
+ test_notInstantiatedBound_indirect2() async {
+ String code = r'''
+class A<K, V> {}
+class B<T> {}
+class C<T extends A<B, B>> {}
+''';
+ await resolveTestUnit(code, noErrors: false);
+ assertErrors(testSource, [
+ StrongModeCode.NOT_INSTANTIATED_BOUND,
+ StrongModeCode.NOT_INSTANTIATED_BOUND
+ ]);
+ }
+
test_objectMethodOnFunctions_Anonymous() async {
String code = r'''
void main() {

Powered by Google App Engine
This is Rietveld 408576698