-
Bug
-
Resolution: Fixed
-
P3
-
9
-
None
-
b138
-
generic
-
generic
var foo = "bar";
var obj = { [foo] : 45 };
Expected:
obj.bar == 45
Actual:
typeof(obj.bar) == "undefined"
obj.foo == 45
Also, the same is broken for special __proto__ property:
var o = { x: 4 }
var obj = { [__proto__] : o }
Expected:
obj.__proto__ is not "o" as __proto__ is used "computed".
Actual:
obj.__proto__ === o
I think only string concatenation expression as computed property key works. Everything else does not seem to work.
In the list of "not implemented yet" ES6 features, we should include computed properties as well - at least for the cases not implemented.
var obj = { [foo] : 45 };
Expected:
obj.bar == 45
Actual:
typeof(obj.bar) == "undefined"
obj.foo == 45
Also, the same is broken for special __proto__ property:
var o = { x: 4 }
var obj = { [__proto__] : o }
Expected:
obj.__proto__ is not "o" as __proto__ is used "computed".
Actual:
obj.__proto__ === o
I think only string concatenation expression as computed property key works. Everything else does not seem to work.
In the list of "not implemented yet" ES6 features, we should include computed properties as well - at least for the cases not implemented.