summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorJuan M Gómez <info@jmgomez.me>2023-09-20 07:19:29 +0100
committerGitHub <noreply@github.com>2023-09-20 08:19:29 +0200
commitfefde3a735c3bc931a4d3289e43f3b95f65e1256 (patch)
treec48663c7cf28ea53fcd0fc2f2962f6bffa8f77c7 /tests
parent5568ba0d9f39469891b5e4625ad39ebcfa5e1ee3 (diff)
downloadNim-fefde3a735c3bc931a4d3289e43f3b95f65e1256.tar.gz
fixes compiler crash by preventing exportc on generics (#22731)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/types/texportgeneric.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/types/texportgeneric.nim b/tests/types/texportgeneric.nim
new file mode 100644
index 000000000..9e6be2bb6
--- /dev/null
+++ b/tests/types/texportgeneric.nim
@@ -0,0 +1,8 @@
+discard """
+  errormsg: "{.exportc.} not allowed for generic types"
+  line: 6
+"""
+
+type Struct[T] {.exportc.} = object
+  a:int
+  b: T
\ No newline at end of file