diff options
-rw-r--r-- | compiler/semcall.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/semcall.nim b/compiler/semcall.nim index c391cb7c9..5e3e8b65b 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -569,6 +569,8 @@ proc explicitGenericInstantiation(c: PContext, n: PNode, s: PSym): PNode = assert n.kind == nkBracketExpr for i in 1..sonsLen(n)-1: let e = semExpr(c, n.sons[i]) + if e.typ == nil: + localError(c.config, e.info, "expression has no type") n.sons[i].typ = e.typ.skipTypes({tyTypeDesc}) var s = s var a = n.sons[0] |