From 61181702d5cf68e4b7a97cac352b395d37ddb702 Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 16 Feb 2017 11:35:15 +0100 Subject: [PATCH] fixes #5399 --- compiler/semfold.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/semfold.nim b/compiler/semfold.nim index 7a65462ec2..749deded11 100644 --- a/compiler/semfold.nim +++ b/compiler/semfold.nim @@ -659,7 +659,7 @@ proc getConstExpr(m: PSym, n: PNode): PNode = localError(a.info, errCannotEvalXBecauseIncompletelyDefined, "sizeof") result = nil - elif skipTypes(a.typ, typedescInst).kind in + elif skipTypes(a.typ, typedescInst+{tyRange}).kind in IntegralTypes+NilableTypes+{tySet}: #{tyArray,tyObject,tyTuple}: result = newIntNodeT(getSize(a.typ), n)