diff options
author | Araq <rumpf_a@web.de> | 2012-11-28 08:03:25 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-11-28 08:03:25 +0100 |
commit | 9483606d5bc074b5c820c3ca8b73c9507139c48a (patch) | |
tree | 81cd2e3b0e99b93586a55473f04841cb279fd93f /compiler | |
parent | 0d19de18cce2ba62e3c753e7474c29bbe4c47ad7 (diff) | |
download | Nim-9483606d5bc074b5c820c3ca8b73c9507139c48a.tar.gz |
bugfix: implicit items/pairs work better
Diffstat (limited to 'compiler')
-rwxr-xr-x | compiler/semexprs.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index e1d69c0bc..cf0e8f4dd 100755 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -589,9 +589,10 @@ proc semStaticExpr(c: PContext, n: PNode): PNode = proc semOverloadedCallAnalyseEffects(c: PContext, n: PNode, nOrig: PNode, flags: TExprFlags): PNode = - if efWantIterator in flags: - result = semOverloadedCall(c, n, nOrig, {skIterator}) - elif efInTypeOf in flags: + if flags*{efInTypeOf, efWantIterator} != {}: + # consider: 'for x in pReturningArray()' --> we don't want the restriction + # to 'skIterator' anymore; skIterator is preferred in sigmatch already for + # typeof support. # for ``type(countup(1,3))``, see ``tests/ttoseq``. result = semOverloadedCall(c, n, nOrig, {skProc, skMethod, skConverter, skMacro, skTemplate, skIterator}) |