next steps for closure iterators
This commit is contained in:
parent
85a5bfe605
commit
37229df7fc
28 changed files with 164 additions and 71 deletions
|
|
@ -1,26 +0,0 @@
|
|||
discard """
|
||||
file: "tofopr.nim"
|
||||
output: "falsetrue"
|
||||
"""
|
||||
# Test is operator
|
||||
|
||||
type
|
||||
TMyType = object {.inheritable.}
|
||||
len: int
|
||||
data: string
|
||||
|
||||
TOtherType = object of TMyType
|
||||
|
||||
proc p(x: TMyType): bool =
|
||||
return x of 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