Skip to content

OOP: assignment notation in the class 'create' operation

The 'create' operation for classes only allows value list notation in its actual parameter list. Assignment notation does not work.

For example:

type class C1 {
  private var integer v;
  public var integer @property p;
  public function f(in integer x) return integer { return x; }
}

...

var C1 x1 := C1.create(1, 2); // value list notation, works
var C1 x2 := C1.create(v := 1, p := 2); // assignment notation, causes a compilation error

/cc @aknappqwt @mmagyari