gavr123456789 / Niva

Smalltalk like programming language
https://gavr123456789.github.io/niva-site
43 stars 2 forks source link

Destruct fields in type matching #262

Open gavr123456789 opened 4 months ago

gavr123456789 commented 4 months ago
| figure
| Square{side} => side + 1
| Rectangle{width heigth} => width + heigth
gavr123456789 commented 3 months ago

if there many match in single branch then its ct error

| figure
| Square{side},  Rectangle{width heigth}  => side + 1 // ERROR