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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java

Issue 114473004: Fix for 15028. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Nit/cleanup: delete commented out code. Created 7 years 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: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
index 18117a6ccbacda99a3d82c4430a0a5bbaba41d0b..df3da810a8e42881e0019b81f61fc07646b5ffd0 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
@@ -1786,6 +1786,52 @@ public class StaticWarningCodeTest extends ResolverTestCase {
verify(source);
}
+ public void test_nonAbstractClassInheritsAbstractMemberOne_abstractOverridesConcrete_accessor()
+ throws Exception {
+ Source source = addSource(createSource(//
+ "class A {",
+ " int get g => 0;",
+ "}",
+ "abstract class B extends A {",
+ " int get g;",
+ "}",
+ "class C extends B {}"));
+ resolve(source);
+ assertErrors(source, StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE);
+ verify(source);
+ }
+
+ public void test_nonAbstractClassInheritsAbstractMemberOne_abstractOverridesConcrete_method()
+ throws Exception {
+ Source source = addSource(createSource(//
+ "class A {",
+ " m(p) {}",
+ "}",
+ "abstract class B extends A {",
+ " m(p);",
+ "}",
+ "class C extends B {}"));
+ resolve(source);
+ assertErrors(source, StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE);
+ verify(source);
+ }
+
+ public void test_nonAbstractClassInheritsAbstractMemberOne_ensureCorrectFunctionSubtypeIsUsedInImplementation()
+ throws Exception {
+ // bug 15028
+ Source source = addSource(createSource(//
+ "class C {",
+ " foo(int x) => x;",
+ "}",
+ "abstract class D {",
+ " foo(x, [y]);",
+ "}",
+ "class E extends C implements D {}"));
+ resolve(source);
+ assertErrors(source, StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE);
+ verify(source);
+ }
+
public void test_nonAbstractClassInheritsAbstractMemberOne_getter_fromInterface()
throws Exception {
Source source = addSource(createSource(//

Powered by Google App Engine
This is Rietveld 408576698