summary refs log tree commit diff stats
path: root/tests
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
parent5278cf80eb4adce3110fd991d772c18e7b4cb0be (diff)
downloadNim-03fa9a9041bfa425ce54056e734eb264b841d463.tar.gz
fix regression in align (#12680)
* fix regression in align

* add test typesym without type
Diffstat (limited to 'tests')
-rw-r--r--tests/macros/tinvalidtypesym.nim14
-rw-r--r--tests/misc/talignas.nim2
2 files changed, 14 insertions, 2 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)
diff --git a/tests/misc/talignas.nim b/tests/misc/talignas.nim
index 50a3eb962..5d5250309 100644
--- a/tests/misc/talignas.nim
+++ b/tests/misc/talignas.nim
@@ -6,8 +6,6 @@ output: "align ok"
 
 # This is for Azure. The keyword ``alignof`` only exists in ``c++11``
 # and newer. On Azure gcc does not default to c++11 yet.
-when defined(cpp) and not defined(windows):
-  {.passC: "-std=c++11".}
 
 import globalalignas