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

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

Issue 1686893002: Consolidate the code that replaces a TypeParameter with its bound. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add unit tests. Created 4 years, 10 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/resolver_test.dart
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 01b0b738002967785f5b0408c21ce6723c3972d8..2d2d05c0fcc607ccd932f0977dd5090a5f946e9a 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -14002,6 +14002,18 @@ main() {
expect(declaration.initializer.propagatedType, isNull);
}
+ void test_genericMethod_nestedBound() {
+ String code = r'''
+class Foo<T extends num> {
+ void method/*<U extends T>*/(dynamic/*=U*/ u) {
+ u.abs();
+ }
+}
+''';
+ // Just validate that there is no warning on the call to `.abs()`.
+ _resolveTestUnit(code);
+ }
+
void test_genericMethod_then_propagatedType() {
// Regression test for https://github.com/dart-lang/sdk/issues/25482.
String code = r'''
« no previous file with comments | « pkg/analyzer/lib/src/generated/type_system.dart ('k') | pkg/analyzer/test/src/dart/element/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698