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

Objc class extensions don't support stored type properties, error message is confusing

    XMLWordPrintable

    Details

      Description

      I guess currently ObjC class extensions don't support stored type properties. But the error message is very confusing and without any location information:

      a declaration cannot be both 'final' and 'dynamic'

      import Foundation
      
      extension Int {
          // Swift extensions support stored type properties.
          static let a = 1
      }
      
      class Foo: NSObject {}
      
      extension Foo {
          static let a = 1
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                an0 Ling Wang
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: