Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
maybeFile instanceof File ? maybeFile.canonicalPath : maybeFile.toString() sees maybeFile as type File in the true expression. However, !(maybeFile instanceof File) ? maybeFile.toString() : maybeFile.canonicalPath does not offer the same support for the else expression. The same applies if either were written long-form with if/else.
Attachments
Issue Links
- is duplicated by
-
GROOVY-9931 !instanceof inference does not work
- Closed
- relates to
-
GROOVY-6429 flow typing detects unexpected error at if-else flow
- Closed