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

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java

Issue 11314019: Using 'interface' and 'abstract' for methods should produce error (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
index fced3490009f9b17446913e92e186380d6de45d9..28d4dc586a13d81399d94def9cbbb3a11d6c707d 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
@@ -246,20 +246,6 @@ public class NegativeResolverTest extends CompilerTestCase {
}
/**
- * Section 7.8: It is a compile-time error if the extends clause of a class C includes a type
- * expression that does not denote a class available in the lexical scope of C.
- */
- public void test_classExtendsInterface() {
- checkSourceErrors(
- makeCode(
- "// filler filler filler filler filler filler filler filler filler filler",
- "interface I {}",
- "class A extends I {",
- "}"),
- errEx(ResolverErrorCode.NOT_A_CLASS, 3, 17, 1));
- }
-
- /**
* Class can implement class, this causes implementation of an implicit interface.
*/
public void test_classImplementsClass() {
@@ -270,17 +256,6 @@ public class NegativeResolverTest extends CompilerTestCase {
"}"));
}
- /**
- * Interface can extend class, this causes implementation of an implicit interface.
- */
- public void test_interfaceExtendsClass() {
- checkSourceErrors(makeCode(
- "// filler filler filler filler filler filler filler filler filler filler",
- "class A {}",
- "interface B extends A {",
- "}"));
- }
-
public void tesClassImplementsUnknownInterfaceNegativeTest() {
checkNumErrors("ClassImplementsUnknownInterfaceNegativeTest.dart", 1);
}
@@ -648,7 +623,7 @@ public class NegativeResolverTest extends CompilerTestCase {
public void test_nameShadow_field_interfaceMethodParameter() {
checkSourceErrors(makeCode(
"// filler filler filler filler filler filler filler filler filler filler",
- "interface A {",
+ "abstract class A {",
" var a;",
" foo(a);",
"}"));
@@ -864,10 +839,6 @@ public class NegativeResolverTest extends CompilerTestCase {
errEx(ResolverErrorCode.CONST_CONSTRUCTOR_MUST_CALL_CONST_SUPER, 3, 9, 1));
}
- public void testRawTypesNegativeTest() {
- checkNumErrors("RawTypesNegativeTest.dart", 6);
- }
-
public void testConstConstructorNonFinalFieldsNegativeTest() {
checkSourceErrors(
makeCode(
@@ -881,7 +852,7 @@ public class NegativeResolverTest extends CompilerTestCase {
" final bar;",
" var baz;",
"}",
- "interface C {",
+ "abstract class C {",
" var x;",
"}"),
errEx(ResolverErrorCode.CONST_CLASS_WITH_NONFINAL_FIELDS, 3, 7, 1),
@@ -1048,17 +1019,6 @@ public class NegativeResolverTest extends CompilerTestCase {
errEx(ResolverErrorCode.THIS_IN_INITIALIZER_AS_EXPRESSION, 5, 25, 4));
}
- public void testInterfaceWithConcreteConstructorAndDefaultNonImlplementing() throws Exception {
- checkSourceErrors(
- makeCode(
- "// filler filler filler filler filler filler filler filler filler filler",
- "class A {}",
- "interface I default A {",
- " I();",
- "}"),
- errEx(ResolverErrorCode.DEFAULT_CONSTRUCTOR_UNRESOLVED, 4, 3, 4));
- }
-
public void test_resolvedTypeVariableBounds_inFunctionTypeAlias() throws Exception {
DartUnit unit =
parseUnit(

Powered by Google App Engine
This is Rietveld 408576698