gavr123456789 / Niva

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

Destruct fields in type matching #262

Open gavr123456789 opened 1 month ago

gavr123456789 commented 1 month ago
| figure
| Square{side} => side + 1
| Rectangle{width heigth} => width + heigth
gavr123456789 commented 2 weeks ago

if there many match in single branch then its ct error

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