2013-12-10 16:13:25 -08:00
|
|
|
class A {}
|
|
|
|
|
class B is A {}
|
|
|
|
|
class C is B {}
|
2013-12-19 07:02:27 -08:00
|
|
|
var a = new A
|
|
|
|
|
var b = new B
|
|
|
|
|
var c = new C
|
2013-12-10 16:13:25 -08:00
|
|
|
|
2014-01-05 12:27:12 -08:00
|
|
|
IO.print(a is A) // expect: true
|
|
|
|
|
IO.print(a is B) // expect: false
|
|
|
|
|
IO.print(a is C) // expect: false
|
|
|
|
|
IO.print(b is A) // expect: true
|
|
|
|
|
IO.print(b is B) // expect: true
|
|
|
|
|
IO.print(b is C) // expect: false
|
|
|
|
|
IO.print(c is A) // expect: true
|
|
|
|
|
IO.print(c is B) // expect: true
|
|
|
|
|
IO.print(c is C) // expect: true
|