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

Unified Diff: pkg/analysis_server/test/analysis/notification_overrides_test.dart

Issue 1610773003: Issue 25538. Fix for notification and private methods. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/analysis_server/test/analysis/notification_overrides_test.dart
diff --git a/pkg/analysis_server/test/analysis/notification_overrides_test.dart b/pkg/analysis_server/test/analysis/notification_overrides_test.dart
index ae7551ec70fb81f9e34d290b2f56938c7edb7c62..986e1997ce02a903bed7fa336f9728e14113d89e 100644
--- a/pkg/analysis_server/test/analysis/notification_overrides_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_overrides_test.dart
@@ -229,6 +229,24 @@ class B extends A {
assertNoOverride('fff(x) {} // B');
}
+ test_BAD_privateByPrivate_inDifferentLib() async {
+ addFile(
+ '$testFolder/lib.dart',
+ r'''
+class A {
+ void _m() {}
+}
+''');
+ addTestFile('''
+import 'lib.dart';
+class B extends A {
+ void _m() {} // in B
+}
+''');
+ await prepareOverrides();
+ assertNoOverride('_m() {} // in B');
+ }
+
test_BAD_setterByGetter() async {
addTestFile('''
class A {
@@ -514,6 +532,21 @@ class C extends B {
assertNoInterfaceMembers();
}
+ test_super_method_privateByPrivate() async {
+ addTestFile('''
+class A {
+ _m() {} // in A
+}
+class B extends A {
+ _m() {} // in B
+}
+''');
+ await prepareOverrides();
+ assertHasOverride('_m() {} // in B');
+ assertHasSuperElement('_m() {} // in A');
+ assertNoInterfaceMembers();
+ }
+
test_super_method_superTypeCycle() async {
addTestFile('''
class A extends B {
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_overrides.dart ('k') | pkg/analysis_server/test/analysis_abstract.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698