Chromium Code Reviews

Unified Diff: lib/src/compiler/js_names.dart

Issue 2071593003: Allow constant static fields to overwrite defaults (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: Merge master Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/js_names.dart
diff --git a/lib/src/compiler/js_names.dart b/lib/src/compiler/js_names.dart
index 5cf311df204a3c508dd9d0d662c6da8c476c381b..9bce2f55f63d5d4e04a65072ae11be647d508096 100644
--- a/lib/src/compiler/js_names.dart
+++ b/lib/src/compiler/js_names.dart
@@ -283,12 +283,13 @@ bool invalidVariableName(String keyword, {bool strictMode: true}) {
}
/// Returns true for invalid static field names in strict mode.
-/// In particular, "caller" "callee" and "arguments" cannot be used.
+/// In particular, "caller" "callee" "arguments" and "name" cannot be used.
bool invalidStaticFieldName(String name) {
switch (name) {
case "arguments":
case "caller":
case "callee":
+ case "name":
return true;
}
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine