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

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

Issue 10987076: Issue 5447. Wern when concrete class has unimplemented members (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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/TypeAnalyzerTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
index 7daf5276ccf2e169e6abec27e5efed0774b80ccf..4774c79e76601f173588c6189c3e176b7c60140e 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
@@ -379,21 +379,21 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
analyzeIn(element, "fieldInInterface.noSuchField", 1);
analyzeIn(element, "staticFieldInInterface.noSuchField", 1);
- analyzeIn(element, "new ClassWithSupertypes()", 1); // Abstract class.
- analyzeIn(element, "field = new ClassWithSupertypes().field", 1);
- analyzeIn(element, "field = new ClassWithSupertypes().staticField", 2);
- analyzeIn(element, "field = new ClassWithSupertypes().fieldInSuperclass", 1);
- analyzeIn(element, "field = new ClassWithSupertypes().staticFieldInSuperclass", 2);
- analyzeIn(element, "field = new ClassWithSupertypes().fieldInInterface", 1);
- analyzeIn(element, "field = new ClassWithSupertypes().staticFieldInInterface", 2);
-
- analyzeIn(element, "new ClassWithSupertypes().field = 1", 1);
- analyzeIn(element, "new ClassWithSupertypes().staticField = 1", 2);
- analyzeIn(element, "new ClassWithSupertypes().fieldInSuperclass = 1", 1);
- analyzeIn(element, "new ClassWithSupertypes().staticFieldInSuperclass = 1", 2);
+ analyzeIn(element, "new ClassWithSupertypes()", 0); // concrete class with abstract members
+ analyzeIn(element, "field = new ClassWithSupertypes().field", 0);
+ analyzeIn(element, "field = new ClassWithSupertypes().staticField", 1);
+ analyzeIn(element, "field = new ClassWithSupertypes().fieldInSuperclass", 0);
+ analyzeIn(element, "field = new ClassWithSupertypes().staticFieldInSuperclass", 1);
+ analyzeIn(element, "field = new ClassWithSupertypes().fieldInInterface", 0);
+ analyzeIn(element, "field = new ClassWithSupertypes().staticFieldInInterface", 1);
+
+ analyzeIn(element, "new ClassWithSupertypes().field = 1", 0);
+ analyzeIn(element, "new ClassWithSupertypes().staticField = 1", 1);
+ analyzeIn(element, "new ClassWithSupertypes().fieldInSuperclass = 1", 0);
+ analyzeIn(element, "new ClassWithSupertypes().staticFieldInSuperclass = 1", 1);
// Enable this test when constness is propagated:
// analyzeIn(element, "new ClassWithSupertypes().fieldInInterface = 1", 1);
- analyzeIn(element, "new ClassWithSupertypes().staticFieldInInterface = 1", 2);
+ analyzeIn(element, "new ClassWithSupertypes().staticFieldInInterface = 1", 1);
}
public void testFieldInitializers() {
@@ -597,12 +597,12 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
" void bar();",
"}",
// Abstract class not reported until first instantiation.
- "class Class implements Interface {",
+ "abstract class Class implements Interface {",
" Class() {}",
" String bar() { return null; }",
"}",
// Abstract class not reported until first instantiation.
- "class SubClass extends Class {",
+ "abstract class SubClass extends Class {",
" SubClass() : super() {}",
" Object bar() { return null; }",
"}",
« no previous file with comments | « compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698