DanielXMoore / Civet

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

`.#x` shorthand for private properties #1234

Closed bbrk24 closed 4 months ago

bbrk24 commented 4 months ago

This is a compile error:

foo ||> .#x = 1

The . is interpreted as the partial placeholder rather than member access. Without the dot, it is not interpreted in the intended way:

foo ||> #x = 1
// vvv
(this.#x = 1)(foo), foo
edemaine commented 4 months ago

It looks like .#x just generally doesn't work as a private member access helper. Should be an easy fix.