Posts tagged crash
Posts tagged crash
When I compile the following code with Mono 2.6.7, the compiler crashes.
class V<T>
{
T[] d;
T this [int i]
{
get { return d[0]; }
}
}
class C
{
void M()
{
V<int> m;
var x = m[0];
}
}
It is a short piece of code (101 non-whitespace characters) that still can illustrate the problem.
But is it minimal (ignoring whitespace)? A little bit of playing around gave me this:
class V<T>
{
T[] d;
T this [int i]
{
get { return d[0]; }
}
}
class C
{
void M()
{
V<int> m;
x = m[0];
}
}
Just 98 characters! Can you come up with something smaller that triggers this bug? Something smaller that triggers another bug?