diff --git a/docs/design/generics/details.md b/docs/design/generics/details.md index f97d8d515073..4b14be7b5be2 100644 --- a/docs/design/generics/details.md +++ b/docs/design/generics/details.md @@ -3337,15 +3337,14 @@ the expression `G.E.N.E.N` is one equality away from `G.N.E.N` and so it is allowed. This is true even though `G.N.E.N` isn't the type expression immediately prior to `G.E.N.E.N`. -An `observe` declaration inside an `interface` definition may only refer to -names dependent on: +An `observe` declaration inside an `interface` definition refers to related +values, which are type expressions dependent on at least one of: -- `.Self`, -- generic parameters, and -- associated constants that are part of the enclosing `interface`. +- a generic parameter, including `Self`, or +- an associated constant that is part of the enclosing `interface`. -Equivalence chains may include at most one unrelated value. -`observe .. == .. impls` declarations may include unrelated values that +Inside an `interface`, equivalence chains may include at most one unrelated +value. `observe .. == .. impls` declarations may include unrelated values that immediately satisfy the `impls` constraint. The `observe` declaration in the example below is allowed because `X.T` and diff --git a/toolchain/check/testdata/interface/observe.carbon b/toolchain/check/testdata/interface/observe.carbon index 1d5c394815b4..d52b4ab59ccc 100644 --- a/toolchain/check/testdata/interface/observe.carbon +++ b/toolchain/check/testdata/interface/observe.carbon @@ -38,17 +38,12 @@ import library "transitive"; fn F[T: Transitive](t: T) { var a: T.A = t.GetA(); - // CHECK:STDERR: fail_todo_equivalent.carbon:[[@LINE+3]]:3-12: error: cannot implicitly convert expression of type `T.(Transitive.A)` to `T.(Transitive.B)` [ConversionFailure] - // CHECK:STDERR: fail_todo_equivalent.carbon:[[@LINE+2]]:3-12: note: type `T.(Transitive.A)` does not implement interface `Core.ImplicitAs(T.(Transitive.B))` [MissingImplInMemberAccessInContext] + // CHECK:STDERR: fail_todo_equivalent.carbon:[[@LINE+4]]:3-13: error: cannot convert type `T.(Transitive.A)` that implements `Core.Destroy & P` into type implementing `Core.Destroy & R where...` [ConversionFailureFacetToFacet] + // CHECK:STDERR: imported from: fail_todo_equivalent.carbon:[[@LINE-6]]:1 [InImport] + // CHECK:STDERR: transitive.carbon:14:3-24: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: - var b: T.B = a; - b.InQ(); + t.TakesC(a); - // CHECK:STDERR: fail_todo_equivalent.carbon:[[@LINE+4]]:3-15: error: cannot convert type `T.(Transitive.A)` that implements `Core.Destroy & P` into type implementing `R` [ConversionFailureFacetToFacet] - // CHECK:STDERR: imported from: fail_todo_equivalent.carbon:[[@LINE-12]]:1 [InImport] - // CHECK:STDERR: transitive.carbon:5:15-27: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: - a.(T.C.InR)(); // CHECK:STDERR: fail_todo_equivalent.carbon:[[@LINE+3]]:4-11: error: cannot convert expression of type `T.(Transitive.A)` to `T.(Transitive.C)` with `as` [ConversionFailure] // CHECK:STDERR: fail_todo_equivalent.carbon:[[@LINE+2]]:4-11: note: type `T.(Transitive.A)` does not implement interface `Core.As(T.(Transitive.C))` [MissingImplInMemberAccessInContext] // CHECK:STDERR: @@ -112,22 +107,6 @@ fn G[T: Transitive](t: T) { TakesPQR(a); } -// --- fail_todo_same_observe_in_both_scopes.carbon -library "[[@TEST_NAME]]"; - -import library "transitive"; - -fn G[T: Transitive](t: T) { - observe T.A == T.B == T.C; - - var a: T.A = t.GetA(); - // CHECK:STDERR: fail_todo_same_observe_in_both_scopes.carbon:[[@LINE+4]]:3-15: error: cannot convert type `T.(Transitive.A)` that implements `Core.Destroy & P` into type implementing `R` [ConversionFailureFacetToFacet] - // CHECK:STDERR: imported from: fail_todo_same_observe_in_both_scopes.carbon:[[@LINE-7]]:1 [InImport] - // CHECK:STDERR: transitive.carbon:5:15-27: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: - a.(T.C.InR)(); -} - // --- blanket_impls.carbon library "[[@TEST_NAME]]"; @@ -153,22 +132,78 @@ fn RequiresA[T: A](x: T) { } //@dump-sem-ir-end +// --- fail_todo_observe_from_type_of_assoc_constant.carbon +library "[[@TEST_NAME]]"; + +import library "transitive"; + +interface Z { + // Transitive contains an observe statement which we use through `Z1`. + let Z1: Transitive; +} + +fn F[U: Z](t: U.Z1) { + var a: U.Z1.A = t.GetA(); + + // Depends on the observe statement in Transitive, which is the type of `Z1`. + // CHECK:STDERR: fail_todo_observe_from_type_of_assoc_constant.carbon:[[@LINE+4]]:3-13: error: cannot convert type `U.(Z.Z1).(Transitive.A)` that implements `Core.Destroy & P` into type implementing `Core.Destroy & R where...` [ConversionFailureFacetToFacet] + // CHECK:STDERR: imported from: fail_todo_observe_from_type_of_assoc_constant.carbon:[[@LINE-12]]:1 [InImport] + // CHECK:STDERR: transitive.carbon:14:3-24: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: + t.TakesC(a); + + // CHECK:STDERR: fail_todo_observe_from_type_of_assoc_constant.carbon:[[@LINE+2]]:9-11: error: member name `T` not found in `Z` [MemberNameNotFoundInSpecificScope] + // CHECK:STDERR: + (a as U.T.C).InR(); +} + +// --- fail_todo_observe_nested_associated_constants.carbon +library "[[@TEST_NAME]]"; + +interface Z { + let A: Core.Destroy; + let B: (type where .Self == A) & Core.Destroy; + let C: (type where .Self == B) & Core.Destroy; + + fn GetA(self) -> A; + fn TakesC(self, c: C); +} + +interface Y { + let Y1: Z; + + // Observes in an interface about associated constants in an associated + // constant. This is allowed in this scope since `Y1`, which is named in this + // scope, is present in all of the observed names + observe Y1.A == Y1.B == Y1.C; +} + +fn F[T: Y](t: T.Y1) { + var a: T.Y1.A = t.GetA(); + + // CHECK:STDERR: fail_todo_observe_nested_associated_constants.carbon:[[@LINE+3]]:3-13: error: cannot convert type `T.(Y.Y1).(Z.A)` that implements `Core.Destroy` into type implementing `Core.Destroy where...` [ConversionFailureFacetToFacet] + // CHECK:STDERR: fail_todo_observe_nested_associated_constants.carbon:[[@LINE-16]]:3-24: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: + t.TakesC(a); +} + // --- fail_todo_nested_functions_in_outer.carbon library "[[@TEST_NAME]]"; interface A {} interface B {} +interface C {} //@dump-sem-ir-begin -fn RequiresA[T: A](unused x: T) {} -fn F[T: A, U: B where .Self == T]() { - observe T == U; +fn TakesA[T: A](unused x: T) {} +fn F[T: A, U: B where .Self == T, V: C where .Self == U]() { + observe T == U == V; - fn InnerF(x: U) { - // CHECK:STDERR: fail_todo_nested_functions_in_outer.carbon:[[@LINE+3]]:5-16: error: cannot convert type `U` that implements `B where...` into type implementing `A` [ConversionFailureFacetToFacet] - // CHECK:STDERR: fail_todo_nested_functions_in_outer.carbon:[[@LINE-6]]:1-33: note: while deducing parameters of generic declared here [DeductionGenericHere] + fn InnerF(x: V) { + // CHECK:STDERR: fail_todo_nested_functions_in_outer.carbon:[[@LINE+3]]:5-13: error: cannot convert type `V` that implements `C where...` into type implementing `A` [ConversionFailureFacetToFacet] + // CHECK:STDERR: fail_todo_nested_functions_in_outer.carbon:[[@LINE-6]]:1-30: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: - RequiresA(x); + TakesA(x); } } //@dump-sem-ir-end @@ -178,17 +213,17 @@ library "[[@TEST_NAME]]"; interface A {} interface B {} +interface C {} -fn RequiresA[T: A](unused x: T) {} -fn F[T: A, U: B where .Self == T]() { +fn TakesA[T: A](unused x: T) {} +fn F[T: A, U: B where .Self == T, V: C where .Self == U]() { + fn InnerF(x: V) { + observe T == U == V; - fn InnerF(x: U) { - observe T == U; - - // CHECK:STDERR: fail_todo_nested_functions_in_inner.carbon:[[@LINE+3]]:5-16: error: cannot convert type `U` that implements `B where...` into type implementing `A` [ConversionFailureFacetToFacet] - // CHECK:STDERR: fail_todo_nested_functions_in_inner.carbon:[[@LINE-7]]:1-33: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fail_todo_nested_functions_in_inner.carbon:[[@LINE+3]]:5-13: error: cannot convert type `V` that implements `C where...` into type implementing `A` [ConversionFailureFacetToFacet] + // CHECK:STDERR: fail_todo_nested_functions_in_inner.carbon:[[@LINE-6]]:1-30: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: - RequiresA(x); + TakesA(x); } } @@ -197,18 +232,19 @@ library "[[@TEST_NAME]]"; interface A {} interface B {} +interface C {} -fn RequiresA[T: A](unused x: T) {} -fn F[T: A, U: B where .Self == T]() { +fn TakesA[T: A](unused x: T) {} +fn F[T: A, U: B where .Self == T, V: C where .Self == U]() { - fn InnerF(x: U) { - // CHECK:STDERR: fail_nested_functions_lexical_order.carbon:[[@LINE+3]]:5-16: error: cannot convert type `U` that implements `B where...` into type implementing `A` [ConversionFailureFacetToFacet] - // CHECK:STDERR: fail_nested_functions_lexical_order.carbon:[[@LINE-5]]:1-33: note: while deducing parameters of generic declared here [DeductionGenericHere] + fn InnerF(x: V) { + // CHECK:STDERR: fail_nested_functions_lexical_order.carbon:[[@LINE+3]]:5-13: error: cannot convert type `V` that implements `C where...` into type implementing `A` [ConversionFailureFacetToFacet] + // CHECK:STDERR: fail_nested_functions_lexical_order.carbon:[[@LINE-5]]:1-30: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: - RequiresA(x); + TakesA(x); } - observe T == U; + observe T == U == V; } // --- fail_nested_functions_leak_upward.carbon @@ -216,18 +252,19 @@ library "[[@TEST_NAME]]"; interface A {} interface B {} +interface C {} -fn RequiresA[T: A](unused x: T) {} -fn F[T: A, U: B where .Self == T](x: U) { +fn TakesA[T: A](unused x: T) {} +fn F[T: A, U: B where .Self == T, V: C where .Self == U](x: V) { - fn InnerF(unused x: U) { - observe T == U; + fn InnerF() { + observe T == U == V; } - // CHECK:STDERR: fail_nested_functions_leak_upward.carbon:[[@LINE+3]]:3-14: error: cannot convert type `U` that implements `B where...` into type implementing `A` [ConversionFailureFacetToFacet] - // CHECK:STDERR: fail_nested_functions_leak_upward.carbon:[[@LINE-8]]:1-33: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fail_nested_functions_leak_upward.carbon:[[@LINE+3]]:3-11: error: cannot convert type `V` that implements `C where...` into type implementing `A` [ConversionFailureFacetToFacet] + // CHECK:STDERR: fail_nested_functions_leak_upward.carbon:[[@LINE-8]]:1-30: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: - RequiresA(x); + TakesA(x); } // --- fail_not_observed.carbon @@ -235,13 +272,13 @@ library "[[@TEST_NAME]]"; interface A {} interface B {} +interface C {} -fn RequiresA[T: A](unused x: T) {} -fn F[T: A, U: B where .Self == T, V: B](x: U) { - observe T == V; +fn TakesA[T: A](unused x: T) {} +fn F[T: A, U: B where .Self == T, V: C where .Self == U](x: V) { + observe T == U; - // CHECK:STDERR: fail_not_observed.carbon:[[@LINE+3]]:3-14: error: cannot convert type `U` that implements `B where...` into type implementing `A` [ConversionFailureFacetToFacet] - // CHECK:STDERR: fail_not_observed.carbon:[[@LINE-5]]:1-33: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fail_not_observed.carbon:[[@LINE+2]]:3-11: error: name `RequiresA` not found [NameNotFound] // CHECK:STDERR: RequiresA(x); } @@ -261,6 +298,71 @@ fn F[T: A, U: B](x: U) { TakesA(x); } +// --- todo_fail_not_equivalent.carbon +library "[[@TEST_NAME]]"; + +interface A {} +interface B {} + +fn F(generic T: A, generic U: B) { + // TODO: This should be diagnosed, since T and U are not equal by a + // single same-type `where` equality constraint. + observe T == U; +} + +// --- interface_assoc_const_equivalent_to_external_type.carbon +library "[[@TEST_NAME]]"; + +class C; + +interface A { + let A1: type where .Self == C; + observe A1 == C; +} + +// --- interface_generic_param_equivalent_to_external_type.carbon +library "[[@TEST_NAME]]"; + +class C; + +interface A(T: type where .Self == C) { + observe T == C; +} + +// --- interface_enclosing_generic_param_equivalent_to_external_type.carbon +library "[[@TEST_NAME]]"; + +class C; + +class D(T: type where .Self == C) { + interface A { + observe T == C; + } +} + +// --- interface_generic_self_equivalent_to_external_type.carbon +library "[[@TEST_NAME]]"; + +class C; + +interface A { + let A1: type where .Self == Self and .Self == C; + observe A1 == Self == C; +} + +// --- todo_fail_interface_makes_external_equivalence.carbon +library "[[@TEST_NAME]]"; + +class C; + +interface A { + let A1: type where .Self == C; + // TODO: This should be diagnosed, even though it is true, as `C` is not + // dependent on `Self`, on a generic parameter, nor an associated + // constant. All but one type must be. + observe A == C == C; +} + // --- fail_wrong_scope_class.carbon library "[[@TEST_NAME]]"; @@ -296,14 +398,16 @@ library "[[@TEST_NAME]]"; interface A {} interface B {} +interface C {} //@dump-sem-ir-begin -interface I(T: A & Core.Destroy) { +interface I(T: A) { let U: (B where .Self == T) & Core.Destroy; + let V: (C where .Self == U) & Core.Destroy; - fn GetU(self) -> U; + fn GetV(self) -> V; fn TakesT(self, t: T); - observe T == U; + observe T == U == V; } //@dump-sem-ir-end @@ -312,17 +416,14 @@ library "[[@TEST_NAME]]"; import library "generic_observe"; -class C {} -impl C as A {} +fn F[W: A, X: I(W)](x: X) { + var v: X.V = x.GetV(); -fn F[T: I(C)](t: T) { - var u: T.U = t.GetU(); - - // CHECK:STDERR: fail_todo_generic_import.carbon:[[@LINE+4]]:3-13: error: cannot convert type `T.(I(C as A & Core.Destroy).U)` that implements `Core.Destroy & B where...` into type implementing `A & Core.Destroy` [ConversionFailureFacetToFacet] - // CHECK:STDERR: imported from: fail_todo_generic_import.carbon:[[@LINE-9]]:1 [InImport] - // CHECK:STDERR: generic_observe.carbon:10:3-24: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fail_todo_generic_import.carbon:[[@LINE+4]]:3-13: error: cannot convert type `X.(I(W).V)` that implements `Core.Destroy & C where...` into type implementing `A` [ConversionFailureFacetToFacet] + // CHECK:STDERR: imported from: fail_todo_generic_import.carbon:[[@LINE-6]]:1 [InImport] + // CHECK:STDERR: generic_observe.carbon:12:3-24: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: - t.TakesT(u); + x.TakesT(v); } // CHECK:STDOUT: --- transitive.carbon @@ -667,6 +768,7 @@ fn F[T: I(C)](t: T) { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete] +// CHECK:STDOUT: %C.type: type = facet_type <@C> [concrete] // CHECK:STDOUT: %.Self.frozen.e58: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.029: type = pattern_type %A.type [concrete] // CHECK:STDOUT: %T.patt: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic] @@ -675,176 +777,213 @@ fn F[T: I(C)](t: T) { // CHECK:STDOUT: %pattern_type.a0e: type = pattern_type %T.as_type [symbolic] // CHECK:STDOUT: %x.param_patt.241: %pattern_type.a0e = value_param_pattern [symbolic] // CHECK:STDOUT: %x.patt.cd4: %pattern_type.a0e = wrapper_binding_pattern x, %x.param_patt.241 [symbolic] -// CHECK:STDOUT: %RequiresA.type: type = fn_type @RequiresA [concrete] -// CHECK:STDOUT: %RequiresA: %RequiresA.type = struct_value () [concrete] +// CHECK:STDOUT: %TakesA.type: type = fn_type @TakesA [concrete] +// CHECK:STDOUT: %TakesA: %TakesA.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.94f: = require_complete_type %T.as_type [symbolic] // CHECK:STDOUT: %.Self.frozen.f7e: %B.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %.Self: %B.type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %.Self.263: %B.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %B_where.type: type = facet_type <@B where TODO> [concrete] // CHECK:STDOUT: %pattern_type.831: type = pattern_type %B_where.type [concrete] // CHECK:STDOUT: %U.patt: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %U: %B_where.type = symbolic_binding U, 1 [symbolic] +// CHECK:STDOUT: %.Self.frozen.8d7: %C.type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %.Self.a25: %C.type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %C_where.type: type = facet_type <@C where TODO> [concrete] +// CHECK:STDOUT: %pattern_type.803: type = pattern_type %C_where.type [concrete] +// CHECK:STDOUT: %V.patt: %pattern_type.803 = symbolic_binding_pattern V, 2 [symbolic] +// CHECK:STDOUT: %V: %C_where.type = symbolic_binding V, 2 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %U.as_type: type = facet_access_type %U [symbolic] -// CHECK:STDOUT: %eq = observe_equivalent %T, %U [symbolic] -// CHECK:STDOUT: %pattern_type.d51: type = pattern_type %U.as_type [symbolic] -// CHECK:STDOUT: %x.param_patt.fbe: %pattern_type.d51 = value_param_pattern [symbolic] -// CHECK:STDOUT: %x.patt.a34: %pattern_type.d51 = wrapper_binding_pattern x, %x.param_patt.fbe [symbolic] -// CHECK:STDOUT: %InnerF.type: type = fn_type @InnerF, @F(%T, %U) [symbolic] +// CHECK:STDOUT: %eq.bb6 = observe_equivalent %T, %U [symbolic] +// CHECK:STDOUT: %V.as_type: type = facet_access_type %V [symbolic] +// CHECK:STDOUT: %eq.51c = observe_equivalent %U, %V [symbolic] +// CHECK:STDOUT: %pattern_type.0aa: type = pattern_type %V.as_type [symbolic] +// CHECK:STDOUT: %x.param_patt.d48: %pattern_type.0aa = value_param_pattern [symbolic] +// CHECK:STDOUT: %x.patt.860: %pattern_type.0aa = wrapper_binding_pattern x, %x.param_patt.d48 [symbolic] +// CHECK:STDOUT: %InnerF.type: type = fn_type @InnerF, @F(%T, %U, %V) [symbolic] // CHECK:STDOUT: %InnerF: %InnerF.type = struct_value () [symbolic] -// CHECK:STDOUT: %require_complete.963: = require_complete_type %U.as_type [symbolic] +// CHECK:STDOUT: %require_complete.269: = require_complete_type %V.as_type [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %RequiresA.decl: %RequiresA.type = fn_decl @RequiresA [concrete = constants.%RequiresA] { -// CHECK:STDOUT: %T.patt.loc7_15.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc7_28.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc7_28.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc7_28.1: @RequiresA.%pattern_type (%pattern_type.a0e) = wrapper_binding_pattern x, %x.param_patt.loc7_28.1 [symbolic = %x.patt.loc7_28.2 (constants.%x.patt.cd4)] +// CHECK:STDOUT: %TakesA.decl: %TakesA.type = fn_decl @TakesA [concrete = constants.%TakesA] { +// CHECK:STDOUT: %T.patt.loc8_12.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_12.2 (constants.%T.patt)] +// CHECK:STDOUT: %x.param_patt.loc8_25.1: @TakesA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc8_25.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc8_25.1: @TakesA.%pattern_type (%pattern_type.a0e) = wrapper_binding_pattern x, %x.param_patt.loc8_25.1 [symbolic = %x.patt.loc8_25.2 (constants.%x.patt.cd4)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_17: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc8_14: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.e58] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc7_15.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_15.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc7_30.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc7_30.1: type = splice_block %.loc7_30.2 [symbolic = %T.as_type.loc7_30.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc7_15.2 [symbolic = %T.loc7_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc7_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_30.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc7_30.2: type = converted %T.ref, %T.as_type.loc7_30.2 [symbolic = %T.as_type.loc7_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc8_12.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc8_12.1 (constants.%T)] +// CHECK:STDOUT: %x.param: @TakesA.%T.as_type.loc8_27.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc8_27.1: type = splice_block %.loc8_27.2 [symbolic = %T.as_type.loc8_27.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc8_12.2 [symbolic = %T.loc8_12.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc8_27.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc8_27.2: type = converted %T.ref, %T.as_type.loc8_27.2 [symbolic = %T.as_type.loc8_27.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc7_30.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @TakesA.%T.as_type.loc8_27.1 (%T.as_type) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc8_7.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc8_13.1: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc8_13.2 (constants.%U.patt)] +// CHECK:STDOUT: %T.patt.loc9_7.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %U.patt.loc9_13.1: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc9_13.2 (constants.%U.patt)] +// CHECK:STDOUT: %V.patt.loc9_36.1: %pattern_type.803 = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc9_36.2 (constants.%V.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_9: type = splice_block %A.ref [concrete = constants.%A.type] { -// CHECK:STDOUT: %.Self.frozen.loc8_7: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.e58] +// CHECK:STDOUT: %.loc9_9: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.Self.frozen.loc9_7: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.e58] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_7.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = constants.%B_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc8_13: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.e58] +// CHECK:STDOUT: %T.loc9_7.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T)] +// CHECK:STDOUT: %.loc9_17.1: type = splice_block %.loc9_17.2 [concrete = constants.%B_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc9_13: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.e58] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %.Self.frozen.loc8_17: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.f7e] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %B.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc8_23.1: %B.type = name_ref .Self, %.Self.frozen.loc8_17 [symbolic_self = constants.%.Self.frozen.f7e] -// CHECK:STDOUT: %T.ref.loc8: %A.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %equiv.loc8_29.1 = requirement_equivalent %.Self.ref.loc8_23.1, %T.ref.loc8 [concrete] -// CHECK:STDOUT: %.Self: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc8_23.2: %B.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %equiv.loc8_29.2 = requirement_equivalent %.Self.ref.loc8_23.2, %T.ref.loc8 [concrete] -// CHECK:STDOUT: %.loc8_17.2: type = where_expr [concrete = constants.%B_where.type] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %B.ref [concrete] -// CHECK:STDOUT: %equiv.loc8_29.2 = requirement_equivalent %.Self.ref.loc8_23.2, %T.ref.loc8 [concrete] +// CHECK:STDOUT: %.Self.frozen.loc9_17: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.f7e] +// CHECK:STDOUT: %base_facet_type.loc9_17 = requirement_base_facet_type %B.ref [concrete] +// CHECK:STDOUT: %.Self.ref.loc9_23.1: %B.type = name_ref .Self, %.Self.frozen.loc9_17 [symbolic_self = constants.%.Self.frozen.f7e] +// CHECK:STDOUT: %T.ref.loc9: %A.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T)] +// CHECK:STDOUT: %equiv.loc9_29.1 = requirement_equivalent %.Self.ref.loc9_23.1, %T.ref.loc9 [concrete] +// CHECK:STDOUT: %.Self.loc9_17: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self.263] +// CHECK:STDOUT: %.Self.ref.loc9_23.2: %B.type = name_ref .Self, %.Self.loc9_17 [symbolic_self = constants.%.Self.263] +// CHECK:STDOUT: %equiv.loc9_29.2 = requirement_equivalent %.Self.ref.loc9_23.2, %T.ref.loc9 [concrete] +// CHECK:STDOUT: %.loc9_17.2: type = where_expr [concrete = constants.%B_where.type] { +// CHECK:STDOUT: %base_facet_type.loc9_17 = requirement_base_facet_type %B.ref [concrete] +// CHECK:STDOUT: %equiv.loc9_29.2 = requirement_equivalent %.Self.ref.loc9_23.2, %T.ref.loc9 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc8_13.2: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc8_13.1 (constants.%U)] +// CHECK:STDOUT: %U.loc9_13.2: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc9_13.1 (constants.%U)] +// CHECK:STDOUT: %.loc9_40.1: type = splice_block %.loc9_40.2 [concrete = constants.%C_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc9_36: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.e58] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C.type] +// CHECK:STDOUT: %.Self.frozen.loc9_40: %C.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.8d7] +// CHECK:STDOUT: %base_facet_type.loc9_40 = requirement_base_facet_type %C.ref [concrete] +// CHECK:STDOUT: %.Self.ref.loc9_46.1: %C.type = name_ref .Self, %.Self.frozen.loc9_40 [symbolic_self = constants.%.Self.frozen.8d7] +// CHECK:STDOUT: %U.ref.loc9: %B_where.type = name_ref U, %U.loc9_13.2 [symbolic = %U.loc9_13.1 (constants.%U)] +// CHECK:STDOUT: %equiv.loc9_52.1 = requirement_equivalent %.Self.ref.loc9_46.1, %U.ref.loc9 [concrete] +// CHECK:STDOUT: %.Self.loc9_40: %C.type = symbolic_binding .Self [symbolic_self = constants.%.Self.a25] +// CHECK:STDOUT: %.Self.ref.loc9_46.2: %C.type = name_ref .Self, %.Self.loc9_40 [symbolic_self = constants.%.Self.a25] +// CHECK:STDOUT: %equiv.loc9_52.2 = requirement_equivalent %.Self.ref.loc9_46.2, %U.ref.loc9 [concrete] +// CHECK:STDOUT: %.loc9_40.2: type = where_expr [concrete = constants.%C_where.type] { +// CHECK:STDOUT: %base_facet_type.loc9_40 = requirement_base_facet_type %C.ref [concrete] +// CHECK:STDOUT: %equiv.loc9_52.2 = requirement_equivalent %.Self.ref.loc9_46.2, %U.ref.loc9 [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: %V.loc9_36.2: %C_where.type = symbolic_binding V, 2 [symbolic = %V.loc9_36.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @RequiresA(%T.loc7_15.2: %A.type) { -// CHECK:STDOUT: %T.patt.loc7_15.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc7_15.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc7_30.1: type = facet_access_type %T.loc7_15.1 [symbolic = %T.as_type.loc7_30.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc7_30.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] -// CHECK:STDOUT: %x.param_patt.loc7_28.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc7_28.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc7_28.2: @RequiresA.%pattern_type (%pattern_type.a0e) = wrapper_binding_pattern x, %x.param_patt.loc7_28.2 [symbolic = %x.patt.loc7_28.2 (constants.%x.patt.cd4)] +// CHECK:STDOUT: generic fn @TakesA(%T.loc8_12.2: %A.type) { +// CHECK:STDOUT: %T.patt.loc8_12.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_12.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc8_12.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc8_12.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc8_27.1: type = facet_access_type %T.loc8_12.1 [symbolic = %T.as_type.loc8_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc8_27.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] +// CHECK:STDOUT: %x.param_patt.loc8_25.2: @TakesA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc8_25.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc8_25.2: @TakesA.%pattern_type (%pattern_type.a0e) = wrapper_binding_pattern x, %x.param_patt.loc8_25.2 [symbolic = %x.patt.loc8_25.2 (constants.%x.patt.cd4)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc7_30.1 [symbolic = %require_complete (constants.%require_complete.94f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc8_27.1 [symbolic = %require_complete (constants.%require_complete.94f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc7_30.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%x.param: @TakesA.%T.as_type.loc8_27.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc8_7.2: %A.type, %U.loc8_13.2: %B_where.type) { -// CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_7.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc8_13.2: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc8_13.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc8_13.1: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc8_13.1 (constants.%U)] +// CHECK:STDOUT: generic fn @F(%T.loc9_7.2: %A.type, %U.loc9_13.2: %B_where.type, %V.loc9_36.2: %C_where.type) { +// CHECK:STDOUT: %T.patt.loc9_7.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc9_7.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T)] +// CHECK:STDOUT: %U.patt.loc9_13.2: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc9_13.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc9_13.1: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc9_13.1 (constants.%U)] +// CHECK:STDOUT: %V.patt.loc9_36.2: %pattern_type.803 = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc9_36.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.loc9_36.1: %C_where.type = symbolic_binding V, 2 [symbolic = %V.loc9_36.1 (constants.%V)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %U.as_type.loc9_16.2: type = facet_access_type %U.loc8_13.1 [symbolic = %U.as_type.loc9_16.2 (constants.%U.as_type)] -// CHECK:STDOUT: %T.as_type.loc9_11.2: type = facet_access_type %T.loc8_7.1 [symbolic = %T.as_type.loc9_11.2 (constants.%T.as_type)] -// CHECK:STDOUT: %eq = observe_equivalent %T.loc8_7.1, %U.loc8_13.1 [symbolic = %eq (constants.%eq)] -// CHECK:STDOUT: %InnerF.type: type = fn_type @InnerF, @F(%T.loc8_7.1, %U.loc8_13.1) [symbolic = %InnerF.type (constants.%InnerF.type)] +// CHECK:STDOUT: %U.as_type.loc10_16.3: type = facet_access_type %U.loc9_13.1 [symbolic = %U.as_type.loc10_16.3 (constants.%U.as_type)] +// CHECK:STDOUT: %T.as_type.loc10_11.2: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc10_11.2 (constants.%T.as_type)] +// CHECK:STDOUT: %eq.loc10_13 = observe_equivalent %T.loc9_7.1, %U.loc9_13.1 [symbolic = %eq.loc10_13 (constants.%eq.bb6)] +// CHECK:STDOUT: %V.as_type.loc10_21.2: type = facet_access_type %V.loc9_36.1 [symbolic = %V.as_type.loc10_21.2 (constants.%V.as_type)] +// CHECK:STDOUT: %eq.loc10_18 = observe_equivalent %U.loc9_13.1, %V.loc9_36.1 [symbolic = %eq.loc10_18 (constants.%eq.51c)] +// CHECK:STDOUT: %InnerF.type: type = fn_type @InnerF, @F(%T.loc9_7.1, %U.loc9_13.1, %V.loc9_36.1) [symbolic = %InnerF.type (constants.%InnerF.type)] // CHECK:STDOUT: %InnerF: @F.%InnerF.type (%InnerF.type) = struct_value () [symbolic = %InnerF (constants.%InnerF)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref.loc9: %A.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, %U.loc8_13.2 [symbolic = %U.loc8_13.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc9_16.1: type = facet_access_type %U.ref [symbolic = %U.as_type.loc9_16.2 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc9_16: type = converted %U.ref, %U.as_type.loc9_16.1 [symbolic = %U.as_type.loc9_16.2 (constants.%U.as_type)] -// CHECK:STDOUT: %T.as_type.loc9_11.1: type = facet_access_type %T.ref.loc9 [symbolic = %T.as_type.loc9_11.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_11: type = converted %T.ref.loc9, %T.as_type.loc9_11.1 [symbolic = %T.as_type.loc9_11.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.ref.loc10: %A.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T)] +// CHECK:STDOUT: %U.ref.loc10: %B_where.type = name_ref U, %U.loc9_13.2 [symbolic = %U.loc9_13.1 (constants.%U)] +// CHECK:STDOUT: %U.as_type.loc10_16.1: type = facet_access_type %U.ref.loc10 [symbolic = %U.as_type.loc10_16.3 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc10_16.1: type = converted %U.ref.loc10, %U.as_type.loc10_16.1 [symbolic = %U.as_type.loc10_16.3 (constants.%U.as_type)] +// CHECK:STDOUT: %T.as_type.loc10_11.1: type = facet_access_type %T.ref.loc10 [symbolic = %T.as_type.loc10_11.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc10_11: type = converted %T.ref.loc10, %T.as_type.loc10_11.1 [symbolic = %T.as_type.loc10_11.2 (constants.%T.as_type)] +// CHECK:STDOUT: %V.ref: %C_where.type = name_ref V, %V.loc9_36.2 [symbolic = %V.loc9_36.1 (constants.%V)] +// CHECK:STDOUT: %V.as_type.loc10_21.1: type = facet_access_type %V.ref [symbolic = %V.as_type.loc10_21.2 (constants.%V.as_type)] +// CHECK:STDOUT: %.loc10_21: type = converted %V.ref, %V.as_type.loc10_21.1 [symbolic = %V.as_type.loc10_21.2 (constants.%V.as_type)] +// CHECK:STDOUT: %U.as_type.loc10_16.2: type = facet_access_type %U.ref.loc10 [symbolic = %U.as_type.loc10_16.3 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc10_16.2: type = converted %U.ref.loc10, %U.as_type.loc10_16.2 [symbolic = %U.as_type.loc10_16.3 (constants.%U.as_type)] // CHECK:STDOUT: %F.observe.decl = observe_decl @F.observe [concrete] // CHECK:STDOUT: %InnerF.decl: @F.%InnerF.type (%InnerF.type) = fn_decl @InnerF [symbolic = @F.%InnerF (constants.%InnerF)] { -// CHECK:STDOUT: %x.param_patt.loc11_14.1: @InnerF.%pattern_type (%pattern_type.d51) = value_param_pattern [symbolic = %x.param_patt.loc11_14.2 (constants.%x.param_patt.fbe)] -// CHECK:STDOUT: %x.patt.loc11_14.1: @InnerF.%pattern_type (%pattern_type.d51) = wrapper_binding_pattern x, %x.param_patt.loc11_14.1 [symbolic = %x.patt.loc11_14.2 (constants.%x.patt.a34)] +// CHECK:STDOUT: %x.param_patt.loc12_14.1: @InnerF.%pattern_type (%pattern_type.0aa) = value_param_pattern [symbolic = %x.param_patt.loc12_14.2 (constants.%x.param_patt.d48)] +// CHECK:STDOUT: %x.patt.loc12_14.1: @InnerF.%pattern_type (%pattern_type.0aa) = wrapper_binding_pattern x, %x.param_patt.loc12_14.1 [symbolic = %x.patt.loc12_14.2 (constants.%x.patt.860)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %x.param: @InnerF.%U.as_type.loc11_16.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc11_16.1: type = splice_block %.loc11_16.3 [symbolic = %U.as_type.loc11_16.1 (constants.%U.as_type)] { -// CHECK:STDOUT: %.loc11_16.2: %B_where.type = specific_constant @F.%U.loc8_13.2, @F(constants.%T, constants.%U) [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, %.loc11_16.2 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc11_16.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc11_16.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc11_16.3: type = converted %U.ref, %U.as_type.loc11_16.2 [symbolic = %U.as_type.loc11_16.1 (constants.%U.as_type)] +// CHECK:STDOUT: %x.param: @InnerF.%V.as_type.loc12_16.1 (%V.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc12_16.1: type = splice_block %.loc12_16.3 [symbolic = %V.as_type.loc12_16.1 (constants.%V.as_type)] { +// CHECK:STDOUT: %.loc12_16.2: %C_where.type = specific_constant @F.%V.loc9_36.2, @F(constants.%T, constants.%U, constants.%V) [symbolic = %V (constants.%V)] +// CHECK:STDOUT: %V.ref: %C_where.type = name_ref V, %.loc12_16.2 [symbolic = %V (constants.%V)] +// CHECK:STDOUT: %V.as_type.loc12_16.2: type = facet_access_type %V.ref [symbolic = %V.as_type.loc12_16.1 (constants.%V.as_type)] +// CHECK:STDOUT: %.loc12_16.3: type = converted %V.ref, %V.as_type.loc12_16.2 [symbolic = %V.as_type.loc12_16.1 (constants.%V.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @InnerF.%U.as_type.loc11_16.1 (%U.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @InnerF.%V.as_type.loc12_16.1 (%V.as_type) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: @F.observe { -// CHECK:STDOUT: observe constants.%T == constants.%U +// CHECK:STDOUT: observe constants.%T == constants.%U == constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @InnerF(@F.%T.loc8_7.2: %A.type, @F.%U.loc8_13.2: %B_where.type) { -// CHECK:STDOUT: %U: %B_where.type = symbolic_binding U, 1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc11_16.1: type = facet_access_type %U [symbolic = %U.as_type.loc11_16.1 (constants.%U.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc11_16.1 [symbolic = %pattern_type (constants.%pattern_type.d51)] -// CHECK:STDOUT: %x.param_patt.loc11_14.2: @InnerF.%pattern_type (%pattern_type.d51) = value_param_pattern [symbolic = %x.param_patt.loc11_14.2 (constants.%x.param_patt.fbe)] -// CHECK:STDOUT: %x.patt.loc11_14.2: @InnerF.%pattern_type (%pattern_type.d51) = wrapper_binding_pattern x, %x.param_patt.loc11_14.2 [symbolic = %x.patt.loc11_14.2 (constants.%x.patt.a34)] +// CHECK:STDOUT: generic fn @InnerF(@F.%T.loc9_7.2: %A.type, @F.%U.loc9_13.2: %B_where.type, @F.%V.loc9_36.2: %C_where.type) { +// CHECK:STDOUT: %V: %C_where.type = symbolic_binding V, 2 [symbolic = %V (constants.%V)] +// CHECK:STDOUT: %V.as_type.loc12_16.1: type = facet_access_type %V [symbolic = %V.as_type.loc12_16.1 (constants.%V.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %V.as_type.loc12_16.1 [symbolic = %pattern_type (constants.%pattern_type.0aa)] +// CHECK:STDOUT: %x.param_patt.loc12_14.2: @InnerF.%pattern_type (%pattern_type.0aa) = value_param_pattern [symbolic = %x.param_patt.loc12_14.2 (constants.%x.param_patt.d48)] +// CHECK:STDOUT: %x.patt.loc12_14.2: @InnerF.%pattern_type (%pattern_type.0aa) = wrapper_binding_pattern x, %x.param_patt.loc12_14.2 [symbolic = %x.patt.loc12_14.2 (constants.%x.patt.860)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc11_16.1 [symbolic = %require_complete (constants.%require_complete.963)] +// CHECK:STDOUT: %require_complete: = require_complete_type %V.as_type.loc12_16.1 [symbolic = %require_complete (constants.%require_complete.269)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @InnerF.%U.as_type.loc11_16.1 (%U.as_type)) { +// CHECK:STDOUT: fn(%x.param: @InnerF.%V.as_type.loc12_16.1 (%V.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %RequiresA.ref: %RequiresA.type = name_ref RequiresA, file.%RequiresA.decl [concrete = constants.%RequiresA] -// CHECK:STDOUT: %x.ref: @InnerF.%U.as_type.loc11_16.1 (%U.as_type) = name_ref x, %x +// CHECK:STDOUT: %TakesA.ref: %TakesA.type = name_ref TakesA, file.%TakesA.decl [concrete = constants.%TakesA] +// CHECK:STDOUT: %x.ref: @InnerF.%V.as_type.loc12_16.1 (%V.as_type) = name_ref x, %x // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @RequiresA(constants.%T) { -// CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc7_15.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc7_30.1 => constants.%T.as_type +// CHECK:STDOUT: specific @TakesA(constants.%T) { +// CHECK:STDOUT: %T.patt.loc8_12.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_12.1 => constants.%T +// CHECK:STDOUT: %T.as_type.loc8_27.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e -// CHECK:STDOUT: %x.param_patt.loc7_28.2 => constants.%x.param_patt.241 -// CHECK:STDOUT: %x.patt.loc7_28.2 => constants.%x.patt.cd4 +// CHECK:STDOUT: %x.param_patt.loc8_25.2 => constants.%x.param_patt.241 +// CHECK:STDOUT: %x.patt.loc8_25.2 => constants.%x.patt.cd4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T, constants.%U) { -// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_7.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc8_13.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc8_13.1 => constants.%U +// CHECK:STDOUT: specific @F(constants.%T, constants.%U, constants.%V) { +// CHECK:STDOUT: %T.patt.loc9_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc9_7.1 => constants.%T +// CHECK:STDOUT: %U.patt.loc9_13.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc9_13.1 => constants.%U +// CHECK:STDOUT: %V.patt.loc9_36.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc9_36.1 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @InnerF(constants.%T, constants.%U) { -// CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: %U.as_type.loc11_16.1 => constants.%U.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.d51 -// CHECK:STDOUT: %x.param_patt.loc11_14.2 => constants.%x.param_patt.fbe -// CHECK:STDOUT: %x.patt.loc11_14.2 => constants.%x.patt.a34 +// CHECK:STDOUT: specific @InnerF(constants.%T, constants.%U, constants.%V) { +// CHECK:STDOUT: %V => constants.%V +// CHECK:STDOUT: %V.as_type.loc12_16.1 => constants.%V.as_type +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.0aa +// CHECK:STDOUT: %x.param_patt.loc12_14.2 => constants.%x.param_patt.d48 +// CHECK:STDOUT: %x.patt.loc12_14.2 => constants.%x.patt.860 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- generic_observe.carbon @@ -853,246 +992,230 @@ fn F[T: I(C)](t: T) { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %.Self.frozen.e58: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %BitAndWith.type.a06: type = generic_interface_type @BitAndWith [concrete] -// CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.a06 = struct_value () [concrete] -// CHECK:STDOUT: %BitAndWith.type.7f7: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.7f7 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.1a6: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith.WithSelf(type, %BitAndWith.facet) [concrete] -// CHECK:STDOUT: %.b4e: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.1a6, %BitAndWith.facet [concrete] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound.36e: = bound_method %A.type, %type.as.BitAndWith.impl.Op [concrete] -// CHECK:STDOUT: %facet_type.8cb: type = facet_type <@A & @Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.827: type = pattern_type %facet_type.8cb [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.827 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: %facet_type.8cb = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.029: type = pattern_type %A.type [concrete] +// CHECK:STDOUT: %T.patt: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T: %A.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %I.type.335: type = generic_interface_type @I [concrete] // CHECK:STDOUT: %I.generic: %I.type.335 = struct_value () [concrete] -// CHECK:STDOUT: %I.type.722: type = facet_type <@I, @I(%T)> [symbolic] -// CHECK:STDOUT: %Self.30d: %I.type.722 = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %I.type.414: type = facet_type <@I, @I(%T)> [symbolic] +// CHECK:STDOUT: %Self.c6a: %I.type.414 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %facet_type.208: type = facet_type <@B & @Destroy where TODO> [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %assoc0.3a9: %I.assoc_type = assoc_entity element0, @I.WithSelf.%U [symbolic] -// CHECK:STDOUT: %Self.as_type.7b3: type = facet_access_type %Self.30d [symbolic] -// CHECK:STDOUT: %pattern_type.174: type = pattern_type %Self.as_type.7b3 [symbolic] -// CHECK:STDOUT: %self.param_patt.bc4: %pattern_type.174 = value_param_pattern [symbolic] -// CHECK:STDOUT: %self.patt.092: %pattern_type.174 = wrapper_binding_pattern self, %self.param_patt.bc4 [symbolic] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self.30d, @I, @I(%T) [symbolic] -// CHECK:STDOUT: %impl.elem0.931: %facet_type.208 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.931 [symbolic] -// CHECK:STDOUT: %.bbb: Core.Form = init_form %as_type [symbolic] -// CHECK:STDOUT: %pattern_type.781: type = pattern_type %as_type [symbolic] -// CHECK:STDOUT: %return.param_patt.387: %pattern_type.781 = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.019: %pattern_type.781 = return_slot_pattern %return.param_patt.387, %as_type [symbolic] -// CHECK:STDOUT: %I.WithSelf.GetU.type: type = fn_type @I.WithSelf.GetU, @I.WithSelf(%T, %Self.30d) [symbolic] -// CHECK:STDOUT: %I.WithSelf.GetU: %I.WithSelf.GetU.type = struct_value () [symbolic] -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.WithSelf.%I.WithSelf.GetU.decl [symbolic] +// CHECK:STDOUT: %assoc0.6a9: %I.assoc_type = assoc_entity element0, @I.WithSelf.%U [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self.c6a, @I, @I(%T) [symbolic] +// CHECK:STDOUT: %impl.elem0.87a: %facet_type.208 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %facet_type.392: type = facet_type <@C & @Destroy where TODO> [concrete] +// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.WithSelf.%V [symbolic] +// CHECK:STDOUT: %Self.as_type.a01: type = facet_access_type %Self.c6a [symbolic] +// CHECK:STDOUT: %pattern_type.4f3: type = pattern_type %Self.as_type.a01 [symbolic] +// CHECK:STDOUT: %self.param_patt.dbe: %pattern_type.4f3 = value_param_pattern [symbolic] +// CHECK:STDOUT: %self.patt.e5a: %pattern_type.4f3 = wrapper_binding_pattern self, %self.param_patt.dbe [symbolic] +// CHECK:STDOUT: %impl.elem1.6d1: %facet_type.392 = impl_witness_access %I.lookup_impl_witness, element1 [symbolic] +// CHECK:STDOUT: %as_type.eff: type = facet_access_type %impl.elem1.6d1 [symbolic] +// CHECK:STDOUT: %.bf8: Core.Form = init_form %as_type.eff [symbolic] +// CHECK:STDOUT: %pattern_type.5ec: type = pattern_type %as_type.eff [symbolic] +// CHECK:STDOUT: %return.param_patt.e69: %pattern_type.5ec = out_param_pattern [symbolic] +// CHECK:STDOUT: %return.patt.f75: %pattern_type.5ec = return_slot_pattern %return.param_patt.e69, %as_type.eff [symbolic] +// CHECK:STDOUT: %I.WithSelf.GetV.type: type = fn_type @I.WithSelf.GetV, @I.WithSelf(%T, %Self.c6a) [symbolic] +// CHECK:STDOUT: %I.WithSelf.GetV: %I.WithSelf.GetV.type = struct_value () [symbolic] +// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.WithSelf.%I.WithSelf.GetV.decl [symbolic] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.bc3: type = pattern_type %T.as_type [symbolic] -// CHECK:STDOUT: %t.param_patt: %pattern_type.bc3 = value_param_pattern [symbolic] -// CHECK:STDOUT: %t.patt: %pattern_type.bc3 = wrapper_binding_pattern t, %t.param_patt [symbolic] -// CHECK:STDOUT: %I.WithSelf.TakesT.type: type = fn_type @I.WithSelf.TakesT, @I.WithSelf(%T, %Self.30d) [symbolic] +// CHECK:STDOUT: %pattern_type.a0e: type = pattern_type %T.as_type [symbolic] +// CHECK:STDOUT: %t.param_patt: %pattern_type.a0e = value_param_pattern [symbolic] +// CHECK:STDOUT: %t.patt: %pattern_type.a0e = wrapper_binding_pattern t, %t.param_patt [symbolic] +// CHECK:STDOUT: %I.WithSelf.TakesT.type: type = fn_type @I.WithSelf.TakesT, @I.WithSelf(%T, %Self.c6a) [symbolic] // CHECK:STDOUT: %I.WithSelf.TakesT: %I.WithSelf.TakesT.type = struct_value () [symbolic] -// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.WithSelf.%I.WithSelf.TakesT.decl [symbolic] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy -// CHECK:STDOUT: .BitAndWith = %Core.BitAndWith -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.a06 = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] -// CHECK:STDOUT: %Core.import_ref.9c3: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.9c3), @type.as.BitAndWith.impl [concrete] +// CHECK:STDOUT: %assoc3: %I.assoc_type = assoc_entity element3, @I.WithSelf.%I.WithSelf.TakesT.decl [symbolic] +// CHECK:STDOUT: %as_type.4fe: type = facet_access_type %impl.elem0.87a [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { -// CHECK:STDOUT: %T.patt.loc6_14.1: %pattern_type.827 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_14.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc7_14.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_18.1: type = splice_block %.loc6_18.3 [concrete = constants.%facet_type.8cb] { +// CHECK:STDOUT: %.loc7: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.e58] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %Destroy.ref: type = name_ref Destroy, imports.%Core.Destroy [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %impl.elem0: %.b4e = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method: = bound_method %A.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.36e] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%A.ref, %Destroy.ref) [concrete = constants.%facet_type.8cb] -// CHECK:STDOUT: %.loc6_18.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.8cb] -// CHECK:STDOUT: %.loc6_18.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc6_18.2 [concrete = constants.%facet_type.8cb] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc6_14.2: %facet_type.8cb = symbolic_binding T, 0 [symbolic = %T.loc6_14.1 (constants.%T)] +// CHECK:STDOUT: %T.loc7_14.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(%T.loc6_14.2: %facet_type.8cb) { -// CHECK:STDOUT: %T.patt.loc6_14.2: %pattern_type.827 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc6_14.1: %facet_type.8cb = symbolic_binding T, 0 [symbolic = %T.loc6_14.1 (constants.%T)] +// CHECK:STDOUT: generic interface @I(%T.loc7_14.2: %A.type) { +// CHECK:STDOUT: %T.patt.loc7_14.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc7_14.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_14.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc6_14.1)> [symbolic = %I.type (constants.%I.type.722)] -// CHECK:STDOUT: %Self.loc6_34.2: @I.%I.type (%I.type.722) = symbolic_binding Self, 1 [symbolic = %Self.loc6_34.2 (constants.%Self.30d)] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc7_14.1)> [symbolic = %I.type (constants.%I.type.414)] +// CHECK:STDOUT: %Self.loc7_19.2: @I.%I.type (%I.type.414) = symbolic_binding Self, 1 [symbolic = %Self.loc7_19.2 (constants.%Self.c6a)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc6_34.1: @I.%I.type (%I.type.722) = symbolic_binding Self, 1 [symbolic = %Self.loc6_34.2 (constants.%Self.30d)] +// CHECK:STDOUT: %Self.loc7_19.1: @I.%I.type (%I.type.414) = symbolic_binding Self, 1 [symbolic = %Self.loc7_19.2 (constants.%Self.c6a)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %U: %facet_type.208 = assoc_const_decl @U [concrete] { -// CHECK:STDOUT: %assoc0: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element0, @I.WithSelf.%U [symbolic = @I.WithSelf.%assoc0 (constants.%assoc0.3a9)] +// CHECK:STDOUT: %assoc0: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element0, @I.WithSelf.%U [symbolic = @I.WithSelf.%assoc0 (constants.%assoc0.6a9)] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.WithSelf.GetU.decl: @I.WithSelf.%I.WithSelf.GetU.type (%I.WithSelf.GetU.type) = fn_decl @I.WithSelf.GetU [symbolic = @I.WithSelf.%I.WithSelf.GetU (constants.%I.WithSelf.GetU)] { -// CHECK:STDOUT: %self.param_patt.loc9_11.1: @I.WithSelf.GetU.%pattern_type.loc9_11 (%pattern_type.174) = value_param_pattern [symbolic = %self.param_patt.loc9_11.2 (constants.%self.param_patt.bc4)] -// CHECK:STDOUT: %self.patt.loc9_11.1: @I.WithSelf.GetU.%pattern_type.loc9_11 (%pattern_type.174) = wrapper_binding_pattern self, %self.param_patt.loc9_11.1 [symbolic = %self.patt.loc9_11.2 (constants.%self.patt.092)] -// CHECK:STDOUT: %return.param_patt.loc9_20.1: @I.WithSelf.GetU.%pattern_type.loc9_20 (%pattern_type.781) = out_param_pattern [symbolic = %return.param_patt.loc9_20.2 (constants.%return.param_patt.387)] -// CHECK:STDOUT: %return.patt.loc9_17.1: @I.WithSelf.GetU.%pattern_type.loc9_20 (%pattern_type.781) = return_slot_pattern %return.param_patt.loc9_20.1, %.loc9_20.2 [symbolic = %return.patt.loc9_17.2 (constants.%return.patt.019)] +// CHECK:STDOUT: %V: %facet_type.392 = assoc_const_decl @V [concrete] { +// CHECK:STDOUT: %assoc1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element1, @I.WithSelf.%V [symbolic = @I.WithSelf.%assoc1 (constants.%assoc1)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %I.WithSelf.GetV.decl: @I.WithSelf.%I.WithSelf.GetV.type (%I.WithSelf.GetV.type) = fn_decl @I.WithSelf.GetV [symbolic = @I.WithSelf.%I.WithSelf.GetV (constants.%I.WithSelf.GetV)] { +// CHECK:STDOUT: %self.param_patt.loc11_11.1: @I.WithSelf.GetV.%pattern_type.loc11_11 (%pattern_type.4f3) = value_param_pattern [symbolic = %self.param_patt.loc11_11.2 (constants.%self.param_patt.dbe)] +// CHECK:STDOUT: %self.patt.loc11_11.1: @I.WithSelf.GetV.%pattern_type.loc11_11 (%pattern_type.4f3) = wrapper_binding_pattern self, %self.param_patt.loc11_11.1 [symbolic = %self.patt.loc11_11.2 (constants.%self.patt.e5a)] +// CHECK:STDOUT: %return.param_patt.loc11_20.1: @I.WithSelf.GetV.%pattern_type.loc11_20 (%pattern_type.5ec) = out_param_pattern [symbolic = %return.param_patt.loc11_20.2 (constants.%return.param_patt.e69)] +// CHECK:STDOUT: %return.patt.loc11_17.1: @I.WithSelf.GetV.%pattern_type.loc11_20 (%pattern_type.5ec) = return_slot_pattern %return.param_patt.loc11_20.1, %.loc11_20.2 [symbolic = %return.patt.loc11_17.2 (constants.%return.patt.f75)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc9_20.2: %facet_type.208 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_20.1 (constants.%impl.elem0.931)] -// CHECK:STDOUT: %U.ref: %facet_type.208 = name_ref U, %impl.elem0.loc9_20.2 [symbolic = %impl.elem0.loc9_20.1 (constants.%impl.elem0.931)] -// CHECK:STDOUT: %U.as_type: type = facet_access_type %U.ref [symbolic = %as_type (constants.%as_type)] -// CHECK:STDOUT: %.loc9_20.2: type = converted %U.ref, %U.as_type [symbolic = %as_type (constants.%as_type)] -// CHECK:STDOUT: %.loc9_20.3: Core.Form = init_form %.loc9_20.2 [symbolic = %.loc9_20.1 (constants.%.bbb)] -// CHECK:STDOUT: %self.param: @I.WithSelf.GetU.%Self.as_type.loc9_11.1 (%Self.as_type.7b3) = value_param call_param0 -// CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.3 [symbolic = %Self.as_type.loc9_11.1 (constants.%Self.as_type.7b3)] { -// CHECK:STDOUT: %.loc9_11.2: @I.WithSelf.GetU.%I.type (%I.type.722) = specific_constant @I.%Self.loc6_34.1, @I(constants.%T) [symbolic = %Self (constants.%Self.30d)] -// CHECK:STDOUT: %Self.ref: @I.WithSelf.GetU.%I.type (%I.type.722) = name_ref Self, %.loc9_11.2 [symbolic = %Self (constants.%Self.30d)] -// CHECK:STDOUT: %Self.as_type.loc9_11.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_11.1 (constants.%Self.as_type.7b3)] -// CHECK:STDOUT: %.loc9_11.3: type = converted %Self.ref, %Self.as_type.loc9_11.2 [symbolic = %Self.as_type.loc9_11.1 (constants.%Self.as_type.7b3)] +// CHECK:STDOUT: %impl.elem1.loc11_20.2: %facet_type.392 = impl_witness_access constants.%I.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_20.1 (constants.%impl.elem1.6d1)] +// CHECK:STDOUT: %V.ref: %facet_type.392 = name_ref V, %impl.elem1.loc11_20.2 [symbolic = %impl.elem1.loc11_20.1 (constants.%impl.elem1.6d1)] +// CHECK:STDOUT: %V.as_type: type = facet_access_type %V.ref [symbolic = %as_type (constants.%as_type.eff)] +// CHECK:STDOUT: %.loc11_20.2: type = converted %V.ref, %V.as_type [symbolic = %as_type (constants.%as_type.eff)] +// CHECK:STDOUT: %.loc11_20.3: Core.Form = init_form %.loc11_20.2 [symbolic = %.loc11_20.1 (constants.%.bf8)] +// CHECK:STDOUT: %self.param: @I.WithSelf.GetV.%Self.as_type.loc11_11.1 (%Self.as_type.a01) = value_param call_param0 +// CHECK:STDOUT: %.loc11_11.1: type = splice_block %.loc11_11.3 [symbolic = %Self.as_type.loc11_11.1 (constants.%Self.as_type.a01)] { +// CHECK:STDOUT: %.loc11_11.2: @I.WithSelf.GetV.%I.type (%I.type.414) = specific_constant @I.%Self.loc7_19.1, @I(constants.%T) [symbolic = %Self (constants.%Self.c6a)] +// CHECK:STDOUT: %Self.ref: @I.WithSelf.GetV.%I.type (%I.type.414) = name_ref Self, %.loc11_11.2 [symbolic = %Self (constants.%Self.c6a)] +// CHECK:STDOUT: %Self.as_type.loc11_11.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc11_11.1 (constants.%Self.as_type.a01)] +// CHECK:STDOUT: %.loc11_11.3: type = converted %Self.ref, %Self.as_type.loc11_11.2 [symbolic = %Self.as_type.loc11_11.1 (constants.%Self.as_type.a01)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.WithSelf.GetU.%Self.as_type.loc9_11.1 (%Self.as_type.7b3) = wrapper_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @I.WithSelf.GetU.%as_type (%as_type) = out_param call_param1 -// CHECK:STDOUT: %return: ref @I.WithSelf.GetU.%as_type (%as_type) = return_slot %return.param +// CHECK:STDOUT: %self: @I.WithSelf.GetV.%Self.as_type.loc11_11.1 (%Self.as_type.a01) = wrapper_binding self, %self.param +// CHECK:STDOUT: %return.param: ref @I.WithSelf.GetV.%as_type (%as_type.eff) = out_param call_param1 +// CHECK:STDOUT: %return: ref @I.WithSelf.GetV.%as_type (%as_type.eff) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1.loc9_21.1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element1, %I.WithSelf.GetU.decl [symbolic = %assoc1.loc9_21.2 (constants.%assoc1)] +// CHECK:STDOUT: %assoc2.loc11_21.1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element2, %I.WithSelf.GetV.decl [symbolic = %assoc2.loc11_21.2 (constants.%assoc2)] // CHECK:STDOUT: %I.WithSelf.TakesT.decl: @I.WithSelf.%I.WithSelf.TakesT.type (%I.WithSelf.TakesT.type) = fn_decl @I.WithSelf.TakesT [symbolic = @I.WithSelf.%I.WithSelf.TakesT (constants.%I.WithSelf.TakesT)] { -// CHECK:STDOUT: %self.param_patt.loc10_13.1: @I.WithSelf.TakesT.%pattern_type.loc10_13 (%pattern_type.174) = value_param_pattern [symbolic = %self.param_patt.loc10_13.2 (constants.%self.param_patt.bc4)] -// CHECK:STDOUT: %self.patt.loc10_13.1: @I.WithSelf.TakesT.%pattern_type.loc10_13 (%pattern_type.174) = wrapper_binding_pattern self, %self.param_patt.loc10_13.1 [symbolic = %self.patt.loc10_13.2 (constants.%self.patt.092)] -// CHECK:STDOUT: %t.param_patt.loc10_20.1: @I.WithSelf.TakesT.%pattern_type.loc10_20 (%pattern_type.bc3) = value_param_pattern [symbolic = %t.param_patt.loc10_20.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc10_20.1: @I.WithSelf.TakesT.%pattern_type.loc10_20 (%pattern_type.bc3) = wrapper_binding_pattern t, %t.param_patt.loc10_20.1 [symbolic = %t.patt.loc10_20.2 (constants.%t.patt)] +// CHECK:STDOUT: %self.param_patt.loc12_13.1: @I.WithSelf.TakesT.%pattern_type.loc12_13 (%pattern_type.4f3) = value_param_pattern [symbolic = %self.param_patt.loc12_13.2 (constants.%self.param_patt.dbe)] +// CHECK:STDOUT: %self.patt.loc12_13.1: @I.WithSelf.TakesT.%pattern_type.loc12_13 (%pattern_type.4f3) = wrapper_binding_pattern self, %self.param_patt.loc12_13.1 [symbolic = %self.patt.loc12_13.2 (constants.%self.patt.e5a)] +// CHECK:STDOUT: %t.param_patt.loc12_20.1: @I.WithSelf.TakesT.%pattern_type.loc12_20 (%pattern_type.a0e) = value_param_pattern [symbolic = %t.param_patt.loc12_20.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc12_20.1: @I.WithSelf.TakesT.%pattern_type.loc12_20 (%pattern_type.a0e) = wrapper_binding_pattern t, %t.param_patt.loc12_20.1 [symbolic = %t.patt.loc12_20.2 (constants.%t.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.WithSelf.TakesT.%Self.as_type.loc10_13.1 (%Self.as_type.7b3) = value_param call_param0 -// CHECK:STDOUT: %.loc10_13.1: type = splice_block %.loc10_13.3 [symbolic = %Self.as_type.loc10_13.1 (constants.%Self.as_type.7b3)] { -// CHECK:STDOUT: %.loc10_13.2: @I.WithSelf.TakesT.%I.type (%I.type.722) = specific_constant @I.%Self.loc6_34.1, @I(constants.%T) [symbolic = %Self (constants.%Self.30d)] -// CHECK:STDOUT: %Self.ref: @I.WithSelf.TakesT.%I.type (%I.type.722) = name_ref Self, %.loc10_13.2 [symbolic = %Self (constants.%Self.30d)] -// CHECK:STDOUT: %Self.as_type.loc10_13.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc10_13.1 (constants.%Self.as_type.7b3)] -// CHECK:STDOUT: %.loc10_13.3: type = converted %Self.ref, %Self.as_type.loc10_13.2 [symbolic = %Self.as_type.loc10_13.1 (constants.%Self.as_type.7b3)] +// CHECK:STDOUT: %self.param: @I.WithSelf.TakesT.%Self.as_type.loc12_13.1 (%Self.as_type.a01) = value_param call_param0 +// CHECK:STDOUT: %.loc12_13.1: type = splice_block %.loc12_13.3 [symbolic = %Self.as_type.loc12_13.1 (constants.%Self.as_type.a01)] { +// CHECK:STDOUT: %.loc12_13.2: @I.WithSelf.TakesT.%I.type (%I.type.414) = specific_constant @I.%Self.loc7_19.1, @I(constants.%T) [symbolic = %Self (constants.%Self.c6a)] +// CHECK:STDOUT: %Self.ref: @I.WithSelf.TakesT.%I.type (%I.type.414) = name_ref Self, %.loc12_13.2 [symbolic = %Self (constants.%Self.c6a)] +// CHECK:STDOUT: %Self.as_type.loc12_13.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_13.1 (constants.%Self.as_type.a01)] +// CHECK:STDOUT: %.loc12_13.3: type = converted %Self.ref, %Self.as_type.loc12_13.2 [symbolic = %Self.as_type.loc12_13.1 (constants.%Self.as_type.a01)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.WithSelf.TakesT.%Self.as_type.loc10_13.1 (%Self.as_type.7b3) = wrapper_binding self, %self.param -// CHECK:STDOUT: %t.param: @I.WithSelf.TakesT.%T.as_type.loc10_22.1 (%T.as_type) = value_param call_param1 -// CHECK:STDOUT: %.loc10_22.1: type = splice_block %.loc10_22.3 [symbolic = %T.as_type.loc10_22.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %.loc10_22.2: %facet_type.8cb = specific_constant @I.%T.loc6_14.2, @I(constants.%T) [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %T.ref: %facet_type.8cb = name_ref T, %.loc10_22.2 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc10_22.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc10_22.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc10_22.3: type = converted %T.ref, %T.as_type.loc10_22.2 [symbolic = %T.as_type.loc10_22.1 (constants.%T.as_type)] +// CHECK:STDOUT: %self: @I.WithSelf.TakesT.%Self.as_type.loc12_13.1 (%Self.as_type.a01) = wrapper_binding self, %self.param +// CHECK:STDOUT: %t.param: @I.WithSelf.TakesT.%T.as_type.loc12_22.1 (%T.as_type) = value_param call_param1 +// CHECK:STDOUT: %.loc12_22.1: type = splice_block %.loc12_22.3 [symbolic = %T.as_type.loc12_22.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %.loc12_22.2: %A.type = specific_constant @I.%T.loc7_14.2, @I(constants.%T) [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T.ref: %A.type = name_ref T, %.loc12_22.2 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc12_22.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_22.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc12_22.3: type = converted %T.ref, %T.as_type.loc12_22.2 [symbolic = %T.as_type.loc12_22.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @I.WithSelf.TakesT.%T.as_type.loc10_22.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @I.WithSelf.TakesT.%T.as_type.loc12_22.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc2.loc10_24.1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element2, %I.WithSelf.TakesT.decl [symbolic = %assoc2.loc10_24.2 (constants.%assoc2)] -// CHECK:STDOUT: %.loc12_11.1: %facet_type.8cb = specific_constant @I.%T.loc6_14.2, @I(constants.%T) [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %T.ref: %facet_type.8cb = name_ref T, %.loc12_11.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %impl.elem0.loc12_16.1: %facet_type.208 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_16.2 (constants.%impl.elem0.931)] -// CHECK:STDOUT: %U.ref: %facet_type.208 = name_ref U, %impl.elem0.loc12_16.1 [symbolic = %impl.elem0.loc12_16.2 (constants.%impl.elem0.931)] -// CHECK:STDOUT: %U.as_type: type = facet_access_type %U.ref [symbolic = %as_type (constants.%as_type)] -// CHECK:STDOUT: %.loc12_16: type = converted %U.ref, %U.as_type [symbolic = %as_type (constants.%as_type)] -// CHECK:STDOUT: %T.as_type.loc12_11.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_11.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc12_11.2: type = converted %T.ref, %T.as_type.loc12_11.1 [symbolic = %T.as_type.loc12_11.2 (constants.%T.as_type)] +// CHECK:STDOUT: %assoc3.loc12_24.1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element3, %I.WithSelf.TakesT.decl [symbolic = %assoc3.loc12_24.2 (constants.%assoc3)] +// CHECK:STDOUT: %.loc14_11.1: %A.type = specific_constant @I.%T.loc7_14.2, @I(constants.%T) [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T.ref: %A.type = name_ref T, %.loc14_11.1 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %impl.elem0.loc14: %facet_type.208 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9 (constants.%impl.elem0.87a)] +// CHECK:STDOUT: %U.ref: %facet_type.208 = name_ref U, %impl.elem0.loc14 [symbolic = %impl.elem0.loc9 (constants.%impl.elem0.87a)] +// CHECK:STDOUT: %U.as_type.loc14_16.1: type = facet_access_type %U.ref [symbolic = %as_type.loc14_16 (constants.%as_type.4fe)] +// CHECK:STDOUT: %.loc14_16.1: type = converted %U.ref, %U.as_type.loc14_16.1 [symbolic = %as_type.loc14_16 (constants.%as_type.4fe)] +// CHECK:STDOUT: %T.as_type.loc14_11.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc14_11.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc14_11.2: type = converted %T.ref, %T.as_type.loc14_11.1 [symbolic = %T.as_type.loc14_11.2 (constants.%T.as_type)] +// CHECK:STDOUT: %impl.elem1.loc14_21.1: %facet_type.392 = impl_witness_access constants.%I.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc14_21.2 (constants.%impl.elem1.6d1)] +// CHECK:STDOUT: %V.ref: %facet_type.392 = name_ref V, %impl.elem1.loc14_21.1 [symbolic = %impl.elem1.loc14_21.2 (constants.%impl.elem1.6d1)] +// CHECK:STDOUT: %V.as_type: type = facet_access_type %V.ref [symbolic = %as_type.loc14_21 (constants.%as_type.eff)] +// CHECK:STDOUT: %.loc14_21: type = converted %V.ref, %V.as_type [symbolic = %as_type.loc14_21 (constants.%as_type.eff)] +// CHECK:STDOUT: %U.as_type.loc14_16.2: type = facet_access_type %U.ref [symbolic = %as_type.loc14_16 (constants.%as_type.4fe)] +// CHECK:STDOUT: %.loc14_16.2: type = converted %U.ref, %U.as_type.loc14_16.2 [symbolic = %as_type.loc14_16 (constants.%as_type.4fe)] // CHECK:STDOUT: %I.observe.decl = observe_decl @I.observe [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc6_34.1 +// CHECK:STDOUT: .Self = %Self.loc7_19.1 // CHECK:STDOUT: .B = // CHECK:STDOUT: .T = +// CHECK:STDOUT: .C = // CHECK:STDOUT: .B = // CHECK:STDOUT: .T = // CHECK:STDOUT: .U = @U.%assoc0 -// CHECK:STDOUT: .GetU = @I.WithSelf.%assoc1.loc9_21.1 -// CHECK:STDOUT: .TakesT = @I.WithSelf.%assoc2.loc10_24.1 -// CHECK:STDOUT: witness = (@I.WithSelf.%U, @I.WithSelf.%I.WithSelf.GetU.decl, @I.WithSelf.%I.WithSelf.TakesT.decl) +// CHECK:STDOUT: .C = +// CHECK:STDOUT: .V = @V.%assoc1 +// CHECK:STDOUT: .GetV = @I.WithSelf.%assoc2.loc11_21.1 +// CHECK:STDOUT: .TakesT = @I.WithSelf.%assoc3.loc12_24.1 +// CHECK:STDOUT: witness = (@I.WithSelf.%U, @I.WithSelf.%V, @I.WithSelf.%I.WithSelf.GetV.decl, @I.WithSelf.%I.WithSelf.TakesT.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: @I.observe { -// CHECK:STDOUT: observe constants.%T == constants.%impl.elem0.931 +// CHECK:STDOUT: observe constants.%T == constants.%impl.elem0.87a == constants.%impl.elem1.6d1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.WithSelf.GetU(@I.%T.loc6_14.2: %facet_type.8cb, @I.%Self.loc6_34.1: @I.%I.type (%I.type.722)) { -// CHECK:STDOUT: %T: %facet_type.8cb = symbolic_binding T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.722)] -// CHECK:STDOUT: %Self: @I.WithSelf.GetU.%I.type (%I.type.722) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.30d)] -// CHECK:STDOUT: %Self.as_type.loc9_11.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_11.1 (constants.%Self.as_type.7b3)] -// CHECK:STDOUT: %pattern_type.loc9_11: type = pattern_type %Self.as_type.loc9_11.1 [symbolic = %pattern_type.loc9_11 (constants.%pattern_type.174)] -// CHECK:STDOUT: %self.param_patt.loc9_11.2: @I.WithSelf.GetU.%pattern_type.loc9_11 (%pattern_type.174) = value_param_pattern [symbolic = %self.param_patt.loc9_11.2 (constants.%self.param_patt.bc4)] -// CHECK:STDOUT: %self.patt.loc9_11.2: @I.WithSelf.GetU.%pattern_type.loc9_11 (%pattern_type.174) = wrapper_binding_pattern self, %self.param_patt.loc9_11.2 [symbolic = %self.patt.loc9_11.2 (constants.%self.patt.092)] +// CHECK:STDOUT: generic fn @I.WithSelf.GetV(@I.%T.loc7_14.2: %A.type, @I.%Self.loc7_19.1: @I.%I.type (%I.type.414)) { +// CHECK:STDOUT: %T: %A.type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.414)] +// CHECK:STDOUT: %Self: @I.WithSelf.GetV.%I.type (%I.type.414) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c6a)] +// CHECK:STDOUT: %Self.as_type.loc11_11.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc11_11.1 (constants.%Self.as_type.a01)] +// CHECK:STDOUT: %pattern_type.loc11_11: type = pattern_type %Self.as_type.loc11_11.1 [symbolic = %pattern_type.loc11_11 (constants.%pattern_type.4f3)] +// CHECK:STDOUT: %self.param_patt.loc11_11.2: @I.WithSelf.GetV.%pattern_type.loc11_11 (%pattern_type.4f3) = value_param_pattern [symbolic = %self.param_patt.loc11_11.2 (constants.%self.param_patt.dbe)] +// CHECK:STDOUT: %self.patt.loc11_11.2: @I.WithSelf.GetV.%pattern_type.loc11_11 (%pattern_type.4f3) = wrapper_binding_pattern self, %self.param_patt.loc11_11.2 [symbolic = %self.patt.loc11_11.2 (constants.%self.patt.e5a)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self, @I, @I(%T) [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %impl.elem0.loc9_20.1: %facet_type.208 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_20.1 (constants.%impl.elem0.931)] -// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc9_20.1 [symbolic = %as_type (constants.%as_type)] -// CHECK:STDOUT: %.loc9_20.1: Core.Form = init_form %as_type [symbolic = %.loc9_20.1 (constants.%.bbb)] -// CHECK:STDOUT: %pattern_type.loc9_20: type = pattern_type %as_type [symbolic = %pattern_type.loc9_20 (constants.%pattern_type.781)] -// CHECK:STDOUT: %return.param_patt.loc9_20.2: @I.WithSelf.GetU.%pattern_type.loc9_20 (%pattern_type.781) = out_param_pattern [symbolic = %return.param_patt.loc9_20.2 (constants.%return.param_patt.387)] -// CHECK:STDOUT: %return.patt.loc9_17.2: @I.WithSelf.GetU.%pattern_type.loc9_20 (%pattern_type.781) = return_slot_pattern %return.param_patt.loc9_20.2, %as_type [symbolic = %return.patt.loc9_17.2 (constants.%return.patt.019)] +// CHECK:STDOUT: %impl.elem1.loc11_20.1: %facet_type.392 = impl_witness_access %I.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_20.1 (constants.%impl.elem1.6d1)] +// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem1.loc11_20.1 [symbolic = %as_type (constants.%as_type.eff)] +// CHECK:STDOUT: %.loc11_20.1: Core.Form = init_form %as_type [symbolic = %.loc11_20.1 (constants.%.bf8)] +// CHECK:STDOUT: %pattern_type.loc11_20: type = pattern_type %as_type [symbolic = %pattern_type.loc11_20 (constants.%pattern_type.5ec)] +// CHECK:STDOUT: %return.param_patt.loc11_20.2: @I.WithSelf.GetV.%pattern_type.loc11_20 (%pattern_type.5ec) = out_param_pattern [symbolic = %return.param_patt.loc11_20.2 (constants.%return.param_patt.e69)] +// CHECK:STDOUT: %return.patt.loc11_17.2: @I.WithSelf.GetV.%pattern_type.loc11_20 (%pattern_type.5ec) = return_slot_pattern %return.param_patt.loc11_20.2, %as_type [symbolic = %return.patt.loc11_17.2 (constants.%return.patt.f75)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.WithSelf.GetU.%Self.as_type.loc9_11.1 (%Self.as_type.7b3)) -> out %return.param: @I.WithSelf.GetU.%as_type (%as_type); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.GetV.%Self.as_type.loc11_11.1 (%Self.as_type.a01)) -> out %return.param: @I.WithSelf.GetV.%as_type (%as_type.eff); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.WithSelf.TakesT(@I.%T.loc6_14.2: %facet_type.8cb, @I.%Self.loc6_34.1: @I.%I.type (%I.type.722)) { -// CHECK:STDOUT: %T: %facet_type.8cb = symbolic_binding T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.722)] -// CHECK:STDOUT: %Self: @I.WithSelf.TakesT.%I.type (%I.type.722) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.30d)] -// CHECK:STDOUT: %Self.as_type.loc10_13.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc10_13.1 (constants.%Self.as_type.7b3)] -// CHECK:STDOUT: %pattern_type.loc10_13: type = pattern_type %Self.as_type.loc10_13.1 [symbolic = %pattern_type.loc10_13 (constants.%pattern_type.174)] -// CHECK:STDOUT: %self.param_patt.loc10_13.2: @I.WithSelf.TakesT.%pattern_type.loc10_13 (%pattern_type.174) = value_param_pattern [symbolic = %self.param_patt.loc10_13.2 (constants.%self.param_patt.bc4)] -// CHECK:STDOUT: %self.patt.loc10_13.2: @I.WithSelf.TakesT.%pattern_type.loc10_13 (%pattern_type.174) = wrapper_binding_pattern self, %self.param_patt.loc10_13.2 [symbolic = %self.patt.loc10_13.2 (constants.%self.patt.092)] -// CHECK:STDOUT: %T.as_type.loc10_22.1: type = facet_access_type %T [symbolic = %T.as_type.loc10_22.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type.loc10_20: type = pattern_type %T.as_type.loc10_22.1 [symbolic = %pattern_type.loc10_20 (constants.%pattern_type.bc3)] -// CHECK:STDOUT: %t.param_patt.loc10_20.2: @I.WithSelf.TakesT.%pattern_type.loc10_20 (%pattern_type.bc3) = value_param_pattern [symbolic = %t.param_patt.loc10_20.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc10_20.2: @I.WithSelf.TakesT.%pattern_type.loc10_20 (%pattern_type.bc3) = wrapper_binding_pattern t, %t.param_patt.loc10_20.2 [symbolic = %t.patt.loc10_20.2 (constants.%t.patt)] +// CHECK:STDOUT: generic fn @I.WithSelf.TakesT(@I.%T.loc7_14.2: %A.type, @I.%Self.loc7_19.1: @I.%I.type (%I.type.414)) { +// CHECK:STDOUT: %T: %A.type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.414)] +// CHECK:STDOUT: %Self: @I.WithSelf.TakesT.%I.type (%I.type.414) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c6a)] +// CHECK:STDOUT: %Self.as_type.loc12_13.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_13.1 (constants.%Self.as_type.a01)] +// CHECK:STDOUT: %pattern_type.loc12_13: type = pattern_type %Self.as_type.loc12_13.1 [symbolic = %pattern_type.loc12_13 (constants.%pattern_type.4f3)] +// CHECK:STDOUT: %self.param_patt.loc12_13.2: @I.WithSelf.TakesT.%pattern_type.loc12_13 (%pattern_type.4f3) = value_param_pattern [symbolic = %self.param_patt.loc12_13.2 (constants.%self.param_patt.dbe)] +// CHECK:STDOUT: %self.patt.loc12_13.2: @I.WithSelf.TakesT.%pattern_type.loc12_13 (%pattern_type.4f3) = wrapper_binding_pattern self, %self.param_patt.loc12_13.2 [symbolic = %self.patt.loc12_13.2 (constants.%self.patt.e5a)] +// CHECK:STDOUT: %T.as_type.loc12_22.1: type = facet_access_type %T [symbolic = %T.as_type.loc12_22.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type.loc12_20: type = pattern_type %T.as_type.loc12_22.1 [symbolic = %pattern_type.loc12_20 (constants.%pattern_type.a0e)] +// CHECK:STDOUT: %t.param_patt.loc12_20.2: @I.WithSelf.TakesT.%pattern_type.loc12_20 (%pattern_type.a0e) = value_param_pattern [symbolic = %t.param_patt.loc12_20.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc12_20.2: @I.WithSelf.TakesT.%pattern_type.loc12_20 (%pattern_type.a0e) = wrapper_binding_pattern t, %t.param_patt.loc12_20.2 [symbolic = %t.patt.loc12_20.2 (constants.%t.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.WithSelf.TakesT.%Self.as_type.loc10_13.1 (%Self.as_type.7b3), %t.param: @I.WithSelf.TakesT.%T.as_type.loc10_22.1 (%T.as_type)); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.TakesT.%Self.as_type.loc12_13.1 (%Self.as_type.a01), %t.param: @I.WithSelf.TakesT.%T.as_type.loc12_22.1 (%T.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T) { -// CHECK:STDOUT: %T.patt.loc6_14.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_14.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc7_14.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc7_14.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf(constants.%T, constants.%Self.30d) {} +// CHECK:STDOUT: specific @I.WithSelf(constants.%T, constants.%Self.c6a) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf.GetU(constants.%T, constants.%Self.30d) { +// CHECK:STDOUT: specific @I.WithSelf.GetV(constants.%T, constants.%Self.c6a) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %I.type => constants.%I.type.722 -// CHECK:STDOUT: %Self => constants.%Self.30d -// CHECK:STDOUT: %Self.as_type.loc9_11.1 => constants.%Self.as_type.7b3 -// CHECK:STDOUT: %pattern_type.loc9_11 => constants.%pattern_type.174 -// CHECK:STDOUT: %self.param_patt.loc9_11.2 => constants.%self.param_patt.bc4 -// CHECK:STDOUT: %self.patt.loc9_11.2 => constants.%self.patt.092 +// CHECK:STDOUT: %I.type => constants.%I.type.414 +// CHECK:STDOUT: %Self => constants.%Self.c6a +// CHECK:STDOUT: %Self.as_type.loc11_11.1 => constants.%Self.as_type.a01 +// CHECK:STDOUT: %pattern_type.loc11_11 => constants.%pattern_type.4f3 +// CHECK:STDOUT: %self.param_patt.loc11_11.2 => constants.%self.param_patt.dbe +// CHECK:STDOUT: %self.patt.loc11_11.2 => constants.%self.patt.e5a // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness -// CHECK:STDOUT: %impl.elem0.loc9_20.1 => constants.%impl.elem0.931 -// CHECK:STDOUT: %as_type => constants.%as_type -// CHECK:STDOUT: %.loc9_20.1 => constants.%.bbb -// CHECK:STDOUT: %pattern_type.loc9_20 => constants.%pattern_type.781 -// CHECK:STDOUT: %return.param_patt.loc9_20.2 => constants.%return.param_patt.387 -// CHECK:STDOUT: %return.patt.loc9_17.2 => constants.%return.patt.019 +// CHECK:STDOUT: %impl.elem1.loc11_20.1 => constants.%impl.elem1.6d1 +// CHECK:STDOUT: %as_type => constants.%as_type.eff +// CHECK:STDOUT: %.loc11_20.1 => constants.%.bf8 +// CHECK:STDOUT: %pattern_type.loc11_20 => constants.%pattern_type.5ec +// CHECK:STDOUT: %return.param_patt.loc11_20.2 => constants.%return.param_patt.e69 +// CHECK:STDOUT: %return.patt.loc11_17.2 => constants.%return.patt.f75 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf.TakesT(constants.%T, constants.%Self.30d) { +// CHECK:STDOUT: specific @I.WithSelf.TakesT(constants.%T, constants.%Self.c6a) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %I.type => constants.%I.type.722 -// CHECK:STDOUT: %Self => constants.%Self.30d -// CHECK:STDOUT: %Self.as_type.loc10_13.1 => constants.%Self.as_type.7b3 -// CHECK:STDOUT: %pattern_type.loc10_13 => constants.%pattern_type.174 -// CHECK:STDOUT: %self.param_patt.loc10_13.2 => constants.%self.param_patt.bc4 -// CHECK:STDOUT: %self.patt.loc10_13.2 => constants.%self.patt.092 -// CHECK:STDOUT: %T.as_type.loc10_22.1 => constants.%T.as_type -// CHECK:STDOUT: %pattern_type.loc10_20 => constants.%pattern_type.bc3 -// CHECK:STDOUT: %t.param_patt.loc10_20.2 => constants.%t.param_patt -// CHECK:STDOUT: %t.patt.loc10_20.2 => constants.%t.patt +// CHECK:STDOUT: %I.type => constants.%I.type.414 +// CHECK:STDOUT: %Self => constants.%Self.c6a +// CHECK:STDOUT: %Self.as_type.loc12_13.1 => constants.%Self.as_type.a01 +// CHECK:STDOUT: %pattern_type.loc12_13 => constants.%pattern_type.4f3 +// CHECK:STDOUT: %self.param_patt.loc12_13.2 => constants.%self.param_patt.dbe +// CHECK:STDOUT: %self.patt.loc12_13.2 => constants.%self.patt.e5a +// CHECK:STDOUT: %T.as_type.loc12_22.1 => constants.%T.as_type +// CHECK:STDOUT: %pattern_type.loc12_20 => constants.%pattern_type.a0e +// CHECK:STDOUT: %t.param_patt.loc12_20.2 => constants.%t.param_patt +// CHECK:STDOUT: %t.patt.loc12_20.2 => constants.%t.patt // CHECK:STDOUT: } // CHECK:STDOUT: