a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
29 lines
394 B
C#
29 lines
394 B
C#
using System;
|
|
|
|
namespace MonoBug
|
|
{
|
|
class MainClass
|
|
{
|
|
public static void Main ()
|
|
{
|
|
GenericType<bool> g = new GenericType<bool> (true);
|
|
if (g)
|
|
Console.WriteLine ("true");
|
|
}
|
|
}
|
|
|
|
public class GenericType<T>
|
|
{
|
|
private T value;
|
|
|
|
public GenericType (T value)
|
|
{
|
|
this.value = value;
|
|
}
|
|
|
|
public static implicit operator T (GenericType<T> o)
|
|
{
|
|
return o.value;
|
|
}
|
|
}
|
|
} |