* test-294.cs: Added new tests.
* test-457.cs: New test.
svn path=/trunk/mcs/; revision=50791
+2005-09-26 Marek Safar <marek.safar@seznam.cz>
+
+ * test-294.cs: Added new tests.
+ * test-457.cs: New test.
+
2005-09-26 Raja R Harinath <rharinath@novell.com>
* test-456.cs: New test from #76133.
test-anon-27.cs
test-xml-027.cs
test-iter-12.cs
+test-294.cs
\ No newline at end of file
ObsoleteClass member;
[Obsolete]
- public DerivedTest(string a) : base(a, false)
+ public DerivedTest(string a) : base(a, false)
{
- Name = a;
- }
+ Name = a;
+ }
public string Method ()
{
return base.Name;
}
+
+ [Obsolete]
+ public void T2 () {}
public static void Main () {}
}
{
}
+
class ObsoleteClass3
{
- public static readonly double XSmall = 0.6444444444444;
+ public static readonly double XSmall = 0.6444444444444;
[Obsolete ("E1")]
public readonly double X_Small = XSmall;
[Obsolete ("E2")]
public static readonly double X_Small2 = XSmall;
+}
+
+
+class ObsoleteClass4
+{
+ [Obsolete]
+ public void T ()
+ {
+ lock (typeof (ObsoleteClass4)) {}
+ lock (typeof (ObsoleteClass2)) {}
+ }
}
\ No newline at end of file
--- /dev/null
+// (note, this is taken from `13.2.5 Interface member access')
+interface IInteger {
+ void Add(int i);
+}
+
+interface IDouble {
+ void Add(double d);
+}
+
+interface INumber: IInteger, IDouble {}
+
+class Number : INumber {
+ void IDouble.Add (double d)
+ {
+ System.Console.WriteLine ("IDouble.Add (double d)");
+ }
+ void IInteger.Add (int d)
+ {
+ System.Console.WriteLine ("IInteger.Add (int d)");
+ }
+
+ static int Main ()
+ {
+ INumber n = new Number ();
+ n.Add(1);
+ n.Add(1.0);
+ ((IInteger)n).Add(1);
+ ((IDouble)n).Add(1);
+ return 0;
+ }
+}