We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 741b5c0 commit ceb77a2Copy full SHA for ceb77a2
Tests/SwiftParserTest/Declarations.swift
@@ -682,6 +682,19 @@ final class DeclarationTests: XCTestCase {
682
]
683
)
684
}
685
+
686
+ func testMalforedStruct() {
687
+ AssertParse(
688
+ """
689
+ struct n#^OPENINGBRACES^##if@#^ENDIF^##^CLOSINGBRACES^#
690
+ """,
691
+ diagnostics: [
692
+ DiagnosticSpec(locationMarker: "OPENINGBRACES", message: "Expected '{' to start struct"),
693
+ DiagnosticSpec(locationMarker: "ENDIF", message: "Expected '#endif' in conditional compilation block"),
694
+ DiagnosticSpec(locationMarker: "CLOSINGBRACES", message: "Expected '}' to end struct")
695
+ ]
696
+ )
697
+ }
698
699
700
extension Parser.DeclAttributes {
0 commit comments