From fe151d525ae9a56d10552316f0c733996449e28c Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Wed, 14 Nov 2018 13:55:36 +0300 Subject: [PATCH] Prevent generation of function names that clash with standard objects --- .../org/teavm/backend/javascript/rendering/RenderingUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/teavm/backend/javascript/rendering/RenderingUtil.java b/core/src/main/java/org/teavm/backend/javascript/rendering/RenderingUtil.java index 5a3d5e0f9..580f456e8 100644 --- a/core/src/main/java/org/teavm/backend/javascript/rendering/RenderingUtil.java +++ b/core/src/main/java/org/teavm/backend/javascript/rendering/RenderingUtil.java @@ -25,7 +25,7 @@ public final class RenderingUtil { "catch", "class", "const", "continue", "debugger", "default", "delete", "do", "else", "export", "extends", "finally", "for", "function", "if", "import", "in", "instanceof", "new", "return", "super", "switch", "this", "throw", "try", "typeof", "var", "void", "while", "with", "yield", - "NaN"))); + "NaN", "Map", "Set", "eval", "Math", "Date", "JSON", "Intl"))); public static final String VARIABLE_START_CHARS = "abcdefghijklmnopqrstuvwxyz"; public static final String VARIABLE_PART_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$_";