DanielXMoore / Civet

A TypeScript superset that favors more types and less typing
https://civet.dev
MIT License
1.55k stars 33 forks source link

TypeError when compiling `readonly @prop` in c'tor #1601

Open bbrk24 opened 4 hours ago

bbrk24 commented 4 hours ago

both of these work fine:

class Foo
  @(readonly bar)

class Foo
  @(@bar)

but you can't combine them.

edemaine commented 3 hours ago

Isn't combining them kind of redundant? Doesn't @(readonly bar) already assign to this.bar (if using TypeScript)? I agree it would still be nice, though.

bbrk24 commented 3 hours ago

In that case, it should at least diagnose, rather than crashing the compiler.