diff options
author | Marek Safar <marek.safar@gmail.com> | 2014-01-16 02:03:30 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2014-01-16 02:03:52 +0400 |
commit | eca138a47fa852226ba66360f26b72e684bc1164 (patch) | |
tree | 3fd4f8961b472febe2660a346b870773a5431561 /mcs | |
parent | 6d7e812d709e182810d64c51a4e2d1af25d8adfa (diff) |
New test file
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/errors/cs1654-5.cs | 16 | ||||
-rw-r--r-- | mcs/errors/known-issues-net_4_5 | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/mcs/errors/cs1654-5.cs b/mcs/errors/cs1654-5.cs new file mode 100644 index 00000000000..fbabd02f1c8 --- /dev/null +++ b/mcs/errors/cs1654-5.cs @@ -0,0 +1,16 @@ +// CS1654: Cannot assign to members of `p' because it is a `foreach iteration variable' +// Line: 14 + +using System.Collections; + +struct P { + public int x { get; set; } +} + +class Test { + static void Foo (IEnumerable f) + { + foreach (P p in f) + p.x += 2; + } +} diff --git a/mcs/errors/known-issues-net_4_5 b/mcs/errors/known-issues-net_4_5 index a2f951235f7..a59413c220f 100644 --- a/mcs/errors/known-issues-net_4_5 +++ b/mcs/errors/known-issues-net_4_5 @@ -21,3 +21,4 @@ cs0457.cs cs1060.cs NO ERROR cs1060-2.cs NO ERROR cs1060-3.cs NO ERROR +cs1060-4.cs |