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

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

Issue 10543122: Revert "Fix for issue 2351 - checking assignability on top level getters and setters" (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
« no previous file with comments | « compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9629bc1460f18e62935f700ccaec26c05455bcc2..c4508266d4b83d2e2b3c91b82d53aff2f3c7de0b 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -1416,62 +1416,19 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
assertErrors(result.getErrors());
}
-
- public void test_setterGetterAssignable1() throws Exception {
- AnalyzeLibraryResult result =
- analyzeLibrary(
- "// filler filler filler filler filler filler filler filler filler filler",
- "class A {} ",
- "A topGetterField; ",
- "var topSetterField; ",
- "A get topField() { return topGetterField; }",
- "void set topField(arg) { topSetterField = arg; }",
- "class C {",
- " A getterField; ",
- " var setterField; ",
- " A get field() { return getterField; }",
- " void set field(arg) { setterField = arg; }",
- "}");
- assertErrors(result.getErrors());
- }
-
- public void test_setterGetterAssignable2() throws Exception {
- AnalyzeLibraryResult result =
- analyzeLibrary(
- "// filler filler filler filler filler filler filler filler filler filler",
- "class A {} ",
- "var topGetterField; ",
- "A topSetterField; ",
- "get topField() { return topGetterField; }",
- "void set topField(A arg) { topSetterField = arg; }",
- "class C {",
- " var getterField; ",
- " A setterField; ",
- " get field() { return getterField; }",
- " void set field(A arg) { setterField = arg; }",
- "}");
- assertErrors(result.getErrors());
- }
-
public void test_setterGetterNotAssignable() throws Exception {
AnalyzeLibraryResult result =
analyzeLibrary(
"// filler filler filler filler filler filler filler filler filler filler",
"class A {} ",
"class B {}",
- "A topGetterField; ",
- "B topSetterField; ",
- "A get topField() { return topGetterField; }",
- "void set topField(B arg) { topSetterField = arg; }",
"class C {",
" A getterField; ",
" B setterField; ",
" A get field() { return getterField; }",
" void set field(B arg) { setterField = arg; }",
"}");
- assertErrors(result.getErrors(),
- errEx(TypeErrorCode.SETTER_TYPE_MUST_BE_ASSIGNABLE, 7, 19, 5),
- errEx(TypeErrorCode.SETTER_TYPE_MUST_BE_ASSIGNABLE, 12, 18, 5));
+ assertErrors(result.getErrors(), errEx(TypeErrorCode.SETTER_TYPE_MUST_BE_ASSIGNABLE, 8, 18, 5));
}
/**
@@ -2366,4 +2323,4 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
private AnalyzeLibraryResult analyzeLibrary(String... lines) throws Exception {
return analyzeLibrary(getName(), makeCode(lines));
}
-}
+}
« no previous file with comments | « compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698