forbid type annotations on anonymous class creation with interface base class (IDEA-67598)

This commit is contained in:
anna
2012-10-23 18:07:07 +02:00
parent 0dfb29db51
commit c8f56fcb28
3 changed files with 19 additions and 0 deletions
@@ -0,0 +1,12 @@
class C
{
Object x = new <error descr="Anonymous class implements interface; cannot have type arguments"><Integer></error> D() { };
Object x1 = new <Integer> P() { };
Object x2 = new <Integer> U() { };
Object x3 = new <error descr="Anonymous class implements interface; cannot have type arguments"><Integer></error> I() { };
interface D{}
abstract class P {}
}
interface I {}
class U {}