mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Implements proposal #7016: `self` moves from the deduced implicit list (`fn F[self: Self]()`) to the front of the explicit list. Its type may be written explicitly (`fn F(self: Self)`) or omitted, in which case it defaults to `Self` (`fn F(self)`, `fn F(ref self)`); `self` in the implicit list is rejected. Throughout checking, `self` is modeled as the first explicit parameter. Because a method is just a function whose first parameter is `self`, it can also be called as an ordinary function with the receiver passed explicitly (`Type.M(obj, ...)`), not only as `obj.M(...)`. A new `SemIR::CallArgParamPatterns` helper chooses the parameters matched against the explicit arguments, excluding a leading `self` only when it is supplied as a method-call receiver; arity checking, conversion, and generic deduction use it. The resulting SemIR and lowering are unchanged: `self` is still `call_param0`, and witnesses, thunks, and vtables are unaffected. An omitted `self` type is parsed as a `SelfBindingPattern` node with no type expression; checking synthesizes the `Self` type so it behaves exactly like `self: Self`. However, the exact spelling used must match between a forward declaration and a definition, following #3763's rules around declaration matching. Generated functions, thunks, and C++ interop import/export build `self` as the first explicit parameter, and the `self`-type override (e.g. Derived->Base for a virtual override) applies to the explicit `self`. Placement is validated by new diagnostics: `SelfInImplicitParamList`, `SelfNotFirstParam`, and `SelfOutsideParamList`. The benchmark source generator and the documentation adopt the `(self)` shorthand; the prelude, the examples, and the test data are migrated in the following commits. Assisted-by: Claude Code with Claude Opus 4.7 --------- Co-authored-by: josh11b <15258583+josh11b@users.noreply.github.com>
This commit is contained in:
co-authored by
josh11b
parent
fb05da761f
commit
7871237c15
@@ -22,6 +22,7 @@ fn F(T:! Empty) {
|
||||
var unused x: T*;
|
||||
}
|
||||
|
||||
|
||||
// CHECK:STDOUT: --- as_type_of_type.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -140,11 +141,11 @@ fn F(T:! Empty) {
|
||||
// CHECK:STDOUT: %impl.elem0.loc22_19.2: @F.%.loc22_19.4 (%.ddb) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_19.2 (constants.%impl.elem0.98b)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc22_19.2: <specific function> = specific_impl_function %impl.elem0.loc22_19.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc22_19.2) [symbolic = %specific_impl_fn.loc22_19.2 (constants.%specific_impl_fn.f14)]
|
||||
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc22_18.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.loc22_18.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)]
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.67a)]
|
||||
// CHECK:STDOUT: %.loc22_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc22_3 (constants.%.0f5)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc22_3.2: @F.%.loc22_3 (%.0f5) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_3.2 (constants.%impl.elem0.584)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc22_3.2: <specific function> = specific_impl_function %impl.elem0.loc22_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc22_3.2 (constants.%specific_impl_fn.e4d)]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc22_3.2: %Destroy.type = facet_value %ptr.loc22_18.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc22_3.2 (constants.%Destroy.facet)]
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.loc22_3.2) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.67a)]
|
||||
// CHECK:STDOUT: %.loc22_3.2: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet.loc22_3.2 [symbolic = %.loc22_3.2 (constants.%.0f5)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc22_3.2: @F.%.loc22_3.2 (%.0f5) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_3.2 (constants.%impl.elem0.584)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc22_3.2: <specific function> = specific_impl_function %impl.elem0.loc22_3.2, @Destroy.WithSelf.Op(%Destroy.facet.loc22_3.2) [symbolic = %specific_impl_fn.loc22_3.2 (constants.%specific_impl_fn.e4d)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
@@ -168,8 +169,10 @@ fn F(T:! Empty) {
|
||||
// CHECK:STDOUT: %ptr.loc22_18.1: type = ptr_type %.loc22_18.2 [symbolic = %ptr.loc22_18.2 (constants.%ptr)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: ref @F.%ptr.loc22_18.2 (%ptr) = ref_binding x, %x.var
|
||||
// CHECK:STDOUT: %impl.elem0.loc22_3.1: @F.%.loc22_3 (%.0f5) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_3.2 (constants.%impl.elem0.584)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc22_3.1: @F.%.loc22_3.2 (%.0f5) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_3.2 (constants.%impl.elem0.584)]
|
||||
// CHECK:STDOUT: %bound_method.loc22_3.1: <bound method> = bound_method %x.var, %impl.elem0.loc22_3.1
|
||||
// CHECK:STDOUT: %Destroy.facet.loc22_3.1: %Destroy.type = facet_value constants.%ptr, (constants.%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc22_3.2 (constants.%Destroy.facet)]
|
||||
// CHECK:STDOUT: %.loc22_3.1: %Destroy.type = converted constants.%ptr, %Destroy.facet.loc22_3.1 [symbolic = %Destroy.facet.loc22_3.2 (constants.%Destroy.facet)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc22_3.1: <specific function> = specific_impl_function %impl.elem0.loc22_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc22_3.2 (constants.%specific_impl_fn.e4d)]
|
||||
// CHECK:STDOUT: %bound_method.loc22_3.2: <bound method> = bound_method %x.var, %specific_impl_fn.loc22_3.1
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc22_3.2(%x.var)
|
||||
|
||||
@@ -71,8 +71,8 @@ fn Compound3(V:! K2, y: V) {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface L1 {
|
||||
fn R1[self: Self]();
|
||||
fn S1[ref self: Self]();
|
||||
fn R1(self);
|
||||
fn S1(ref self);
|
||||
}
|
||||
|
||||
// Simple member access.
|
||||
@@ -92,26 +92,26 @@ fn Compound4(V:! L1, y: V, p: V*) {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface L2 {
|
||||
fn R2[self: Self]();
|
||||
fn S2[ref self: Self]();
|
||||
fn R2(self);
|
||||
fn S2(ref self);
|
||||
}
|
||||
|
||||
// Simple member access. Fails since calling an instance method without an object.
|
||||
fn Simple5(T:! L2) {
|
||||
// CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+7]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
||||
// CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+7]]:3: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch]
|
||||
// CHECK:STDERR: T.R2();
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE-9]]:3: note: calling function declared here [InCallToFunction]
|
||||
// CHECK:STDERR: fn R2[self: Self]();
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE-9]]:3: note: calling function declared here [InCallToEntity]
|
||||
// CHECK:STDERR: fn R2(self);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
T.R2();
|
||||
// CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+7]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
||||
// CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+7]]:3: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch]
|
||||
// CHECK:STDERR: T.S2();
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE-16]]:3: note: calling function declared here [InCallToFunction]
|
||||
// CHECK:STDERR: fn S2[ref self: Self]();
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE-16]]:3: note: calling function declared here [InCallToEntity]
|
||||
// CHECK:STDERR: fn S2(ref self);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
T.S2();
|
||||
}
|
||||
@@ -189,6 +189,7 @@ fn Works() {
|
||||
(C as (A & A)).(A.G)();
|
||||
}
|
||||
|
||||
|
||||
// CHECK:STDOUT: --- associated_constant.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -845,26 +846,26 @@ fn Works() {
|
||||
// CHECK:STDOUT: %self.param_patt: @L1.WithSelf.R1.%pattern_type (%pattern_type.63b) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @L1.WithSelf.R1.%pattern_type (%pattern_type.63b) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @L1.WithSelf.R1.%Self.as_type.loc4_15.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc4_15.1: type = splice_block %.loc4_15.2 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %self.param: @L1.WithSelf.R1.%Self.as_type.loc4_9.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc4_9.1: type = splice_block %.loc4_9.2 [symbolic = %Self.as_type.loc4_9.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref: %L1.type = name_ref Self, @L1.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc4_15.2: type = converted %Self.ref, %Self.as_type.loc4_15.2 [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_9.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_9.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc4_9.2: type = converted %Self.ref, %Self.as_type.loc4_9.2 [symbolic = %Self.as_type.loc4_9.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @L1.WithSelf.R1.%Self.as_type.loc4_15.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: %self: @L1.WithSelf.R1.%Self.as_type.loc4_9.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %L1.assoc_type = assoc_entity element0, %L1.WithSelf.R1.decl [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %L1.WithSelf.S1.decl: @L1.WithSelf.%L1.WithSelf.S1.type (%L1.WithSelf.S1.type.ff3) = fn_decl @L1.WithSelf.S1 [symbolic = @L1.WithSelf.%L1.WithSelf.S1 (constants.%L1.WithSelf.S1.11f)] {
|
||||
// CHECK:STDOUT: %self.param_patt: @L1.WithSelf.S1.%pattern_type (%pattern_type.63b) = ref_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @L1.WithSelf.S1.%pattern_type (%pattern_type.63b) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: ref @L1.WithSelf.S1.%Self.as_type.loc5_19.1 (%Self.as_type) = ref_param call_param0
|
||||
// CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.2 [symbolic = %Self.as_type.loc5_19.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %self.param: ref @L1.WithSelf.S1.%Self.as_type.loc5_13.1 (%Self.as_type) = ref_param call_param0
|
||||
// CHECK:STDOUT: %.loc5_13.1: type = splice_block %.loc5_13.2 [symbolic = %Self.as_type.loc5_13.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref: %L1.type = name_ref Self, @L1.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_19.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_19.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc5_19.2: type = converted %Self.ref, %Self.as_type.loc5_19.2 [symbolic = %Self.as_type.loc5_19.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_13.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_13.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc5_13.2: type = converted %Self.ref, %Self.as_type.loc5_13.2 [symbolic = %Self.as_type.loc5_13.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: ref @L1.WithSelf.S1.%Self.as_type.loc5_19.1 (%Self.as_type) = ref_binding self, %self.param
|
||||
// CHECK:STDOUT: %self: ref @L1.WithSelf.S1.%Self.as_type.loc5_13.1 (%Self.as_type) = ref_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc1: %L1.assoc_type = assoc_entity element1, %L1.WithSelf.S1.decl [concrete = constants.%assoc1]
|
||||
// CHECK:STDOUT:
|
||||
@@ -879,18 +880,18 @@ fn Works() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @L1.WithSelf.R1(@L1.%Self: %L1.type) {
|
||||
// CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_15.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc4_15.1 [symbolic = %pattern_type (constants.%pattern_type.63b)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_9.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_9.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc4_9.1 [symbolic = %pattern_type (constants.%pattern_type.63b)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: @L1.WithSelf.R1.%Self.as_type.loc4_15.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: fn(%self.param: @L1.WithSelf.R1.%Self.as_type.loc4_9.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @L1.WithSelf.S1(@L1.%Self: %L1.type) {
|
||||
// CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_19.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_19.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_19.1 [symbolic = %pattern_type (constants.%pattern_type.63b)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_13.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_13.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_13.1 [symbolic = %pattern_type (constants.%pattern_type.63b)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: ref @L1.WithSelf.S1.%Self.as_type.loc5_19.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: fn(%self.param: ref @L1.WithSelf.S1.%Self.as_type.loc5_13.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Simple4(%T.loc9_13.2: %L1.type) {
|
||||
@@ -904,9 +905,9 @@ fn Works() {
|
||||
// CHECK:STDOUT: %require_complete.loc9_21: <witness> = require_complete_type %T.as_type.loc9_23.1 [symbolic = %require_complete.loc9_21 (constants.%require_complete.770490.1)]
|
||||
// CHECK:STDOUT: %require_complete.loc9_27: <witness> = require_complete_type %ptr.loc9_30.1 [symbolic = %require_complete.loc9_27 (constants.%require_complete.0d59a1.1)]
|
||||
// CHECK:STDOUT: %L1.WithSelf.R1.type: type = fn_type @L1.WithSelf.R1, @L1.WithSelf(%T.loc9_13.1) [symbolic = %L1.WithSelf.R1.type (constants.%L1.WithSelf.R1.type.62535e.1)]
|
||||
// CHECK:STDOUT: %.loc10: type = fn_type_with_self_type %L1.WithSelf.R1.type, %T.loc9_13.1 [symbolic = %.loc10 (constants.%.56f6e0.1)]
|
||||
// CHECK:STDOUT: %.loc10_4: type = fn_type_with_self_type %L1.WithSelf.R1.type, %T.loc9_13.1 [symbolic = %.loc10_4 (constants.%.56f6e0.1)]
|
||||
// CHECK:STDOUT: %L1.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc9_13.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.cca206.1)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Simple4.%.loc10 (%.56f6e0.1) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.4e8926.1)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Simple4.%.loc10_4 (%.56f6e0.1) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.4e8926.1)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: <specific function> = specific_impl_function %impl.elem0.loc10_4.2, @L1.WithSelf.R1(%T.loc9_13.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.e046e8.1)]
|
||||
// CHECK:STDOUT: %L1.WithSelf.S1.type: type = fn_type @L1.WithSelf.S1, @L1.WithSelf(%T.loc9_13.1) [symbolic = %L1.WithSelf.S1.type (constants.%L1.WithSelf.S1.type.690082.1)]
|
||||
// CHECK:STDOUT: %.loc11_4.2: type = fn_type_with_self_type %L1.WithSelf.S1.type, %T.loc9_13.1 [symbolic = %.loc11_4.2 (constants.%.b63157.1)]
|
||||
@@ -917,8 +918,9 @@ fn Works() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = name_ref x, %x
|
||||
// CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.WithSelf.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Simple4.%.loc10 (%.56f6e0.1) = impl_witness_access constants.%L1.lookup_impl_witness.cca206.1, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.4e8926.1)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Simple4.%.loc10_4 (%.56f6e0.1) = impl_witness_access constants.%L1.lookup_impl_witness.cca206.1, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.4e8926.1)]
|
||||
// CHECK:STDOUT: %bound_method.loc10_4: <bound method> = bound_method %x.ref, %impl.elem0.loc10_4.1
|
||||
// CHECK:STDOUT: %.loc10_8: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_13.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_4.1: <specific function> = specific_impl_function %impl.elem0.loc10_4.1, @L1.WithSelf.R1(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.e046e8.1)]
|
||||
// CHECK:STDOUT: %bound_method.loc10_8: <bound method> = bound_method %x.ref, %specific_impl_fn.loc10_4.1
|
||||
// CHECK:STDOUT: %L1.WithSelf.R1.call: init %empty_tuple.type = call %bound_method.loc10_8(%x.ref)
|
||||
@@ -927,6 +929,7 @@ fn Works() {
|
||||
// CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.WithSelf.%assoc1 [concrete = constants.%assoc1]
|
||||
// CHECK:STDOUT: %impl.elem1.loc11_4.1: @Simple4.%.loc11_4.2 (%.b63157.1) = impl_witness_access constants.%L1.lookup_impl_witness.cca206.1, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.86bb43.1)]
|
||||
// CHECK:STDOUT: %bound_method.loc11_4: <bound method> = bound_method %.loc11_4.1, %impl.elem1.loc11_4.1
|
||||
// CHECK:STDOUT: %.loc11_9: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_13.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc11_4.1: <specific function> = specific_impl_function %impl.elem1.loc11_4.1, @L1.WithSelf.S1(constants.%T) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.340d61.1)]
|
||||
// CHECK:STDOUT: %bound_method.loc11_9: <bound method> = bound_method %.loc11_4.1, %specific_impl_fn.loc11_4.1
|
||||
// CHECK:STDOUT: %L1.WithSelf.S1.call: init %empty_tuple.type = call %bound_method.loc11_9(%.loc11_4.1)
|
||||
@@ -945,9 +948,9 @@ fn Works() {
|
||||
// CHECK:STDOUT: %require_complete.loc15_23: <witness> = require_complete_type %V.as_type.loc15_25.1 [symbolic = %require_complete.loc15_23 (constants.%require_complete.770490.2)]
|
||||
// CHECK:STDOUT: %require_complete.loc15_29: <witness> = require_complete_type %ptr.loc15_32.1 [symbolic = %require_complete.loc15_29 (constants.%require_complete.0d59a1.2)]
|
||||
// CHECK:STDOUT: %L1.WithSelf.R1.type: type = fn_type @L1.WithSelf.R1, @L1.WithSelf(%V.loc15_15.1) [symbolic = %L1.WithSelf.R1.type (constants.%L1.WithSelf.R1.type.62535e.2)]
|
||||
// CHECK:STDOUT: %.loc16: type = fn_type_with_self_type %L1.WithSelf.R1.type, %V.loc15_15.1 [symbolic = %.loc16 (constants.%.56f6e0.2)]
|
||||
// CHECK:STDOUT: %.loc16_4: type = fn_type_with_self_type %L1.WithSelf.R1.type, %V.loc15_15.1 [symbolic = %.loc16_4 (constants.%.56f6e0.2)]
|
||||
// CHECK:STDOUT: %L1.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc15_15.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.cca206.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_4.2: @Compound4.%.loc16 (%.56f6e0.2) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.4e8926.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_4.2: @Compound4.%.loc16_4 (%.56f6e0.2) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.4e8926.2)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc16_4.2: <specific function> = specific_impl_function %impl.elem0.loc16_4.2, @L1.WithSelf.R1(%V.loc15_15.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.e046e8.2)]
|
||||
// CHECK:STDOUT: %L1.WithSelf.S1.type: type = fn_type @L1.WithSelf.S1, @L1.WithSelf(%V.loc15_15.1) [symbolic = %L1.WithSelf.S1.type (constants.%L1.WithSelf.S1.type.690082.2)]
|
||||
// CHECK:STDOUT: %.loc17_4.2: type = fn_type_with_self_type %L1.WithSelf.S1.type, %V.loc15_15.1 [symbolic = %.loc17_4.2 (constants.%.b63157.2)]
|
||||
@@ -959,8 +962,9 @@ fn Works() {
|
||||
// CHECK:STDOUT: %y.ref: @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = name_ref y, %y
|
||||
// CHECK:STDOUT: %L1.ref.loc16: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
|
||||
// CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.WithSelf.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_4.1: @Compound4.%.loc16 (%.56f6e0.2) = impl_witness_access constants.%L1.lookup_impl_witness.cca206.2, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.4e8926.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_4.1: @Compound4.%.loc16_4 (%.56f6e0.2) = impl_witness_access constants.%L1.lookup_impl_witness.cca206.2, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.4e8926.2)]
|
||||
// CHECK:STDOUT: %bound_method.loc16_4: <bound method> = bound_method %y.ref, %impl.elem0.loc16_4.1
|
||||
// CHECK:STDOUT: %.loc16_13: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_15.1 (constants.%V)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc16_4.1: <specific function> = specific_impl_function %impl.elem0.loc16_4.1, @L1.WithSelf.R1(constants.%V) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.e046e8.2)]
|
||||
// CHECK:STDOUT: %bound_method.loc16_13: <bound method> = bound_method %y.ref, %specific_impl_fn.loc16_4.1
|
||||
// CHECK:STDOUT: %L1.WithSelf.R1.call: init %empty_tuple.type = call %bound_method.loc16_13(%y.ref)
|
||||
@@ -970,6 +974,7 @@ fn Works() {
|
||||
// CHECK:STDOUT: %.loc17_4.1: ref @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = deref %p.ref
|
||||
// CHECK:STDOUT: %impl.elem1.loc17_4.1: @Compound4.%.loc17_4.2 (%.b63157.2) = impl_witness_access constants.%L1.lookup_impl_witness.cca206.2, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.86bb43.2)]
|
||||
// CHECK:STDOUT: %bound_method.loc17_4: <bound method> = bound_method %.loc17_4.1, %impl.elem1.loc17_4.1
|
||||
// CHECK:STDOUT: %.loc17_14: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_15.1 (constants.%V)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc17_4.1: <specific function> = specific_impl_function %impl.elem1.loc17_4.1, @L1.WithSelf.S1(constants.%V) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.340d61.2)]
|
||||
// CHECK:STDOUT: %bound_method.loc17_14: <bound method> = bound_method %.loc17_4.1, %specific_impl_fn.loc17_4.1
|
||||
// CHECK:STDOUT: %L1.WithSelf.S1.call: init %empty_tuple.type = call %bound_method.loc17_14(%.loc17_4.1)
|
||||
@@ -988,13 +993,13 @@ fn Works() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @L1.WithSelf.R1(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_9.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.63b
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @L1.WithSelf.S1(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_19.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_13.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.63b
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1017,13 +1022,13 @@ fn Works() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @L1.WithSelf.R1(constants.%T) {
|
||||
// CHECK:STDOUT: %Self => constants.%T
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_9.1 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.5697a7.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @L1.WithSelf.S1(constants.%T) {
|
||||
// CHECK:STDOUT: %Self => constants.%T
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_19.1 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_13.1 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.5697a7.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1046,13 +1051,13 @@ fn Works() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @L1.WithSelf.R1(constants.%V) {
|
||||
// CHECK:STDOUT: %Self => constants.%V
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_15.1 => constants.%V.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_9.1 => constants.%V.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.5697a7.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @L1.WithSelf.S1(constants.%V) {
|
||||
// CHECK:STDOUT: %Self => constants.%V
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_19.1 => constants.%V.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_13.1 => constants.%V.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.5697a7.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1064,7 +1069,6 @@ fn Works() {
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.b91: type = pattern_type %Self.as_type [symbolic]
|
||||
// CHECK:STDOUT: %L2.WithSelf.R2.type.bc0: type = fn_type @L2.WithSelf.R2, @L2.WithSelf(%Self) [symbolic]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %L2.WithSelf.R2.efd: %L2.WithSelf.R2.type.bc0 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %L2.assoc_type: type = assoc_entity_type @L2 [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %L2.assoc_type = assoc_entity element0, @L2.WithSelf.%L2.WithSelf.R2.decl [concrete]
|
||||
@@ -1085,11 +1089,8 @@ fn Works() {
|
||||
// CHECK:STDOUT: %L2.lookup_impl_witness.d84: <witness> = lookup_impl_witness %T, @L2 [symbolic]
|
||||
// CHECK:STDOUT: %.244: type = fn_type_with_self_type %L2.WithSelf.R2.type.1a9, %T [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem0: %.244 = impl_witness_access %L2.lookup_impl_witness.d84, element0 [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.dc8: type = pattern_type %T.as_type [symbolic]
|
||||
// CHECK:STDOUT: %specific_impl_fn.0a8: <specific function> = specific_impl_function %impl.elem0, @L2.WithSelf.R2(%T) [symbolic]
|
||||
// CHECK:STDOUT: %.451: type = fn_type_with_self_type %L2.WithSelf.S2.type.937, %T [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem1: %.451 = impl_witness_access %L2.lookup_impl_witness.d84, element1 [symbolic]
|
||||
// CHECK:STDOUT: %specific_impl_fn.aa5: <specific function> = specific_impl_function %impl.elem1, @L2.WithSelf.S2(%T) [symbolic]
|
||||
// CHECK:STDOUT: %V: %L2.type = symbolic_binding V, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Compound5.type: type = fn_type @Compound5 [concrete]
|
||||
// CHECK:STDOUT: %Compound5: %Compound5.type = struct_value () [concrete]
|
||||
@@ -1140,26 +1141,26 @@ fn Works() {
|
||||
// CHECK:STDOUT: %self.param_patt: @L2.WithSelf.R2.%pattern_type (%pattern_type.b91) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @L2.WithSelf.R2.%pattern_type (%pattern_type.b91) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @L2.WithSelf.R2.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %self.param: @L2.WithSelf.R2.%Self.as_type.loc5_9.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc5_9.1: type = splice_block %.loc5_9.2 [symbolic = %Self.as_type.loc5_9.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref: %L2.type = name_ref Self, @L2.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref, %Self.as_type.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_9.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_9.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc5_9.2: type = converted %Self.ref, %Self.as_type.loc5_9.2 [symbolic = %Self.as_type.loc5_9.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @L2.WithSelf.R2.%Self.as_type.loc5_15.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: %self: @L2.WithSelf.R2.%Self.as_type.loc5_9.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %L2.assoc_type = assoc_entity element0, %L2.WithSelf.R2.decl [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %L2.WithSelf.S2.decl: @L2.WithSelf.%L2.WithSelf.S2.type (%L2.WithSelf.S2.type.51d) = fn_decl @L2.WithSelf.S2 [symbolic = @L2.WithSelf.%L2.WithSelf.S2 (constants.%L2.WithSelf.S2.a11)] {
|
||||
// CHECK:STDOUT: %self.param_patt: @L2.WithSelf.S2.%pattern_type (%pattern_type.b91) = ref_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @L2.WithSelf.S2.%pattern_type (%pattern_type.b91) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: ref @L2.WithSelf.S2.%Self.as_type.loc6_19.1 (%Self.as_type) = ref_param call_param0
|
||||
// CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.2 [symbolic = %Self.as_type.loc6_19.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %self.param: ref @L2.WithSelf.S2.%Self.as_type.loc6_13.1 (%Self.as_type) = ref_param call_param0
|
||||
// CHECK:STDOUT: %.loc6_13.1: type = splice_block %.loc6_13.2 [symbolic = %Self.as_type.loc6_13.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref: %L2.type = name_ref Self, @L2.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_19.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_19.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc6_19.2: type = converted %Self.ref, %Self.as_type.loc6_19.2 [symbolic = %Self.as_type.loc6_19.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_13.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_13.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc6_13.2: type = converted %Self.ref, %Self.as_type.loc6_13.2 [symbolic = %Self.as_type.loc6_13.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: ref @L2.WithSelf.S2.%Self.as_type.loc6_19.1 (%Self.as_type) = ref_binding self, %self.param
|
||||
// CHECK:STDOUT: %self: ref @L2.WithSelf.S2.%Self.as_type.loc6_13.1 (%Self.as_type) = ref_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc1: %L2.assoc_type = assoc_entity element1, %L2.WithSelf.S2.decl [concrete = constants.%assoc1]
|
||||
// CHECK:STDOUT:
|
||||
@@ -1174,18 +1175,18 @@ fn Works() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @L2.WithSelf.R2(@L2.%Self: %L2.type) {
|
||||
// CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_15.1 [symbolic = %pattern_type (constants.%pattern_type.b91)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_9.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_9.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_9.1 [symbolic = %pattern_type (constants.%pattern_type.b91)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: @L2.WithSelf.R2.%Self.as_type.loc5_15.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: fn(%self.param: @L2.WithSelf.R2.%Self.as_type.loc5_9.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @L2.WithSelf.S2(@L2.%Self: %L2.type) {
|
||||
// CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_19.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_19.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc6_19.1 [symbolic = %pattern_type (constants.%pattern_type.b91)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_13.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_13.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc6_13.1 [symbolic = %pattern_type (constants.%pattern_type.b91)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: ref @L2.WithSelf.S2.%Self.as_type.loc6_19.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: fn(%self.param: ref @L2.WithSelf.S2.%Self.as_type.loc6_13.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Simple5(%T.loc10_13.2: %L2.type) {
|
||||
@@ -1197,11 +1198,9 @@ fn Works() {
|
||||
// CHECK:STDOUT: %.loc18_4.2: type = fn_type_with_self_type %L2.WithSelf.R2.type, %T.loc10_13.1 [symbolic = %.loc18_4.2 (constants.%.244)]
|
||||
// CHECK:STDOUT: %L2.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc10_13.1, @L2 [symbolic = %L2.lookup_impl_witness (constants.%L2.lookup_impl_witness.d84)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc18_4.2: @Simple5.%.loc18_4.2 (%.244) = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc18_4.2: <specific function> = specific_impl_function %impl.elem0.loc18_4.2, @L2.WithSelf.R2(%T.loc10_13.1) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.0a8)]
|
||||
// CHECK:STDOUT: %L2.WithSelf.S2.type: type = fn_type @L2.WithSelf.S2, @L2.WithSelf(%T.loc10_13.1) [symbolic = %L2.WithSelf.S2.type (constants.%L2.WithSelf.S2.type.937)]
|
||||
// CHECK:STDOUT: %.loc26_4.2: type = fn_type_with_self_type %L2.WithSelf.S2.type, %T.loc10_13.1 [symbolic = %.loc26_4.2 (constants.%.451)]
|
||||
// CHECK:STDOUT: %impl.elem1.loc26_4.2: @Simple5.%.loc26_4.2 (%.451) = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc26_4.2: <specific function> = specific_impl_function %impl.elem1.loc26_4.2, @L2.WithSelf.S2(%T.loc10_13.1) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.aa5)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
@@ -1210,15 +1209,11 @@ fn Works() {
|
||||
// CHECK:STDOUT: %.loc18_4.1: type = converted %T.ref.loc18, %T.as_type.loc18_4.1 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %R2.ref: %L2.assoc_type = name_ref R2, @L2.WithSelf.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %impl.elem0.loc18_4.1: @Simple5.%.loc18_4.2 (%.244) = impl_witness_access constants.%L2.lookup_impl_witness.d84, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc18_4.1: <specific function> = specific_impl_function %impl.elem0.loc18_4.1, @L2.WithSelf.R2(constants.%T) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.0a8)]
|
||||
// CHECK:STDOUT: %L2.WithSelf.R2.call: init %empty_tuple.type = call %specific_impl_fn.loc18_4.1(<error>)
|
||||
// CHECK:STDOUT: %T.ref.loc26: %L2.type = name_ref T, %T.loc10_13.2 [symbolic = %T.loc10_13.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc26_4.1: type = converted %T.ref.loc26, %T.as_type.loc26 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.WithSelf.%assoc1 [concrete = constants.%assoc1]
|
||||
// CHECK:STDOUT: %impl.elem1.loc26_4.1: @Simple5.%.loc26_4.2 (%.451) = impl_witness_access constants.%L2.lookup_impl_witness.d84, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc26_4.1: <specific function> = specific_impl_function %impl.elem1.loc26_4.1, @L2.WithSelf.S2(constants.%T) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.aa5)]
|
||||
// CHECK:STDOUT: %L2.WithSelf.S2.call: init %empty_tuple.type = call %specific_impl_fn.loc26_4.1(<error>)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
@@ -1251,13 +1246,13 @@ fn Works() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @L2.WithSelf.R2(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_9.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.b91
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @L2.WithSelf.S2(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_19.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_13.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.b91
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1274,18 +1269,6 @@ fn Works() {
|
||||
// CHECK:STDOUT: %L2.WithSelf.S2 => constants.%L2.WithSelf.S2.c68
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @L2.WithSelf.R2(constants.%T) {
|
||||
// CHECK:STDOUT: %Self => constants.%T
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_15.1 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.dc8
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @L2.WithSelf.S2(constants.%T) {
|
||||
// CHECK:STDOUT: %Self => constants.%T
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_19.1 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.dc8
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Compound5(constants.%V) {
|
||||
// CHECK:STDOUT: %V.loc30_15.1 => constants.%V
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+14
-13
@@ -15,7 +15,7 @@
|
||||
class C {
|
||||
interface I {
|
||||
// TODO: Use `default` here.
|
||||
fn F[unused self: Self]() {
|
||||
fn F(unused self) {
|
||||
// I and F are both complete here, and the impl below is in scope.
|
||||
var c: C = {};
|
||||
c.(I.F)();
|
||||
@@ -23,10 +23,11 @@ class C {
|
||||
}
|
||||
|
||||
impl C as I {
|
||||
fn F[unused self: Self]() {}
|
||||
fn F(unused self) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// CHECK:STDOUT: --- default_fn.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -85,13 +86,13 @@ class C {
|
||||
// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.492) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type.492) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc18_23.1 (%Self.as_type.0fa) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc18_23.1: type = splice_block %.loc18_23.2 [symbolic = %Self.as_type.loc18_23.1 (constants.%Self.as_type.0fa)] {
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc18_17.1 (%Self.as_type.0fa) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc18_17.1: type = splice_block %.loc18_17.2 [symbolic = %Self.as_type.loc18_17.1 (constants.%Self.as_type.0fa)] {
|
||||
// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.4e9)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc18_23.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc18_23.1 (constants.%Self.as_type.0fa)]
|
||||
// CHECK:STDOUT: %.loc18_23.2: type = converted %Self.ref, %Self.as_type.loc18_23.2 [symbolic = %Self.as_type.loc18_23.1 (constants.%Self.as_type.0fa)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc18_17.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc18_17.1 (constants.%Self.as_type.0fa)]
|
||||
// CHECK:STDOUT: %.loc18_17.2: type = converted %Self.ref, %Self.as_type.loc18_17.2 [symbolic = %Self.as_type.loc18_17.1 (constants.%Self.as_type.0fa)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc18_23.1 (%Self.as_type.0fa) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc18_17.1 (%Self.as_type.0fa) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0.08d]
|
||||
// CHECK:STDOUT:
|
||||
@@ -142,13 +143,13 @@ class C {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self: %I.type) {
|
||||
// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.4e9)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc18_23.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc18_23.1 (constants.%Self.as_type.0fa)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc18_23.1 [symbolic = %pattern_type (constants.%pattern_type.492)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc18_17.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc18_17.1 (constants.%Self.as_type.0fa)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc18_17.1 [symbolic = %pattern_type (constants.%pattern_type.492)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.as_type.loc18_23.1 [symbolic = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.as_type.loc18_17.1 [symbolic = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc18_23.1 (%Self.as_type.0fa)) {
|
||||
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc18_17.1 (%Self.as_type.0fa)) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.98b = ref_binding_pattern c [concrete]
|
||||
@@ -195,7 +196,7 @@ class C {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.4e9) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self.4e9
|
||||
// CHECK:STDOUT: %Self.as_type.loc18_23.1 => constants.%Self.as_type.0fa
|
||||
// CHECK:STDOUT: %Self.as_type.loc18_17.1 => constants.%Self.as_type.0fa
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.492
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -208,7 +209,7 @@ class C {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet) {
|
||||
// CHECK:STDOUT: %Self => constants.%I.facet
|
||||
// CHECK:STDOUT: %Self.as_type.loc18_23.1 => constants.%C
|
||||
// CHECK:STDOUT: %Self.as_type.loc18_17.1 => constants.%C
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -48,7 +48,7 @@ interface J2 {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface A {
|
||||
fn F[self: Self]() -> type;
|
||||
fn F(self) -> type;
|
||||
}
|
||||
interface B {
|
||||
alias F = A.F;
|
||||
@@ -63,9 +63,9 @@ interface B {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface C {
|
||||
fn F[self: Self]();
|
||||
fn F(self);
|
||||
// TODO: Add `default` once supported.
|
||||
fn G[self: Self]() {
|
||||
fn G(self) {
|
||||
//@dump-sem-ir-begin
|
||||
self.F();
|
||||
self.(F)();
|
||||
@@ -73,6 +73,7 @@ interface C {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// CHECK:STDOUT: --- alias_to_different_interface_with_requires.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -199,24 +200,26 @@ interface C {
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %C.WithSelf.F.type: type = fn_type @C.WithSelf.F, @C.WithSelf(%Self) [symbolic = %C.WithSelf.F.type (constants.%C.WithSelf.F.type)]
|
||||
// CHECK:STDOUT: %.loc8: type = fn_type_with_self_type %C.WithSelf.F.type, %Self [symbolic = %.loc8 (constants.%.b5a)]
|
||||
// CHECK:STDOUT: %.loc8_9: type = fn_type_with_self_type %C.WithSelf.F.type, %Self [symbolic = %.loc8_9 (constants.%.b5a)]
|
||||
// CHECK:STDOUT: %C.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @C [symbolic = %C.lookup_impl_witness (constants.%C.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8_9.2: @C.WithSelf.G.%.loc8 (%.b5a) = impl_witness_access %C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_9.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8_9.2: @C.WithSelf.G.%.loc8_9 (%.b5a) = impl_witness_access %C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_9.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc8_9.2: <specific function> = specific_impl_function %impl.elem0.loc8_9.2, @C.WithSelf.F(%Self) [symbolic = %specific_impl_fn.loc8_9.2 (constants.%specific_impl_fn)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: @C.WithSelf.G.%Self.as_type.loc6_14.1 (%Self.as_type)) {
|
||||
// CHECK:STDOUT: fn(%self.param: @C.WithSelf.G.%Self.as_type.loc6_8.1 (%Self.as_type)) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref.loc8: @C.WithSelf.G.%Self.as_type.loc6_14.1 (%Self.as_type) = name_ref self, %self
|
||||
// CHECK:STDOUT: %self.ref.loc8: @C.WithSelf.G.%Self.as_type.loc6_8.1 (%Self.as_type) = name_ref self, %self
|
||||
// CHECK:STDOUT: %F.ref.loc8: %C.assoc_type = name_ref F, @C.WithSelf.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8_9.1: @C.WithSelf.G.%.loc8 (%.b5a) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_9.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8_9.1: @C.WithSelf.G.%.loc8_9 (%.b5a) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_9.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %bound_method.loc8_9: <bound method> = bound_method %self.ref.loc8, %impl.elem0.loc8_9.1
|
||||
// CHECK:STDOUT: %.loc8_12: %C.type = converted constants.%Self.as_type, constants.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc8_9.1: <specific function> = specific_impl_function %impl.elem0.loc8_9.1, @C.WithSelf.F(constants.%Self) [symbolic = %specific_impl_fn.loc8_9.2 (constants.%specific_impl_fn)]
|
||||
// CHECK:STDOUT: %bound_method.loc8_12: <bound method> = bound_method %self.ref.loc8, %specific_impl_fn.loc8_9.1
|
||||
// CHECK:STDOUT: %C.WithSelf.F.call.loc8: init %empty_tuple.type = call %bound_method.loc8_12(%self.ref.loc8)
|
||||
// CHECK:STDOUT: %self.ref.loc9: @C.WithSelf.G.%Self.as_type.loc6_14.1 (%Self.as_type) = name_ref self, %self
|
||||
// CHECK:STDOUT: %impl.elem0.loc9: @C.WithSelf.G.%.loc8 (%.b5a) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_9.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %F.ref.loc9: @C.WithSelf.G.%.loc8 (%.b5a) = name_ref F, %impl.elem0.loc9 [symbolic = %impl.elem0.loc8_9.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %self.ref.loc9: @C.WithSelf.G.%Self.as_type.loc6_8.1 (%Self.as_type) = name_ref self, %self
|
||||
// CHECK:STDOUT: %impl.elem0.loc9: @C.WithSelf.G.%.loc8_9 (%.b5a) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_9.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %F.ref.loc9: @C.WithSelf.G.%.loc8_9 (%.b5a) = name_ref F, %impl.elem0.loc9 [symbolic = %impl.elem0.loc8_9.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %bound_method.loc9_9: <bound method> = bound_method %self.ref.loc9, %F.ref.loc9
|
||||
// CHECK:STDOUT: %.loc9: %C.type = converted constants.%Self.as_type, constants.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc9: <specific function> = specific_impl_function %F.ref.loc9, @C.WithSelf.F(constants.%Self) [symbolic = %specific_impl_fn.loc8_9.2 (constants.%specific_impl_fn)]
|
||||
// CHECK:STDOUT: %bound_method.loc9_14: <bound method> = bound_method %self.ref.loc9, %specific_impl_fn.loc9
|
||||
// CHECK:STDOUT: %C.WithSelf.F.call.loc9: init %empty_tuple.type = call %bound_method.loc9_14(%self.ref.loc9)
|
||||
@@ -235,7 +238,7 @@ interface C {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C.WithSelf.G(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_8.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
fn F[self: Self]();
|
||||
fn F(self);
|
||||
}
|
||||
|
||||
fn Use(T:! I) {
|
||||
@@ -28,6 +28,7 @@ fn Use(T:! I) {
|
||||
T.F.member;
|
||||
}
|
||||
|
||||
|
||||
// CHECK:STDOUT: --- fail_member_access.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -80,13 +81,13 @@ fn Use(T:! I) {
|
||||
// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.c60) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type.c60) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc5_8.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc5_8.1: type = splice_block %.loc5_8.2 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_8.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc5_8.2: type = converted %Self.ref, %Self.as_type.loc5_8.2 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc5_14.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc5_8.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT:
|
||||
@@ -100,10 +101,10 @@ fn Use(T:! I) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self: %I.type) {
|
||||
// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_14.1 [symbolic = %pattern_type (constants.%pattern_type.c60)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_8.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc5_8.1 [symbolic = %pattern_type (constants.%pattern_type.c60)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc5_14.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc5_8.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Use(%T.loc8_9.2: %I.type) {
|
||||
@@ -137,7 +138,7 @@ fn Use(T:! I) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_14.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_8.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.c60
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+11
-10
@@ -43,7 +43,7 @@ interface Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
interface Interface {
|
||||
fn F[self: Self]();
|
||||
fn F(self);
|
||||
}
|
||||
|
||||
// --- fail_name_conflict_with_fn.carbon
|
||||
@@ -74,6 +74,7 @@ class Class;
|
||||
// CHECK:STDERR:
|
||||
interface Class { }
|
||||
|
||||
|
||||
// CHECK:STDOUT: --- fail_redefine_without_dependents.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -175,13 +176,13 @@ interface Class { }
|
||||
// CHECK:STDOUT: %self.param_patt: @Interface.WithSelf.F.%pattern_type (%pattern_type) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @Interface.WithSelf.F.%pattern_type (%pattern_type) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @Interface.WithSelf.F.%Self.as_type.loc14_14.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc14_14.1: type = splice_block %.loc14_14.2 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %self.param: @Interface.WithSelf.F.%Self.as_type.loc14_8.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc14_8.1: type = splice_block %.loc14_8.2 [symbolic = %Self.as_type.loc14_8.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref: %Interface.type.283524.2 = name_ref Self, @Interface.loc13.%Self [symbolic = %Self (constants.%Self.3ce02d.2)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc14_14.2: type = converted %Self.ref, %Self.as_type.loc14_14.2 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc14_8.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc14_8.2: type = converted %Self.ref, %Self.as_type.loc14_8.2 [symbolic = %Self.as_type.loc14_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @Interface.WithSelf.F.%Self.as_type.loc14_14.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: %self: @Interface.WithSelf.F.%Self.as_type.loc14_8.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.WithSelf.F.decl [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT:
|
||||
@@ -195,10 +196,10 @@ interface Class { }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Interface.WithSelf.F(@Interface.loc13.%Self: %Interface.type.283524.2) {
|
||||
// CHECK:STDOUT: %Self: %Interface.type.283524.2 = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.3ce02d.2)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc14_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc14_14.1 [symbolic = %pattern_type (constants.%pattern_type)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc14_8.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc14_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc14_8.1 [symbolic = %pattern_type (constants.%pattern_type)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: @Interface.WithSelf.F.%Self.as_type.loc14_14.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: fn(%self.param: @Interface.WithSelf.F.%Self.as_type.loc14_8.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Interface.WithSelf.loc4(constants.%Self.3ce02d.1) {}
|
||||
@@ -207,7 +208,7 @@ interface Class { }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Interface.WithSelf.F(constants.%Self.3ce02d.2) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self.3ce02d.2
|
||||
// CHECK:STDOUT: %Self.as_type.loc14_14.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc14_8.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+22
-22
@@ -60,10 +60,10 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
// CHECK:STDERR: fail_private_member.carbon:[[@LINE+4]]:3: error: `private` not allowed; requires class or file scope [ModifierPrivateNotAllowed]
|
||||
// CHECK:STDERR: private fn F[self: Self]();
|
||||
// CHECK:STDERR: private fn F(self);
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
private fn F[self: Self]();
|
||||
private fn F(self);
|
||||
}
|
||||
|
||||
// --- fail_protected_member.carbon
|
||||
@@ -72,10 +72,10 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
// CHECK:STDERR: fail_protected_member.carbon:[[@LINE+4]]:3: error: `protected` not allowed; requires class scope [ModifierProtectedNotAllowed]
|
||||
// CHECK:STDERR: protected fn F[self: Self]();
|
||||
// CHECK:STDERR: protected fn F(self);
|
||||
// CHECK:STDERR: ^~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
protected fn F[self: Self]();
|
||||
protected fn F(self);
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: --- fail_abstract.carbon
|
||||
@@ -191,13 +191,13 @@ interface I {
|
||||
// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc9_22.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.2 [symbolic = %Self.as_type.loc9_22.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc9_16.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc9_16.1: type = splice_block %.loc9_16.2 [symbolic = %Self.as_type.loc9_16.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc9_22.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_22.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc9_22.2: type = converted %Self.ref, %Self.as_type.loc9_22.2 [symbolic = %Self.as_type.loc9_22.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc9_16.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_16.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc9_16.2: type = converted %Self.ref, %Self.as_type.loc9_16.2 [symbolic = %Self.as_type.loc9_16.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc9_22.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc9_16.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT:
|
||||
@@ -211,17 +211,17 @@ interface I {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self: %I.type) {
|
||||
// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc9_22.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_22.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc9_22.1 [symbolic = %pattern_type (constants.%pattern_type)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc9_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_16.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc9_16.1 [symbolic = %pattern_type (constants.%pattern_type)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc9_22.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc9_16.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc9_22.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc9_16.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -254,13 +254,13 @@ interface I {
|
||||
// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc9_24.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc9_24.1: type = splice_block %.loc9_24.2 [symbolic = %Self.as_type.loc9_24.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc9_18.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [symbolic = %Self.as_type.loc9_18.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc9_24.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_24.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc9_24.2: type = converted %Self.ref, %Self.as_type.loc9_24.2 [symbolic = %Self.as_type.loc9_24.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc9_18.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_18.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc9_18.2: type = converted %Self.ref, %Self.as_type.loc9_18.2 [symbolic = %Self.as_type.loc9_18.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc9_24.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc9_18.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT:
|
||||
@@ -274,17 +274,17 @@ interface I {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self: %I.type) {
|
||||
// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc9_24.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_24.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc9_24.1 [symbolic = %pattern_type (constants.%pattern_type)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc9_18.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_18.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc9_18.1 [symbolic = %pattern_type (constants.%pattern_type)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc9_24.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc9_18.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc9_24.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc9_18.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+78
-75
@@ -42,17 +42,18 @@ library "dependent_return_type.carbon";
|
||||
|
||||
interface Interface {
|
||||
// TODO: This should be
|
||||
// default fn F[self: Self](U:! type, u: U*) -> U*;
|
||||
// default fn F(self, U:! type, u: U*) -> U*;
|
||||
// rather than a class member, but we don't currently accept that due to the
|
||||
// TODOs above.
|
||||
class C {
|
||||
fn F[self: Self](U:! type, u: U*) -> U*;
|
||||
fn F(self, U:! type, u: U*) -> U*;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: This should be
|
||||
// fn Interface.F[self: Self](U:! type, u: U*) -> U* { return u; }
|
||||
fn Interface.C.F[unused self: Self](U:! type, u: U*) -> U* { return u; }
|
||||
// fn Interface.F(self, U:! type, u: U*) -> U* { return u; }
|
||||
fn Interface.C.F(unused self, U:! type, u: U*) -> U* { return u; }
|
||||
|
||||
|
||||
// CHECK:STDOUT: --- fail_todo_define_default_fn_out_of_line.carbon
|
||||
// CHECK:STDOUT:
|
||||
@@ -217,36 +218,36 @@ fn Interface.C.F[unused self: Self](U:! type, u: U*) -> U* { return u; }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [concrete = constants.%Interface.type] {} {}
|
||||
// CHECK:STDOUT: %C.F.decl: %C.F.type = fn_decl @C.F [symbolic = constants.%C.F] {
|
||||
// CHECK:STDOUT: %self.param_patt: @C.F.%pattern_type.loc14_14 (%pattern_type.f25) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @C.F.%pattern_type.loc14_14 (%pattern_type.f25) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: %self.param_patt: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete]
|
||||
// CHECK:STDOUT: %u.param_patt: @C.F.%pattern_type.loc14_33 (%pattern_type.423) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %u.patt: @C.F.%pattern_type.loc14_33 (%pattern_type.423) = at_binding_pattern u, %u.param_patt [concrete]
|
||||
// CHECK:STDOUT: %return.param_patt: @C.F.%pattern_type.loc14_33 (%pattern_type.423) = out_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %return.patt: @C.F.%pattern_type.loc14_33 (%pattern_type.423) = return_slot_pattern %return.param_patt, %ptr.loc20_58 [concrete]
|
||||
// CHECK:STDOUT: %u.param_patt: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %u.patt: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = at_binding_pattern u, %u.param_patt [concrete]
|
||||
// CHECK:STDOUT: %return.param_patt: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = out_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %return.patt: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = return_slot_pattern %return.param_patt, %ptr.loc20_52 [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %U.ref.loc20_57: type = name_ref U, %U.loc20 [symbolic = %U.loc14_23.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %ptr.loc20_58: type = ptr_type %U.ref.loc20_57 [symbolic = %ptr.loc14_36.1 (constants.%ptr.18e)]
|
||||
// CHECK:STDOUT: %.loc20_58: Core.Form = init_form %ptr.loc20_58 [symbolic = %.loc14_43.1 (constants.%.6d8)]
|
||||
// CHECK:STDOUT: %U.ref.loc20_51: type = name_ref U, %U.loc20 [symbolic = %U.loc14_17.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %ptr.loc20_52: type = ptr_type %U.ref.loc20_51 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)]
|
||||
// CHECK:STDOUT: %.loc20_52: Core.Form = init_form %ptr.loc20_52 [symbolic = %.loc14_37.1 (constants.%.6d8)]
|
||||
// CHECK:STDOUT: %self.param.loc20: @C.F.%C (%C) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc20_31.1: type = splice_block %Self.ref.loc20 [symbolic = %C (constants.%C)] {
|
||||
// CHECK:STDOUT: %.loc20_31.2: type = specific_constant constants.%C, @C(constants.%Self.3ce) [symbolic = %C (constants.%C)]
|
||||
// CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, %.loc20_31.2 [symbolic = %C (constants.%C)]
|
||||
// CHECK:STDOUT: %.loc20_25.1: type = splice_block %Self.ref.loc20 [symbolic = %C (constants.%C)] {
|
||||
// CHECK:STDOUT: %.loc20_25.2: type = specific_constant constants.%C, @C(constants.%Self.3ce) [symbolic = %C (constants.%C)]
|
||||
// CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, %.loc20_25.2 [symbolic = %C (constants.%C)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self.loc20: @C.F.%C (%C) = value_binding self, %self.param.loc20
|
||||
// CHECK:STDOUT: %.loc20_41.1: type = splice_block %.loc20_41.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc20_35.1: type = splice_block %.loc20_35.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.loc20: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %.loc20_41.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc20_35.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc20: type = symbolic_binding U, 1 [symbolic = %U.loc14_23.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %u.param.loc20: @C.F.%ptr.loc14_36.1 (%ptr.18e) = value_param call_param1
|
||||
// CHECK:STDOUT: %.loc20_51: type = splice_block %ptr.loc20_51 [symbolic = %ptr.loc14_36.1 (constants.%ptr.18e)] {
|
||||
// CHECK:STDOUT: %U.ref.loc20_50: type = name_ref U, %U.loc20 [symbolic = %U.loc14_23.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %ptr.loc20_51: type = ptr_type %U.ref.loc20_50 [symbolic = %ptr.loc14_36.1 (constants.%ptr.18e)]
|
||||
// CHECK:STDOUT: %U.loc20: type = symbolic_binding U, 1 [symbolic = %U.loc14_17.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %u.param.loc20: @C.F.%ptr.loc14_30.1 (%ptr.18e) = value_param call_param1
|
||||
// CHECK:STDOUT: %.loc20_45: type = splice_block %ptr.loc20_45 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)] {
|
||||
// CHECK:STDOUT: %U.ref.loc20_44: type = name_ref U, %U.loc20 [symbolic = %U.loc14_17.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %ptr.loc20_45: type = ptr_type %U.ref.loc20_44 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %u.loc20: @C.F.%ptr.loc14_36.1 (%ptr.18e) = value_binding u, %u.param.loc20
|
||||
// CHECK:STDOUT: %return.param.loc20: ref @C.F.%ptr.loc14_36.1 (%ptr.18e) = out_param call_param2
|
||||
// CHECK:STDOUT: %return.loc20: ref @C.F.%ptr.loc14_36.1 (%ptr.18e) = return_slot %return.param.loc20
|
||||
// CHECK:STDOUT: %u.loc20: @C.F.%ptr.loc14_30.1 (%ptr.18e) = value_binding u, %u.param.loc20
|
||||
// CHECK:STDOUT: %return.param.loc20: ref @C.F.%ptr.loc14_30.1 (%ptr.18e) = out_param call_param2
|
||||
// CHECK:STDOUT: %return.loc20: ref @C.F.%ptr.loc14_30.1 (%ptr.18e) = return_slot %return.param.loc20
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -273,36 +274,36 @@ fn Interface.C.F[unused self: Self](U:! type, u: U*) -> U* { return u; }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %C.F.decl: @C.%C.F.type (%C.F.type) = fn_decl @C.F [symbolic = @C.%C.F (constants.%C.F)] {
|
||||
// CHECK:STDOUT: %self.param_patt: @C.F.%pattern_type.loc14_14 (%pattern_type.f25) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @C.F.%pattern_type.loc14_14 (%pattern_type.f25) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: %self.param_patt: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete]
|
||||
// CHECK:STDOUT: %u.param_patt: @C.F.%pattern_type.loc14_33 (%pattern_type.423) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %u.patt: @C.F.%pattern_type.loc14_33 (%pattern_type.423) = at_binding_pattern u, %u.param_patt [concrete]
|
||||
// CHECK:STDOUT: %return.param_patt: @C.F.%pattern_type.loc14_33 (%pattern_type.423) = out_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %return.patt: @C.F.%pattern_type.loc14_33 (%pattern_type.423) = return_slot_pattern %return.param_patt, %ptr.loc20_58 [concrete]
|
||||
// CHECK:STDOUT: %u.param_patt: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %u.patt: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = at_binding_pattern u, %u.param_patt [concrete]
|
||||
// CHECK:STDOUT: %return.param_patt: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = out_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %return.patt: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = return_slot_pattern %return.param_patt, %ptr.loc20_52 [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %U.ref.loc14_42: type = name_ref U, %U.loc14_23.2 [symbolic = %U.loc14_23.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %ptr.loc14_43: type = ptr_type %U.ref.loc14_42 [symbolic = %ptr.loc14_36.1 (constants.%ptr.18e)]
|
||||
// CHECK:STDOUT: %.loc14_43.2: Core.Form = init_form %ptr.loc14_43 [symbolic = %.loc14_43.1 (constants.%.6d8)]
|
||||
// CHECK:STDOUT: %U.ref.loc14_36: type = name_ref U, %U.loc14_17.2 [symbolic = %U.loc14_17.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %ptr.loc14_37: type = ptr_type %U.ref.loc14_36 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)]
|
||||
// CHECK:STDOUT: %.loc14_37.2: Core.Form = init_form %ptr.loc14_37 [symbolic = %.loc14_37.1 (constants.%.6d8)]
|
||||
// CHECK:STDOUT: %self.param.loc14: @C.F.%C (%C) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc14_16.1: type = splice_block %Self.ref.loc14 [symbolic = %C (constants.%C)] {
|
||||
// CHECK:STDOUT: %.loc14_16.2: type = specific_constant constants.%C, @C(constants.%Self.3ce) [symbolic = %C (constants.%C)]
|
||||
// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, %.loc14_16.2 [symbolic = %C (constants.%C)]
|
||||
// CHECK:STDOUT: %.loc14_10.1: type = splice_block %Self.ref.loc14 [symbolic = %C (constants.%C)] {
|
||||
// CHECK:STDOUT: %.loc14_10.2: type = specific_constant constants.%C, @C(constants.%Self.3ce) [symbolic = %C (constants.%C)]
|
||||
// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, %.loc14_10.2 [symbolic = %C (constants.%C)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self.loc14: @C.F.%C (%C) = value_binding self, %self.param.loc14
|
||||
// CHECK:STDOUT: %.loc14_26.1: type = splice_block %.loc14_26.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc14_20.1: type = splice_block %.loc14_20.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.loc14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %.loc14_26.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc14_20.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc14_23.2: type = symbolic_binding U, 1 [symbolic = %U.loc14_23.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %u.param.loc14: @C.F.%ptr.loc14_36.1 (%ptr.18e) = value_param call_param1
|
||||
// CHECK:STDOUT: %.loc14_36: type = splice_block %ptr.loc14_36.2 [symbolic = %ptr.loc14_36.1 (constants.%ptr.18e)] {
|
||||
// CHECK:STDOUT: %U.ref.loc14_35: type = name_ref U, %U.loc14_23.2 [symbolic = %U.loc14_23.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %ptr.loc14_36.2: type = ptr_type %U.ref.loc14_35 [symbolic = %ptr.loc14_36.1 (constants.%ptr.18e)]
|
||||
// CHECK:STDOUT: %U.loc14_17.2: type = symbolic_binding U, 1 [symbolic = %U.loc14_17.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %u.param.loc14: @C.F.%ptr.loc14_30.1 (%ptr.18e) = value_param call_param1
|
||||
// CHECK:STDOUT: %.loc14_30: type = splice_block %ptr.loc14_30.2 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)] {
|
||||
// CHECK:STDOUT: %U.ref.loc14_29: type = name_ref U, %U.loc14_17.2 [symbolic = %U.loc14_17.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %ptr.loc14_30.2: type = ptr_type %U.ref.loc14_29 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %u.loc14: @C.F.%ptr.loc14_36.1 (%ptr.18e) = value_binding u, %u.param.loc14
|
||||
// CHECK:STDOUT: %return.param.loc14: ref @C.F.%ptr.loc14_36.1 (%ptr.18e) = out_param call_param2
|
||||
// CHECK:STDOUT: %return.loc14: ref @C.F.%ptr.loc14_36.1 (%ptr.18e) = return_slot %return.param.loc14
|
||||
// CHECK:STDOUT: %u.loc14: @C.F.%ptr.loc14_30.1 (%ptr.18e) = value_binding u, %u.param.loc14
|
||||
// CHECK:STDOUT: %return.param.loc14: ref @C.F.%ptr.loc14_30.1 (%ptr.18e) = out_param call_param2
|
||||
// CHECK:STDOUT: %return.loc14: ref @C.F.%ptr.loc14_30.1 (%ptr.18e) = return_slot %return.param.loc14
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
@@ -313,34 +314,36 @@ fn Interface.C.F[unused self: Self](U:! type, u: U*) -> U* { return u; }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @C.F(@Interface.%Self: %Interface.type, %U.loc14_23.2: type) {
|
||||
// CHECK:STDOUT: generic fn @C.F(@Interface.%Self: %Interface.type, %U.loc14_17.2: type) {
|
||||
// CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.3ce)]
|
||||
// CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C)]
|
||||
// CHECK:STDOUT: %pattern_type.loc14_14: type = pattern_type %C [symbolic = %pattern_type.loc14_14 (constants.%pattern_type.f25)]
|
||||
// CHECK:STDOUT: %U.loc14_23.1: type = symbolic_binding U, 1 [symbolic = %U.loc14_23.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %ptr.loc14_36.1: type = ptr_type %U.loc14_23.1 [symbolic = %ptr.loc14_36.1 (constants.%ptr.18e)]
|
||||
// CHECK:STDOUT: %pattern_type.loc14_33: type = pattern_type %ptr.loc14_36.1 [symbolic = %pattern_type.loc14_33 (constants.%pattern_type.423)]
|
||||
// CHECK:STDOUT: %.loc14_43.1: Core.Form = init_form %ptr.loc14_36.1 [symbolic = %.loc14_43.1 (constants.%.6d8)]
|
||||
// CHECK:STDOUT: %pattern_type.loc14_10: type = pattern_type %C [symbolic = %pattern_type.loc14_10 (constants.%pattern_type.f25)]
|
||||
// CHECK:STDOUT: %U.loc14_17.1: type = symbolic_binding U, 1 [symbolic = %U.loc14_17.1 (constants.%U.091)]
|
||||
// CHECK:STDOUT: %ptr.loc14_30.1: type = ptr_type %U.loc14_17.1 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)]
|
||||
// CHECK:STDOUT: %pattern_type.loc14_27: type = pattern_type %ptr.loc14_30.1 [symbolic = %pattern_type.loc14_27 (constants.%pattern_type.423)]
|
||||
// CHECK:STDOUT: %.loc14_37.1: Core.Form = init_form %ptr.loc14_30.1 [symbolic = %.loc14_37.1 (constants.%.6d8)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete.loc20_29: <witness> = require_complete_type %C [symbolic = %require_complete.loc20_29 (constants.%require_complete.f37)]
|
||||
// CHECK:STDOUT: %require_complete.loc20_48: <witness> = require_complete_type %ptr.loc14_36.1 [symbolic = %require_complete.loc20_48 (constants.%require_complete.56d)]
|
||||
// CHECK:STDOUT: %.loc20_69.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc14_23.1) [symbolic = %.loc20_69.1 (constants.%.ddf)]
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc14_36.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.088)]
|
||||
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc14_36.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.da6)]
|
||||
// CHECK:STDOUT: %.loc20_69.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc20_69.2 (constants.%.a56)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc20_69.2: @C.F.%.loc20_69.2 (%.a56) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_69.2 (constants.%impl.elem0.fbe)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc20_69.2: <specific function> = specific_impl_function %impl.elem0.loc20_69.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc20_69.2 (constants.%specific_impl_fn.16d)]
|
||||
// CHECK:STDOUT: %require_complete.loc20_25: <witness> = require_complete_type %C [symbolic = %require_complete.loc20_25 (constants.%require_complete.f37)]
|
||||
// CHECK:STDOUT: %require_complete.loc20_42: <witness> = require_complete_type %ptr.loc14_30.1 [symbolic = %require_complete.loc20_42 (constants.%require_complete.56d)]
|
||||
// CHECK:STDOUT: %.loc20_63.2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc14_17.1) [symbolic = %.loc20_63.2 (constants.%.ddf)]
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc14_30.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.088)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc20_63.2: %Copy.type = facet_value %ptr.loc14_30.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc20_63.2 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc20_63.2) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.da6)]
|
||||
// CHECK:STDOUT: %.loc20_63.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc20_63.2 [symbolic = %.loc20_63.3 (constants.%.a56)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc20_63.2: @C.F.%.loc20_63.3 (%.a56) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_63.2 (constants.%impl.elem0.fbe)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc20_63.2: <specific function> = specific_impl_function %impl.elem0.loc20_63.2, @Copy.WithSelf.Op(%Copy.facet.loc20_63.2) [symbolic = %specific_impl_fn.loc20_63.2 (constants.%specific_impl_fn.16d)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param.loc20: @C.F.%C (%C), %u.param.loc20: @C.F.%ptr.loc14_36.1 (%ptr.18e)) -> out %return.param.loc20: @C.F.%ptr.loc14_36.1 (%ptr.18e) {
|
||||
// CHECK:STDOUT: fn(%self.param.loc20: @C.F.%C (%C), %u.param.loc20: @C.F.%ptr.loc14_30.1 (%ptr.18e)) -> out %return.param.loc20: @C.F.%ptr.loc14_30.1 (%ptr.18e) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %u.ref: @C.F.%ptr.loc14_36.1 (%ptr.18e) = name_ref u, %u.loc20
|
||||
// CHECK:STDOUT: %impl.elem0.loc20_69.1: @C.F.%.loc20_69.2 (%.a56) = impl_witness_access constants.%Copy.lookup_impl_witness.088, element0 [symbolic = %impl.elem0.loc20_69.2 (constants.%impl.elem0.fbe)]
|
||||
// CHECK:STDOUT: %bound_method.loc20_69.1: <bound method> = bound_method %u.ref, %impl.elem0.loc20_69.1
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc20_69.1: <specific function> = specific_impl_function %impl.elem0.loc20_69.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc20_69.2 (constants.%specific_impl_fn.16d)]
|
||||
// CHECK:STDOUT: %bound_method.loc20_69.2: <bound method> = bound_method %u.ref, %specific_impl_fn.loc20_69.1
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @C.F.%ptr.loc14_36.1 (%ptr.18e) = call %bound_method.loc20_69.2(%u.ref)
|
||||
// CHECK:STDOUT: %u.ref: @C.F.%ptr.loc14_30.1 (%ptr.18e) = name_ref u, %u.loc20
|
||||
// CHECK:STDOUT: %impl.elem0.loc20_63.1: @C.F.%.loc20_63.3 (%.a56) = impl_witness_access constants.%Copy.lookup_impl_witness.088, element0 [symbolic = %impl.elem0.loc20_63.2 (constants.%impl.elem0.fbe)]
|
||||
// CHECK:STDOUT: %bound_method.loc20_63.1: <bound method> = bound_method %u.ref, %impl.elem0.loc20_63.1
|
||||
// CHECK:STDOUT: %Copy.facet.loc20_63.1: %Copy.type = facet_value constants.%ptr.18e, (constants.%Copy.lookup_impl_witness.088) [symbolic = %Copy.facet.loc20_63.2 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %.loc20_63.1: %Copy.type = converted constants.%ptr.18e, %Copy.facet.loc20_63.1 [symbolic = %Copy.facet.loc20_63.2 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc20_63.1: <specific function> = specific_impl_function %impl.elem0.loc20_63.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc20_63.2 (constants.%specific_impl_fn.16d)]
|
||||
// CHECK:STDOUT: %bound_method.loc20_63.2: <bound method> = bound_method %u.ref, %specific_impl_fn.loc20_63.1
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @C.F.%ptr.loc14_30.1 (%ptr.18e) = call %bound_method.loc20_63.2(%u.ref)
|
||||
// CHECK:STDOUT: return %Copy.WithSelf.Op.call
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
@@ -357,10 +360,10 @@ fn Interface.C.F[unused self: Self](U:! type, u: U*) -> U* { return u; }
|
||||
// CHECK:STDOUT: specific @C.F(constants.%Self.3ce, constants.%U.091) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self.3ce
|
||||
// CHECK:STDOUT: %C => constants.%C
|
||||
// CHECK:STDOUT: %pattern_type.loc14_14 => constants.%pattern_type.f25
|
||||
// CHECK:STDOUT: %U.loc14_23.1 => constants.%U.091
|
||||
// CHECK:STDOUT: %ptr.loc14_36.1 => constants.%ptr.18e
|
||||
// CHECK:STDOUT: %pattern_type.loc14_33 => constants.%pattern_type.423
|
||||
// CHECK:STDOUT: %.loc14_43.1 => constants.%.6d8
|
||||
// CHECK:STDOUT: %pattern_type.loc14_10 => constants.%pattern_type.f25
|
||||
// CHECK:STDOUT: %U.loc14_17.1 => constants.%U.091
|
||||
// CHECK:STDOUT: %ptr.loc14_30.1 => constants.%ptr.18e
|
||||
// CHECK:STDOUT: %pattern_type.loc14_27 => constants.%pattern_type.423
|
||||
// CHECK:STDOUT: %.loc14_37.1 => constants.%.6d8
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
|
||||
interface I(_:! type) {
|
||||
// TODO: Use `default` here.
|
||||
fn F[ref self: Self]() -> Self*;
|
||||
fn F(ref self) -> Self*;
|
||||
}
|
||||
|
||||
fn I(_:! type).F[ref self: Self]() -> Self* {
|
||||
fn I(_:! type).F(ref self) -> Self* {
|
||||
return &self;
|
||||
}
|
||||
|
||||
+33
-26
@@ -83,6 +83,7 @@ fn CallIndirect() {
|
||||
CallGeneric((Y1, Y2) as type);
|
||||
}
|
||||
|
||||
|
||||
// CHECK:STDOUT: --- generic_method_fewer_params.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -461,13 +462,13 @@ fn CallIndirect() {
|
||||
// CHECK:STDOUT: %require_complete.loc16_19: <witness> = require_complete_type %ptr.loc16_22.1 [symbolic = %require_complete.loc16_19 (constants.%require_complete.ef162c.1)]
|
||||
// CHECK:STDOUT: %require_complete.loc16_25: <witness> = require_complete_type %tuple.type.loc16 [symbolic = %require_complete.loc16_25 (constants.%require_complete.44f)]
|
||||
// CHECK:STDOUT: %tuple.type.loc17: type = tuple_type (constants.%empty_struct_type, constants.%empty_struct_type, %ptr.loc16_22.1) [symbolic = %tuple.type.loc17 (constants.%tuple.type.dd2)]
|
||||
// CHECK:STDOUT: %.loc17_21.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc16_9.1) [symbolic = %.loc17_21.1 (constants.%.0e9)]
|
||||
// CHECK:STDOUT: %.loc17_21.2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc16_9.1) [symbolic = %.loc17_21.2 (constants.%.0e9)]
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc16_22.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)]
|
||||
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc16_22.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.302b)]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.884)]
|
||||
// CHECK:STDOUT: %.loc17_21.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc17_21.2 (constants.%.be5)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc17_21.2: @Y.as.A.impl.F.%.loc17_21.2 (%.be5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.484)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc17_21.2: <specific function> = specific_impl_function %impl.elem0.loc17_21.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.a76)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc17_21.2: %Copy.type = facet_value %ptr.loc16_22.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc17_21.2 (constants.%Copy.facet.302b)]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc17_21.2) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.884)]
|
||||
// CHECK:STDOUT: %.loc17_21.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc17_21.2 [symbolic = %.loc17_21.3 (constants.%.be5)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc17_21.2: @Y.as.A.impl.F.%.loc17_21.3 (%.be5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.484)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc17_21.2: <specific function> = specific_impl_function %impl.elem0.loc17_21.2, @Copy.WithSelf.Op(%Copy.facet.loc17_21.2) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.a76)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%u.param: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1)) -> out %return.param: @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.316) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
@@ -481,8 +482,10 @@ fn CallIndirect() {
|
||||
// CHECK:STDOUT: %tuple.elem1: ref %Y = tuple_access %return.param, element1
|
||||
// CHECK:STDOUT: %.loc17_18.2: init %Y to %tuple.elem1 = class_init () [concrete = constants.%Y.val]
|
||||
// CHECK:STDOUT: %.loc17_22.3: init %Y = converted %.loc17_18.1, %.loc17_18.2 [concrete = constants.%Y.val]
|
||||
// CHECK:STDOUT: %impl.elem0.loc17_21.1: @Y.as.A.impl.F.%.loc17_21.2 (%.be5) = impl_witness_access constants.%Copy.lookup_impl_witness.1da, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.484)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc17_21.1: @Y.as.A.impl.F.%.loc17_21.3 (%.be5) = impl_witness_access constants.%Copy.lookup_impl_witness.1da, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.484)]
|
||||
// CHECK:STDOUT: %bound_method.loc17_21.1: <bound method> = bound_method %u.ref, %impl.elem0.loc17_21.1
|
||||
// CHECK:STDOUT: %Copy.facet.loc17_21.1: %Copy.type = facet_value constants.%ptr.e8f8f9.1, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc17_21.2 (constants.%Copy.facet.302b)]
|
||||
// CHECK:STDOUT: %.loc17_21.1: %Copy.type = converted constants.%ptr.e8f8f9.1, %Copy.facet.loc17_21.1 [symbolic = %Copy.facet.loc17_21.2 (constants.%Copy.facet.302b)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc17_21.1: <specific function> = specific_impl_function %impl.elem0.loc17_21.1, @Copy.WithSelf.Op(constants.%Copy.facet.302b) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.a76)]
|
||||
// CHECK:STDOUT: %bound_method.loc17_21.2: <bound method> = bound_method %u.ref, %specific_impl_fn.loc17_21.1
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = call %bound_method.loc17_21.2(%u.ref)
|
||||
@@ -574,11 +577,11 @@ fn CallIndirect() {
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.as_type.loc28_4.2, constants.%ptr.415) [symbolic = %tuple.type (constants.%tuple.type.c2a)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.d14)]
|
||||
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.a02)]
|
||||
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.2f8)]
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.2ac)]
|
||||
// CHECK:STDOUT: %.loc28_12.3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc28_12.3 (constants.%.89c)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.3 (%.89c) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.a1a)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc28_12.2: <specific function> = specific_impl_function %impl.elem0.loc28_12.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.65e)]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc28_12.2: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc28_12.2 (constants.%Destroy.facet.2f8)]
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.loc28_12.2) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.2ac)]
|
||||
// CHECK:STDOUT: %.loc28_12.4: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet.loc28_12.2 [symbolic = %.loc28_12.4 (constants.%.89c)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.4 (%.89c) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.a1a)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc28_12.2: <specific function> = specific_impl_function %impl.elem0.loc28_12.2, @Destroy.WithSelf.Op(%Destroy.facet.loc28_12.2) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.65e)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
@@ -610,8 +613,10 @@ fn CallIndirect() {
|
||||
// CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.c2a) = temporary_storage
|
||||
// CHECK:STDOUT: %A.WithSelf.F.call: init @CallGeneric.%tuple.type (%tuple.type.c2a) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%addr)
|
||||
// CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.c2a) = temporary %.loc28_12.1, %A.WithSelf.F.call
|
||||
// CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.3 (%.89c) = impl_witness_access constants.%Destroy.lookup_impl_witness.a02, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.a1a)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.4 (%.89c) = impl_witness_access constants.%Destroy.lookup_impl_witness.a02, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.a1a)]
|
||||
// CHECK:STDOUT: %bound_method.loc28_12.1: <bound method> = bound_method %.loc28_12.2, %impl.elem0.loc28_12.1
|
||||
// CHECK:STDOUT: %Destroy.facet.loc28_12.1: %Destroy.type = facet_value constants.%tuple.type.c2a, (constants.%Destroy.lookup_impl_witness.a02) [symbolic = %Destroy.facet.loc28_12.2 (constants.%Destroy.facet.2f8)]
|
||||
// CHECK:STDOUT: %.loc28_12.3: %Destroy.type = converted constants.%tuple.type.c2a, %Destroy.facet.loc28_12.1 [symbolic = %Destroy.facet.loc28_12.2 (constants.%Destroy.facet.2f8)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc28_12.1: <specific function> = specific_impl_function %impl.elem0.loc28_12.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.2f8) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.65e)]
|
||||
// CHECK:STDOUT: %bound_method.loc28_12.2: <bound method> = bound_method %.loc28_12.2, %specific_impl_fn.loc28_12.1
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2)
|
||||
@@ -721,11 +726,11 @@ fn CallIndirect() {
|
||||
// CHECK:STDOUT: %require_complete.loc16_19 => constants.%complete_type.458
|
||||
// CHECK:STDOUT: %require_complete.loc16_25 => constants.%complete_type.dec
|
||||
// CHECK:STDOUT: %tuple.type.loc17 => constants.%tuple.type.2c5
|
||||
// CHECK:STDOUT: %.loc17_21.1 => constants.%.072
|
||||
// CHECK:STDOUT: %.loc17_21.2 => constants.%.072
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.d9a
|
||||
// CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.302f
|
||||
// CHECK:STDOUT: %Copy.facet.loc17_21.2 => constants.%Copy.facet.302f
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.b68
|
||||
// CHECK:STDOUT: %.loc17_21.2 => constants.%.6df
|
||||
// CHECK:STDOUT: %.loc17_21.3 => constants.%.6df
|
||||
// CHECK:STDOUT: %impl.elem0.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.ebe
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.specific_fn
|
||||
// CHECK:STDOUT: }
|
||||
@@ -785,9 +790,9 @@ fn CallIndirect() {
|
||||
// CHECK:STDOUT: %tuple.type => constants.%tuple.type.2cd
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.dec
|
||||
// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.df9cc1.5
|
||||
// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.e95
|
||||
// CHECK:STDOUT: %Destroy.facet.loc28_12.2 => constants.%Destroy.facet.e95
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.964
|
||||
// CHECK:STDOUT: %.loc28_12.3 => constants.%.41a
|
||||
// CHECK:STDOUT: %.loc28_12.4 => constants.%.41a
|
||||
// CHECK:STDOUT: %impl.elem0.loc28_12.2 => constants.%Destroy.Op.1a2547.5
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%Destroy.Op.1a2547.5
|
||||
// CHECK:STDOUT: }
|
||||
@@ -1313,11 +1318,11 @@ fn CallIndirect() {
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.as_type.loc28_4.2, constants.%Z) [symbolic = %tuple.type (constants.%tuple.type.036)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.4e1)]
|
||||
// CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.8dc)]
|
||||
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.fef)]
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.937)]
|
||||
// CHECK:STDOUT: %.loc28_12.3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc28_12.3 (constants.%.93b)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.3 (%.93b) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.743)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc28_12.2: <specific function> = specific_impl_function %impl.elem0.loc28_12.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.618)]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc28_12.2: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc28_12.2 (constants.%Destroy.facet.fef)]
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.loc28_12.2) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.937)]
|
||||
// CHECK:STDOUT: %.loc28_12.4: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet.loc28_12.2 [symbolic = %.loc28_12.4 (constants.%.93b)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.4 (%.93b) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.743)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc28_12.2: <specific function> = specific_impl_function %impl.elem0.loc28_12.2, @Destroy.WithSelf.Op(%Destroy.facet.loc28_12.2) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.618)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
@@ -1338,8 +1343,10 @@ fn CallIndirect() {
|
||||
// CHECK:STDOUT: %.loc28_11.6: %Z = acquire_value %.loc28_11.5 [concrete = constants.%Z.val]
|
||||
// CHECK:STDOUT: %A.WithSelf.F.call: init @CallGeneric.%tuple.type (%tuple.type.036) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%.loc28_11.6)
|
||||
// CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.036) = temporary %.loc28_12.1, %A.WithSelf.F.call
|
||||
// CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.3 (%.93b) = impl_witness_access constants.%Destroy.lookup_impl_witness.8dc, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.743)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.4 (%.93b) = impl_witness_access constants.%Destroy.lookup_impl_witness.8dc, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.743)]
|
||||
// CHECK:STDOUT: %bound_method.loc28_12.1: <bound method> = bound_method %.loc28_12.2, %impl.elem0.loc28_12.1
|
||||
// CHECK:STDOUT: %Destroy.facet.loc28_12.1: %Destroy.type = facet_value constants.%tuple.type.036, (constants.%Destroy.lookup_impl_witness.8dc) [symbolic = %Destroy.facet.loc28_12.2 (constants.%Destroy.facet.fef)]
|
||||
// CHECK:STDOUT: %.loc28_12.3: %Destroy.type = converted constants.%tuple.type.036, %Destroy.facet.loc28_12.1 [symbolic = %Destroy.facet.loc28_12.2 (constants.%Destroy.facet.fef)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc28_12.1: <specific function> = specific_impl_function %impl.elem0.loc28_12.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.fef) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.618)]
|
||||
// CHECK:STDOUT: %bound_method.loc28_12.2: <bound method> = bound_method %.loc28_12.2, %specific_impl_fn.loc28_12.1
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2)
|
||||
@@ -1583,9 +1590,9 @@ fn CallIndirect() {
|
||||
// CHECK:STDOUT: %tuple.type => constants.%tuple.type.d40
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.8f6
|
||||
// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.df9cc1.7
|
||||
// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.50b
|
||||
// CHECK:STDOUT: %Destroy.facet.loc28_12.2 => constants.%Destroy.facet.50b
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.43f
|
||||
// CHECK:STDOUT: %.loc28_12.3 => constants.%.3d3
|
||||
// CHECK:STDOUT: %.loc28_12.4 => constants.%.3d3
|
||||
// CHECK:STDOUT: %impl.elem0.loc28_12.2 => constants.%Destroy.Op.1a2547.7
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%Destroy.Op.1a2547.7
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+12
-12
@@ -14,10 +14,10 @@
|
||||
|
||||
fn F() {
|
||||
interface I {
|
||||
fn G[self: Self]();
|
||||
fn G(self);
|
||||
}
|
||||
impl () as I {
|
||||
fn G[unused self: Self]() {}
|
||||
fn G(unused self) {}
|
||||
}
|
||||
().(I.G)();
|
||||
}
|
||||
@@ -64,13 +64,13 @@ fn F() {
|
||||
// CHECK:STDOUT: %self.param_patt: @I.WithSelf.G.%pattern_type (%pattern_type.4d0) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @I.WithSelf.G.%pattern_type (%pattern_type.4d0) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.G.%Self.as_type.loc17_16.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc17_16.1: type = splice_block %.loc17_16.2 [symbolic = %Self.as_type.loc17_16.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.G.%Self.as_type.loc17_10.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc17_10.1: type = splice_block %.loc17_10.2 [symbolic = %Self.as_type.loc17_10.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc17_16.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc17_16.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc17_16.2: type = converted %Self.ref, %Self.as_type.loc17_16.2 [symbolic = %Self.as_type.loc17_16.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc17_10.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc17_10.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc17_10.2: type = converted %Self.ref, %Self.as_type.loc17_10.2 [symbolic = %Self.as_type.loc17_10.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @I.WithSelf.G.%Self.as_type.loc17_16.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: %self: @I.WithSelf.G.%Self.as_type.loc17_10.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.G.decl [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT:
|
||||
@@ -121,10 +121,10 @@ fn F() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @I.WithSelf.G(@I.%Self: %I.type) {
|
||||
// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc17_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc17_16.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc17_16.1 [symbolic = %pattern_type (constants.%pattern_type.4d0)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc17_10.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc17_10.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc17_10.1 [symbolic = %pattern_type (constants.%pattern_type.4d0)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.G.%Self.as_type.loc17_16.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.G.%Self.as_type.loc17_10.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @empty_tuple.type.as.I.impl.G(%self.param: %empty_tuple.type) {
|
||||
@@ -141,7 +141,7 @@ fn F() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf.G(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc17_16.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc17_10.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.4d0
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -154,7 +154,7 @@ fn F() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf.G(constants.%I.facet) {
|
||||
// CHECK:STDOUT: %Self => constants.%I.facet
|
||||
// CHECK:STDOUT: %Self.as_type.loc17_16.1 => constants.%empty_tuple.type
|
||||
// CHECK:STDOUT: %Self.as_type.loc17_10.1 => constants.%empty_tuple.type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+10
-7
@@ -52,6 +52,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
|
||||
return I.nonesuch;
|
||||
}
|
||||
|
||||
|
||||
// CHECK:STDOUT: --- member_access.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -236,14 +237,14 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
|
||||
// CHECK:STDOUT: %assoc0: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.61f) = assoc_entity element0, @Interface.WithSelf.%X [symbolic = %assoc0 (constants.%assoc0.199)]
|
||||
// CHECK:STDOUT: %Interface.lookup_impl_witness: <witness> = lookup_impl_witness %I.loc8_29.1, @Interface, @Interface(%T.loc8_19.1) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.ffe)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_11.3: @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.3 (constants.%impl.elem0.602)]
|
||||
// CHECK:STDOUT: %.loc9_11.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc8_19.1) [symbolic = %.loc9_11.3 (constants.%.0e9)]
|
||||
// CHECK:STDOUT: %.loc9_11.4: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc8_19.1) [symbolic = %.loc9_11.4 (constants.%.0e9)]
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc8_50.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)]
|
||||
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc8_50.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.302)]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.884)]
|
||||
// CHECK:STDOUT: %.loc9_11.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc9_11.4 (constants.%.be5)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_11.4: @AccessGeneric.%.loc9_11.4 (%.be5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.484)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc9_11.2: %Copy.type = facet_value %ptr.loc8_50.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc9_11.2 (constants.%Copy.facet.302)]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc9_11.2) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.884)]
|
||||
// CHECK:STDOUT: %.loc9_11.5: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc9_11.2 [symbolic = %.loc9_11.5 (constants.%.be5)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_11.4: @AccessGeneric.%.loc9_11.5 (%.be5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.484)]
|
||||
// CHECK:STDOUT: %bound_method.loc9_11.3: <bound method> = bound_method %impl.elem0.loc9_11.3, %impl.elem0.loc9_11.4 [symbolic = %bound_method.loc9_11.3 (constants.%bound_method.602)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc9_11.2: <specific function> = specific_impl_function %impl.elem0.loc9_11.4, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.a76)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc9_11.2: <specific function> = specific_impl_function %impl.elem0.loc9_11.4, @Copy.WithSelf.Op(%Copy.facet.loc9_11.2) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.a76)]
|
||||
// CHECK:STDOUT: %bound_method.loc9_11.4: <bound method> = bound_method %impl.elem0.loc9_11.3, %specific_impl_fn.loc9_11.2 [symbolic = %bound_method.loc9_11.4 (constants.%bound_method.060)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() -> out %return.param: @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) {
|
||||
@@ -254,8 +255,10 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
|
||||
// CHECK:STDOUT: %.loc9_11.2: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.61f) = specific_constant @X.%assoc0, @Interface.WithSelf(constants.%T.67d, constants.%I.63c) [symbolic = %assoc0 (constants.%assoc0.199)]
|
||||
// CHECK:STDOUT: %X.ref: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.61f) = name_ref X, %.loc9_11.2 [symbolic = %assoc0 (constants.%assoc0.199)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_11.1: @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = impl_witness_access constants.%Interface.lookup_impl_witness.ffe, element0 [symbolic = %impl.elem0.loc9_11.3 (constants.%impl.elem0.602)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%.loc9_11.4 (%.be5) = impl_witness_access constants.%Copy.lookup_impl_witness.1da, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.484)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%.loc9_11.5 (%.be5) = impl_witness_access constants.%Copy.lookup_impl_witness.1da, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.484)]
|
||||
// CHECK:STDOUT: %bound_method.loc9_11.1: <bound method> = bound_method %impl.elem0.loc9_11.1, %impl.elem0.loc9_11.2 [symbolic = %bound_method.loc9_11.3 (constants.%bound_method.602)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc9_11.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc9_11.2 (constants.%Copy.facet.302)]
|
||||
// CHECK:STDOUT: %.loc9_11.3: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc9_11.1 [symbolic = %Copy.facet.loc9_11.2 (constants.%Copy.facet.302)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: <specific function> = specific_impl_function %impl.elem0.loc9_11.2, @Copy.WithSelf.Op(constants.%Copy.facet.302) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.a76)]
|
||||
// CHECK:STDOUT: %bound_method.loc9_11.2: <bound method> = bound_method %impl.elem0.loc9_11.1, %specific_impl_fn.loc9_11.1 [symbolic = %bound_method.loc9_11.4 (constants.%bound_method.060)]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = call %bound_method.loc9_11.2(%impl.elem0.loc9_11.1)
|
||||
|
||||
+21
-20
@@ -13,9 +13,10 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/self.carbon
|
||||
|
||||
interface UseSelf {
|
||||
fn F[self: Self]() -> Self;
|
||||
fn F(self) -> Self;
|
||||
}
|
||||
|
||||
|
||||
// CHECK:STDOUT: --- self.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -46,21 +47,21 @@ interface UseSelf {
|
||||
// CHECK:STDOUT: %self.param_patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type) = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %self.patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type) = at_binding_pattern self, %self.param_patt [concrete]
|
||||
// CHECK:STDOUT: %return.param_patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type) = out_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %return.patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type) = return_slot_pattern %return.param_patt, %.loc16_25.2 [concrete]
|
||||
// CHECK:STDOUT: %return.patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type) = return_slot_pattern %return.param_patt, %.loc16_17.2 [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %Self.ref.loc16_25: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc16_25: type = facet_access_type %Self.ref.loc16_25 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc16_25.2: type = converted %Self.ref.loc16_25, %Self.as_type.loc16_25 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc16_25.3: Core.Form = init_form %.loc16_25.2 [symbolic = %.loc16_25.1 (constants.%.326)]
|
||||
// CHECK:STDOUT: %self.param: @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref.loc16_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc16_14.2: type = facet_access_type %Self.ref.loc16_14 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc16_14.2: type = converted %Self.ref.loc16_14, %Self.as_type.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %Self.ref.loc16_17: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc16_17: type = facet_access_type %Self.ref.loc16_17 [symbolic = %Self.as_type.loc16_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc16_17.2: type = converted %Self.ref.loc16_17, %Self.as_type.loc16_17 [symbolic = %Self.as_type.loc16_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc16_17.3: Core.Form = init_form %.loc16_17.2 [symbolic = %.loc16_17.1 (constants.%.326)]
|
||||
// CHECK:STDOUT: %self.param: @UseSelf.WithSelf.F.%Self.as_type.loc16_8.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc16_8.1: type = splice_block %.loc16_8.2 [symbolic = %Self.as_type.loc16_8.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref.loc16_8: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc16_8.2: type = facet_access_type %Self.ref.loc16_8 [symbolic = %Self.as_type.loc16_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc16_8.2: type = converted %Self.ref.loc16_8, %Self.as_type.loc16_8.2 [symbolic = %Self.as_type.loc16_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: %return.param: ref @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type) = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type) = return_slot %return.param
|
||||
// CHECK:STDOUT: %self: @UseSelf.WithSelf.F.%Self.as_type.loc16_8.1 (%Self.as_type) = value_binding self, %self.param
|
||||
// CHECK:STDOUT: %return.param: ref @UseSelf.WithSelf.F.%Self.as_type.loc16_8.1 (%Self.as_type) = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref @UseSelf.WithSelf.F.%Self.as_type.loc16_8.1 (%Self.as_type) = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %UseSelf.assoc_type = assoc_entity element0, %UseSelf.WithSelf.F.decl [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT:
|
||||
@@ -74,19 +75,19 @@ interface UseSelf {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @UseSelf.WithSelf.F(@UseSelf.%Self: %UseSelf.type) {
|
||||
// CHECK:STDOUT: %Self: %UseSelf.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc16_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc16_14.1 [symbolic = %pattern_type (constants.%pattern_type)]
|
||||
// CHECK:STDOUT: %.loc16_25.1: Core.Form = init_form %Self.as_type.loc16_14.1 [symbolic = %.loc16_25.1 (constants.%.326)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc16_8.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc16_8.1 [symbolic = %pattern_type (constants.%pattern_type)]
|
||||
// CHECK:STDOUT: %.loc16_17.1: Core.Form = init_form %Self.as_type.loc16_8.1 [symbolic = %.loc16_17.1 (constants.%.326)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type)) -> out %return.param: @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type);
|
||||
// CHECK:STDOUT: fn(%self.param: @UseSelf.WithSelf.F.%Self.as_type.loc16_8.1 (%Self.as_type)) -> out %return.param: @UseSelf.WithSelf.F.%Self.as_type.loc16_8.1 (%Self.as_type);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @UseSelf.WithSelf(constants.%Self) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @UseSelf.WithSelf.F(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc16_8.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type
|
||||
// CHECK:STDOUT: %.loc16_25.1 => constants.%.326
|
||||
// CHECK:STDOUT: %.loc16_17.1 => constants.%.326
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user