mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ASTGen] Update for UnexpectedCodeDeclSyntax addition
This commit is contained in:
@@ -67,6 +67,9 @@ extension ASTGenVisitor {
|
||||
return self.generate(subscriptDecl: node).asDecl
|
||||
case .typeAliasDecl(let node):
|
||||
return self.generate(typeAliasDecl: node)?.asDecl
|
||||
case .unexpectedCodeDecl:
|
||||
// Ignore unexpected code.
|
||||
return nil
|
||||
case .variableDecl(let node):
|
||||
return self.generate(variableDecl: node)
|
||||
case .usingDecl(let node):
|
||||
|
||||
@@ -46,7 +46,7 @@ func testInvalidContent(baseExpr: MyStruct, otherExpr: Int) {
|
||||
|
||||
baseExpr // expected-warning {{expression of type 'MyStruct' is unused}}
|
||||
#if CONDITION_1
|
||||
+ otherExpr // expected-error {{unexpected code '+ otherExpr' in conditional compilation block}}
|
||||
+ otherExpr // expected-error {{unexpected code '+ otherExpr' in conditional compilation clause}}
|
||||
#endif
|
||||
|
||||
baseExpr
|
||||
|
||||
Reference in New Issue
Block a user