-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Labels
call expressionsFeature → expressions: Call expressionsFeature → expressions: Call expressionsdeclarationsFeature: declarationsFeature: declarationsexpressionsFeature: expressionsFeature: expressionsgenericsFeature: generic declarations and typesFeature: generic declarations and typesindexingArea → source tooling: AST indexingArea → source tooling: AST indexinginitFeature → declarations: InitializersFeature → declarations: Initializerssource toolingArea: IDE support, SourceKit, and other source toolingArea: IDE support, SourceKit, and other source toolingswift 4.0type declarationsFeature → declarations: Type declarationsFeature → declarations: Type declarationsunexpected behaviorBug: Unexpected behavior or incorrect outputBug: Unexpected behavior or incorrect output
Description
Previous ID | SR-7093 |
Radar | rdar://problem/70955529 |
Original Reporter | Leitch (JIRA User) |
Type | Bug |
Environment
Using SourceKitten to perform the SourceKit request.
Xcode 9.2
Build version 9C40b
macOS 10.13.3
Additional Detail from JIRA
Votes | 2 |
Component/s | Source Tooling |
Labels | Bug |
Assignee | None |
Priority | Medium |
md5: f31c557a78a7016c21e6bf633e9bada7
Issue Description:
Given the following code:
class ClassA<T> {
init(someVar: Int = 0) {}
}
class ClassB {
private let classA: ClassA<String>
init() {
classA = ClassA<String>()
}
}
A source.request.indexsource
response does not include a source.lang.swift.ref.function.constructor
reference for ClassA<String>()
to the declaration init(someVar:)
. The constructor has the USR s:4test6ClassACACyxGSi7someVar_tcfc
and it is not referenced anywhere in the index.
This issue appears to only affect classes with generic types. If I remove the generic type from ClassA
, the ClassB
constructor declaration will contain a reference to init(someVar:)
.
Full index response is here: https://gist.github.com/ileitch/2b6b08ab247d712da752c5c24b5fca85
Metadata
Metadata
Assignees
Labels
call expressionsFeature → expressions: Call expressionsFeature → expressions: Call expressionsdeclarationsFeature: declarationsFeature: declarationsexpressionsFeature: expressionsFeature: expressionsgenericsFeature: generic declarations and typesFeature: generic declarations and typesindexingArea → source tooling: AST indexingArea → source tooling: AST indexinginitFeature → declarations: InitializersFeature → declarations: Initializerssource toolingArea: IDE support, SourceKit, and other source toolingArea: IDE support, SourceKit, and other source toolingswift 4.0type declarationsFeature → declarations: Type declarationsFeature → declarations: Type declarationsunexpected behaviorBug: Unexpected behavior or incorrect outputBug: Unexpected behavior or incorrect output