a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
23 lines
234 B
C#
23 lines
234 B
C#
class A
|
|
{
|
|
public static implicit operator int (A a)
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
public static implicit operator bool (A a)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
class C
|
|
{
|
|
public static void Main ()
|
|
{
|
|
switch (new A ())
|
|
{
|
|
default: break;
|
|
}
|
|
}
|
|
} |