summary refs log tree commit diff stats
path: root/tests/reject/twrongiter.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-12-03 01:59:38 +0100
committerAraq <rumpf_a@web.de>2013-12-03 01:59:38 +0100
commitfe983b13099dd8d8a93ebefc00174e98eb048dea (patch)
tree2d437512f120011dd4be4215bcc9e37d7aa29ac6 /tests/reject/twrongiter.nim
parent5dcfa97fb959eda3cb8a41e2bd39e998c30052c8 (diff)
downloadNim-fe983b13099dd8d8a93ebefc00174e98eb048dea.tar.gz
fixes a regression where memset was used without including <string.h>
Diffstat (limited to 'tests/reject/twrongiter.nim')
-rw-r--r--tests/reject/twrongiter.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/reject/twrongiter.nim b/tests/reject/twrongiter.nim
new file mode 100644
index 000000000..2d2502a6a
--- /dev/null
+++ b/tests/reject/twrongiter.nim
@@ -0,0 +1,13 @@
+discard """
+line: 14
+errormsg: "type mismatch"
+"""
+
+proc first(it: iterator(): int): seq[int] =
+  return @[]
+
+iterator primes(): int =
+  yield 1
+
+for i in first(primes):
+  break
:33:25 +0200 changed integer promotion rules; added math.fmod' href='/ahoang/Nim/commit/compiler/magicsys.nim?h=devel&id=2900ceae3580a9f1e83b500cf1abcdfe77762cad'>2900ceae3 ^
e25474154 ^


7014d0c5c ^

e25474154 ^








92b8fac94 ^
8090b6c02 ^



e25474154 ^

23ef565a3 ^


92b8fac94 ^
23ef565a3 ^


92b8fac94 ^
23ef565a3 ^



ce454fb83 ^
e25474154 ^










e2d38a57e ^




e25474154 ^

4d9b2f671 ^
e2d38a57e ^
e25474154 ^


438703f59 ^
e25474154 ^

92b8fac94 ^
e25474154 ^

92b8fac94 ^

2900ceae3 ^
4fbba0a65 ^

2900ceae3 ^
c67520a7c ^








4fbba0a65 ^





2900ceae3 ^


4fbba0a65 ^





7056ceda6 ^




121d4e0fc ^
7056ceda6 ^



121d4e0fc ^
2df9b442c ^
121d4e0fc ^
23ef565a3 ^


121d4e0fc ^
4fbba0a65 ^

b731e6ef1 ^
4fbba0a65 ^






















2df9b442c ^
2900ceae3 ^
e25474154 ^
922e216b8 ^
2df9b442c ^
e25474154 ^
92b8fac94 ^
e25474154 ^






2df9b442c ^
e25474154 ^
2df9b442c ^
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179