Xcode 10.2 beta 2 (10P91b) SourceKit: editor.open syntax tree output does not include objc attribute.

Originator:port001
Number:rdar://48140265 Date Originated:
Status: Resolved:
Product:Developer Tools Product Version:
Classification: Reproducible:
 
Summary:

The `source.request.editor.open` request with `key.enablesyntaxtree = 1` response returned by SourceKit in Xcode 10.2 beta2 (10P91b) does not include the `source.decl.attribute.objc` attribute for declarations that are members of a declaration annotated with `@objcMembers`.

Steps to Reproduce:

Given the following code:

```
import Foundation

@objcMembers class FixtureClass25: NSObject {
    var someVar: String?
    func someMethod() {}
}
```

The `someVar` and `someMethod()` declarations do not include a `source.decl.attribute.objc` attribute.

Despite not explicitly being marked as `@objc`, they should still have the attribute due to the use of `@objcMembers`, as was the behavior in Xcode 10.1.

Output for 10.2 beta 2 (10P91b): https://gist.github.com/ileitch/a9af5dd21852446084ce0877616d97cc
Output for 10.1 (10B61): https://gist.github.com/ileitch/67f6a176dc71df24ece484594bbea21c


Expected Results:

The entity output for the declarations includes:

```
"key.attributes" : [
  {
    "key.attribute" : "source.decl.attribute.objc"
  }
]
```

Actual Results:

The output does not include the attribute.

Version/Build:

Xcode 10.2 beta 2 (10P91b)

Configuration:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!