* ResolvedReference.cs (.ctor): Set 'OriginalItemSpec' and 'ResolvedFrom',
[mcs.git] / tests / test-17.cs
blobc6e2a95745c0bda3c2dc913ab5456cec05ba5203
1 //
2 // This test excercises user defined conversions and an implicit
3 // conversion to a type afterwards.
4 //
5 //
6 using System;
8 class Blah {
10 public static int Main ()
12 Blah k = new Blah ();
14 float f = k;
16 if (f == 2){
17 Console.WriteLine ("Best implicit operator selected correctly");
18 return 0;
20 return 1;
24 public static implicit operator byte (Blah i)
26 Console.WriteLine ("Blah->byte");
27 return 0;
31 public static implicit operator short (Blah i)
33 Console.WriteLine ("Blah->short");
34 return 1;
37 public static implicit operator int (Blah i)
39 Console.WriteLine ("Blah->int");
40 return 2;