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

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

Issue 15029010: Remove CTEC.MIXIN_OF_NON_MIXIN and MIXIN_WITH_NON_CLASS_SUPERCLASS. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Report MIXIN_WITH_NON_CLASS_SUPERCLASS Created 7 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 | « editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/TypeResolverVisitor.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
index 24090c330ac0f38bbc478e6e6602f5117fcfd90e..0b6fb80084ccc43002b120e45c67c661a23c0228 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
@@ -197,26 +197,6 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
verify(source);
}
- public void fail_mixinOfNonMixin() throws Exception {
- // TODO(brianwilkerson) This might be covered by more specific errors.
- Source source = addSource(createSource(//
- // TODO
- ));
- resolve(source);
- assertErrors(CompileTimeErrorCode.MIXIN_OF_NON_MIXIN);
- verify(source);
- }
-
- public void fail_mixinWithNonClassSuperclass() throws Exception {
- // TODO(brianwilkerson) Compare with MIXIN_OF_NON_CLASS.
- Source source = addSource(createSource(//
- "int A;",
- "class B extends Object mixin A {}"));
- resolve(source);
- assertErrors(CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS);
- verify(source);
- }
-
public void fail_nonConstantDefaultValue_named() throws Exception {
Source source = addSource(createSource(//
"f({x : 2 + 3}) {}"));
@@ -1881,6 +1861,26 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
verify(source);
}
+ public void test_mixinWithNonClassSuperclass_class() throws Exception {
+ Source source = addSource(createSource(//
+ "int A;",
+ "class B {}",
+ "class C extends A with B {}"));
+ resolve(source);
+ assertErrors(CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS);
+ verify(source);
+ }
+
+ public void test_mixinWithNonClassSuperclass_typedef() throws Exception {
+ Source source = addSource(createSource(//
+ "int A;",
+ "class B {}",
+ "typedef C = A with B {}"));
+ resolve(source);
+ assertErrors(CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS);
+ verify(source);
+ }
+
public void test_multipleSuperInitializers() throws Exception {
Source source = addSource(createSource(//
"class A {}",
« no previous file with comments | « editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/TypeResolverVisitor.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698