Skip to content

Commit 8935517

Browse files
committed
ASTGen: fix a compiler warning
Fixes ``` .../swift/lib/ASTGen/Sources/ASTGen/Types.swift:359:29: warning: 'specifier' is deprecated: Access the specifiers list instead if let specifier = node.specifier { ^ ```
1 parent 9c44b79 commit 8935517

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/ASTGen/Sources/ASTGen/Types.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ extension ASTGenVisitor {
356356
var type = generate(type: node.baseType)
357357

358358
// Handle specifiers.
359-
if let specifier = node.specifier {
359+
if case .simpleTypeSpecifier(let simpleSpecifier) = node.specifiers.first {
360+
let specifier = simpleSpecifier.specifier
360361
if let kind = BridgedAttributedTypeSpecifier(from: specifier.keywordKind) {
361362
type =
362363
BridgedSpecifierTypeRepr.createParsed(

0 commit comments

Comments
 (0)