# fixed plus single named param + used optional + ext property init class OptParam def main is shared x = OptParam('default', nmd=45) assert x.value == 45 assert x.value1 == 0 assert x.value2 == 0 x = OptParam('opt', 45, 1, value2=66) assert x.value == 45 assert x.value1 == 1 assert x.value2 == 66 x = OptParam('opt', 0, nmd1=50, value2=67) assert x.value == 0 assert x.value1 == 50 assert x.value2 == 67 x = OptParam('opt', nmd1=1, nmd=51, value2=68) assert x.value == 51 assert x.value1 == 1 assert x.value2 == 68 x = OptParam('opt', nmd1=1, nmd=51, value1=55) assert x.value == 51 assert x.value1 == 55 assert x.value2 == 0 x = OptParam('opt', nmd1=99, nmd=55, value=66, value1=77) assert x.value == 66 assert x.value1 == 77 assert x.value2 == 0 x = OptParam('opt', nmd1=99, nmd=55, value=66, value1=77, value2=88) assert x.value == 66 assert x.value1 == 77 assert x.value2 == 88 var value = 0 var value1 = 0 var value2 = 0 cue init(s as String, nmd as int, nmd1 as int = 0) base.init #trace nmd .value = nmd if s =='default', assert nmd1 == 0 #trace nmd1 .value1 = nmd1