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

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

Issue 57383007: Issue 14452. Fix for skipping 'final' modifier in function expression parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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: 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 df376c1934579edf52437b21efd45aab3dc12b1a..769e0173b0d58ff028c55b70cae975c34f2399cf 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
@@ -192,6 +192,19 @@ public class SimpleParserTest extends ParserTestCase {
assertTrue(isFunctionExpression("() => e"));
}
+ public void test_isFunctionExpression_parameter_final() throws Exception {
+ assertTrue(isFunctionExpression("(final a) {}"));
+ assertTrue(isFunctionExpression("(final a, b) {}"));
+ assertTrue(isFunctionExpression("(final a, final b) {}"));
+ }
+
+ public void test_isFunctionExpression_parameter_final_typed() throws Exception {
+ assertTrue(isFunctionExpression("(final int a) {}"));
+ assertTrue(isFunctionExpression("(final prefix.List a) {}"));
+ assertTrue(isFunctionExpression("(final List<int> a) {}"));
+ assertTrue(isFunctionExpression("(final prefix.List<int> a) {}"));
+ }
+
public void test_isFunctionExpression_parameter_multiple() throws Exception {
assertTrue(isFunctionExpression("(a, b) {}"));
}

Powered by Google App Engine
This is Rietveld 408576698