anonymous class can't have constructor (IDEA-91071)

This commit is contained in:
Anna Kozlova
2012-09-10 18:47:47 +04:00
parent f1476dd168
commit 64581b2d53
2 changed files with 10 additions and 2 deletions
@@ -99,6 +99,12 @@ public class a12 {
public <error descr="Invalid method declaration; return type required">foo</error>() {
}
{
new Object() {
<error descr="Invalid method declaration; return type required">Object</error>() {}
};
}
// do not warn about illegal type in incomplete declarations (http://www.intellij.net/tracker/idea/viewSCR?publicId=9586)
void foo<EOLError descr="';' expected"></EOLError>
}