diff --git a/src/sem/call_target.cc b/src/sem/call_target.cc index 0ce35e9498..e3c87ff881 100644 --- a/src/sem/call_target.cc +++ b/src/sem/call_target.cc @@ -22,7 +22,9 @@ namespace tint { namespace sem { CallTarget::CallTarget(sem::Type* return_type, const ParameterList& parameters) - : return_type_(return_type), parameters_(parameters) {} + : return_type_(return_type), parameters_(parameters) { + TINT_ASSERT(return_type); +} CallTarget::~CallTarget() = default; diff --git a/src/sem/expression.cc b/src/sem/expression.cc index 254c559b88..83d16d7ca1 100644 --- a/src/sem/expression.cc +++ b/src/sem/expression.cc @@ -24,7 +24,9 @@ Expression::Expression(ast::Expression* declaration, Statement* statement) : declaration_(declaration), type_(type->UnwrapIfNeeded()), - statement_(statement) {} + statement_(statement) { + TINT_ASSERT(type_); +} } // namespace sem } // namespace tint