Files
carbon-lang/toolchain/check/testdata/class/method/virtual.carbon
T
Dana Jansens 9fb428d713 Ensure specific in ImplWitness has resolved definition before accessing witness table (#8040)
When impl lookup results in an `ImplWitness`, either directly or later
through `LookupImplWitness` evaluating to an `ImplWitness` inside some
specific, it represents a dependency on the eval blocks of the
`ImplDecl` that the `ImplWitness` comes from. The `ImplWitness` contains
a `SpecificId` of the `ImplDecl`, and the constants in the witness table
must be viewed through that `SpecificId`. The constants may depend on
the declaration or the definition block of the `ImplDecl`'s specific, so
any use of the witness table from `ImplWitness` requires the specific
from the `ImplWitness` to be fully resolved: both the decl and
definition blocks.

The specific declaration block is always resolved immediately when
forming a specific id, so there's nothing to do there. And things are
simple when the `ImplWitness` returned from impl lookup is concrete. We
would simply resolve the specific definition directly in the evaluation
of `LookupImplWitness`.

But when the `ImplWitness` is symbolic, meaning there's a dependency on
generic parameters in its referenced specific, then we have a dependency
on resolving the specific definition in the `ImplWitness` for every
specific that gets applied to the `ImplWitness`, eventually resulting in
a concrete specific.

Previously we attempted to do this by representing a dependency edge
from the eval block containing the `ImplWitness` instruction to the
definition block of the specific inside the `ImplWitness`. We
represented this dependency edge with the `RequireSpecificDefinition`
instruction.

The challenge with the `RequireSpecificDefinition` instruction was
ensuring it always landed in the _same eval block_ as the one holding
the symbolic `ImplWitness`. Ultimately, we've found a way to do this
without the `RequireSpecificDefinition`. The witness table is accessed
through `ImplWitnessAccess`, so we resolve the specific definition
before each access to the witness table. If the definition is already
resolved, this just costs a lookup of the Specific from the value store.

We document the other things we tried, which don't work or were too
complex, below.

In PR #6236, we added the `RequireSpecificDefinition` instruction in the
eval of `LookupImplWitness`, but this is too late. If impl lookup
resolved to a symbolic `LookupImplWitness`, the `LookupImplWitness` is
added some eval block. Later, we form specifics and re-evaluate that
eval block, and the `LookupImplWitness` can evaluate to an
`ImplWitness`. Adding the `RequireSpecificDefinition` instruction at
this point inserts the instruction into whatever generic's eval block
happens to be on the top of the generic stack, not the eval block of the
generic we are building a specific for. And indeed we can't add
instructions to a generic's eval block later like this, as it would be
missing from specifics that were already resolved for the generic. This
incorrect insertion shows up as a crash in eval at the CHECK introduced
but commented out in [eval.cpp in
#7981](https://github.com/carbon-language/carbon-lang/blob/56d9bbc40add1e9263f2f9b2555c3a27292d1725/toolchain/check/eval.cpp#L3507-L3512).
This is covered by the
`require_specific_impl_definition_through_specific_instantiation.carbon`
test.

We tried moving the insertion of `RequireSpecificDefinition` to be
earlier - at the point where the `LookupImplWitness` is constructed, in
the `LookupImplWitness()` function, instead of inside evaluation. This
seemed like a straightforwardly correct answer, as the eval block that
contains the `LookupImplWitness` will then also contain the
`RequireSpecificDefinition`. However, this can cause us to lose the
`RequireSpecificDefinition` entirely. Because it's a separate
instruction, not an operand of `LookupImplWitness`, it does not get
treated as a dependency of the witness. When we do an impl lookup inside
an `alias`, we build a generic for the alias and then discard it. This
discards the eval block containing the `LookupImplWitness`. Then, in an
enclosing generic, we refer to the constructed `AliasDecl` instruction,
which pulls all its dependent operands into the enclosing eval block.
This pulls in the `LookupImplWitness` into the enclosing eval block, but
it does not preserve the `RequireSpecificDefinition`. This is covered by
the
`require_specific_impl_definition_from_lookup_impl_witness_in_class_definition.carbon`
test.

We tried having `ImplWitness` evaluation resolve the specific definition
of the specific `ImplDecl` it refers to. This seems like the simplest
approach by far as we should always be working with the correct eval
block and nothing can get lost. However it does not work because of the
recursive nature of `ImplWitness`. The `ImplWitness` instruction appears
in the declaration of an `ImplDecl`, and the `ImplWitness` holds a
`SpecificId` for that same `ImplDecl`. When building a specific
`ImplDecl`, we evaluate the `ImplWitness` in the `ImplDecl`'s
declaration block which then immediately resolves the specific
definition before the declaration is finished. This leads to missing
instructions in the specific definition. In short, this puts the
dependency edge to the `ImplDecl`'s specific inside the `ImplDecl`
itself, which is problematic.

We tried wrapping `ImplWitness` in another instruction,
`ImplWitnessUse`. Inside the `ImplDecl` declaration there is still
`ImplWitness`, but then in the definition there is `ImplWitnessUse` and
that is what is returned from the evaluation of `LookupImplWitness`. The
`ImplWitnessUse` is an `ImplWitness` plus it ensures the specific
referred to by the witness has its definition resolved. However this
breaks constant comparisons, as we get different witnesses inside an
impl versus outside.

The first iteration of this PR's solution had us insert the
`RequireSpecificDefinition` into the eval block when we sniffed a
`LookupImplWitness` instruction, however that missed cases where impl
lookup immediately resolved to a symbolic `ImplWitness`, which is why we
now sniff for the `ImplWitness` in the eval block. This is covered by
the
`require_specific_impl_definition_from_symbolic_impl_in_class_definition.carbon`
test.

We also originally made a mistake of not inserting
`RequireSpecificDefinition` when inside the impl definition that the
`ImplWitness` refers to. But we can form specifics ImplWitness values
through function signatures, and these must add the dependency edge on
that specific ImplDecl definition. This is covered by the
`require_specific_impl_definition_from_inside_impl_definition.carbon`
test.

Finally, we did have a working solution. It was to sniff instructions
added to the eval block of a generic, and when an `ImplWitness` is added
to the eval block (it is implied that it is symbolic), also add a
`RequireSpecificDefinition` to that eval block immediately. We also
resolved the definition of a specific referred to by `ImplWitness` when
`LookupImplWitness` evaluates to `ImplWitness` to cover the concrete
witness case. This complicated the construction of the eval block
immensely, however. It caused a situation where adding one inst to the
eval block actually adds two, which we needed to avoid when importing.
And it required inst-kind specific behaviour in the very general
construction of an eval block, completely outside of eval itself.
2026-11-03 14:15:14 +00:00

1857 lines
114 KiB
Plaintext

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon
//
// AUTOUPDATE
// TIP: To test this file alone, run:
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/method/virtual.carbon
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/method/virtual.carbon
// --- modifiers.carbon
package Modifiers;
//@dump-sem-ir-begin
base class Base {
virtual fn H(self);
}
abstract class Abstract {
abstract fn J(self);
virtual fn K(self);
}
//@dump-sem-ir-end
// --- override_import.carbon
library "[[@TEST_NAME]]";
import Modifiers;
//@dump-sem-ir-begin
class Derived {
extend base: Modifiers.Base;
override fn H(self);
}
//@dump-sem-ir-end
fn Use() {
//@dump-sem-ir-begin
var unused d: Derived = {.base = {}};
//@dump-sem-ir-end
}
// --- todo_fail_later_base.carbon
library "[[@TEST_NAME]]";
import Modifiers;
base class Derived {
virtual fn F(self);
extend base: Modifiers.Base;
}
// --- init.carbon
library "[[@TEST_NAME]]";
import Modifiers;
fn F() {
//@dump-sem-ir-begin
var unused v: Modifiers.Base = {};
//@dump-sem-ir-end
}
// --- impl_abstract.carbon
library "[[@TEST_NAME]]";
abstract class A1 {
virtual fn F(self);
}
abstract class A2 {
extend base: A1;
override fn F(self);
}
// --- impl_base.carbon
library "[[@TEST_NAME]]";
base class B1 {
virtual fn F(self);
}
base class B2 {
extend base: B1;
override fn F(self);
}
class C {
extend base: B2;
override fn F(self);
}
fn Use() {
var unused b1: B1 = {};
var unused b2: B2 = {.base = {}};
var unused c: C = {.base = {.base = {}}};
}
// --- fail_modifiers.carbon
library "[[@TEST_NAME]]";
class C {
// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+2]]:3-22: error: override without base class [OverrideWithoutBase]
// CHECK:STDERR:
override fn F(self);
}
// --- init_members.carbon
library "[[@TEST_NAME]]";
base class Base {
var m1: i32;
var m2: i32;
virtual fn F(self);
}
fn F() {
var i: i32 = 3;
//@dump-sem-ir-begin
var b1: Base = {.m2 = i, .m1 = i};
var unused b2: Base = {.m2 = 3, .m1 = 5};
//@dump-sem-ir-end
b1.m2 = 4;
}
// --- fail_impl_without_base_declaration.carbon
library "[[@TEST_NAME]]";
base class Base {
}
class Derived {
extend base: Base;
// CHECK:STDERR: fail_impl_without_base_declaration.carbon:[[@LINE+2]]:3-22: error: override without compatible virtual in base class [OverrideWithoutVirtualInBase]
// CHECK:STDERR:
override fn F(self);
}
// --- abstract_impl.carbon
library "[[@TEST_NAME]]";
abstract class AbstractBase {
abstract fn F(self);
}
abstract class AbstractIntermediate {
extend base: AbstractBase;
}
class Derived {
extend base: AbstractIntermediate;
//@dump-sem-ir-begin
override fn F(self);
//@dump-sem-ir-end
}
// --- virtual_impl.carbon
library "[[@TEST_NAME]]";
base class VirtualBase {
virtual fn F(self);
}
base class VirtualIntermediate {
extend base: VirtualBase;
}
class Derived {
extend base: VirtualIntermediate;
//@dump-sem-ir-begin
override fn F(self);
//@dump-sem-ir-end
}
// --- fail_impl_mismatch.carbon
library "[[@TEST_NAME]]";
base class Base {
virtual fn F(self);
}
class Derived {
extend base: Base;
// CHECK:STDERR: fail_impl_mismatch.carbon:[[@LINE+3]]:3-30: error: override without compatible virtual in base class [OverrideWithoutVirtualInBase]
// CHECK:STDERR: fail_impl_mismatch.carbon:[[@LINE-6]]:3-21: note: base class function has fewer parameters (0 vs 1 excluding `self`) [OverrideCandidateArityMismatch]
// CHECK:STDERR:
override fn F(self, v: i32);
}
// --- impl_conversion.carbon
library "[[@TEST_NAME]]";
class T1 {
}
class T2 {
}
impl T2 as Core.ImplicitAs(T1) {
fn Convert(unused self) -> T1 {
return {};
}
}
base class Base {
virtual fn F(self) -> T1;
}
class Derived {
extend base: Base;
//@dump-sem-ir-begin
override fn F(self) -> T2;
//@dump-sem-ir-end
}
fn Derived.F(unused self) -> T2 {
return {};
}
// --- fail_generic_virtual_decl.carbon
library "[[@TEST_NAME]]";
// CHECK:STDERR: fail_generic_virtual_decl.carbon:[[@LINE+1]]:1-26: error: use of undefined generic function [MissingGenericFunctionDefinition]
base class Base(T: type) {
// CHECK:STDERR: fail_generic_virtual_decl.carbon:[[@LINE+2]]:3-21: note: generic function declared here [MissingGenericFunctionDefinitionHere]
// CHECK:STDERR:
virtual fn F(self);
}
// --- impl_generic_base.carbon
library "[[@TEST_NAME]]";
class T1 {
}
base class Base(T: type) {
virtual fn F(unused self, unused t: T) { }
}
class Derived {
extend base: Base(T1);
override fn F(unused self, unused t: T1) { }
}
// --- fail_virtual_without_self.carbon
library "[[@TEST_NAME]]";
abstract class T1 {
// CHECK:STDERR: fail_virtual_without_self.carbon:[[@LINE+2]]:3-17: error: virtual class function [VirtualWithoutSelf]
// CHECK:STDERR:
virtual fn F();
// CHECK:STDERR: fail_virtual_without_self.carbon:[[@LINE+2]]:3-18: error: virtual class function [VirtualWithoutSelf]
// CHECK:STDERR:
abstract fn G();
}
class T2 {
extend base: T1;
// CHECK:STDERR: fail_virtual_without_self.carbon:[[@LINE+2]]:3-18: error: virtual class function [VirtualWithoutSelf]
// CHECK:STDERR:
override fn F();
}
// --- fail_ref_self_mismatch.carbon
library "[[@TEST_NAME]]";
base class T1 {
virtual fn F1(self);
}
class T2 {
extend base: T1;
// CHECK:STDERR: fail_ref_self_mismatch.carbon:[[@LINE+4]]:3-27: error: value expression passed to reference parameter [ValueForRefParam]
// CHECK:STDERR: fail_ref_self_mismatch.carbon:[[@LINE+3]]:18-25: note: initializing function parameter [InCallToFunctionParam]
// CHECK:STDERR: fail_ref_self_mismatch.carbon:[[@LINE-7]]:3-22: note: while building thunk to match the signature of this function [ThunkSignature]
// CHECK:STDERR:
override fn F1(ref self);
}
// --- fail_generic_virtual.carbon
library "[[@TEST_NAME]]";
base class T1 {
// CHECK:STDERR: fail_generic_virtual.carbon:[[@LINE+2]]:3-30: error: generic virtual function [GenericVirtual]
// CHECK:STDERR:
virtual fn F[T: type](self);
}
// --- fail_generic_virtual_in_generic_class.carbon
library "[[@TEST_NAME]]";
base class T1(T: type) {
// CHECK:STDERR: fail_generic_virtual_in_generic_class.carbon:[[@LINE+2]]:3-30: error: generic virtual function [GenericVirtual]
// CHECK:STDERR:
virtual fn F[T: type](self);
}
// --- generic_with_virtual.carbon
library "[[@TEST_NAME]]";
base class T1(T: type) {
//@dump-sem-ir-begin
virtual fn F(unused self) { }
//@dump-sem-ir-end
}
// --- with_dependent_arg.carbon
library "[[@TEST_NAME]]";
base class T1(T: type) {
//@dump-sem-ir-begin
virtual fn F(unused self, unused t: T) { }
//@dump-sem-ir-end
}
// --- vtable_import_unneeded.carbon
library "[[@TEST_NAME]]";
import Modifiers;
fn F(b: Modifiers.Base);
// --- generic_derived_from_nongeneric.carbon
library "[[@TEST_NAME]]";
base class NonGenericBase {
virtual fn F1(unused self) { }
virtual fn F2(unused self) { }
}
base class GenericDerived(T: type) {
extend base: NonGenericBase;
override fn F2(unused self) { }
virtual fn F3(unused self) { }
}
// --- nongeneric_derived_from_generic.carbon
library "[[@TEST_NAME]]";
base class GenericBase(T: type) {
virtual fn F1(unused self) { }
virtual fn F2(unused self) { }
}
class T1;
base class NonGenericDerived {
extend base: GenericBase(T1);
override fn F2(unused self) { }
virtual fn F3(unused self) { }
}
// --- impl_generic_specifically.carbon
library "[[@TEST_NAME]]";
base class Base(T: type) {
virtual fn F(unused self, unused t: Base(T)*) { }
}
class T1;
class D1 {
extend base: Base(T1);
//@dump-sem-ir-begin
override fn F(unused self, unused t: Base(T1)*) { }
//@dump-sem-ir-end
}
// --- fail_impl_generic_specifically_mismatch.carbon
library "[[@TEST_NAME]]";
class T1;
class T2;
base class Base(T: type) {
virtual fn F(unused self, unused t: T1*) { }
}
class D1 {
extend base: Base(T1);
// CHECK:STDERR: fail_impl_generic_specifically_mismatch.carbon:[[@LINE+5]]:3-45: error: cannot implicitly convert expression of type `T1*` to `T2*` [ConversionFailure]
// CHECK:STDERR: fail_impl_generic_specifically_mismatch.carbon:[[@LINE+4]]:3-45: note: type `T1*` does not implement interface `Core.ImplicitAs(T2*)` [MissingImplInMemberAccessInContext]
// CHECK:STDERR: fail_impl_generic_specifically_mismatch.carbon:[[@LINE+3]]:37-42: note: initializing function parameter [InCallToFunctionParam]
// CHECK:STDERR: fail_impl_generic_specifically_mismatch.carbon:[[@LINE-8]]:3-44: note: while building thunk to match the signature of this function [ThunkSignature]
// CHECK:STDERR:
override fn F(unused self, unused t: T2*) { }
}
// --- fail_impl_generic_generic_mismatch.carbon
library "[[@TEST_NAME]]";
abstract class Base(T: type) {
virtual fn F(unused self, unused t: T*) { }
}
class Derived(T: type) {
extend base: Base(T);
// CHECK:STDERR: fail_impl_generic_generic_mismatch.carbon:[[@LINE+5]]:3-43: error: cannot implicitly convert expression of type `T*` to `T` [ConversionFailure]
// CHECK:STDERR: fail_impl_generic_generic_mismatch.carbon:[[@LINE+4]]:3-43: note: type `T*` does not implement interface `Core.ImplicitAs(T)` [MissingImplInMemberAccessInContext]
// CHECK:STDERR: fail_impl_generic_generic_mismatch.carbon:[[@LINE+3]]:37-40: note: initializing function parameter [InCallToFunctionParam]
// CHECK:STDERR: fail_impl_generic_generic_mismatch.carbon:[[@LINE-7]]:3-43: note: while building thunk to match the signature of this function [ThunkSignature]
// CHECK:STDERR:
override fn F(unused self, unused t: T) { }
}
// --- impl_generic_generic.carbon
library "[[@TEST_NAME]]";
abstract class Base(T: type) {
virtual fn F(unused self, unused t: T) { }
}
class Derived(T: type) {
extend base: Base(T*);
//@dump-sem-ir-begin
override fn F(unused self, unused t: T*) { }
//@dump-sem-ir-end
}
// --- abstract_generic_undefined.carbon
library "[[@TEST_NAME]]";
abstract class Base(T: type) {
abstract fn F(self);
}
class T1;
class Derived {
extend base: Base(T1);
override fn F(unused self) { }
}
// --- generic_lib.carbon
library "[[@TEST_NAME]]";
base class Base(T: type) {
virtual fn F(unused self) { }
}
// --- generic_import.carbon
library "[[@TEST_NAME]]";
import library "generic_lib";
class T1;
var v: Base(T1) = {};
// --- generic_derived_generic.carbon
library "[[@TEST_NAME]]";
base class T1(G1: type) {
virtual fn F(unused self) { }
}
class T2(G2: type) {
extend base: T1(G2);
}
// --- generic_derived_generic_context.carbon
library "[[@TEST_NAME]]";
base class T1(G1: type) {
virtual fn F(unused self) { }
}
class T2(G2: type) {
class T3 {
extend base: T1(G2);
}
}
// CHECK:STDOUT: --- modifiers.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Base: type = class_type @Base [concrete]
// CHECK:STDOUT: %pattern_type.b8d: type = pattern_type %Base [concrete]
// CHECK:STDOUT: %self.param_patt.d44: %pattern_type.b8d = value_param_pattern [concrete]
// CHECK:STDOUT: %self.patt.6eb: %pattern_type.b8d = wrapper_binding_pattern self, %self.param_patt.d44 [concrete]
// CHECK:STDOUT: %Base.H.type: type = fn_type @Base.H [concrete]
// CHECK:STDOUT: %Base.H: %Base.H.type = struct_value () [concrete]
// CHECK:STDOUT: %ptr: type = ptr_type <vtable> [concrete]
// CHECK:STDOUT: %Base.vtable_decl: ref %ptr = vtable_decl @Base.vtable [concrete]
// CHECK:STDOUT: %struct_type.vptr: type = struct_type {.<vptr>: %ptr} [concrete]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.vptr [concrete]
// CHECK:STDOUT: %Abstract: type = class_type @Abstract [concrete]
// CHECK:STDOUT: %pattern_type.0e2: type = pattern_type %Abstract [concrete]
// CHECK:STDOUT: %self.param_patt.950: %pattern_type.0e2 = value_param_pattern [concrete]
// CHECK:STDOUT: %self.patt.165: %pattern_type.0e2 = wrapper_binding_pattern self, %self.param_patt.950 [concrete]
// CHECK:STDOUT: %Abstract.J.type: type = fn_type @Abstract.J [concrete]
// CHECK:STDOUT: %Abstract.J: %Abstract.J.type = struct_value () [concrete]
// CHECK:STDOUT: %Abstract.K.type: type = fn_type @Abstract.K [concrete]
// CHECK:STDOUT: %Abstract.K: %Abstract.K.type = struct_value () [concrete]
// CHECK:STDOUT: %Abstract.vtable_decl: ref %ptr = vtable_decl @Abstract.vtable [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: %Base.decl: type = class_decl @Base [concrete = constants.%Base] {} {}
// CHECK:STDOUT: %Abstract.decl: type = class_decl @Abstract [concrete = constants.%Abstract] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @Base {
// CHECK:STDOUT: %Base.H.decl: %Base.H.type = fn_decl @Base.H [concrete = constants.%Base.H] {
// CHECK:STDOUT: %self.param_patt: %pattern_type.b8d = value_param_pattern [concrete = constants.%self.param_patt.d44]
// CHECK:STDOUT: %self.patt: %pattern_type.b8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6eb]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %Base = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [concrete = constants.%Base]
// CHECK:STDOUT: %self: %Base = wrapper_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %vtable_decl: ref %ptr = vtable_decl @Base.vtable [concrete = constants.%Base.vtable_decl]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT: vtable_decl = %vtable_decl
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%Base
// CHECK:STDOUT: .H = %Base.H.decl
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @Abstract {
// CHECK:STDOUT: %Abstract.J.decl: %Abstract.J.type = fn_decl @Abstract.J [concrete = constants.%Abstract.J] {
// CHECK:STDOUT: %self.param_patt: %pattern_type.0e2 = value_param_pattern [concrete = constants.%self.param_patt.950]
// CHECK:STDOUT: %self.patt: %pattern_type.0e2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.165]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %Abstract = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Abstract [concrete = constants.%Abstract]
// CHECK:STDOUT: %self: %Abstract = wrapper_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Abstract.K.decl: %Abstract.K.type = fn_decl @Abstract.K [concrete = constants.%Abstract.K] {
// CHECK:STDOUT: %self.param_patt: %pattern_type.0e2 = value_param_pattern [concrete = constants.%self.param_patt.950]
// CHECK:STDOUT: %self.patt: %pattern_type.0e2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.165]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %Abstract = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Abstract [concrete = constants.%Abstract]
// CHECK:STDOUT: %self: %Abstract = wrapper_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %vtable_decl: ref %ptr = vtable_decl @Abstract.vtable [concrete = constants.%Abstract.vtable_decl]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%struct_type.vptr [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT: vtable_decl = %vtable_decl
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%Abstract
// CHECK:STDOUT: .J = %Abstract.J.decl
// CHECK:STDOUT: .K = %Abstract.K.decl
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Base.vtable {
// CHECK:STDOUT: @Base.%Base.H.decl
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Abstract.vtable {
// CHECK:STDOUT: @Abstract.%Abstract.J.decl
// CHECK:STDOUT: @Abstract.%Abstract.K.decl
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: virtual fn @Base.H(%self.param: %Base);
// CHECK:STDOUT:
// CHECK:STDOUT: abstract fn @Abstract.J(%self.param: %Abstract);
// CHECK:STDOUT:
// CHECK:STDOUT: virtual fn @Abstract.K(%self.param: %Abstract);
// CHECK:STDOUT:
// CHECK:STDOUT: --- override_import.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %Base: type = class_type @Base [concrete]
// CHECK:STDOUT: %ptr.454: type = ptr_type <vtable> [concrete]
// CHECK:STDOUT: %struct_type.vptr: type = struct_type {.<vptr>: %ptr.454} [concrete]
// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base [concrete]
// CHECK:STDOUT: %pattern_type.746: type = pattern_type %Derived [concrete]
// CHECK:STDOUT: %self.param_patt.138: %pattern_type.746 = value_param_pattern [concrete]
// CHECK:STDOUT: %self.patt.ba9: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt.138 [concrete]
// CHECK:STDOUT: %Derived.H.type.1f42d4.1: type = fn_type @Derived.H.loc9_22.1 [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %Derived.H.a6796b.1: %Derived.H.type.1f42d4.1 = struct_value () [concrete]
// CHECK:STDOUT: %Base.H.type: type = fn_type @Base.H [concrete]
// CHECK:STDOUT: %Base.H: %Base.H.type = struct_value () [concrete]
// CHECK:STDOUT: %Derived.H.type.1f42d4.2: type = fn_type @Derived.H.loc9_22.2 [concrete]
// CHECK:STDOUT: %Derived.H.a6796b.2: %Derived.H.type.1f42d4.2 = struct_value () [concrete]
// CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete]
// CHECK:STDOUT: %struct_type.base.507: type = struct_type {.base: %Base} [concrete]
// CHECK:STDOUT: %complete_type.d6b: <witness> = complete_type_witness %struct_type.base.507 [concrete]
// CHECK:STDOUT: %d.patt: %pattern_type.746 = ref_binding_pattern d [concrete]
// CHECK:STDOUT: %d.var_patt: %pattern_type.746 = var_pattern %d.patt [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
// CHECK:STDOUT: %struct_type.base.f5e: type = struct_type {.base: %empty_struct_type} [concrete]
// CHECK:STDOUT: %struct.6b1: %struct_type.base.f5e = struct_value (%empty_struct) [concrete]
// CHECK:STDOUT: %.f93: type = partial_type %Base [concrete]
// CHECK:STDOUT: %uninit: %ptr.454 = uninitialized_value [concrete]
// CHECK:STDOUT: %struct.7da: %.f93 = struct_value (%uninit) [concrete]
// CHECK:STDOUT: %Base.val: %Base = struct_value (%uninit) [concrete]
// CHECK:STDOUT: %Derived.val: %Derived = struct_value (%Base.val) [concrete]
// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete]
// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic]
// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.1 [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete]
// CHECK:STDOUT: %custom_witness.b80ef6.1: <witness> = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete]
// CHECK:STDOUT: %SubobjectDestroy.facet.c1a: %SubobjectDestroy.type = facet_value %ptr.454, (%custom_witness.b80ef6.1) [concrete]
// CHECK:STDOUT: %DestroyImpl.impl_witness.cad: <witness> = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c1a) [concrete]
// CHECK:STDOUT: %Destroy.facet.194: %Destroy.type = facet_value %ptr.454, (%DestroyImpl.impl_witness.cad, %custom_witness.b80ef6.1) [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.3 [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete]
// CHECK:STDOUT: %custom_witness.b80ef6.3: <witness> = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete]
// CHECK:STDOUT: %SubobjectDestroy.facet.611: %SubobjectDestroy.type = facet_value %Base, (%custom_witness.b80ef6.3) [concrete]
// CHECK:STDOUT: %DestroyImpl.impl_witness.5d3: <witness> = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.611) [concrete]
// CHECK:STDOUT: %Destroy.facet.d21: %Destroy.type = facet_value %Base, (%DestroyImpl.impl_witness.5d3, %custom_witness.b80ef6.3) [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.5 [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete]
// CHECK:STDOUT: %custom_witness.b80ef6.5: <witness> = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete]
// CHECK:STDOUT: %SubobjectDestroy.facet.1fc: %SubobjectDestroy.type = facet_value %Derived, (%custom_witness.b80ef6.5) [concrete]
// CHECK:STDOUT: %DestroyImpl.impl_witness.660: <witness> = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.1fc) [concrete]
// CHECK:STDOUT: %Destroy.facet.35d: %Destroy.type = facet_value %Derived, (%DestroyImpl.impl_witness.660, %custom_witness.b80ef6.5) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Modifiers: <namespace> = namespace file.%Modifiers.import, [concrete] {
// CHECK:STDOUT: .Base = %Modifiers.Base
// CHECK:STDOUT: import Modifiers//default
// CHECK:STDOUT: }
// CHECK:STDOUT: %Modifiers.Base: type = import_ref Modifiers//default, Base, loaded [concrete = constants.%Base]
// CHECK:STDOUT: %Base.H.decl: %Base.H.type = fn_decl @Base.H [concrete = constants.%Base.H] {} {}
// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)]
// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [concrete = constants.%Derived] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @Derived {
// CHECK:STDOUT: %Modifiers.ref: <namespace> = name_ref Modifiers, imports.%Modifiers [concrete = imports.%Modifiers]
// CHECK:STDOUT: %Base.ref: type = name_ref Base, imports.%Modifiers.Base [concrete = constants.%Base]
// CHECK:STDOUT: %.loc8: %Derived.elem = base_decl %Base.ref, element0 [concrete]
// CHECK:STDOUT: %Derived.H.decl.loc9_22.1: %Derived.H.type.1f42d4.1 = fn_decl @Derived.H.loc9_22.1 [concrete = constants.%Derived.H.a6796b.1] {
// CHECK:STDOUT: %self.param_patt: %pattern_type.746 = value_param_pattern [concrete = constants.%self.param_patt.138]
// CHECK:STDOUT: %self.patt: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ba9]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %Derived = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Derived [concrete = constants.%Derived]
// CHECK:STDOUT: %self: %Derived = wrapper_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Derived.H.decl.loc9_22.2: %Derived.H.type.1f42d4.2 = fn_decl @Derived.H.loc9_22.2 [concrete = constants.%Derived.H.a6796b.2] {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: } {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: %vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete = constants.%Derived.vtable_decl]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%struct_type.base.507 [concrete = constants.%complete_type.d6b]
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT: vtable_decl = %vtable_decl
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%Derived
// CHECK:STDOUT: .Modifiers = <poisoned>
// CHECK:STDOUT: .base = %.loc8
// CHECK:STDOUT: .H [hidden] = %Derived.H.decl.loc9_22.1
// CHECK:STDOUT: extend %Base.ref
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Base.vtable {
// CHECK:STDOUT: constants.%Base.H
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Derived.vtable {
// CHECK:STDOUT: @Derived.%Derived.H.decl.loc9_22.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: override fn @Derived.H.loc9_22.1(%self.param: %Derived);
// CHECK:STDOUT:
// CHECK:STDOUT: override fn @Derived.H.loc9_22.2(%self.param: %Base) [thunk @Derived.%Derived.H.decl.loc9_22.1 for imports.%Base.H.decl] {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %H.ref: %Derived.H.type.1f42d4.1 = name_ref H, @Derived.%Derived.H.decl.loc9_22.1 [concrete = constants.%Derived.H.a6796b.1]
// CHECK:STDOUT: %.loc9_22.1: ref %Base = value_as_ref %self.param
// CHECK:STDOUT: %.loc9_22.2: ref %Derived = enclosing_class_access %.loc9_22.1, element0
// CHECK:STDOUT: %.loc9_22.3: %Derived = acquire_value %.loc9_22.2
// CHECK:STDOUT: %Derived.H.bound: <bound method> = bound_method %.loc9_22.3, %H.ref
// CHECK:STDOUT: %Derived.H.call: init %empty_tuple.type = call %Derived.H.bound(%.loc9_22.3)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Use() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %d.var: ref %Derived = var_storage %d.var_patt
// CHECK:STDOUT: %.loc15_37.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc15_38.1: %struct_type.base.f5e = struct_literal (%.loc15_37.1) [concrete = constants.%struct.6b1]
// CHECK:STDOUT: %.loc15_38.2: ref %.f93 = class_element_access %d.var, element0
// CHECK:STDOUT: %.loc15_37.2: ref %ptr.454 = class_element_access %.loc15_38.2, element0
// CHECK:STDOUT: %uninit: %ptr.454 = uninitialized_value [concrete = constants.%uninit]
// CHECK:STDOUT: %.loc15_37.3: init %ptr.454 to %.loc15_37.2 = in_place_init %uninit [concrete = constants.%uninit]
// CHECK:STDOUT: %.loc15_37.4: init %.f93 to %.loc15_38.2 = class_init (%.loc15_37.3) [concrete = constants.%struct.7da]
// CHECK:STDOUT: %.loc15_38.3: init %.f93 = converted %.loc15_37.1, %.loc15_37.4 [concrete = constants.%struct.7da]
// CHECK:STDOUT: %.loc15_38.4: init %Base = as_compatible %.loc15_38.3 [concrete = constants.%Base.val]
// CHECK:STDOUT: %.loc15_38.5: init %Derived to %d.var = class_init (%.loc15_38.4) [concrete = constants.%Derived.val]
// CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete = constants.%Derived.vtable_ptr]
// CHECK:STDOUT: %.loc15_38.6: ref %Base = class_element_access %d.var, element0
// CHECK:STDOUT: %.loc15_38.7: ref %ptr.454 = class_element_access %.loc15_38.6, element0
// CHECK:STDOUT: %.loc15_38.8: init %ptr.454 to %.loc15_38.7 = in_place_init %Derived.vtable_ptr [concrete = constants.%Derived.vtable_ptr]
// CHECK:STDOUT: %.loc15_38.9: init %Derived = update_init %.loc15_38.5, %.loc15_38.8
// CHECK:STDOUT: %.loc15_3.1: init %Derived = converted %.loc15_38.1, %.loc15_38.9
// CHECK:STDOUT: assign %d.var, %.loc15_3.1
// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived]
// CHECK:STDOUT: %d: ref %Derived = wrapper_binding d, %d.var
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %d.patt: %pattern_type.746 = ref_binding_pattern d [concrete = constants.%d.patt]
// CHECK:STDOUT: %d.var_patt: %pattern_type.746 = var_pattern %d.patt [concrete = constants.%d.var_patt]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%Derived, (constants.%DestroyImpl.impl_witness.660, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.35d]
// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%Derived, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.35d]
// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%Derived, (constants.%DestroyImpl.impl_witness.660, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.35d]
// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%Derived, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.35d]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%d.var)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.1(%self.param: ref %ptr.454) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.2(%self.param: ref %struct_type.vptr) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc15_3.1: ref %ptr.454 = struct_access %self.param, element0
// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%ptr.454, (constants.%DestroyImpl.impl_witness.cad, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.194]
// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%ptr.454, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.194]
// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%ptr.454, (constants.%DestroyImpl.impl_witness.cad, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.194]
// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%ptr.454, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.194]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_3.1)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.3(%self.param: ref %Base) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.4(%self.param: ref %struct_type.base.507) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc15_3.1: ref %Base = struct_access %self.param, element0
// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.5d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d21]
// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%Base, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.d21]
// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.5d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d21]
// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%Base, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.d21]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_3.1)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.5(%self.param: ref %Derived) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %base.ref: %Derived.elem = name_ref base, @Derived.%.loc8 [concrete = @Derived.%.loc8]
// CHECK:STDOUT: %.loc15_3.1: ref %Base = class_element_access %self.param, element0
// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.5d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d21]
// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%Base, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.d21]
// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.5d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d21]
// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%Base, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.d21]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_3.1)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- init.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %Base: type = class_type @Base [concrete]
// CHECK:STDOUT: %ptr.454: type = ptr_type <vtable> [concrete]
// CHECK:STDOUT: %struct_type.vptr: type = struct_type {.<vptr>: %ptr.454} [concrete]
// CHECK:STDOUT: %pattern_type.b8d: type = pattern_type %Base [concrete]
// CHECK:STDOUT: %v.patt: %pattern_type.b8d = ref_binding_pattern v [concrete]
// CHECK:STDOUT: %v.var_patt: %pattern_type.b8d = var_pattern %v.patt [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
// CHECK:STDOUT: %Base.H.type: type = fn_type @Base.H [concrete]
// CHECK:STDOUT: %Base.H: %Base.H.type = struct_value () [concrete]
// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete]
// CHECK:STDOUT: %Base.val: %Base = struct_value (%Base.vtable_ptr) [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete]
// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic]
// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.1 [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete]
// CHECK:STDOUT: %custom_witness.b80ef6.1: <witness> = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete]
// CHECK:STDOUT: %SubobjectDestroy.facet.c1a: %SubobjectDestroy.type = facet_value %ptr.454, (%custom_witness.b80ef6.1) [concrete]
// CHECK:STDOUT: %DestroyImpl.impl_witness.cad: <witness> = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c1a) [concrete]
// CHECK:STDOUT: %Destroy.facet.194: %Destroy.type = facet_value %ptr.454, (%DestroyImpl.impl_witness.cad, %custom_witness.b80ef6.1) [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.3 [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete]
// CHECK:STDOUT: %custom_witness.b80ef6.3: <witness> = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete]
// CHECK:STDOUT: %SubobjectDestroy.facet.611: %SubobjectDestroy.type = facet_value %Base, (%custom_witness.b80ef6.3) [concrete]
// CHECK:STDOUT: %DestroyImpl.impl_witness.5d3: <witness> = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.611) [concrete]
// CHECK:STDOUT: %Destroy.facet.d21: %Destroy.type = facet_value %Base, (%DestroyImpl.impl_witness.5d3, %custom_witness.b80ef6.3) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Modifiers: <namespace> = namespace file.%Modifiers.import, [concrete] {
// CHECK:STDOUT: .Base = %Modifiers.Base
// CHECK:STDOUT: import Modifiers//default
// CHECK:STDOUT: }
// CHECK:STDOUT: %Modifiers.Base: type = import_ref Modifiers//default, Base, loaded [concrete = constants.%Base]
// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)]
// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Base.vtable {
// CHECK:STDOUT: constants.%Base.H
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %v.var: ref %Base = var_storage %v.var_patt
// CHECK:STDOUT: %.loc8_35.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc8_35.2: ref %ptr.454 = class_element_access %v.var, element0
// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr]
// CHECK:STDOUT: %.loc8_35.3: init %ptr.454 to %.loc8_35.2 = in_place_init %Base.vtable_ptr [concrete = constants.%Base.vtable_ptr]
// CHECK:STDOUT: %.loc8_35.4: init %Base to %v.var = class_init (%.loc8_35.3) [concrete = constants.%Base.val]
// CHECK:STDOUT: %.loc8_3.1: init %Base = converted %.loc8_35.1, %.loc8_35.4 [concrete = constants.%Base.val]
// CHECK:STDOUT: assign %v.var, %.loc8_3.1
// CHECK:STDOUT: %.loc8_26: type = splice_block %Base.ref [concrete = constants.%Base] {
// CHECK:STDOUT: %Modifiers.ref: <namespace> = name_ref Modifiers, imports.%Modifiers [concrete = imports.%Modifiers]
// CHECK:STDOUT: %Base.ref: type = name_ref Base, imports.%Modifiers.Base [concrete = constants.%Base]
// CHECK:STDOUT: }
// CHECK:STDOUT: %v: ref %Base = wrapper_binding v, %v.var
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %v.patt: %pattern_type.b8d = ref_binding_pattern v [concrete = constants.%v.patt]
// CHECK:STDOUT: %v.var_patt: %pattern_type.b8d = var_pattern %v.patt [concrete = constants.%v.var_patt]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.5d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d21]
// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Base, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.d21]
// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.5d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d21]
// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Base, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.d21]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %ptr.454) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %struct_type.vptr) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc8_3.1: ref %ptr.454 = struct_access %self.param, element0
// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%ptr.454, (constants.%DestroyImpl.impl_witness.cad, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.194]
// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%ptr.454, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.194]
// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%ptr.454, (constants.%DestroyImpl.impl_witness.cad, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.194]
// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%ptr.454, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.194]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_3.1)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.3(%self.param: ref %Base) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- init_members.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Base: type = class_type @Base [concrete]
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [concrete]
// CHECK:STDOUT: %pattern_type.912: type = pattern_type %Base [concrete]
// CHECK:STDOUT: %ptr.454: type = ptr_type <vtable> [concrete]
// CHECK:STDOUT: %struct_type.vptr.m1.m2: type = struct_type {.<vptr>: %ptr.454, .m1: %i32, .m2: %i32} [concrete]
// CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
// CHECK:STDOUT: %ImplicitAs.type.6b0: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6 = struct_value () [symbolic]
// CHECK:STDOUT: %ImplicitAs.impl_witness.d73: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f53, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.6b0 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.d73) [concrete]
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete]
// CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766 = struct_value () [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
// CHECK:STDOUT: %bound_method.fb0: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
// CHECK:STDOUT: %int_3.9f3: %i32 = int_value 3 [concrete]
// CHECK:STDOUT: %b1.patt: %pattern_type.912 = ref_binding_pattern b1 [concrete]
// CHECK:STDOUT: %b1.var_patt: %pattern_type.912 = var_pattern %b1.patt [concrete]
// CHECK:STDOUT: %struct_type.m2.m1.3dd: type = struct_type {.m2: %i32, .m1: %i32} [concrete]
// CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete]
// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.a1d: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.3c1: %Int.as.Copy.impl.Op.type.a1d = struct_value () [symbolic]
// CHECK:STDOUT: %Copy.impl_witness.8af: <witness> = impl_witness imports.%Copy.impl_witness_table.f44, @Int.as.Copy.impl(%int_32) [concrete]
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.8af) [concrete]
// CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete]
// CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.648: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.cae: %Int.as.Copy.impl.Op.type.648 = struct_value () [concrete]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete]
// CHECK:STDOUT: %b2.patt: %pattern_type.912 = ref_binding_pattern b2 [concrete]
// CHECK:STDOUT: %b2.var_patt: %pattern_type.912 = var_pattern %b2.patt [concrete]
// CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete]
// CHECK:STDOUT: %struct_type.m2.m1.5f2: type = struct_type {.m2: Core.IntLiteral, .m1: Core.IntLiteral} [concrete]
// CHECK:STDOUT: %struct: %struct_type.m2.m1.5f2 = struct_value (%int_3.1ba, %int_5.64b) [concrete]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f65: <bound method> = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete]
// CHECK:STDOUT: %bound_method.ab2: <bound method> = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
// CHECK:STDOUT: %int_5.708: %i32 = int_value 5 [concrete]
// CHECK:STDOUT: %Base.val: %Base = struct_value (%Base.vtable_ptr, %int_5.708, %int_3.9f3) [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete]
// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic]
// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.1 [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete]
// CHECK:STDOUT: %custom_witness.b80ef6.1: <witness> = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.2 [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete]
// CHECK:STDOUT: %custom_witness.b80ef6.2: <witness> = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete]
// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.2) [concrete]
// CHECK:STDOUT: %DestroyImpl.impl_witness.077: <witness> = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete]
// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.2) [concrete]
// CHECK:STDOUT: %SubobjectDestroy.facet.c1a: %SubobjectDestroy.type = facet_value %ptr.454, (%custom_witness.b80ef6.1) [concrete]
// CHECK:STDOUT: %DestroyImpl.impl_witness.cad: <witness> = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c1a) [concrete]
// CHECK:STDOUT: %Destroy.facet.194: %Destroy.type = facet_value %ptr.454, (%DestroyImpl.impl_witness.cad, %custom_witness.b80ef6.1) [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.4 [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete]
// CHECK:STDOUT: %custom_witness.b80ef6.4: <witness> = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete]
// CHECK:STDOUT: %SubobjectDestroy.facet.0c7: %SubobjectDestroy.type = facet_value %Base, (%custom_witness.b80ef6.4) [concrete]
// CHECK:STDOUT: %DestroyImpl.impl_witness.d83: <witness> = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0c7) [concrete]
// CHECK:STDOUT: %Destroy.facet.9fe: %Destroy.type = facet_value %Base, (%DestroyImpl.impl_witness.d83, %custom_witness.b80ef6.4) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)]
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
// CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)]
// CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete]
// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)]
// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Base.vtable {
// CHECK:STDOUT: @Base.%Base.F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %b1.var: ref %Base = var_storage %b1.var_patt
// CHECK:STDOUT: %i.ref.loc14_25: ref %i32 = name_ref i, %i
// CHECK:STDOUT: %i.ref.loc14_34: ref %i32 = name_ref i, %i
// CHECK:STDOUT: %.loc14_35.1: %struct_type.m2.m1.3dd = struct_literal (%i.ref.loc14_25, %i.ref.loc14_34)
// CHECK:STDOUT: %.loc14_35.2: ref %ptr.454 = class_element_access %b1.var, element0
// CHECK:STDOUT: %Base.vtable_ptr.loc14: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr]
// CHECK:STDOUT: %.loc14_35.3: init %ptr.454 to %.loc14_35.2 = in_place_init %Base.vtable_ptr.loc14 [concrete = constants.%Base.vtable_ptr]
// CHECK:STDOUT: %.loc14_34: %i32 = acquire_value %i.ref.loc14_34
// CHECK:STDOUT: %impl.elem0.loc14_34: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae]
// CHECK:STDOUT: %bound_method.loc14_34.1: <bound method> = bound_method %.loc14_34, %impl.elem0.loc14_34
// CHECK:STDOUT: %specific_fn.loc14_34: <specific function> = specific_function %impl.elem0.loc14_34, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc14_34.2: <bound method> = bound_method %.loc14_34, %specific_fn.loc14_34
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc14_34: init %i32 = call %bound_method.loc14_34.2(%.loc14_34)
// CHECK:STDOUT: %.loc14_35.4: ref %i32 = class_element_access %b1.var, element2
// CHECK:STDOUT: %.loc14_35.5: init %i32 to %.loc14_35.4 = in_place_init %Int.as.Copy.impl.Op.call.loc14_34
// CHECK:STDOUT: %.loc14_25: %i32 = acquire_value %i.ref.loc14_25
// CHECK:STDOUT: %impl.elem0.loc14_25: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae]
// CHECK:STDOUT: %bound_method.loc14_25.1: <bound method> = bound_method %.loc14_25, %impl.elem0.loc14_25
// CHECK:STDOUT: %specific_fn.loc14_25: <specific function> = specific_function %impl.elem0.loc14_25, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc14_25.2: <bound method> = bound_method %.loc14_25, %specific_fn.loc14_25
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc14_25: init %i32 = call %bound_method.loc14_25.2(%.loc14_25)
// CHECK:STDOUT: %.loc14_35.6: ref %i32 = class_element_access %b1.var, element1
// CHECK:STDOUT: %.loc14_35.7: init %i32 to %.loc14_35.6 = in_place_init %Int.as.Copy.impl.Op.call.loc14_25
// CHECK:STDOUT: %.loc14_35.8: init %Base to %b1.var = class_init (%.loc14_35.3, %.loc14_35.5, %.loc14_35.7)
// CHECK:STDOUT: %.loc14_3.1: init %Base = converted %.loc14_35.1, %.loc14_35.8
// CHECK:STDOUT: assign %b1.var, %.loc14_3.1
// CHECK:STDOUT: %Base.ref.loc14: type = name_ref Base, file.%Base.decl [concrete = constants.%Base]
// CHECK:STDOUT: %b1: ref %Base = wrapper_binding b1, %b1.var
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %b1.patt: %pattern_type.912 = ref_binding_pattern b1 [concrete = constants.%b1.patt]
// CHECK:STDOUT: %b1.var_patt: %pattern_type.912 = var_pattern %b1.patt [concrete = constants.%b1.var_patt]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b2.var: ref %Base = var_storage %b2.var_patt
// CHECK:STDOUT: %int_3.loc15: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b]
// CHECK:STDOUT: %.loc15_42.1: %struct_type.m2.m1.5f2 = struct_literal (%int_3.loc15, %int_5) [concrete = constants.%struct]
// CHECK:STDOUT: %.loc15_42.2: ref %ptr.454 = class_element_access %b2.var, element0
// CHECK:STDOUT: %Base.vtable_ptr.loc15: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr]
// CHECK:STDOUT: %.loc15_42.3: init %ptr.454 to %.loc15_42.2 = in_place_init %Base.vtable_ptr.loc15 [concrete = constants.%Base.vtable_ptr]
// CHECK:STDOUT: %impl.elem0.loc15_42.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
// CHECK:STDOUT: %bound_method.loc15_42.1: <bound method> = bound_method %int_5, %impl.elem0.loc15_42.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f65]
// CHECK:STDOUT: %specific_fn.loc15_42.1: <specific function> = specific_function %impl.elem0.loc15_42.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc15_42.2: <bound method> = bound_method %int_5, %specific_fn.loc15_42.1 [concrete = constants.%bound_method.ab2]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_42.1: init %i32 = call %bound_method.loc15_42.2(%int_5) [concrete = constants.%int_5.708]
// CHECK:STDOUT: %.loc15_42.4: init %i32 = converted %int_5, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_42.1 [concrete = constants.%int_5.708]
// CHECK:STDOUT: %.loc15_42.5: ref %i32 = class_element_access %b2.var, element2
// CHECK:STDOUT: %.loc15_42.6: init %i32 to %.loc15_42.5 = in_place_init %.loc15_42.4 [concrete = constants.%int_5.708]
// CHECK:STDOUT: %impl.elem0.loc15_42.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
// CHECK:STDOUT: %bound_method.loc15_42.3: <bound method> = bound_method %int_3.loc15, %impl.elem0.loc15_42.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c]
// CHECK:STDOUT: %specific_fn.loc15_42.2: <specific function> = specific_function %impl.elem0.loc15_42.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc15_42.4: <bound method> = bound_method %int_3.loc15, %specific_fn.loc15_42.2 [concrete = constants.%bound_method.fb0]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_42.2: init %i32 = call %bound_method.loc15_42.4(%int_3.loc15) [concrete = constants.%int_3.9f3]
// CHECK:STDOUT: %.loc15_42.7: init %i32 = converted %int_3.loc15, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_42.2 [concrete = constants.%int_3.9f3]
// CHECK:STDOUT: %.loc15_42.8: ref %i32 = class_element_access %b2.var, element1
// CHECK:STDOUT: %.loc15_42.9: init %i32 to %.loc15_42.8 = in_place_init %.loc15_42.7 [concrete = constants.%int_3.9f3]
// CHECK:STDOUT: %.loc15_42.10: init %Base to %b2.var = class_init (%.loc15_42.3, %.loc15_42.6, %.loc15_42.9) [concrete = constants.%Base.val]
// CHECK:STDOUT: %.loc15_3.1: init %Base = converted %.loc15_42.1, %.loc15_42.10 [concrete = constants.%Base.val]
// CHECK:STDOUT: assign %b2.var, %.loc15_3.1
// CHECK:STDOUT: %Base.ref.loc15: type = name_ref Base, file.%Base.decl [concrete = constants.%Base]
// CHECK:STDOUT: %b2: ref %Base = wrapper_binding b2, %b2.var
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %b2.patt: %pattern_type.912 = ref_binding_pattern b2 [concrete = constants.%b2.patt]
// CHECK:STDOUT: %b2.var_patt: %pattern_type.912 = var_pattern %b2.patt [concrete = constants.%b2.var_patt]
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.d83, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.9fe]
// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%Base, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.9fe]
// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.d83, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.9fe]
// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%Base, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.9fe]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call.loc15: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b2.var)
// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.d83, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.9fe]
// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%Base, %Destroy.facet.loc14_3.1 [concrete = constants.%Destroy.facet.9fe]
// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.d83, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.9fe]
// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%Base, %Destroy.facet.loc14_3.2 [concrete = constants.%Destroy.facet.9fe]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call.loc14: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%b1.var)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.1(%self.param: ref %ptr.454) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.2(%self.param: ref %i32) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.3(%self.param: ref %struct_type.vptr.m1.m2) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc15_3.1: ref %i32 = struct_access %self.param, element2
// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call.loc15_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc15_3.1)
// CHECK:STDOUT: %.loc15_3.4: ref %i32 = struct_access %self.param, element1
// CHECK:STDOUT: %Destroy.facet.loc15_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: %.loc15_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.3 [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: %Destroy.facet.loc15_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: %.loc15_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.4 [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call.loc15_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc15_3.4)
// CHECK:STDOUT: %.loc15_3.7: ref %ptr.454 = struct_access %self.param, element0
// CHECK:STDOUT: %Destroy.facet.loc15_3.5: %Destroy.type = facet_value constants.%ptr.454, (constants.%DestroyImpl.impl_witness.cad, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.194]
// CHECK:STDOUT: %.loc15_3.8: %Destroy.type = converted constants.%ptr.454, %Destroy.facet.loc15_3.5 [concrete = constants.%Destroy.facet.194]
// CHECK:STDOUT: %Destroy.facet.loc15_3.6: %Destroy.type = facet_value constants.%ptr.454, (constants.%DestroyImpl.impl_witness.cad, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.194]
// CHECK:STDOUT: %.loc15_3.9: %Destroy.type = converted constants.%ptr.454, %Destroy.facet.loc15_3.6 [concrete = constants.%Destroy.facet.194]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call.loc15_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc15_3.7)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.4(%self.param: ref %Base) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %m2.ref: %Base.elem = name_ref m2, @Base.%field_decl.loc6 [concrete = @Base.%field_decl.loc6]
// CHECK:STDOUT: %.loc15_3.1: ref %i32 = class_element_access %self.param, element2
// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call.loc15_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc15_3.1)
// CHECK:STDOUT: %m1.ref: %Base.elem = name_ref m1, @Base.%field_decl.loc5 [concrete = @Base.%field_decl.loc5]
// CHECK:STDOUT: %.loc15_3.4: ref %i32 = class_element_access %self.param, element1
// CHECK:STDOUT: %Destroy.facet.loc15_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: %.loc15_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.3 [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: %Destroy.facet.loc15_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: %.loc15_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.4 [concrete = constants.%Destroy.facet.c2b]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call.loc15_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc15_3.4)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- abstract_impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %AbstractBase: type = class_type @AbstractBase [concrete]
// CHECK:STDOUT: %AbstractBase.F.type: type = fn_type @AbstractBase.F [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %AbstractBase.F: %AbstractBase.F.type = struct_value () [concrete]
// CHECK:STDOUT: %AbstractIntermediate: type = class_type @AbstractIntermediate [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %pattern_type.746: type = pattern_type %Derived [concrete]
// CHECK:STDOUT: %self.param_patt.138: %pattern_type.746 = value_param_pattern [concrete]
// CHECK:STDOUT: %self.patt.ba9: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt.138 [concrete]
// CHECK:STDOUT: %Derived.F.type.48cdab.1: type = fn_type @Derived.F.loc15_22.1 [concrete]
// CHECK:STDOUT: %Derived.F.bd5be1.1: %Derived.F.type.48cdab.1 = struct_value () [concrete]
// CHECK:STDOUT: %Derived.F.type.48cdab.2: type = fn_type @Derived.F.loc15_22.2 [concrete]
// CHECK:STDOUT: %Derived.F.bd5be1.2: %Derived.F.type.48cdab.2 = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @Derived {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Derived.F.decl.loc15_22.1: %Derived.F.type.48cdab.1 = fn_decl @Derived.F.loc15_22.1 [concrete = constants.%Derived.F.bd5be1.1] {
// CHECK:STDOUT: %self.param_patt: %pattern_type.746 = value_param_pattern [concrete = constants.%self.param_patt.138]
// CHECK:STDOUT: %self.patt: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ba9]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %Derived = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Derived [concrete = constants.%Derived]
// CHECK:STDOUT: %self: %Derived = wrapper_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Derived.F.decl.loc15_22.2: %Derived.F.type.48cdab.2 = fn_decl @Derived.F.loc15_22.2 [concrete = constants.%Derived.F.bd5be1.2] {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: } {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT: vtable_decl = %vtable_decl
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%Derived
// CHECK:STDOUT: .AbstractIntermediate = <poisoned>
// CHECK:STDOUT: .base = %.loc13
// CHECK:STDOUT: .F [hidden] = %Derived.F.decl.loc15_22.1
// CHECK:STDOUT: extend %AbstractIntermediate.ref
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @AbstractBase.vtable {
// CHECK:STDOUT: @AbstractBase.%AbstractBase.F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @AbstractIntermediate.vtable {
// CHECK:STDOUT: constants.%AbstractBase.F
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Derived.vtable {
// CHECK:STDOUT: @Derived.%Derived.F.decl.loc15_22.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: override fn @Derived.F.loc15_22.1(%self.param: %Derived);
// CHECK:STDOUT:
// CHECK:STDOUT: override fn @Derived.F.loc15_22.2(%self.param: %AbstractBase) [thunk @Derived.%Derived.F.decl.loc15_22.1 for @AbstractBase.%AbstractBase.F.decl] {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: %Derived.F.type.48cdab.1 = name_ref F, @Derived.%Derived.F.decl.loc15_22.1 [concrete = constants.%Derived.F.bd5be1.1]
// CHECK:STDOUT: %.loc15_22.1: ref %AbstractBase = value_as_ref %self.param
// CHECK:STDOUT: %.loc15_22.2: ref %AbstractIntermediate = enclosing_class_access %.loc15_22.1, element0
// CHECK:STDOUT: %.loc15_22.3: ref %Derived = enclosing_class_access %.loc15_22.2, element0
// CHECK:STDOUT: %.loc15_22.4: %Derived = acquire_value %.loc15_22.3
// CHECK:STDOUT: %Derived.F.bound: <bound method> = bound_method %.loc15_22.4, %F.ref
// CHECK:STDOUT: %Derived.F.call: init %empty_tuple.type = call %Derived.F.bound(%.loc15_22.4)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- virtual_impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %VirtualBase: type = class_type @VirtualBase [concrete]
// CHECK:STDOUT: %VirtualBase.F.type: type = fn_type @VirtualBase.F [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %VirtualBase.F: %VirtualBase.F.type = struct_value () [concrete]
// CHECK:STDOUT: %VirtualIntermediate: type = class_type @VirtualIntermediate [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %pattern_type.746: type = pattern_type %Derived [concrete]
// CHECK:STDOUT: %self.param_patt.138: %pattern_type.746 = value_param_pattern [concrete]
// CHECK:STDOUT: %self.patt.ba9: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt.138 [concrete]
// CHECK:STDOUT: %Derived.F.type.48cdab.1: type = fn_type @Derived.F.loc15_22.1 [concrete]
// CHECK:STDOUT: %Derived.F.bd5be1.1: %Derived.F.type.48cdab.1 = struct_value () [concrete]
// CHECK:STDOUT: %Derived.F.type.48cdab.2: type = fn_type @Derived.F.loc15_22.2 [concrete]
// CHECK:STDOUT: %Derived.F.bd5be1.2: %Derived.F.type.48cdab.2 = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @Derived {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Derived.F.decl.loc15_22.1: %Derived.F.type.48cdab.1 = fn_decl @Derived.F.loc15_22.1 [concrete = constants.%Derived.F.bd5be1.1] {
// CHECK:STDOUT: %self.param_patt: %pattern_type.746 = value_param_pattern [concrete = constants.%self.param_patt.138]
// CHECK:STDOUT: %self.patt: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ba9]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %Derived = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Derived [concrete = constants.%Derived]
// CHECK:STDOUT: %self: %Derived = wrapper_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Derived.F.decl.loc15_22.2: %Derived.F.type.48cdab.2 = fn_decl @Derived.F.loc15_22.2 [concrete = constants.%Derived.F.bd5be1.2] {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: } {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT: vtable_decl = %vtable_decl
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%Derived
// CHECK:STDOUT: .VirtualIntermediate = <poisoned>
// CHECK:STDOUT: .base = %.loc13
// CHECK:STDOUT: .F [hidden] = %Derived.F.decl.loc15_22.1
// CHECK:STDOUT: extend %VirtualIntermediate.ref
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @VirtualBase.vtable {
// CHECK:STDOUT: @VirtualBase.%VirtualBase.F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @VirtualIntermediate.vtable {
// CHECK:STDOUT: constants.%VirtualBase.F
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Derived.vtable {
// CHECK:STDOUT: @Derived.%Derived.F.decl.loc15_22.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: override fn @Derived.F.loc15_22.1(%self.param: %Derived);
// CHECK:STDOUT:
// CHECK:STDOUT: override fn @Derived.F.loc15_22.2(%self.param: %VirtualBase) [thunk @Derived.%Derived.F.decl.loc15_22.1 for @VirtualBase.%VirtualBase.F.decl] {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: %Derived.F.type.48cdab.1 = name_ref F, @Derived.%Derived.F.decl.loc15_22.1 [concrete = constants.%Derived.F.bd5be1.1]
// CHECK:STDOUT: %.loc15_22.1: ref %VirtualBase = value_as_ref %self.param
// CHECK:STDOUT: %.loc15_22.2: ref %VirtualIntermediate = enclosing_class_access %.loc15_22.1, element0
// CHECK:STDOUT: %.loc15_22.3: ref %Derived = enclosing_class_access %.loc15_22.2, element0
// CHECK:STDOUT: %.loc15_22.4: %Derived = acquire_value %.loc15_22.3
// CHECK:STDOUT: %Derived.F.bound: <bound method> = bound_method %.loc15_22.4, %F.ref
// CHECK:STDOUT: %Derived.F.call: init %empty_tuple.type = call %Derived.F.bound(%.loc15_22.4)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- impl_conversion.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %T1: type = class_type @T1 [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %T2: type = class_type @T2 [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %ImplicitAs.type.f55: type = facet_type <@ImplicitAs, @ImplicitAs(%T1)> [concrete]
// CHECK:STDOUT: %ImplicitAs.impl_witness: <witness> = impl_witness @T2.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete]
// CHECK:STDOUT: %T2.as.ImplicitAs.impl.Convert.type: type = fn_type @T2.as.ImplicitAs.impl.Convert [concrete]
// CHECK:STDOUT: %T2.as.ImplicitAs.impl.Convert: %T2.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.f55 = facet_value %T2, (%ImplicitAs.impl_witness) [concrete]
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.430: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%T1, %ImplicitAs.facet) [concrete]
// CHECK:STDOUT: %Base: type = class_type @Base [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
// CHECK:STDOUT: %.617: Core.Form = init_form %T2 [concrete]
// CHECK:STDOUT: %Derived.F.type.48cdab.1: type = fn_type @Derived.F.loc27 [concrete]
// CHECK:STDOUT: %Derived.F.bd5be1.1: %Derived.F.type.48cdab.1 = struct_value () [concrete]
// CHECK:STDOUT: %Derived.F.type.48cdab.2: type = fn_type @Derived.F.loc23 [concrete]
// CHECK:STDOUT: %Derived.F.bd5be1.2: %Derived.F.type.48cdab.2 = struct_value () [concrete]
// CHECK:STDOUT: %.321: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.430, %ImplicitAs.facet [concrete]
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete]
// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic]
// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_28.2 [concrete]
// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete]
// CHECK:STDOUT: %custom_witness.b80ef6.2: <witness> = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete]
// CHECK:STDOUT: %SubobjectDestroy.facet.69e: %SubobjectDestroy.type = facet_value %T2, (%custom_witness.b80ef6.2) [concrete]
// CHECK:STDOUT: %DestroyImpl.impl_witness.4d2: <witness> = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.69e) [concrete]
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %T2, (%DestroyImpl.impl_witness.4d2, %custom_witness.b80ef6.2) [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)]
// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @Derived {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Derived.F.decl.loc23_28.1: %Derived.F.type.48cdab.1 = fn_decl @Derived.F.loc27 [concrete = constants.%Derived.F.bd5be1.1] {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T2.ref.loc23: type = name_ref T2, file.%T2.decl [concrete = constants.%T2]
// CHECK:STDOUT: %.loc23: Core.Form = init_form %T2.ref.loc23 [concrete = constants.%.617]
// CHECK:STDOUT: %self.param.loc23: %Derived = value_param call_param0
// CHECK:STDOUT: %Self.ref.loc23: type = name_ref Self, constants.%Derived [concrete = constants.%Derived]
// CHECK:STDOUT: %self.loc23: %Derived = wrapper_binding self, %self.param.loc23
// CHECK:STDOUT: %return.param.loc23: ref %T2 = out_param call_param1
// CHECK:STDOUT: %return.loc23: ref %T2 = return_slot %return.param.loc23
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Derived.F.decl.loc23_28.2: %Derived.F.type.48cdab.2 = fn_decl @Derived.F.loc23 [concrete = constants.%Derived.F.bd5be1.2] {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: } {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT: vtable_decl = %vtable_decl
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%Derived
// CHECK:STDOUT: .Base = <poisoned>
// CHECK:STDOUT: .base = %.loc21
// CHECK:STDOUT: .T2 = <poisoned>
// CHECK:STDOUT: .F [hidden] = %Derived.F.decl.loc23_28.1
// CHECK:STDOUT: extend %Base.ref
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Base.vtable {
// CHECK:STDOUT: @Base.%Base.F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Derived.vtable {
// CHECK:STDOUT: @Derived.%Derived.F.decl.loc23_28.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: override fn @Derived.F.loc23(%self.param: %Base) -> out %return.param: %T1 [thunk @Derived.%Derived.F.decl.loc23_28.1 for @Base.%Base.F.decl] {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: %Derived.F.type.48cdab.1 = name_ref F, @Derived.%Derived.F.decl.loc23_28.1 [concrete = constants.%Derived.F.bd5be1.1]
// CHECK:STDOUT: %.loc23_28.1: ref %Base = value_as_ref %self.param
// CHECK:STDOUT: %.loc23_28.2: ref %Derived = enclosing_class_access %.loc23_28.1, element0
// CHECK:STDOUT: %.loc23_28.3: %Derived = acquire_value %.loc23_28.2
// CHECK:STDOUT: %Derived.F.bound: <bound method> = bound_method %.loc23_28.3, %F.ref
// CHECK:STDOUT: %.loc23_28.4: ref %T2 = temporary_storage
// CHECK:STDOUT: %Derived.F.call: init %T2 to %.loc23_28.4 = call %Derived.F.bound(%.loc23_28.3)
// CHECK:STDOUT: %impl.elem0: %.321 = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%T2.as.ImplicitAs.impl.Convert]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %Derived.F.call, %impl.elem0
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %.loc23_28.5: ref %T2 = temporary %.loc23_28.4, %Derived.F.call
// CHECK:STDOUT: %.loc23_28.6: %T2 = acquire_value %.loc23_28.5
// CHECK:STDOUT: %T2.as.ImplicitAs.impl.Convert.call: init %T1 to %.3 = call %bound_method(%.loc23_28.6)
// CHECK:STDOUT: %.loc23_28.7: init %T1 = converted %Derived.F.call, %T2.as.ImplicitAs.impl.Convert.call
// CHECK:STDOUT: %Destroy.facet.loc23_28.1: %Destroy.type = facet_value constants.%T2, (constants.%DestroyImpl.impl_witness.4d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet]
// CHECK:STDOUT: %.loc23_28.8: %Destroy.type = converted constants.%T2, %Destroy.facet.loc23_28.1 [concrete = constants.%Destroy.facet]
// CHECK:STDOUT: %Destroy.facet.loc23_28.2: %Destroy.type = facet_value constants.%T2, (constants.%DestroyImpl.impl_witness.4d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet]
// CHECK:STDOUT: %.loc23_28.9: %Destroy.type = converted constants.%T2, %Destroy.facet.loc23_28.2 [concrete = constants.%Destroy.facet]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc23_28.5)
// CHECK:STDOUT: return %.loc23_28.7 to %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_28.1(%self.param: ref %empty_struct_type) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_28.2(%self.param: ref %T2) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: --- generic_with_virtual.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete]
// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %T1: type = class_type @T1, @T1(%T) [symbolic]
// CHECK:STDOUT: %pattern_type.d7d: type = pattern_type %T1 [symbolic]
// CHECK:STDOUT: %self.param_patt: %pattern_type.d7d = value_param_pattern [symbolic]
// CHECK:STDOUT: %self.patt: %pattern_type.d7d = wrapper_binding_pattern self, %self.param_patt [symbolic]
// CHECK:STDOUT: %T1.F.type: type = fn_type @T1.F, @T1(%T) [symbolic]
// CHECK:STDOUT: %T1.F: %T1.F.type = struct_value () [symbolic]
// CHECK:STDOUT: %T1.F.specific_fn: <specific function> = specific_function %T1.F, @T1.F(%T) [symbolic]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T1 [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic class @T1(%T.loc4_16.2: type) {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T1.F.type: type = fn_type @T1.F, @T1(%T.loc4_16.1) [symbolic = %T1.F.type (constants.%T1.F.type)]
// CHECK:STDOUT: %T1.F: @T1.%T1.F.type (%T1.F.type) = struct_value () [symbolic = %T1.F (constants.%T1.F)]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: class {
// CHECK:STDOUT: %T1.F.decl: @T1.%T1.F.type (%T1.F.type) = fn_decl @T1.F [symbolic = @T1.%T1.F (constants.%T1.F)] {
// CHECK:STDOUT: %self.param_patt.loc6_23.1: @T1.F.%pattern_type (%pattern_type.d7d) = value_param_pattern [symbolic = %self.param_patt.loc6_23.2 (constants.%self.param_patt)]
// CHECK:STDOUT: %self.patt.loc6_23.1: @T1.F.%pattern_type (%pattern_type.d7d) = wrapper_binding_pattern self, %self.param_patt.loc6_23.1 [symbolic = %self.patt.loc6_23.2 (constants.%self.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @T1.F.%T1 (%T1) = value_param call_param0
// CHECK:STDOUT: %.loc6_23.1: type = splice_block %Self.ref [symbolic = %T1 (constants.%T1)] {
// CHECK:STDOUT: %.loc6_23.2: type = specific_constant constants.%T1, @T1(constants.%T) [symbolic = %T1 (constants.%T1)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc6_23.2 [symbolic = %T1 (constants.%T1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @T1.F.%T1 (%T1) = wrapper_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT: vtable_decl = %vtable_decl
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%T1
// CHECK:STDOUT: .F = %T1.F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @T1.vtable {
// CHECK:STDOUT: @T1.%T1.F.specific_fn.loc8_1.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic virtual fn @T1.F(@T1.%T.loc4_16.2: type) {
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T1: type = class_type @T1, @T1(%T) [symbolic = %T1 (constants.%T1)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %T1 [symbolic = %pattern_type (constants.%pattern_type.d7d)]
// CHECK:STDOUT: %self.param_patt.loc6_23.2: @T1.F.%pattern_type (%pattern_type.d7d) = value_param_pattern [symbolic = %self.param_patt.loc6_23.2 (constants.%self.param_patt)]
// CHECK:STDOUT: %self.patt.loc6_23.2: @T1.F.%pattern_type (%pattern_type.d7d) = wrapper_binding_pattern self, %self.param_patt.loc6_23.2 [symbolic = %self.patt.loc6_23.2 (constants.%self.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T1 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT:
// CHECK:STDOUT: virtual fn(%self.param: @T1.F.%T1 (%T1)) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @T1(constants.%T) {
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc4_16.1 => constants.%T
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T1.F.type => constants.%T1.F.type
// CHECK:STDOUT: %T1.F => constants.%T1.F
// CHECK:STDOUT: %T1.F.specific_fn.loc8_1.2 => constants.%T1.F.specific_fn
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @T1.F(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %T1 => constants.%T1
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.d7d
// CHECK:STDOUT: %self.param_patt.loc6_23.2 => constants.%self.param_patt
// CHECK:STDOUT: %self.patt.loc6_23.2 => constants.%self.patt
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%require_complete
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- with_dependent_arg.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete]
// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %T1: type = class_type @T1, @T1(%T) [symbolic]
// CHECK:STDOUT: %pattern_type.d7d: type = pattern_type %T1 [symbolic]
// CHECK:STDOUT: %self.param_patt: %pattern_type.d7d = value_param_pattern [symbolic]
// CHECK:STDOUT: %self.patt: %pattern_type.d7d = wrapper_binding_pattern self, %self.param_patt [symbolic]
// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic]
// CHECK:STDOUT: %t.param_patt: %pattern_type.51d = value_param_pattern [symbolic]
// CHECK:STDOUT: %t.patt: %pattern_type.51d = wrapper_binding_pattern t, %t.param_patt [symbolic]
// CHECK:STDOUT: %T1.F.type: type = fn_type @T1.F, @T1(%T) [symbolic]
// CHECK:STDOUT: %T1.F: %T1.F.type = struct_value () [symbolic]
// CHECK:STDOUT: %T1.F.specific_fn: <specific function> = specific_function %T1.F, @T1.F(%T) [symbolic]
// CHECK:STDOUT: %require_complete.0ee: <witness> = require_complete_type %T1 [symbolic]
// CHECK:STDOUT: %require_complete.944: <witness> = require_complete_type %T [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic class @T1(%T.loc4_16.2: type) {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T1.F.type: type = fn_type @T1.F, @T1(%T.loc4_16.1) [symbolic = %T1.F.type (constants.%T1.F.type)]
// CHECK:STDOUT: %T1.F: @T1.%T1.F.type (%T1.F.type) = struct_value () [symbolic = %T1.F (constants.%T1.F)]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: class {
// CHECK:STDOUT: %T1.F.decl: @T1.%T1.F.type (%T1.F.type) = fn_decl @T1.F [symbolic = @T1.%T1.F (constants.%T1.F)] {
// CHECK:STDOUT: %self.param_patt.loc6_23.1: @T1.F.%pattern_type.loc6_23 (%pattern_type.d7d) = value_param_pattern [symbolic = %self.param_patt.loc6_23.2 (constants.%self.param_patt)]
// CHECK:STDOUT: %self.patt.loc6_23.1: @T1.F.%pattern_type.loc6_23 (%pattern_type.d7d) = wrapper_binding_pattern self, %self.param_patt.loc6_23.1 [symbolic = %self.patt.loc6_23.2 (constants.%self.patt)]
// CHECK:STDOUT: %t.param_patt.loc6_37.1: @T1.F.%pattern_type.loc6_37 (%pattern_type.51d) = value_param_pattern [symbolic = %t.param_patt.loc6_37.2 (constants.%t.param_patt)]
// CHECK:STDOUT: %t.patt.loc6_37.1: @T1.F.%pattern_type.loc6_37 (%pattern_type.51d) = wrapper_binding_pattern t, %t.param_patt.loc6_37.1 [symbolic = %t.patt.loc6_37.2 (constants.%t.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @T1.F.%T1 (%T1) = value_param call_param0
// CHECK:STDOUT: %.loc6_23.1: type = splice_block %Self.ref [symbolic = %T1 (constants.%T1)] {
// CHECK:STDOUT: %.loc6_23.2: type = specific_constant constants.%T1, @T1(constants.%T) [symbolic = %T1 (constants.%T1)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc6_23.2 [symbolic = %T1 (constants.%T1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @T1.F.%T1 (%T1) = wrapper_binding self, %self.param
// CHECK:STDOUT: %t.param: @T1.F.%T (%T) = value_param call_param1
// CHECK:STDOUT: %.loc6_39.1: type = splice_block %T.ref [symbolic = %T (constants.%T)] {
// CHECK:STDOUT: %.loc6_39.2: type = specific_constant @T1.%T.loc4_16.2, @T1(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc6_39.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %t: @T1.F.%T (%T) = wrapper_binding t, %t.param
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT: vtable_decl = %vtable_decl
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%T1
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .F = %T1.F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @T1.vtable {
// CHECK:STDOUT: @T1.%T1.F.specific_fn.loc8_1.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic virtual fn @T1.F(@T1.%T.loc4_16.2: type) {
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T1: type = class_type @T1, @T1(%T) [symbolic = %T1 (constants.%T1)]
// CHECK:STDOUT: %pattern_type.loc6_23: type = pattern_type %T1 [symbolic = %pattern_type.loc6_23 (constants.%pattern_type.d7d)]
// CHECK:STDOUT: %self.param_patt.loc6_23.2: @T1.F.%pattern_type.loc6_23 (%pattern_type.d7d) = value_param_pattern [symbolic = %self.param_patt.loc6_23.2 (constants.%self.param_patt)]
// CHECK:STDOUT: %self.patt.loc6_23.2: @T1.F.%pattern_type.loc6_23 (%pattern_type.d7d) = wrapper_binding_pattern self, %self.param_patt.loc6_23.2 [symbolic = %self.patt.loc6_23.2 (constants.%self.patt)]
// CHECK:STDOUT: %pattern_type.loc6_37: type = pattern_type %T [symbolic = %pattern_type.loc6_37 (constants.%pattern_type.51d)]
// CHECK:STDOUT: %t.param_patt.loc6_37.2: @T1.F.%pattern_type.loc6_37 (%pattern_type.51d) = value_param_pattern [symbolic = %t.param_patt.loc6_37.2 (constants.%t.param_patt)]
// CHECK:STDOUT: %t.patt.loc6_37.2: @T1.F.%pattern_type.loc6_37 (%pattern_type.51d) = wrapper_binding_pattern t, %t.param_patt.loc6_37.2 [symbolic = %t.patt.loc6_37.2 (constants.%t.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc6_23: <witness> = require_complete_type %T1 [symbolic = %require_complete.loc6_23 (constants.%require_complete.0ee)]
// CHECK:STDOUT: %require_complete.loc6_37: <witness> = require_complete_type %T [symbolic = %require_complete.loc6_37 (constants.%require_complete.944)]
// CHECK:STDOUT:
// CHECK:STDOUT: virtual fn(%self.param: @T1.F.%T1 (%T1), %t.param: @T1.F.%T (%T)) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @T1(constants.%T) {
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc4_16.1 => constants.%T
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T1.F.type => constants.%T1.F.type
// CHECK:STDOUT: %T1.F => constants.%T1.F
// CHECK:STDOUT: %T1.F.specific_fn.loc8_1.2 => constants.%T1.F.specific_fn
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @T1.F(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %T1 => constants.%T1
// CHECK:STDOUT: %pattern_type.loc6_23 => constants.%pattern_type.d7d
// CHECK:STDOUT: %self.param_patt.loc6_23.2 => constants.%self.param_patt
// CHECK:STDOUT: %self.patt.loc6_23.2 => constants.%self.patt
// CHECK:STDOUT: %pattern_type.loc6_37 => constants.%pattern_type.51d
// CHECK:STDOUT: %t.param_patt.loc6_37.2 => constants.%t.param_patt
// CHECK:STDOUT: %t.patt.loc6_37.2 => constants.%t.patt
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc6_23 => constants.%require_complete.0ee
// CHECK:STDOUT: %require_complete.loc6_37 => constants.%require_complete.944
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- impl_generic_specifically.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %Base.type: type = parameterized_class_name_type @Base [concrete]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %Base.generic: %Base.type = struct_value () [concrete]
// CHECK:STDOUT: %T1: type = class_type @T1 [concrete]
// CHECK:STDOUT: %D1: type = class_type @D1 [concrete]
// CHECK:STDOUT: %Base.fe7: type = class_type @Base, @Base(%T1) [concrete]
// CHECK:STDOUT: %ptr.3f4: type = ptr_type %Base.fe7 [concrete]
// CHECK:STDOUT: %pattern_type.da7: type = pattern_type %ptr.3f4 [concrete]
// CHECK:STDOUT: %t.param_patt.262: %pattern_type.da7 = value_param_pattern [concrete]
// CHECK:STDOUT: %pattern_type.c35: type = pattern_type %D1 [concrete]
// CHECK:STDOUT: %self.param_patt.fc7: %pattern_type.c35 = value_param_pattern [concrete]
// CHECK:STDOUT: %self.patt.4c5: %pattern_type.c35 = wrapper_binding_pattern self, %self.param_patt.fc7 [concrete]
// CHECK:STDOUT: %t.patt.d1cffd.2: %pattern_type.da7 = wrapper_binding_pattern t, %t.param_patt.262 [concrete]
// CHECK:STDOUT: %D1.F.type.48cdab.1: type = fn_type @D1.F.loc11_51.1 [concrete]
// CHECK:STDOUT: %D1.F.bd5be1.1: %D1.F.type.48cdab.1 = struct_value () [concrete]
// CHECK:STDOUT: %D1.F.type.48cdab.2: type = fn_type @D1.F.loc11_51.2 [concrete]
// CHECK:STDOUT: %D1.F.bd5be1.2: %D1.F.type.48cdab.2 = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @D1 {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %D1.F.decl.loc11_51.1: %D1.F.type.48cdab.1 = fn_decl @D1.F.loc11_51.1 [concrete = constants.%D1.F.bd5be1.1] {
// CHECK:STDOUT: %self.param_patt: %pattern_type.c35 = value_param_pattern [concrete = constants.%self.param_patt.fc7]
// CHECK:STDOUT: %self.patt: %pattern_type.c35 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4c5]
// CHECK:STDOUT: %t.param_patt: %pattern_type.da7 = value_param_pattern [concrete = constants.%t.param_patt.262]
// CHECK:STDOUT: %t.patt: %pattern_type.da7 = wrapper_binding_pattern t, %t.param_patt [concrete = constants.%t.patt.d1cffd.2]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: %D1 = value_param call_param0
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%D1 [concrete = constants.%D1]
// CHECK:STDOUT: %self: %D1 = wrapper_binding self, %self.param
// CHECK:STDOUT: %t.param: %ptr.3f4 = value_param call_param1
// CHECK:STDOUT: %.loc11: type = splice_block %ptr [concrete = constants.%ptr.3f4] {
// CHECK:STDOUT: %Base.ref: %Base.type = name_ref Base, file.%Base.decl [concrete = constants.%Base.generic]
// CHECK:STDOUT: %T1.ref: type = name_ref T1, file.%T1.decl [concrete = constants.%T1]
// CHECK:STDOUT: %Base: type = class_type @Base, @Base(constants.%T1) [concrete = constants.%Base.fe7]
// CHECK:STDOUT: %ptr: type = ptr_type %Base [concrete = constants.%ptr.3f4]
// CHECK:STDOUT: }
// CHECK:STDOUT: %t: %ptr.3f4 = wrapper_binding t, %t.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %D1.F.decl.loc11_51.2: %D1.F.type.48cdab.2 = fn_decl @D1.F.loc11_51.2 [concrete = constants.%D1.F.bd5be1.2] {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: } {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: complete_type_witness = %complete_type
// CHECK:STDOUT: vtable_decl = %vtable_decl
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%D1
// CHECK:STDOUT: .Base = <poisoned>
// CHECK:STDOUT: .T1 = <poisoned>
// CHECK:STDOUT: .base = %.loc9
// CHECK:STDOUT: .F [hidden] = %D1.F.decl.loc11_51.1
// CHECK:STDOUT: extend %Base
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Base.vtable {
// CHECK:STDOUT: @Base.%Base.F.specific_fn.loc6_1.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @D1.vtable {
// CHECK:STDOUT: @D1.%D1.F.decl.loc11_51.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: override fn @D1.F.loc11_51.1(%self.param: %D1, %t.param: %ptr.3f4) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: override fn @D1.F.loc11_51.2(%self.param: %Base.fe7, %t.param: %ptr.3f4) [thunk @D1.%D1.F.decl.loc11_51.1 for @Base.%Base.F.decl, @Base.F(constants.%T1)] {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: %D1.F.type.48cdab.1 = name_ref F, @D1.%D1.F.decl.loc11_51.1 [concrete = constants.%D1.F.bd5be1.1]
// CHECK:STDOUT: %.loc11_51.1: ref %Base.fe7 = value_as_ref %self.param
// CHECK:STDOUT: %.loc11_51.2: ref %D1 = enclosing_class_access %.loc11_51.1, element0
// CHECK:STDOUT: %.loc11_51.3: %D1 = acquire_value %.loc11_51.2
// CHECK:STDOUT: %D1.F.bound: <bound method> = bound_method %.loc11_51.3, %F.ref
// CHECK:STDOUT: %D1.F.call: init %empty_tuple.type = call %D1.F.bound(%.loc11_51.3, %t.param)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- impl_generic_generic.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete]
// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %Derived: type = class_type @Derived, @Derived(%T) [symbolic]
// CHECK:STDOUT: %ptr.e8f: type = ptr_type %T [symbolic]
// CHECK:STDOUT: %Base.c50: type = class_type @Base, @Base(%ptr.e8f) [symbolic]
// CHECK:STDOUT: %pattern_type.b8f: type = pattern_type %Base.c50 [symbolic]
// CHECK:STDOUT: %self.param_patt.03e: %pattern_type.b8f = value_param_pattern [symbolic]
// CHECK:STDOUT: %self.patt.418: %pattern_type.b8f = wrapper_binding_pattern self, %self.param_patt.03e [symbolic]
// CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic]
// CHECK:STDOUT: %t.param_patt.47b: %pattern_type.4f4 = value_param_pattern [symbolic]
// CHECK:STDOUT: %t.patt.4bb685.1: %pattern_type.4f4 = wrapper_binding_pattern t, %t.param_patt.47b [symbolic]
// CHECK:STDOUT: %require_complete.d39: <witness> = require_complete_type %Base.c50 [symbolic]
// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base.c50 [symbolic]
// CHECK:STDOUT: %pattern_type.8e7: type = pattern_type %Derived [symbolic]
// CHECK:STDOUT: %self.param_patt.17f: %pattern_type.8e7 = value_param_pattern [symbolic]
// CHECK:STDOUT: %self.patt.126ba7.1: %pattern_type.8e7 = wrapper_binding_pattern self, %self.param_patt.17f [symbolic]
// CHECK:STDOUT: %t.patt.4bb685.2: %pattern_type.4f4 = wrapper_binding_pattern t, %t.param_patt.47b [symbolic]
// CHECK:STDOUT: %self.patt.126ba7.2: %pattern_type.8e7 = wrapper_binding_pattern self, %self.param_patt.17f [symbolic]
// CHECK:STDOUT: %Derived.F.type.c2528c.1: type = fn_type @Derived.F.loc10_44.1, @Derived(%T) [symbolic]
// CHECK:STDOUT: %Derived.F.768a1f.1: %Derived.F.type.c2528c.1 = struct_value () [symbolic]
// CHECK:STDOUT: %Derived.F.type.c2528c.2: type = fn_type @Derived.F.loc10_44.2, @Derived(%T) [symbolic]
// CHECK:STDOUT: %Derived.F.768a1f.2: %Derived.F.type.c2528c.2 = struct_value () [symbolic]
// CHECK:STDOUT: %Derived.F.specific_fn.75d496.1: <specific function> = specific_function %Derived.F.768a1f.2, @Derived.F.loc10_44.2(%T) [symbolic]
// CHECK:STDOUT: %struct_type.base.d4c: type = struct_type {.base: %Base.c50} [symbolic]
// CHECK:STDOUT: %complete_type.248: <witness> = complete_type_witness %struct_type.base.d4c [symbolic]
// CHECK:STDOUT: %require_complete.f2a: <witness> = require_complete_type %Derived [symbolic]
// CHECK:STDOUT: %require_complete.ef1: <witness> = require_complete_type %ptr.e8f [symbolic]
// CHECK:STDOUT: %Derived.F.specific_fn.75d496.2: <specific function> = specific_function %Derived.F.768a1f.1, @Derived.F.loc10_44.1(%T) [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic class @Derived(%T.loc7_16.2: type) {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Derived.F.type.loc10_44.1: type = fn_type @Derived.F.loc10_44.1, @Derived(%T.loc7_16.1) [symbolic = %Derived.F.type.loc10_44.1 (constants.%Derived.F.type.c2528c.1)]
// CHECK:STDOUT: %Derived.F.loc10_44.1: @Derived.%Derived.F.type.loc10_44.1 (%Derived.F.type.c2528c.1) = struct_value () [symbolic = %Derived.F.loc10_44.1 (constants.%Derived.F.768a1f.1)]
// CHECK:STDOUT: %Derived.F.type.loc10_44.2: type = fn_type @Derived.F.loc10_44.2, @Derived(%T.loc7_16.1) [symbolic = %Derived.F.type.loc10_44.2 (constants.%Derived.F.type.c2528c.2)]
// CHECK:STDOUT: %Derived.F.loc10_44.2: @Derived.%Derived.F.type.loc10_44.2 (%Derived.F.type.c2528c.2) = struct_value () [symbolic = %Derived.F.loc10_44.2 (constants.%Derived.F.768a1f.2)]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: class {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Derived.F.decl.loc10_44.1: @Derived.%Derived.F.type.loc10_44.1 (%Derived.F.type.c2528c.1) = fn_decl @Derived.F.loc10_44.1 [symbolic = @Derived.%Derived.F.loc10_44.1 (constants.%Derived.F.768a1f.1)] {
// CHECK:STDOUT: %self.param_patt.loc10_24.1: @Derived.F.loc10_44.1.%pattern_type.loc10_24 (%pattern_type.8e7) = value_param_pattern [symbolic = %self.param_patt.loc10_24.2 (constants.%self.param_patt.17f)]
// CHECK:STDOUT: %self.patt.loc10_24.1: @Derived.F.loc10_44.1.%pattern_type.loc10_24 (%pattern_type.8e7) = wrapper_binding_pattern self, %self.param_patt.loc10_24.1 [symbolic = %self.patt.loc10_24.2 (constants.%self.patt.126ba7.1)]
// CHECK:STDOUT: %t.param_patt.loc10_38.1: @Derived.F.loc10_44.1.%pattern_type.loc10_38 (%pattern_type.4f4) = value_param_pattern [symbolic = %t.param_patt.loc10_38.2 (constants.%t.param_patt.47b)]
// CHECK:STDOUT: %t.patt.loc10_38.1: @Derived.F.loc10_44.1.%pattern_type.loc10_38 (%pattern_type.4f4) = wrapper_binding_pattern t, %t.param_patt.loc10_38.1 [symbolic = %t.patt.loc10_38.2 (constants.%t.patt.4bb685.2)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: @Derived.F.loc10_44.1.%Derived (%Derived) = value_param call_param0
// CHECK:STDOUT: %.loc10_24.1: type = splice_block %Self.ref [symbolic = %Derived (constants.%Derived)] {
// CHECK:STDOUT: %.loc10_24.2: type = specific_constant constants.%Derived, @Derived(constants.%T) [symbolic = %Derived (constants.%Derived)]
// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc10_24.2 [symbolic = %Derived (constants.%Derived)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self: @Derived.F.loc10_44.1.%Derived (%Derived) = wrapper_binding self, %self.param
// CHECK:STDOUT: %t.param: @Derived.F.loc10_44.1.%ptr.loc10_41.1 (%ptr.e8f) = value_param call_param1
// CHECK:STDOUT: %.loc10_41: type = splice_block %ptr.loc10_41.2 [symbolic = %ptr.loc10_41.1 (constants.%ptr.e8f)] {
// CHECK:STDOUT: %.loc10_40: type = specific_constant @Derived.%T.loc7_16.2, @Derived(constants.%T) [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc10_40 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %ptr.loc10_41.2: type = ptr_type %T.ref [symbolic = %ptr.loc10_41.1 (constants.%ptr.e8f)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %t: @Derived.F.loc10_44.1.%ptr.loc10_41.1 (%ptr.e8f) = wrapper_binding t, %t.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Derived.F.decl.loc10_44.2: @Derived.%Derived.F.type.loc10_44.2 (%Derived.F.type.c2528c.2) = fn_decl @Derived.F.loc10_44.2 [symbolic = @Derived.%Derived.F.loc10_44.2 (constants.%Derived.F.768a1f.2)] {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: } {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: complete_type_witness = %complete_type.loc12_1.1
// CHECK:STDOUT: vtable_decl = %vtable_decl
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%Derived
// CHECK:STDOUT: .Base = <poisoned>
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .base = %.loc8
// CHECK:STDOUT: .F [hidden] = %Derived.F.decl.loc10_44.1
// CHECK:STDOUT: extend %Base.loc8_23.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Base.vtable {
// CHECK:STDOUT: @Base.%Base.F.specific_fn.loc6_1.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: vtable @Derived.vtable {
// CHECK:STDOUT: @Derived.%Derived.F.specific_fn.loc12_1.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic override fn @Derived.F.loc10_44.1(@Derived.%T.loc7_16.2: type) {
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Derived: type = class_type @Derived, @Derived(%T) [symbolic = %Derived (constants.%Derived)]
// CHECK:STDOUT: %pattern_type.loc10_24: type = pattern_type %Derived [symbolic = %pattern_type.loc10_24 (constants.%pattern_type.8e7)]
// CHECK:STDOUT: %self.param_patt.loc10_24.2: @Derived.F.loc10_44.1.%pattern_type.loc10_24 (%pattern_type.8e7) = value_param_pattern [symbolic = %self.param_patt.loc10_24.2 (constants.%self.param_patt.17f)]
// CHECK:STDOUT: %self.patt.loc10_24.2: @Derived.F.loc10_44.1.%pattern_type.loc10_24 (%pattern_type.8e7) = wrapper_binding_pattern self, %self.param_patt.loc10_24.2 [symbolic = %self.patt.loc10_24.2 (constants.%self.patt.126ba7.1)]
// CHECK:STDOUT: %ptr.loc10_41.1: type = ptr_type %T [symbolic = %ptr.loc10_41.1 (constants.%ptr.e8f)]
// CHECK:STDOUT: %pattern_type.loc10_38: type = pattern_type %ptr.loc10_41.1 [symbolic = %pattern_type.loc10_38 (constants.%pattern_type.4f4)]
// CHECK:STDOUT: %t.param_patt.loc10_38.2: @Derived.F.loc10_44.1.%pattern_type.loc10_38 (%pattern_type.4f4) = value_param_pattern [symbolic = %t.param_patt.loc10_38.2 (constants.%t.param_patt.47b)]
// CHECK:STDOUT: %t.patt.loc10_38.2: @Derived.F.loc10_44.1.%pattern_type.loc10_38 (%pattern_type.4f4) = wrapper_binding_pattern t, %t.param_patt.loc10_38.2 [symbolic = %t.patt.loc10_38.2 (constants.%t.patt.4bb685.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc10_24: <witness> = require_complete_type %Derived [symbolic = %require_complete.loc10_24 (constants.%require_complete.f2a)]
// CHECK:STDOUT: %require_complete.loc10_38: <witness> = require_complete_type %ptr.loc10_41.1 [symbolic = %require_complete.loc10_38 (constants.%require_complete.ef1)]
// CHECK:STDOUT:
// CHECK:STDOUT: override fn(%self.param: @Derived.F.loc10_44.1.%Derived (%Derived), %t.param: @Derived.F.loc10_44.1.%ptr.loc10_41.1 (%ptr.e8f)) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic override fn @Derived.F.loc10_44.2(@Derived.%T.loc7_16.2: type) {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %Derived.F.type: type = fn_type @Derived.F.loc10_44.1, @Derived(%T) [symbolic = %Derived.F.type (constants.%Derived.F.type.c2528c.1)]
// CHECK:STDOUT: %Derived.F: @Derived.F.loc10_44.2.%Derived.F.type (%Derived.F.type.c2528c.1) = struct_value () [symbolic = %Derived.F (constants.%Derived.F.768a1f.1)]
// CHECK:STDOUT: %Derived: type = class_type @Derived, @Derived(%T) [symbolic = %Derived (constants.%Derived)]
// CHECK:STDOUT: %Derived.F.specific_fn.loc10_44.2: <specific function> = specific_function %Derived.F, @Derived.F.loc10_44.1(%T) [symbolic = %Derived.F.specific_fn.loc10_44.2 (constants.%Derived.F.specific_fn.75d496.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: override fn(%self.param: @Derived.F.loc10_44.2.%Base (%Base.c50), %t.param: @Derived.F.loc10_44.2.%ptr (%ptr.e8f)) [thunk @Derived.%Derived.F.decl.loc10_44.1 for @Base.%Base.F.decl, @Base.F(constants.%ptr.e8f)] {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc10_44.1: @Derived.F.loc10_44.2.%Derived.F.type (%Derived.F.type.c2528c.1) = specific_constant @Derived.%Derived.F.decl.loc10_44.1, @Derived(constants.%T) [symbolic = %Derived.F (constants.%Derived.F.768a1f.1)]
// CHECK:STDOUT: %F.ref: @Derived.F.loc10_44.2.%Derived.F.type (%Derived.F.type.c2528c.1) = name_ref F, %.loc10_44.1 [symbolic = %Derived.F (constants.%Derived.F.768a1f.1)]
// CHECK:STDOUT: %.loc10_44.2: ref @Derived.F.loc10_44.2.%Base (%Base.c50) = value_as_ref %self.param
// CHECK:STDOUT: %.loc10_44.3: ref @Derived.F.loc10_44.2.%Derived (%Derived) = enclosing_class_access %.loc10_44.2, element0
// CHECK:STDOUT: %.loc10_44.4: @Derived.F.loc10_44.2.%Derived (%Derived) = acquire_value %.loc10_44.3
// CHECK:STDOUT: %Derived.F.bound: <bound method> = bound_method %.loc10_44.4, %F.ref
// CHECK:STDOUT: %Derived.F.specific_fn.loc10_44.1: <specific function> = specific_function %F.ref, @Derived.F.loc10_44.1(constants.%T) [symbolic = %Derived.F.specific_fn.loc10_44.2 (constants.%Derived.F.specific_fn.75d496.2)]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc10_44.4, %Derived.F.specific_fn.loc10_44.1
// CHECK:STDOUT: %Derived.F.call: init %empty_tuple.type = call %bound_method(%.loc10_44.4, %t.param)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Derived(constants.%T) {
// CHECK:STDOUT: %T.patt.loc7_16.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc7_16.1 => constants.%T
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %ptr.loc8_22.2 => constants.%ptr.e8f
// CHECK:STDOUT: %Base.loc8_23.2 => constants.%Base.c50
// CHECK:STDOUT: %require_complete => constants.%require_complete.d39
// CHECK:STDOUT: %Derived => constants.%Derived
// CHECK:STDOUT: %Derived.elem => constants.%Derived.elem
// CHECK:STDOUT: %Derived.F.type.loc10_44.1 => constants.%Derived.F.type.c2528c.1
// CHECK:STDOUT: %Derived.F.loc10_44.1 => constants.%Derived.F.768a1f.1
// CHECK:STDOUT: %Derived.F.type.loc10_44.2 => constants.%Derived.F.type.c2528c.2
// CHECK:STDOUT: %Derived.F.loc10_44.2 => constants.%Derived.F.768a1f.2
// CHECK:STDOUT: %Derived.F.specific_fn.loc12_1.2 => constants.%Derived.F.specific_fn.75d496.1
// CHECK:STDOUT: %struct_type.base => constants.%struct_type.base.d4c
// CHECK:STDOUT: %complete_type.loc12_1.2 => constants.%complete_type.248
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Derived.F.loc10_44.1(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %Derived => constants.%Derived
// CHECK:STDOUT: %pattern_type.loc10_24 => constants.%pattern_type.8e7
// CHECK:STDOUT: %self.param_patt.loc10_24.2 => constants.%self.param_patt.17f
// CHECK:STDOUT: %self.patt.loc10_24.2 => constants.%self.patt.126ba7.2
// CHECK:STDOUT: %ptr.loc10_41.1 => constants.%ptr.e8f
// CHECK:STDOUT: %pattern_type.loc10_38 => constants.%pattern_type.4f4
// CHECK:STDOUT: %t.param_patt.loc10_38.2 => constants.%t.param_patt.47b
// CHECK:STDOUT: %t.patt.loc10_38.2 => constants.%t.patt.4bb685.1
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc10_24 => constants.%require_complete.f2a
// CHECK:STDOUT: %require_complete.loc10_38 => constants.%require_complete.ef1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Derived.F.loc10_44.2(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %ptr => constants.%ptr.e8f
// CHECK:STDOUT: %Base => constants.%Base.c50
// CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.b8f
// CHECK:STDOUT: %self.param_patt => constants.%self.param_patt.03e
// CHECK:STDOUT: %self.patt.2 => constants.%self.patt.418
// CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.4f4
// CHECK:STDOUT: %t.param_patt => constants.%t.param_patt.47b
// CHECK:STDOUT: %t.patt.2 => constants.%t.patt.4bb685.1
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.1 => constants.%require_complete.d39
// CHECK:STDOUT: %require_complete.2 => constants.%require_complete.ef1
// CHECK:STDOUT: %Derived.F.type => constants.%Derived.F.type.c2528c.1
// CHECK:STDOUT: %Derived.F => constants.%Derived.F.768a1f.1
// CHECK:STDOUT: %Derived => constants.%Derived
// CHECK:STDOUT: %Derived.F.specific_fn.loc10_44.2 => constants.%Derived.F.specific_fn.75d496.2
// CHECK:STDOUT: }
// CHECK:STDOUT: