warn when accessing static method of interfaces in language levels prior to 1.8 (IDEA-134814)

This commit is contained in:
Anna Kozlova
2014-12-29 18:57:41 +01:00
parent b57746c55e
commit e9beee7c66
4 changed files with 39 additions and 9 deletions
@@ -0,0 +1,14 @@
class Test {
interface I {
<error descr="Extension methods are not supported at this language level">static void foo() {}</error>
}
abstract class IImpl implements I {}
interface I2 extends I {}
{
<error descr="Static interface method invocations are not supported at this language level">I.foo();</error>
<error descr="Static interface method invocations are not supported at this language level">IImpl.foo();</error>
<error descr="Static interface method invocations are not supported at this language level">I2.foo();</error>
}
}