summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2022-03-26 13:29:04 +0100
committerGitHub <noreply@github.com>2022-03-26 13:29:04 +0100
commit7d32425a577053bda356ca71c81d6701d8ad6372 (patch)
tree5cbb9a0f3503f75f96eb1fcaaffba1647172681a
parent82319ef00dc9ce6f65b1664024a10ee5d9465f38 (diff)
downloadNim-7d32425a577053bda356ca71c81d6701d8ad6372.tar.gz
fixes #14318 (#14335)
-rw-r--r--compiler/pragmas.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim
index 81c6a42d3..458c7547a 100644
--- a/compiler/pragmas.nim
+++ b/compiler/pragmas.nim
@@ -656,7 +656,7 @@ proc pragmaRaisesOrTags(c: PContext, n: PNode) =
       x.typ = makeTypeFromExpr(c, x)
     else:
       var t = skipTypes(c.semTypeNode(c, x, nil), skipPtrs)
-      if t.kind != tyObject and not t.isMetaType:
+      if t.kind notin {tyObject, tyOr}:
         localError(c.config, x.info, errGenerated, "invalid type for raises/tags list")
       x.typ = t