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
+20-14Lines changed: 20 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1122,23 +1122,29 @@ final class RecoveryTests: XCTestCase {
1122
1122
assertParse(
1123
1123
"""
1124
1124
struct ErrorTypeInVarDeclDictionaryType {
1125
-
let a1: String1️⃣:
1126
-
let a2: String2️⃣: Int]
1127
-
let a3: String3️⃣: [Int]
1128
-
let a4: String4️⃣: Int
1125
+
let a1: 1️⃣String:2️⃣
1126
+
let a2: 3️⃣String: Int]
1127
+
let a3: 4️⃣String: [Int]5️⃣
1128
+
let a4: 6️⃣String: Int7️⃣
1129
1129
}
1130
1130
""",
1131
1131
diagnostics:[
1132
-
// TODO: Old parser expected error on line 2: unexpected ':' in type; did you mean to write a dictionary type?, Fix-It replacements: 11 - 11 = '['
1133
-
DiagnosticSpec(locationMarker:"1️⃣", message:"consecutive declarations on a line must be separated by ';'"),
1134
-
DiagnosticSpec(locationMarker:"1️⃣", message:"unexpected code ':' before variable"),
1135
-
// TODO: Old parser expected error on line 3: unexpected ':' in type; did you mean to write a dictionary type?, Fix-It replacements: 11 - 11 = '['
1136
-
DiagnosticSpec(locationMarker:"2️⃣", message:"unexpected code ': Int]' before variable"),
1137
-
// TODO: Old parser expected error on line 4: unexpected ':' in type; did you mean to write a dictionary type?, Fix-It replacements: 11 - 11 = '[', 24 - 24 = ']'
1138
-
DiagnosticSpec(locationMarker:"3️⃣", message:"unexpected code ': [Int]' before variable"),
1139
-
// TODO: Old parser expected error on line 5: unexpected ':' in type; did you mean to write a dictionary type?, Fix-It replacements: 11 - 11 = '[', 22 - 22 = ']'
1140
-
DiagnosticSpec(locationMarker:"4️⃣", message:"unexpected code ': Int' in struct"),
1141
-
]
1132
+
DiagnosticSpec(locationMarker:"1️⃣", message:"expected '[' to start dictionary type"),
1133
+
DiagnosticSpec(locationMarker:"2️⃣", message:"expected value type and ']' to end dictionary type"),
1134
+
DiagnosticSpec(locationMarker:"3️⃣", message:"expected '[' to start dictionary type"),
1135
+
DiagnosticSpec(locationMarker:"4️⃣", message:"expected '[' to start dictionary type"),
1136
+
DiagnosticSpec(locationMarker:"5️⃣", message:"expected ']' to end dictionary type"),
1137
+
DiagnosticSpec(locationMarker:"6️⃣", message:"expected '[' to start dictionary type"),
1138
+
DiagnosticSpec(locationMarker:"7️⃣", message:"expected ']' to end dictionary type"),
0 commit comments