Uploaded image for project: 'Swift'
  1. Swift
  2. SR-7015

The CoreFoundation conditional downcast diagnostic is not as helpful as it should be

    XMLWordPrintable

    Details

      Description

      When the `as?` operator is used to target a CoreFoundation type the compiler produces a diagnostic which says "Conditional downcast to CoreFoundation type ... will always succeed". This does not offer any suggestions about what to do instead.

      The diagnostic should be updated with a message that informs the developer to compare CFTypeIds (with a fixit if possible).

        Attachments

          Activity

            People

            Assignee:
            orakaro Vu Nhat Minh
            Reporter:
            Anandabits Matthew Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: