class Test def main is shared pass def foo as IEnumerable yield 1.1 # .error. Cannot return decimal because "foo" is declared to return a int. def bar as List yield 1 # .error. Cannot yield unless the return type is an iterator type. Try "int*".