repo.or.cz
/
boo.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
BOO-996, BOO-995: Added "then" keyword to replace "else" semantic in looping construc...
[boo.git]
/
tests
/
testcases
/
ducky
/
method-dispatch-1.boo
blob
aabee6f0ab28e61daa4e208461abb31f4d215184
1
"""
2
tom
3
tom
4
crash
5
"""
6
class
Drum
:
7
pass
8
9
class
Cymbal
:
10
pass
11
12
def
play
(
drum
as
Drum
):
13
print
"tom"
14
15
def
play
(
cymbal
as
Cymbal
):
16
print
"crash"
17
18
for
item
as
object
in
[
Drum
(),
Drum
(),
Cymbal
()]:
19
play
(
item
)