Skip to content

Commit 663362c

Browse files
committed
Merge remote-tracking branch 'origin/main' into rebranch
2 parents 7c4a64d + e1a9be5 commit 663362c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Sema/TypeCheckCodeCompletion.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,11 @@ fallbackTypeCheck(DeclContext *DC) {
10571057
}
10581058

10591059
static Type getTypeForCompletion(const constraints::Solution &S, Expr *E) {
1060+
if (!S.hasType(E)) {
1061+
assert(false && "Expression wasn't type checked?");
1062+
return nullptr;
1063+
}
1064+
10601065
auto &CS = S.getConstraintSystem();
10611066

10621067
// To aid code completion, we need to attempt to convert type placeholders

0 commit comments

Comments
 (0)