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

Runtime should be strict about ClassMetadata vs. AnyClassMetadata

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:

      Description

      The runtime technically has a distinction between ClassMetadata, which models the metadata of a pure Swift class, and AnyClassMetadata, which might be a Swift class or an Objective-C class. However, we use ClassMetadata in a lot of places where we really mean AnyClassMetadata. We're pretty good about checking for isTypeMetadata() before using any other members, but Clang is totally within its rights to hoist loads past those checks.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jrose Jordan Rose
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: