Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.4.19, 2.5.10, 3.0.2
-
None
-
None
Description
Variant of GROOVY-6429, GROOVY-8321, GROOVY-8412, GROOVY-8523 and GROOVY-8645.
Consider the following:
@groovy.transform.TypeChecked void test(x) { if (!(x instanceof Number)) { x.byteValue() // accidentally had this and got no compiler error; STC has Number for typeof(x) } else { // ... } }
Since the inferred type of "x" inside then block is Number, the IDE shows code assist for Number, which is misleading.
Attachments
Issue Links
- relates to
-
GROOVY-11290 STC: multiple instanceof checks produce different results
- Closed
- links to