Commit 2508e6c
committed
[CodeComplete] Don't crash if solution doesn't contain a type for the parsed expression
In rdar://82027315 we are trying to retrieve the type of an `ASTNode` that doesn’t have a type associated with it in the solution from `getTypeForCompletion`.
This shouldn’t happen but we shouldn’t crash because of it, either. Since we already have handling logic for null types returned by `getTypeForCompletion` in place, I’m adding a check if the solution contains a type for the given node. If not, we’re causing an assertion failure and are returning a null type in non-assert builds.1 parent 17d3335 commit 2508e6c
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
1060 | 1065 | | |
1061 | 1066 | | |
1062 | 1067 | | |
| |||
0 commit comments