Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.1
-
None
Description
import groovy.transform.* @TypeChecked class Bug1 { void m(byte[] bytes) {} void m(byte[] bytes, int i1, int i2) {} void test() { m("foo".bytes, 1, 2) } } new Bug1().test()
In the example above, STC believes the call is ambiguous, although it doesn't really appear to be. This yields the following compilation error:
[Static type checking] - Reference to method is ambiguous. Cannot choose between [MethodNode@18204363[void m([B, int, int)], MethodNode@864642116[void m([B)]] at line: 8, column: 9