Constructing through a private constructor that leaves a property unset
The complete source of classes_constructors_private_partial.ek9, which fails to compile exactly as captioned. Shown on classes.html, concepts/constructors.html.
Fails with E08264: this constructor leaves properties without a value - it can only be used through this() from a constructor that sets them; construct through a constructor that sets every property
#!ek9 defines module bad.site.classes.constructors.privatepartial defines class Reading label as String? amount as Integer? default private Reading() Reading() -> label as String amount as Integer this.label: label this.amount: amount private Reading() -> label as String this.label: label relabelled() -> newLabel as String <- rtn as Reading: Reading(newLabel) default operator ?
Download classes_constructors_private_partial.ek9 - it fails to compile on purpose, with the error its @Error line states.