diff options
Diffstat (limited to 'tests/run/tisopr.nim')
-rw-r--r-- | tests/run/tisopr.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/run/tisopr.nim b/tests/run/tisopr.nim new file mode 100644 index 000000000..6d3c51749 --- /dev/null +++ b/tests/run/tisopr.nim @@ -0,0 +1,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]() + |