summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorNeelesh Chandola <neelesh.chandola@outlook.com>2019-01-03 00:31:06 +0530
committerAndreas Rumpf <rumpf_a@web.de>2019-01-02 20:01:06 +0100
commit7c5ae008874e7bb76214bca96267bcb400a723d1 (patch)
tree24b80aa283364b5e37bf7bbee9feee411ae693e7 /compiler
parent9fb8c3d965ebf760c0636838eec1217ee7be7caa (diff)
downloadNim-7c5ae008874e7bb76214bca96267bcb400a723d1.tar.gz
exportc is now not allowed for type aliases (#9979)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semstmts.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 59eb23162..39f200ba8 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -1101,6 +1101,8 @@ proc typeSectionRightSidePass(c: PContext, n: PNode) =
         #debug s.typ
       s.ast = a
       popOwner(c)
+    if sfExportc in s.flags and s.typ.kind == tyAlias:
+      localError(c.config, name.info, "{.exportc.} not allowed for type aliases")
     let aa = a.sons[2]
     if aa.kind in {nkRefTy, nkPtrTy} and aa.len == 1 and
        aa.sons[0].kind == nkObjectTy: