Add is_atomic_type() overloads for IntrusivePtr

This commit is contained in:
Jon Siwek 2020-05-21 22:53:10 -07:00
parent 6a1c312451
commit 457c08f531
4 changed files with 10 additions and 6 deletions

View file

@ -606,10 +606,10 @@ SwitchStmt::SwitchStmt(IntrusivePtr<Expr> index, case_list* arg_cases)
{
have_exprs = true;
if ( ! is_atomic_type(e->GetType().get()) )
if ( ! is_atomic_type(e->GetType()) )
e->Error("switch expression must be of an atomic type when cases are expressions");
if ( ! le->GetType()->AsTypeList()->AllMatch(e->GetType().get(), false) )
if ( ! le->GetType()->AsTypeList()->AllMatch(e->GetType(), false) )
{
le->Error("case expression type differs from switch type", e.get());
continue;