From 01bc5f32d665ea1c72590609391769cef60d6e83 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Tue, 28 Mar 2017 01:58:54 +0300 Subject: [PATCH] Fix the compilation of the emmy package --- compiler/semstmts.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index d42eb54336..12391a9cdb 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -500,6 +500,8 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode = #changeType(def.skipConv, typ, check=true) else: typ = skipIntLit(def.typ) + if typ.kind in tyUserTypeClasses and typ.isResolvedUserTypeClass: + typ = typ.lastSon if hasEmpty(typ): localError(def.info, errCannotInferTypeOfTheLiteral, ($typ.kind).substr(2).toLowerAscii)