Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Consider the following:
@groovy.transform.TypeChecked void test(o) { o instanceof Map || o instanceof List ? o.entrySet() : null }
"entrySet" is available from Map but not from List, so the expectation is a STC error to guard against the MissingMethodException for STC or ClassCastException for SC when a list is given.
Attachments
Attachments
Issue Links
- is related to
-
GROOVY-8965 instanceof with || inserts wrong cast
-
- Closed
-