-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.castingFeature: explicit casting (is, as, as? and as!)Feature: explicit casting (is, as, as? and as!)duplicateResolution: Duplicates another issueResolution: Duplicates another issueexpressionsFeature: expressionsFeature: expressionsindexingArea → source tooling: AST indexingArea → source tooling: AST indexingsource toolingArea: IDE support, SourceKit, and other source toolingArea: IDE support, SourceKit, and other source toolingswift 5.1typesFeature: typesFeature: typesunexpected behaviorBug: Unexpected behavior or incorrect outputBug: Unexpected behavior or incorrect output
Description
Previous ID | SR-12047 |
Radar | rdar://problem/58861172 |
Original Reporter | @keith |
Type | Improvement |
Status | Resolved |
Resolution | Duplicate |
Attachment: Download
Additional Detail from JIRA
Votes | 0 |
Component/s | |
Labels | Improvement |
Assignee | None |
Priority | Medium |
md5: 93b6b6b2876fec49f1e8d168960dfc21
duplicates:
relates to:
Issue Description:
With this code in a single macOS CLI project:
protocol Bar {}
/// Some docstring that should appear over all references
struct Foo: Bar {
init() {}
}
print(Foo())
let bar: Bar? = nil
print(bar is Foo)
print(bar as! Foo)
When you option click on Foo()
, you correctly see the docstring, when you option click on is Foo
you do not, but the as! Foo
works again. This also means you do not see the is Foo
use when you look up callers in Xcode.
Looking in the index data it seems that there is no symbol occurrence for Foo
in the is Foo
case.
Attached is a sample project and screenshot examples of how it manifests in Xcode 11.3.1.
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.castingFeature: explicit casting (is, as, as? and as!)Feature: explicit casting (is, as, as? and as!)duplicateResolution: Duplicates another issueResolution: Duplicates another issueexpressionsFeature: expressionsFeature: expressionsindexingArea → source tooling: AST indexingArea → source tooling: AST indexingsource toolingArea: IDE support, SourceKit, and other source toolingArea: IDE support, SourceKit, and other source toolingswift 5.1typesFeature: typesFeature: typesunexpected behaviorBug: Unexpected behavior or incorrect outputBug: Unexpected behavior or incorrect output