see #12213
@@ -113,7 +113,7 @@ class Exception extends NativeException {
@:noCompletion
function setProperty(name:String, value:Any):Void {
try {
- js.lib.Object.defineProperty(this, name, {value:value});
+ js.lib.Object.defineProperty(this, name, {value:value, writable: true});
} catch(e:Exception) {
js.Syntax.code('{0}[{1}] = {2}', this, name, value);
}
@@ -15,6 +15,8 @@ class Issue12213 extends Test {
Method("Class", "method"),
LocalFunction(0)
];
+ e.stack = [];
+ // test if we can set again because that might be a special case
e.stack = stack;
utest.Assert.same(stack, e.stack);