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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java

Issue 231793007: Allow function literal in string interpolation (dartbug.com/18137). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | « editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/Parser.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
index acb8b39fd3e91dbeb3adc4c0d001bcfa1687443d..50271e206eab7ea45ea0423ae72ef70ead9b0c23 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
@@ -181,20 +181,9 @@ public class SimpleParserTest extends ParserTestCase {
parseCompilationUnit("class C { C() : a = (() {}); }");
}
- public void test_function_literal_disallowed_in_StringInterpolation_in_ConstructorFieldInitializer()
+ public void test_function_literal_allowed_in_StringInterpolation_in_ConstructorFieldInitializer()
throws Exception {
- // TODO: fix this if the VM and dart2js decide to start accepting this syntax
- // (dartbug.com/18102).
-
- // Note: recovery isn't very good inside string interpolation so we expect a lot of errors
- // (dartbug.com/946)
- parseCompilationUnit(
- "class C { C() : a = \"${(){}}\"; }",
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.MISSING_IDENTIFIER);
+ parseCompilationUnit("class C { C() : a = \"${(){}}\"; }");
Brian Wilkerson 2014/04/10 22:33:54 Not that it matters, but... Because Dart allows u
Paul Berry 2014/04/10 22:43:22 Good point. I'll keep that in mind in the future.
}
public void test_isFunctionDeclaration_nameButNoReturn_block() throws Exception {
« no previous file with comments | « editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/Parser.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698