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

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

Issue 1149953005: Issue 23518. Match prefixes of prefixed types. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/generated/incremental_resolver.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/generated/incremental_resolver_test.dart
diff --git a/pkg/analyzer/test/generated/incremental_resolver_test.dart b/pkg/analyzer/test/generated/incremental_resolver_test.dart
index 0e8d1303c4894f19ebfb8b0c1a4cfbce032b3e9d..3af917b5dc8a58c520e9d20fe0dfa24f6f670034 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -1264,6 +1264,34 @@ class A {
''');
}
+ void test_false_method_parameters_type_edit_insertImportPrefix() {
+ _assertDoesNotMatchOK(r'''
+import 'dart:async' as a;
+
+class C {
+ void foo(Future f) {}
+}
+
+class Future {}
+
+bar(C c, a.Future f) {
+ c.foo(f);
+}
+''', r'''
+import 'dart:async' as a;
+
+class C {
+ void foo(a.Future f) {}
+}
+
+class Future {}
+
+bar(C c, a.Future f) {
+ c.foo(f);
+}
+''');
+ }
+
void test_false_method_returnType_edit() {
_assertDoesNotMatchOK(r'''
class A {
@@ -2202,6 +2230,22 @@ class A {
''');
}
+ void test_true_method_parameters_type_sameImportPrefix() {
+ _assertMatches(r'''
+import 'dart:async' as a;
+
+bar(a.Future f) {
+ print(f);
+}
+''', r'''
+import 'dart:async' as a;
+
+bar(a.Future ff) {
+ print(ff);
+}
+''');
+ }
+
void test_true_part_list_reorder() {
addNamedSource('/unitA.dart', 'part of lib; class A {}');
addNamedSource('/unitB.dart', 'part of lib; class B {}');
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698