preparation for new 'is' operator; breaks bootstrapping again, sorry (use generated C code)
This commit is contained in:
parent
2d62738bbb
commit
6a8a409f1b
19 changed files with 86 additions and 203 deletions
|
|
@ -1,26 +0,0 @@
|
|||
discard """
|
||||
file: "tisopr.nim"
|
||||
output: "falsetrue"
|
||||
"""
|
||||
# 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