DanielXMoore / Civet

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

Matching nested property with same name generates invalid JS #1230

Closed bbrk24 closed 4 months ago

bbrk24 commented 4 months ago
switch m
  { foo: { foo: ^bar } }
    ;
if(typeof m === 'object' && m != null && 'foo' in m && typeof m.foo === 'object' && m.foo != null && 'foo' in m.foo && m.foo.foo === bar) {const { foo: foo1: { foo: foo2 } } = m;const foo = [foo2, foo1];
    ;}