groovy
  1. groovy
  2. GROOVY-5222

Casts to subclasses should not be caught as errors by the type checker

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta-2
    • Fix Version/s: 2.0-beta-3
    • Component/s: Static Type Checker
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The following expression causes an incompatible type error at compile time, although it's valid:

      Object o = null
      try {
         ((Integer)o).intValue()
      } catch (NullPointerException e) {
      }
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            CÚdric Champeau
            Reporter:
            CÚdric Champeau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: