cleol
[mcs.git] / tests / test-342.cs
blobb40598cff4907ef70a80a028ca180b6d6d70072e
1 using System;
3 class A {
4 public virtual void Foo (int i) { }
6 public virtual void Foo (double d) {
7 throw new Exception ("Shouldn't be invoked");
10 public virtual bool this [int i] {
11 get { return true; }
14 public virtual bool this [double d] {
15 get { throw new Exception ("Shouldn't be invoked"); }
20 class B : A {
21 public override void Foo (double d) {
22 throw new Exception ("Overload resolution failed");
25 public override bool this [double d] {
26 get { throw new Exception ("Overload resolution failed"); }
29 public static void Main () {
30 new B ().Foo (1);
31 bool b = new B () [1];