summary refs log tree commit diff stats
path: root/tests/run/tisopr.nim
blob: 6d3c51749b84e525ab20c1ba59a816c1a1df6ddf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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]()