Consider the following:
@groovy.transform.CompileStatic
class One7300 {
private String string = 'value'
String getString() { return string }
void setString(String value) { string = value }
}
@groovy.transform.CompileStatic
class Two7300 extends One7300 {
@Override
String getString() {
super.string = 'whatever'
return super.string
}
}
println new Two7300().string
Fix for #935 had reintroduced stack overflow of GROOVY-7300 during runtime. See org.codehaus.groovy.classgen.asm.sc.StaticPropertyAccessHelper.PoppingMethodCallExpression#PoppingMethodCallExpression(Expression, MethodNode, TemporaryVariableExpression).
Exception in thread "main" java.lang.StackOverflowError
at java.lang.ReflectiveOperationException.<init>(ReflectiveOperationException.java:89)
at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:72)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:123)
at groovy.lang.MetaBeanProperty.getProperty(MetaBeanProperty.java:59)
at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1317)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1269)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:144)
at bugs.Two7300.getString(Groovy7300.groovy:15)
...
at bugs.Two7300.getString(Groovy7300.groovy:15)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:123)
at groovy.lang.MetaBeanProperty.getProperty(MetaBeanProperty.java:59)
at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1317)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1269)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:144)
at bugs.Two7300.getString(Groovy7300.groovy:15)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:123)
at groovy.lang.MetaBeanProperty.getProperty(MetaBeanProperty.java:59)
Consider the following:
Fix for #935 had reintroduced stack overflow of GROOVY-7300 during runtime. See
org.codehaus.groovy.classgen.asm.sc.StaticPropertyAccessHelper.PoppingMethodCallExpression#PoppingMethodCallExpression(Expression, MethodNode, TemporaryVariableExpression).