diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/types/t7905.nim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/types/t7905.nim b/tests/types/t7905.nim new file mode 100644 index 000000000..ddb371039 --- /dev/null +++ b/tests/types/t7905.nim @@ -0,0 +1,18 @@ +discard """ + output: ''' +(member: "hello world") +(member: 123.456) +''' +""" + +template foobar(arg: typed): untyped = + type + MyType = object + member: type(arg) + + var myVar: MyType + myVar.member = arg + echo myVar + +foobar("hello world") +foobar(123.456'f64) |