Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.21, 5.0.0-alpha-8, 4.0.21
-
None
Description
Consider the following:
@groovy.transform.TypeChecked void test() { def map = new HashMap() def xxx = map.table def yyy = map.with{ def z = table } print xxx print yyy } test()
The script should output "nullnull" – which it does without STC – and the inferred types of "xxx", "yyy" and "z" should be String. However, the script throws IllegalAccessError for the "z" line and the inferred type of the variables is "Node<String,String>[]".