class NamedCtor def main is shared x = NamedCtor('default', 0) assert x.x == 'default' assert x.a == 0 x1 = NamedCtor(sName='foo', age=99) assert x1.x == 'foo' assert x1.a == 99 x2 = NamedCtor(age=55, sName='foo') assert x2.x == 'foo' assert x2.a == 55 var x = '' var a = 0 cue init(sName as String, age as int) base.init .x = sName .a = age # print 'NamedCtor [.x]'