DanielXMoore / Civet

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

multi assignment expressions are evaluated twice #1344

Open JayXon opened 3 months ago

JayXon commented 3 months ago
a=[]
b=0
(a[b++]?=1)++
console.log a,b

prints

[
  1,
  null
] 2

https://civet.dev/playground?code=YT1bXQpiPTAKKGFbYisrXT89MSkrKwpjb25zb2xlLmxvZyBhLGI%3D

edemaine commented 3 months ago

This is https://github.com/DanielXMoore/Civet/issues/50#issuecomment-1402394139

Good reminder to step up the priority on this, but I'll close these in favor of #50.