IDEA-57270 (highlight C-style void arrays)

This commit is contained in:
Roman Shevchenko
2013-05-02 18:40:04 +02:00
parent b8e9666b1b
commit e1703251d9
3 changed files with 45 additions and 49 deletions
@@ -1,18 +1,18 @@
class s {
void f() {
// illegal type
class C {
<error descr="Illegal type: 'void'">void</error>[] m1() { }
<error descr="Illegal type: 'void'">void</error> m2()[] { }
void m3(<error descr="Illegal type: 'void'">void</error> p) {}
{
<error descr="Illegal type: 'void'">void</error>[] va;
<error descr="Illegal type: 'void'">void</error> vv;
class loc {
void f(<error descr="Illegal type: 'void'">void</error> i) {}
}
Object o = new <error descr="Illegal type: 'void'">void</error>[1];
Object oo = new <error descr="Illegal type: 'void'">void</error>[1];
// this is the only valid void usage
Class voidClass = void.class;
}
{
void f() {
<error descr="Incompatible types. Found: 'void', required: 'java.lang.Object'">Object o = f();</error>
}
}