six
six copied to clipboard
ES5 'set' throws error.
I tried the following in both the online repl and locally though npm.
class Blah {
get a(){
alert('getting a');
}
set a(){
alert('setting a');
}
}
Line 5: Unexpected token )
and...
class Blah {
get a(){
alert('getting a');
}
set b(){
alert('setting b');
}
}
Line 5: Unexpected token )
Thank you for reporting this, I will look in to it and have a fix in as soon as I track down the issue (I have a few ideas where it might be)
Ok. Thank a lot. The same happens with:
a={
set a:function(){}
}
and
a={
get a:function(){}
}
neither of those last two examples are valid ES5
a={
[g|s]et a(){ }
}
Woah. My bad. Forget that comment was posted.