test cases for the new handling of iterators by the is operator

This commit is contained in:
Zahary Karadjov 2014-03-06 23:03:02 +02:00
commit 249dd70273
3 changed files with 36 additions and 9 deletions

View file

@ -323,11 +323,6 @@ proc isOpImpl(c: PContext, n: PNode): PNode =
result = newIntNode(nkIntLit, ord(t.kind == tyProc and
t.callConv == ccClosure and
tfIterator notin t.flags))
of "iterator":
let t = skipTypes(t1, abstractRange)
result = newIntNode(nkIntLit, ord(t.kind == tyProc and
t.callConv == ccClosure and
tfIterator in t.flags))
else:
var t2 = n[2].typ.skipTypes({tyTypeDesc})
let lifted = liftParamType(c, skType, newNodeI(nkArgList, n.info),