--- /dev/null
+// CS0266: Cannot implicitly convert type `System.Collections.Generic.IList<int>' to `Hoge<System.Collections.Generic.IList<int>>'. An explicit conversion exists (are you missing a cast?)
+// Line: 20
+
+using System;
+using System.Collections.Generic;
+
+public class Hoge<T>
+{
+ public static implicit operator Hoge<T> (T value)
+ {
+ return null;
+ }
+}
+
+public class Test
+{
+ static void Main ()
+ {
+ IList<int> x = new List<int> ();
+ Hoge<IList<int>> hoge = x;
+ }
+}
target = TypeManager.uint64_type;
}
+ // Neither A nor B are interface-types
+ if (source.Type.IsInterface)
+ return;
+
// For a conversion operator to be applicable, it must be possible
// to perform a standard conversion from the source type to
// the operand type of the operator, and it must be possible
if (t == TypeManager.uint32_type && source.Type == TypeManager.uintptr_type)
continue;
+ if (t.IsInterface)
+ continue;
+
if (target != t && !ImplicitStandardConversionExists (new EmptyExpression (t), target)) {
if (implicitOnly)
continue;
--- /dev/null
+using System;
+
+internal interface IA
+{
+ void SomeMethod ();
+}
+
+public class C : IA
+{
+ public static void Main ()
+ {
+ new C ().TestCallOnly ();
+ }
+
+ // The body should contain call (not callvirt) only
+ void TestCallOnly ()
+ {
+ int i = 0;
+ var v = new int[0].GetType ();
+
+ new C ().SomeMethod ();
+ this.SomeMethod ();
+ typeof (C).GetType ();
+ new Action (SomeMethod).GetType ();
+ }
+
+ public void SomeMethod ()
+ {
+ }
+}
--- /dev/null
+// Compiler options: -warnaserror -warn:4
+
+// No CS0649 warnings
+
+using System;
+
+[Foo (Product = "Mono")]
+class Program
+{
+ static void Main ()
+ {
+ }
+}
+
+class FooAttribute : Attribute
+{
+ public string Product;
+
+ public FooAttribute ()
+ {
+ }
+}