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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_test.dart

Issue 2002483002: Make ExecutableElementImpl implement TypeParameterizedElementMixin. (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
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/resynthesize_test.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
index ca5bf7976fb60af5237a74bb800cece7e67aa9d7..4990c5b906fd9bd2c2ff9e84c8b9191e44838ec6 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -2532,29 +2532,6 @@ class C {
''');
}
- test_constructor_default_refers_to_generic_class() {
- checkLibrary('''
-class B<T> {
- const B();
-}
-class C<T> {
- const C([B<T> b = const B()]);
-}
-''');
- }
-
- test_constructor_default_refers_to_generic_class2() {
- checkLibrary('''
-abstract class A<T> {}
-class B<T> implements A<T> {
- const B();
-}
-class C<T> implements A<Iterable<T>> {
- const C([A<T> a = const B()]);
-}
-''');
- }
-
test_constructor_documented() {
checkLibrary('''
class C {
@@ -2910,6 +2887,71 @@ class D {
''');
}
+ test_defaultValue_refersToGenericClass_constructor() {
+ checkLibrary('''
+class B<T> {
+ const B();
+}
+class C<T> {
+ const C([B<T> b = const B()]);
+}
+''');
+ }
+
+ test_defaultValue_refersToGenericClass_constructor2() {
+ checkLibrary('''
+abstract class A<T> {}
+class B<T> implements A<T> {
+ const B();
+}
+class C<T> implements A<Iterable<T>> {
+ const C([A<T> a = const B()]);
+}
+''');
+ }
+
+ test_defaultValue_refersToGenericClass_functionG() {
+ checkLibrary('''
+class B<T> {
+ const B();
+}
+void foo<T>([B<T> b = const B()]) {}
+''');
+ }
+
+ test_defaultValue_refersToGenericClass_methodG() {
+ checkLibrary('''
+class B<T> {
+ const B();
+}
+class C {
+ void foo<T>([B<T> b = const B()]) {}
+}
+''');
+ }
+
+ test_defaultValue_refersToGenericClass_methodG_classG() {
+ checkLibrary('''
+class B<T1, T2> {
+ const B();
+}
+class C<E1> {
+ void foo<E2>([B<E1, E2> b = const B()]) {}
+}
+''');
+ }
+
+ test_defaultValue_refersToGenericClass_methodNG() {
+ checkLibrary('''
+class B<T> {
+ const B();
+}
+class C<T> {
+ void foo([B<T> b = const B()]) {}
+}
+''');
+ }
+
test_enum_documented() {
checkLibrary('''
// Extra comment so doc comment offset != 0
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698