2004-09-14 Marek Safar <marek.safar@seznam.cz>
authorMarek Safar <marek.safar@gmail.com>
Tue, 14 Sep 2004 15:51:34 +0000 (15:51 -0000)
committerMarek Safar <marek.safar@gmail.com>
Tue, 14 Sep 2004 15:51:34 +0000 (15:51 -0000)
* test-294.cs: New test for bug #61902.

svn path=/trunk/mcs/; revision=33885

mcs/tests/ChangeLog
mcs/tests/Makefile
mcs/tests/test-294.cs [new file with mode: 0644]

index 5f336a8f2ee9bd186fe165107746201e7f09ef67..ad3b1196c81e041f7cca5e14ed90a97a96df97e4 100755 (executable)
@@ -1,3 +1,7 @@
+2004-09-14  Marek Safar <marek.safar@seznam.cz>
+
+       * test-294.cs: New test for bug #61902.
+
 2004-09-14  Martin Baulig  <martin@ximian.com>
 
        * Makefile: Put the old Makefile back.  There was a reason why we
index 7699a126aae9cbb410b3907ed9914a331247b335..f0434137aeeb09dbdf73d740f1bbb627c6c7d445 100644 (file)
@@ -45,7 +45,7 @@ TEST_SOURCES = \
        test-261 test-262 test-263 test-264 test-265 test-266 test-267 test-268 test-269 test-270 \
        test-271 test-272 test-273 test-274 test-275 test-276 test-277 test-278 test-279 test-280 \
        test-281 test-282 test-283 test-284 test-285 test-286 test-287 test-288 test-289 test-290 \
-       test-291 test-292 test-293 \
+       test-291 test-292 test-293 test-294 \
        cls-test-0 cls-test-1 cls-test-2 cls-test-3 cls-test-5 cls-test-6 cls-test-7 cls-test-10  \
        cls-test-11 cls-test-14 cls-test-15 cls-test-16 \
        mtest-1-dll mtest-1-exe
diff --git a/mcs/tests/test-294.cs b/mcs/tests/test-294.cs
new file mode 100644 (file)
index 0000000..3b32aed
--- /dev/null
@@ -0,0 +1,55 @@
+// Compiler options: -warnaserror -warn:4 -nowarn:169
+
+using System;
+
+[Obsolete]
+class ObsoleteClass
+{
+}
+
+public class Test
+{
+       private string _name;
+
+       [Obsolete()]
+       public Test() : this("layout", false)
+       {
+       }
+
+       [Obsolete()]
+       public Test(string a, bool writeToErrorStream)
+       {
+               Name = a;
+       }
+
+       [Obsolete()]
+       public string Name
+       {
+               get { return _name; }
+               set { _name = value; }
+       }
+}
+
+[Obsolete]
+public class DerivedTest : Test
+{
+        ObsoleteClass member;
+    
+        [Obsolete]
+       public DerivedTest(string a) : base(a, false)
+        {
+               Name = a;
+       }
+        
+        public string Method ()
+        {
+            return base.Name;
+        }
+        
+        public static void Main () {}
+}
+
+[Obsolete]
+class ObsoleteClass2: ObsoleteClass
+{
+}