Description
I have the following code:
import groovy.transform.CompileStatic @CompileStatic class Test { static private String str = "My String" static void test() { println myStr } static String getMyStr() { return "${str.replace(" ", "")}" } } Test.test()
However, running this code via Groovy 2.4.1 throws the following error:
Access to java.lang.Object#myStr is forbidden at line: -1, column: -1