Details
Description
Don't know whether calling super from a static method is supposed to compile. But it does in IDEA IC-122.519 EAP using Groovy 2.0.5 and runs into an endless loop.
@CompileStatic class A { public static foo() { print("A") } } @CompileStatic class B extends A { public static foo() { A.foo() // compiles and prints "AB" super.foo() // compiles and creates StackOverFlow print("B") } def static main(args) { B.foo() } }
Attachments
Issue Links
- depends upon
-
GROOVY-3645 Running invalid Groovy program produces IncompatibleClassChangeError
- Closed
At home with IntelliJ IDEA CE 122.694 EAP it does not compile. Not with Groovy 2.0.5 nor with 1.8.8. Sorry for any trouble caused if in the end it is caused by IDEA IC-122.519 EAP. The versions of IDEA 12 EAP can be downloaded from here: http://confluence.jetbrains.com/display/IDEADEV/IDEA+12+EAP