BOO-999
[boo.git] / crazy_ideas.boo
blob726fb325c3ba29b76b0f9b915d987f6aa67184ea
1 class Foo(ICharacter):
2 [AutoDelegate(ICharacter)]
3 Character as Character
5 [method_decorator(Character.dump, Customer)]
6 class Trace:
7 include TraceMixin
9 mixin TraceMixin(Foo, ICollection):
11 def before(name):
12 print(name)
14 def after(name):
15 print(name)
17 mixin ListMixin(IList):
19 include CollectionMixin
22 [class_invariant(Count > -1)]
23 [demands_attribute(Foo)]
24 class Base:
25 Count as int
27 for line in TextFile("foo"):
28 given line:
29 when /$foo/:
30 print("cool!")
32 when /#def/:
33 print("hello, master.")
35 when cool_enough:
36 print("cool!")
38 when _prop1:
39 print("prop1")
42 def cool_enough(s as string):
43 pass