Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
4.0.0-alpha-3, 3.0.10, 2.5.17, 3.0.12
-
None
Description
Similar to GROOVY-10179, STC is not inferring the type of map entry through instanceof. Consider the following:
@groovy.transform.TypeChecked void test(args) { if (args instanceof Map) { args.each { e -> println "$e.key $e.value" } } } test(a:1,b:2,c:3.14)
Attachments
Issue Links
- causes
-
GROOVY-10668 Reference to method is ambiguous if block in "if" with "instanceof"
- Closed