From ab409a6a7154ffa8cdcdc8f3b2c8d56f8ed66f6e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 1 May 2026 11:46:52 -0700 Subject: [PATCH] Simplify type check. (#7155) Assisted-by: Gemini via Antigravity --- toolchain/check/handle_if_expr.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/toolchain/check/handle_if_expr.cpp b/toolchain/check/handle_if_expr.cpp index 6024e01bf4bf..b82613836447 100644 --- a/toolchain/check/handle_if_expr.cpp +++ b/toolchain/check/handle_if_expr.cpp @@ -37,9 +37,8 @@ auto HandleParseNode(Context& context, Parse::IfExprIfId node_id) -> bool { static auto DecayIntLiteralToSizedInt(Context& context, Parse::NodeId node_id, SemIR::InstId operand_id) -> SemIR::InstId { - if (context.types().GetTypeInstId( - context.insts().Get(operand_id).type_id()) == - SemIR::IntLiteralType::TypeInstId) { + if (context.types().Is( + context.insts().Get(operand_id).type_id())) { operand_id = ConvertToValueOfType( context, node_id, operand_id, MakeIntType(context, node_id, SemIR::IntKind::Signed,