浏览代码

Remove redundant if condition after #5971 (#6003)

PR #5971 added this same condition as an early-out earlier in the
PerformBuiltinConversion function.
Dana Jansens 8 月之前
父节点
当前提交
00d0eb85e2
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      toolchain/check/convert.cpp

+ 1 - 2
toolchain/check/convert.cpp

@@ -1100,8 +1100,7 @@ static auto PerformBuiltinConversion(
   // Type values can convert to facet values, and facet values can convert to
   // other facet values, as long as they satisfy the required interfaces of the
   // target `FacetType`.
-  if (target.type_id != value_type_id &&
-      sem_ir.types().Is<SemIR::FacetType>(target.type_id) &&
+  if (sem_ir.types().Is<SemIR::FacetType>(target.type_id) &&
       (sem_ir.types().Is<SemIR::TypeType>(value_type_id) ||
        sem_ir.types().Is<SemIR::FacetType>(value_type_id))) {
     // The value is a type or facet value, so it has a constant value. We get