Skip to content

Commit 20f8436

Browse files
authored
Merge pull request #29832 from rintaro/ast-funcparam-nonull
[AST] Ensure AnyFunctionType::Param.Ty is non-null
2 parents aeb894f + 9bdf3ff commit 20f8436

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/swift/AST/Types.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2780,7 +2780,8 @@ class AnyFunctionType : public TypeBase {
27802780
Identifier l = Identifier(),
27812781
ParameterTypeFlags f = ParameterTypeFlags())
27822782
: Ty(t), Label(l), Flags(f) {
2783-
assert(!t || !t->is<InOutType>() && "set flags instead");
2783+
assert(t && "param type must be non-null");
2784+
assert(!t->is<InOutType>() && "set flags instead");
27842785
}
27852786

27862787
private:

0 commit comments

Comments
 (0)