-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
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.compilerThe Swift compiler itselfThe Swift compiler itselfindexingArea → source tooling: AST indexingArea → source tooling: AST indexing
Description
Description
In main
, an extension on Array
using the literal syntax of [String]
does not provide the implicit relation to Array
.
Reproduction
extension [String] {}
// 1:12 | struct/Swift | String | s:SS | Ref | rel: 0
extension Array where Element == String {}
// 1:11 | struct/Swift | Array | s:Sa | Ref | rel: 0
// 1:23 | type-alias/generic-type-param/Swift | Element | s:Sa7Elementxmfp | Ref | rel: 0
// 1:34 | struct/Swift | String | s:SS | Ref | rel: 0
Expected behavior
The swift-ide-test
output for both extensions should be the same.
Environment
This is a bug in main
. Swift 6.2 is not affected.
Additional information
No response
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.compilerThe Swift compiler itselfThe Swift compiler itselfindexingArea → source tooling: AST indexingArea → source tooling: AST indexing