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
/
integration
/
statements
/
while-3.boo
blob
11d30f25f744c2186fe07ad915bb7631f0898b12
1
"""
2
2
3
3
4
1
5
"""
6
import
System
7
8
class
Foo
(
object
):
9
pass
10
11
class
Bar
(
Foo
):
12
pass
13
14
def
classDepth
(
type
as
Type
):
15
16
value
=
1
17
while
type
is not
object
:
18
++
value
19
type
=
type
.
BaseType
20
21
return
value
22
23
print
(
classDepth
(
Foo
))
24
print
(
classDepth
(
Bar
))
25
print
(
classDepth
(
object
))