summary refs log tree commit diff stats
path: root/doc/config/rifle.conf
Commit message (Collapse)AuthorAgeFilesLines
* added doc/config directory with symlinks to configshut2013-03-151-0/+1
'/ahoang/Nim/commit/tests/iter/tshallowcopy_closures.nim?h=devel&id=7739e23420c9a7a4ec7eccdddc0a39df9e905aa8'>7739e2342 ^
27141f601 ^
031bfdec6 ^



27141f601 ^

























031bfdec6 ^

27141f601 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
           
                     
                                                      



             

























                                  

                 
           
discard """
  matrix: "--mm:refc"
  ccodecheck: "!@('{' \\s* 'NI HEX3Astate;' \\s* '}')"
  output: '''
a1 10
a1 9
'''
"""

# bug #1803
type TaskFn = iterator (): float

iterator a1(): float {.closure.} =
    var k = 10
    while k > 0:
        echo "a1 ", k
        dec k
        yield 1.0


iterator a2(): float {.closure.} =
    var k = 15
    while k > 0:
        echo "a2 ", k
        dec k
        yield 2.0

var
  x = a1
  y = a2
  z: TaskFn

discard x()
shallowCopy(z, x)
shallowCopy(z, y)
discard x()