Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2004-11-29 10:38:17 +0300
committerMarek Safar <marek.safar@gmail.com>2004-11-29 10:38:17 +0300
commit528739066e58d55ea7b2fab12c1e594fcd58bd5c (patch)
tree09b52fbb05d37a428e6f28f45ec29775ecd064e2 /mcs/errors/cs1650.cs
parent24a77e294b1c3e988f571b4f8b631a549aec35eb (diff)
new tests
svn path=/trunk/mcs/; revision=36761
Diffstat (limited to 'mcs/errors/cs1650.cs')
-rw-r--r--mcs/errors/cs1650.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/mcs/errors/cs1650.cs b/mcs/errors/cs1650.cs
new file mode 100644
index 00000000000..5755741683a
--- /dev/null
+++ b/mcs/errors/cs1650.cs
@@ -0,0 +1,17 @@
+// cs1650.cs: Fields of static readonly field 'C.s' cannot be assigned to (except in a static constructor or a variable initializer)
+// Line: 14
+
+using System;
+
+struct S {
+ public int x;
+}
+
+class C {
+ static readonly S s;
+
+ public static void Main(String[] args) {
+ s.x = 42;
+ Console.WriteLine(s.x);
+ }
+}