Repository: carbon-language/carbon-lang
File: toolchain/check/import_ref.cpp (C++)

Code before:
          resolver, import_function.thunk_decl_id(), entity_name_id));
      break;
    }
  }

  return ResolveResult::Done(function_const_id, new_function.first_decl_id());
}

static auto TryResolveTypedInst(ImportRefResolver& resolver,
                                SemIR::VtablePtr inst,
                                SemIR::ConstantId /*vtable_const_id*/)
    -> ResolveResult {
  const auto& import_vtable = resolver.import_vtables().Get(inst.vtable_id);

  auto class_const_id =
      GetLocalConstantId(resolver, resolver.import_classes()
                                       .Get(import_vtable.class_id)
                                       .first_owning_decl_id);

  // TODO: Ensure the vtable is only imported once, in eg: if there's distinct
  // vtable constants (imported from multiple libraries using the vtable) that
  // refer to the same vtable, the vtable should still be singular.
  auto virtual_functions =
      GetLocalInstBlockContents(resolver, import_vtable.virtual_functions_id);

  auto specific_data = GetLocalSpecificData(resolver, inst.specific_id);
  if (resolver.HasNewWork()) {
    return ResolveResult::Retry();
  }

  auto class_const_inst = resolver.local_insts().Get(
      resolver.local_constant_values().GetInstId(class_const_id));

  auto class_id = SemIR::ClassId::None;
  if (class_const_inst.Is<SemIR::ClassType>()) {
    class_id = class_const_inst.As<SemIR::ClassType>().class_id;
  } else {
    auto generic_class_type =
        resolver.local_types().GetAs<SemIR::GenericClassType>(
            class_const_inst.type_id());
    class_id = generic_class_type.class_id;
  }
  auto new_vtable_id = resolver.local_vtables().Add(
      {{.class_id = class_id,
        .virtual_functions_id = GetLocalCanonicalInstBlockId(
            resolver, import_vtable.virtual_functions_id, virtual_functions)}});

  return ResolveAsDeduplicated<SemIR::VtablePtr>(
      resolver, {.type_id = GetPointerType(resolver.local_context(),
                                           SemIR::VtableType::TypeInstId),
                 .vtable_id = new_vtable_id,

Review comment (suggestion):
```suggestion
  auto specific_data = GetLocalSpecificData(resolver, inst.specific_id);
  
```
(just consistent whitespace)

Code after:
          resolver, import_function.thunk_decl_id(), entity_name_id));
      break;
    }
  }

  return ResolveResult::Done(function_const_id, new_function.first_decl_id());
}

static auto TryResolveTypedInst(ImportRefResolver& resolver,
                                SemIR::VtablePtr inst,
                                SemIR::ConstantId /*vtable_const_id*/)
    -> ResolveResult {
  const auto& import_vtable = resolver.import_vtables().Get(inst.vtable_id);

  auto class_const_id =
      GetLocalConstantId(resolver, resolver.import_classes()
                                       .Get(import_vtable.class_id)
                                       .first_owning_decl_id);

  // TODO: Ensure the vtable is only imported once, in eg: if there's distinct
  // vtable constants (imported from multiple libraries using the vtable) that
  // refer to the same vtable, the vtable should still be singular.
  auto virtual_functions =
      GetLocalInstBlockContents(resolver, import_vtable.virtual_functions_id);

  auto specific_data = GetLocalSpecificData(resolver, inst.specific_id);

  if (resolver.HasNewWork()) {
    return ResolveResult::Retry();
  }

  auto class_const_inst = resolver.local_insts().Get(
      resolver.local_constant_values().GetInstId(class_const_id));

  auto class_id = SemIR::ClassId::None;
  if (class_const_inst.Is<SemIR::ClassType>()) {
    class_id = class_const_inst.As<SemIR::ClassType>().class_id;
  } else {
    auto generic_class_type =
        resolver.local_types().GetAs<SemIR::GenericClassType>(
            class_const_inst.type_id());
    class_id = generic_class_type.class_id;
  }
  auto new_vtable_id = resolver.local_vtables().Add(
      {{.class_id = class_id,
        .virtual_functions_id = GetLocalCanonicalInstBlockId(
            resolver, import_vtable.virtual_functions_id, virtual_functions)}});

  return ResolveAsDeduplicated<SemIR::VtablePtr>(
      resolver, {.type_id = GetPointerType(resolver.local_context(),
                                           SemIR::VtableType::TypeInstId),