Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0-beta-2
-
None
-
None
Description
Imagine the following code:
Double foo(Integer x) { x+1 } Integer foo(Double x) { x+1 } def x = 0 for (int i=0;i<10;i++) { // there are two possible target methods. This is not a problem for STC, but it is for static compilation x = foo(x) }
The type checker should not allow this to compile. There are more cases (even more complex) like this in the patch (groovy.transform.stc.LoopsSTCTest).