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

Unified Diff: pkg/analysis_server/test/edit/sort_members_test.dart

Issue 2655803004: Add failing test for sort issue (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/edit/sort_members_test.dart
diff --git a/pkg/analysis_server/test/edit/sort_members_test.dart b/pkg/analysis_server/test/edit/sort_members_test.dart
index b246d82eca04317d50c529ac5f4777e1298e1637..b5d67f67558ce5b4b0534b4b951c4e7fc084741c 100644
--- a/pkg/analysis_server/test/edit/sort_members_test.dart
+++ b/pkg/analysis_server/test/edit/sort_members_test.dart
@@ -178,6 +178,60 @@ class MyAnnotation {
''');
}
+ @failingTest
+ test_OK_genericFunctionTypeInComments() async {
+ addFile(
+ projectPath + '/analysis_options.yaml',
+ '''
+analyzer:
+ strong-mode: true
+''');
+ addTestFile('''
+class C {
+ void caller() {
+ Super s = new Super();
+ takesSub(s); // <- No warning
+ }
+
+ void takesSub(Sub s) {}
+}
+
+class Sub extends Super {}
+
+class Super {}
+
+typedef dynamic Func(String x, String y);
+
+Function/*=F*/ allowInterop/*<F extends Function>*/(Function/*=F*/ f) => null;
+
+Func bar(Func f) {
+ return allowInterop(f);
+}
+''');
+ return _assertSorted('''
+Function/*=F*/ allowInterop/*<F extends Function>*/(Function/*=F*/ f) => null;
+
+Func bar(Func f) {
+ return allowInterop(f);
+}
+
+typedef dynamic Func(String x, String y);
+
+class C {
+ void caller() {
+ Super s = new Super();
+ takesSub(s); // <- No warning
+ }
+
+ void takesSub(Sub s) {}
+}
+
+class Sub extends Super {}
+
+class Super {}
+''');
+ }
+
test_OK_unitMembers_class() async {
addTestFile('''
class C {}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698