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

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

Issue 10635004: Redirecting constructors may not have a body. Fail with compile-time error (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/javatests/com/google/dart/compiler/parser/SyntaxTest.java ('k') | tests/co19/co19-compiler.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/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 bd7d1c9704a0a1df5ae4a94ceb3f974b05302dfb..8fbadb6e89a83f38f78a82a4be4b8e3291aac60d 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
@@ -271,29 +271,29 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
public void testConstructorForwarding() {
Map<String, ClassNodeElement> classes = loadSource(
"class MissingArgument {",
- " MissingArgument() : this.bar() {}",
+ " MissingArgument() : this.bar();",
" MissingArgument.bar(int i) {}",
"}",
"class IntArgument {",
- " IntArgument() : this.bar(1) {}",
+ " IntArgument() : this.bar(1);",
" IntArgument.bar(int i) {}",
"}",
"class ExtraIntArgument {",
- " ExtraIntArgument() : this.bar(1, 1) {}",
+ " ExtraIntArgument() : this.bar(1, 1);",
" ExtraIntArgument.bar(int i) {}",
"}",
"class StringArgument {",
- " StringArgument() : this.bar('') {}",
+ " StringArgument() : this.bar('');",
" StringArgument.bar(int i) {}",
"}",
"class NullArgument {",
- " NullArgument() : this.bar(null) {}",
+ " NullArgument() : this.bar(null);",
" NullArgument.bar(int i) {}",
"}",
"class OptionalParameter {",
- " OptionalParameter() : this.bar() {}",
+ " OptionalParameter() : this.bar();",
" OptionalParameter.bar([int i = null]) {}",
- " OptionalParameter.foo() : this.bar('') {}",
+ " OptionalParameter.foo() : this.bar('');",
"}");
analyzeClass(classes.get("MissingArgument"), 1);
analyzeClass(classes.get("IntArgument"), 0);
@@ -1374,7 +1374,7 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
analyze("{ var val1 = new IA<Bar>(); }");
analyzeFail("{ var val1 = new IA<String>(); }",TypeErrorCode.TYPE_NOT_ASSIGNMENT_COMPATIBLE);
}
-
+
public void testStringConcat() {
Map<String, ClassNodeElement> source = loadSource(
"class Object {}",
@@ -1389,8 +1389,8 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
analyzeFail("{ var c = s + b; }",
TypeErrorCode.PLUS_CANNOT_BE_USED_FOR_STRING_CONCAT);
analyzeFail("var c = 'foo' + 1;",
- TypeErrorCode.PLUS_CANNOT_BE_USED_FOR_STRING_CONCAT);
+ TypeErrorCode.PLUS_CANNOT_BE_USED_FOR_STRING_CONCAT);
analyzeFail("var c = 'foo' + 'bar';",
- TypeErrorCode.PLUS_CANNOT_BE_USED_FOR_STRING_CONCAT);
- }
+ TypeErrorCode.PLUS_CANNOT_BE_USED_FOR_STRING_CONCAT);
+ }
}
« no previous file with comments | « compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698