Open bbrk24 opened 5 months ago
One could argue that this is a bug in CoffeeScript. See https://github.com/jashkenas/coffeescript/issues/4552 (especially toward the end).
That said, it currently is how CoffeeScript works, so it probably make sense to have a compatibility flag that triggers CoffeeScript's IIFE behavior, and perhaps the same coffeeClasses
flag makes sense. Related to #457.
As a workaround you can do this:
'civet coffeeCompat'
class Foo
get [Symbol.toStringTag]() 'Foo'
console.log Foo::[Symbol.toStringTag]
This prints
'Foo'
in CoffeeScript andundefined
in Civet.