IDEA-67556 (use highest language level in an artificial elements was a bad idea)

This commit is contained in:
Roman Shevchenko
2011-04-05 20:59:18 +02:00
parent 0c4b85124b
commit cce2c02db1
9 changed files with 63 additions and 23 deletions
@@ -0,0 +1,9 @@
import pkg.Bar;
import pkg.enum.Foo;
class Test {
void m() {
Bar b = new Bar();
b.doSomething(Foo.FOO); // with language level JDK 1.4 'enum' shouldn't be a keyword (see IDEA-67556)
}
}
@@ -0,0 +1,9 @@
package pkg;
import pkg.enum.Foo;
public class Bar {
public void doSomething(Foo foo) {
System.out.println("foo=" + foo);
}
}
@@ -0,0 +1,5 @@
package pkg.enum;
public class Foo {
public static Foo FOO = new Foo();
}