internal error; cannot instantiate () at <anonymous <any>> to ()
<p>I'm getting the following error with some Java code I've written:</p>

<p><code>internal error; cannot instantiate () at &lt;anonymous &lt;any&gt;&gt; to ()</code></p>

<p>What I've done is created an interface similar to <code>java.lang.Comparable</code>, which is defined as follows:</p>

<pre><code>public interface Comparable&lt;T&gt;
{
    public int compareTo(T o);
}
</code></pre>

<p>My interface is:</p>

<pre><code>public interface CustomComparable&lt;T&gt;
{
    public int compare(T a, T b);
}
</code></pre>

<p>If I try to create an anonymous inner class using Comparable, it's fine...</p>

<pre><code>public void someThing()
{
    Comparable&lt;Object&gt; o = new Comparable&lt;Object&gt;()
    {
        public int compareTo(Object o)
        {
            // ...
        }
    };
}
</code></pre>

<p>With my interface I get the error outlined above. Why? Is <code>java.lang.Comparable</code> treated specially?</p>

<pre><code>public void someThing()
{
    CustomComparable&lt;Object&gt; o = new CustomComparable&lt;Object&gt;()
    {
        public int compare(Object a, Object b)
        {
            // ...
        }
    };
}
</code></pre>

<p>I'm using Java 1.6u21 and NetBeans 6.9.1.</p>
