Closed
Description
@GeoffreyBooth I came across this while working on class AST:
This:
class A
[b]: 3
compiles to:
var A;
A = (function() {
class A {};
A.prototype.[b] = 3;
return A;
}).call(this);
which doesn't parse
Does it make sense to allow computed class properties like this?
If so, it's probably just a question of omitting the .
when compiling (so here generate A.prototype[b] = 3
instead)?
Fwiw, it looks like this didn't compile (as Coffeescript source) in Coffeescript 1.x. I didn't trace when it became allowed Coffeescript syntax