diff options
Diffstat (limited to 'compiler')
-rwxr-xr-x | compiler/semexprs.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 9f2b431f6..c5e3fdc1e 100755 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -589,8 +589,10 @@ proc semStaticExpr(c: PContext, n: PNode): PNode = proc semOverloadedCallAnalyseEffects(c: PContext, n: PNode, nOrig: PNode, flags: TExprFlags): PNode = - if {efInTypeOf, efWantIterator} * flags != {}: - # consider 'proc p(): seq[int]; for x in p()' here and + 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}) |