swift
3872551e - [ObjC Interop] Map Swift @objc properties named isFoo to ObjC Cocoa conventions

Commit
9 years ago
[ObjC Interop] Map Swift @objc properties named isFoo to ObjC Cocoa conventions The Objective-C Cocoa convention eschew "is" on property names, but use it on the getter, while the Swift API guidelines state that Boolean properties should read as assertions (e.g., "isEmpty" rather than "empty"). Map Swift properties named "isFoo" to Objective-C by removing the "is" from the resulting Objective-C property name (so it will be named "foo") and from the setter (which will have the Objective-C selector "setFoo:") while retaining the "is" for the getter selector ("isFoo"). Fixes rdar://problem/17090661.
Author
Committer
Parents
  • include/swift/AST
    • File
      Decl.h
  • lib
    • AST
      • File
        Decl.cpp
    • PrintAsObjC
      • File
        PrintAsObjC.cpp
  • test/PrintAsObjC
    • File
      classes.swift