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
@@ -1157,23 +1157,29 @@ final class RecoveryTests: XCTestCase {
1157
1157
assertParse(
1158
1158
"""
1159
1159
struct ErrorTypeInVarDeclDictionaryType {
1160
-
let a1: String1️⃣:
1161
-
let a2: String2️⃣: Int]
1162
-
let a3: String3️⃣: [Int]
1163
-
let a4: String4️⃣: Int
1160
+
let a1: 1️⃣String:2️⃣
1161
+
let a2: 3️⃣String: Int]
1162
+
let a3: 4️⃣String: [Int]5️⃣
1163
+
let a4: 6️⃣String: Int7️⃣
1164
1164
}
1165
1165
""",
1166
1166
diagnostics:[
1167
-
// TODO: Old parser expected error on line 2: unexpected ':' in type; did you mean to write a dictionary type?, Fix-It replacements: 11 - 11 = '['
1168
-
DiagnosticSpec(locationMarker:"1️⃣", message:"consecutive declarations on a line must be separated by ';'"),
1169
-
DiagnosticSpec(locationMarker:"1️⃣", message:"unexpected code ':' before variable"),
1170
-
// TODO: Old parser expected error on line 3: unexpected ':' in type; did you mean to write a dictionary type?, Fix-It replacements: 11 - 11 = '['
1171
-
DiagnosticSpec(locationMarker:"2️⃣", message:"unexpected code ': Int]' before variable"),
1172
-
// 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 = ']'
1173
-
DiagnosticSpec(locationMarker:"3️⃣", message:"unexpected code ': [Int]' before variable"),
1174
-
// 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 = ']'
1175
-
DiagnosticSpec(locationMarker:"4️⃣", message:"unexpected code ': Int' in struct"),
1176
-
]
1167
+
DiagnosticSpec(locationMarker:"1️⃣", message:"expected '[' to start dictionary type"),
1168
+
DiagnosticSpec(locationMarker:"2️⃣", message:"expected value type and ']' to end dictionary type"),
1169
+
DiagnosticSpec(locationMarker:"3️⃣", message:"expected '[' to start dictionary type"),
1170
+
DiagnosticSpec(locationMarker:"4️⃣", message:"expected '[' to start dictionary type"),
1171
+
DiagnosticSpec(locationMarker:"5️⃣", message:"expected ']' to end dictionary type"),
1172
+
DiagnosticSpec(locationMarker:"6️⃣", message:"expected '[' to start dictionary type"),
1173
+
DiagnosticSpec(locationMarker:"7️⃣", message:"expected ']' to end dictionary type"),
0 commit comments