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

Unified Diff: pkg/compiler/lib/src/diagnostics/messages.dart

Issue 1436263002: dart2js: Forbid # placeholders in JS function bodies. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/native/js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/diagnostics/messages.dart
diff --git a/pkg/compiler/lib/src/diagnostics/messages.dart b/pkg/compiler/lib/src/diagnostics/messages.dart
index 30a6a8507f2fb4f8b54e55849f905e6e35438c4c..5913cb02da724ee567159b7c654aa8a00b793474 100644
--- a/pkg/compiler/lib/src/diagnostics/messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/messages.dart
@@ -281,6 +281,7 @@ enum MessageKind {
JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS,
JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS,
+ JS_PLACEHOLDER_CAPTURE,
LIBRARY_NAME_MISMATCH,
LIBRARY_NOT_FOUND,
LIBRARY_NOT_SUPPORTED,
@@ -2568,6 +2569,14 @@ main() {}
"Try adding '@MirrorsUsed(...)' as described at "
"https://goo.gl/Akrrog."),
+ MessageKind.JS_PLACEHOLDER_CAPTURE:
+ const MessageTemplate(
+ MessageKind.JS_PLACEHOLDER_CAPTURE,
+ "JS code must not use '#' placeholders inside functions.",
+ howToFix:
+ "Use an immediately called JavaScript function to capture the"
+ " the placeholder values as JavaScript function parameters."),
+
MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT:
const MessageTemplate(
MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT,
« no previous file with comments | « no previous file | pkg/compiler/lib/src/native/js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698