BOO-996, BOO-995: Added "then" keyword to replace "else" semantic in looping construc...
[boo.git] / tests / testcases / ducky / ducky-6.boo
blobe0ade6f9c54fd69599e11b11cbeed62d56971984
1 """
2 baz
3 Foo.Call(1, 1, 2)
4 Foo.Call(3, 5, 8)
5 Bar(spam, eggs)
6 Bar.Sprong
7 """
8 class Foo(callable):
9 def Call(args as (object)) as object:
10 print "Foo.Call(${join(args, ', ')})"
12 class Bar:
13 def constructor(first, second):
14 print "Bar(${first}, ${second})"
16 def Sprong():
17 print "Bar.Sprong"
19 def baz():
20 print "baz"
22 f as object
23 f = baz
24 f()
26 f = Foo()
27 f("1", "1", "2")
28 f(3, 5, 8)
30 f = Bar
31 b as Bar = f("spam", "eggs")
32 f = b.Sprong
33 f()