a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
32 lines
321 B
C#
32 lines
321 B
C#
using System;
|
|
|
|
struct S
|
|
{
|
|
public static implicit operator string (S s)
|
|
{
|
|
return "s";
|
|
}
|
|
}
|
|
|
|
interface I<in T>
|
|
{
|
|
}
|
|
|
|
class C : I<string>
|
|
{
|
|
static T Foo<T> (T a, I<T> b)
|
|
{
|
|
return a;
|
|
}
|
|
|
|
public static int Main ()
|
|
{
|
|
S s = new S ();
|
|
I<string> i = new C ();
|
|
if (Foo (s, i) != "s")
|
|
return 1;
|
|
|
|
return 0;
|
|
}
|
|
}
|