Files
Nim/tests/objects/tofopr.nim
Adam Strzelecki e80465dacf tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:04:32 +02:00

27 lines
329 B
Nim

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