# fixed plus single named param + unused optional param class OptParam def main is shared x = OptParam() x.value = 0 x.foo('default', nmd=44) assert x.value == 44 x.value = 0 x.foo('opt', nmd=10, nmd2=34) assert x.value == 44 x.value = 0 x.foo('opt', nmd2=1, nmd=44) assert x.value == 45 var value = 0 def foo(s as String, nmd as int, nmd2 as int = 0) .value = nmd .value += nmd2