Skip to content

Commit 317e27e

Browse files
committed
[CodeComplete] Add test case for a nullptr crash on main
The change that causes the `nullptr` issue hasn’t made it to `release/5.9` yet. To make sure that it never does, let’s add a test case.
1 parent 7245d01 commit 317e27e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/IDE/complete_call_pattern_heuristics.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ func testArg2Name3() {
3434
// LABELED_FIRSTARG-DAG: Pattern/Local/Flair[ArgLabels]: {#arg1: Int#}[#Int#];
3535
// LABELED_FIRSTARG-NOT: ['(']{#arg1: Int#}, {#arg2: Int#}[')'][#Void#];
3636

37+
func subscriptAccess(info: [String: Int]) {
38+
info[#^SUBSCRIPT_ACCESS^#]
39+
// SUBSCRIPT_ACCESS: Pattern/Local/Flair[ArgLabels]: {#keyPath: KeyPath<[String : Int], Value>#}[#KeyPath<[String : Int], Value>#]; name=keyPath:
40+
}

0 commit comments

Comments
 (0)