diff options
Diffstat (limited to 'mcs/errors/cs1503-15.cs')
-rw-r--r-- | mcs/errors/cs1503-15.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mcs/errors/cs1503-15.cs b/mcs/errors/cs1503-15.cs new file mode 100644 index 0000000000..4313fcf2c8 --- /dev/null +++ b/mcs/errors/cs1503-15.cs @@ -0,0 +1,20 @@ +// CS1503: Argument `#2' cannot convert `IFoo<object>' expression to type `IFoo<int>' +// Line: 18 + +interface IFoo<in T> +{ +} + +class C +{ + public static void Foo<T> (IFoo<T> e1, IFoo<T> e2) + { + } + + public static void Main () + { + IFoo<int> a = null; + IFoo<object> b = null; + Foo (a, b); + } +} |