New tests.
authorMarek Safar <marek.safar@gmail.com>
Tue, 8 Jan 2008 15:17:16 +0000 (15:17 -0000)
committerMarek Safar <marek.safar@gmail.com>
Tue, 8 Jan 2008 15:17:16 +0000 (15:17 -0000)
svn path=/trunk/mcs/; revision=92461

mcs/errors/cs0188-3.cs [new file with mode: 0644]
mcs/errors/cs0188-4.cs [new file with mode: 0644]
mcs/errors/cs0188.xml [deleted file]

diff --git a/mcs/errors/cs0188-3.cs b/mcs/errors/cs0188-3.cs
new file mode 100644 (file)
index 0000000..214a43f
--- /dev/null
@@ -0,0 +1,18 @@
+// CS0188: The `this' object cannot be used before all of its fields are assigned to
+// Line: 16
+
+struct Foo
+{
+       int bar;
+       int baz;
+
+       public int Bar {
+               get { return bar; }
+       }
+
+       public Foo (int baz)
+       {
+               this.baz = baz;
+               bar = Bar - 1;
+       }
+}
diff --git a/mcs/errors/cs0188-4.cs b/mcs/errors/cs0188-4.cs
new file mode 100644 (file)
index 0000000..93b0cfc
--- /dev/null
@@ -0,0 +1,18 @@
+// CS0188: The `this' object cannot be used before all of its fields are assigned to
+// Line: 16
+
+struct Foo
+{
+       int bar;
+       int baz;
+
+       public int this [int i] {
+               get { return bar; }
+       }
+
+       public Foo (int baz)
+       {
+               this.baz = baz;
+               bar = this [2] - 1;
+       }
+}
diff --git a/mcs/errors/cs0188.xml b/mcs/errors/cs0188.xml
deleted file mode 100644 (file)
index 01809bf..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
-
-<ErrorDetails>
-        <Summary>
-                <p>
-                       Before a constructor can call any instance
-                       methods it must initialize all of its fields. 
-                </p>
-        </Summary>
-        <Details>
-                <p>No instance member function can be called until all
-               fields of the struct being constructed have been
-               definitely assigned.
-                </p>
-
-               <p>See the ECMA 334 specification, section 18.3.8 for
-               details on the constructor differences between structs
-               and classes. 
-               </p>
-        </Details>
-</ErrorDetails>