diff options
Diffstat (limited to 'tests/macros/tquotedo.nim')
-rw-r--r-- | tests/macros/tquotedo.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/macros/tquotedo.nim b/tests/macros/tquotedo.nim index 0aae87bf0..6acb8ef4e 100644 --- a/tests/macros/tquotedo.nim +++ b/tests/macros/tquotedo.nim @@ -4,6 +4,7 @@ output: ''' Hallo Welt Hallo Welt 1 +() ''' """ @@ -34,3 +35,17 @@ macro t(): untyped = t() echo tp() + + +# https://github.com/nim-lang/Nim/issues/9866 +type + # Foo = int # works + Foo = object # fails + +macro dispatchGen(): untyped = + var shOpt: Foo + result = quote do: + let baz = `shOpt` + echo `shOpt` + +dispatchGen() |