summary refs log tree commit diff stats
path: root/tests/macros
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2019-11-19 09:58:47 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-11-19 09:58:47 +0100
commit03fa9a9041bfa425ce54056e734eb264b841d463 (patch)
treeffded9df9791aeba21a99fc90af65e88af266fe3 /tests/macros
parent5278cf80eb4adce3110fd991d772c18e7b4cb0be (diff)
downloadNim-03fa9a9041bfa425ce54056e734eb264b841d463.tar.gz
fix regression in align (#12680)
* fix regression in align

* add test typesym without type
Diffstat (limited to 'tests/macros')
-rw-r--r--tests/macros/tinvalidtypesym.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/macros/tinvalidtypesym.nim b/tests/macros/tinvalidtypesym.nim
new file mode 100644
index 000000000..af6f31d10
--- /dev/null
+++ b/tests/macros/tinvalidtypesym.nim
@@ -0,0 +1,14 @@
+discard """
+errormsg: "type expected, but symbol 'MyType' has no type."
+"""
+
+import macros
+
+macro foobar(name) =
+  let sym = genSym(nskType, "MyType")
+
+  result = quote do:
+    type
+      `name` = `sym`
+
+foobar(MyAlias)