version 0.7.2
This commit is contained in:
parent
2cd136cf7a
commit
ddaedab835
158 changed files with 34811 additions and 10001 deletions
20
tests/tisopr.nim
Normal file
20
tests/tisopr.nim
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Test is operator
|
||||
|
||||
type
|
||||
TMyType = object
|
||||
len: int
|
||||
data: string
|
||||
|
||||
TOtherType = object of TMyType
|
||||
|
||||
proc p(x: TMyType): bool =
|
||||
return x is TOtherType
|
||||
|
||||
var
|
||||
m: TMyType
|
||||
n: TOtherType
|
||||
|
||||
write(stdout, p(m))
|
||||
write(stdout, p(n))
|
||||
|
||||
#OUT falsetrue
|
||||
Loading…
Add table
Add a link
Reference in a new issue