repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* MSBuild.cs (Execute): Don't share target output items,
[mcs.git]
/
errors
/
cs1654-2.cs
blob
1305053eb43d561c0637aa7c144544f50f664a33
1
// cs1654-2.cs: Cannot assign to members of `q' because it is a `foreach iteration variable'
2
// Line: 22
3
4
using
System
.
Collections
;
5
6
struct
P
{
7
public int
x
;
8
}
9
10
struct
Q
{
11
public
P p
;
12
}
13
14
class
Test
{
15
static
IEnumerable
foo
()
{ return null; }
16
17
static void
Main
()
18
{
19
IEnumerable f
=
foo
();
20
if
(
f
!=
null
)
21
foreach
(
Q q
in
f
)
22
q
.
p
.
x
=
0
;
23
}
24
}