repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[mcs] Reset also all partial parts current-type
[mono-project.git]
/
mcs
/
errors
/
cs1654-2.cs
blob
bb0c242a8db426cfcf0f249ae6e0937974292557
1
// CS1654: 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
}