[Mono-dev] compiler bug
Jerry Haltom
wasabi at larvalstage.net
Tue May 1 22:12:00 EDT 2007
I have been assured the following code compiles correctly on MS.Net.
However, I don't have a box at the time to verify it. It doesn't compile
on Mono 1.2.3... and it appears it should. I will post a more formal bug
report shortly.
using System;
namespace MonoBug {
class MainClass {
public static void Main(string[] args) {
Console.WriteLine("Hello World!");
GenericType<bool> g = new GenericType<bool>(true);
if (g)
Console.WriteLine("true");
if (g == true)
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;
}
}
}
More information about the Mono-devel-list
mailing list