You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Tests/SwiftParserTest/translated/RecoveryTests.swift
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -765,7 +765,7 @@ final class RecoveryTests: XCTestCase {
765
765
protocol Multi 1️⃣ident {}
766
766
""",
767
767
diagnostics:[
768
-
DiagnosticSpec(message:"found an unexpected second identifier in protocol")
768
+
DiagnosticSpec(message:"found an unexpected second identifier in protocol; is there an accidental break?")
769
769
]
770
770
)
771
771
}
@@ -776,7 +776,7 @@ final class RecoveryTests: XCTestCase {
776
776
class CCC 1️⃣CCC<T> {}
777
777
""",
778
778
diagnostics:[
779
-
DiagnosticSpec(message:"found an unexpected second identifier in class")
779
+
DiagnosticSpec(message:"found an unexpected second identifier in class; is there an accidental break?")
780
780
],
781
781
fixedSource:"""
782
782
class CCCCCC<T> {}
@@ -793,7 +793,7 @@ final class RecoveryTests: XCTestCase {
793
793
}
794
794
""",
795
795
diagnostics:[
796
-
DiagnosticSpec(locationMarker:"1️⃣", message:"found an unexpected second identifier in enum"),
796
+
DiagnosticSpec(locationMarker:"1️⃣", message:"found an unexpected second identifier in enum; is there an accidental break?"),
797
797
DiagnosticSpec(locationMarker:"2️⃣", message:"consecutive declarations on a line must be separated by ';'"),
798
798
DiagnosticSpec(locationMarker:"3️⃣", message:"unexpected code 'a' before enum case"),
799
799
]
@@ -812,11 +812,12 @@ final class RecoveryTests: XCTestCase {
812
812
}
813
813
"""#,
814
814
diagnostics:[
815
-
DiagnosticSpec(locationMarker:"1️⃣", message:"found an unexpected second identifier in struct"),
815
+
DiagnosticSpec(locationMarker:"1️⃣", message:"found an unexpected second identifier in struct; is there an accidental break?"),
816
816
DiagnosticSpec(locationMarker:"2️⃣", message:"expected ':' in type annotation"),
817
+
DiagnosticSpec(locationMarker:"2️⃣", message:"found an unexpected second identifier in variable; is there an accidental break?"),
817
818
DiagnosticSpec(locationMarker:"3️⃣", message:#"unexpected code ': Int = ""' before function"#),
818
-
// TODO: (good first issue) Old parser expected error on line 4: found an unexpected second identifier in variable declaration; is there an accidental break?
819
819
DiagnosticSpec(locationMarker:"4️⃣", message:"expected ':' in type annotation"),
820
+
DiagnosticSpec(locationMarker:"4️⃣", message:"found an unexpected second identifier in variable; is there an accidental break?"),
820
821
]
821
822
)
822
823
}
@@ -827,8 +828,8 @@ final class RecoveryTests: XCTestCase {
827
828
let (efg 1️⃣hij, foobar) = (5, 6)
828
829
""",
829
830
diagnostics:[
830
-
// TODO: (good first issue) Old parser expected error on line 1: found an unexpected second identifier in constant declaration; is there an accidental break?
831
-
DiagnosticSpec(message:"unexpected code 'hij, foobar' in tuple pattern")
831
+
DiagnosticSpec(message:"expected ',' in tuple pattern"),
832
+
DiagnosticSpec(message:"found an unexpected second identifier in variable; is there an accidental break?"),
0 commit comments