Nim/tests/run/tofopr.nim
2011-11-19 15:45:51 +01:00

26 lines
325 B
Nim
Executable file

discard """
file: "tofopr.nim"
output: "falsetrue"
"""
# Test is operator
type
TMyType = object
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