[SR-7093] Index does not include reference to constructor of class/struct with generic types #49641
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
call expressions
Feature → expressions: Call expressions
declarations
Feature: declarations
duplicate
Resolution: Duplicates another issue
expressions
Feature: expressions
generics
Feature: generic declarations and types
indexing
Area → source tooling: AST indexing
init
Feature → declarations: Initializers
source tooling
Area: IDE support, SourceKit, and other source tooling
swift 4.0
type declarations
Feature → declarations: Type declarations
unexpected behavior
Bug: Unexpected behavior or incorrect output
Environment
Using SourceKitten to perform the SourceKit request.
Xcode 9.2
Build version 9C40b
macOS 10.13.3
Additional Detail from JIRA
md5: f31c557a78a7016c21e6bf633e9bada7
Issue Description:
Given the following code:
A
source.request.indexsource
response does not include asource.lang.swift.ref.function.constructor
reference forClassA<String>()
to the declarationinit(someVar:)
. The constructor has the USRs: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
, theClassB
constructor declaration will contain a reference toinit(someVar:)
.Full index response is here: https://gist.github.com/ileitch/2b6b08ab247d712da752c5c24b5fca85
/cc @nkcsgexi @benlangmuir
The text was updated successfully, but these errors were encountered: