gavr123456789 / Niva

Smalltalk like programming language
24 stars 2 forks source link

False positive Don't use setter as expression #228

Open gavr123456789 opened 2 weeks ago

gavr123456789 commented 2 weeks ago

hbox::mut Box = (Box orientation: Orientation.HORIZONTAL spacing: 5) hexpand: true; vexpand: true

Don't use setter as expression, it doesn't returns anything. Maybe you wanted to use update and copy, then remove mut modifier from type declaration

gavr123456789 commented 2 weeks ago

No, not false positive, u just needed to use

hbox = (Box orientation: Orientation.HORIZONTAL spacing: 5);
  hexpand: true;
  vexpand: true  

instead

gavr123456789 commented 2 weeks ago

Also it looks like u can change properties, on non mutable types, if this properties from parent type