@@ -176,7 +176,7 @@ import SwiftSyntax
176
176
/// All names introduced by the closure signature.
177
177
/// Could be closure captures or (shorthand) parameters.
178
178
///
179
- /// Example:
179
+ /// ### Example
180
180
/// ```swift
181
181
/// let x = { [weak self, a] b, _ in
182
182
/// // <--
@@ -222,7 +222,7 @@ import SwiftSyntax
222
222
223
223
/// Finds parent scope, omitting ancestor `if` statements if part of their `else if` clause.
224
224
///
225
- /// Example:
225
+ /// ### Example
226
226
/// ```swift
227
227
/// func foo() {
228
228
/// if let a = x {
@@ -262,7 +262,7 @@ import SwiftSyntax
262
262
/// Lookup triggered from inside of `else`
263
263
/// clause is immediately forwarded to parent scope.
264
264
///
265
- /// Example:
265
+ /// ### Example
266
266
/// ```swift
267
267
/// if let a = x {
268
268
/// // <-- a is visible here
@@ -326,7 +326,7 @@ import SwiftSyntax
326
326
/// Lookup triggered from within of the `else` body
327
327
/// returns no names.
328
328
///
329
- /// Example:
329
+ /// ### Example
330
330
/// ```swift
331
331
/// guard let a = x else {
332
332
/// return // a is not visible here
@@ -399,7 +399,7 @@ import SwiftSyntax
399
399
/// all associated type declarations made inside the
400
400
/// protocol member block.
401
401
///
402
- /// example:
402
+ /// ### Example
403
403
/// ```swift
404
404
/// class A {}
405
405
///
@@ -436,7 +436,7 @@ import SwiftSyntax
436
436
@_spi ( Experimental) extension GenericParameterClauseSyntax : GenericParameterScopeSyntax {
437
437
/// Generic parameter names introduced by this clause.
438
438
@_spi ( Experimental) public var introducedNames : [ LookupName ] {
439
- parameters. children ( viewMode: . sourceAccurate ) . flatMap { child in
439
+ parameters. children ( viewMode: . fixedUp ) . flatMap { child in
440
440
LookupName . getNames ( from: child, accessibleAfter: child. endPosition)
441
441
}
442
442
}
@@ -450,3 +450,19 @@ import SwiftSyntax
450
450
}
451
451
}
452
452
}
453
+
454
+ @_spi ( Experimental) extension SubscriptDeclSyntax : WithGenericParametersScopeSyntax {
455
+ /// Parameters introduced by this subscript.
456
+ @_spi ( Experimental) public var introducedNames : [ LookupName ] {
457
+ parameterClause. parameters. flatMap { parameter in
458
+ LookupName . getNames ( from: parameter)
459
+ }
460
+ }
461
+ }
462
+
463
+ @_spi ( Experimental) extension TypeAliasDeclSyntax : WithGenericParametersScopeSyntax {
464
+ /// Type alias doesn't introduce any names to it's children.
465
+ @_spi ( Experimental) public var introducedNames : [ LookupName ] {
466
+ [ ]
467
+ }
468
+ }
0 commit comments