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

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

Issue 698973005: Always check if instance method name collides with superclass static. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/error_verifier.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/static_warning_code_test.dart
diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
index 2c779c564928dbf413af12e2660b753ecc959f7e..ef9de06524c34681807e529104fa82478602743d 100644
--- a/pkg/analyzer/test/generated/static_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
@@ -1373,6 +1373,24 @@ class C extends B {
verify([source]);
}
+ void test_instanceMethodNameCollidesWithSuperclassStatic_interface() {
+ Source source = addSource(r'''
+class Base {
+ static foo() {}
+}
+abstract class Ifc {
+ foo();
+}
+class C extends Base implements Ifc {
+ foo() {}
+}
+''');
+ resolve(source);
+ assertErrors(source, [
+ StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC]);
+ verify([source]);
+ }
+
void test_instanceMethodNameCollidesWithSuperclassStatic_method() {
Source source = addSource(r'''
class A {
« no previous file with comments | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698