class Test def takesVari(x as vari String) is shared for y in x print y def takesVariNil(x as vari String?) is shared for y in x print y def takesArray(x as String[]) is shared for y in x print y def foo(args as vari int) as int is shared sum = 0 for arg in args, sum += arg return sum def main is shared .takesVari('hola', nil) # .error. expects a non-nilable .takesVari(@['hola', nil]) # .error. expects type vari String #.takesArray(@['hola', nil]) #Argument 1 expects type String[], but supplying type String?[] .takesVari('hola', 'nonnil') .takesVariNil('hola', nil) x = .foo(1,2) assert x == 3 x = .foo(1) assert x == 1