* Fixes #11078 * Move to existing runnableExamples, update the expected html. * Remove second comment token.
This commit is contained in:
parent
9d5e8e55f9
commit
e64dde734b
3 changed files with 6 additions and 2 deletions
|
|
@ -832,7 +832,7 @@ proc track(tracked: PEffects, n: PNode) =
|
|||
createTypeBoundOps(tracked.c, it.typ, it.info)
|
||||
let iterCall = n[n.len-2]
|
||||
let loopBody = n[n.len-1]
|
||||
if tracked.owner.kind != skMacro and iterCall.len > 1:
|
||||
if tracked.owner.kind != skMacro and iterCall.safelen > 1:
|
||||
# XXX this is a bit hacky:
|
||||
if iterCall[1].typ != nil and iterCall[1].typ.skipTypes(abstractVar).kind notin {tyVarargs, tyOpenArray}:
|
||||
createTypeBoundOps(tracked.c, iterCall[1].typ, iterCall[1].info)
|
||||
|
|
|
|||
|
|
@ -878,7 +878,9 @@ function main() {
|
|||
<span class="Identifier">subdir</span> <span class="Operator">/</span> <span class="Identifier">subdir_b</span> <span class="Operator">/</span> <span class="Identifier">utils</span>
|
||||
|
||||
<span class="Identifier">doAssert</span> <span class="Identifier">bar</span><span class="Other">(</span><span class="DecNumber">3</span><span class="Other">,</span> <span class="DecNumber">4</span><span class="Other">)</span> <span class="Operator">==</span> <span class="DecNumber">7</span>
|
||||
<span class="Identifier">foo</span><span class="Other">(</span><span class="Identifier">enumValueA</span><span class="Other">,</span> <span class="Identifier">enumValueB</span><span class="Other">)</span></pre></p>
|
||||
<span class="Identifier">foo</span><span class="Other">(</span><span class="Identifier">enumValueA</span><span class="Other">,</span> <span class="Identifier">enumValueB</span><span class="Other">)</span>
|
||||
<span class="Keyword">for</span> <span class="Identifier">x</span> <span class="Keyword">in</span> <span class="StringLit">"xx"</span><span class="Other">:</span>
|
||||
<span class="Keyword">discard</span></pre></p>
|
||||
<div class="section" id="6">
|
||||
<h1><a class="toc-backref" href="#6">Imports</a></h1>
|
||||
<dl class="item">
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ runnableExamples:
|
|||
import subdir / subdir_b / utils
|
||||
doAssert bar(3, 4) == 7
|
||||
foo(enumValueA, enumValueB)
|
||||
# bug #11078
|
||||
for x in "xx": discard
|
||||
|
||||
|
||||
template foo*(a, b: SomeType) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue