diff options
author | Marek Safar <marek.safar@gmail.com> | 2005-04-20 11:20:29 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2005-04-20 11:20:29 +0400 |
commit | 3cefc2f6734f2af258f5ab372a2e8ca6ca9a4bb5 (patch) | |
tree | 1b47a3e1f0b2ba89d4a6e04aedef3b1ad0bd79ab /mcs/errors/cs1651.cs | |
parent | 0b42aa8d42dbad552e61915454a12464266bcf5f (diff) |
new tests + update
svn path=/trunk/mcs/; revision=43315
Diffstat (limited to 'mcs/errors/cs1651.cs')
-rw-r--r-- | mcs/errors/cs1651.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mcs/errors/cs1651.cs b/mcs/errors/cs1651.cs new file mode 100644 index 00000000000..a3d52e575fa --- /dev/null +++ b/mcs/errors/cs1651.cs @@ -0,0 +1,25 @@ +// cs1651.cs: Members of readonly static field 'B.a' cannot be passed ref or out (except in a constructor) +// Line: 23 + +class B +{ + public struct A + { + public int val; + } + + public static readonly A a = new A (); +} + +class C +{ + static void f (ref int i) + { + i = 44; + } + + static void Main () + { + f (ref B.a.val); + } +} |