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

Unified Diff: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java

Issue 10693074: Another small batch of Junit test for errors in the resolver (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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/type/TypeAnalyzerCompilerTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
index 2a4a4a34f036328ac75ea1ba1e3d659ca561957d..2dfeb605b5c2f9dd33112695f78a23e80271ef9e 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -3133,6 +3133,22 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
errEx(TypeErrorCode.CANNOT_OVERRIDE_TYPED_MEMBER, 6, 10, 3));
}
+ public void test_overrideInstanceMember() throws Exception {
+ AnalyzeLibraryResult libraryResult = analyzeLibrary(
+ "class A {",
+ " var field;",
+ " method() {}",
+ "}",
+ "class B extends A {",
+ " static var field;",
+ " static method() {}",
+ "}");
+ assertErrors(
+ libraryResult.getErrors(),
+ errEx(ResolverErrorCode.CANNOT_OVERRIDE_INSTANCE_MEMBER, 6, 14, 5),
+ errEx(ResolverErrorCode.CANNOT_OVERRIDE_INSTANCE_MEMBER, 7, 10, 6));
+ }
+
public void test_overrideStaticMember() throws Exception {
AnalyzeLibraryResult libraryResult = analyzeLibrary(
"// filler filler filler filler filler filler filler filler filler filler",

Powered by Google App Engine
This is Rietveld 408576698