summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2012-09-13 00:33:01 +0300
committerZahary Karadjov <zahary@gmail.com>2012-09-13 00:33:01 +0300
commit9e4254e4de8cecff5c0a8026930ae79b68ca7c61 (patch)
treed5d2d1c4ef68fd0f2ff18d24067b6edfcd96295c /compiler
parentd46ec1cc2246b45a5aa372a7cd57d7f176eb64aa (diff)
downloadNim-9e4254e4de8cecff5c0a8026930ae79b68ca7c61.tar.gz
type trais used to work only on user-defined types. see #202
Diffstat (limited to 'compiler')
-rwxr-xr-xcompiler/evals.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/evals.nim b/compiler/evals.nim
index bb0e5936d..3f801e123 100755
--- a/compiler/evals.nim
+++ b/compiler/evals.nim
@@ -864,8 +864,7 @@ proc evalTypeTrait*(n: PNode, context: PSym): PNode =
   ## XXX: This should be pretty much guaranteed to be true
   # by the type traits procs' signatures, but until the
   # code is more mature it doesn't hurt to be extra safe
-  internalAssert n.sons.len >= 2 and n.sons[1].kind == nkSym and
-                 n.sons[1].sym.typ.kind == tyTypeDesc
+  internalAssert n.sons.len >= 2 and n.sons[1].kind == nkSym
   
   let typ = n.sons[1].sym.typ.skipTypes({tyTypeDesc})
   case n.sons[0].sym.name.s.normalize