Nim/tests/types/tisopr.nim
2014-01-13 02:10:03 +01:00

13 lines
234 B
Nim

discard """
output: "true true false yes"
"""
proc IsVoid[T](): string =
when T is void:
result = "yes"
else:
result = "no"
const x = int is int
echo x, " ", float is float, " ", float is string, " ", IsVoid[void]()