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
2007-03-19 Chris Toshok <toshok@ximian.com>
[mono-project.git]
/
mcs
/
errors
/
cs1654.cs
blob
b9b316ea09a8d554844a2ebff3a70b596f34da24
1
// cs1654.cs: Cannot assign to members of `p' because it is a `foreach iteration variable'
2
// Line: 18
3
4
using
System
.
Collections
;
5
6
struct
P
{
7
public int
x
;
8
}
9
10
class
Test
{
11
static
IEnumerable
foo
()
{ return null; }
12
13
static void
Main
()
14
{
15
IEnumerable f
=
foo
();
16
if
(
f
!=
null
)
17
foreach
(
P p
in
f
)
18
p
.
x
=
0
;
19
}
20
}