Skip to content

Commit 0f14ad4

Browse files
committed
[NFC] Make it illegal to reset the interface type to null
1 parent ebac915 commit 0f14ad4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/AST/Decl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2940,6 +2940,7 @@ Type ValueDecl::getInterfaceType() const {
29402940
}
29412941

29422942
void ValueDecl::setInterfaceType(Type type) {
2943+
assert(!type.isNull() && "Resetting the interface type to null is forbidden");
29432944
getASTContext().evaluator.cacheOutput(InterfaceTypeRequest{this},
29442945
std::move(type));
29452946
}

0 commit comments

Comments
 (0)