This is an automated email from the ASF dual-hosted git repository. aharui pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 7b2177433bd9bb111694838b8f9dbb9303610089 Author: Alex Harui <aha...@apache.org> AuthorDate: Wed Jan 9 17:17:18 2019 -0800 block Object.toJSON. Doesn't seem to be in the ES5 spec. Fixes apache/royale-asjs#367. --- .../compiler/internal/codegen/typedefs/reference/ClassReference.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler-externc/src/main/java/org/apache/royale/compiler/internal/codegen/typedefs/reference/ClassReference.java b/compiler-externc/src/main/java/org/apache/royale/compiler/internal/codegen/typedefs/reference/ClassReference.java index b766fc1..d32cde3 100644 --- a/compiler-externc/src/main/java/org/apache/royale/compiler/internal/codegen/typedefs/reference/ClassReference.java +++ b/compiler-externc/src/main/java/org/apache/royale/compiler/internal/codegen/typedefs/reference/ClassReference.java @@ -644,6 +644,11 @@ public class ClassReference extends BaseReference { // skipping Object.prototype.toString() allows toString(opt_radix) for Number, int and uint } + else if (getQualifiedName().equals("Object") && functionName.equals("toJSON")) + { + // skipping Object.prototype.toJSON(). Doesn't seem to be in the spec and excluding + // in the config seems to also block Date.toJSON + } else { instanceMethods.put(functionName, method);