Closed jpsim closed 9 years ago
This is a bug in SourceKit on Apple's side, unfortunately. See rdar://18845613.
We could add a workaround to sourcekitten by making cursorinfo
requests for offsets at case *
when an source.lang.swift.decl.enum
is detected. Only searching for case *
inside the enum body based on its bodyoffset
and bodylength
.
This is resolved as of Xcode 7 Beta 3 and ship with jazzy along with Swift 2.0 support.
Does it return them as functions now?
Sending a request to SourceKit for
source.request.editor.open
with the followingkey.sourcefile
contents:will return the following response:
Missing are the substructures for the global (
source.lang.swift.decl.var.global
) and enum element (source.lang.swift.decl.enumelement
).This makes it difficult to determine the structure of this file and sourcekitten does something pretty hacky to work around this issue.
This is rdar://18845613