diff --git a/core/prelude/copy.carbon b/core/prelude/copy.carbon index 0223eb4ad402..394add029574 100644 --- a/core/prelude/copy.carbon +++ b/core/prelude/copy.carbon @@ -19,7 +19,7 @@ private alias FloatLiteral = MakeFloatLiteral(); private fn MakeIntLiteral() -> type = "int_literal.make_type"; private alias IntLiteral = MakeIntLiteral(); -impl forall [T:! Copy] const T as Copy { +impl forall [T: Copy] const T as Copy { fn Op(self) -> Self { return (self as T).(Copy.Op)() as const T; } } @@ -43,7 +43,7 @@ impl type as Copy { fn Op(self) -> Self = "primitive_copy"; } -impl forall [T:! type] T* as Copy { +impl forall [T: type] T* as Copy { fn Op(self) -> Self = "primitive_copy"; } @@ -52,19 +52,19 @@ impl () as Copy { fn Op(self) -> Self = "no_op"; } -impl forall [T:! Copy] (T,) as Copy { +impl forall [T: Copy] (T,) as Copy { fn Op(self) -> Self { return (self.0.Op(),); } } -impl forall [T:! Copy, U:! Copy] (T, U) as Copy { +impl forall [T: Copy, U: Copy] (T, U) as Copy { fn Op(self) -> Self { return (self.0.Op(), self.1.Op()); } } -impl forall [T:! Copy, U:! Copy, V:! Copy] (T, U, V) as Copy { +impl forall [T: Copy, U: Copy, V: Copy] (T, U, V) as Copy { fn Op(self) -> Self { return (self.0.Op(), self.1.Op(), self.2.Op()); } diff --git a/core/prelude/default.carbon b/core/prelude/default.carbon index 879b279df998..54fe85c0e12c 100644 --- a/core/prelude/default.carbon +++ b/core/prelude/default.carbon @@ -17,7 +17,7 @@ interface Default { fn Op() -> Self; } // other operations on the object except for reinitialization are permitted. interface UnformedInit { // TODO: This should probably be: - // let StructT:! type; + // let StructT: type; // fn Op() -> StructT; // and should be able to initialize a subset of the fields. For now we always // leave the object uninitialized when it is in an unformed state. @@ -28,8 +28,8 @@ interface UnformedInit { // orphan rule because these builtin types have no associated library of their // own. impl bool as UnformedInit {} -impl forall [T:! type] T* as UnformedInit {} -impl forall [T:! UnformedInit, N:! IntLiteral] array(T, N) as UnformedInit {} +impl forall [T: type] T* as UnformedInit {} +impl forall [T: UnformedInit, N: IntLiteral] array(T, N) as UnformedInit {} // TODO: Generalize these to apply to tuples and structs containing only // `UnformedInit` types. impl () as UnformedInit {} @@ -43,12 +43,12 @@ interface DefaultOrUnformed { fn Op() -> Self; } -final impl forall [T:! Default] T as DefaultOrUnformed { +final impl forall [T: Default] T as DefaultOrUnformed { fn Op() -> Self { return T.(Default.Op)(); } } -impl forall [T:! UnformedInit] T as DefaultOrUnformed { +impl forall [T: UnformedInit] T as DefaultOrUnformed { fn Op() -> Self = "make_uninitialized"; } diff --git a/core/prelude/iterate.carbon b/core/prelude/iterate.carbon index 6f33ab38545b..9aff9863f08c 100644 --- a/core/prelude/iterate.carbon +++ b/core/prelude/iterate.carbon @@ -11,13 +11,13 @@ export import library "prelude/operators"; interface Iterate { // TODO: Support iterating ranges of non-copyable values. - let ElementType:! Copy & Destroy; - let CursorType:! Destroy; + let ElementType: Copy & Destroy; + let CursorType: Destroy; fn NewCursor(self) -> CursorType; fn Next(self, cursor: CursorType*) -> Optional(ElementType); } -impl forall [T:! Copy & Destroy, N:! IntLiteral] +impl forall [T: Copy & Destroy, N: IntLiteral] array(T, N) as Iterate where .ElementType = T and .CursorType = i32 { fn NewCursor(unused self) -> i32 { return 0; } @@ -32,8 +32,8 @@ impl forall [T:! Copy & Destroy, N:! IntLiteral] } interface CppRangeForIterate { - let Iterator:! type; - let Sentinel:! type; + let Iterator: type; + let Sentinel: type; // TODO: self must be ref-qualified fn Begin(self) -> Iterator; @@ -41,7 +41,7 @@ interface CppRangeForIterate { } impl forall [ - R:! CppRangeForIterate where + R: CppRangeForIterate where .Iterator impls Copy & Destroy & CppUnsafeDeref & Inc & EqWith(.Sentinel) and .Iterator.(CppUnsafeDeref.Result) impls Copy & Destroy and .Sentinel impls Copy & Destroy diff --git a/core/prelude/operators/arithmetic.carbon b/core/prelude/operators/arithmetic.carbon index 6850ee6932fd..b3f2d93cc1ae 100644 --- a/core/prelude/operators/arithmetic.carbon +++ b/core/prelude/operators/arithmetic.carbon @@ -10,7 +10,7 @@ import library "prelude/types/int_literal"; // TODO: Per the design, the associated type `Result` in each of these // interfaces should have a default value of `Self`: // -// default let Result:! type = Self; +// default let Result: type = Self; // TODO: Per the design, for each *With interface there should also be a // non-With named constraint, such as: @@ -20,13 +20,13 @@ import library "prelude/types/int_literal"; // } // Addition: `a + b`. -interface AddWith(Other:! type) { - let Result:! type; +interface AddWith(Other: type) { + let Result: type; fn Op(self, other: Other) -> Result; } // Addition with assignment: `a += b`. -interface AddAssignWith(Other:! type) { +interface AddAssignWith(Other: type) { fn Op(ref self, other: Other); } @@ -37,18 +37,18 @@ interface Inc { // Negation: `-a`. interface Negate { - let Result:! type; + let Result: type; fn Op(self) -> Result; } // Subtraction: `a - b`. -interface SubWith(Other:! type) { - let Result:! type; +interface SubWith(Other: type) { + let Result: type; fn Op(self, other: Other) -> Result; } // Subtraction with assignment: `a -= b`. -interface SubAssignWith(Other:! type) { +interface SubAssignWith(Other: type) { fn Op(ref self, other: Other); } @@ -58,35 +58,35 @@ interface Dec { } // Multiplication: `a * b`. -interface MulWith(Other:! type) { - let Result:! type; +interface MulWith(Other: type) { + let Result: type; fn Op(self, other: Other) -> Result; } // Multiplication with assignment: `a *= b`. -interface MulAssignWith(Other:! type) { +interface MulAssignWith(Other: type) { fn Op(ref self, other: Other); } // Division: `a / b`. -interface DivWith(Other:! type) { - let Result:! type; +interface DivWith(Other: type) { + let Result: type; fn Op(self, other: Other) -> Result; } // Division with assignment: `a /= b`. -interface DivAssignWith(Other:! type) { +interface DivAssignWith(Other: type) { fn Op(ref self, other: Other); } // Modulo: `a % b`. -interface ModWith(Other:! type) { - let Result:! type; +interface ModWith(Other: type) { + let Result: type; fn Op(self, other: Other) -> Result; } // Modulo with assignment: `a %= b`. -interface ModAssignWith(Other:! type) { +interface ModAssignWith(Other: type) { fn Op(ref self, other: Other); } diff --git a/core/prelude/operators/as.carbon b/core/prelude/operators/as.carbon index b9b46726e95e..4271b1f457e9 100644 --- a/core/prelude/operators/as.carbon +++ b/core/prelude/operators/as.carbon @@ -9,58 +9,58 @@ import library "prelude/types/char_literal"; import library "prelude/types/int_literal"; import library "prelude/types/float_literal"; -interface UnsafeAs(Dest:! type) { +interface UnsafeAs(Dest: type) { fn Convert(self) -> Dest; } -interface As(Dest:! type) { +interface As(Dest: type) { // TODO: extend UnsafeAs(Dest); fn Convert(self) -> Dest; } -interface ImplicitAs(Dest:! type) { +interface ImplicitAs(Dest: type) { // TODO: extend As(Dest); fn Convert(self) -> Dest; } // Workaround: ImplicitAs extends As. -impl forall [U:! type, T:! ImplicitAs(U)] T as As(U) { +impl forall [U: type, T: ImplicitAs(U)] T as As(U) { fn Convert(self) -> U { return self.Convert(); } } // Workaround: As extends UnsafeAs. -impl forall [U:! type, T:! As(U)] T as UnsafeAs(U) { +impl forall [U: type, T: As(U)] T as UnsafeAs(U) { fn Convert(self) -> U { return self.Convert(); } } // Copyable types have an identity conversion that performs a copy. -impl forall [T:! Copy] T as ImplicitAs(T) { +impl forall [T: Copy] T as ImplicitAs(T) { fn Convert(self) -> Self { return self.(Copy.Op)(); } } // `const` can be added and removed when converting a value. -impl forall [T:! type, U:! ImplicitAs(T)] U as ImplicitAs(const T) { +impl forall [T: type, U: ImplicitAs(T)] U as ImplicitAs(const T) { fn Convert(self) -> const T { return self.Convert(); } } -impl forall [T:! type, U:! ImplicitAs(T)] const U as ImplicitAs(T) { +impl forall [T: type, U: ImplicitAs(T)] const U as ImplicitAs(T) { fn Convert(self) -> T { return (self as U).Convert(); } } // `const` can be added to a pointer. // TODO: This is also provided as a builtin conversion. We provide it here so // that Optional(T*) can implicitly convert to Optional(const T*). See #5750. -impl forall [T:! type] T* as ImplicitAs(const T*) { +impl forall [T: type] T* as ImplicitAs(const T*) { fn Convert(self) -> const T* = "pointer.unsafe_convert"; } -impl forall [T:! type] T* as As(const T*) { +impl forall [T: type] T* as As(const T*) { fn Convert(self) -> const T* = "pointer.unsafe_convert"; } // Pointer types can be unsafely cast to other pointer types. // TODO: Should `unsafe as` be able to remove `const`? -impl forall [T:! type, U:! type] T* as UnsafeAs(U*) { +impl forall [T: type, U: type] T* as UnsafeAs(U*) { fn Convert(self) -> U* = "pointer.unsafe_convert"; } @@ -80,5 +80,5 @@ impl IntLiteral as As(CharLiteral) { } -interface IntFitsIn(Dest:! type) {} -interface FloatFitsIn(Src:! type) {} +interface IntFitsIn(Dest: type) {} +interface FloatFitsIn(Src: type) {} diff --git a/core/prelude/operators/bitwise.carbon b/core/prelude/operators/bitwise.carbon index c52484a7c44e..1c832aa38d55 100644 --- a/core/prelude/operators/bitwise.carbon +++ b/core/prelude/operators/bitwise.carbon @@ -9,7 +9,7 @@ import library "prelude/types/int_literal"; // TODO: Per the design, the associated type `Result` in each of these // interfaces should have a default value of `Self`: // -// default let Result:! type = Self; +// default let Result: type = Self; // TODO: Per the design, for each *With interface there should also be a // non-With named constraint, such as: @@ -20,62 +20,62 @@ import library "prelude/types/int_literal"; // Bit complement: `^a`. interface BitComplement { - let Result:! type; + let Result: type; fn Op(self) -> Result; } // Bitwise AND: `a & b`. -interface BitAndWith(Other:! type) { - let Result:! type; +interface BitAndWith(Other: type) { + let Result: type; fn Op(self, other: Other) -> Result; } // Bitwise AND with assignment: `a &= b`. -interface BitAndAssignWith(Other:! type) { +interface BitAndAssignWith(Other: type) { fn Op(ref self, other: Other); } // Bitwise OR: `a | b`. -interface BitOrWith(Other:! type) { - let Result:! type; +interface BitOrWith(Other: type) { + let Result: type; fn Op(self, other: Other) -> Result; } // Bitwise OR with assignment: `a |= b`. -interface BitOrAssignWith(Other:! type) { +interface BitOrAssignWith(Other: type) { fn Op(ref self, other: Other); } // Bitwise XOR: `a ^ b`. -interface BitXorWith(Other:! type) { - let Result:! type; +interface BitXorWith(Other: type) { + let Result: type; fn Op(self, other: Other) -> Result; } // Bitwise XOR with assignment: `a ^= b`. -interface BitXorAssignWith(Other:! type) { +interface BitXorAssignWith(Other: type) { fn Op(ref self, other: Other); } // Left shift: `a << b`. -interface LeftShiftWith(Other:! type) { - let Result:! type; +interface LeftShiftWith(Other: type) { + let Result: type; fn Op(self, other: Other) -> Result; } // Left shift with assignment: `a <<= b`. -interface LeftShiftAssignWith(Other:! type) { +interface LeftShiftAssignWith(Other: type) { fn Op(ref self, other: Other); } // Right shift: `a >> b`. -interface RightShiftWith(Other:! type) { - let Result:! type; +interface RightShiftWith(Other: type) { + let Result: type; fn Op(self, other: Other) -> Result; } // Right shift with assignment: `a >>= b`. -interface RightShiftAssignWith(Other:! type) { +interface RightShiftAssignWith(Other: type) { fn Op(ref self, other: Other); } diff --git a/core/prelude/operators/comparison.carbon b/core/prelude/operators/comparison.carbon index bba85621098f..8e859f53822b 100644 --- a/core/prelude/operators/comparison.carbon +++ b/core/prelude/operators/comparison.carbon @@ -15,13 +15,13 @@ import library "prelude/types/int_literal"; // } // Equality comparison: `a == b` and `a != b`. -interface EqWith(Other:! type) { +interface EqWith(Other: type) { fn Equal(self, other: Other) -> bool; fn NotEqual(self, other: Other) -> bool; } // Relational comparison: `a < b`, `a <= b`, `a > b`, `a >= b`. -interface OrderedWith(Other:! type) { +interface OrderedWith(Other: type) { // TODO: fn Compare fn Less(self, other: Other) -> bool; fn LessOrEquivalent(self, other: Other) -> bool; diff --git a/core/prelude/operators/deref.carbon b/core/prelude/operators/deref.carbon index e03a7c5c7da5..f8e26771fac6 100644 --- a/core/prelude/operators/deref.carbon +++ b/core/prelude/operators/deref.carbon @@ -6,6 +6,6 @@ package Core library "prelude/operators/deref"; // TODO: Align with https://docs.carbon-lang.dev/docs/design/values.html#dereferencing-customization. interface CppUnsafeDeref { - let Result:! type; + let Result: type; fn Op(self) -> Result; } diff --git a/core/prelude/operators/index.carbon b/core/prelude/operators/index.carbon index 77c0e08a97c4..31b4a94bf11b 100644 --- a/core/prelude/operators/index.carbon +++ b/core/prelude/operators/index.carbon @@ -4,7 +4,7 @@ package Core library "prelude/operators/index"; -interface IndexWith(SubscriptType:! type) { - let ElementType:! type; +interface IndexWith(SubscriptType: type) { + let ElementType: type; fn At(self, subscript: SubscriptType) -> ElementType; } diff --git a/core/prelude/types/char.carbon b/core/prelude/types/char.carbon index 3f2e1164ad95..b912db83ebc5 100644 --- a/core/prelude/types/char.carbon +++ b/core/prelude/types/char.carbon @@ -34,11 +34,11 @@ impl CharLiteral as As(Char) { fn Convert(self) -> Char = "char_literal.convert_char"; } -impl forall [From:! IntLiteral] UInt(From) as As(Char) { +impl forall [From: IntLiteral] UInt(From) as As(Char) { fn Convert(self) -> Char = "int.convert_char"; } // `char` explicitly converts to any type that `u8` implicitly converts to. -impl forall [T:! type where u8 impls ImplicitAs(.Self)] Char as As(T) { +impl forall [T: type where u8 impls ImplicitAs(.Self)] Char as As(T) { fn Convert(self) -> T { return self as u8; } @@ -58,24 +58,24 @@ impl Char as OrderedWith(Char) { fn GreaterOrEquivalent(self, other: Char) -> bool = "int.greater_eq"; } -impl forall [T:! ImplicitAs(Char)] Char as EqWith(T) { +impl forall [T: ImplicitAs(Char)] Char as EqWith(T) { fn Equal(self, other: Char) -> bool = "int.eq"; fn NotEqual(self, other: Char) -> bool = "int.neq"; } -impl forall [T:! ImplicitAs(Char)] Char as OrderedWith(T) { +impl forall [T: ImplicitAs(Char)] Char as OrderedWith(T) { fn Less(self, other: Char) -> bool = "int.less"; fn LessOrEquivalent(self, other: Char) -> bool = "int.less_eq"; fn Greater(self, other: Char) -> bool = "int.greater"; fn GreaterOrEquivalent(self, other: Char) -> bool = "int.greater_eq"; } -impl forall [T:! ImplicitAs(Char)] T as EqWith(Char) { +impl forall [T: ImplicitAs(Char)] T as EqWith(Char) { fn Equal(self: Char, other: Char) -> bool = "int.eq"; fn NotEqual(self: Char, other: Char) -> bool = "int.neq"; } -impl forall [T:! ImplicitAs(Char)] T as OrderedWith(Char) { +impl forall [T: ImplicitAs(Char)] T as OrderedWith(Char) { fn Less(self: Char, other: Char) -> bool = "int.less"; fn LessOrEquivalent(self: Char, other: Char) -> bool = "int.less_eq"; fn Greater(self: Char, other: Char) -> bool = "int.greater"; @@ -86,10 +86,10 @@ impl forall [T:! ImplicitAs(Char)] T as OrderedWith(Char) { private interface AnyInt {} -impl forall [N:! IntLiteral] Int(N) as AnyInt {} -impl forall [N:! IntLiteral] UInt(N) as AnyInt {} +impl forall [N: IntLiteral] Int(N) as AnyInt {} +impl forall [N: IntLiteral] UInt(N) as AnyInt {} -impl forall [T:! AnyInt & As(u8)] +impl forall [T: AnyInt & As(u8)] Char as AddWith(T) where .Result = Char { fn Op(self, other: T) -> Self { // TODO: This should be erroneous if the addition overflows. @@ -97,7 +97,7 @@ impl forall [T:! AnyInt & As(u8)] } } -impl forall [T:! AnyInt & As(u8)] +impl forall [T: AnyInt & As(u8)] T as AddWith(Char) where .Result = Char { fn Op(self, other: Char) -> Char { // TODO: This should be erroneous if the addition overflows. @@ -105,7 +105,7 @@ impl forall [T:! AnyInt & As(u8)] } } -final impl forall [T:! AnyInt & As(u8)] +final impl forall [T: AnyInt & As(u8)] Char as SubWith(T) where .Result = Char { fn Op(self, other: T) -> Self { // TODO: This should be erroneous if the addition overflows. @@ -119,13 +119,13 @@ impl Char as SubWith(Char) where .Result = i32 { } } -impl forall [T:! ImplicitAs(Char)] T as SubWith(Char) where .Result = i32 { +impl forall [T: ImplicitAs(Char)] T as SubWith(Char) where .Result = i32 { fn Op(self: Char, other: Char) -> i32 { return (self as i32) - (other as i32); } } -impl forall [T:! ImplicitAs(Char)] Char as SubWith(T) where .Result = i32 { +impl forall [T: ImplicitAs(Char)] Char as SubWith(T) where .Result = i32 { fn Op(self, other: Char) -> i32 { return (self as i32) - (other as i32); } diff --git a/core/prelude/types/cpp/int.carbon b/core/prelude/types/cpp/int.carbon index d282fe01d720..cb1e791b0df6 100644 --- a/core/prelude/types/cpp/int.carbon +++ b/core/prelude/types/cpp/int.carbon @@ -199,25 +199,25 @@ final impl CppCompat.LongLong64 as OrderedWith(CppCompat.LongLong64) { // - CppCompat.T on left-hand side. -impl forall [T:! ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as EqWith(T) { +impl forall [T: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as EqWith(T) { fn Equal(self, other: Self) -> bool = "int.eq"; fn NotEqual(self, other: Self) -> bool = "int.neq"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as OrderedWith(T) { +impl forall [T: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as OrderedWith(T) { fn Less(self, other: Self) -> bool = "int.less"; fn LessOrEquivalent(self, other: Self) -> bool = "int.less_eq"; fn Greater(self, other: Self) -> bool = "int.greater"; fn GreaterOrEquivalent(self, other: Self) -> bool = "int.greater_eq"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as EqWith(T) { fn Equal(self, other: Self) -> bool = "int.eq"; fn NotEqual(self, other: Self) -> bool = "int.neq"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as OrderedWith(T) { fn Less(self, other: Self) -> bool = "int.less"; fn LessOrEquivalent(self, other: Self) -> bool = "int.less_eq"; @@ -227,19 +227,19 @@ impl forall [T:! ImplicitAs(CppCompat.LongLong64)] // - CppCompat.T on right-hand side. -impl forall [T:! ImplicitAs(CppCompat.Long32)] T as EqWith(CppCompat.Long32) { +impl forall [T: ImplicitAs(CppCompat.Long32)] T as EqWith(CppCompat.Long32) { fn Equal(self: CppCompat.Long32, other: CppCompat.Long32) -> bool = "int.eq"; fn NotEqual(self: CppCompat.Long32, other: CppCompat.Long32) -> bool = "int.neq"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] T as OrderedWith(CppCompat.Long32) { +impl forall [T: ImplicitAs(CppCompat.Long32)] T as OrderedWith(CppCompat.Long32) { fn Less(self: CppCompat.Long32, other: CppCompat.Long32) -> bool = "int.less"; fn LessOrEquivalent(self: CppCompat.Long32, other: CppCompat.Long32) -> bool = "int.less_eq"; fn Greater(self: CppCompat.Long32, other: CppCompat.Long32) -> bool = "int.greater"; fn GreaterOrEquivalent(self: CppCompat.Long32, other: CppCompat.Long32) -> bool = "int.greater_eq"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] T as EqWith(CppCompat.LongLong64) { fn Equal(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> bool = "int.eq"; @@ -247,7 +247,7 @@ impl forall [T:! ImplicitAs(CppCompat.LongLong64)] other: CppCompat.LongLong64) -> bool = "int.neq"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] T as OrderedWith(CppCompat.LongLong64) { fn Less(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> bool = "int.less"; @@ -321,58 +321,58 @@ final impl CppCompat.LongLong64 as ModWith(Self) where .Result = Self { // - CppCompat.Long32 on left-hand side. -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as AddWith(T) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.sadd"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as SubWith(T) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.ssub"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as MulWith(T) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.smul"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as DivWith(T) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.sdiv"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as ModWith(T) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.smod"; } // - CppCompat.LongLong64 on left-hand side. -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as AddWith(T) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.sadd"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as SubWith(T) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.ssub"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as MulWith(T) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.smul"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as DivWith(T) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.sdiv"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as ModWith(T) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.smod"; @@ -380,58 +380,58 @@ impl forall [T:! ImplicitAs(CppCompat.LongLong64)] // - CppCompat.Long32 on right-hand side. -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] T as AddWith(CppCompat.Long32) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.sadd"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] T as SubWith(CppCompat.Long32) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.ssub"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] T as MulWith(CppCompat.Long32) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.smul"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] T as DivWith(CppCompat.Long32) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.sdiv"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] T as ModWith(CppCompat.Long32) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.smod"; } // - CppCompat.LongLong64 on right-hand side. -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] T as AddWith(CppCompat.LongLong64) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.sadd"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] T as SubWith(CppCompat.LongLong64) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.ssub"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] T as MulWith(CppCompat.LongLong64) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.smul"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] T as DivWith(CppCompat.LongLong64) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.sdiv"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] T as ModWith(CppCompat.LongLong64) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.smod"; @@ -499,31 +499,31 @@ final impl CppCompat.LongLong64 as RightShiftWith(Self) where .Result = Self { // - CppCompat.Long32 on left-hand side. -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as BitAndWith(T) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other:CppCompat.Long32) -> CppCompat.Long32 = "int.and"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as BitOrWith(T) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.or"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as BitXorWith(T) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.xor"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as LeftShiftWith(T) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.left_shift"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as RightShiftWith(T) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.right_shift"; @@ -531,31 +531,31 @@ impl forall [T:! ImplicitAs(CppCompat.Long32)] // - CppCompat.LongLong64 on left-hand side. -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as BitAndWith(T) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other:CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.and"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as BitOrWith(T) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.or"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as BitXorWith(T) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.xor"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as LeftShiftWith(T) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.left_shift"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as RightShiftWith(T) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.right_shift"; @@ -563,31 +563,31 @@ impl forall [T:! ImplicitAs(CppCompat.LongLong64)] // - CppCompat.Long32 on right-hand side. -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] T as BitAndWith(CppCompat.Long32) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.and"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] T as BitOrWith(CppCompat.Long32) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.or"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] T as BitXorWith(CppCompat.Long32) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.xor"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] T as LeftShiftWith(CppCompat.Long32) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.left_shift"; } -impl forall [T:! ImplicitAs(CppCompat.Long32)] +impl forall [T: ImplicitAs(CppCompat.Long32)] T as RightShiftWith(CppCompat.Long32) where .Result = CppCompat.Long32 { fn Op(self: CppCompat.Long32, other: CppCompat.Long32) -> CppCompat.Long32 = "int.right_shift"; @@ -595,31 +595,31 @@ impl forall [T:! ImplicitAs(CppCompat.Long32)] // - CppCompat.LongLong64 on right-hand side. -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] T as BitAndWith(CppCompat.LongLong64) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.and"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] T as BitOrWith(CppCompat.LongLong64) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.or"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] T as BitXorWith(CppCompat.LongLong64) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.xor"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] T as LeftShiftWith(CppCompat.LongLong64) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.left_shift"; } -impl forall [T:! ImplicitAs(CppCompat.LongLong64)] +impl forall [T: ImplicitAs(CppCompat.LongLong64)] T as RightShiftWith(CppCompat.LongLong64) where .Result = CppCompat.LongLong64 { fn Op(self: CppCompat.LongLong64, other: CppCompat.LongLong64) -> CppCompat.LongLong64 = "int.right_shift"; @@ -633,54 +633,54 @@ impl forall [T:! ImplicitAs(CppCompat.LongLong64)] // - CppCompat.Long32 -impl forall [U:! ImplicitAs(CppCompat.Long32)] +impl forall [U: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as AddAssignWith(U) { fn Op(ref self, other: Self) = "int.sadd_assign"; } -impl forall [U:! ImplicitAs(CppCompat.Long32)] +impl forall [U: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as SubAssignWith(U) { fn Op(ref self, other: Self) = "int.ssub_assign"; } -impl forall [U:! ImplicitAs(CppCompat.Long32)] +impl forall [U: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as MulAssignWith(U) { fn Op(ref self, other: Self) = "int.smul_assign"; } -impl forall [U:! ImplicitAs(CppCompat.Long32)] +impl forall [U: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as DivAssignWith(U) { fn Op(ref self, other: Self) = "int.sdiv_assign"; } -impl forall [U:! ImplicitAs(CppCompat.Long32)] +impl forall [U: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as ModAssignWith(U) { fn Op(ref self, other: Self) = "int.smod_assign"; } // - CppCompat.LongLong64 -impl forall [U:! ImplicitAs(CppCompat.LongLong64)] +impl forall [U: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as AddAssignWith(U) { fn Op(ref self, other: Self) = "int.sadd_assign"; } -impl forall [U:! ImplicitAs(CppCompat.LongLong64)] +impl forall [U: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as SubAssignWith(U) { fn Op(ref self, other: Self) = "int.ssub_assign"; } -impl forall [U:! ImplicitAs(CppCompat.LongLong64)] +impl forall [U: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as MulAssignWith(U) { fn Op(ref self, other: Self) = "int.smul_assign"; } -impl forall [U:! ImplicitAs(CppCompat.LongLong64)] +impl forall [U: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as DivAssignWith(U) { fn Op(ref self, other: Self) = "int.sdiv_assign"; } -impl forall [U:! ImplicitAs(CppCompat.LongLong64)] +impl forall [U: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as ModAssignWith(U) { fn Op(ref self, other: Self) = "int.smod_assign"; } @@ -689,54 +689,54 @@ impl forall [U:! ImplicitAs(CppCompat.LongLong64)] // - CppCompat.Long32 -impl forall [U:! ImplicitAs(CppCompat.Long32)] +impl forall [U: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as BitAndAssignWith(U) { fn Op(ref self, other: Self) = "int.and_assign"; } -impl forall [U:! ImplicitAs(CppCompat.Long32)] +impl forall [U: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as BitOrAssignWith(U) { fn Op(ref self, other: Self) = "int.or_assign"; } -impl forall [U:! ImplicitAs(CppCompat.Long32)] +impl forall [U: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as BitXorAssignWith(U) { fn Op(ref self, other: Self) = "int.xor_assign"; } -impl forall [U:! ImplicitAs(CppCompat.Long32)] +impl forall [U: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as LeftShiftAssignWith(U) { fn Op(ref self, other: Self) = "int.left_shift_assign"; } -impl forall [U:! ImplicitAs(CppCompat.Long32)] +impl forall [U: ImplicitAs(CppCompat.Long32)] CppCompat.Long32 as RightShiftAssignWith(U) { fn Op(ref self, other: Self) = "int.right_shift_assign"; } // - CppCompat.LongLong64 -impl forall [U:! ImplicitAs(CppCompat.LongLong64)] +impl forall [U: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as BitAndAssignWith(U) { fn Op(ref self, other: Self) = "int.and_assign"; } -impl forall [U:! ImplicitAs(CppCompat.LongLong64)] +impl forall [U: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as BitOrAssignWith(U) { fn Op(ref self, other: Self) = "int.or_assign"; } -impl forall [U:! ImplicitAs(CppCompat.LongLong64)] +impl forall [U: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as BitXorAssignWith(U) { fn Op(ref self, other: Self) = "int.xor_assign"; } -impl forall [U:! ImplicitAs(CppCompat.LongLong64)] +impl forall [U: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as LeftShiftAssignWith(U) { fn Op(ref self, other: Self) = "int.left_shift_assign"; } -impl forall [U:! ImplicitAs(CppCompat.LongLong64)] +impl forall [U: ImplicitAs(CppCompat.LongLong64)] CppCompat.LongLong64 as RightShiftAssignWith(U) { fn Op(ref self, other: Self) = "int.right_shift_assign"; } diff --git a/core/prelude/types/cpp/nullptr.carbon b/core/prelude/types/cpp/nullptr.carbon index 22d1696e6e15..4e7541722882 100644 --- a/core/prelude/types/cpp/nullptr.carbon +++ b/core/prelude/types/cpp/nullptr.carbon @@ -47,7 +47,7 @@ class CppCompat.NullptrT { // TODO: impl as EqWith(Self) - impl forall [T:! type] as ImplicitAs(Optional(T*)) { + impl forall [T: type] as ImplicitAs(Optional(T*)) { fn Convert(unused self) -> Optional(T*) { return Optional(T*).None(); } diff --git a/core/prelude/types/cpp/void.carbon b/core/prelude/types/cpp/void.carbon index 1cea1d56a63a..b1bb4141940c 100644 --- a/core/prelude/types/cpp/void.carbon +++ b/core/prelude/types/cpp/void.carbon @@ -32,10 +32,10 @@ abstract class CppCompat.VoidBase { // TODO: Do not allow a pointer to `const T` to convert to `Cpp.void*`. // #6357 allows it, and we don't have a good way to express "non-const" as a // constraint on this impl, but this conversion is not const-correct. -impl forall [T:! type] T* as ImplicitAs(CppCompat.VoidBase*) { +impl forall [T: type] T* as ImplicitAs(CppCompat.VoidBase*) { fn Convert(self: T*) -> CppCompat.VoidBase* = "pointer.unsafe_convert"; } -impl forall [T:! type] T* as ImplicitAs(const CppCompat.VoidBase*) { +impl forall [T: type] T* as ImplicitAs(const CppCompat.VoidBase*) { fn Convert(self: T*) -> CppCompat.VoidBase* = "pointer.unsafe_convert"; } diff --git a/core/prelude/types/float.carbon b/core/prelude/types/float.carbon index 99970f24d1c1..bd89fc132ad8 100644 --- a/core/prelude/types/float.carbon +++ b/core/prelude/types/float.carbon @@ -15,30 +15,30 @@ import library "prelude/types/int_literal"; private fn MakeFloat(size: IntLiteral) -> type = "float.make_type"; -class Float(N:! IntLiteral) { +class Float(N: IntLiteral) { adapt MakeFloat(N); } -impl forall [N:! IntLiteral] Float(N) as UnformedInit {} +impl forall [N: IntLiteral] Float(N) as UnformedInit {} // Copy. -impl forall [N:! IntLiteral] Float(N) as Copy { +impl forall [N: IntLiteral] Float(N) as Copy { fn Op(self) -> Self = "primitive_copy"; } // Conversions between floating-point types. Implicit if all the source values // can be represented exactly in the target type, otherwise explicit. -impl forall [N:! IntLiteral] FloatLiteral as ImplicitAs(Float(N)) { +impl forall [N: IntLiteral] FloatLiteral as ImplicitAs(Float(N)) { fn Convert(self) -> Float(N) = "float.convert_checked"; } // TODO: Remove this once ImplicitAs extends As. -impl forall [N:! IntLiteral] FloatLiteral as As(Float(N)) { +impl forall [N: IntLiteral] FloatLiteral as As(Float(N)) { fn Convert(self) -> Float(N) = "float.convert_checked"; } -final impl forall [From:! IntLiteral, To:! IntLiteral] +final impl forall [From: IntLiteral, To: IntLiteral] Float(From) as As(Float(To)) { fn Convert(self) -> Float(To) = "float.convert"; } @@ -47,12 +47,12 @@ final impl forall [From:! IntLiteral, To:! IntLiteral] // that is only parameterized by integers. // TODO: Remove these once possible. private interface AnyFloat { - let Width:! IntLiteral; + let Width: IntLiteral; fn AsFloat(self) -> Float(Width); fn Make(src: Float(Width)) -> Self; } -impl forall [N:! IntLiteral] Float(N) as AnyFloat where .Width = N { +impl forall [N: IntLiteral] Float(N) as AnyFloat where .Width = N { fn AsFloat(self) -> Self { return self; } fn Make(src: Self) -> Self { return src; } } @@ -60,7 +60,7 @@ impl forall [N:! IntLiteral] Float(N) as AnyFloat where .Width = N { // Use `Float(?) as ImplicitAs(?)` to avoid a collision with the // `? as ImplicitAs(Float(?))` type structure used by int -> float conversion. // TODO: Use `match_first` to resolve this instead once it is available. -impl forall [From:! IntLiteral, To:! AnyFloat where Float(From) impls FloatFitsIn(.Self)] +impl forall [From: IntLiteral, To: AnyFloat where Float(From) impls FloatFitsIn(.Self)] Float(From) as ImplicitAs(To) { fn Convert(self) -> To { fn Impl(src: Float(From)) -> Float(To.Width) = "float.convert"; @@ -69,7 +69,7 @@ impl forall [From:! IntLiteral, To:! AnyFloat where Float(From) impls FloatFitsI } // Desired workaround-free version of the above: -// impl forall [From:! IntLiteral, To:! IntLiteral +// impl forall [From: IntLiteral, To: IntLiteral // where Float(From) impls FloatFitsIn(Float(To))] // Float(From) as ImplicitAs(Float(To)) { // fn Convert(self) -> Float(To) = "float.convert"; @@ -77,34 +77,34 @@ impl forall [From:! IntLiteral, To:! AnyFloat where Float(From) impls FloatFitsI // Conversions from floating-point to integer type. Always unsafe: not all // source values fit in the target type. -final impl forall [From:! IntLiteral, To:! IntLiteral] +final impl forall [From: IntLiteral, To: IntLiteral] Float(From) as UnsafeAs(Int(To)) { fn Convert(self) -> Int(To) = "float.convert_int"; } -final impl forall [From:! IntLiteral, To:! IntLiteral] +final impl forall [From: IntLiteral, To: IntLiteral] Float(From) as UnsafeAs(UInt(To)) { fn Convert(self) -> UInt(To) = "float.convert_int"; } -final impl forall [From:! IntLiteral] +final impl forall [From: IntLiteral] Float(From) as UnsafeAs(IntLiteral) { fn Convert(self) -> IntLiteral = "float.convert_int"; } // Conversions from integer to floating-point type. Implicit if all source // values can be represented exactly in the target type, otherwise explicit. -impl forall [From:! IntLiteral, To:! IntLiteral] +impl forall [From: IntLiteral, To: IntLiteral] Int(From) as As(Float(To)) { fn Convert(self) -> Float(To) = "int.convert_float"; } -impl forall [From:! IntLiteral, To:! IntLiteral] +impl forall [From: IntLiteral, To: IntLiteral] UInt(From) as As(Float(To)) { fn Convert(self) -> Float(To) = "int.convert_float"; } -impl forall [To:! IntLiteral] +impl forall [To: IntLiteral] IntLiteral as As(Float(To)) { fn Convert(self) -> Float(To) = "int.convert_float"; } @@ -114,28 +114,28 @@ impl forall [To:! IntLiteral] // lack of support for `match_first`. // TODO: Remove these once possible. private interface AnyInt { - let Width:! IntLiteral; + let Width: IntLiteral; fn AsInt(self) -> Int(Width); } -impl forall [N:! IntLiteral] Int(N) as AnyInt where .Width = N { +impl forall [N: IntLiteral] Int(N) as AnyInt where .Width = N { fn AsInt(self) -> Self { return self; } } private interface AnyUInt { - let Width:! IntLiteral; + let Width: IntLiteral; fn AsUInt(self) -> UInt(Width); } -impl forall [N:! IntLiteral] UInt(N) as AnyUInt where .Width = N { +impl forall [N: IntLiteral] UInt(N) as AnyUInt where .Width = N { fn AsUInt(self) -> Self { return self; } } -private interface IntImplicitAsFloat(To:! IntLiteral) { +private interface IntImplicitAsFloat(To: IntLiteral) { fn Convert(self) -> Float(To); } -final impl forall [To:! IntLiteral, From:! AnyInt & IntFitsIn(Float(To))] +final impl forall [To: IntLiteral, From: AnyInt & IntFitsIn(Float(To))] From as IntImplicitAsFloat(To) { fn Convert(self) -> Float(To) { fn Impl(src: Int(From.Width)) -> Float(To) = "int.convert_float"; @@ -143,7 +143,7 @@ final impl forall [To:! IntLiteral, From:! AnyInt & IntFitsIn(Float(To))] } } -impl forall [To:! IntLiteral, From:! AnyUInt & IntFitsIn(Float(To))] +impl forall [To: IntLiteral, From: AnyUInt & IntFitsIn(Float(To))] From as IntImplicitAsFloat(To) { fn Convert(self) -> Float(To) { fn Impl(src: UInt(From.Width)) -> Float(To) = "int.convert_float"; @@ -151,7 +151,7 @@ impl forall [To:! IntLiteral, From:! AnyUInt & IntFitsIn(Float(To))] } } -impl forall [To:! IntLiteral, From:! IntImplicitAsFloat(To)] +impl forall [To: IntLiteral, From: IntImplicitAsFloat(To)] From as ImplicitAs(Float(To)) { fn Convert(self) -> Float(To) { return self.Convert(); @@ -160,31 +160,31 @@ impl forall [To:! IntLiteral, From:! IntImplicitAsFloat(To)] // Desired workaround-free version of the above: // -// impl forall [From:! IntLiteral, To:! IntLiteral +// impl forall [From: IntLiteral, To: IntLiteral // where Int(From) impls ImplicitAs(Float(To))] // Int(From) as ImplicitAs(Float(To)) { // fn Convert(self) -> Float(To) = "int.convert_float"; // } // -// impl forall [From:! IntLiteral, To:! IntLiteral +// impl forall [From: IntLiteral, To: IntLiteral // where UInt(From) impls ImplicitAs(Float(To))] // UInt(From) as ImplicitAs(Float(To)) { // fn Convert(self) -> Float(To) = "int.convert_float"; // } -impl forall [To:! IntLiteral] +impl forall [To: IntLiteral] IntLiteral as ImplicitAs(Float(To)) { fn Convert(self) -> Float(To) = "int.convert_float_checked"; } // Comparisons. // TODO: Support mixed-type comparisons. -final impl forall [N:! IntLiteral] Float(N) as EqWith(Float(N)) { +final impl forall [N: IntLiteral] Float(N) as EqWith(Float(N)) { fn Equal(self, other: Float(N)) -> bool = "float.eq"; fn NotEqual(self, other: Float(N)) -> bool = "float.neq"; } -final impl forall [N:! IntLiteral] Float(N) as OrderedWith(Float(N)) { +final impl forall [N: IntLiteral] Float(N) as OrderedWith(Float(N)) { fn Less(self, other: Float(N)) -> bool = "float.less"; fn LessOrEquivalent(self, other: Float(N)) -> bool = "float.less_eq"; fn Greater(self, other: Float(N)) -> bool = "float.greater"; @@ -192,48 +192,48 @@ final impl forall [N:! IntLiteral] Float(N) as OrderedWith(Float(N)) { } // Arithmetic. -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Float(N) as AddWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "float.add"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Float(N) as DivWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "float.div"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Float(N) as MulWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "float.mul"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Float(N) as Negate where .Result = Self { fn Op(self) -> Self = "float.negate"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Float(N) as SubWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "float.sub"; } // Compound assignments. -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Float(N) as AddAssignWith(Self) { fn Op(ref self, other: Self) = "float.add_assign"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Float(N) as DivAssignWith(Self) { fn Op(ref self, other: Self) = "float.div_assign"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Float(N) as MulAssignWith(Self) { fn Op(ref self, other: Self) = "float.mul_assign"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Float(N) as SubAssignWith(Self) { fn Op(ref self, other: Self) = "float.sub_assign"; } diff --git a/core/prelude/types/int.carbon b/core/prelude/types/int.carbon index 72e202eddbf7..af27d659779b 100644 --- a/core/prelude/types/int.carbon +++ b/core/prelude/types/int.carbon @@ -14,36 +14,36 @@ import library "prelude/types/int_literal"; private fn MakeInt(size: IntLiteral) -> type = "int.make_type_signed"; -class Int(N:! IntLiteral) { +class Int(N: IntLiteral) { adapt MakeInt(N); } -impl forall [N:! IntLiteral] Int(N) as UnformedInit {} +impl forall [N: IntLiteral] Int(N) as UnformedInit {} // Copy. -impl forall [N:! IntLiteral] Int(N) as Copy { +impl forall [N: IntLiteral] Int(N) as Copy { fn Op(self) -> Self = "primitive_copy"; } // Conversions. -impl forall [To:! IntLiteral] IntLiteral as ImplicitAs(Int(To)) { +impl forall [To: IntLiteral] IntLiteral as ImplicitAs(Int(To)) { fn Convert(self) -> Int(To) = "int.convert_checked"; } -final impl forall [From:! IntLiteral] Int(From) as ImplicitAs(IntLiteral) { +final impl forall [From: IntLiteral] Int(From) as ImplicitAs(IntLiteral) { fn Convert(self) -> IntLiteral = "int.convert_checked"; } // TODO: Remove these once ImplicitAs extends As. For now we need them because // the forwarding impl of As in terms of ImplicitAs is not usable at compile // time. -impl forall [To:! IntLiteral] IntLiteral as As(Int(To)) { +impl forall [To: IntLiteral] IntLiteral as As(Int(To)) { fn Convert(self) -> Int(To) = "int.convert_checked"; } -final impl forall [From:! IntLiteral] Int(From) as As(IntLiteral) { +final impl forall [From: IntLiteral] Int(From) as As(IntLiteral) { fn Convert(self) -> IntLiteral = "int.convert_checked"; } @@ -51,15 +51,15 @@ final impl forall [From:! IntLiteral] Int(From) as As(IntLiteral) { // type `IntLiteral`. // TODO: Remove this once possible. private interface AnyInt { - let Width:! IntLiteral; + let Width: IntLiteral; fn AsInt(self) -> Int(Width); } -impl forall [N:! IntLiteral] Int(N) as AnyInt where .Width = N { +impl forall [N: IntLiteral] Int(N) as AnyInt where .Width = N { fn AsInt(self) -> Self { return self; } } -impl forall [To:! IntLiteral, From:! AnyInt & IntFitsIn(Int(To))] +impl forall [To: IntLiteral, From: AnyInt & IntFitsIn(Int(To))] From as ImplicitAs(Int(To)) { fn Convert(self) -> Int(To) { fn Impl(src: Int(From.Width)) -> Int(To) = "int.convert"; @@ -67,21 +67,21 @@ impl forall [To:! IntLiteral, From:! AnyInt & IntFitsIn(Int(To))] } } -final impl forall [From:! IntLiteral, To:! IntLiteral] Int(From) as As(Int(To)) { +final impl forall [From: IntLiteral, To: IntLiteral] Int(From) as As(Int(To)) { fn Convert(self) -> Int(To) = "int.convert"; } // Explicit conversion to/from character literals. -impl forall [N:! IntLiteral] Int(N) as As(CharLiteral) { +impl forall [N: IntLiteral] Int(N) as As(CharLiteral) { fn Convert(self) -> CharLiteral = "int.convert_char_literal"; } -impl forall [N:! IntLiteral] CharLiteral as As(Int(N)) { +impl forall [N: IntLiteral] CharLiteral as As(Int(N)) { fn Convert(self) -> Int(N) = "char_literal.convert_int"; } // Explicit conversion from floating-point literals. -impl forall [To:! IntLiteral] +impl forall [To: IntLiteral] FloatLiteral as UnsafeAs(Int(To)) { fn Convert(self) -> Int(To) = "float.convert_int"; } @@ -90,12 +90,12 @@ impl forall [To:! IntLiteral] // - Int(N) vs Int(M). -final impl forall [N:! IntLiteral, M:! IntLiteral] Int(N) as EqWith(Int(M)) { +final impl forall [N: IntLiteral, M: IntLiteral] Int(N) as EqWith(Int(M)) { fn Equal(self, other: Int(M)) -> bool = "int.eq"; fn NotEqual(self, other: Int(M)) -> bool = "int.neq"; } -final impl forall [N:! IntLiteral, M:! IntLiteral] Int(N) as OrderedWith(Int(M)) { +final impl forall [N: IntLiteral, M: IntLiteral] Int(N) as OrderedWith(Int(M)) { // TODO: fn Compare fn Less(self, other: Int(M)) -> bool = "int.less"; fn LessOrEquivalent(self, other: Int(M)) -> bool = "int.less_eq"; @@ -105,12 +105,12 @@ final impl forall [N:! IntLiteral, M:! IntLiteral] Int(N) as OrderedWith(Int(M)) // - Int(N) on left-hand side. -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] Int(N) as EqWith(T) { +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] Int(N) as EqWith(T) { fn Equal(self, other: Self) -> bool = "int.eq"; fn NotEqual(self, other: Self) -> bool = "int.neq"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] Int(N) as OrderedWith(T) { +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] Int(N) as OrderedWith(T) { // TODO: fn Compare fn Less(self, other: Self) -> bool = "int.less"; fn LessOrEquivalent(self, other: Self) -> bool = "int.less_eq"; @@ -120,12 +120,12 @@ impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] Int(N) as OrderedWith(T) { // - Int(N) on right-hand side. -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] T as EqWith(Int(N)) { +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] T as EqWith(Int(N)) { fn Equal(self: Int(N), other: Int(N)) -> bool = "int.eq"; fn NotEqual(self: Int(N), other: Int(N)) -> bool = "int.neq"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] T as OrderedWith(Int(N)) { +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] T as OrderedWith(Int(N)) { // TODO: fn Compare fn Less(self: Int(N), other: Int(N)) -> bool = "int.less"; fn LessOrEquivalent(self: Int(N), other: Int(N)) -> bool = "int.less_eq"; @@ -137,101 +137,101 @@ impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] T as OrderedWith(Int(N)) { // - Homogeneous. -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as AddWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.sadd"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as DivWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.sdiv"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as ModWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.smod"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as MulWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.smul"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as Negate where .Result = Self { fn Op(self) -> Self = "int.snegate"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as SubWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.ssub"; } // - Int(N) on left-hand side. -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as AddWith(U) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.sadd"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as DivWith(U) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.sdiv"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as ModWith(U) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.smod"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as MulWith(U) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.smul"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as SubWith(U) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.ssub"; } // - Int(N) on right-hand side. -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] T as AddWith(Int(N)) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.sadd"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] T as DivWith(Int(N)) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.sdiv"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] T as ModWith(Int(N)) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.smod"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] T as MulWith(Int(N)) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.smul"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] T as SubWith(Int(N)) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.ssub"; } // - CharLiteral and Int(N). -impl forall [N:! IntLiteral] CharLiteral as AddWith(Int(N)) where .Result = CharLiteral { +impl forall [N: IntLiteral] CharLiteral as AddWith(Int(N)) where .Result = CharLiteral { fn Op(self, other: Int(N)) -> CharLiteral = "char_literal.add"; } -impl forall [N:! IntLiteral] Int(N) as AddWith(CharLiteral) where .Result = CharLiteral { +impl forall [N: IntLiteral] Int(N) as AddWith(CharLiteral) where .Result = CharLiteral { fn Op(self, other: CharLiteral) -> CharLiteral = "int.add_char_literal"; } -impl forall [N:! IntLiteral] CharLiteral as SubWith(Int(N)) where .Result = CharLiteral { +impl forall [N: IntLiteral] CharLiteral as SubWith(Int(N)) where .Result = CharLiteral { fn Op(self, other: Int(N)) -> CharLiteral = "char_literal.sub_int"; } @@ -240,138 +240,138 @@ impl forall [N:! IntLiteral] CharLiteral as SubWith(Int(N)) where .Result = Char // - Homogeneous. -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as BitAndWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.and"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as BitComplement where .Result = Self { fn Op(self) -> Self = "int.complement"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as BitOrWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.or"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as BitXorWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.xor"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as LeftShiftWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.left_shift"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as RightShiftWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.right_shift"; } // - Int(N) on left-hand side. -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as BitAndWith(U) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.and"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as BitOrWith(U) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.or"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as BitXorWith(U) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.xor"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as LeftShiftWith(U) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.left_shift"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as RightShiftWith(U) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.right_shift"; } // - Int(N) on right-hand side. -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] T as BitAndWith(Int(N)) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.and"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] T as BitOrWith(Int(N)) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.or"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] T as BitXorWith(Int(N)) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.xor"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] T as LeftShiftWith(Int(N)) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.left_shift"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, T: ImplicitAs(Int(N))] T as RightShiftWith(Int(N)) where .Result = Int(N) { fn Op(self: Int(N), other: Int(N)) -> Int(N) = "int.right_shift"; } // Compound assignments. -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as AddAssignWith(U) { fn Op(ref self, other: Self) = "int.sadd_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as BitAndAssignWith(U) { fn Op(ref self, other: Self) = "int.and_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as BitOrAssignWith(U) { fn Op(ref self, other: Self) = "int.or_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as BitXorAssignWith(U) { fn Op(ref self, other: Self) = "int.xor_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as DivAssignWith(U) { fn Op(ref self, other: Self) = "int.sdiv_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as LeftShiftAssignWith(U) { fn Op(ref self, other: Self) = "int.left_shift_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as ModAssignWith(U) { fn Op(ref self, other: Self) = "int.smod_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as MulAssignWith(U) { fn Op(ref self, other: Self) = "int.smul_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as RightShiftAssignWith(U) { fn Op(ref self, other: Self) = "int.right_shift_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] +impl forall [N: IntLiteral, U: ImplicitAs(Int(N))] Int(N) as SubAssignWith(U) { fn Op(ref self, other: Self) = "int.ssub_assign"; } @@ -381,7 +381,7 @@ impl forall [N:! IntLiteral, U:! ImplicitAs(Int(N))] // TODO: Add builtins for these to avoid emitting a call. -impl forall [N:! IntLiteral] Int(N) as Dec { +impl forall [N: IntLiteral] Int(N) as Dec { fn Op(ref self) { // TODO: `self -= 1;` should work, but fails because the `impl IntLiteral // as ImplicitAs(Int(N))` is not final, which causes us to not attempt the @@ -392,7 +392,7 @@ impl forall [N:! IntLiteral] Int(N) as Dec { } } -impl forall [N:! IntLiteral] Int(N) as Inc { +impl forall [N: IntLiteral] Int(N) as Inc { fn Op(ref self) { fn AsInt(n: IntLiteral) -> Int(N) = "int.convert_checked"; self += AsInt(1); diff --git a/core/prelude/types/maybe_unformed.carbon b/core/prelude/types/maybe_unformed.carbon index b7de2f9da2a9..124adab1b2ff 100644 --- a/core/prelude/types/maybe_unformed.carbon +++ b/core/prelude/types/maybe_unformed.carbon @@ -10,8 +10,8 @@ import library "prelude/destroy"; private fn MakeMaybeUnformed(t: type) -> type = "maybe_unformed.make_type"; // TODO: This should probably support non-destructible types. -class MaybeUnformed(T:! Destroy) { +class MaybeUnformed(T: Destroy) { adapt MakeMaybeUnformed(T); } -impl forall [T:! Destroy] MaybeUnformed(T) as UnformedInit {} +impl forall [T: Destroy] MaybeUnformed(T) as UnformedInit {} diff --git a/core/prelude/types/optional.carbon b/core/prelude/types/optional.carbon index 4afbaa8fd85b..932604a18c32 100644 --- a/core/prelude/types/optional.carbon +++ b/core/prelude/types/optional.carbon @@ -14,7 +14,7 @@ import library "prelude/types/maybe_unformed"; // TODO: Decide how to expose this in the public API. private interface OptionalStorage { - let Type:! type; + let Type: type; fn None() -> Type; fn Some(self) -> Type; fn Has(value: Type) -> bool; @@ -26,7 +26,7 @@ private interface OptionalStorage { // TODO: We don't have an approved design for an `Optional` type yet, but it's // used by the design for `Iterate`. The API here is a placeholder. -class Optional(T:! OptionalStorage) { +class Optional(T: OptionalStorage) { fn None() -> Self { return T.None() as Self; } @@ -44,9 +44,9 @@ class Optional(T:! OptionalStorage) { adapt T.Type; } -impl forall [T:! OptionalStorage & UnformedInit] Optional(T) as UnformedInit {} +impl forall [T: OptionalStorage & UnformedInit] Optional(T) as UnformedInit {} -impl forall [T:! OptionalStorage] Optional(T) as Copy { +impl forall [T: OptionalStorage] Optional(T) as Copy { fn Op(self) -> Self { return T.Copy(self as T.Type) as Optional(T); } @@ -56,14 +56,14 @@ impl forall [T:! OptionalStorage] Optional(T) as Copy { // Once we have match_first, this can be rewritten more simply as: // // match_first { -// impl forall [T:! OptionalStorage] +// impl forall [T: OptionalStorage] // T as ImplicitAs(Optional(T)) { // fn Convert(self: T) -> Optional(T) { // return Optional(T).Some(self); // } // } // -// impl forall [T:! Destroy & OptionalStorage, U:! ImplicitAs(T)] +// impl forall [T: Destroy & OptionalStorage, U: ImplicitAs(T)] // U as ImplicitAs(Optional(T)) { // fn Convert(self: U) -> Optional(T) { // return Optional(T).Some(self.Convert()); @@ -71,26 +71,26 @@ impl forall [T:! OptionalStorage] Optional(T) as Copy { // } // } -private interface OptionalAs(T:! OptionalStorage) { +private interface OptionalAs(T: OptionalStorage) { fn Convert(self) -> Optional(T); } -final impl forall [T:! OptionalStorage] +final impl forall [T: OptionalStorage] T as OptionalAs(T) { fn Convert(self) -> Optional(T) { return Optional(T).Some(self); } } -impl forall [T:! Destroy & OptionalStorage, U:! ImplicitAs(T)] +impl forall [T: Destroy & OptionalStorage, U: ImplicitAs(T)] U as OptionalAs(T) { fn Convert(self) -> Optional(T) { return Optional(T).Some(self.Convert()); } } -impl forall [T:! Destroy & OptionalStorage, - U:! Destroy & OptionalStorage & ImplicitAs(T)] +impl forall [T: Destroy & OptionalStorage, + U: Destroy & OptionalStorage & ImplicitAs(T)] Optional(U) as OptionalAs(T) { fn Convert(self) -> Optional(T) { if (self.HasValue()) { @@ -100,7 +100,7 @@ impl forall [T:! Destroy & OptionalStorage, } } -impl forall [T:! OptionalStorage, U:! OptionalAs(T)] +impl forall [T: OptionalStorage, U: OptionalAs(T)] U as ImplicitAs(Optional(T)) { fn Convert(self) -> Optional(T) { return self.Convert(); @@ -112,15 +112,15 @@ impl forall [T:! OptionalStorage, U:! OptionalAs(T)] // `bool` is `false`. // // TODO: Revisit this once we have choice types implemented in the toolchain. -private class DefaultOptionalStorage(T:! Copy & Destroy) { +private class DefaultOptionalStorage(T: Copy & Destroy) { var value: MaybeUnformed(T); var has_value: bool; } -private fn MakeUninitializedOptionalStorage(T:! Copy & Destroy) +private fn MakeUninitializedOptionalStorage(generic T: Copy & Destroy) -> DefaultOptionalStorage(T) = "make_uninitialized"; -impl forall [T:! Copy & Destroy] T as OptionalStorage +impl forall [T: Copy & Destroy] T as OptionalStorage where .Type = DefaultOptionalStorage(T) { fn None() -> DefaultOptionalStorage(T) { returned var me: DefaultOptionalStorage(T) = @@ -153,14 +153,14 @@ impl forall [T:! Copy & Destroy] T as OptionalStorage } } -private fn PointerIsNull[T:! type](value: MaybeUnformed(T*)) -> bool = "pointer.is_null"; +private fn PointerIsNull[T: type](value: MaybeUnformed(T*)) -> bool = "pointer.is_null"; -private fn MakeUninitializedOptionalPointer(T:! type) +private fn MakeUninitializedOptionalPointer(generic T: type) -> MaybeUnformed(T*) = "make_uninitialized"; // For pointers, we use a null pointer value as the "None" value. This allows // `Optional(T*)` to be ABI-compatible with a C++ nullable pointer. -final impl forall [T:! type] T* as OptionalStorage +final impl forall [T: type] T* as OptionalStorage where .Type = MaybeUnformed(T*) { fn None() -> MaybeUnformed(T*) = "pointer.make_null"; fn Some(self) -> MaybeUnformed(T*) { diff --git a/core/prelude/types/string.carbon b/core/prelude/types/string.carbon index a10ccaa9aa99..d204621597af 100644 --- a/core/prelude/types/string.carbon +++ b/core/prelude/types/string.carbon @@ -27,6 +27,6 @@ class String { impl String as UnformedInit {} -impl forall [T:! ImplicitAs(i64)] String as IndexWith(T) where .ElementType = Char { +impl forall [T: ImplicitAs(i64)] String as IndexWith(T) where .ElementType = Char { fn At(self, subscript: T) -> Char = "string.at"; } diff --git a/core/prelude/types/uint.carbon b/core/prelude/types/uint.carbon index 421913755656..53e3fea68f26 100644 --- a/core/prelude/types/uint.carbon +++ b/core/prelude/types/uint.carbon @@ -15,36 +15,36 @@ import library "prelude/types/int_literal"; private fn MakeUInt(size: IntLiteral) -> type = "int.make_type_unsigned"; -class UInt(N:! IntLiteral) { +class UInt(N: IntLiteral) { adapt MakeUInt(N); } -impl forall [N:! IntLiteral] UInt(N) as UnformedInit {} +impl forall [N: IntLiteral] UInt(N) as UnformedInit {} // Copy. -impl forall [N:! IntLiteral] UInt(N) as Copy { +impl forall [N: IntLiteral] UInt(N) as Copy { fn Op(self) -> Self = "primitive_copy"; } // Conversions. -impl forall [To:! IntLiteral] IntLiteral as ImplicitAs(UInt(To)) { +impl forall [To: IntLiteral] IntLiteral as ImplicitAs(UInt(To)) { fn Convert(self) -> UInt(To) = "int.convert_checked"; } -final impl forall [From:! IntLiteral] UInt(From) as ImplicitAs(IntLiteral) { +final impl forall [From: IntLiteral] UInt(From) as ImplicitAs(IntLiteral) { fn Convert(self) -> IntLiteral = "int.convert_checked"; } // TODO: Remove these once ImplicitAs extends As. For now we need them because // the forwarding impl of As in terms of ImplicitAs is not usable at compile // time. -impl forall [To:! IntLiteral] IntLiteral as As(UInt(To)) { +impl forall [To: IntLiteral] IntLiteral as As(UInt(To)) { fn Convert(self) -> UInt(To) = "int.convert_checked"; } -final impl forall [From:! IntLiteral] UInt(From) as As(IntLiteral) { +final impl forall [From: IntLiteral] UInt(From) as As(IntLiteral) { fn Convert(self) -> IntLiteral = "int.convert_checked"; } @@ -52,22 +52,22 @@ final impl forall [From:! IntLiteral] UInt(From) as As(IntLiteral) { // type `IntLiteral`. // TODO: Remove this once possible. private interface AnyUInt { - let Width:! IntLiteral; + let Width: IntLiteral; fn AsUInt(self) -> UInt(Width); } -impl forall [N:! IntLiteral] UInt(N) as AnyUInt where .Width = N { +impl forall [N: IntLiteral] UInt(N) as AnyUInt where .Width = N { fn AsUInt(self) -> Self { return self; } } // Work around the inability to apply constraints to an impl that is only // parameterized by integers, and the lack of support for `match_first`. // TODO: Remove this once possible. -private interface FromUInt(From:! type) { +private interface FromUInt(From: type) { fn Convert(from: From) -> Self; } -impl forall [To:! IntLiteral, From:! AnyUInt & IntFitsIn(UInt(To))] +impl forall [To: IntLiteral, From: AnyUInt & IntFitsIn(UInt(To))] UInt(To) as FromUInt(From) { fn Convert(from: From) -> Self { fn Impl(src: UInt(From.Width)) -> Self = "int.convert"; @@ -75,7 +75,7 @@ impl forall [To:! IntLiteral, From:! AnyUInt & IntFitsIn(UInt(To))] } } -impl forall [To:! IntLiteral, From:! AnyUInt & IntFitsIn(Int(To))] +impl forall [To: IntLiteral, From: AnyUInt & IntFitsIn(Int(To))] Int(To) as FromUInt(From) { fn Convert(from: From) -> Self { fn Impl(src: UInt(From.Width)) -> Self = "int.convert"; @@ -83,37 +83,37 @@ impl forall [To:! IntLiteral, From:! AnyUInt & IntFitsIn(Int(To))] } } -impl forall [From:! IntLiteral, To:! FromUInt(UInt(From))] +impl forall [From: IntLiteral, To: FromUInt(UInt(From))] UInt(From) as ImplicitAs(To) { fn Convert(self) -> To { return To.Convert(self); } } -final impl forall [From:! IntLiteral, To:! IntLiteral] UInt(From) as As(UInt(To)) { +final impl forall [From: IntLiteral, To: IntLiteral] UInt(From) as As(UInt(To)) { fn Convert(self) -> UInt(To) = "int.convert"; } -final impl forall [From:! IntLiteral, To:! IntLiteral] UInt(From) as As(Int(To)) { +final impl forall [From: IntLiteral, To: IntLiteral] UInt(From) as As(Int(To)) { fn Convert(self) -> Int(To) = "int.convert"; } // Never implicit. -impl forall [From:! IntLiteral, To:! IntLiteral] Int(From) as As(UInt(To)) { +impl forall [From: IntLiteral, To: IntLiteral] Int(From) as As(UInt(To)) { fn Convert(self) -> UInt(To) = "int.convert"; } // Explicit conversion to/from character literals. -impl forall [N:! IntLiteral] UInt(N) as As(CharLiteral) { +impl forall [N: IntLiteral] UInt(N) as As(CharLiteral) { fn Convert(self) -> CharLiteral = "int.convert_char_literal"; } -impl forall [N:! IntLiteral] CharLiteral as As(UInt(N)) { +impl forall [N: IntLiteral] CharLiteral as As(UInt(N)) { fn Convert(self) -> UInt(N) = "char_literal.convert_int"; } // Explicit conversion from floating-point literals. -impl forall [To:! IntLiteral] +impl forall [To: IntLiteral] FloatLiteral as UnsafeAs(UInt(To)) { fn Convert(self) -> UInt(To) = "float.convert_int"; } @@ -122,12 +122,12 @@ impl forall [To:! IntLiteral] // - UInt(N) vs UInt(M). -final impl forall [N:! IntLiteral, M:! IntLiteral] UInt(N) as EqWith(UInt(M)) { +final impl forall [N: IntLiteral, M: IntLiteral] UInt(N) as EqWith(UInt(M)) { fn Equal(self, other: UInt(M)) -> bool = "int.eq"; fn NotEqual(self, other: UInt(M)) -> bool = "int.neq"; } -final impl forall [N:! IntLiteral, M:! IntLiteral] UInt(N) as OrderedWith(UInt(M)) { +final impl forall [N: IntLiteral, M: IntLiteral] UInt(N) as OrderedWith(UInt(M)) { // TODO: fn Compare fn Less(self, other: UInt(M)) -> bool = "int.less"; fn LessOrEquivalent(self, other: UInt(M)) -> bool = "int.less_eq"; @@ -137,12 +137,12 @@ final impl forall [N:! IntLiteral, M:! IntLiteral] UInt(N) as OrderedWith(UInt(M // - UInt(N) vs Int(M). -final impl forall [N:! IntLiteral, M:! IntLiteral] UInt(N) as EqWith(Int(M)) { +final impl forall [N: IntLiteral, M: IntLiteral] UInt(N) as EqWith(Int(M)) { fn Equal(self, other: Int(M)) -> bool = "int.eq"; fn NotEqual(self, other: Int(M)) -> bool = "int.neq"; } -final impl forall [N:! IntLiteral, M:! IntLiteral] UInt(N) as OrderedWith(Int(M)) { +final impl forall [N: IntLiteral, M: IntLiteral] UInt(N) as OrderedWith(Int(M)) { // TODO: fn Compare fn Less(self, other: Int(M)) -> bool = "int.less"; fn LessOrEquivalent(self, other: Int(M)) -> bool = "int.less_eq"; @@ -152,12 +152,12 @@ final impl forall [N:! IntLiteral, M:! IntLiteral] UInt(N) as OrderedWith(Int(M) // - Int(N) vs UInt(M). -impl forall [N:! IntLiteral, M:! IntLiteral] Int(N) as EqWith(UInt(M)) { +impl forall [N: IntLiteral, M: IntLiteral] Int(N) as EqWith(UInt(M)) { fn Equal(self, other: UInt(M)) -> bool = "int.eq"; fn NotEqual(self, other: UInt(M)) -> bool = "int.neq"; } -impl forall [N:! IntLiteral, M:! IntLiteral] Int(N) as OrderedWith(UInt(M)) { +impl forall [N: IntLiteral, M: IntLiteral] Int(N) as OrderedWith(UInt(M)) { // TODO: fn Compare fn Less(self, other: UInt(M)) -> bool = "int.less"; fn LessOrEquivalent(self, other: UInt(M)) -> bool = "int.less_eq"; @@ -167,12 +167,12 @@ impl forall [N:! IntLiteral, M:! IntLiteral] Int(N) as OrderedWith(UInt(M)) { // - UInt(N) on left-hand side. -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] UInt(N) as EqWith(T) { +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] UInt(N) as EqWith(T) { fn Equal(self, other: Self) -> bool = "int.eq"; fn NotEqual(self, other: Self) -> bool = "int.neq"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] UInt(N) as OrderedWith(T) { +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] UInt(N) as OrderedWith(T) { // TODO: fn Compare fn Less(self, other: Self) -> bool = "int.less"; fn LessOrEquivalent(self, other: Self) -> bool = "int.less_eq"; @@ -182,12 +182,12 @@ impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] UInt(N) as OrderedWith(T) // - UInt(N) on right-hand side. -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] T as EqWith(UInt(N)) { +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] T as EqWith(UInt(N)) { fn Equal(self: UInt(N), other: UInt(N)) -> bool = "int.eq"; fn NotEqual(self: UInt(N), other: UInt(N)) -> bool = "int.neq"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] T as OrderedWith(UInt(N)) { +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] T as OrderedWith(UInt(N)) { // TODO: fn Compare fn Less(self: UInt(N), other: UInt(N)) -> bool = "int.less"; fn LessOrEquivalent(self: UInt(N), other: UInt(N)) -> bool = "int.less_eq"; @@ -199,101 +199,101 @@ impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] T as OrderedWith(UInt(N)) // - Homogeneous. -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as AddWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.uadd"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as DivWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.udiv"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as ModWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.umod"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as MulWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.umul"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as Negate where .Result = Self { fn Op(self) -> Self = "int.unegate"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as SubWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.usub"; } // - UInt(N) on left-hand side. -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as AddWith(U) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.uadd"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as DivWith(U) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.udiv"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as ModWith(U) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.umod"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as MulWith(U) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.umul"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as SubWith(U) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.usub"; } // - UInt(N) on right-hand side. -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] T as AddWith(UInt(N)) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.uadd"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] T as DivWith(UInt(N)) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.udiv"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] T as ModWith(UInt(N)) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.umod"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] T as MulWith(UInt(N)) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.umul"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] T as SubWith(UInt(N)) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.usub"; } // - CharLiteral and UInt(N). -impl forall [N:! IntLiteral] CharLiteral as AddWith(UInt(N)) where .Result = CharLiteral { +impl forall [N: IntLiteral] CharLiteral as AddWith(UInt(N)) where .Result = CharLiteral { fn Op(self, other: UInt(N)) -> CharLiteral = "char_literal.add"; } -impl forall [N:! IntLiteral] UInt(N) as AddWith(CharLiteral) where .Result = CharLiteral { +impl forall [N: IntLiteral] UInt(N) as AddWith(CharLiteral) where .Result = CharLiteral { fn Op(self, other: CharLiteral) -> CharLiteral = "int.add_char_literal"; } -impl forall [N:! IntLiteral] CharLiteral as SubWith(UInt(N)) where .Result = CharLiteral { +impl forall [N: IntLiteral] CharLiteral as SubWith(UInt(N)) where .Result = CharLiteral { fn Op(self, other: UInt(N)) -> CharLiteral = "char_literal.sub_int"; } @@ -302,138 +302,138 @@ impl forall [N:! IntLiteral] CharLiteral as SubWith(UInt(N)) where .Result = Cha // - Homogeneous. -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as BitAndWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.and"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as BitComplement where .Result = Self { fn Op(self) -> Self = "int.complement"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as BitOrWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.or"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as BitXorWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.xor"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as LeftShiftWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.left_shift"; } -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as RightShiftWith(Self) where .Result = Self { fn Op(self, other: Self) -> Self = "int.right_shift"; } // - UInt(N) on left-hand side. -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as BitAndWith(U) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.and"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as BitOrWith(U) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.or"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as BitXorWith(U) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.xor"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as LeftShiftWith(U) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.left_shift"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as RightShiftWith(U) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.right_shift"; } // - UInt(N) on right-hand side. -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] T as BitAndWith(UInt(N)) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.and"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] T as BitOrWith(UInt(N)) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.or"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] T as BitXorWith(UInt(N)) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.xor"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] T as LeftShiftWith(UInt(N)) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.left_shift"; } -impl forall [N:! IntLiteral, T:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, T: ImplicitAs(UInt(N))] T as RightShiftWith(UInt(N)) where .Result = UInt(N) { fn Op(self: UInt(N), other: UInt(N)) -> UInt(N) = "int.right_shift"; } // Compound assignments. -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as AddAssignWith(U) { fn Op(ref self, other: Self) = "int.uadd_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as BitAndAssignWith(U) { fn Op(ref self, other: Self) = "int.and_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as BitOrAssignWith(U) { fn Op(ref self, other: Self) = "int.or_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as BitXorAssignWith(U) { fn Op(ref self, other: Self) = "int.xor_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as DivAssignWith(U) { fn Op(ref self, other: Self) = "int.udiv_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as LeftShiftAssignWith(U) { fn Op(ref self, other: Self) = "int.left_shift_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as ModAssignWith(U) { fn Op(ref self, other: Self) = "int.umod_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as MulAssignWith(U) { fn Op(ref self, other: Self) = "int.umul_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as RightShiftAssignWith(U) { fn Op(ref self, other: Self) = "int.right_shift_assign"; } -impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] +impl forall [N: IntLiteral, U: ImplicitAs(UInt(N))] UInt(N) as SubAssignWith(U) { fn Op(ref self, other: Self) = "int.usub_assign"; } @@ -443,7 +443,7 @@ impl forall [N:! IntLiteral, U:! ImplicitAs(UInt(N))] // TODO: Add builtins for these to avoid emitting a call. -impl forall [N:! IntLiteral] UInt(N) as Dec { +impl forall [N: IntLiteral] UInt(N) as Dec { fn Op(ref self) { // TODO: `self -= 1;` should work, but fails because the `impl IntLiteral // as ImplicitAs(Int(N))` is not final, which causes us to not attempt the @@ -454,7 +454,7 @@ impl forall [N:! IntLiteral] UInt(N) as Dec { } } -impl forall [N:! IntLiteral] UInt(N) as Inc { +impl forall [N: IntLiteral] UInt(N) as Inc { fn Op(ref self) { fn AsUInt(n: IntLiteral) -> UInt(N) = "int.convert_checked"; self += AsUInt(1); diff --git a/core/range.carbon b/core/range.carbon index b9524183f47f..55b9de15eef4 100644 --- a/core/range.carbon +++ b/core/range.carbon @@ -16,7 +16,7 @@ import library "prelude/types/int"; import library "prelude/types/int_literal"; import library "prelude/types/optional"; -class IntRange(N:! IntLiteral) { +class IntRange(N: IntLiteral) { fn Make(start: Int(N), end: Int(N)) -> Self { return {.start = start, .end = end}; } diff --git a/examples/advent2024/day1_common.carbon b/examples/advent2024/day1_common.carbon index 6a14253a050a..6874e9b29b91 100644 --- a/examples/advent2024/day1_common.carbon +++ b/examples/advent2024/day1_common.carbon @@ -12,7 +12,7 @@ import library "io_utils"; // Read a sequence of lines each containing a pair of numbers into two arrays. // Returns the number of lines read. -fn ReadInputs[N:! Core.IntLiteral](ref a: array(i32, N), ref b: array(i32, N)) -> i32 { +fn ReadInputs[N: Core.IntLiteral](ref a: array(i32, N), ref b: array(i32, N)) -> i32 { for (i: i32 in Core.Range(N)) { var av: i32; var bv: i32; diff --git a/examples/advent2024/io_utils.carbon b/examples/advent2024/io_utils.carbon index 35227d3294b3..7fbc79a39881 100644 --- a/examples/advent2024/io_utils.carbon +++ b/examples/advent2024/io_utils.carbon @@ -27,13 +27,13 @@ fn CharOrEOF.EOF() -> Self { return (-1 as i32) as CharOrEOF; } -impl forall [U:! Core.ImplicitAs(char)] U as Core.ImplicitAs(CharOrEOF) { +impl forall [U: Core.ImplicitAs(char)] U as Core.ImplicitAs(CharOrEOF) { fn Convert(self: char) -> CharOrEOF { return ((self as u8) as i32) as CharOrEOF; } } -impl forall [U:! Core.ImplicitAs(CharOrEOF)] +impl forall [U: Core.ImplicitAs(CharOrEOF)] CharOrEOF as Core.EqWith(U) { fn Equal(self, other: CharOrEOF) -> bool { return (self as i32) == (other as i32); @@ -43,7 +43,7 @@ impl forall [U:! Core.ImplicitAs(CharOrEOF)] } } -impl forall [U:! Core.ImplicitAs(CharOrEOF)] +impl forall [U: Core.ImplicitAs(CharOrEOF)] CharOrEOF as Core.OrderedWith(U) { fn Less(self, other: CharOrEOF) -> bool { return (self as i32) < (other as i32); @@ -59,7 +59,7 @@ impl forall [U:! Core.ImplicitAs(CharOrEOF)] } } -impl forall [U:! Core.ImplicitAs(char)] +impl forall [U: Core.ImplicitAs(char)] CharOrEOF as Core.SubWith(U) where .Result = i32 { fn Op(self, other: char) -> i32 { return (self as i32) - ((other as u8) as i32); @@ -105,7 +105,7 @@ fn ConsumeChar(c: char) -> bool { return true; } -fn ReadInt[N:! Core.IntLiteral](ref p: Core.Int(N)) -> bool { +fn ReadInt[N: Core.IntLiteral](ref p: Core.Int(N)) -> bool { var read_any_digits: bool = false; let negative: bool = ConsumeChar('-'); // TODO: `p = 0;` crashes the toolchain, see @@ -133,7 +133,7 @@ fn ReadInt[N:! Core.IntLiteral](ref p: Core.Int(N)) -> bool { return read_any_digits; } -fn PrintIntNoNewline[N:! Core.IntLiteral](n_val: Core.Int(N)) { +fn PrintIntNoNewline[N: Core.IntLiteral](n_val: Core.Int(N)) { // TODO: var pow10: Core.Int(N) = 1; crashes the toolchain. var pow10: Core.Int(N) = (1 as i32) as Core.Int(N); var n: Core.Int(N) = n_val; @@ -152,7 +152,7 @@ fn PrintIntNoNewline[N:! Core.IntLiteral](n_val: Core.Int(N)) { } } -fn PrintInt[N:! Core.IntLiteral](n_val: Core.Int(N)) { +fn PrintInt[N: Core.IntLiteral](n_val: Core.Int(N)) { PrintIntNoNewline(n_val); Core.PrintChar('\n'); } diff --git a/examples/advent2024/sort.carbon b/examples/advent2024/sort.carbon index 3e739ca400f6..7027a72c55fd 100644 --- a/examples/advent2024/sort.carbon +++ b/examples/advent2024/sort.carbon @@ -19,14 +19,14 @@ impl i32 as Ordered { fn GreaterOrEquivalent(self, other: Self) -> bool { return self >= other; } } -fn Swap[T:! Core.Copy & Core.Destroy](ref from: T, ref to: T) { +fn Swap[T: Core.Copy & Core.Destroy](ref from: T, ref to: T) { var tmp: T = from; from = to; to = tmp; } fn Partition - [T:! Core.Copy & Core.Destroy & Ordered, N:! Core.IntLiteral] + [T: Core.Copy & Core.Destroy & Ordered, N: Core.IntLiteral] (ref a: array(T, N), from_in: i32, to_in: i32) -> i32 { var pivot_index: i32 = from_in; let pivot: T = a[pivot_index]; @@ -52,7 +52,7 @@ fn Partition } fn Quicksort - [T:! Core.Copy & Core.Destroy & Ordered, N:! Core.IntLiteral] + [T: Core.Copy & Core.Destroy & Ordered, N: Core.IntLiteral] (ref a: array(T, N), from: i32, to: i32) { if (from + 1 >= to) { return; } var pivot: i32 = Partition(ref a, from, to); diff --git a/third_party/examples/re2/re2.carbon b/third_party/examples/re2/re2.carbon index dc2b771fa8b2..7af073d9e44b 100644 --- a/third_party/examples/re2/re2.carbon +++ b/third_party/examples/re2/re2.carbon @@ -353,7 +353,7 @@ class RE2 { fn FindAndConsumeN(input: StringPiece*, re: RE2, args: Array(const Arg*), n: i32) -> bool; - private fn Apply[template F:! type, SP:! type](f: F, sp: SP, re: Self) { + private fn Apply[template F: type, SP: type](f: F, sp: SP, re: Self) { return f(sp, re, nullptr, 0); } @@ -671,7 +671,7 @@ class RE2 { // For now, make the default budget something close to Code Search. // TODO: How to define a class-scope constant? - let kDefaultMaxMem:! i32 = 8 << 20; + let generic kDefaultMaxMem: i32 = 8 << 20; enum Encoding { EncodingUTF8 = 1, @@ -762,9 +762,9 @@ class RE2 { // Argument converters; see below. // TODO: Should these be package members not class members in Carbon // so you use `RE2.Hex` not `RE2.RE2.Hex`? - fn CRadix[T:! Parse4ary](ptr: T*) -> Self.Arg; - fn Hex[T:! Parse4ary](ptr: T*) -> Self.Arg; - fn Octal[T:! Parse4ary](ptr: T*) -> Self.Arg; + fn CRadix[T: Parse4ary](ptr: T*) -> Self.Arg; + fn Hex[T: Parse4ary](ptr: T*) -> Self.Arg; + fn Octal[T: Parse4ary](ptr: T*) -> Self.Arg; private fn Init(addr self: Self, pattern: StringPiece, options: Options); @@ -856,17 +856,17 @@ class RE2.Arg { fn Parse(ref self, str: StringView, n: i64) -> bool; } match_first { - impl [T:! Parse3ary] T as Parseable { + impl [T: Parse3ary] T as Parseable { fn Parse(ref self, str: StringView, n: i64) -> bool { return T.Parse(str, n, self); } } - impl [T:! Parse4ary] T as Parseable { + impl [T: Parse4ary] T as Parseable { fn Parse(ref self, str: StringView, n: i64) -> bool { return T.Parse(str, n, self, 10); } } - impl [T:! ParseFrom] T as Parseable { + impl [T: ParseFrom] T as Parseable { fn Parse(ref self, str: StringView, n: i64) -> bool { if (self == nullptr) { return true; } return T.Parse(str, n, self); @@ -881,7 +881,7 @@ class RE2.Arg { } } - fn Make[T:! Parseable](ptr: T*) { + fn Make[T: Parseable](ptr: T*) { return {.type_ = T, .arg_ = ptr}; } @@ -894,7 +894,7 @@ class RE2.Arg { private var arg_: Nullable(type_*); } -private adapter ParseAsBase(T:! Parse4ary, base: i32) for T { +private adapter ParseAsBase(T: Parse4ary, base: i32) for T { impl as Self.Arg.Parseable { fn Parse(ref self, str: StringView, n: i64) -> bool { return T.Parse(str, n, self, base); @@ -902,15 +902,15 @@ private adapter ParseAsBase(T:! Parse4ary, base: i32) for T { } } -fn RE2.CRadix[T:! Parse4ary](ptr: T*) -> Self.Arg { +fn RE2.CRadix[T: Parse4ary](ptr: T*) -> Self.Arg { return Self.Arg.Make(ptr as ParseAsBase(T, 0)*); } -fn RE2.Hex[T:! Parse4ary](ptr: T*) -> Self.Arg { +fn RE2.Hex[T: Parse4ary](ptr: T*) -> Self.Arg { return Self.Arg.Make(ptr as ParseAsBase(T, 16)*); } -fn RE2.Octal[T:! Parse4ary](ptr: T*) -> Self.Arg { +fn RE2.Octal[T: Parse4ary](ptr: T*) -> Self.Arg { return Self.Arg.Make(ptr as ParseAsBase(T, 8)*); } diff --git a/toolchain/check/convert.cpp b/toolchain/check/convert.cpp index 4a65817c44af..985440093e22 100644 --- a/toolchain/check/convert.cpp +++ b/toolchain/check/convert.cpp @@ -2020,7 +2020,7 @@ auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id, // Defer the action if it's dependent. We do this now rather than before // attempting any conversion so that we can still perform builtin conversions // on dependent arguments. This matters for things like converting a - // `template T:! SomeInterface` to `type`, where it's important to form a + // `template T: SomeInterface` to `type`, where it's important to form a // `FacetAccessType` when checking the template. But when running the action // later, we need to try builtin conversions again, because one may apply that // didn't apply in the template definition. diff --git a/toolchain/check/decl_name_stack.cpp b/toolchain/check/decl_name_stack.cpp index 521ad41f41d0..13e8fea0943a 100644 --- a/toolchain/check/decl_name_stack.cpp +++ b/toolchain/check/decl_name_stack.cpp @@ -239,7 +239,7 @@ static auto GetAssociatedEntityScope(Context& context, } // Push a scope corresponding to a name qualifier. For example, for -// `fn Class(T:! type).F(n: i32)` we will push the scope for `Class(T:! type)` +// `fn Class(T: type).F(n: i32)` we will push the scope for `Class(T: type)` // between the scope containing the declaration of `T` and the scope // containing the declaration of `n`. // @@ -488,7 +488,7 @@ auto DeclNameStack::ResolveAsScope(const NameContext& name_context, name_context.resolved_inst_id); return InvalidResult; } - // The scope and generic of an `I(T:! type)` is the outer + // The scope and generic of an `I(T: type)` is the outer // interface-without-self. That is the generic where parameters appear. // However when moving to the next qualifier, we need to move to the // interface-with-self for the associated entity name. diff --git a/toolchain/check/decl_name_stack.h b/toolchain/check/decl_name_stack.h index ef9412c7e42c..80bbd8808a2b 100644 --- a/toolchain/check/decl_name_stack.h +++ b/toolchain/check/decl_name_stack.h @@ -18,8 +18,8 @@ class Context; // Provides support and stacking for qualified declaration name handling. // // A qualified declaration name will consist of entries, which are `Name`s -// optionally followed by generic parameter lists, such as `Vector(T:! type)` -// in `fn Vector(T:! type).Clear();`, but parameter lists aren't supported yet. +// optionally followed by generic parameter lists, such as `Vector(T: type)` +// in `fn Vector(T: type).Clear();`, but parameter lists aren't supported yet. // Identifiers such as `Clear` will be resolved to a name if possible, for // example when declaring things that are in a non-generic type or namespace, // and are otherwise marked as an unresolved identifier. @@ -36,7 +36,7 @@ class Context; // appearing later in the declaration name itself. For example, in: // // ``` -// fn ClassA.ClassB(T:! U).Fn() { var x: V; } +// fn ClassA.ClassB(T: U).Fn() { var x: V; } // ``` // // the lookup for `U` looks in `ClassA`; the lookup for `V` looks first in diff --git a/toolchain/check/deduce.cpp b/toolchain/check/deduce.cpp index 3d65cc15fd61..64ae0e877ab7 100644 --- a/toolchain/check/deduce.cpp +++ b/toolchain/check/deduce.cpp @@ -312,7 +312,7 @@ auto DeductionContext::Deduce() -> bool { param_type_id = SemIR::ExtractScrutineeType(context().sem_ir(), param_type_id); } else if (context().types().IsFacetType(param_type_id)) { - // Given `fn F[G:! Interface](g: G)`, the type of `g` is `G as type`. For + // Given `fn F[G: Interface](g: G)`, the type of `g` is `G as type`. For // deduction, we want to ignore the `as type`, and check that the argument // can convert to the FacetType of the canonical facet value. param_id = GetCanonicalFacetOrTypeValue(context(), param_id); @@ -361,9 +361,9 @@ auto DeductionContext::Deduce() -> bool { CARBON_KIND_SWITCH(param_inst) { // Deducing a symbolic binding pattern from an argument deduces the // binding as having that constant value. For example, deducing - // `(T:! type)` against `(i32)` deduces `T` to be `i32`. This only arises - // when initializing a generic parameter from an explicitly specified - // argument, and in this case, the argument is required to be a + // `(generic T: type)` against `(i32)` deduces `T` to be `i32`. This only + // arises when initializing a generic parameter from an explicitly + // specified argument, and in this case, the argument is required to be a // compile-time constant. case CARBON_KIND(SemIR::SymbolicBindingPattern bind): { auto& entity_name = context().entity_names().Get(bind.entity_name_id); @@ -403,7 +403,7 @@ auto DeductionContext::Deduce() -> bool { // Deducing a symbolic binding appearing within an expression against a // constant value deduces the binding as having that value. For example, - // deducing `[T:! type](x: T)` against `("foo")` deduces `T` as `String`. + // deducing `[T: type](x: T)` against `("foo")` deduces `T` as `String`. case CARBON_KIND(SemIR::SymbolicBinding bind): { auto& entity_name = context().entity_names().Get(bind.entity_name_id); auto index = entity_name.bind_index(); diff --git a/toolchain/check/eval_inst.cpp b/toolchain/check/eval_inst.cpp index 0a1864baf206..1f8c362dabff 100644 --- a/toolchain/check/eval_inst.cpp +++ b/toolchain/check/eval_inst.cpp @@ -348,13 +348,13 @@ static auto TryFindValueInRewriteConstraints( // The LHS of a rewrite can be an arbitrary type. For example: // ``` - // T:! Z where C impls (Y(.Self) where .Y1 = {}) + // T: Z where C impls (Y(.Self) where .Y1 = {}) // ``` // The rewrite in the facet type will be `(C as Y(T)).Y1 = {}`. // // It can also be another ImplWitnessAccess. For example: // ``` - // T:! Z where .Z1 impls (Y where .Y1 = {}) + // T: Z where .Z1 impls (Y where .Y1 = {}) // ``` // The rewrite in the facet type will be `((T as Z).Z1 as Y).Y1 = {}`. // @@ -371,7 +371,7 @@ static auto TryFindValueInRewriteConstraints( // TODO: Requiring the rewrite to be against `.Self` is actually // insufficient. For a facet like // ``` - // T:! type where C impls (Z(.Self) where .Z1 = ()) + // T: type where C impls (Z(.Self) where .Z1 = ()) // ``` // and an access like `C.(Z(T).Z1)`, the root of the access is `C`. If we // search `T` for a witness, we'd need the inner-most self facet to be `C` diff --git a/toolchain/check/generic.cpp b/toolchain/check/generic.cpp index a0204f5b6405..52a408a02052 100644 --- a/toolchain/check/generic.cpp +++ b/toolchain/check/generic.cpp @@ -305,11 +305,11 @@ auto AttachDependentInstToCurrentGeneric(Context& context, // unattached. This happens for out-of-line redeclarations of members of // dependent scopes: // - // class A(T:! type) { + // class A(T: type) { // fn F(); // } // // Has generic type and constant value, but no generic region. - // fn A(T:! type).F() {} + // fn A(T: type).F() {} // // TODO: Copy the attached type and constant value from the previous // declaration in this case instead of attempting to attach the new @@ -407,7 +407,7 @@ auto StartGenericDefinition(Context& context, SemIR::GenericId generic_id) // have locally-introduced generic parameters to track: // // fn F() { - // let T:! type = i32; + // let generic T: type = i32; // var x: T; // } context.generic_region_stack().Push( diff --git a/toolchain/check/generic.h b/toolchain/check/generic.h index 1a58a1f38a0f..48074a13c18e 100644 --- a/toolchain/check/generic.h +++ b/toolchain/check/generic.h @@ -103,7 +103,7 @@ auto MakeSpecific(Context& context, SemIR::LocId loc_id, -> SemIR::SpecificId; // Builds the specific that describes how the generic should refer to itself. -// For example, for a generic `G(T:! type)`, this is the specific `G(T)`. If +// For example, for a generic `G(T: type)`, this is the specific `G(T)`. If // `generic_id` is `None`, returns `None`. auto MakeSelfSpecific(Context& context, SemIR::LocId loc_id, SemIR::GenericId generic_id) -> SemIR::SpecificId; diff --git a/toolchain/check/generic_region_stack.h b/toolchain/check/generic_region_stack.h index ac55457da862..252cfd5dbb6e 100644 --- a/toolchain/check/generic_region_stack.h +++ b/toolchain/check/generic_region_stack.h @@ -26,7 +26,7 @@ using ConstantsInGenericMap = Map; // // We split a generic into two regions -- declaration and definition -- because // these are in general introduced separately, and substituted into separately. -// For example, for `class C(T:! type, N:! T) { var x: T; }`, a use such as +// For example, for `class C(T: type, N: T) { var x: T; }`, a use such as // `C(i32, 0)*` substitutes into just the declaration, whereas a use such as // `var x: C(i32, 0) = {.x = 0};` also substitutes into the definition. class GenericRegionStack { diff --git a/toolchain/check/handle_binding_pattern.cpp b/toolchain/check/handle_binding_pattern.cpp index aa77e0b340d1..d47cad9f98bc 100644 --- a/toolchain/check/handle_binding_pattern.cpp +++ b/toolchain/check/handle_binding_pattern.cpp @@ -52,21 +52,21 @@ static auto GetLeafBindingPatternInstKind(Parse::NodeKind node_kind, } // Returns true if a parameter is valid in the given `introducer_kind`. -static auto IsValidParamForIntroducer(Context& context, Parse::NodeId node_id, +// `is_deduced` is whether this is a deduced (`[...]`) parameter. +static auto IsValidParamForIntroducer(Context& context, SemIR::LocId loc_id, SemIR::NameId name_id, Lex::TokenKind introducer_kind, - bool is_generic) -> bool { + bool is_generic, bool is_deduced, + bool is_var) -> bool { switch (introducer_kind) { case Lex::TokenKind::Fn: { // `self` in the implicit parameter list is diagnosed separately (see // `SelfInImplicitParamList`), so skip it here to avoid a redundant // diagnostic. - if (context.full_pattern_stack().CurrentKind() == - FullPatternStack::Kind::ImplicitParamList && - !(is_generic || name_id == SemIR::NameId::SelfValue)) { + if (is_deduced && !(is_generic || name_id == SemIR::NameId::SelfValue)) { CARBON_DIAGNOSTIC(ImplictParamMustBeConstant, Error, "implicit parameters of functions must be constant"); - context.emitter().Emit(node_id, ImplictParamMustBeConstant); + context.emitter().Emit(loc_id, ImplictParamMustBeConstant); return false; } // Parameters can have incomplete types in a function declaration, but not @@ -80,8 +80,7 @@ static auto IsValidParamForIntroducer(Context& context, Parse::NodeId node_id, // choice type itself. // Implicit param lists are prevented during parse. - CARBON_CHECK(context.full_pattern_stack().CurrentKind() != - FullPatternStack::Kind::ImplicitParamList, + CARBON_CHECK(!is_deduced, "choice alternative with implicit parameters"); // Don't fall through to the `Class` logic for choice alternatives. return true; @@ -93,13 +92,20 @@ static auto IsValidParamForIntroducer(Context& context, Parse::NodeId node_id, if (name_id == SemIR::NameId::SelfValue) { CARBON_DIAGNOSTIC(SelfParameterNotAllowed, Error, "`self` parameter only allowed on functions"); - context.emitter().Emit(node_id, SelfParameterNotAllowed); + context.emitter().Emit(loc_id, SelfParameterNotAllowed); return false; } if (!is_generic) { CARBON_DIAGNOSTIC(GenericParamMustBeConstant, Error, "parameters of generic types must be constant"); - context.emitter().Emit(node_id, GenericParamMustBeConstant); + auto builder = + context.emitter().Build(loc_id, GenericParamMustBeConstant); + if (is_var) { + CARBON_DIAGNOSTIC(VarParamIsRuntime, Note, + "`var` parameters are runtime"); + builder.Note(loc_id, VarParamIsRuntime); + } + builder.Emit(); return false; } return true; @@ -111,7 +117,7 @@ static auto IsValidParamForIntroducer(Context& context, Parse::NodeId node_id, namespace { // Information about the expression in the type position of a binding pattern, -// i.e. the position following the `:`/`:?`/`:!` separator. Note that this +// i.e. the position following the `:` or `:?` separator. Note that this // expression may be interpreted as a type or a form, depending on the binding // kind. struct BindingPatternTypeInfo { @@ -197,6 +203,10 @@ static auto HandleAnyBindingPattern( // A non-generic template binding is diagnosed by the parser. is_template &= is_generic; + // The name in a runtime binding may be wrapped in `runtime`; discard it. + context.node_stack() + .PopAndDiscardSoloNodeIdIf(); + // The name in a runtime binding may be wrapped in `ref`. bool is_ref = context.node_stack() @@ -290,8 +300,8 @@ static auto HandleAnyBindingPattern( // TODO: We should re-evaluate the contents of the eval block in a // synthesized specific to form these values, in order to propagate the // values. - return context.TODO(node_id, - "local `let :!` bindings are currently unsupported"); + return context.TODO( + node_id, "local generic `let` bindings are currently unsupported"); } // Allocate an instruction of the appropriate kind, linked to the name for @@ -299,8 +309,11 @@ static auto HandleAnyBindingPattern( switch (context.full_pattern_stack().CurrentKind()) { case FullPatternStack::Kind::ImplicitParamList: case FullPatternStack::Kind::ExplicitParamList: { + bool is_deduced = context.full_pattern_stack().CurrentKind() == + FullPatternStack::Kind::ImplicitParamList; + bool is_var = node_kind == Parse::NodeKind::VarBindingPattern; if (!IsValidParamForIntroducer(context, node_id, name_id, introducer.kind, - is_generic)) { + is_generic, is_deduced, is_var)) { if (name_id != SemIR::NameId::Underscore) { AddNameToLookup(context, name_id, SemIR::ErrorInst::InstId); } @@ -557,6 +570,12 @@ auto HandleParseNode(Context& context, Parse::RefBindingNameId node_id) return true; } +auto HandleParseNode(Context& context, Parse::RuntimeBindingNameId node_id) + -> bool { + context.node_stack().Push(node_id); + return true; +} + auto HandleParseNode(Context& context, Parse::TemplateBindingNameId node_id) -> bool { context.node_stack().Push(node_id); diff --git a/toolchain/check/handle_function.cpp b/toolchain/check/handle_function.cpp index 346e12a54a08..cad51842b547 100644 --- a/toolchain/check/handle_function.cpp +++ b/toolchain/check/handle_function.cpp @@ -674,7 +674,7 @@ static auto DiagnoseUnusedMarkersWithoutDefinition( const auto& function = context.functions().Get(function_id); // The `unused` modifier requires a definition, so it is not valid on any // parameter when there is none. This applies to implicit parameters (such as - // `T:! type` introduced by `[...]`) too, so check the implicit parameter list + // `T: type` introduced by `[...]`) too, so check the implicit parameter list // as well as the explicit one. for (auto param_patterns_id : {function.implicit_param_patterns_id, function.param_patterns_id}) { diff --git a/toolchain/check/name_component.h b/toolchain/check/name_component.h index 909fbc9366e9..0430e734784d 100644 --- a/toolchain/check/name_component.h +++ b/toolchain/check/name_component.h @@ -14,8 +14,8 @@ namespace Carbon::Check { class Context; -// A component in a declaration name, such as `C[T:! type](N:! T)` in -// `fn C[T:! type](N:! T).F() {}`. +// A component in a declaration name, such as `C[T: type](N: T)` in +// `fn C[T: type](N: T).F() {}`. struct NameComponent { // The name of the declaration. Parse::NodeId name_loc_id; diff --git a/toolchain/check/name_lookup.cpp b/toolchain/check/name_lookup.cpp index 341070d6133a..e307c2bd9f42 100644 --- a/toolchain/check/name_lookup.cpp +++ b/toolchain/check/name_lookup.cpp @@ -70,7 +70,7 @@ auto LookupNameInDecl(Context& context, SemIR::LocId loc_id, // - The name is redeclared by a parameter of the same entity: // // fn F() { - // class C(C:! type); + // class C(C: type); // } // // In this case, the class C is not a redeclaration of its parameter, but diff --git a/toolchain/check/node_stack.h b/toolchain/check/node_stack.h index 6d07266f08ce..22a33db623e2 100644 --- a/toolchain/check/node_stack.h +++ b/toolchain/check/node_stack.h @@ -466,6 +466,7 @@ class NodeStack { case Parse::NodeKind::LetIntroducer: case Parse::NodeKind::NamedConstraintIntroducer: case Parse::NodeKind::RefBindingName: + case Parse::NodeKind::RuntimeBindingName: case Parse::NodeKind::ReturnStatementStart: case Parse::NodeKind::StructLiteralStart: case Parse::NodeKind::StructTypeLiteralField: diff --git a/toolchain/check/operator.cpp b/toolchain/check/operator.cpp index 43b86765f6c5..0c2c65e5f4fc 100644 --- a/toolchain/check/operator.cpp +++ b/toolchain/check/operator.cpp @@ -115,7 +115,7 @@ auto BuildBinaryOperator(Context& context, SemIR::LocId loc_id, Operator op, // For binary operators with a C++ class as at least one of the operands, try // to import and call the C++ operator. // TODO: Instead of hooking this here, change impl lookup, so that a generic - // constraint such as `T:! Core.Add` is satisfied by C++ class types that are + // constraint such as `T: Core.Add` is satisfied by C++ class types that are // addable. See // https://github.com/carbon-language/carbon-lang/pull/5996/files/5d01fa69511b76f87efbc0387f5e40abcf4c911a#r2308666348 // and diff --git a/toolchain/check/period_self.h b/toolchain/check/period_self.h index 1fb9aed6fc3e..94aa87664191 100644 --- a/toolchain/check/period_self.h +++ b/toolchain/check/period_self.h @@ -15,7 +15,7 @@ namespace Carbon::Check { // the `SymbolicBinding` instruction. // // The type of `.Self` must be a `FacetType`, so that it gets wrapped in -// `FacetAccessType` when used in a type position, such as in `U:! I(.Self)`. +// `FacetAccessType` when used in a type position, such as in `U: I(.Self)`. // This allows substitution with other facet values without requiring an // additional `FacetAccessType` to be inserted. auto MakePeriodSelfFacetValue(Context& context, SemIR::LocId loc_id, diff --git a/toolchain/check/testdata/alias/basics.carbon b/toolchain/check/testdata/alias/basics.carbon index 1eab6fccafe0..a0df43a616f8 100644 --- a/toolchain/check/testdata/alias/basics.carbon +++ b/toolchain/check/testdata/alias/basics.carbon @@ -39,7 +39,7 @@ let d: c = {}; library "[[@TEST_NAME]]"; -class A(T:! type) {} +class A(T: type) {} //@dump-sem-ir-begin alias a = A({}); @@ -105,10 +105,10 @@ alias c = *b; library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:8: error: `alias` declaration cannot have parameters [UnexpectedDeclNameParams] -// CHECK:STDERR: alias A(T:! type) = T*; -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: alias A(T: type) = T*; +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -alias A(T:! type) = T*; +alias A(T: type) = T*; // --- fail_modifiers.carbon diff --git a/toolchain/check/testdata/array/import.carbon b/toolchain/check/testdata/array/import.carbon index 2acaa0c9f8f6..1e4269a112c0 100644 --- a/toolchain/check/testdata/array/import.carbon +++ b/toolchain/check/testdata/array/import.carbon @@ -31,7 +31,7 @@ fn G(n: i32) -> i32 { library "[[@TEST_NAME]]"; interface I { - let value:! array(i32, 1); + let value: array(i32, 1); } class C {} diff --git a/toolchain/check/testdata/array/init_dependent_bound.carbon b/toolchain/check/testdata/array/init_dependent_bound.carbon index b64cab4f479a..09679b0418ae 100644 --- a/toolchain/check/testdata/array/init_dependent_bound.carbon +++ b/toolchain/check/testdata/array/init_dependent_bound.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; -fn G(T:! type) { +fn G(generic T: type) { // We can initialize this without knowing T. //@dump-sem-ir-begin var unused arr: array(T, 0) = (); @@ -31,7 +31,7 @@ fn H() { library "[[@TEST_NAME]]"; -fn F(N:! i32) { +fn F(generic N: i32) { // CHECK:STDERR: fail_init_dependent_bound.carbon:[[@LINE+4]]:35: error: cannot initialize array with dependent bound from a list of initializers [ArrayInitDependentBound] // CHECK:STDERR: var unused arr: array(i32, N) = (1, 2, 3); // CHECK:STDERR: ^~~~~~~~~ @@ -44,7 +44,7 @@ fn F(N:! i32) { library "[[@TEST_NAME]]"; // TODO: This should be valid. -fn G(template N:! i32) { +fn G(template N: i32) { //@dump-sem-ir-begin // CHECK:STDERR: fail_todo_init_template_dependent_bound.carbon:[[@LINE+4]]:19: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var unused arr: array(i32, N) = (1, 2, 3); @@ -94,11 +94,11 @@ fn H() { G(3); } // CHECK:STDOUT: %.a02: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.ccc, %Destroy.facet.396 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc4_7.2: type) { +// CHECK:STDOUT: generic fn @G(%T.loc4_15.2: type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %array_type.loc7_29.2: type = array_type constants.%int_0, %T.loc4_7.1 [symbolic = %array_type.loc7_29.2 (constants.%array_type.1b3)] +// CHECK:STDOUT: %array_type.loc7_29.2: type = array_type constants.%int_0, %T.loc4_15.1 [symbolic = %array_type.loc7_29.2 (constants.%array_type.1b3)] // CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc7_29.2 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc7_29.2 [symbolic = %pattern_type (constants.%pattern_type.bd6)] // CHECK:STDOUT: %arr.patt.loc7_17.2: @G.%pattern_type (%pattern_type.bd6) = ref_binding_pattern arr [symbolic = %arr.patt.loc7_17.2 (constants.%arr.patt.770)] @@ -119,7 +119,7 @@ fn H() { G(3); } // CHECK:STDOUT: %.loc7_3.1: init @G.%array_type.loc7_29.2 (%array_type.1b3) = converted %.loc7_34.1, %.loc7_34.2 [symbolic = %array (constants.%array.ca4)] // CHECK:STDOUT: assign %arr.var, %.loc7_3.1 // CHECK:STDOUT: %.loc7_29: type = splice_block %array_type.loc7_29.1 [symbolic = %array_type.loc7_29.2 (constants.%array_type.1b3)] { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_7.2 [symbolic = %T.loc4_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %array_type.loc7_29.1: type = array_type %int_0, %T.ref [symbolic = %array_type.loc7_29.2 (constants.%array_type.1b3)] // CHECK:STDOUT: } @@ -146,13 +146,13 @@ fn H() { G(3); } // CHECK:STDOUT: fn @Destroy.Op(%self.param: ref %array_type.988) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { -// CHECK:STDOUT: %T.patt.loc4_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc4_7.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc4_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%C) { -// CHECK:STDOUT: %T.patt.loc4_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc4_7.1 => constants.%C +// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc4_15.1 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %array_type.loc7_29.2 => constants.%array_type.988 diff --git a/toolchain/check/testdata/basics/multi_error.carbon b/toolchain/check/testdata/basics/multi_error.carbon index 34781b33055c..f29b4568d7ec 100644 --- a/toolchain/check/testdata/basics/multi_error.carbon +++ b/toolchain/check/testdata/basics/multi_error.carbon @@ -18,15 +18,15 @@ // works. // CHECK:STDERR: fail_multi_error.carbon:[[@LINE+4]]:8: error: implicit parameters of functions must be constant [ImplictParamMustBeConstant] -// CHECK:STDERR: fn Foo[a: ()](); -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fn Foo[runtime a: ()](); +// CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: -fn Foo[a: ()](); +fn Foo[runtime a: ()](); // CHECK:STDERR: fail_multi_error.carbon:[[@LINE+4]]:8: error: implicit parameters of functions must be constant [ImplictParamMustBeConstant] -// CHECK:STDERR: fn Boo[a: ()]() {} -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fn Boo[runtime a: ()]() {} +// CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: -fn Boo[a: ()]() {} +fn Boo[runtime a: ()]() {} // CHECK:STDOUT: --- fail_multi_error.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/raw_sem_ir/bundle.carbon b/toolchain/check/testdata/basics/raw_sem_ir/bundle.carbon index 32bd8d873b59..f1d66ff7557d 100644 --- a/toolchain/check/testdata/basics/raw_sem_ir/bundle.carbon +++ b/toolchain/check/testdata/basics/raw_sem_ir/bundle.carbon @@ -13,7 +13,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/raw_sem_ir/bundle.carbon -fn F(Form:! Core.Form) ->? Form; +fn F(generic Form: Core.Form) ->? Form; // CHECK:STDOUT: --- // CHECK:STDOUT: filename: bundle.carbon diff --git a/toolchain/check/testdata/basics/raw_sem_ir/non_core_interfaces.carbon b/toolchain/check/testdata/basics/raw_sem_ir/non_core_interfaces.carbon index 1056cbc61b3f..5dc682ec2638 100644 --- a/toolchain/check/testdata/basics/raw_sem_ir/non_core_interfaces.carbon +++ b/toolchain/check/testdata/basics/raw_sem_ir/non_core_interfaces.carbon @@ -16,21 +16,21 @@ // --- non_core.carbon package NonCore; interface Destroy { - let T1:! type; - let T2:! type; + let T1: type; + let T2: type; } // --- main.carbon import NonCore; interface Copy { - let T1:! type; - let T2:! type; + let T1: type; + let T2: type; } //@dump-sem-ir-begin -fn UseNonCoreDestroy[T:! NonCore.Destroy](_: T.T1, _: T.T2) {} -fn UseLocalCopy[T:! Copy](_: T.T1, _: T.T2) {} +fn UseNonCoreDestroy[T: NonCore.Destroy](_: T.T1, _: T.T2) {} +fn UseLocalCopy[T: Copy](_: T.T1, _: T.T2) {} //@dump-sem-ir-end // CHECK:STDOUT: --- diff --git a/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon b/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon index 938405a8ffb1..55352f1ac2ab 100644 --- a/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon +++ b/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon @@ -13,7 +13,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon -fn Foo[T:! type](p: T*) -> (T*, ()) { +fn Foo[T: type](p: T*) -> (T*, ()) { return (p, ()); } diff --git a/toolchain/check/testdata/builtins/bool/eq.carbon b/toolchain/check/testdata/builtins/bool/eq.carbon index 3a30d6eb3285..6e78f2bfdbfe 100644 --- a/toolchain/check/testdata/builtins/bool/eq.carbon +++ b/toolchain/check/testdata/builtins/bool/eq.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; fn Eq(a: bool, b: bool) -> bool = "bool.eq"; -class C(B:! bool) {} +class C(B: bool) {} fn True() -> C(true); fn False() -> C(false); @@ -32,7 +32,7 @@ var d: C(Eq(false, false)) = True(); library "[[@TEST_NAME]]"; -class C(B:! bool) {} +class C(B: bool) {} fn True() -> C(true); fn False() -> C(false); diff --git a/toolchain/check/testdata/builtins/bool/neq.carbon b/toolchain/check/testdata/builtins/bool/neq.carbon index 853d9c6efd4e..7516aeadeae7 100644 --- a/toolchain/check/testdata/builtins/bool/neq.carbon +++ b/toolchain/check/testdata/builtins/bool/neq.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; fn Neq(a: bool, b: bool) -> bool = "bool.neq"; -class C(B:! bool) {} +class C(B: bool) {} fn True() -> C(true); fn False() -> C(false); @@ -32,7 +32,7 @@ var d: C(Neq(false, false)) = False(); library "[[@TEST_NAME]]"; -class C(B:! bool) {} +class C(B: bool) {} fn True() -> C(true); fn False() -> C(false); diff --git a/toolchain/check/testdata/builtins/float/convert_int.carbon b/toolchain/check/testdata/builtins/float/convert_int.carbon index ed3d36188a58..e75e4d361a39 100644 --- a/toolchain/check/testdata/builtins/float/convert_int.carbon +++ b/toolchain/check/testdata/builtins/float/convert_int.carbon @@ -23,8 +23,8 @@ fn ConvertF64ToIntLiteral(a: f64) -> Core.IntLiteral = "float.convert_int"; fn Negate(a: f64) -> f64 = "float.negate"; fn Div(a: f64, b: f64) -> f64 = "float.div"; -class Expect[T:! type](N:! T) {} -fn Test[T:! type](N:! T) -> Expect(N) { return {}; } +class Expect[T: type](N: T) {} +fn Test[T: type](generic N: T) -> Expect(N) { return {}; } // --- identity.carbon library "[[@TEST_NAME]]"; diff --git a/toolchain/check/testdata/builtins/int/and.carbon b/toolchain/check/testdata/builtins/int/and.carbon index 18f00ec47184..84643a2d0fb5 100644 --- a/toolchain/check/testdata/builtins/int/and.carbon +++ b/toolchain/check/testdata/builtins/int/and.carbon @@ -31,8 +31,8 @@ library "[[@TEST_NAME]]"; fn And(a: Core.IntLiteral, b: Core.IntLiteral) -> Core.IntLiteral = "int.and"; -class Expect(N:! Core.IntLiteral) {} -fn Test(N:! Core.IntLiteral) -> Expect(N) { return {}; } +class Expect(N: Core.IntLiteral) {} +fn Test(generic N: Core.IntLiteral) -> Expect(N) { return {}; } fn F() { Test(And(1, 2)) as Expect(0); diff --git a/toolchain/check/testdata/builtins/int/complement.carbon b/toolchain/check/testdata/builtins/int/complement.carbon index 8dbfc095bd96..130e08a41ed4 100644 --- a/toolchain/check/testdata/builtins/int/complement.carbon +++ b/toolchain/check/testdata/builtins/int/complement.carbon @@ -32,8 +32,8 @@ library "[[@TEST_NAME]]"; fn Complement(a: Core.IntLiteral) -> Core.IntLiteral = "int.complement"; -class Expect(N:! Core.IntLiteral) {} -fn Test(N:! Core.IntLiteral) -> Expect(N) { return {}; } +class Expect(N: Core.IntLiteral) {} +fn Test(generic N: Core.IntLiteral) -> Expect(N) { return {}; } fn F() { Test(Complement(0)) as Expect(-1); diff --git a/toolchain/check/testdata/builtins/int/convert.carbon b/toolchain/check/testdata/builtins/int/convert.carbon index 5997bb89c25a..c6f41ca30cce 100644 --- a/toolchain/check/testdata/builtins/int/convert.carbon +++ b/toolchain/check/testdata/builtins/int/convert.carbon @@ -43,8 +43,8 @@ fn UInt16ToChar(a: u16) -> u8 = "int.convert_char"; fn UInt32ToChar(a: u32) -> u8 = "int.convert_char"; fn UInt64ToChar(a: u64) -> u8 = "int.convert_char"; -class Expect[T:! type](N:! T) {} -fn Test[T:! type](N:! T) -> Expect(N) { return {}; } +class Expect[T: type](N: T) {} +fn Test[T: type](generic N: T) -> Expect(N) { return {}; } // --- runtime_call.carbon diff --git a/toolchain/check/testdata/builtins/int/convert_float.carbon b/toolchain/check/testdata/builtins/int/convert_float.carbon index f48cd54c4d62..b443e579fe20 100644 --- a/toolchain/check/testdata/builtins/int/convert_float.carbon +++ b/toolchain/check/testdata/builtins/int/convert_float.carbon @@ -20,8 +20,8 @@ fn ConvertIntLiteralToFloatLiteral(a: Core.IntLiteral) -> Core.FloatLiteral = "i fn Negate(a: f64) -> f64 = "float.negate"; -class Expect[T:! type](N:! T) {} -fn Test[T:! type](N:! T) -> Expect(N) { return {}; } +class Expect[T: type](N: T) {} +fn Test[T: type](generic N: T) -> Expect(N) { return {}; } // --- identity.carbon library "[[@TEST_NAME]]"; diff --git a/toolchain/check/testdata/builtins/int/convert_float_checked.carbon b/toolchain/check/testdata/builtins/int/convert_float_checked.carbon index 7b68888d4e97..b71a5eb55d43 100644 --- a/toolchain/check/testdata/builtins/int/convert_float_checked.carbon +++ b/toolchain/check/testdata/builtins/int/convert_float_checked.carbon @@ -16,8 +16,8 @@ library "[[@TEST_NAME]]"; fn ConvertIntLiteralToFloatLiteral(a: Core.IntLiteral) -> Core.FloatLiteral = "int.convert_float_checked"; fn ConvertIntLiteralToF32(a: Core.IntLiteral) -> f32 = "int.convert_float_checked"; -class Expect[T:! type](N:! T) {} -fn Test[T:! type](N:! T) -> Expect(N) { return {}; } +class Expect[T: type](N: T) {} +fn Test[T: type](generic N: T) -> Expect(N) { return {}; } // --- identity.carbon library "[[@TEST_NAME]]"; diff --git a/toolchain/check/testdata/builtins/int/eq.carbon b/toolchain/check/testdata/builtins/int/eq.carbon index 484fb238953a..cff3ae8cab94 100644 --- a/toolchain/check/testdata/builtins/int/eq.carbon +++ b/toolchain/check/testdata/builtins/int/eq.carbon @@ -46,8 +46,8 @@ library "[[@TEST_NAME]]"; fn Eq(a: Core.IntLiteral, b: Core.IntLiteral) -> bool = "int.eq"; -class Expect(B:! bool) {} -fn Test(B:! bool) -> Expect(B) { return {}; } +class Expect(B: bool) {} +fn Test(generic B: bool) -> Expect(B) { return {}; } fn F() { Test(Eq(5, 5)) as Expect(true); @@ -62,8 +62,8 @@ library "[[@TEST_NAME]]"; fn Eq(a: Core.IntLiteral, b: i32) -> bool = "int.eq"; -class Expect(B:! bool) {} -fn Test(B:! bool) -> Expect(B) { return {}; } +class Expect(B: bool) {} +fn Test(generic B: bool) -> Expect(B) { return {}; } fn F() { Test(Eq(5, 5)) as Expect(true); diff --git a/toolchain/check/testdata/builtins/int/greater_eq.carbon b/toolchain/check/testdata/builtins/int/greater_eq.carbon index c346bef06202..150644d575e0 100644 --- a/toolchain/check/testdata/builtins/int/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/int/greater_eq.carbon @@ -40,8 +40,8 @@ library "[[@TEST_NAME]]"; fn GreaterEq(a: Core.IntLiteral, b: Core.IntLiteral) -> bool = "int.greater_eq"; -class Expect(B:! bool) {} -fn Test(B:! bool) -> Expect(B) { return {}; } +class Expect(B: bool) {} +fn Test(generic B: bool) -> Expect(B) { return {}; } fn F() { Test(GreaterEq(5, 5)) as Expect(true); @@ -58,8 +58,8 @@ library "[[@TEST_NAME]]"; fn GreaterEq(a: Core.IntLiteral, b: i32) -> bool = "int.greater_eq"; -class Expect(B:! bool) {} -fn Test(B:! bool) -> Expect(B) { return {}; } +class Expect(B: bool) {} +fn Test(generic B: bool) -> Expect(B) { return {}; } fn F() { Test(GreaterEq(5, 5)) as Expect(true); diff --git a/toolchain/check/testdata/builtins/int/left_shift.carbon b/toolchain/check/testdata/builtins/int/left_shift.carbon index fe46dc044542..cf0370ad8456 100644 --- a/toolchain/check/testdata/builtins/int/left_shift.carbon +++ b/toolchain/check/testdata/builtins/int/left_shift.carbon @@ -14,8 +14,8 @@ library "[[@TEST_NAME]]"; -class Expect(N:! i32) {} -fn Test(N:! i32) -> Expect(N) { return {}; } +class Expect(N: i32) {} +fn Test(generic N: i32) -> Expect(N) { return {}; } fn LeftShift(a: i32, b: i32) -> i32 = "int.left_shift"; @@ -40,8 +40,8 @@ fn RuntimeCallIsValid(a: i32, b: i32) -> i32 { library "[[@TEST_NAME]]"; -class Expect(N:! u32) {} -fn Test(N:! u32) -> Expect(N) { return {}; } +class Expect(N: u32) {} +fn Test(generic N: u32) -> Expect(N) { return {}; } fn LeftShift(a: u32, b: i32) -> u32 = "int.left_shift"; @@ -68,8 +68,8 @@ library "[[@TEST_NAME]]"; fn LeftShift(a: Core.IntLiteral, b: Core.IntLiteral) -> Core.IntLiteral = "int.left_shift"; -class Expect(N:! Core.IntLiteral) {} -fn Test(N:! Core.IntLiteral) -> Expect(N) { return {}; } +class Expect(N: Core.IntLiteral) {} +fn Test(generic N: Core.IntLiteral) -> Expect(N) { return {}; } fn F() { // Zero can be shifted by any amount. diff --git a/toolchain/check/testdata/builtins/int/less_eq.carbon b/toolchain/check/testdata/builtins/int/less_eq.carbon index 6140a1510b0c..68b1729c48a8 100644 --- a/toolchain/check/testdata/builtins/int/less_eq.carbon +++ b/toolchain/check/testdata/builtins/int/less_eq.carbon @@ -40,8 +40,8 @@ library "[[@TEST_NAME]]"; fn LessEq(a: Core.IntLiteral, b: Core.IntLiteral) -> bool = "int.less_eq"; -class Expect(B:! bool) {} -fn Test(B:! bool) -> Expect(B) { return {}; } +class Expect(B: bool) {} +fn Test(generic B: bool) -> Expect(B) { return {}; } fn F() { Test(LessEq(5, 5)) as Expect(true); @@ -58,8 +58,8 @@ library "[[@TEST_NAME]]"; fn LessEq(a: Core.IntLiteral, b: i32) -> bool = "int.less_eq"; -class Expect(B:! bool) {} -fn Test(B:! bool) -> Expect(B) { return {}; } +class Expect(B: bool) {} +fn Test(generic B: bool) -> Expect(B) { return {}; } fn F() { Test(LessEq(5, 5)) as Expect(true); diff --git a/toolchain/check/testdata/builtins/int/make_type_signed.carbon b/toolchain/check/testdata/builtins/int/make_type_signed.carbon index 9cc2c1fa481b..904d0f459c36 100644 --- a/toolchain/check/testdata/builtins/int/make_type_signed.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_signed.carbon @@ -24,7 +24,7 @@ library "[[@TEST_NAME]]"; import library "types"; -fn Copy[N:! IntLiteral](x: Int(N)) -> Int(N) = "primitive_copy"; +fn Copy[N: IntLiteral](x: Int(N)) -> Int(N) = "primitive_copy"; fn F(n: Int(64)) -> //@dump-sem-ir-begin @@ -42,7 +42,7 @@ fn G(n: Int(13)) -> return Copy(n); } -fn Symbolic(N:! IntLiteral, x: Int(N)) -> Int(N) { +fn Symbolic(generic N: IntLiteral, x: Int(N)) -> Int(N) { return Copy(x); } diff --git a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon index 927823838ca9..7b3d62d9c3a4 100644 --- a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon @@ -24,7 +24,7 @@ library "[[@TEST_NAME]]"; import library "types"; -fn Copy[N:! IntLiteral](x: UInt(N)) -> UInt(N) = "primitive_copy"; +fn Copy[N: IntLiteral](x: UInt(N)) -> UInt(N) = "primitive_copy"; fn F(n: UInt(64)) -> //@dump-sem-ir-begin @@ -42,7 +42,7 @@ fn G(n: UInt(13)) -> return Copy(n); } -fn Symbolic(N:! IntLiteral, x: UInt(N)) -> UInt(N) +fn Symbolic(generic N: IntLiteral, x: UInt(N)) -> UInt(N) { return Copy(x); } diff --git a/toolchain/check/testdata/builtins/int/right_shift.carbon b/toolchain/check/testdata/builtins/int/right_shift.carbon index 17d9ac6b19a7..95701903a563 100644 --- a/toolchain/check/testdata/builtins/int/right_shift.carbon +++ b/toolchain/check/testdata/builtins/int/right_shift.carbon @@ -14,8 +14,8 @@ library "[[@TEST_NAME]]"; -class Expect(N:! i32) {} -fn Test(N:! i32) -> Expect(N) { return {}; } +class Expect(N: i32) {} +fn Test(generic N: i32) -> Expect(N) { return {}; } fn RightShift(a: i32, b: i32) -> i32 = "int.right_shift"; @@ -40,8 +40,8 @@ fn RuntimeCallIsValid(a: i32, b: i32) -> i32 { library "[[@TEST_NAME]]"; -class Expect(N:! u32) {} -fn Test(N:! u32) -> Expect(N) { return {}; } +class Expect(N: u32) {} +fn Test(generic N: u32) -> Expect(N) { return {}; } fn RightShift(a: u32, b: i32) -> u32 = "int.right_shift"; @@ -67,8 +67,8 @@ library "[[@TEST_NAME]]"; fn RightShift(a: Core.IntLiteral, b: Core.IntLiteral) -> Core.IntLiteral = "int.right_shift"; -class Expect(N:! Core.IntLiteral) {} -fn Test(N:! Core.IntLiteral) -> Expect(N) { return {}; } +class Expect(N: Core.IntLiteral) {} +fn Test(generic N: Core.IntLiteral) -> Expect(N) { return {}; } fn F() { Test(RightShift(0, 31)) as Expect(0); diff --git a/toolchain/check/testdata/builtins/int/sadd.carbon b/toolchain/check/testdata/builtins/int/sadd.carbon index 7f5a11be113a..74ac1052a1f2 100644 --- a/toolchain/check/testdata/builtins/int/sadd.carbon +++ b/toolchain/check/testdata/builtins/int/sadd.carbon @@ -16,8 +16,8 @@ library "[[@TEST_NAME]]"; fn Add(a: i32, b: i32) -> i32 = "int.sadd"; -class Expect(N:! i32) {} -fn Test(N:! i32) -> Expect(N) { return {}; } +class Expect(N: i32) {} +fn Test(generic N: i32) -> Expect(N) { return {}; } fn F() { Test(Add(0, 0)) as Expect(0); @@ -37,8 +37,8 @@ library "[[@TEST_NAME]]"; fn Add(a: Core.IntLiteral, b: Core.IntLiteral) -> Core.IntLiteral = "int.sadd"; -class Expect(N:! Core.IntLiteral) {} -fn Test(N:! Core.IntLiteral) -> Expect(N) { return {}; } +class Expect(N: Core.IntLiteral) {} +fn Test(generic N: Core.IntLiteral) -> Expect(N) { return {}; } fn F() { Test(Add(0, 0)) as Expect(0); diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index de5cde711813..5be6d90134bf 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -52,8 +52,8 @@ library "[[@TEST_NAME]]"; fn Div(a: Core.IntLiteral, b: Core.IntLiteral) -> Core.IntLiteral = "int.sdiv"; -class Expect(N:! Core.IntLiteral) {} -fn Test(N:! Core.IntLiteral) -> Expect(N) { return {}; } +class Expect(N: Core.IntLiteral) {} +fn Test(generic N: Core.IntLiteral) -> Expect(N) { return {}; } fn F() { Test(Div(-0x8000_0000, -1)) as Expect(0x8000_0000); diff --git a/toolchain/check/testdata/builtins/int/smul.carbon b/toolchain/check/testdata/builtins/int/smul.carbon index 0c2bc4af4310..86a82f91f3da 100644 --- a/toolchain/check/testdata/builtins/int/smul.carbon +++ b/toolchain/check/testdata/builtins/int/smul.carbon @@ -16,8 +16,8 @@ library "[[@TEST_NAME]]"; fn Mul(a: i32, b: i32) -> i32 = "int.smul"; -class Expect(N:! i32) {} -fn Test(N:! i32) -> Expect(N) { return {}; } +class Expect(N: i32) {} +fn Test(generic N: i32) -> Expect(N) { return {}; } fn F() { Test(Mul(0, 0)) as Expect(0); @@ -40,8 +40,8 @@ library "[[@TEST_NAME]]"; fn Mul(a: Core.IntLiteral, b: Core.IntLiteral) -> Core.IntLiteral = "int.smul"; -class Expect(N:! Core.IntLiteral) {} -fn Test(N:! Core.IntLiteral) -> Expect(N) { return {}; } +class Expect(N: Core.IntLiteral) {} +fn Test(generic N: Core.IntLiteral) -> Expect(N) { return {}; } fn F() { Test(Mul(0, 0)) as Expect(0); diff --git a/toolchain/check/testdata/builtins/int/snegate.carbon b/toolchain/check/testdata/builtins/int/snegate.carbon index 13aa2cbc7336..ee9332176ae9 100644 --- a/toolchain/check/testdata/builtins/int/snegate.carbon +++ b/toolchain/check/testdata/builtins/int/snegate.carbon @@ -34,8 +34,8 @@ library "[[@TEST_NAME]]"; fn Negate(a: Core.IntLiteral) -> Core.IntLiteral = "int.snegate"; fn Sub(a: Core.IntLiteral, b: Core.IntLiteral) -> Core.IntLiteral = "int.ssub"; -class Expect(N:! Core.IntLiteral) {} -fn Test(N:! Core.IntLiteral) -> Expect(N) { return {}; } +class Expect(N: Core.IntLiteral) {} +fn Test(generic N: Core.IntLiteral) -> Expect(N) { return {}; } fn F() { Test(Negate(0)) as Expect(0); diff --git a/toolchain/check/testdata/builtins/int/unegate.carbon b/toolchain/check/testdata/builtins/int/unegate.carbon index a892d0837491..e00b7db3f9a8 100644 --- a/toolchain/check/testdata/builtins/int/unegate.carbon +++ b/toolchain/check/testdata/builtins/int/unegate.carbon @@ -108,8 +108,8 @@ library "[[@TEST_NAME]]"; fn Negate(a: u32) -> u32 = "int.unegate"; -class Expect(N:! u32) {} -fn Test(N:! u32) -> Expect(N) { return {}; } +class Expect(N: u32) {} +fn Test(generic N: u32) -> Expect(N) { return {}; } fn F() { // -(-INT_MAX) is INT_MAX. diff --git a/toolchain/check/testdata/builtins/maybe_unformed/make_type.carbon b/toolchain/check/testdata/builtins/maybe_unformed/make_type.carbon index a6c4645abf57..1bb39ae97fbe 100644 --- a/toolchain/check/testdata/builtins/maybe_unformed/make_type.carbon +++ b/toolchain/check/testdata/builtins/maybe_unformed/make_type.carbon @@ -48,10 +48,10 @@ library "[[@TEST_NAME]]"; fn NoParam() -> type = "maybe_unformed.make_type"; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "maybe_unformed.make_type" [InvalidBuiltinSignature] -// CHECK:STDERR: fn ColonBangParam(T:! type) -> type = "maybe_unformed.make_type"; -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn ColonBangParam(generic T: type) -> type = "maybe_unformed.make_type"; +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn ColonBangParam(T:! type) -> type = "maybe_unformed.make_type"; +fn ColonBangParam(generic T: type) -> type = "maybe_unformed.make_type"; // CHECK:STDOUT: --- use_types.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/pointer/is_null.carbon b/toolchain/check/testdata/builtins/pointer/is_null.carbon index b49cb0a25faf..7c16a2fe4403 100644 --- a/toolchain/check/testdata/builtins/pointer/is_null.carbon +++ b/toolchain/check/testdata/builtins/pointer/is_null.carbon @@ -35,7 +35,7 @@ fn TestC(c: MakeUnformed(C*)) -> bool { library "[[@TEST_NAME]]"; fn MakeUnformed(t: type) -> type = "maybe_unformed.make_type"; -fn IsNull[T:! type](p: MakeUnformed(T*)) -> bool = "pointer.is_null"; +fn IsNull[T: type](p: MakeUnformed(T*)) -> bool = "pointer.is_null"; class C {} diff --git a/toolchain/check/testdata/builtins/pointer/make_null.carbon b/toolchain/check/testdata/builtins/pointer/make_null.carbon index 5d1c939ee0d0..c3f28fd55435 100644 --- a/toolchain/check/testdata/builtins/pointer/make_null.carbon +++ b/toolchain/check/testdata/builtins/pointer/make_null.carbon @@ -30,7 +30,7 @@ let c: MakeUnformed(C*) = MakeNullC(); library "[[@TEST_NAME]]"; fn MakeUnformed(t: type) -> type = "maybe_unformed.make_type"; -fn MakeNull(T:! type) -> MakeUnformed(T*) = "pointer.make_null"; +fn MakeNull(generic T: type) -> MakeUnformed(T*) = "pointer.make_null"; class C {} diff --git a/toolchain/check/testdata/builtins/type/and.carbon b/toolchain/check/testdata/builtins/type/and.carbon index 7cdbb847dc6c..2dafa9d4c5ab 100644 --- a/toolchain/check/testdata/builtins/type/and.carbon +++ b/toolchain/check/testdata/builtins/type/and.carbon @@ -19,7 +19,7 @@ fn TypeAnd(a: type, b: type) -> type = "type.and"; interface I {} interface J {} -fn TakeIJ(unused T:! TypeAnd(I, J)) {} +fn TakeIJ(unused generic T: TypeAnd(I, J)) {} class IJ { impl as I {} @@ -39,7 +39,7 @@ fn TypeAnd(a: type, b: type) -> type = "type.and"; interface I {} interface J {} -fn TakeIJ(unused T:! TypeAnd(I, J)) {} +fn TakeIJ(unused generic T: TypeAnd(I, J)) {} class JustI { impl as I {} @@ -53,17 +53,17 @@ fn Call() { // CHECK:STDERR: fail_combine_facets_bad_call.carbon:[[@LINE+7]]:3: error: cannot convert type `JustI` into type implementing `I & J` [ConversionFailureTypeToFacet] // CHECK:STDERR: TakeIJ(JustI); // CHECK:STDERR: ^~~~~~~~~~~~~ - // CHECK:STDERR: fail_combine_facets_bad_call.carbon:[[@LINE-14]]:18: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn TakeIJ(unused T:! TypeAnd(I, J)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_combine_facets_bad_call.carbon:[[@LINE-14]]:26: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn TakeIJ(unused generic T: TypeAnd(I, J)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: TakeIJ(JustI); // CHECK:STDERR: fail_combine_facets_bad_call.carbon:[[@LINE+7]]:3: error: cannot convert type `JustJ` into type implementing `I & J` [ConversionFailureTypeToFacet] // CHECK:STDERR: TakeIJ(JustJ); // CHECK:STDERR: ^~~~~~~~~~~~~ - // CHECK:STDERR: fail_combine_facets_bad_call.carbon:[[@LINE-22]]:18: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn TakeIJ(unused T:! TypeAnd(I, J)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_combine_facets_bad_call.carbon:[[@LINE-22]]:26: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn TakeIJ(unused generic T: TypeAnd(I, J)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: TakeIJ(JustJ); } diff --git a/toolchain/check/testdata/choice/generic.carbon b/toolchain/check/testdata/choice/generic.carbon index 4c786e411643..557009dd6ceb 100644 --- a/toolchain/check/testdata/choice/generic.carbon +++ b/toolchain/check/testdata/choice/generic.carbon @@ -11,7 +11,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/choice/generic.carbon //@dump-sem-ir-begin -choice Always(T:! type) { +choice Always(T: type) { Sunny } //@dump-sem-ir-end @@ -41,9 +41,9 @@ choice Always(T:! type) { // CHECK:STDOUT: %Always.decl: %Always.type = class_decl @Always [concrete = constants.%Always.generic] { // CHECK:STDOUT: %T.patt.loc14_16.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_16.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_19.1: type = splice_block %.loc14_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc14_18.1: type = splice_block %.loc14_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc14_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc14_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc14_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_16.1 (constants.%T)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/choice/params.carbon b/toolchain/check/testdata/choice/params.carbon index d445e2fcd055..7c9f92770445 100644 --- a/toolchain/check/testdata/choice/params.carbon +++ b/toolchain/check/testdata/choice/params.carbon @@ -39,7 +39,7 @@ choice C { // --- fail_todo_generic_params.carbon library "[[@TEST_NAME]]"; -choice C(T:! type) { +choice C(T: type) { // CHECK:STDERR: fail_todo_generic_params.carbon:[[@LINE+4]]:6: error: semantics TODO: `choice alternatives with parameters are not yet supported` [SemanticsTodo] // CHECK:STDERR: Alt(a: T) // CHECK:STDERR: ^~~~~~ diff --git a/toolchain/check/testdata/class/adapter/convert_incomplete.carbon b/toolchain/check/testdata/class/adapter/convert_incomplete.carbon index 9e5c6aaf29f9..22ff2a60b8fd 100644 --- a/toolchain/check/testdata/class/adapter/convert_incomplete.carbon +++ b/toolchain/check/testdata/class/adapter/convert_incomplete.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; -class Adapter(T:! type) { +class Adapter(T: type) { extend adapt T*; } @@ -31,7 +31,7 @@ fn F(p: Adapter(X)*) { library "[[@TEST_NAME]]"; -class Adapter(T:! type) { +class Adapter(T: type) { extend adapt T*; } @@ -47,7 +47,7 @@ fn F(p: Adapter(X)*) { library "[[@TEST_NAME]]"; -class Adapter(T:! type); +class Adapter(T: type); class X {} diff --git a/toolchain/check/testdata/class/destroy_calls.carbon b/toolchain/check/testdata/class/destroy_calls.carbon index 2aa2f0171172..ff230ffc49d2 100644 --- a/toolchain/check/testdata/class/destroy_calls.carbon +++ b/toolchain/check/testdata/class/destroy_calls.carbon @@ -67,7 +67,7 @@ library "[[@TEST_NAME]]"; class C {} -class D(template T:! type) {} +class D(template T: type) {} //@dump-sem-ir-begin fn F() { @@ -78,10 +78,10 @@ fn F() { // --- generic_use_inside_generic.carbon library "[[@TEST_NAME]]"; -class C(template T:! type) {} +class C(template T: type) {} //@dump-sem-ir-begin -fn F(template T:! type) { +fn F(template T: type) { var unused v: C(T) = {}; } //@dump-sem-ir-end @@ -487,9 +487,9 @@ fn G() { F({}); } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc6_16.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_18.1: type = splice_block %.loc6_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_16.2: type = symbolic_binding T, 0, template [template = %T.loc6_16.1 (constants.%T)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_error_recovery.carbon b/toolchain/check/testdata/class/fail_error_recovery.carbon index b31a06d5c46d..221e75113fbf 100644 --- a/toolchain/check/testdata/class/fail_error_recovery.carbon +++ b/toolchain/check/testdata/class/fail_error_recovery.carbon @@ -12,11 +12,11 @@ // --- fail_virtual_fn_in_invalid_context.carbon -// CHECK:STDERR: fail_virtual_fn_in_invalid_context.carbon:[[@LINE+4]]:17: error: name `error_not_found` not found [NameNotFound] -// CHECK:STDERR: fn F(unused N:! error_not_found) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_virtual_fn_in_invalid_context.carbon:[[@LINE+4]]:24: error: name `error_not_found` not found [NameNotFound] +// CHECK:STDERR: fn F(unused generic N: error_not_found) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused N:! error_not_found) { +fn F(unused generic N: error_not_found) { base class C { virtual fn Foo(unused self) {} } diff --git a/toolchain/check/testdata/class/fail_member_of_let.carbon b/toolchain/check/testdata/class/fail_member_of_let.carbon index 0d685e5caab5..0941383411e8 100644 --- a/toolchain/check/testdata/class/fail_member_of_let.carbon +++ b/toolchain/check/testdata/class/fail_member_of_let.carbon @@ -14,7 +14,7 @@ class Class { fn F() -> (); } -// TODO: Use `:!` here once it is available. +// TODO: Use `generic` here once local generic `let` bindings are supported. let T: type = Class; // The class name is required to be written in the same way as in the class diff --git a/toolchain/check/testdata/class/fail_var_param.carbon b/toolchain/check/testdata/class/fail_var_param.carbon new file mode 100644 index 000000000000..54a526b2a1c9 --- /dev/null +++ b/toolchain/check/testdata/class/fail_var_param.carbon @@ -0,0 +1,22 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/fail_var_param.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/fail_var_param.carbon + +// A `var` parameter is not constant, so it is not allowed as a parameter of a +// generic type. +// CHECK:STDERR: fail_var_param.carbon:[[@LINE+7]]:13: error: parameters of generic types must be constant [GenericParamMustBeConstant] +// CHECK:STDERR: class C(var x: i32); +// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: fail_var_param.carbon:[[@LINE+4]]:13: note: `var` parameters are runtime [VarParamIsRuntime] +// CHECK:STDERR: class C(var x: i32); +// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: +class C(var x: i32); diff --git a/toolchain/check/testdata/class/field/comp_time_field.carbon b/toolchain/check/testdata/class/field/comp_time_field.carbon index 42ccee7c9bda..0274990d7a43 100644 --- a/toolchain/check/testdata/class/field/comp_time_field.carbon +++ b/toolchain/check/testdata/class/field/comp_time_field.carbon @@ -17,17 +17,17 @@ library "[[@TEST_NAME]]"; class Class { - // CHECK:STDERR: fail_let.carbon:[[@LINE+4]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] - // CHECK:STDERR: let A:! type = Class; - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_let.carbon:[[@LINE+4]]:15: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] + // CHECK:STDERR: let generic A: type = Class; + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - let A:! type = Class; + let generic A: type = Class; // CHECK:STDERR: fail_let.carbon:[[@LINE+4]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] - // CHECK:STDERR: let template B:! type = Class; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ + // CHECK:STDERR: let template B: type = Class; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: - let template B:! type = Class; + let template B: type = Class; } // --- fail_var.carbon @@ -35,21 +35,21 @@ class Class { library "[[@TEST_NAME]]"; class Class { - // CHECK:STDERR: fail_var.carbon:[[@LINE+8]]:7: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] - // CHECK:STDERR: var C:! type = Class; - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_var.carbon:[[@LINE+8]]:15: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] + // CHECK:STDERR: var generic C: type = Class; + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_var.carbon:[[@LINE+4]]:16: error: found `:!` pattern inside `var` pattern [NonRegularBindingInVarDecl] - // CHECK:STDERR: var C:! type = Class; - // CHECK:STDERR: ^ + // CHECK:STDERR: fail_var.carbon:[[@LINE+4]]:23: error: found generic binding inside `var` pattern [NonRegularBindingInVarDecl] + // CHECK:STDERR: var generic C: type = Class; + // CHECK:STDERR: ^ // CHECK:STDERR: - var C:! type = Class; + var generic C: type = Class; - // CHECK:STDERR: fail_var.carbon:[[@LINE+4]]:25: error: found `:!` pattern inside `var` pattern [NonRegularBindingInVarDecl] - // CHECK:STDERR: var template D:! type = Class; - // CHECK:STDERR: ^ + // CHECK:STDERR: fail_var.carbon:[[@LINE+4]]:24: error: found generic binding inside `var` pattern [NonRegularBindingInVarDecl] + // CHECK:STDERR: var template D: type = Class; + // CHECK:STDERR: ^ // CHECK:STDERR: - var template D:! type = Class; + var template D: type = Class; } var x: Class = {}; @@ -76,18 +76,18 @@ var x: Class = {}; // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %Class.ref.loc9: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] -// CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.2 [concrete = type] { +// CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc9: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_11.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %A: type = wrapper_binding A, %Class.ref.loc9 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %A.patt: %pattern_type = value_binding_pattern A [concrete = constants.%A.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.ref.loc15: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] -// CHECK:STDOUT: %.loc15_20.1: type = splice_block %.loc15_20.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_19.1: type = splice_block %.loc15_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %B: type = wrapper_binding B, %Class.ref.loc15 // CHECK:STDOUT: name_binding_decl { diff --git a/toolchain/check/testdata/class/field/field_initializer.carbon b/toolchain/check/testdata/class/field/field_initializer.carbon index cbe996834108..cd37ad9e6bef 100644 --- a/toolchain/check/testdata/class/field/field_initializer.carbon +++ b/toolchain/check/testdata/class/field/field_initializer.carbon @@ -32,12 +32,12 @@ var C2: Class = {}; library "[[@TEST_NAME]]"; interface I { - let Default:! Self; + let Default: Self; } impl i32 as I where .Default = 123 {} -class Class(T:! I) { +class Class(T: I) { var x: T = T.Default; } diff --git a/toolchain/check/testdata/class/generic/adapt.carbon b/toolchain/check/testdata/class/generic/adapt.carbon index f49eedff347a..e39fa2d1f2e8 100644 --- a/toolchain/check/testdata/class/generic/adapt.carbon +++ b/toolchain/check/testdata/class/generic/adapt.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -class C(T:! type) { +class C(T: type) { var x: T; } @@ -42,7 +42,7 @@ fn ImportedAccess(a: Adapter) -> i32 { library "[[@TEST_NAME]]"; -class C(T:! type) { +class C(T: type) { var x: T; } @@ -69,7 +69,7 @@ fn Access(a: Adapter) -> i32 { library "[[@TEST_NAME]]"; -class C(T:! type) { +class C(T: type) { var x: T; } @@ -99,7 +99,7 @@ fn ImportedAccess(a: Adapter) -> i32 { library "[[@TEST_NAME]]"; -class Adapter(T:! type) { +class Adapter(T: type) { adapt T; } @@ -200,9 +200,9 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc4_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_10.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_13.1: type = splice_block %.loc4_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_12.1: type = splice_block %.loc4_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_10.1 (constants.%T.67d)] // CHECK:STDOUT: } @@ -532,9 +532,9 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc4_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_13.1: type = splice_block %.loc4_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_12.1: type = splice_block %.loc4_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_10.1 (constants.%T)] // CHECK:STDOUT: } @@ -676,9 +676,9 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc7_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_13.1: type = splice_block %.loc7_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc7_12.1: type = splice_block %.loc7_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_10.1 (constants.%T)] // CHECK:STDOUT: } @@ -954,9 +954,9 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %Adapter.decl: %Adapter.type = class_decl @Adapter [concrete = constants.%Adapter.generic] { // CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_16.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T.67d)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/base_is_generic.carbon b/toolchain/check/testdata/class/generic/base_is_generic.carbon index 7e9fa06c7a9f..17a747738d76 100644 --- a/toolchain/check/testdata/class/generic/base_is_generic.carbon +++ b/toolchain/check/testdata/class/generic/base_is_generic.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -base class Base(T:! type) { +base class Base(T: type) { var x: T; } @@ -46,7 +46,7 @@ fn ImportedDoubleFieldAccess(d: Derived) -> i32 { library "[[@TEST_NAME]]"; -class C(T:! type) { +class C(T: type) { // CHECK:STDERR: fail_todo_extend_symbolic_base.carbon:[[@LINE+4]]:16: error: deriving from final type `T`; base type must be an `abstract` or `base` class [BaseIsFinal] // CHECK:STDERR: extend base: T; // CHECK:STDERR: ^ @@ -66,11 +66,11 @@ fn F() { library "[[@TEST_NAME]]"; -base class X(U:! type) { +base class X(U: type) { fn G() -> U { return G(); } } -class C(T:! type) { +class C(T: type) { extend base: X(T); } @@ -171,9 +171,9 @@ fn H() { // CHECK:STDOUT: %Base.decl: %Base.type = class_decl @Base [concrete = constants.%Base.generic] { // CHECK:STDOUT: %T.patt.loc4_18.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_21.1: type = splice_block %.loc4_21.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_21.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_18.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T.67d)] // CHECK:STDOUT: } @@ -516,9 +516,9 @@ fn H() { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc4_10.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_13.1: type = splice_block %.loc4_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_12.1: type = splice_block %.loc4_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_10.1 (constants.%T)] // CHECK:STDOUT: } @@ -665,18 +665,18 @@ fn H() { // CHECK:STDOUT: %X.decl: %X.type = class_decl @X [concrete = constants.%X.generic] { // CHECK:STDOUT: %U.patt.loc4_15.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc4_15.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc4_15.2: type = symbolic_binding U, 0 [symbolic = %U.loc4_15.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc8_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_10.1 (constants.%T)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/basic.carbon b/toolchain/check/testdata/class/generic/basic.carbon index 15bce7d210fa..5b3c7f690d29 100644 --- a/toolchain/check/testdata/class/generic/basic.carbon +++ b/toolchain/check/testdata/class/generic/basic.carbon @@ -15,7 +15,7 @@ library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -class Class(T:! Core.Copy) { +class Class(T: Core.Copy) { fn GetAddr(ref self) -> T* { return &self.k; } @@ -27,7 +27,7 @@ class Class(T:! Core.Copy) { var k: T; } -class Declaration(T:! type); +class Declaration(T: type); //@dump-sem-ir-end @@ -111,9 +111,9 @@ class Declaration(T:! type); // CHECK:STDOUT: %Declaration.decl: %Declaration.type = class_decl @Declaration [concrete = constants.%Declaration.generic] { // CHECK:STDOUT: %T.patt.loc17_20.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_20.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_23.1: type = splice_block %.loc17_23.2 [concrete = type] { +// CHECK:STDOUT: %.loc17_22.1: type = splice_block %.loc17_22.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc17_23.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc17_22.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc17_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc17_20.1 (constants.%T.67d)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 6d19e2d6974a..7a687f4bb774 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -class Class(T:! type, N:! i32) {} +class Class(T: type, N: i32) {} var a: Class(i32*, 5); @@ -27,14 +27,14 @@ var b: Class((), 0); library "[[@TEST_NAME]]"; -class Class(T:! type, N:! i32) {} +class Class(T: type, N: i32) {} // CHECK:STDERR: fail_too_few.carbon:[[@LINE+7]]:8: error: 1 argument passed to generic class expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: var a: Class(i32*); // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: fail_too_few.carbon:[[@LINE-5]]:1: note: calling generic class declared here [InCallToEntity] -// CHECK:STDERR: class Class(T:! type, N:! i32) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class Class(T: type, N: i32) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var a: Class(i32*); @@ -42,14 +42,14 @@ var a: Class(i32*); library "[[@TEST_NAME]]"; -class Class(T:! type, N:! i32) {} +class Class(T: type, N: i32) {} // CHECK:STDERR: fail_too_many.carbon:[[@LINE+7]]:8: error: 3 arguments passed to generic class expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: var a: Class(i32*, 1, 2); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_too_many.carbon:[[@LINE-5]]:1: note: calling generic class declared here [InCallToEntity] -// CHECK:STDERR: class Class(T:! type, N:! i32) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class Class(T: type, N: i32) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var a: Class(i32*, 1, 2); @@ -57,7 +57,7 @@ var a: Class(i32*, 1, 2); library "[[@TEST_NAME]]"; -class Class(T:! type, N:! i32) {} +class Class(T: type, N: i32) {} // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+10]]:8: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet] // CHECK:STDERR: var a: Class(5, i32*); @@ -66,15 +66,15 @@ class Class(T:! type, N:! i32) {} // CHECK:STDERR: var a: Class(5, i32*); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE-8]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] -// CHECK:STDERR: class Class(T:! type, N:! i32) {} -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: class Class(T: type, N: i32) {} +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var a: Class(5, i32*); // --- call_in_nested_return_type.carbon -class Outer(T:! type) { - class Inner(U:! type) { +class Outer(T: type) { + class Inner(U: type) { fn A() -> Outer(T) { return {}; } @@ -184,18 +184,18 @@ class Outer(T:! type) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %N.patt.loc4_24.1: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_24.2 (constants.%N.patt.a76)] +// CHECK:STDOUT: %N.patt.loc4_23.1: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.a76)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc4_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T.67d)] -// CHECK:STDOUT: %.loc4_27: type = splice_block %i32 [concrete = constants.%i32] { -// CHECK:STDOUT: %.Self.frozen.loc4_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_25: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self.frozen.loc4_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc4_24.2: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_24.1 (constants.%N.ce9)] +// CHECK:STDOUT: %N.loc4_23.2: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_23.1 (constants.%N.ce9)] // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Class.4f7 = var_storage %a.var_patt [concrete] // CHECK:STDOUT: %.loc6_21.1: type = splice_block %Class.loc6 [concrete = constants.%Class.4f7] { @@ -239,11 +239,11 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @Class(%T.loc4_14.2: type, %N.loc4_24.2: %i32) { +// CHECK:STDOUT: generic class @Class(%T.loc4_14.2: type, %N.loc4_23.2: %i32) { // CHECK:STDOUT: %T.patt.loc4_14.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt.d47)] // CHECK:STDOUT: %T.loc4_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T.67d)] -// CHECK:STDOUT: %N.patt.loc4_24.2: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_24.2 (constants.%N.patt.a76)] -// CHECK:STDOUT: %N.loc4_24.1: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_24.1 (constants.%N.ce9)] +// CHECK:STDOUT: %N.patt.loc4_23.2: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.a76)] +// CHECK:STDOUT: %N.loc4_23.1: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_23.1 (constants.%N.ce9)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -282,15 +282,15 @@ class Outer(T:! type) { // CHECK:STDOUT: specific @Class(constants.%T.67d, constants.%N.ce9) { // CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc4_14.1 => constants.%T.67d -// CHECK:STDOUT: %N.patt.loc4_24.2 => constants.%N.patt.a76 -// CHECK:STDOUT: %N.loc4_24.1 => constants.%N.ce9 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.patt.a76 +// CHECK:STDOUT: %N.loc4_23.1 => constants.%N.ce9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%ptr.d08, constants.%int_5.eef) { // CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc4_14.1 => constants.%ptr.d08 -// CHECK:STDOUT: %N.patt.loc4_24.2 => constants.%N.patt.a76 -// CHECK:STDOUT: %N.loc4_24.1 => constants.%int_5.eef +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.patt.a76 +// CHECK:STDOUT: %N.loc4_23.1 => constants.%int_5.eef // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -298,8 +298,8 @@ class Outer(T:! type) { // CHECK:STDOUT: specific @Class(constants.%empty_tuple.type, constants.%int_0.3c0) { // CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc4_14.1 => constants.%empty_tuple.type -// CHECK:STDOUT: %N.patt.loc4_24.2 => constants.%N.patt.a76 -// CHECK:STDOUT: %N.loc4_24.1 => constants.%int_0.3c0 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.patt.a76 +// CHECK:STDOUT: %N.loc4_23.1 => constants.%int_0.3c0 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -345,18 +345,18 @@ class Outer(T:! type) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc4_24.1: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_24.2 (constants.%N.patt.a76)] +// CHECK:STDOUT: %N.patt.loc4_23.1: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.a76)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc4_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] -// CHECK:STDOUT: %.loc4_27: type = splice_block %i32 [concrete = constants.%i32] { -// CHECK:STDOUT: %.Self.frozen.loc4_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_25: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self.frozen.loc4_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc4_24.2: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_24.1 (constants.%N.ce9)] +// CHECK:STDOUT: %N.loc4_23.2: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_23.1 (constants.%N.ce9)] // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref = var_storage %a.var_patt [concrete = ] // CHECK:STDOUT: %.1: = splice_block [concrete = ] { @@ -371,11 +371,11 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @Class(%T.loc4_14.2: type, %N.loc4_24.2: %i32) { +// CHECK:STDOUT: generic class @Class(%T.loc4_14.2: type, %N.loc4_23.2: %i32) { // CHECK:STDOUT: %T.patt.loc4_14.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] -// CHECK:STDOUT: %N.patt.loc4_24.2: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_24.2 (constants.%N.patt.a76)] -// CHECK:STDOUT: %N.loc4_24.1: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_24.1 (constants.%N.ce9)] +// CHECK:STDOUT: %N.patt.loc4_23.2: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.a76)] +// CHECK:STDOUT: %N.loc4_23.1: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_23.1 (constants.%N.ce9)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -399,8 +399,8 @@ class Outer(T:! type) { // CHECK:STDOUT: specific @Class(constants.%T, constants.%N.ce9) { // CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_14.1 => constants.%T -// CHECK:STDOUT: %N.patt.loc4_24.2 => constants.%N.patt.a76 -// CHECK:STDOUT: %N.loc4_24.1 => constants.%N.ce9 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.patt.a76 +// CHECK:STDOUT: %N.loc4_23.1 => constants.%N.ce9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_too_many.carbon @@ -446,18 +446,18 @@ class Outer(T:! type) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc4_24.1: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_24.2 (constants.%N.patt.a76)] +// CHECK:STDOUT: %N.patt.loc4_23.1: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.a76)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc4_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] -// CHECK:STDOUT: %.loc4_27: type = splice_block %i32 [concrete = constants.%i32] { -// CHECK:STDOUT: %.Self.frozen.loc4_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_25: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self.frozen.loc4_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc4_24.2: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_24.1 (constants.%N.ce9)] +// CHECK:STDOUT: %N.loc4_23.2: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_23.1 (constants.%N.ce9)] // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref = var_storage %a.var_patt [concrete = ] // CHECK:STDOUT: %.1: = splice_block [concrete = ] { @@ -474,11 +474,11 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @Class(%T.loc4_14.2: type, %N.loc4_24.2: %i32) { +// CHECK:STDOUT: generic class @Class(%T.loc4_14.2: type, %N.loc4_23.2: %i32) { // CHECK:STDOUT: %T.patt.loc4_14.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] -// CHECK:STDOUT: %N.patt.loc4_24.2: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_24.2 (constants.%N.patt.a76)] -// CHECK:STDOUT: %N.loc4_24.1: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_24.1 (constants.%N.ce9)] +// CHECK:STDOUT: %N.patt.loc4_23.2: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.a76)] +// CHECK:STDOUT: %N.loc4_23.1: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_23.1 (constants.%N.ce9)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -502,8 +502,8 @@ class Outer(T:! type) { // CHECK:STDOUT: specific @Class(constants.%T, constants.%N.ce9) { // CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_14.1 => constants.%T -// CHECK:STDOUT: %N.patt.loc4_24.2 => constants.%N.patt.a76 -// CHECK:STDOUT: %N.loc4_24.1 => constants.%N.ce9 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.patt.a76 +// CHECK:STDOUT: %N.loc4_23.1 => constants.%N.ce9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_no_conversion.carbon @@ -552,18 +552,18 @@ class Outer(T:! type) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc4_24.1: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_24.2 (constants.%N.patt.a76)] +// CHECK:STDOUT: %N.patt.loc4_23.1: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.a76)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc4_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] -// CHECK:STDOUT: %.loc4_27: type = splice_block %i32 [concrete = constants.%i32] { -// CHECK:STDOUT: %.Self.frozen.loc4_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_25: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self.frozen.loc4_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc4_24.2: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_24.1 (constants.%N.ce9)] +// CHECK:STDOUT: %N.loc4_23.2: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_23.1 (constants.%N.ce9)] // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref = var_storage %a.var_patt [concrete = ] // CHECK:STDOUT: %.1: = splice_block [concrete = ] { @@ -580,11 +580,11 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @Class(%T.loc4_14.2: type, %N.loc4_24.2: %i32) { +// CHECK:STDOUT: generic class @Class(%T.loc4_14.2: type, %N.loc4_23.2: %i32) { // CHECK:STDOUT: %T.patt.loc4_14.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] -// CHECK:STDOUT: %N.patt.loc4_24.2: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_24.2 (constants.%N.patt.a76)] -// CHECK:STDOUT: %N.loc4_24.1: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_24.1 (constants.%N.ce9)] +// CHECK:STDOUT: %N.patt.loc4_23.2: %pattern_type.6b6 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.a76)] +// CHECK:STDOUT: %N.loc4_23.1: %i32 = symbolic_binding N, 1 [symbolic = %N.loc4_23.1 (constants.%N.ce9)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -608,8 +608,8 @@ class Outer(T:! type) { // CHECK:STDOUT: specific @Class(constants.%T, constants.%N.ce9) { // CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_14.1 => constants.%T -// CHECK:STDOUT: %N.patt.loc4_24.2 => constants.%N.patt.a76 -// CHECK:STDOUT: %N.loc4_24.1 => constants.%N.ce9 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.patt.a76 +// CHECK:STDOUT: %N.loc4_23.1 => constants.%N.ce9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- call_in_nested_return_type.carbon @@ -693,9 +693,9 @@ class Outer(T:! type) { // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] { // CHECK:STDOUT: %T.patt.loc2_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc2_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_17.1: type = splice_block %.loc2_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc2_16.1: type = splice_block %.loc2_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc2_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc2_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc2_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc2_14.1 (constants.%T)] // CHECK:STDOUT: } @@ -713,9 +713,9 @@ class Outer(T:! type) { // CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.8f7) = class_decl @Inner [symbolic = @Outer.%Inner.generic (constants.%Inner.generic.b3a)] { // CHECK:STDOUT: %U.patt.loc3_16.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc3_16.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_19.1: type = splice_block %.loc3_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_18.1: type = splice_block %.loc3_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc3_16.2: type = symbolic_binding U, 1 [symbolic = %U.loc3_16.1 (constants.%U)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon index 8ad34c7cff02..cacedf057cd0 100644 --- a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon +++ b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon @@ -18,7 +18,7 @@ fn Int(N: Core.IntLiteral) -> type = "int.make_type_signed"; base class B {} -class A(N:! i32) { +class A(N: i32) { extend base: B; var n: Int(N); diff --git a/toolchain/check/testdata/class/generic/field.carbon b/toolchain/check/testdata/class/generic/field.carbon index eb7afca53733..335df4ae563a 100644 --- a/toolchain/check/testdata/class/generic/field.carbon +++ b/toolchain/check/testdata/class/generic/field.carbon @@ -15,7 +15,7 @@ library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -class Class(T:! type) { +class Class(T: type) { var x: T; } @@ -23,11 +23,11 @@ fn F(c: Class(i32)) -> i32 { return c.x; } -fn G(T:! Core.Copy, c: Class(T)) -> T { +fn G(generic T: Core.Copy, c: Class(T)) -> T { return c.x; } -fn H(U:! Core.Copy, c: Class(U)) -> U { +fn H(generic U: Core.Copy, c: Class(U)) -> U { return c.x; } //@dump-sem-ir-end @@ -149,9 +149,9 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_16.1: type = splice_block %.loc5_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.67d)] // CHECK:STDOUT: } @@ -174,62 +174,62 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc13_7.1: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt.fe6)] -// CHECK:STDOUT: %c.param_patt.loc13_22.1: @G.%pattern_type.loc13_22 (%pattern_type.6b8c16.1) = value_param_pattern [symbolic = %c.param_patt.loc13_22.2 (constants.%c.param_patt.7092f5.1)] -// CHECK:STDOUT: %c.patt.loc13_22.1: @G.%pattern_type.loc13_22 (%pattern_type.6b8c16.1) = at_binding_pattern c, %c.param_patt.loc13_22.1 [symbolic = %c.patt.loc13_22.2 (constants.%c.patt.39adc7.1)] -// CHECK:STDOUT: %return.param_patt.loc13_37.1: @G.%pattern_type.loc13_37 (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc13_37.2 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc13_34.1: @G.%pattern_type.loc13_37 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc13_37.1, %.loc13_37.3 [symbolic = %return.patt.loc13_34.2 (constants.%return.patt.f449d7.1)] +// CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.fe6)] +// CHECK:STDOUT: %c.param_patt.loc13_29.1: @G.%pattern_type.loc13_29 (%pattern_type.6b8c16.1) = value_param_pattern [symbolic = %c.param_patt.loc13_29.2 (constants.%c.param_patt.7092f5.1)] +// CHECK:STDOUT: %c.patt.loc13_29.1: @G.%pattern_type.loc13_29 (%pattern_type.6b8c16.1) = at_binding_pattern c, %c.param_patt.loc13_29.1 [symbolic = %c.patt.loc13_29.2 (constants.%c.patt.39adc7.1)] +// CHECK:STDOUT: %return.param_patt.loc13_44.1: @G.%pattern_type.loc13_44 (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc13_44.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc13_41.1: @G.%pattern_type.loc13_44 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc13_44.1, %.loc13_44.3 [symbolic = %return.patt.loc13_41.2 (constants.%return.patt.f449d7.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc13_37: %Copy.type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc13_37: type = facet_access_type %T.ref.loc13_37 [symbolic = %T.as_type.loc13_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc13_37.3: type = converted %T.ref.loc13_37, %T.as_type.loc13_37 [symbolic = %T.as_type.loc13_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc13_37.4: Core.Form = init_form %.loc13_37.3 [symbolic = %.loc13_37.2 (constants.%.1ce700.2)] -// CHECK:STDOUT: %.loc13_14: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { +// CHECK:STDOUT: %T.ref.loc13_44: %Copy.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc13_44: type = facet_access_type %T.ref.loc13_44 [symbolic = %T.as_type.loc13_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc13_44.3: type = converted %T.ref.loc13_44, %T.as_type.loc13_44 [symbolic = %T.as_type.loc13_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc13_44.4: Core.Form = init_form %.loc13_44.3 [symbolic = %.loc13_44.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %.loc13_21: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc13_7.2: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T.f84)] -// CHECK:STDOUT: %c.param: @G.%Class.loc13_31.1 (%Class.c74ef3.1) = value_param call_param0 -// CHECK:STDOUT: %.loc13_31.1: type = splice_block %Class.loc13_31.2 [symbolic = %Class.loc13_31.1 (constants.%Class.c74ef3.1)] { +// CHECK:STDOUT: %T.loc13_15.2: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T.f84)] +// CHECK:STDOUT: %c.param: @G.%Class.loc13_38.1 (%Class.c74ef3.1) = value_param call_param0 +// CHECK:STDOUT: %.loc13_38.1: type = splice_block %Class.loc13_38.2 [symbolic = %Class.loc13_38.1 (constants.%Class.c74ef3.1)] { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] -// CHECK:STDOUT: %T.ref.loc13_30: %Copy.type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc13_31.2: type = facet_access_type %T.ref.loc13_30 [symbolic = %T.as_type.loc13_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc13_31.2: type = converted %T.ref.loc13_30, %T.as_type.loc13_31.2 [symbolic = %T.as_type.loc13_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %Class.loc13_31.2: type = class_type @Class, @Class(constants.%T.as_type) [symbolic = %Class.loc13_31.1 (constants.%Class.c74ef3.1)] +// CHECK:STDOUT: %T.ref.loc13_37: %Copy.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc13_38.2: type = facet_access_type %T.ref.loc13_37 [symbolic = %T.as_type.loc13_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc13_38.2: type = converted %T.ref.loc13_37, %T.as_type.loc13_38.2 [symbolic = %T.as_type.loc13_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %Class.loc13_38.2: type = class_type @Class, @Class(constants.%T.as_type) [symbolic = %Class.loc13_38.1 (constants.%Class.c74ef3.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %c: @G.%Class.loc13_31.1 (%Class.c74ef3.1) = wrapper_binding c, %c.param -// CHECK:STDOUT: %return.param: ref @G.%T.as_type.loc13_31.1 (%T.as_type) = out_param call_param1 -// CHECK:STDOUT: %return: ref @G.%T.as_type.loc13_31.1 (%T.as_type) = return_slot %return.param +// CHECK:STDOUT: %c: @G.%Class.loc13_38.1 (%Class.c74ef3.1) = wrapper_binding c, %c.param +// CHECK:STDOUT: %return.param: ref @G.%T.as_type.loc13_38.1 (%T.as_type) = out_param call_param1 +// CHECK:STDOUT: %return: ref @G.%T.as_type.loc13_38.1 (%T.as_type) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] { -// CHECK:STDOUT: %U.patt.loc17_7.1: %pattern_type.e81 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc17_7.2 (constants.%U.patt.fe6)] -// CHECK:STDOUT: %c.param_patt.loc17_22.1: @H.%pattern_type.loc17_22 (%pattern_type.6b8c16.2) = value_param_pattern [symbolic = %c.param_patt.loc17_22.2 (constants.%c.param_patt.7092f5.2)] -// CHECK:STDOUT: %c.patt.loc17_22.1: @H.%pattern_type.loc17_22 (%pattern_type.6b8c16.2) = at_binding_pattern c, %c.param_patt.loc17_22.1 [symbolic = %c.patt.loc17_22.2 (constants.%c.patt.39adc7.2)] -// CHECK:STDOUT: %return.param_patt.loc17_37.1: @H.%pattern_type.loc17_37 (%pattern_type.2c66b4.3) = out_param_pattern [symbolic = %return.param_patt.loc17_37.2 (constants.%return.param_patt.bf4475.3)] -// CHECK:STDOUT: %return.patt.loc17_34.1: @H.%pattern_type.loc17_37 (%pattern_type.2c66b4.3) = return_slot_pattern %return.param_patt.loc17_37.1, %.loc17_37.3 [symbolic = %return.patt.loc17_34.2 (constants.%return.patt.f449d7.2)] +// CHECK:STDOUT: %U.patt.loc17_15.1: %pattern_type.e81 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc17_15.2 (constants.%U.patt.fe6)] +// CHECK:STDOUT: %c.param_patt.loc17_29.1: @H.%pattern_type.loc17_29 (%pattern_type.6b8c16.2) = value_param_pattern [symbolic = %c.param_patt.loc17_29.2 (constants.%c.param_patt.7092f5.2)] +// CHECK:STDOUT: %c.patt.loc17_29.1: @H.%pattern_type.loc17_29 (%pattern_type.6b8c16.2) = at_binding_pattern c, %c.param_patt.loc17_29.1 [symbolic = %c.patt.loc17_29.2 (constants.%c.patt.39adc7.2)] +// CHECK:STDOUT: %return.param_patt.loc17_44.1: @H.%pattern_type.loc17_44 (%pattern_type.2c66b4.3) = out_param_pattern [symbolic = %return.param_patt.loc17_44.2 (constants.%return.param_patt.bf4475.3)] +// CHECK:STDOUT: %return.patt.loc17_41.1: @H.%pattern_type.loc17_44 (%pattern_type.2c66b4.3) = return_slot_pattern %return.param_patt.loc17_44.1, %.loc17_44.3 [symbolic = %return.patt.loc17_41.2 (constants.%return.patt.f449d7.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref.loc17_37: %Copy.type = name_ref U, %U.loc17_7.2 [symbolic = %U.loc17_7.1 (constants.%U.f84)] -// CHECK:STDOUT: %U.as_type.loc17_37: type = facet_access_type %U.ref.loc17_37 [symbolic = %U.as_type.loc17_31.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %.loc17_37.3: type = converted %U.ref.loc17_37, %U.as_type.loc17_37 [symbolic = %U.as_type.loc17_31.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %.loc17_37.4: Core.Form = init_form %.loc17_37.3 [symbolic = %.loc17_37.2 (constants.%.1ce700.3)] -// CHECK:STDOUT: %.loc17_14: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { +// CHECK:STDOUT: %U.ref.loc17_44: %Copy.type = name_ref U, %U.loc17_15.2 [symbolic = %U.loc17_15.1 (constants.%U.f84)] +// CHECK:STDOUT: %U.as_type.loc17_44: type = facet_access_type %U.ref.loc17_44 [symbolic = %U.as_type.loc17_38.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc17_44.3: type = converted %U.ref.loc17_44, %U.as_type.loc17_44 [symbolic = %U.as_type.loc17_38.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc17_44.4: Core.Form = init_form %.loc17_44.3 [symbolic = %.loc17_44.2 (constants.%.1ce700.3)] +// CHECK:STDOUT: %.loc17_21: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc17_7.2: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc17_7.1 (constants.%U.f84)] -// CHECK:STDOUT: %c.param: @H.%Class.loc17_31.1 (%Class.c74ef3.2) = value_param call_param0 -// CHECK:STDOUT: %.loc17_31.1: type = splice_block %Class.loc17_31.2 [symbolic = %Class.loc17_31.1 (constants.%Class.c74ef3.2)] { +// CHECK:STDOUT: %U.loc17_15.2: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc17_15.1 (constants.%U.f84)] +// CHECK:STDOUT: %c.param: @H.%Class.loc17_38.1 (%Class.c74ef3.2) = value_param call_param0 +// CHECK:STDOUT: %.loc17_38.1: type = splice_block %Class.loc17_38.2 [symbolic = %Class.loc17_38.1 (constants.%Class.c74ef3.2)] { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] -// CHECK:STDOUT: %U.ref.loc17_30: %Copy.type = name_ref U, %U.loc17_7.2 [symbolic = %U.loc17_7.1 (constants.%U.f84)] -// CHECK:STDOUT: %U.as_type.loc17_31.2: type = facet_access_type %U.ref.loc17_30 [symbolic = %U.as_type.loc17_31.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %.loc17_31.2: type = converted %U.ref.loc17_30, %U.as_type.loc17_31.2 [symbolic = %U.as_type.loc17_31.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %Class.loc17_31.2: type = class_type @Class, @Class(constants.%U.as_type.c1c) [symbolic = %Class.loc17_31.1 (constants.%Class.c74ef3.2)] +// CHECK:STDOUT: %U.ref.loc17_37: %Copy.type = name_ref U, %U.loc17_15.2 [symbolic = %U.loc17_15.1 (constants.%U.f84)] +// CHECK:STDOUT: %U.as_type.loc17_38.2: type = facet_access_type %U.ref.loc17_37 [symbolic = %U.as_type.loc17_38.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc17_38.2: type = converted %U.ref.loc17_37, %U.as_type.loc17_38.2 [symbolic = %U.as_type.loc17_38.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %Class.loc17_38.2: type = class_type @Class, @Class(constants.%U.as_type.c1c) [symbolic = %Class.loc17_38.1 (constants.%Class.c74ef3.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %c: @H.%Class.loc17_31.1 (%Class.c74ef3.2) = wrapper_binding c, %c.param -// CHECK:STDOUT: %return.param: ref @H.%U.as_type.loc17_31.1 (%U.as_type.c1c) = out_param call_param1 -// CHECK:STDOUT: %return: ref @H.%U.as_type.loc17_31.1 (%U.as_type.c1c) = return_slot %return.param +// CHECK:STDOUT: %c: @H.%Class.loc17_38.1 (%Class.c74ef3.2) = wrapper_binding c, %c.param +// CHECK:STDOUT: %return.param: ref @H.%U.as_type.loc17_38.1 (%U.as_type.c1c) = out_param call_param1 +// CHECK:STDOUT: %return: ref @H.%U.as_type.loc17_38.1 (%U.as_type.c1c) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -274,86 +274,86 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc13_7.2: %Copy.type) { -// CHECK:STDOUT: %T.patt.loc13_7.2: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt.fe6)] -// CHECK:STDOUT: %T.loc13_7.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc13_31.1: type = facet_access_type %T.loc13_7.1 [symbolic = %T.as_type.loc13_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %Class.loc13_31.1: type = class_type @Class, @Class(%T.as_type.loc13_31.1) [symbolic = %Class.loc13_31.1 (constants.%Class.c74ef3.1)] -// CHECK:STDOUT: %pattern_type.loc13_22: type = pattern_type %Class.loc13_31.1 [symbolic = %pattern_type.loc13_22 (constants.%pattern_type.6b8c16.1)] -// CHECK:STDOUT: %c.param_patt.loc13_22.2: @G.%pattern_type.loc13_22 (%pattern_type.6b8c16.1) = value_param_pattern [symbolic = %c.param_patt.loc13_22.2 (constants.%c.param_patt.7092f5.1)] -// CHECK:STDOUT: %c.patt.loc13_22.2: @G.%pattern_type.loc13_22 (%pattern_type.6b8c16.1) = at_binding_pattern c, %c.param_patt.loc13_22.2 [symbolic = %c.patt.loc13_22.2 (constants.%c.patt.39adc7.1)] -// CHECK:STDOUT: %.loc13_37.2: Core.Form = init_form %T.as_type.loc13_31.1 [symbolic = %.loc13_37.2 (constants.%.1ce700.2)] -// CHECK:STDOUT: %pattern_type.loc13_37: type = pattern_type %T.as_type.loc13_31.1 [symbolic = %pattern_type.loc13_37 (constants.%pattern_type.2c66b4.2)] -// CHECK:STDOUT: %return.param_patt.loc13_37.2: @G.%pattern_type.loc13_37 (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc13_37.2 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc13_34.2: @G.%pattern_type.loc13_37 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc13_37.2, %T.as_type.loc13_31.1 [symbolic = %return.patt.loc13_34.2 (constants.%return.patt.f449d7.1)] +// CHECK:STDOUT: generic fn @G(%T.loc13_15.2: %Copy.type) { +// CHECK:STDOUT: %T.patt.loc13_15.2: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.fe6)] +// CHECK:STDOUT: %T.loc13_15.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc13_38.1: type = facet_access_type %T.loc13_15.1 [symbolic = %T.as_type.loc13_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %Class.loc13_38.1: type = class_type @Class, @Class(%T.as_type.loc13_38.1) [symbolic = %Class.loc13_38.1 (constants.%Class.c74ef3.1)] +// CHECK:STDOUT: %pattern_type.loc13_29: type = pattern_type %Class.loc13_38.1 [symbolic = %pattern_type.loc13_29 (constants.%pattern_type.6b8c16.1)] +// CHECK:STDOUT: %c.param_patt.loc13_29.2: @G.%pattern_type.loc13_29 (%pattern_type.6b8c16.1) = value_param_pattern [symbolic = %c.param_patt.loc13_29.2 (constants.%c.param_patt.7092f5.1)] +// CHECK:STDOUT: %c.patt.loc13_29.2: @G.%pattern_type.loc13_29 (%pattern_type.6b8c16.1) = at_binding_pattern c, %c.param_patt.loc13_29.2 [symbolic = %c.patt.loc13_29.2 (constants.%c.patt.39adc7.1)] +// CHECK:STDOUT: %.loc13_44.2: Core.Form = init_form %T.as_type.loc13_38.1 [symbolic = %.loc13_44.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %pattern_type.loc13_44: type = pattern_type %T.as_type.loc13_38.1 [symbolic = %pattern_type.loc13_44 (constants.%pattern_type.2c66b4.2)] +// CHECK:STDOUT: %return.param_patt.loc13_44.2: @G.%pattern_type.loc13_44 (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc13_44.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc13_41.2: @G.%pattern_type.loc13_44 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc13_44.2, %T.as_type.loc13_38.1 [symbolic = %return.patt.loc13_41.2 (constants.%return.patt.f449d7.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc13: = require_complete_type %Class.loc13_31.1 [symbolic = %require_complete.loc13 (constants.%require_complete.3b48fd.1)] -// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc13_31.1, %T.as_type.loc13_31.1 [symbolic = %Class.elem (constants.%Class.elem.14b853.1)] -// CHECK:STDOUT: %require_complete.loc14: = require_complete_type %T.as_type.loc13_31.1 [symbolic = %require_complete.loc14 (constants.%require_complete.d83f06.1)] -// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%T.loc13_7.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.2)] -// CHECK:STDOUT: %.loc14_11.5: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc13_7.1 [symbolic = %.loc14_11.5 (constants.%.c29330.1)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc13_7.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c332.1)] +// CHECK:STDOUT: %require_complete.loc13: = require_complete_type %Class.loc13_38.1 [symbolic = %require_complete.loc13 (constants.%require_complete.3b48fd.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc13_38.1, %T.as_type.loc13_38.1 [symbolic = %Class.elem (constants.%Class.elem.14b853.1)] +// CHECK:STDOUT: %require_complete.loc14: = require_complete_type %T.as_type.loc13_38.1 [symbolic = %require_complete.loc14 (constants.%require_complete.d83f06.1)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%T.loc13_15.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.2)] +// CHECK:STDOUT: %.loc14_11.5: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc13_15.1 [symbolic = %.loc14_11.5 (constants.%.c29330.1)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc13_15.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c332.1)] // CHECK:STDOUT: %impl.elem0.loc14_11.2: @G.%.loc14_11.5 (%.c29330.1) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_11.2 (constants.%impl.elem0.bd2456.1)] -// CHECK:STDOUT: %specific_impl_fn.loc14_11.2: = specific_impl_function %impl.elem0.loc14_11.2, @Copy.WithSelf.Op(%T.loc13_7.1) [symbolic = %specific_impl_fn.loc14_11.2 (constants.%specific_impl_fn.e2af7e.1)] +// CHECK:STDOUT: %specific_impl_fn.loc14_11.2: = specific_impl_function %impl.elem0.loc14_11.2, @Copy.WithSelf.Op(%T.loc13_15.1) [symbolic = %specific_impl_fn.loc14_11.2 (constants.%specific_impl_fn.e2af7e.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%c.param: @G.%Class.loc13_31.1 (%Class.c74ef3.1)) -> out %return.param: @G.%T.as_type.loc13_31.1 (%T.as_type) { +// CHECK:STDOUT: fn(%c.param: @G.%Class.loc13_38.1 (%Class.c74ef3.1)) -> out %return.param: @G.%T.as_type.loc13_38.1 (%T.as_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: @G.%Class.loc13_31.1 (%Class.c74ef3.1) = name_ref c, %c +// CHECK:STDOUT: %c.ref: @G.%Class.loc13_38.1 (%Class.c74ef3.1) = name_ref c, %c // CHECK:STDOUT: %x.ref: @G.%Class.elem (%Class.elem.14b853.1) = name_ref x, @Class.%.loc6 [concrete = @Class.%.loc6] -// CHECK:STDOUT: %.loc14_11.1: ref @G.%T.as_type.loc13_31.1 (%T.as_type) = class_element_access %c.ref, element0 -// CHECK:STDOUT: %.loc14_11.2: @G.%T.as_type.loc13_31.1 (%T.as_type) = acquire_value %.loc14_11.1 +// CHECK:STDOUT: %.loc14_11.1: ref @G.%T.as_type.loc13_38.1 (%T.as_type) = class_element_access %c.ref, element0 +// CHECK:STDOUT: %.loc14_11.2: @G.%T.as_type.loc13_38.1 (%T.as_type) = acquire_value %.loc14_11.1 // CHECK:STDOUT: %impl.elem0.loc14_11.1: @G.%.loc14_11.5 (%.c29330.1) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c332.1, element0 [symbolic = %impl.elem0.loc14_11.2 (constants.%impl.elem0.bd2456.1)] // CHECK:STDOUT: %bound_method.loc14_11.1: = bound_method %.loc14_11.2, %impl.elem0.loc14_11.1 -// CHECK:STDOUT: %.loc14_11.3: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc13_7.1 (constants.%T.f84)] -// CHECK:STDOUT: %.loc14_11.4: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc13_7.1 (constants.%T.f84)] +// CHECK:STDOUT: %.loc14_11.3: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc13_15.1 (constants.%T.f84)] +// CHECK:STDOUT: %.loc14_11.4: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc13_15.1 (constants.%T.f84)] // CHECK:STDOUT: %specific_impl_fn.loc14_11.1: = specific_impl_function %impl.elem0.loc14_11.1, @Copy.WithSelf.Op(constants.%T.f84) [symbolic = %specific_impl_fn.loc14_11.2 (constants.%specific_impl_fn.e2af7e.1)] // CHECK:STDOUT: %bound_method.loc14_11.2: = bound_method %.loc14_11.2, %specific_impl_fn.loc14_11.1 -// CHECK:STDOUT: %.loc13_37.1: ref @G.%T.as_type.loc13_31.1 (%T.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @G.%T.as_type.loc13_31.1 (%T.as_type) to %.loc13_37.1 = call %bound_method.loc14_11.2(%.loc14_11.2) +// CHECK:STDOUT: %.loc13_44.1: ref @G.%T.as_type.loc13_38.1 (%T.as_type) = splice_block %return.param {} +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @G.%T.as_type.loc13_38.1 (%T.as_type) to %.loc13_44.1 = call %bound_method.loc14_11.2(%.loc14_11.2) // CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @H(%U.loc17_7.2: %Copy.type) { -// CHECK:STDOUT: %U.patt.loc17_7.2: %pattern_type.e81 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc17_7.2 (constants.%U.patt.fe6)] -// CHECK:STDOUT: %U.loc17_7.1: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc17_7.1 (constants.%U.f84)] -// CHECK:STDOUT: %U.as_type.loc17_31.1: type = facet_access_type %U.loc17_7.1 [symbolic = %U.as_type.loc17_31.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %Class.loc17_31.1: type = class_type @Class, @Class(%U.as_type.loc17_31.1) [symbolic = %Class.loc17_31.1 (constants.%Class.c74ef3.2)] -// CHECK:STDOUT: %pattern_type.loc17_22: type = pattern_type %Class.loc17_31.1 [symbolic = %pattern_type.loc17_22 (constants.%pattern_type.6b8c16.2)] -// CHECK:STDOUT: %c.param_patt.loc17_22.2: @H.%pattern_type.loc17_22 (%pattern_type.6b8c16.2) = value_param_pattern [symbolic = %c.param_patt.loc17_22.2 (constants.%c.param_patt.7092f5.2)] -// CHECK:STDOUT: %c.patt.loc17_22.2: @H.%pattern_type.loc17_22 (%pattern_type.6b8c16.2) = at_binding_pattern c, %c.param_patt.loc17_22.2 [symbolic = %c.patt.loc17_22.2 (constants.%c.patt.39adc7.2)] -// CHECK:STDOUT: %.loc17_37.2: Core.Form = init_form %U.as_type.loc17_31.1 [symbolic = %.loc17_37.2 (constants.%.1ce700.3)] -// CHECK:STDOUT: %pattern_type.loc17_37: type = pattern_type %U.as_type.loc17_31.1 [symbolic = %pattern_type.loc17_37 (constants.%pattern_type.2c66b4.3)] -// CHECK:STDOUT: %return.param_patt.loc17_37.2: @H.%pattern_type.loc17_37 (%pattern_type.2c66b4.3) = out_param_pattern [symbolic = %return.param_patt.loc17_37.2 (constants.%return.param_patt.bf4475.3)] -// CHECK:STDOUT: %return.patt.loc17_34.2: @H.%pattern_type.loc17_37 (%pattern_type.2c66b4.3) = return_slot_pattern %return.param_patt.loc17_37.2, %U.as_type.loc17_31.1 [symbolic = %return.patt.loc17_34.2 (constants.%return.patt.f449d7.2)] +// CHECK:STDOUT: generic fn @H(%U.loc17_15.2: %Copy.type) { +// CHECK:STDOUT: %U.patt.loc17_15.2: %pattern_type.e81 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc17_15.2 (constants.%U.patt.fe6)] +// CHECK:STDOUT: %U.loc17_15.1: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc17_15.1 (constants.%U.f84)] +// CHECK:STDOUT: %U.as_type.loc17_38.1: type = facet_access_type %U.loc17_15.1 [symbolic = %U.as_type.loc17_38.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %Class.loc17_38.1: type = class_type @Class, @Class(%U.as_type.loc17_38.1) [symbolic = %Class.loc17_38.1 (constants.%Class.c74ef3.2)] +// CHECK:STDOUT: %pattern_type.loc17_29: type = pattern_type %Class.loc17_38.1 [symbolic = %pattern_type.loc17_29 (constants.%pattern_type.6b8c16.2)] +// CHECK:STDOUT: %c.param_patt.loc17_29.2: @H.%pattern_type.loc17_29 (%pattern_type.6b8c16.2) = value_param_pattern [symbolic = %c.param_patt.loc17_29.2 (constants.%c.param_patt.7092f5.2)] +// CHECK:STDOUT: %c.patt.loc17_29.2: @H.%pattern_type.loc17_29 (%pattern_type.6b8c16.2) = at_binding_pattern c, %c.param_patt.loc17_29.2 [symbolic = %c.patt.loc17_29.2 (constants.%c.patt.39adc7.2)] +// CHECK:STDOUT: %.loc17_44.2: Core.Form = init_form %U.as_type.loc17_38.1 [symbolic = %.loc17_44.2 (constants.%.1ce700.3)] +// CHECK:STDOUT: %pattern_type.loc17_44: type = pattern_type %U.as_type.loc17_38.1 [symbolic = %pattern_type.loc17_44 (constants.%pattern_type.2c66b4.3)] +// CHECK:STDOUT: %return.param_patt.loc17_44.2: @H.%pattern_type.loc17_44 (%pattern_type.2c66b4.3) = out_param_pattern [symbolic = %return.param_patt.loc17_44.2 (constants.%return.param_patt.bf4475.3)] +// CHECK:STDOUT: %return.patt.loc17_41.2: @H.%pattern_type.loc17_44 (%pattern_type.2c66b4.3) = return_slot_pattern %return.param_patt.loc17_44.2, %U.as_type.loc17_38.1 [symbolic = %return.patt.loc17_41.2 (constants.%return.patt.f449d7.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc17: = require_complete_type %Class.loc17_31.1 [symbolic = %require_complete.loc17 (constants.%require_complete.3b48fd.2)] -// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc17_31.1, %U.as_type.loc17_31.1 [symbolic = %Class.elem (constants.%Class.elem.14b853.2)] -// CHECK:STDOUT: %require_complete.loc18: = require_complete_type %U.as_type.loc17_31.1 [symbolic = %require_complete.loc18 (constants.%require_complete.d83f06.2)] -// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%U.loc17_7.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.3)] -// CHECK:STDOUT: %.loc18_11.5: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc17_7.1 [symbolic = %.loc18_11.5 (constants.%.c29330.2)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %U.loc17_7.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c332.2)] +// CHECK:STDOUT: %require_complete.loc17: = require_complete_type %Class.loc17_38.1 [symbolic = %require_complete.loc17 (constants.%require_complete.3b48fd.2)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc17_38.1, %U.as_type.loc17_38.1 [symbolic = %Class.elem (constants.%Class.elem.14b853.2)] +// CHECK:STDOUT: %require_complete.loc18: = require_complete_type %U.as_type.loc17_38.1 [symbolic = %require_complete.loc18 (constants.%require_complete.d83f06.2)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%U.loc17_15.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.3)] +// CHECK:STDOUT: %.loc18_11.5: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc17_15.1 [symbolic = %.loc18_11.5 (constants.%.c29330.2)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %U.loc17_15.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c332.2)] // CHECK:STDOUT: %impl.elem0.loc18_11.2: @H.%.loc18_11.5 (%.c29330.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_11.2 (constants.%impl.elem0.bd2456.2)] -// CHECK:STDOUT: %specific_impl_fn.loc18_11.2: = specific_impl_function %impl.elem0.loc18_11.2, @Copy.WithSelf.Op(%U.loc17_7.1) [symbolic = %specific_impl_fn.loc18_11.2 (constants.%specific_impl_fn.e2af7e.2)] +// CHECK:STDOUT: %specific_impl_fn.loc18_11.2: = specific_impl_function %impl.elem0.loc18_11.2, @Copy.WithSelf.Op(%U.loc17_15.1) [symbolic = %specific_impl_fn.loc18_11.2 (constants.%specific_impl_fn.e2af7e.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%c.param: @H.%Class.loc17_31.1 (%Class.c74ef3.2)) -> out %return.param: @H.%U.as_type.loc17_31.1 (%U.as_type.c1c) { +// CHECK:STDOUT: fn(%c.param: @H.%Class.loc17_38.1 (%Class.c74ef3.2)) -> out %return.param: @H.%U.as_type.loc17_38.1 (%U.as_type.c1c) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: @H.%Class.loc17_31.1 (%Class.c74ef3.2) = name_ref c, %c +// CHECK:STDOUT: %c.ref: @H.%Class.loc17_38.1 (%Class.c74ef3.2) = name_ref c, %c // CHECK:STDOUT: %x.ref: @H.%Class.elem (%Class.elem.14b853.2) = name_ref x, @Class.%.loc6 [concrete = @Class.%.loc6] -// CHECK:STDOUT: %.loc18_11.1: ref @H.%U.as_type.loc17_31.1 (%U.as_type.c1c) = class_element_access %c.ref, element0 -// CHECK:STDOUT: %.loc18_11.2: @H.%U.as_type.loc17_31.1 (%U.as_type.c1c) = acquire_value %.loc18_11.1 +// CHECK:STDOUT: %.loc18_11.1: ref @H.%U.as_type.loc17_38.1 (%U.as_type.c1c) = class_element_access %c.ref, element0 +// CHECK:STDOUT: %.loc18_11.2: @H.%U.as_type.loc17_38.1 (%U.as_type.c1c) = acquire_value %.loc18_11.1 // CHECK:STDOUT: %impl.elem0.loc18_11.1: @H.%.loc18_11.5 (%.c29330.2) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c332.2, element0 [symbolic = %impl.elem0.loc18_11.2 (constants.%impl.elem0.bd2456.2)] // CHECK:STDOUT: %bound_method.loc18_11.1: = bound_method %.loc18_11.2, %impl.elem0.loc18_11.1 -// CHECK:STDOUT: %.loc18_11.3: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc17_7.1 (constants.%U.f84)] -// CHECK:STDOUT: %.loc18_11.4: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc17_7.1 (constants.%U.f84)] +// CHECK:STDOUT: %.loc18_11.3: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc17_15.1 (constants.%U.f84)] +// CHECK:STDOUT: %.loc18_11.4: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc17_15.1 (constants.%U.f84)] // CHECK:STDOUT: %specific_impl_fn.loc18_11.1: = specific_impl_function %impl.elem0.loc18_11.1, @Copy.WithSelf.Op(constants.%U.f84) [symbolic = %specific_impl_fn.loc18_11.2 (constants.%specific_impl_fn.e2af7e.2)] // CHECK:STDOUT: %bound_method.loc18_11.2: = bound_method %.loc18_11.2, %specific_impl_fn.loc18_11.1 -// CHECK:STDOUT: %.loc17_37.1: ref @H.%U.as_type.loc17_31.1 (%U.as_type.c1c) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @H.%U.as_type.loc17_31.1 (%U.as_type.c1c) to %.loc17_37.1 = call %bound_method.loc18_11.2(%.loc18_11.2) +// CHECK:STDOUT: %.loc17_44.1: ref @H.%U.as_type.loc17_38.1 (%U.as_type.c1c) = splice_block %return.param {} +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @H.%U.as_type.loc17_38.1 (%U.as_type.c1c) to %.loc17_44.1 = call %bound_method.loc18_11.2(%.loc18_11.2) // CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -394,17 +394,17 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T.f84) { -// CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt.fe6 -// CHECK:STDOUT: %T.loc13_7.1 => constants.%T.f84 -// CHECK:STDOUT: %T.as_type.loc13_31.1 => constants.%T.as_type -// CHECK:STDOUT: %Class.loc13_31.1 => constants.%Class.c74ef3.1 -// CHECK:STDOUT: %pattern_type.loc13_22 => constants.%pattern_type.6b8c16.1 -// CHECK:STDOUT: %c.param_patt.loc13_22.2 => constants.%c.param_patt.7092f5.1 -// CHECK:STDOUT: %c.patt.loc13_22.2 => constants.%c.patt.39adc7.1 -// CHECK:STDOUT: %.loc13_37.2 => constants.%.1ce700.2 -// CHECK:STDOUT: %pattern_type.loc13_37 => constants.%pattern_type.2c66b4.2 -// CHECK:STDOUT: %return.param_patt.loc13_37.2 => constants.%return.param_patt.bf4475.2 -// CHECK:STDOUT: %return.patt.loc13_34.2 => constants.%return.patt.f449d7.1 +// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt.fe6 +// CHECK:STDOUT: %T.loc13_15.1 => constants.%T.f84 +// CHECK:STDOUT: %T.as_type.loc13_38.1 => constants.%T.as_type +// CHECK:STDOUT: %Class.loc13_38.1 => constants.%Class.c74ef3.1 +// CHECK:STDOUT: %pattern_type.loc13_29 => constants.%pattern_type.6b8c16.1 +// CHECK:STDOUT: %c.param_patt.loc13_29.2 => constants.%c.param_patt.7092f5.1 +// CHECK:STDOUT: %c.patt.loc13_29.2 => constants.%c.patt.39adc7.1 +// CHECK:STDOUT: %.loc13_44.2 => constants.%.1ce700.2 +// CHECK:STDOUT: %pattern_type.loc13_44 => constants.%pattern_type.2c66b4.2 +// CHECK:STDOUT: %return.param_patt.loc13_44.2 => constants.%return.param_patt.bf4475.2 +// CHECK:STDOUT: %return.patt.loc13_41.2 => constants.%return.patt.f449d7.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%U.as_type.c1c) { @@ -422,16 +422,16 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @H(constants.%U.f84) { -// CHECK:STDOUT: %U.patt.loc17_7.2 => constants.%U.patt.fe6 -// CHECK:STDOUT: %U.loc17_7.1 => constants.%U.f84 -// CHECK:STDOUT: %U.as_type.loc17_31.1 => constants.%U.as_type.c1c -// CHECK:STDOUT: %Class.loc17_31.1 => constants.%Class.c74ef3.2 -// CHECK:STDOUT: %pattern_type.loc17_22 => constants.%pattern_type.6b8c16.2 -// CHECK:STDOUT: %c.param_patt.loc17_22.2 => constants.%c.param_patt.7092f5.2 -// CHECK:STDOUT: %c.patt.loc17_22.2 => constants.%c.patt.39adc7.2 -// CHECK:STDOUT: %.loc17_37.2 => constants.%.1ce700.3 -// CHECK:STDOUT: %pattern_type.loc17_37 => constants.%pattern_type.2c66b4.3 -// CHECK:STDOUT: %return.param_patt.loc17_37.2 => constants.%return.param_patt.bf4475.3 -// CHECK:STDOUT: %return.patt.loc17_34.2 => constants.%return.patt.f449d7.2 +// CHECK:STDOUT: %U.patt.loc17_15.2 => constants.%U.patt.fe6 +// CHECK:STDOUT: %U.loc17_15.1 => constants.%U.f84 +// CHECK:STDOUT: %U.as_type.loc17_38.1 => constants.%U.as_type.c1c +// CHECK:STDOUT: %Class.loc17_38.1 => constants.%Class.c74ef3.2 +// CHECK:STDOUT: %pattern_type.loc17_29 => constants.%pattern_type.6b8c16.2 +// CHECK:STDOUT: %c.param_patt.loc17_29.2 => constants.%c.param_patt.7092f5.2 +// CHECK:STDOUT: %c.patt.loc17_29.2 => constants.%c.patt.39adc7.2 +// CHECK:STDOUT: %.loc17_44.2 => constants.%.1ce700.3 +// CHECK:STDOUT: %pattern_type.loc17_44 => constants.%pattern_type.2c66b4.3 +// CHECK:STDOUT: %return.param_patt.loc17_44.2 => constants.%return.param_patt.bf4475.3 +// CHECK:STDOUT: %return.patt.loc17_41.2 => constants.%return.patt.f449d7.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/generic_vs_params.carbon b/toolchain/check/testdata/class/generic/generic_vs_params.carbon index f75253492ece..4560ff3fea05 100644 --- a/toolchain/check/testdata/class/generic/generic_vs_params.carbon +++ b/toolchain/check/testdata/class/generic/generic_vs_params.carbon @@ -18,11 +18,11 @@ library "[[@TEST_NAME]]"; class NotGenericNoParams {} class NotGenericButParams() {} -class GenericAndParams(T:! type) {} +class GenericAndParams(T: type) {} -class C(T:! type) { +class C(T: type) { class GenericNoParams {} - class GenericAndParams(U:! type) {} + class GenericAndParams(U: type) {} } class X {} @@ -38,23 +38,23 @@ var e: C(X).GenericAndParams(X) = {}; library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_non_generic_implicit_params.carbon:[[@LINE+4]]:9: error: parameters of generic types must be constant [GenericParamMustBeConstant] -// CHECK:STDERR: class A[T: type]() {} -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: class A[runtime T: type]() {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -class A[T: type]() {} +class A[runtime T: type]() {} // --- fail_non_generic_params.carbon library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_non_generic_params.carbon:[[@LINE+4]]:9: error: parameters of generic types must be constant [GenericParamMustBeConstant] -// CHECK:STDERR: class A(T: type) {} -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: class A(runtime T: type) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -class A(T: type) {} +class A(runtime T: type) {} // This is testing a use of the invalid type. -fn F(T:! type) { +fn F(generic T: type) { A(T); } @@ -73,10 +73,10 @@ class Foo[]; library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_implicit_params_only.carbon:[[@LINE+4]]:10: error: expected explicit parameters after implicit parameters [GenericMissingExplicitParameters] -// CHECK:STDERR: class Foo[T:! type]; -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: class Foo[T: type]; +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -class Foo[T:! type]; +class Foo[T: type]; // CHECK:STDOUT: --- params.carbon // CHECK:STDOUT: @@ -152,18 +152,18 @@ class Foo[T:! type]; // CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.aa5 = class_decl @GenericAndParams.loc6 [concrete = constants.%GenericAndParams.generic.128] { // CHECK:STDOUT: %T.patt.loc6_25.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_25.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_28.1: type = splice_block %.loc6_28.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_27.1: type = splice_block %.loc6_27.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_28.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_27.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_25.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_25.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc8_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_10.1 (constants.%T)] // CHECK:STDOUT: } @@ -271,9 +271,9 @@ class Foo[T:! type]; // CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.c37) = class_decl @GenericAndParams.loc10 [symbolic = @C.%GenericAndParams.generic (constants.%GenericAndParams.generic.6c8)] { // CHECK:STDOUT: %U.patt.loc10_27.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc10_27.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_30.1: type = splice_block %.loc10_30.2 [concrete = type] { +// CHECK:STDOUT: %.loc10_29.1: type = splice_block %.loc10_29.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc10_30.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc10_29.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc10_27.2: type = symbolic_binding U, 1 [symbolic = %U.loc10_27.1 (constants.%U)] // CHECK:STDOUT: } @@ -443,13 +443,13 @@ class Foo[T:! type]; // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: %A.type = class_decl @A [concrete = constants.%A.generic] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc11_7.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc11_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_10.1: type = splice_block %.loc11_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc11_17.1: type = splice_block %.loc11_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc11_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc11_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc11_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc11_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc11_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc11_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -461,16 +461,16 @@ class Foo[T:! type]; // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc11_7.2: type) { -// CHECK:STDOUT: %T.patt.loc11_7.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc11_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc11_7.1 (constants.%T)] +// CHECK:STDOUT: generic fn @F(%T.loc11_15.2: type) { +// CHECK:STDOUT: %T.patt.loc11_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc11_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc11_15.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A.generic] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_7.2 [symbolic = %T.loc11_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_15.2 [symbolic = %T.loc11_15.1 (constants.%T)] // CHECK:STDOUT: %A: type = class_type @A [concrete = constants.%A] // CHECK:STDOUT: return // CHECK:STDOUT: @@ -479,8 +479,8 @@ class Foo[T:! type]; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc11_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc11_7.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc11_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc11_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_implicit_params_only_empty.carbon @@ -518,9 +518,9 @@ class Foo[T:! type]; // CHECK:STDOUT: %Foo.decl: %Foo.type = class_decl @Foo [concrete = constants.%Foo.generic] { // CHECK:STDOUT: %T.patt.loc8_12.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_12.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_15.1: type = splice_block %.loc8_15.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_14.1: type = splice_block %.loc8_14.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_15.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_14.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_12.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_12.1 (constants.%T)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index eb2c75173406..6b2a09e4f89b 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -16,9 +16,9 @@ library "[[@TEST_NAME]]"; -class Class(T:! type); +class Class(T: type); -class CompleteClass(T:! type) { +class CompleteClass(T: type) { var n: i32; fn F() -> i32 { return 0; } } @@ -29,7 +29,7 @@ fn F() -> CompleteClass(i32); impl library "[[@TEST_NAME]]"; -class Class(T:! type) { +class Class(T: type) { var x: T; } @@ -73,14 +73,14 @@ fn Use() { impl library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+8]]:13: error: redeclaration differs at parameter 1 [RedeclParamDiffers] -// CHECK:STDERR: class Class(U:! type) { -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: class Class(U: type) { +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE-5]]:1: in import [InImport] // CHECK:STDERR: foo.carbon:4:13: note: previous declaration's corresponding parameter here [RedeclParamPrevious] -// CHECK:STDERR: class Class(T:! type); -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: class Class(T: type); +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -class Class(U:! type) { +class Class(U: type) { // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+4]]:10: error: name `T` not found [NameNotFound] // CHECK:STDERR: var x: T; // CHECK:STDERR: ^ @@ -164,18 +164,18 @@ class Class(U:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CompleteClass.decl: %CompleteClass.type = class_decl @CompleteClass [concrete = constants.%CompleteClass.generic] { // CHECK:STDOUT: %T.patt.loc6_22.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_22.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_25.1: type = splice_block %.loc6_25.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_24.1: type = splice_block %.loc6_24.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_25.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_24.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_22.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_22.1 (constants.%T)] // CHECK:STDOUT: } @@ -368,9 +368,9 @@ class Class(U:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.1 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: } @@ -969,9 +969,9 @@ class Class(U:! type) { // CHECK:STDOUT: %Class.decl: %Class.type.3256be.2 = class_decl @Class.loc12 [concrete = constants.%Class.generic.4154f7.2] { // CHECK:STDOUT: %U.patt.loc12_14.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_14.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_17.1: type = splice_block %.loc12_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc12_16.1: type = splice_block %.loc12_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc12_14.2: type = symbolic_binding U, 0 [symbolic = %U.loc12_14.1 (constants.%U)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index 5097a67bdb4d..8ac9954e48ec 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -14,12 +14,12 @@ library "[[@TEST_NAME]]"; -class Class(T:! Core.Destroy) { +class Class(T: Core.Destroy) { var k: T; } //@dump-sem-ir-begin -fn InitFromStructGeneric(T:! Core.Copy & Core.Destroy, x: T) -> T { +fn InitFromStructGeneric(generic T: Core.Copy & Core.Destroy, x: T) -> T { var v: Class(T) = {.k = x}; return v.k; } @@ -34,12 +34,12 @@ fn InitFromStructSpecific(x: i32) -> i32 { library "[[@TEST_NAME]]"; -class Adapt(T:! type) { +class Adapt(T: type) { adapt T; } //@dump-sem-ir-begin -fn InitFromAdaptedGeneric(T:! Core.Copy, x: T) -> T { +fn InitFromAdaptedGeneric(generic T: Core.Copy, x: T) -> T { return (x as Adapt(T)) as T; } @@ -162,38 +162,38 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %InitFromStructGeneric.decl: %InitFromStructGeneric.type = fn_decl @InitFromStructGeneric [concrete = constants.%InitFromStructGeneric] { -// CHECK:STDOUT: %T.patt.loc9_27.1: %pattern_type.709 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_27.2 (constants.%T.patt.478)] -// CHECK:STDOUT: %x.param_patt.loc9_57.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = value_param_pattern [symbolic = %x.param_patt.loc9_57.2 (constants.%x.param_patt.e3c)] -// CHECK:STDOUT: %x.patt.loc9_57.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = at_binding_pattern x, %x.param_patt.loc9_57.1 [symbolic = %x.patt.loc9_57.2 (constants.%x.patt.a06)] -// CHECK:STDOUT: %return.param_patt.loc9_65.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = out_param_pattern [symbolic = %return.param_patt.loc9_65.2 (constants.%return.param_patt.7e9)] -// CHECK:STDOUT: %return.patt.loc9_62.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = return_slot_pattern %return.param_patt.loc9_65.1, %.loc9_65.3 [symbolic = %return.patt.loc9_62.2 (constants.%return.patt.c4f)] +// CHECK:STDOUT: %T.patt.loc9_35.1: %pattern_type.709 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_35.2 (constants.%T.patt.478)] +// CHECK:STDOUT: %x.param_patt.loc9_64.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = value_param_pattern [symbolic = %x.param_patt.loc9_64.2 (constants.%x.param_patt.e3c)] +// CHECK:STDOUT: %x.patt.loc9_64.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = at_binding_pattern x, %x.param_patt.loc9_64.1 [symbolic = %x.patt.loc9_64.2 (constants.%x.patt.a06)] +// CHECK:STDOUT: %return.param_patt.loc9_72.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = out_param_pattern [symbolic = %return.param_patt.loc9_72.2 (constants.%return.param_patt.7e9)] +// CHECK:STDOUT: %return.patt.loc9_69.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = return_slot_pattern %return.param_patt.loc9_72.1, %.loc9_72.3 [symbolic = %return.patt.loc9_69.2 (constants.%return.patt.c4f)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc9_65: %facet_type = name_ref T, %T.loc9_27.2 [symbolic = %T.loc9_27.1 (constants.%T.283)] -// CHECK:STDOUT: %T.as_type.loc9_65: type = facet_access_type %T.ref.loc9_65 [symbolic = %T.as_type.loc9_59.1 (constants.%T.as_type.74b)] -// CHECK:STDOUT: %.loc9_65.3: type = converted %T.ref.loc9_65, %T.as_type.loc9_65 [symbolic = %T.as_type.loc9_59.1 (constants.%T.as_type.74b)] -// CHECK:STDOUT: %.loc9_65.4: Core.Form = init_form %.loc9_65.3 [symbolic = %.loc9_65.2 (constants.%.2b9)] -// CHECK:STDOUT: %.loc9_40.1: type = splice_block %.loc9_40.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %T.ref.loc9_72: %facet_type = name_ref T, %T.loc9_35.2 [symbolic = %T.loc9_35.1 (constants.%T.283)] +// CHECK:STDOUT: %T.as_type.loc9_72: type = facet_access_type %T.ref.loc9_72 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] +// CHECK:STDOUT: %.loc9_72.3: type = converted %T.ref.loc9_72, %T.as_type.loc9_72 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] +// CHECK:STDOUT: %.loc9_72.4: Core.Form = init_form %.loc9_72.3 [symbolic = %.loc9_72.2 (constants.%.2b9)] +// CHECK:STDOUT: %.loc9_47.1: type = splice_block %.loc9_47.3 [concrete = constants.%facet_type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %Core.ref.loc9_30: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %Core.ref.loc9_37: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type] -// CHECK:STDOUT: %Core.ref.loc9_42: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %Core.ref.loc9_49: = 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.loc9: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc9: = bound_method %Copy.ref, %impl.elem0.loc9 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc9(%Copy.ref, %Destroy.ref) [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc9_40.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc9_40.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc9_40.2 [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc9_47.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc9_47.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc9_47.2 [concrete = constants.%facet_type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc9_27.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc9_27.1 (constants.%T.283)] -// CHECK:STDOUT: %x.param: @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) = value_param call_param0 -// CHECK:STDOUT: %.loc9_59.1: type = splice_block %.loc9_59.2 [symbolic = %T.as_type.loc9_59.1 (constants.%T.as_type.74b)] { -// CHECK:STDOUT: %T.ref.loc9_59: %facet_type = name_ref T, %T.loc9_27.2 [symbolic = %T.loc9_27.1 (constants.%T.283)] -// CHECK:STDOUT: %T.as_type.loc9_59.2: type = facet_access_type %T.ref.loc9_59 [symbolic = %T.as_type.loc9_59.1 (constants.%T.as_type.74b)] -// CHECK:STDOUT: %.loc9_59.2: type = converted %T.ref.loc9_59, %T.as_type.loc9_59.2 [symbolic = %T.as_type.loc9_59.1 (constants.%T.as_type.74b)] +// CHECK:STDOUT: %T.loc9_35.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc9_35.1 (constants.%T.283)] +// CHECK:STDOUT: %x.param: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = value_param call_param0 +// CHECK:STDOUT: %.loc9_66.1: type = splice_block %.loc9_66.2 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] { +// CHECK:STDOUT: %T.ref.loc9_66: %facet_type = name_ref T, %T.loc9_35.2 [symbolic = %T.loc9_35.1 (constants.%T.283)] +// CHECK:STDOUT: %T.as_type.loc9_66.2: type = facet_access_type %T.ref.loc9_66 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] +// CHECK:STDOUT: %.loc9_66.2: type = converted %T.ref.loc9_66, %T.as_type.loc9_66.2 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) = out_param call_param1 -// CHECK:STDOUT: %return: ref @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) = return_slot %return.param +// CHECK:STDOUT: %x: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = wrapper_binding x, %x.param +// CHECK:STDOUT: %return.param: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = out_param call_param1 +// CHECK:STDOUT: %return: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %InitFromStructSpecific.decl: %InitFromStructSpecific.type = fn_decl @InitFromStructSpecific [concrete = constants.%InitFromStructSpecific] { // CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete = constants.%x.param_patt.cee] @@ -211,34 +211,34 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @InitFromStructGeneric(%T.loc9_27.2: %facet_type) { -// CHECK:STDOUT: %T.patt.loc9_27.2: %pattern_type.709 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_27.2 (constants.%T.patt.478)] -// CHECK:STDOUT: %T.loc9_27.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc9_27.1 (constants.%T.283)] -// CHECK:STDOUT: %T.as_type.loc9_59.1: type = facet_access_type %T.loc9_27.1 [symbolic = %T.as_type.loc9_59.1 (constants.%T.as_type.74b)] -// CHECK:STDOUT: %pattern_type.loc9: type = pattern_type %T.as_type.loc9_59.1 [symbolic = %pattern_type.loc9 (constants.%pattern_type.44a)] -// CHECK:STDOUT: %x.param_patt.loc9_57.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = value_param_pattern [symbolic = %x.param_patt.loc9_57.2 (constants.%x.param_patt.e3c)] -// CHECK:STDOUT: %x.patt.loc9_57.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = at_binding_pattern x, %x.param_patt.loc9_57.2 [symbolic = %x.patt.loc9_57.2 (constants.%x.patt.a06)] -// CHECK:STDOUT: %.loc9_65.2: Core.Form = init_form %T.as_type.loc9_59.1 [symbolic = %.loc9_65.2 (constants.%.2b9)] -// CHECK:STDOUT: %return.param_patt.loc9_65.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = out_param_pattern [symbolic = %return.param_patt.loc9_65.2 (constants.%return.param_patt.7e9)] -// CHECK:STDOUT: %return.patt.loc9_62.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = return_slot_pattern %return.param_patt.loc9_65.2, %T.as_type.loc9_59.1 [symbolic = %return.patt.loc9_62.2 (constants.%return.patt.c4f)] +// CHECK:STDOUT: generic fn @InitFromStructGeneric(%T.loc9_35.2: %facet_type) { +// CHECK:STDOUT: %T.patt.loc9_35.2: %pattern_type.709 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_35.2 (constants.%T.patt.478)] +// CHECK:STDOUT: %T.loc9_35.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc9_35.1 (constants.%T.283)] +// CHECK:STDOUT: %T.as_type.loc9_66.1: type = facet_access_type %T.loc9_35.1 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] +// CHECK:STDOUT: %pattern_type.loc9: type = pattern_type %T.as_type.loc9_66.1 [symbolic = %pattern_type.loc9 (constants.%pattern_type.44a)] +// CHECK:STDOUT: %x.param_patt.loc9_64.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = value_param_pattern [symbolic = %x.param_patt.loc9_64.2 (constants.%x.param_patt.e3c)] +// CHECK:STDOUT: %x.patt.loc9_64.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = at_binding_pattern x, %x.param_patt.loc9_64.2 [symbolic = %x.patt.loc9_64.2 (constants.%x.patt.a06)] +// CHECK:STDOUT: %.loc9_72.2: Core.Form = init_form %T.as_type.loc9_66.1 [symbolic = %.loc9_72.2 (constants.%.2b9)] +// CHECK:STDOUT: %return.param_patt.loc9_72.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = out_param_pattern [symbolic = %return.param_patt.loc9_72.2 (constants.%return.param_patt.7e9)] +// CHECK:STDOUT: %return.patt.loc9_69.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = return_slot_pattern %return.param_patt.loc9_72.2, %T.as_type.loc9_66.1 [symbolic = %return.patt.loc9_69.2 (constants.%return.patt.c4f)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc9: = require_complete_type %T.as_type.loc9_59.1 [symbolic = %require_complete.loc9 (constants.%require_complete.44d)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.loc10_17: = lookup_impl_witness %T.loc9_27.1, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc10_17 (constants.%Destroy.lookup_impl_witness.28a)] -// CHECK:STDOUT: %Destroy.facet.loc10_17.2: %Destroy.type = facet_value %T.as_type.loc9_59.1, (%Destroy.lookup_impl_witness.loc10_17) [symbolic = %Destroy.facet.loc10_17.2 (constants.%Destroy.facet.16e)] +// CHECK:STDOUT: %require_complete.loc9: = require_complete_type %T.as_type.loc9_66.1 [symbolic = %require_complete.loc9 (constants.%require_complete.44d)] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.loc10_17: = lookup_impl_witness %T.loc9_35.1, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc10_17 (constants.%Destroy.lookup_impl_witness.28a)] +// CHECK:STDOUT: %Destroy.facet.loc10_17.2: %Destroy.type = facet_value %T.as_type.loc9_66.1, (%Destroy.lookup_impl_witness.loc10_17) [symbolic = %Destroy.facet.loc10_17.2 (constants.%Destroy.facet.16e)] // CHECK:STDOUT: %Class.loc10_17.2: type = class_type @Class, @Class(%Destroy.facet.loc10_17.2) [symbolic = %Class.loc10_17.2 (constants.%Class.55b)] // CHECK:STDOUT: %require_complete.loc10: = require_complete_type %Class.loc10_17.2 [symbolic = %require_complete.loc10 (constants.%require_complete.ff5)] // CHECK:STDOUT: %pattern_type.loc10: type = pattern_type %Class.loc10_17.2 [symbolic = %pattern_type.loc10 (constants.%pattern_type.0b6)] // CHECK:STDOUT: %v.patt.loc10_8.2: @InitFromStructGeneric.%pattern_type.loc10 (%pattern_type.0b6) = ref_binding_pattern v [symbolic = %v.patt.loc10_8.2 (constants.%v.patt.ef6)] // CHECK:STDOUT: %v.var_patt.loc10_3.2: @InitFromStructGeneric.%pattern_type.loc10 (%pattern_type.0b6) = var_pattern %v.patt.loc10_8.2 [symbolic = %v.var_patt.loc10_3.2 (constants.%v.var_patt.8cf)] -// CHECK:STDOUT: %struct_type.k: type = struct_type {.k: @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b)} [symbolic = %struct_type.k (constants.%struct_type.k.aa4)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc9_27.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.4df)] -// CHECK:STDOUT: %Copy.facet.loc10_27.3: %Copy.type = facet_value %T.as_type.loc9_59.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] +// CHECK:STDOUT: %struct_type.k: type = struct_type {.k: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b)} [symbolic = %struct_type.k (constants.%struct_type.k.aa4)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc9_35.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.4df)] +// CHECK:STDOUT: %Copy.facet.loc10_27.3: %Copy.type = facet_value %T.as_type.loc9_66.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc10_27.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.090)] // CHECK:STDOUT: %.loc10_27.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc10_27.3 [symbolic = %.loc10_27.3 (constants.%.018)] // CHECK:STDOUT: %impl.elem0.loc10_27.2: @InitFromStructGeneric.%.loc10_27.3 (%.018) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.170)] // CHECK:STDOUT: %specific_impl_fn.loc10_27.2: = specific_impl_function %impl.elem0.loc10_27.2, @Copy.WithSelf.Op(%Copy.facet.loc10_27.3) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.be5)] -// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc10_17.2, %T.as_type.loc9_59.1 [symbolic = %Class.elem (constants.%Class.elem.b97)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc10_17.2, %T.as_type.loc9_66.1 [symbolic = %Class.elem (constants.%Class.elem.b97)] // CHECK:STDOUT: %Destroy.lookup_impl_witness.loc10_3: = lookup_impl_witness %Class.loc10_17.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc10_3 (constants.%Destroy.lookup_impl_witness.62e)] // CHECK:STDOUT: %Destroy.facet.loc10_3.3: %Destroy.type = facet_value %Class.loc10_17.2, (%Destroy.lookup_impl_witness.loc10_3) [symbolic = %Destroy.facet.loc10_3.3 (constants.%Destroy.facet.25e)] // CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.loc10_3.3) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.d76)] @@ -246,10 +246,10 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %impl.elem0.loc10_3.2: @InitFromStructGeneric.%.loc10_3.4 (%.0da) = impl_witness_access %Destroy.lookup_impl_witness.loc10_3, element0 [symbolic = %impl.elem0.loc10_3.2 (constants.%impl.elem0.730)] // CHECK:STDOUT: %specific_impl_fn.loc10_3.2: = specific_impl_function %impl.elem0.loc10_3.2, @Destroy.WithSelf.Op(%Destroy.facet.loc10_3.3) [symbolic = %specific_impl_fn.loc10_3.2 (constants.%specific_impl_fn.fa9)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b)) -> out %return.param: @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) { +// CHECK:STDOUT: fn(%x.param: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b)) -> out %return.param: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class.loc10_17.2 (%Class.55b) = var_storage %v.var_patt.loc10_3.1 -// CHECK:STDOUT: %x.ref: @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = name_ref x, %x // CHECK:STDOUT: %.loc10_28.1: @InitFromStructGeneric.%struct_type.k (%struct_type.k.aa4) = struct_literal (%x.ref) // CHECK:STDOUT: %impl.elem0.loc10_27.1: @InitFromStructGeneric.%.loc10_27.3 (%.018) = impl_witness_access constants.%Copy.lookup_impl_witness.4df, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.170)] // CHECK:STDOUT: %bound_method.loc10_27.1: = bound_method %x.ref, %impl.elem0.loc10_27.1 @@ -259,16 +259,16 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %.loc10_27.2: %Copy.type = converted constants.%T.as_type.74b, %Copy.facet.loc10_27.2 [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] // CHECK:STDOUT: %specific_impl_fn.loc10_27.1: = specific_impl_function %impl.elem0.loc10_27.1, @Copy.WithSelf.Op(constants.%Copy.facet.3f0) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.be5)] // CHECK:STDOUT: %bound_method.loc10_27.2: = bound_method %x.ref, %specific_impl_fn.loc10_27.1 -// CHECK:STDOUT: %.loc10_28.2: ref @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) = class_element_access %v.var, element0 -// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc10: init @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) to %.loc10_28.2 = call %bound_method.loc10_27.2(%x.ref) -// CHECK:STDOUT: %.loc10_28.3: init @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) to %.loc10_28.2 = in_place_init %Copy.WithSelf.Op.call.loc10 +// CHECK:STDOUT: %.loc10_28.2: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = class_element_access %v.var, element0 +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc10: init @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) to %.loc10_28.2 = call %bound_method.loc10_27.2(%x.ref) +// CHECK:STDOUT: %.loc10_28.3: init @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) to %.loc10_28.2 = in_place_init %Copy.WithSelf.Op.call.loc10 // CHECK:STDOUT: %.loc10_28.4: init @InitFromStructGeneric.%Class.loc10_17.2 (%Class.55b) to %v.var = class_init (%.loc10_28.3) // CHECK:STDOUT: %.loc10_3.1: init @InitFromStructGeneric.%Class.loc10_17.2 (%Class.55b) = converted %.loc10_28.1, %.loc10_28.4 // CHECK:STDOUT: assign %v.var, %.loc10_3.1 // CHECK:STDOUT: %.loc10_17.1: type = splice_block %Class.loc10_17.1 [symbolic = %Class.loc10_17.2 (constants.%Class.55b)] { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] -// CHECK:STDOUT: %T.ref.loc10: %facet_type = name_ref T, %T.loc9_27.2 [symbolic = %T.loc9_27.1 (constants.%T.283)] -// CHECK:STDOUT: %T.as_type.loc10: type = facet_access_type %T.ref.loc10 [symbolic = %T.as_type.loc9_59.1 (constants.%T.as_type.74b)] +// CHECK:STDOUT: %T.ref.loc10: %facet_type = name_ref T, %T.loc9_35.2 [symbolic = %T.loc9_35.1 (constants.%T.283)] +// CHECK:STDOUT: %T.as_type.loc10: type = facet_access_type %T.ref.loc10 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] // CHECK:STDOUT: %Destroy.facet.loc10_17.1: %Destroy.type = facet_value %T.as_type.loc10, (constants.%Destroy.lookup_impl_witness.28a) [symbolic = %Destroy.facet.loc10_17.2 (constants.%Destroy.facet.16e)] // CHECK:STDOUT: %.loc10_17.2: %Destroy.type = converted %T.ref.loc10, %Destroy.facet.loc10_17.1 [symbolic = %Destroy.facet.loc10_17.2 (constants.%Destroy.facet.16e)] // CHECK:STDOUT: %Class.loc10_17.1: type = class_type @Class, @Class(constants.%Destroy.facet.16e) [symbolic = %Class.loc10_17.2 (constants.%Class.55b)] @@ -280,8 +280,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.ref: ref @InitFromStructGeneric.%Class.loc10_17.2 (%Class.55b) = name_ref v, %v // CHECK:STDOUT: %k.ref: @InitFromStructGeneric.%Class.elem (%Class.elem.b97) = name_ref k, @Class.%.loc5 [concrete = @Class.%.loc5] -// CHECK:STDOUT: %.loc11_11.1: ref @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) = class_element_access %v.ref, element0 -// CHECK:STDOUT: %.loc11_11.2: @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) = acquire_value %.loc11_11.1 +// CHECK:STDOUT: %.loc11_11.1: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = class_element_access %v.ref, element0 +// CHECK:STDOUT: %.loc11_11.2: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = acquire_value %.loc11_11.1 // CHECK:STDOUT: %impl.elem0.loc11: @InitFromStructGeneric.%.loc10_27.3 (%.018) = impl_witness_access constants.%Copy.lookup_impl_witness.4df, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.170)] // CHECK:STDOUT: %bound_method.loc11_11.1: = bound_method %.loc11_11.2, %impl.elem0.loc11 // CHECK:STDOUT: %Copy.facet.loc11_11.1: %Copy.type = facet_value constants.%T.as_type.74b, (constants.%Copy.lookup_impl_witness.4df) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] @@ -290,8 +290,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %.loc11_11.4: %Copy.type = converted constants.%T.as_type.74b, %Copy.facet.loc11_11.2 [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] // CHECK:STDOUT: %specific_impl_fn.loc11: = specific_impl_function %impl.elem0.loc11, @Copy.WithSelf.Op(constants.%Copy.facet.3f0) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.be5)] // CHECK:STDOUT: %bound_method.loc11_11.2: = bound_method %.loc11_11.2, %specific_impl_fn.loc11 -// CHECK:STDOUT: %.loc9_65.1: ref @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc11: init @InitFromStructGeneric.%T.as_type.loc9_59.1 (%T.as_type.74b) to %.loc9_65.1 = call %bound_method.loc11_11.2(%.loc11_11.2) +// CHECK:STDOUT: %.loc9_72.1: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = splice_block %return.param {} +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc11: init @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) to %.loc9_72.1 = call %bound_method.loc11_11.2(%.loc11_11.2) // CHECK:STDOUT: %impl.elem0.loc10_3.1: @InitFromStructGeneric.%.loc10_3.4 (%.0da) = impl_witness_access constants.%Destroy.lookup_impl_witness.62e, element0 [symbolic = %impl.elem0.loc10_3.2 (constants.%impl.elem0.730)] // CHECK:STDOUT: %bound_method.loc10_3.1: = bound_method %v.var, %impl.elem0.loc10_3.1 // CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%Class.55b, (constants.%Destroy.lookup_impl_witness.62e) [symbolic = %Destroy.facet.loc10_3.3 (constants.%Destroy.facet.25e)] @@ -374,15 +374,15 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @InitFromStructGeneric(constants.%T.283) { -// CHECK:STDOUT: %T.patt.loc9_27.2 => constants.%T.patt.478 -// CHECK:STDOUT: %T.loc9_27.1 => constants.%T.283 -// CHECK:STDOUT: %T.as_type.loc9_59.1 => constants.%T.as_type.74b +// CHECK:STDOUT: %T.patt.loc9_35.2 => constants.%T.patt.478 +// CHECK:STDOUT: %T.loc9_35.1 => constants.%T.283 +// CHECK:STDOUT: %T.as_type.loc9_66.1 => constants.%T.as_type.74b // CHECK:STDOUT: %pattern_type.loc9 => constants.%pattern_type.44a -// CHECK:STDOUT: %x.param_patt.loc9_57.2 => constants.%x.param_patt.e3c -// CHECK:STDOUT: %x.patt.loc9_57.2 => constants.%x.patt.a06 -// CHECK:STDOUT: %.loc9_65.2 => constants.%.2b9 -// CHECK:STDOUT: %return.param_patt.loc9_65.2 => constants.%return.param_patt.7e9 -// CHECK:STDOUT: %return.patt.loc9_62.2 => constants.%return.patt.c4f +// CHECK:STDOUT: %x.param_patt.loc9_64.2 => constants.%x.param_patt.e3c +// CHECK:STDOUT: %x.patt.loc9_64.2 => constants.%x.patt.a06 +// CHECK:STDOUT: %.loc9_72.2 => constants.%.2b9 +// CHECK:STDOUT: %return.param_patt.loc9_72.2 => constants.%return.param_patt.7e9 +// CHECK:STDOUT: %return.patt.loc9_69.2 => constants.%return.patt.c4f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- adapt.carbon @@ -453,31 +453,31 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %InitFromAdaptedGeneric.decl: %InitFromAdaptedGeneric.type = fn_decl @InitFromAdaptedGeneric [concrete = constants.%InitFromAdaptedGeneric] { -// CHECK:STDOUT: %T.patt.loc9_28.1: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_28.2 (constants.%T.patt.fe6)] -// CHECK:STDOUT: %x.param_patt.loc9_43.1: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc9_43.2 (constants.%x.param_patt.1f4)] -// CHECK:STDOUT: %x.patt.loc9_43.1: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc9_43.1 [symbolic = %x.patt.loc9_43.2 (constants.%x.patt.f93)] -// CHECK:STDOUT: %return.param_patt.loc9_51.1: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc9_51.2 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc9_48.1: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc9_51.1, %.loc9_51.3 [symbolic = %return.patt.loc9_48.2 (constants.%return.patt.f44)] +// CHECK:STDOUT: %T.patt.loc9_36.1: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_36.2 (constants.%T.patt.fe6)] +// CHECK:STDOUT: %x.param_patt.loc9_50.1: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc9_50.2 (constants.%x.param_patt.1f4)] +// CHECK:STDOUT: %x.patt.loc9_50.1: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc9_50.1 [symbolic = %x.patt.loc9_50.2 (constants.%x.patt.f93)] +// CHECK:STDOUT: %return.param_patt.loc9_58.1: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc9_58.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc9_55.1: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc9_58.1, %.loc9_58.3 [symbolic = %return.patt.loc9_55.2 (constants.%return.patt.f44)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc9_51: %Copy.type = name_ref T, %T.loc9_28.2 [symbolic = %T.loc9_28.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc9_51: type = facet_access_type %T.ref.loc9_51 [symbolic = %T.as_type.loc9_45.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_51.3: type = converted %T.ref.loc9_51, %T.as_type.loc9_51 [symbolic = %T.as_type.loc9_45.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_51.4: Core.Form = init_form %.loc9_51.3 [symbolic = %.loc9_51.2 (constants.%.1ce700.2)] -// CHECK:STDOUT: %.loc9_35: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { +// CHECK:STDOUT: %T.ref.loc9_58: %Copy.type = name_ref T, %T.loc9_36.2 [symbolic = %T.loc9_36.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc9_58: type = facet_access_type %T.ref.loc9_58 [symbolic = %T.as_type.loc9_52.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_58.3: type = converted %T.ref.loc9_58, %T.as_type.loc9_58 [symbolic = %T.as_type.loc9_52.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_58.4: Core.Form = init_form %.loc9_58.3 [symbolic = %.loc9_58.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %.loc9_42: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc9_28.2: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc9_28.1 (constants.%T.f84)] -// CHECK:STDOUT: %x.param: @InitFromAdaptedGeneric.%T.as_type.loc9_45.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc9_45.1: type = splice_block %.loc9_45.2 [symbolic = %T.as_type.loc9_45.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc9_45: %Copy.type = name_ref T, %T.loc9_28.2 [symbolic = %T.loc9_28.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc9_45.2: type = facet_access_type %T.ref.loc9_45 [symbolic = %T.as_type.loc9_45.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_45.2: type = converted %T.ref.loc9_45, %T.as_type.loc9_45.2 [symbolic = %T.as_type.loc9_45.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc9_36.2: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc9_36.1 (constants.%T.f84)] +// CHECK:STDOUT: %x.param: @InitFromAdaptedGeneric.%T.as_type.loc9_52.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc9_52.1: type = splice_block %.loc9_52.2 [symbolic = %T.as_type.loc9_52.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref.loc9_52: %Copy.type = name_ref T, %T.loc9_36.2 [symbolic = %T.loc9_36.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc9_52.2: type = facet_access_type %T.ref.loc9_52 [symbolic = %T.as_type.loc9_52.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_52.2: type = converted %T.ref.loc9_52, %T.as_type.loc9_52.2 [symbolic = %T.as_type.loc9_52.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @InitFromAdaptedGeneric.%T.as_type.loc9_45.1 (%T.as_type) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @InitFromAdaptedGeneric.%T.as_type.loc9_45.1 (%T.as_type) = out_param call_param1 -// CHECK:STDOUT: %return: ref @InitFromAdaptedGeneric.%T.as_type.loc9_45.1 (%T.as_type) = return_slot %return.param +// CHECK:STDOUT: %x: @InitFromAdaptedGeneric.%T.as_type.loc9_52.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %return.param: ref @InitFromAdaptedGeneric.%T.as_type.loc9_52.1 (%T.as_type) = out_param call_param1 +// CHECK:STDOUT: %return: ref @InitFromAdaptedGeneric.%T.as_type.loc9_52.1 (%T.as_type) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %InitFromAdaptedSpecific.decl: %InitFromAdaptedSpecific.type = fn_decl @InitFromAdaptedSpecific [concrete = constants.%InitFromAdaptedSpecific] { // CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete = constants.%x.param_patt.cee] @@ -495,50 +495,50 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @InitFromAdaptedGeneric(%T.loc9_28.2: %Copy.type) { -// CHECK:STDOUT: %T.patt.loc9_28.2: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_28.2 (constants.%T.patt.fe6)] -// CHECK:STDOUT: %T.loc9_28.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc9_28.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc9_45.1: type = facet_access_type %T.loc9_28.1 [symbolic = %T.as_type.loc9_45.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc9_45.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)] -// CHECK:STDOUT: %x.param_patt.loc9_43.2: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc9_43.2 (constants.%x.param_patt.1f4)] -// CHECK:STDOUT: %x.patt.loc9_43.2: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc9_43.2 [symbolic = %x.patt.loc9_43.2 (constants.%x.patt.f93)] -// CHECK:STDOUT: %.loc9_51.2: Core.Form = init_form %T.as_type.loc9_45.1 [symbolic = %.loc9_51.2 (constants.%.1ce700.2)] -// CHECK:STDOUT: %return.param_patt.loc9_51.2: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc9_51.2 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc9_48.2: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc9_51.2, %T.as_type.loc9_45.1 [symbolic = %return.patt.loc9_48.2 (constants.%return.patt.f44)] +// CHECK:STDOUT: generic fn @InitFromAdaptedGeneric(%T.loc9_36.2: %Copy.type) { +// CHECK:STDOUT: %T.patt.loc9_36.2: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_36.2 (constants.%T.patt.fe6)] +// CHECK:STDOUT: %T.loc9_36.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc9_36.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc9_52.1: type = facet_access_type %T.loc9_36.1 [symbolic = %T.as_type.loc9_52.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc9_52.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)] +// CHECK:STDOUT: %x.param_patt.loc9_50.2: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc9_50.2 (constants.%x.param_patt.1f4)] +// CHECK:STDOUT: %x.patt.loc9_50.2: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc9_50.2 [symbolic = %x.patt.loc9_50.2 (constants.%x.patt.f93)] +// CHECK:STDOUT: %.loc9_58.2: Core.Form = init_form %T.as_type.loc9_52.1 [symbolic = %.loc9_58.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %return.param_patt.loc9_58.2: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc9_58.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc9_55.2: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc9_58.2, %T.as_type.loc9_52.1 [symbolic = %return.patt.loc9_55.2 (constants.%return.patt.f44)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc9: = require_complete_type %T.as_type.loc9_45.1 [symbolic = %require_complete.loc9 (constants.%require_complete.d83)] -// CHECK:STDOUT: %Adapt.loc10_23.2: type = class_type @Adapt, @Adapt(%T.as_type.loc9_45.1) [symbolic = %Adapt.loc10_23.2 (constants.%Adapt.210)] +// CHECK:STDOUT: %require_complete.loc9: = require_complete_type %T.as_type.loc9_52.1 [symbolic = %require_complete.loc9 (constants.%require_complete.d83)] +// CHECK:STDOUT: %Adapt.loc10_23.2: type = class_type @Adapt, @Adapt(%T.as_type.loc9_52.1) [symbolic = %Adapt.loc10_23.2 (constants.%Adapt.210)] // CHECK:STDOUT: %require_complete.loc10: = require_complete_type %Adapt.loc10_23.2 [symbolic = %require_complete.loc10 (constants.%require_complete.29a)] -// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%T.loc9_28.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.2)] -// CHECK:STDOUT: %.loc10_26.5: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc9_28.1 [symbolic = %.loc10_26.5 (constants.%.c29)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc9_28.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%T.loc9_36.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.2)] +// CHECK:STDOUT: %.loc10_26.5: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc9_36.1 [symbolic = %.loc10_26.5 (constants.%.c29)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc9_36.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c)] // CHECK:STDOUT: %impl.elem0.loc10_26.2: @InitFromAdaptedGeneric.%.loc10_26.5 (%.c29) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_26.2 (constants.%impl.elem0.bd2)] -// CHECK:STDOUT: %specific_impl_fn.loc10_26.2: = specific_impl_function %impl.elem0.loc10_26.2, @Copy.WithSelf.Op(%T.loc9_28.1) [symbolic = %specific_impl_fn.loc10_26.2 (constants.%specific_impl_fn.e2a)] +// CHECK:STDOUT: %specific_impl_fn.loc10_26.2: = specific_impl_function %impl.elem0.loc10_26.2, @Copy.WithSelf.Op(%T.loc9_36.1) [symbolic = %specific_impl_fn.loc10_26.2 (constants.%specific_impl_fn.e2a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @InitFromAdaptedGeneric.%T.as_type.loc9_45.1 (%T.as_type)) -> out %return.param: @InitFromAdaptedGeneric.%T.as_type.loc9_45.1 (%T.as_type) { +// CHECK:STDOUT: fn(%x.param: @InitFromAdaptedGeneric.%T.as_type.loc9_52.1 (%T.as_type)) -> out %return.param: @InitFromAdaptedGeneric.%T.as_type.loc9_52.1 (%T.as_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @InitFromAdaptedGeneric.%T.as_type.loc9_45.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @InitFromAdaptedGeneric.%T.as_type.loc9_52.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %Adapt.ref: %Adapt.type = name_ref Adapt, file.%Adapt.decl [concrete = constants.%Adapt.generic] -// CHECK:STDOUT: %T.ref.loc10_22: %Copy.type = name_ref T, %T.loc9_28.2 [symbolic = %T.loc9_28.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc10_23: type = facet_access_type %T.ref.loc10_22 [symbolic = %T.as_type.loc9_45.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc10_23: type = converted %T.ref.loc10_22, %T.as_type.loc10_23 [symbolic = %T.as_type.loc9_45.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.ref.loc10_22: %Copy.type = name_ref T, %T.loc9_36.2 [symbolic = %T.loc9_36.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc10_23: type = facet_access_type %T.ref.loc10_22 [symbolic = %T.as_type.loc9_52.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc10_23: type = converted %T.ref.loc10_22, %T.as_type.loc10_23 [symbolic = %T.as_type.loc9_52.1 (constants.%T.as_type)] // CHECK:STDOUT: %Adapt.loc10_23.1: type = class_type @Adapt, @Adapt(constants.%T.as_type) [symbolic = %Adapt.loc10_23.2 (constants.%Adapt.210)] // CHECK:STDOUT: %.loc10_13.1: @InitFromAdaptedGeneric.%Adapt.loc10_23.2 (%Adapt.210) = as_compatible %x.ref // CHECK:STDOUT: %.loc10_13.2: @InitFromAdaptedGeneric.%Adapt.loc10_23.2 (%Adapt.210) = converted %x.ref, %.loc10_13.1 -// CHECK:STDOUT: %T.ref.loc10_29: %Copy.type = name_ref T, %T.loc9_28.2 [symbolic = %T.loc9_28.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc10_29: type = facet_access_type %T.ref.loc10_29 [symbolic = %T.as_type.loc9_45.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc10_29: type = converted %T.ref.loc10_29, %T.as_type.loc10_29 [symbolic = %T.as_type.loc9_45.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc10_26.1: @InitFromAdaptedGeneric.%T.as_type.loc9_45.1 (%T.as_type) = as_compatible %.loc10_13.2 -// CHECK:STDOUT: %.loc10_26.2: @InitFromAdaptedGeneric.%T.as_type.loc9_45.1 (%T.as_type) = converted %.loc10_13.2, %.loc10_26.1 +// CHECK:STDOUT: %T.ref.loc10_29: %Copy.type = name_ref T, %T.loc9_36.2 [symbolic = %T.loc9_36.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc10_29: type = facet_access_type %T.ref.loc10_29 [symbolic = %T.as_type.loc9_52.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc10_29: type = converted %T.ref.loc10_29, %T.as_type.loc10_29 [symbolic = %T.as_type.loc9_52.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc10_26.1: @InitFromAdaptedGeneric.%T.as_type.loc9_52.1 (%T.as_type) = as_compatible %.loc10_13.2 +// CHECK:STDOUT: %.loc10_26.2: @InitFromAdaptedGeneric.%T.as_type.loc9_52.1 (%T.as_type) = converted %.loc10_13.2, %.loc10_26.1 // CHECK:STDOUT: %impl.elem0.loc10_26.1: @InitFromAdaptedGeneric.%.loc10_26.5 (%.c29) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c, element0 [symbolic = %impl.elem0.loc10_26.2 (constants.%impl.elem0.bd2)] // CHECK:STDOUT: %bound_method.loc10_26.1: = bound_method %.loc10_26.2, %impl.elem0.loc10_26.1 -// CHECK:STDOUT: %.loc10_26.3: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc9_28.1 (constants.%T.f84)] -// CHECK:STDOUT: %.loc10_26.4: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc9_28.1 (constants.%T.f84)] +// CHECK:STDOUT: %.loc10_26.3: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc9_36.1 (constants.%T.f84)] +// CHECK:STDOUT: %.loc10_26.4: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc9_36.1 (constants.%T.f84)] // CHECK:STDOUT: %specific_impl_fn.loc10_26.1: = specific_impl_function %impl.elem0.loc10_26.1, @Copy.WithSelf.Op(constants.%T.f84) [symbolic = %specific_impl_fn.loc10_26.2 (constants.%specific_impl_fn.e2a)] // CHECK:STDOUT: %bound_method.loc10_26.2: = bound_method %.loc10_26.2, %specific_impl_fn.loc10_26.1 -// CHECK:STDOUT: %.loc9_51.1: ref @InitFromAdaptedGeneric.%T.as_type.loc9_45.1 (%T.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @InitFromAdaptedGeneric.%T.as_type.loc9_45.1 (%T.as_type) to %.loc9_51.1 = call %bound_method.loc10_26.2(%.loc10_26.2) +// CHECK:STDOUT: %.loc9_58.1: ref @InitFromAdaptedGeneric.%T.as_type.loc9_52.1 (%T.as_type) = splice_block %return.param {} +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @InitFromAdaptedGeneric.%T.as_type.loc9_52.1 (%T.as_type) to %.loc9_58.1 = call %bound_method.loc10_26.2(%.loc10_26.2) // CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -567,14 +567,14 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @InitFromAdaptedGeneric(constants.%T.f84) { -// CHECK:STDOUT: %T.patt.loc9_28.2 => constants.%T.patt.fe6 -// CHECK:STDOUT: %T.loc9_28.1 => constants.%T.f84 -// CHECK:STDOUT: %T.as_type.loc9_45.1 => constants.%T.as_type +// CHECK:STDOUT: %T.patt.loc9_36.2 => constants.%T.patt.fe6 +// CHECK:STDOUT: %T.loc9_36.1 => constants.%T.f84 +// CHECK:STDOUT: %T.as_type.loc9_52.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2c66b4.2 -// CHECK:STDOUT: %x.param_patt.loc9_43.2 => constants.%x.param_patt.1f4 -// CHECK:STDOUT: %x.patt.loc9_43.2 => constants.%x.patt.f93 -// CHECK:STDOUT: %.loc9_51.2 => constants.%.1ce700.2 -// CHECK:STDOUT: %return.param_patt.loc9_51.2 => constants.%return.param_patt.bf4475.2 -// CHECK:STDOUT: %return.patt.loc9_48.2 => constants.%return.patt.f44 +// CHECK:STDOUT: %x.param_patt.loc9_50.2 => constants.%x.param_patt.1f4 +// CHECK:STDOUT: %x.patt.loc9_50.2 => constants.%x.patt.f93 +// CHECK:STDOUT: %.loc9_58.2 => constants.%.1ce700.2 +// CHECK:STDOUT: %return.param_patt.loc9_58.2 => constants.%return.param_patt.bf4475.2 +// CHECK:STDOUT: %return.patt.loc9_55.2 => constants.%return.patt.f44 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index 047f098351ab..3ab4f25e3d73 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; -class Class(T:! Core.Copy) { +class Class(T: Core.Copy) { var x: T; fn Get(self) -> T { @@ -52,11 +52,11 @@ fn AddrMethodCall(p: Class(i32)*) -> i32 { library "[[@TEST_NAME]]"; -class Class(T:! type) { +class Class(T: type) { fn Make() -> Class(T) { return {}; } } -fn StaticMemberFunctionCall(T:! type) -> Class(T) { +fn StaticMemberFunctionCall(generic T: type) -> Class(T) { //@dump-sem-ir-begin return Class(T).Make(); //@dump-sem-ir-end @@ -442,25 +442,25 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.Make.specific_fn: = specific_function %Class.Make, @Class.Make(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @StaticMemberFunctionCall(%T.loc8_30.2: type) { +// CHECK:STDOUT: generic fn @StaticMemberFunctionCall(%T.loc8_38.2: type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %Class.loc8_49.1 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %Class.Make.type: type = fn_type @Class.Make, @Class(%T.loc8_30.1) [symbolic = %Class.Make.type (constants.%Class.Make.type)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Class.loc8_56.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %Class.Make.type: type = fn_type @Class.Make, @Class(%T.loc8_38.1) [symbolic = %Class.Make.type (constants.%Class.Make.type)] // CHECK:STDOUT: %Class.Make: @StaticMemberFunctionCall.%Class.Make.type (%Class.Make.type) = struct_value () [symbolic = %Class.Make (constants.%Class.Make)] -// CHECK:STDOUT: %Class.Make.specific_fn.loc10_18.2: = specific_function %Class.Make, @Class.Make(%T.loc8_30.1) [symbolic = %Class.Make.specific_fn.loc10_18.2 (constants.%Class.Make.specific_fn)] +// CHECK:STDOUT: %Class.Make.specific_fn.loc10_18.2: = specific_function %Class.Make, @Class.Make(%T.loc8_38.1) [symbolic = %Class.Make.specific_fn.loc10_18.2 (constants.%Class.Make.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @StaticMemberFunctionCall.%Class.loc8_49.1 (%Class) { +// CHECK:STDOUT: fn() -> out %return.param: @StaticMemberFunctionCall.%Class.loc8_56.1 (%Class) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref.loc10: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] -// CHECK:STDOUT: %T.ref.loc10: type = name_ref T, %T.loc8_30.2 [symbolic = %T.loc8_30.1 (constants.%T)] -// CHECK:STDOUT: %Class.loc10: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_49.1 (constants.%Class)] +// CHECK:STDOUT: %T.ref.loc10: type = name_ref T, %T.loc8_38.2 [symbolic = %T.loc8_38.1 (constants.%T)] +// CHECK:STDOUT: %Class.loc10: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_56.1 (constants.%Class)] // CHECK:STDOUT: %.loc10: @StaticMemberFunctionCall.%Class.Make.type (%Class.Make.type) = specific_constant @Class.%Class.Make.decl, @Class(constants.%T) [symbolic = %Class.Make (constants.%Class.Make)] // CHECK:STDOUT: %Make.ref: @StaticMemberFunctionCall.%Class.Make.type (%Class.Make.type) = name_ref Make, %.loc10 [symbolic = %Class.Make (constants.%Class.Make)] // CHECK:STDOUT: %Class.Make.specific_fn.loc10_18.1: = specific_function %Make.ref, @Class.Make(constants.%T) [symbolic = %Class.Make.specific_fn.loc10_18.2 (constants.%Class.Make.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: %Class.Make.call: init @StaticMemberFunctionCall.%Class.loc8_49.1 (%Class) to %.loc8_49.1 = call %Class.Make.specific_fn.loc10_18.1() +// CHECK:STDOUT: %Class.Make.call: init @StaticMemberFunctionCall.%Class.loc8_56.1 (%Class) to %.loc8_56.1 = call %Class.Make.specific_fn.loc10_18.1() // CHECK:STDOUT: return %Class.Make.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -468,12 +468,12 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @StaticMemberFunctionCall(constants.%T) { -// CHECK:STDOUT: %T.patt.loc8_30.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_30.1 => constants.%T -// CHECK:STDOUT: %Class.loc8_49.1 => constants.%Class -// CHECK:STDOUT: %.loc8_49.2 => constants.%.030 +// CHECK:STDOUT: %T.patt.loc8_38.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_38.1 => constants.%T +// CHECK:STDOUT: %Class.loc8_56.1 => constants.%Class +// CHECK:STDOUT: %.loc8_56.2 => constants.%.030 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.36e -// CHECK:STDOUT: %return.param_patt.loc8_49.2 => constants.%return.param_patt -// CHECK:STDOUT: %return.patt.loc8_39.2 => constants.%return.patt +// CHECK:STDOUT: %return.param_patt.loc8_56.2 => constants.%return.param_patt +// CHECK:STDOUT: %return.patt.loc8_46.2 => constants.%return.patt // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index 0c0ffcf97909..cf101e0a2b77 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -15,7 +15,7 @@ library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -class Class(T:! Core.Copy) { +class Class(T: Core.Copy) { fn F(n: T) -> T { return n; } @@ -33,7 +33,7 @@ class Class(T:! Core.Copy) { library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -class C(T:! Core.Copy) { +class C(T: Core.Copy) { fn F() { // CHECK:STDERR: fail_member_inline_missing_self_dot.carbon:[[@LINE+4]]:5: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: data; diff --git a/toolchain/check/testdata/class/generic/member_lookup.carbon b/toolchain/check/testdata/class/generic/member_lookup.carbon index cca2c9151976..550b32578cde 100644 --- a/toolchain/check/testdata/class/generic/member_lookup.carbon +++ b/toolchain/check/testdata/class/generic/member_lookup.carbon @@ -14,22 +14,22 @@ library "[[@TEST_NAME]]"; -base class Base(T:! type) { +base class Base(T: type) { var b: T; } -class Derived(T:! type) { +class Derived(T: type) { extend base: Base(T); var d: T; } -fn AccessDerived[T:! Core.Copy](x: Derived(T)) -> T { +fn AccessDerived[T: Core.Copy](x: Derived(T)) -> T { //@dump-sem-ir-begin return x.d; //@dump-sem-ir-end } -fn AccessBase[T:! Core.Copy](x: Derived(T)) -> T { +fn AccessBase[T: Core.Copy](x: Derived(T)) -> T { //@dump-sem-ir-begin return x.b; //@dump-sem-ir-end @@ -43,16 +43,16 @@ fn AccessConcrete(x: Derived(i32)) -> i32 { library "[[@TEST_NAME]]"; -base class Base(T:! type) { +base class Base(T: type) { var b: T; } -class Derived(T:! type) { +class Derived(T: type) { extend base: Base(T); var d: T; } -fn AccessMissingBase[T:! type](x: Base(T)) -> T { +fn AccessMissingBase[T: type](x: Base(T)) -> T { // CHECK:STDERR: fail_no_member.carbon:[[@LINE+4]]:10: error: member name `nonesuch` not found in `Base(T)` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: return x.nonesuch; // CHECK:STDERR: ^~~~~~~~~~ @@ -60,7 +60,7 @@ fn AccessMissingBase[T:! type](x: Base(T)) -> T { return x.nonesuch; } -fn AccessMissingDerived[T:! type](x: Derived(T)) -> T { +fn AccessMissingDerived[T: type](x: Derived(T)) -> T { // CHECK:STDERR: fail_no_member.carbon:[[@LINE+4]]:10: error: member name `nonesuch` not found in `Derived(T)` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: return x.nonesuch; // CHECK:STDERR: ^~~~~~~~~~ @@ -110,20 +110,20 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived.loc13_45.1, %T.as_type.loc13_45.1 [symbolic = %Derived.elem (constants.%Derived.elem.eb3)] -// CHECK:STDOUT: %require_complete.loc15: = require_complete_type %T.as_type.loc13_45.1 [symbolic = %require_complete.loc15 (constants.%require_complete.d83)] +// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived.loc13_44.1, %T.as_type.loc13_44.1 [symbolic = %Derived.elem (constants.%Derived.elem.eb3)] +// CHECK:STDOUT: %require_complete.loc15: = require_complete_type %T.as_type.loc13_44.1 [symbolic = %require_complete.loc15 (constants.%require_complete.d83)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%T.loc13_19.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.2)] // CHECK:STDOUT: %.loc15_11.5: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc13_19.1 [symbolic = %.loc15_11.5 (constants.%.c29)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc13_19.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c)] // CHECK:STDOUT: %impl.elem0.loc15_11.2: @AccessDerived.%.loc15_11.5 (%.c29) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_11.2 (constants.%impl.elem0.bd2)] // CHECK:STDOUT: %specific_impl_fn.loc15_11.2: = specific_impl_function %impl.elem0.loc15_11.2, @Copy.WithSelf.Op(%T.loc13_19.1) [symbolic = %specific_impl_fn.loc15_11.2 (constants.%specific_impl_fn.e2a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @AccessDerived.%Derived.loc13_45.1 (%Derived.e87)) -> out %return.param: @AccessDerived.%T.as_type.loc13_45.1 (%T.as_type) { +// CHECK:STDOUT: fn(%x.param: @AccessDerived.%Derived.loc13_44.1 (%Derived.e87)) -> out %return.param: @AccessDerived.%T.as_type.loc13_44.1 (%T.as_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @AccessDerived.%Derived.loc13_45.1 (%Derived.e87) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @AccessDerived.%Derived.loc13_44.1 (%Derived.e87) = name_ref x, %x // CHECK:STDOUT: %d.ref: @AccessDerived.%Derived.elem (%Derived.elem.eb3) = name_ref d, @Derived.%.loc10 [concrete = @Derived.%.loc10] -// CHECK:STDOUT: %.loc15_11.1: ref @AccessDerived.%T.as_type.loc13_45.1 (%T.as_type) = class_element_access %x.ref, element1 -// CHECK:STDOUT: %.loc15_11.2: @AccessDerived.%T.as_type.loc13_45.1 (%T.as_type) = acquire_value %.loc15_11.1 +// CHECK:STDOUT: %.loc15_11.1: ref @AccessDerived.%T.as_type.loc13_44.1 (%T.as_type) = class_element_access %x.ref, element1 +// CHECK:STDOUT: %.loc15_11.2: @AccessDerived.%T.as_type.loc13_44.1 (%T.as_type) = acquire_value %.loc15_11.1 // CHECK:STDOUT: %impl.elem0.loc15_11.1: @AccessDerived.%.loc15_11.5 (%.c29) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c, element0 [symbolic = %impl.elem0.loc15_11.2 (constants.%impl.elem0.bd2)] // CHECK:STDOUT: %bound_method.loc15_11.1: = bound_method %.loc15_11.2, %impl.elem0.loc15_11.1 // CHECK:STDOUT: %.loc15_11.3: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc13_19.1 (constants.%T.f84)] @@ -131,7 +131,7 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %specific_impl_fn.loc15_11.1: = specific_impl_function %impl.elem0.loc15_11.1, @Copy.WithSelf.Op(constants.%T.f84) [symbolic = %specific_impl_fn.loc15_11.2 (constants.%specific_impl_fn.e2a)] // CHECK:STDOUT: %bound_method.loc15_11.2: = bound_method %.loc15_11.2, %specific_impl_fn.loc15_11.1 // CHECK:STDOUT: -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @AccessDerived.%T.as_type.loc13_45.1 (%T.as_type) to %.loc13_51.1 = call %bound_method.loc15_11.2(%.loc15_11.2) +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @AccessDerived.%T.as_type.loc13_44.1 (%T.as_type) to %.loc13_50.1 = call %bound_method.loc15_11.2(%.loc15_11.2) // CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -143,25 +143,25 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Base: type = class_type @Base, @Base(%T.as_type.loc19_42.1) [symbolic = %Base (constants.%Base.146)] -// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %T.as_type.loc19_42.1 [symbolic = %Base.elem (constants.%Base.elem.209)] +// CHECK:STDOUT: %Base: type = class_type @Base, @Base(%T.as_type.loc19_41.1) [symbolic = %Base (constants.%Base.146)] +// CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %T.as_type.loc19_41.1 [symbolic = %Base.elem (constants.%Base.elem.209)] // CHECK:STDOUT: %require_complete.loc21_11: = require_complete_type %Base [symbolic = %require_complete.loc21_11 (constants.%require_complete.0fb)] -// CHECK:STDOUT: %require_complete.loc21_13: = require_complete_type %T.as_type.loc19_42.1 [symbolic = %require_complete.loc21_13 (constants.%require_complete.d83)] +// CHECK:STDOUT: %require_complete.loc21_13: = require_complete_type %T.as_type.loc19_41.1 [symbolic = %require_complete.loc21_13 (constants.%require_complete.d83)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%T.loc19_16.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.2)] // CHECK:STDOUT: %.loc21_11.8: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc19_16.1 [symbolic = %.loc21_11.8 (constants.%.c29)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc19_16.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c)] // CHECK:STDOUT: %impl.elem0.loc21_11.2: @AccessBase.%.loc21_11.8 (%.c29) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.bd2)] // CHECK:STDOUT: %specific_impl_fn.loc21_11.2: = specific_impl_function %impl.elem0.loc21_11.2, @Copy.WithSelf.Op(%T.loc19_16.1) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.e2a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @AccessBase.%Derived.loc19_42.1 (%Derived.e87)) -> out %return.param: @AccessBase.%T.as_type.loc19_42.1 (%T.as_type) { +// CHECK:STDOUT: fn(%x.param: @AccessBase.%Derived.loc19_41.1 (%Derived.e87)) -> out %return.param: @AccessBase.%T.as_type.loc19_41.1 (%T.as_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @AccessBase.%Derived.loc19_42.1 (%Derived.e87) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @AccessBase.%Derived.loc19_41.1 (%Derived.e87) = name_ref x, %x // CHECK:STDOUT: %b.ref: @AccessBase.%Base.elem (%Base.elem.209) = name_ref b, @Base.%.loc5 [concrete = @Base.%.loc5] // CHECK:STDOUT: %.loc21_11.1: @AccessBase.%Base (%Base.146) = as_compatible %x.ref // CHECK:STDOUT: %.loc21_11.2: ref @AccessBase.%Base (%Base.146) = class_element_access %.loc21_11.1, element0 // CHECK:STDOUT: %.loc21_11.3: ref @AccessBase.%Base (%Base.146) = converted %x.ref, %.loc21_11.2 -// CHECK:STDOUT: %.loc21_11.4: ref @AccessBase.%T.as_type.loc19_42.1 (%T.as_type) = class_element_access %.loc21_11.3, element0 -// CHECK:STDOUT: %.loc21_11.5: @AccessBase.%T.as_type.loc19_42.1 (%T.as_type) = acquire_value %.loc21_11.4 +// CHECK:STDOUT: %.loc21_11.4: ref @AccessBase.%T.as_type.loc19_41.1 (%T.as_type) = class_element_access %.loc21_11.3, element0 +// CHECK:STDOUT: %.loc21_11.5: @AccessBase.%T.as_type.loc19_41.1 (%T.as_type) = acquire_value %.loc21_11.4 // CHECK:STDOUT: %impl.elem0.loc21_11.1: @AccessBase.%.loc21_11.8 (%.c29) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.bd2)] // CHECK:STDOUT: %bound_method.loc21_11.1: = bound_method %.loc21_11.5, %impl.elem0.loc21_11.1 // CHECK:STDOUT: %.loc21_11.6: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc19_16.1 (constants.%T.f84)] @@ -169,7 +169,7 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %specific_impl_fn.loc21_11.1: = specific_impl_function %impl.elem0.loc21_11.1, @Copy.WithSelf.Op(constants.%T.f84) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.e2a)] // CHECK:STDOUT: %bound_method.loc21_11.2: = bound_method %.loc21_11.5, %specific_impl_fn.loc21_11.1 // CHECK:STDOUT: -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @AccessBase.%T.as_type.loc19_42.1 (%T.as_type) to %.loc19_48.1 = call %bound_method.loc21_11.2(%.loc21_11.5) +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @AccessBase.%T.as_type.loc19_41.1 (%T.as_type) to %.loc19_47.1 = call %bound_method.loc21_11.2(%.loc21_11.5) // CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -179,28 +179,28 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: specific @AccessDerived(constants.%T.f84) { // CHECK:STDOUT: %T.patt.loc13_19.2 => constants.%T.patt.fe6 // CHECK:STDOUT: %T.loc13_19.1 => constants.%T.f84 -// CHECK:STDOUT: %T.as_type.loc13_45.1 => constants.%T.as_type -// CHECK:STDOUT: %Derived.loc13_45.1 => constants.%Derived.e87 -// CHECK:STDOUT: %pattern_type.loc13_34 => constants.%pattern_type.ebc -// CHECK:STDOUT: %x.param_patt.loc13_34.2 => constants.%x.param_patt.203 -// CHECK:STDOUT: %x.patt.loc13_34.2 => constants.%x.patt.c37 -// CHECK:STDOUT: %.loc13_51.2 => constants.%.1ce700.2 -// CHECK:STDOUT: %pattern_type.loc13_51 => constants.%pattern_type.2c66b4.2 -// CHECK:STDOUT: %return.param_patt.loc13_51.2 => constants.%return.param_patt.bf4475.2 -// CHECK:STDOUT: %return.patt.loc13_48.2 => constants.%return.patt.f44 +// CHECK:STDOUT: %T.as_type.loc13_44.1 => constants.%T.as_type +// CHECK:STDOUT: %Derived.loc13_44.1 => constants.%Derived.e87 +// CHECK:STDOUT: %pattern_type.loc13_33 => constants.%pattern_type.ebc +// CHECK:STDOUT: %x.param_patt.loc13_33.2 => constants.%x.param_patt.203 +// CHECK:STDOUT: %x.patt.loc13_33.2 => constants.%x.patt.c37 +// CHECK:STDOUT: %.loc13_50.2 => constants.%.1ce700.2 +// CHECK:STDOUT: %pattern_type.loc13_50 => constants.%pattern_type.2c66b4.2 +// CHECK:STDOUT: %return.param_patt.loc13_50.2 => constants.%return.param_patt.bf4475.2 +// CHECK:STDOUT: %return.patt.loc13_47.2 => constants.%return.patt.f44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AccessBase(constants.%T.f84) { // CHECK:STDOUT: %T.patt.loc19_16.2 => constants.%T.patt.fe6 // CHECK:STDOUT: %T.loc19_16.1 => constants.%T.f84 -// CHECK:STDOUT: %T.as_type.loc19_42.1 => constants.%T.as_type -// CHECK:STDOUT: %Derived.loc19_42.1 => constants.%Derived.e87 -// CHECK:STDOUT: %pattern_type.loc19_31 => constants.%pattern_type.ebc -// CHECK:STDOUT: %x.param_patt.loc19_31.2 => constants.%x.param_patt.203 -// CHECK:STDOUT: %x.patt.loc19_31.2 => constants.%x.patt.c37 -// CHECK:STDOUT: %.loc19_48.2 => constants.%.1ce700.2 -// CHECK:STDOUT: %pattern_type.loc19_48 => constants.%pattern_type.2c66b4.2 -// CHECK:STDOUT: %return.param_patt.loc19_48.2 => constants.%return.param_patt.bf4475.2 -// CHECK:STDOUT: %return.patt.loc19_45.2 => constants.%return.patt.f44 +// CHECK:STDOUT: %T.as_type.loc19_41.1 => constants.%T.as_type +// CHECK:STDOUT: %Derived.loc19_41.1 => constants.%Derived.e87 +// CHECK:STDOUT: %pattern_type.loc19_30 => constants.%pattern_type.ebc +// CHECK:STDOUT: %x.param_patt.loc19_30.2 => constants.%x.param_patt.203 +// CHECK:STDOUT: %x.patt.loc19_30.2 => constants.%x.patt.c37 +// CHECK:STDOUT: %.loc19_47.2 => constants.%.1ce700.2 +// CHECK:STDOUT: %pattern_type.loc19_47 => constants.%pattern_type.2c66b4.2 +// CHECK:STDOUT: %return.param_patt.loc19_47.2 => constants.%return.param_patt.bf4475.2 +// CHECK:STDOUT: %return.patt.loc19_44.2 => constants.%return.patt.f44 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_out_of_line.carbon b/toolchain/check/testdata/class/generic/member_out_of_line.carbon index aed951b27d3c..f8343c3b252a 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -15,17 +15,17 @@ library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -class Class(T:! Core.Copy) { +class Class(T: Core.Copy) { fn F(n: T) -> T; fn G(self) -> T; var n: T; } -fn Class(T:! Core.Copy).F(n: T) -> T { +fn Class(T: Core.Copy).F(n: T) -> T { return n; } -fn Class(T:! Core.Copy).G(self) -> T { +fn Class(T: Core.Copy).G(self) -> T { return self.n; } //@dump-sem-ir-end @@ -35,13 +35,13 @@ fn Class(T:! Core.Copy).G(self) -> T { library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -class A(T:! type) { - class B(_:! T) { +class A(T: type) { + class B(_: T) { fn F(self, a: T); } } -fn A(T:! type).B(_:! T).F(unused self, unused a: T) {} +fn A(T: type).B(_: T).F(unused self, unused a: T) {} //@dump-sem-ir-end // --- fail_mismatched_not_generic_vs_generic.carbon @@ -53,19 +53,19 @@ class NotGeneric { } // CHECK:STDERR: fail_mismatched_not_generic_vs_generic.carbon:[[@LINE+7]]:4: error: redeclaration differs because of parameter list [RedeclParamListDiffers] -// CHECK:STDERR: fn NotGeneric(unused T:! type).F() {} +// CHECK:STDERR: fn NotGeneric(unused T: type).F() {} // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: fail_mismatched_not_generic_vs_generic.carbon:[[@LINE-7]]:1: note: previously declared without parameter list [RedeclParamListPrevious] // CHECK:STDERR: class NotGeneric { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn NotGeneric(unused T:! type).F() {} +fn NotGeneric(unused T: type).F() {} // --- fail_mismatched_too_few_args.carbon library "[[@TEST_NAME]]"; -class Generic(unused T:! type) { +class Generic(unused T: type) { fn TooFew(); } @@ -73,8 +73,8 @@ class Generic(unused T:! type) { // CHECK:STDERR: fn Generic().TooFew() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_mismatched_too_few_args.carbon:[[@LINE-7]]:1: note: previously declared with parameter count of 1 [RedeclParamCountPrevious] -// CHECK:STDERR: class Generic(unused T:! type) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class Generic(unused T: type) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn Generic().TooFew() {} @@ -82,35 +82,35 @@ fn Generic().TooFew() {} library "[[@TEST_NAME]]"; -class Generic(T:! type) { +class Generic(T: type) { fn TooMany(); } // CHECK:STDERR: fail_mismatched_too_many_args.carbon:[[@LINE+7]]:4: error: redeclaration differs because of parameter count of 2 [RedeclParamCountDiffers] -// CHECK:STDERR: fn Generic(unused T:! type, unused U:! type).TooMany() {} +// CHECK:STDERR: fn Generic(unused T: type, unused U: type).TooMany() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_mismatched_too_many_args.carbon:[[@LINE-7]]:1: note: previously declared with parameter count of 1 [RedeclParamCountPrevious] -// CHECK:STDERR: class Generic(T:! type) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class Generic(T: type) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn Generic(unused T:! type, unused U:! type).TooMany() {} +fn Generic(unused T: type, unused U: type).TooMany() {} // --- fail_mismatched_wrong_arg_type.carbon library "[[@TEST_NAME]]"; -class Generic(unused T:! type) { +class Generic(unused T: type) { fn WrongType(); } // CHECK:STDERR: fail_mismatched_wrong_arg_type.carbon:[[@LINE+7]]:19: error: type `` of parameter 1 in redeclaration differs from previous parameter type `` [RedeclParamDiffersType] -// CHECK:STDERR: fn Generic(unused T:! ()).WrongType() {} -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: fn Generic(unused T: ()).WrongType() {} +// CHECK:STDERR: ^~~~~ // CHECK:STDERR: fail_mismatched_wrong_arg_type.carbon:[[@LINE-7]]:22: note: previous declaration's corresponding parameter here [RedeclParamPrevious] -// CHECK:STDERR: class Generic(unused T:! type) { -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: class Generic(unused T: type) { +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -fn Generic(unused T:! ()).WrongType() {} +fn Generic(unused T: ()).WrongType() {} // CHECK:STDOUT: --- basic.carbon @@ -176,23 +176,23 @@ fn Generic(unused T:! ()).WrongType() {} // CHECK:STDOUT: %n.param_patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %n.param_patt.loc6 (constants.%n.param_patt)] // CHECK:STDOUT: %n.patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern n, %n.param_patt.loc11 [symbolic = %n.patt.loc6 (constants.%n.patt.8c9)] // CHECK:STDOUT: %return.param_patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc6 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc11, %.loc11_36.2 [symbolic = %return.patt.loc6 (constants.%return.patt.f44)] +// CHECK:STDOUT: %return.patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc11, %.loc11_35.2 [symbolic = %return.patt.loc6 (constants.%return.patt.f44)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_18: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { +// CHECK:STDOUT: %.loc11_17: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc11: %Copy.type = symbolic_binding T, 0 [symbolic = @Class.%T.loc5_14.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.ref.loc11_36: %Copy.type = name_ref T, %T.loc11 [symbolic = %T.loc6 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc11_36: type = facet_access_type %T.ref.loc11_36 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc11_36.2: type = converted %T.ref.loc11_36, %T.as_type.loc11_36 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc11_36.3: Core.Form = init_form %.loc11_36.2 [symbolic = %.loc6_17.1 (constants.%.1ce700.2)] +// CHECK:STDOUT: %T.ref.loc11_35: %Copy.type = name_ref T, %T.loc11 [symbolic = %T.loc6 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc11_35: type = facet_access_type %T.ref.loc11_35 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc11_35.2: type = converted %T.ref.loc11_35, %T.as_type.loc11_35 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc11_35.3: Core.Form = init_form %.loc11_35.2 [symbolic = %.loc6_17.1 (constants.%.1ce700.2)] // CHECK:STDOUT: %n.param.loc11: @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc11_30.1: type = splice_block %.loc11_30.2 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc11_30: %Copy.type = name_ref T, %T.loc11 [symbolic = %T.loc6 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc11_30: type = facet_access_type %T.ref.loc11_30 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc11_30.2: type = converted %T.ref.loc11_30, %T.as_type.loc11_30 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc11_29.1: type = splice_block %.loc11_29.2 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref.loc11_29: %Copy.type = name_ref T, %T.loc11 [symbolic = %T.loc6 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc11_29: type = facet_access_type %T.ref.loc11_29 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc11_29.2: type = converted %T.ref.loc11_29, %T.as_type.loc11_29 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %n.loc11: @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = wrapper_binding n, %n.param.loc11 // CHECK:STDOUT: %return.param.loc11: ref @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = out_param call_param1 @@ -202,9 +202,9 @@ fn Generic(unused T:! ()).WrongType() {} // CHECK:STDOUT: %self.param_patt.loc15: @Class.G.%pattern_type.loc7_8 (%pattern_type.e18) = value_param_pattern [symbolic = %self.param_patt.loc7 (constants.%self.param_patt.aaa)] // CHECK:STDOUT: %self.patt.loc15: @Class.G.%pattern_type.loc7_8 (%pattern_type.e18) = at_binding_pattern self, %self.param_patt.loc15 [symbolic = %self.patt.loc7 (constants.%self.patt.d8a)] // CHECK:STDOUT: %return.param_patt.loc15: @Class.G.%pattern_type.loc7_17 (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc7 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc15: @Class.G.%pattern_type.loc7_17 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc15, %.loc15_36.2 [symbolic = %return.patt.loc7 (constants.%return.patt.f44)] +// CHECK:STDOUT: %return.patt.loc15: @Class.G.%pattern_type.loc7_17 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc15, %.loc15_35.2 [symbolic = %return.patt.loc7 (constants.%return.patt.f44)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_18: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { +// CHECK:STDOUT: %.loc15_17: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type] @@ -212,12 +212,12 @@ fn Generic(unused T:! ()).WrongType() {} // CHECK:STDOUT: %T.loc15: %Copy.type = symbolic_binding T, 0 [symbolic = @Class.%T.loc5_14.1 (constants.%T.f84)] // CHECK:STDOUT: %T.ref.loc15: %Copy.type = name_ref T, %T.loc15 [symbolic = %T.loc7 (constants.%T.f84)] // CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc15_36.2: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc15_36.3: Core.Form = init_form %.loc15_36.2 [symbolic = %.loc7_17.1 (constants.%.1ce700.2)] +// CHECK:STDOUT: %.loc15_35.2: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc15_35.3: Core.Form = init_form %.loc15_35.2 [symbolic = %.loc7_17.1 (constants.%.1ce700.2)] // CHECK:STDOUT: %self.param.loc15: @Class.G.%Class (%Class) = value_param call_param0 -// CHECK:STDOUT: %.loc15_27.1: type = splice_block %Self.ref.loc15 [symbolic = %Class (constants.%Class)] { -// CHECK:STDOUT: %.loc15_27.2: type = specific_constant constants.%Class, @Class(constants.%T.f84) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %Self.ref.loc15: type = name_ref Self, %.loc15_27.2 [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %.loc15_26.1: type = splice_block %Self.ref.loc15 [symbolic = %Class (constants.%Class)] { +// CHECK:STDOUT: %.loc15_26.2: type = specific_constant constants.%Class, @Class(constants.%T.f84) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref.loc15: type = name_ref Self, %.loc15_26.2 [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: } // CHECK:STDOUT: %self.loc15: @Class.G.%Class (%Class) = wrapper_binding self, %self.param.loc15 // CHECK:STDOUT: %return.param.loc15: ref @Class.G.%T.as_type.loc7_17.1 (%T.as_type) = out_param call_param1 @@ -248,7 +248,7 @@ fn Generic(unused T:! ()).WrongType() {} // CHECK:STDOUT: %n.param_patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %n.param_patt.loc6 (constants.%n.param_patt)] // CHECK:STDOUT: %n.patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern n, %n.param_patt.loc11 [symbolic = %n.patt.loc6 (constants.%n.patt.8c9)] // CHECK:STDOUT: %return.param_patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc6 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc11, %.loc11_36.2 [symbolic = %return.patt.loc6 (constants.%return.patt.f44)] +// CHECK:STDOUT: %return.patt.loc11: @Class.F.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc11, %.loc11_35.2 [symbolic = %return.patt.loc6 (constants.%return.patt.f44)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_17: %Copy.type = name_ref T, @Class.%T.loc5_14.2 [symbolic = %T.loc6 (constants.%T.f84)] // CHECK:STDOUT: %T.as_type.loc6_17: type = facet_access_type %T.ref.loc6_17 [symbolic = %T.as_type.loc6_11.1 (constants.%T.as_type)] @@ -268,7 +268,7 @@ fn Generic(unused T:! ()).WrongType() {} // CHECK:STDOUT: %self.param_patt.loc15: @Class.G.%pattern_type.loc7_8 (%pattern_type.e18) = value_param_pattern [symbolic = %self.param_patt.loc7 (constants.%self.param_patt.aaa)] // CHECK:STDOUT: %self.patt.loc15: @Class.G.%pattern_type.loc7_8 (%pattern_type.e18) = at_binding_pattern self, %self.param_patt.loc15 [symbolic = %self.patt.loc7 (constants.%self.patt.d8a)] // CHECK:STDOUT: %return.param_patt.loc15: @Class.G.%pattern_type.loc7_17 (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc7 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc15: @Class.G.%pattern_type.loc7_17 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc15, %.loc15_36.2 [symbolic = %return.patt.loc7 (constants.%return.patt.f44)] +// CHECK:STDOUT: %return.patt.loc15: @Class.G.%pattern_type.loc7_17 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc15, %.loc15_35.2 [symbolic = %return.patt.loc7 (constants.%return.patt.f44)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc7: %Copy.type = name_ref T, @Class.%T.loc5_14.2 [symbolic = %T.loc7 (constants.%T.f84)] // CHECK:STDOUT: %T.as_type.loc7_17.2: type = facet_access_type %T.ref.loc7 [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)] @@ -323,8 +323,8 @@ fn Generic(unused T:! ()).WrongType() {} // CHECK:STDOUT: %.loc12_10.2: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc6 (constants.%T.f84)] // CHECK:STDOUT: %specific_impl_fn.loc12_10.1: = specific_impl_function %impl.elem0.loc12_10.1, @Copy.WithSelf.Op(constants.%T.f84) [symbolic = %specific_impl_fn.loc12_10.2 (constants.%specific_impl_fn.e2a)] // CHECK:STDOUT: %bound_method.loc12_10.2: = bound_method %n.ref, %specific_impl_fn.loc12_10.1 -// CHECK:STDOUT: %.loc11_36.1: ref @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = splice_block %return.param.loc11 {} -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Class.F.%T.as_type.loc6_11.1 (%T.as_type) to %.loc11_36.1 = call %bound_method.loc12_10.2(%n.ref) +// CHECK:STDOUT: %.loc11_35.1: ref @Class.F.%T.as_type.loc6_11.1 (%T.as_type) = splice_block %return.param.loc11 {} +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Class.F.%T.as_type.loc6_11.1 (%T.as_type) to %.loc11_35.1 = call %bound_method.loc12_10.2(%n.ref) // CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -365,8 +365,8 @@ fn Generic(unused T:! ()).WrongType() {} // CHECK:STDOUT: %.loc16_14.4: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc7 (constants.%T.f84)] // CHECK:STDOUT: %specific_impl_fn.loc16_14.1: = specific_impl_function %impl.elem0.loc16_14.1, @Copy.WithSelf.Op(constants.%T.f84) [symbolic = %specific_impl_fn.loc16_14.2 (constants.%specific_impl_fn.e2a)] // CHECK:STDOUT: %bound_method.loc16_14.2: = bound_method %.loc16_14.2, %specific_impl_fn.loc16_14.1 -// CHECK:STDOUT: %.loc15_36.1: ref @Class.G.%T.as_type.loc7_17.1 (%T.as_type) = splice_block %return.param.loc15 {} -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Class.G.%T.as_type.loc7_17.1 (%T.as_type) to %.loc15_36.1 = call %bound_method.loc16_14.2(%.loc16_14.2) +// CHECK:STDOUT: %.loc15_35.1: ref @Class.G.%T.as_type.loc7_17.1 (%T.as_type) = splice_block %return.param.loc15 {} +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Class.G.%T.as_type.loc7_17.1 (%T.as_type) to %.loc15_35.1 = call %bound_method.loc16_14.2(%.loc16_14.2) // CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -450,9 +450,9 @@ fn Generic(unused T:! ()).WrongType() {} // CHECK:STDOUT: %A.decl: %A.type = class_decl @A [concrete = constants.%A.generic] { // CHECK:STDOUT: %T.patt.loc5_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_13.1: type = splice_block %.loc5_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_12.1: type = splice_block %.loc5_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_10.1 (constants.%T)] // CHECK:STDOUT: } @@ -462,24 +462,24 @@ fn Generic(unused T:! ()).WrongType() {} // CHECK:STDOUT: %a.param_patt.loc11: @B.F.%pattern_type.loc7_17 (%pattern_type.51d) = value_param_pattern [symbolic = %a.param_patt.loc7 (constants.%a.param_patt)] // CHECK:STDOUT: %a.patt.loc11: @B.F.%pattern_type.loc7_17 (%pattern_type.51d) = at_binding_pattern a, %a.param_patt.loc11 [symbolic = %a.patt.loc7 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_10.1: type = splice_block %.loc11_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc11_9.1: type = splice_block %.loc11_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc11_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc11_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc11_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc11: type = symbolic_binding T, 0 [symbolic = @A.%T.loc5_10.1 (constants.%T)] -// CHECK:STDOUT: %.loc11_22: type = splice_block %T.ref.loc11_22 [symbolic = @B.%T (constants.%T)] { -// CHECK:STDOUT: %.Self.frozen.loc11_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %T.ref.loc11_22: type = name_ref T, %T.loc11 [symbolic = @B.%T (constants.%T)] +// CHECK:STDOUT: %.loc11_20: type = splice_block %T.ref.loc11_20 [symbolic = @B.%T (constants.%T)] { +// CHECK:STDOUT: %.Self.frozen.loc11_18: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %T.ref.loc11_20: type = name_ref T, %T.loc11 [symbolic = @B.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %_.loc11: @B.%T (%T) = symbolic_binding _, 1 [symbolic = @B.%_.loc6_12.1 (constants.%_)] // CHECK:STDOUT: %self.param.loc11: @B.F.%B (%B) = value_param call_param0 -// CHECK:STDOUT: %.loc11_34.1: type = splice_block %Self.ref.loc11 [symbolic = %B (constants.%B)] { -// CHECK:STDOUT: %.loc11_34.2: type = specific_constant constants.%B, @B(constants.%T, constants.%_) [symbolic = %B (constants.%B)] -// CHECK:STDOUT: %Self.ref.loc11: type = name_ref Self, %.loc11_34.2 [symbolic = %B (constants.%B)] +// CHECK:STDOUT: %.loc11_32.1: type = splice_block %Self.ref.loc11 [symbolic = %B (constants.%B)] { +// CHECK:STDOUT: %.loc11_32.2: type = specific_constant constants.%B, @B(constants.%T, constants.%_) [symbolic = %B (constants.%B)] +// CHECK:STDOUT: %Self.ref.loc11: type = name_ref Self, %.loc11_32.2 [symbolic = %B (constants.%B)] // CHECK:STDOUT: } // CHECK:STDOUT: %self.loc11: @B.F.%B (%B) = wrapper_binding self, %self.param.loc11 // CHECK:STDOUT: %a.param.loc11: @B.F.%T.loc7 (%T) = value_param call_param1 -// CHECK:STDOUT: %T.ref.loc11_50: type = name_ref T, %T.loc11 [symbolic = %T.loc7 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc11_48: type = name_ref T, %T.loc11 [symbolic = %T.loc7 (constants.%T)] // CHECK:STDOUT: %a.loc11: @B.F.%T.loc7 (%T) = wrapper_binding a, %a.param.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -561,8 +561,8 @@ fn Generic(unused T:! ()).WrongType() {} // CHECK:STDOUT: %a.patt.loc7: @B.F.%pattern_type.loc7_17 (%pattern_type.51d) = at_binding_pattern a, %a.param_patt.loc7 [symbolic = %a.patt.loc7 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc11_34: = require_complete_type %B [symbolic = %require_complete.loc11_34 (constants.%require_complete.0e8)] -// CHECK:STDOUT: %require_complete.loc11_48: = require_complete_type %T.loc7 [symbolic = %require_complete.loc11_48 (constants.%require_complete.944)] +// CHECK:STDOUT: %require_complete.loc11_32: = require_complete_type %B [symbolic = %require_complete.loc11_32 (constants.%require_complete.0e8)] +// CHECK:STDOUT: %require_complete.loc11_46: = require_complete_type %T.loc7 [symbolic = %require_complete.loc11_46 (constants.%require_complete.944)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param.loc11: @B.F.%B (%B), %a.param.loc11: @B.F.%T.loc7 (%T)) { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/class/generic/member_type.carbon b/toolchain/check/testdata/class/generic/member_type.carbon index caaff69413d1..9ddc220c22c5 100644 --- a/toolchain/check/testdata/class/generic/member_type.carbon +++ b/toolchain/check/testdata/class/generic/member_type.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -class Outer(T:! Core.Copy) { +class Outer(T: Core.Copy) { class Inner { var n: T; } @@ -33,7 +33,7 @@ fn Test() -> i32 { library "[[@TEST_NAME]]"; -class Outer(T:! type) { +class Outer(T: type) { interface Inner { fn F(self) -> T; } @@ -598,9 +598,9 @@ fn Test() -> i32 { // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/method_deduce.carbon b/toolchain/check/testdata/class/generic/method_deduce.carbon index 359287cb2b32..98d419b45b2c 100644 --- a/toolchain/check/testdata/class/generic/method_deduce.carbon +++ b/toolchain/check/testdata/class/generic/method_deduce.carbon @@ -15,10 +15,10 @@ class A {} class B {} -class Class(T:! type) { - fn Get(U:! type) -> (T, U) { return Get(U); } - fn GetNoDeduce(x: T, U:! type) -> (T, U) { return GetNoDeduce(x, U); } - fn F[U:! type](self: Class(U)) -> U { return self.F(); } +class Class(T: type) { + fn Get(generic U: type) -> (T, U) { return Get(U); } + fn GetNoDeduce(x: T, generic U: type) -> (T, U) { return GetNoDeduce(x, U); } + fn F[U: type](self: Class(U)) -> U { return self.F(); } } fn CallGenericMethod(c: Class(A)) -> (A, B) { @@ -156,9 +156,9 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc18_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_17.1: type = splice_block %.loc18_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc18_16.1: type = splice_block %.loc18_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc18_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc18_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc18_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc18_14.1 (constants.%T)] // CHECK:STDOUT: } @@ -254,67 +254,67 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Class.Get.decl: @Class.%Class.Get.type (%Class.Get.type.49d) = fn_decl @Class.Get [symbolic = @Class.%Class.Get (constants.%Class.Get.ceb)] { -// CHECK:STDOUT: %U.patt.loc19_11.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc19_11.2 (constants.%U.patt)] -// CHECK:STDOUT: %return.param_patt.loc19_28.1: @Class.Get.%pattern_type (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc19_28.2 (constants.%return.param_patt.a41)] -// CHECK:STDOUT: %return.patt.loc19_20.1: @Class.Get.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc19_28.1, %.loc19_28.4 [symbolic = %return.patt.loc19_20.2 (constants.%return.patt.453)] +// CHECK:STDOUT: %U.patt.loc19_19.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc19_19.2 (constants.%U.patt)] +// CHECK:STDOUT: %return.param_patt.loc19_35.1: @Class.Get.%pattern_type (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc19_35.2 (constants.%return.param_patt.a41)] +// CHECK:STDOUT: %return.patt.loc19_27.1: @Class.Get.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc19_35.1, %.loc19_35.4 [symbolic = %return.patt.loc19_27.2 (constants.%return.patt.453)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc18_14.2 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %U.ref.loc19_27: type = name_ref U, %U.loc19_11.2 [symbolic = %U.loc19_11.1 (constants.%U)] -// CHECK:STDOUT: %.loc19_28.3: %tuple.type.24b = tuple_literal (%T.ref, %U.ref.loc19_27) [symbolic = %tuple (constants.%tuple.4b9)] -// CHECK:STDOUT: %.loc19_28.4: type = converted %.loc19_28.3, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)] -// CHECK:STDOUT: %.loc19_28.5: Core.Form = init_form %.loc19_28.4 [symbolic = %.loc19_28.2 (constants.%.f18)] -// CHECK:STDOUT: %.loc19_14.1: type = splice_block %.loc19_14.2 [concrete = type] { +// CHECK:STDOUT: %U.ref.loc19_34: type = name_ref U, %U.loc19_19.2 [symbolic = %U.loc19_19.1 (constants.%U)] +// CHECK:STDOUT: %.loc19_35.3: %tuple.type.24b = tuple_literal (%T.ref, %U.ref.loc19_34) [symbolic = %tuple (constants.%tuple.4b9)] +// CHECK:STDOUT: %.loc19_35.4: type = converted %.loc19_35.3, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %.loc19_35.5: Core.Form = init_form %.loc19_35.4 [symbolic = %.loc19_35.2 (constants.%.f18)] +// CHECK:STDOUT: %.loc19_21.1: type = splice_block %.loc19_21.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc19_14.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc19_21.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc19_11.2: type = symbolic_binding U, 1 [symbolic = %U.loc19_11.1 (constants.%U)] +// CHECK:STDOUT: %U.loc19_19.2: type = symbolic_binding U, 1 [symbolic = %U.loc19_19.1 (constants.%U)] // CHECK:STDOUT: %return.param: ref @Class.Get.%tuple.type (%tuple.type.a5e) = out_param call_param0 // CHECK:STDOUT: %return: ref @Class.Get.%tuple.type (%tuple.type.a5e) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Class.GetNoDeduce.decl: @Class.%Class.GetNoDeduce.type (%Class.GetNoDeduce.type.83e) = fn_decl @Class.GetNoDeduce [symbolic = @Class.%Class.GetNoDeduce (constants.%Class.GetNoDeduce.a04)] { // CHECK:STDOUT: %x.param_patt.loc20_19.1: @Class.GetNoDeduce.%pattern_type.loc20_19 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc20_19.2 (constants.%x.param_patt.91d)] // CHECK:STDOUT: %x.patt.loc20_19.1: @Class.GetNoDeduce.%pattern_type.loc20_19 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc20_19.1 [symbolic = %x.patt.loc20_19.2 (constants.%x.patt.800)] -// CHECK:STDOUT: %U.patt.loc20_25.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc20_25.2 (constants.%U.patt)] -// CHECK:STDOUT: %return.param_patt.loc20_42.1: @Class.GetNoDeduce.%pattern_type.loc20_42 (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc20_42.2 (constants.%return.param_patt.a41)] -// CHECK:STDOUT: %return.patt.loc20_34.1: @Class.GetNoDeduce.%pattern_type.loc20_42 (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc20_42.1, %.loc20_42.4 [symbolic = %return.patt.loc20_34.2 (constants.%return.patt.453)] +// CHECK:STDOUT: %U.patt.loc20_33.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc20_33.2 (constants.%U.patt)] +// CHECK:STDOUT: %return.param_patt.loc20_49.1: @Class.GetNoDeduce.%pattern_type.loc20_49 (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc20_49.2 (constants.%return.param_patt.a41)] +// CHECK:STDOUT: %return.patt.loc20_41.1: @Class.GetNoDeduce.%pattern_type.loc20_49 (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc20_49.1, %.loc20_49.4 [symbolic = %return.patt.loc20_41.2 (constants.%return.patt.453)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc20_38: type = name_ref T, @Class.%T.loc18_14.2 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %U.ref.loc20_41: type = name_ref U, %U.loc20_25.2 [symbolic = %U.loc20_25.1 (constants.%U)] -// CHECK:STDOUT: %.loc20_42.3: %tuple.type.24b = tuple_literal (%T.ref.loc20_38, %U.ref.loc20_41) [symbolic = %tuple (constants.%tuple.4b9)] -// CHECK:STDOUT: %.loc20_42.4: type = converted %.loc20_42.3, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)] -// CHECK:STDOUT: %.loc20_42.5: Core.Form = init_form %.loc20_42.4 [symbolic = %.loc20_42.2 (constants.%.f18)] +// CHECK:STDOUT: %T.ref.loc20_45: type = name_ref T, @Class.%T.loc18_14.2 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %U.ref.loc20_48: type = name_ref U, %U.loc20_33.2 [symbolic = %U.loc20_33.1 (constants.%U)] +// CHECK:STDOUT: %.loc20_49.3: %tuple.type.24b = tuple_literal (%T.ref.loc20_45, %U.ref.loc20_48) [symbolic = %tuple (constants.%tuple.4b9)] +// CHECK:STDOUT: %.loc20_49.4: type = converted %.loc20_49.3, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %.loc20_49.5: Core.Form = init_form %.loc20_49.4 [symbolic = %.loc20_49.2 (constants.%.f18)] // CHECK:STDOUT: %x.param: @Class.GetNoDeduce.%T (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref.loc20_21: type = name_ref T, @Class.%T.loc18_14.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %x: @Class.GetNoDeduce.%T (%T) = wrapper_binding x, %x.param -// CHECK:STDOUT: %.loc20_28.1: type = splice_block %.loc20_28.2 [concrete = type] { +// CHECK:STDOUT: %.loc20_35.1: type = splice_block %.loc20_35.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc20_28.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc20_35.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc20_25.2: type = symbolic_binding U, 1 [symbolic = %U.loc20_25.1 (constants.%U)] +// CHECK:STDOUT: %U.loc20_33.2: type = symbolic_binding U, 1 [symbolic = %U.loc20_33.1 (constants.%U)] // CHECK:STDOUT: %return.param: ref @Class.GetNoDeduce.%tuple.type (%tuple.type.a5e) = out_param call_param1 // CHECK:STDOUT: %return: ref @Class.GetNoDeduce.%tuple.type (%tuple.type.a5e) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Class.F.decl: @Class.%Class.F.type (%Class.F.type.982) = fn_decl @Class.F [symbolic = @Class.%Class.F (constants.%Class.F.c63)] { // CHECK:STDOUT: %U.patt.loc21_9.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc21_9.2 (constants.%U.patt)] -// CHECK:STDOUT: %self.param_patt.loc21_22.1: @Class.F.%pattern_type.loc21_22 (%pattern_type.cc0) = value_param_pattern [symbolic = %self.param_patt.loc21_22.2 (constants.%self.param_patt.814)] -// CHECK:STDOUT: %self.patt.loc21_22.1: @Class.F.%pattern_type.loc21_22 (%pattern_type.cc0) = at_binding_pattern self, %self.param_patt.loc21_22.1 [symbolic = %self.patt.loc21_22.2 (constants.%self.patt.868)] -// CHECK:STDOUT: %return.param_patt.loc21_37.1: @Class.F.%pattern_type.loc21_37 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc21_37.2 (constants.%return.param_patt.6dd)] -// CHECK:STDOUT: %return.patt.loc21_34.1: @Class.F.%pattern_type.loc21_37 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc21_37.1, %U.ref.loc21_37 [symbolic = %return.patt.loc21_34.2 (constants.%return.patt.4dd)] +// CHECK:STDOUT: %self.param_patt.loc21_21.1: @Class.F.%pattern_type.loc21_21 (%pattern_type.cc0) = value_param_pattern [symbolic = %self.param_patt.loc21_21.2 (constants.%self.param_patt.814)] +// CHECK:STDOUT: %self.patt.loc21_21.1: @Class.F.%pattern_type.loc21_21 (%pattern_type.cc0) = at_binding_pattern self, %self.param_patt.loc21_21.1 [symbolic = %self.patt.loc21_21.2 (constants.%self.patt.868)] +// CHECK:STDOUT: %return.param_patt.loc21_36.1: @Class.F.%pattern_type.loc21_36 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc21_36.2 (constants.%return.param_patt.6dd)] +// CHECK:STDOUT: %return.patt.loc21_33.1: @Class.F.%pattern_type.loc21_36 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc21_36.1, %U.ref.loc21_36 [symbolic = %return.patt.loc21_33.2 (constants.%return.patt.4dd)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref.loc21_37: type = name_ref U, %U.loc21_9.2 [symbolic = %U.loc21_9.1 (constants.%U)] -// CHECK:STDOUT: %.loc21_37.3: Core.Form = init_form %U.ref.loc21_37 [symbolic = %.loc21_37.2 (constants.%.822)] -// CHECK:STDOUT: %.loc21_12.1: type = splice_block %.loc21_12.2 [concrete = type] { +// CHECK:STDOUT: %U.ref.loc21_36: type = name_ref U, %U.loc21_9.2 [symbolic = %U.loc21_9.1 (constants.%U)] +// CHECK:STDOUT: %.loc21_36.3: Core.Form = init_form %U.ref.loc21_36 [symbolic = %.loc21_36.2 (constants.%.822)] +// CHECK:STDOUT: %.loc21_11.1: type = splice_block %.loc21_11.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc21_12.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc21_11.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc21_9.2: type = symbolic_binding U, 1 [symbolic = %U.loc21_9.1 (constants.%U)] -// CHECK:STDOUT: %self.param: @Class.F.%Class.loc21_31.1 (%Class.d74) = value_param call_param0 -// CHECK:STDOUT: %.loc21_31: type = splice_block %Class.loc21_31.2 [symbolic = %Class.loc21_31.1 (constants.%Class.d74)] { +// CHECK:STDOUT: %self.param: @Class.F.%Class.loc21_30.1 (%Class.d74) = value_param call_param0 +// CHECK:STDOUT: %.loc21_30: type = splice_block %Class.loc21_30.2 [symbolic = %Class.loc21_30.1 (constants.%Class.d74)] { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] -// CHECK:STDOUT: %U.ref.loc21_30: type = name_ref U, %U.loc21_9.2 [symbolic = %U.loc21_9.1 (constants.%U)] -// CHECK:STDOUT: %Class.loc21_31.2: type = class_type @Class, @Class(constants.%U) [symbolic = %Class.loc21_31.1 (constants.%Class.d74)] +// CHECK:STDOUT: %U.ref.loc21_29: type = name_ref U, %U.loc21_9.2 [symbolic = %U.loc21_9.1 (constants.%U)] +// CHECK:STDOUT: %Class.loc21_30.2: type = class_type @Class, @Class(constants.%U) [symbolic = %Class.loc21_30.1 (constants.%Class.d74)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Class.F.%Class.loc21_31.1 (%Class.d74) = wrapper_binding self, %self.param +// CHECK:STDOUT: %self: @Class.F.%Class.loc21_30.1 (%Class.d74) = wrapper_binding self, %self.param // CHECK:STDOUT: %return.param: ref @Class.F.%U.loc21_9.1 (%U) = out_param call_param1 // CHECK:STDOUT: %return: ref @Class.F.%U.loc21_9.1 (%U) = return_slot %return.param // CHECK:STDOUT: } @@ -331,66 +331,66 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Class.Get(@Class.%T.loc18_14.2: type, %U.loc19_11.2: type) { -// CHECK:STDOUT: %U.patt.loc19_11.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc19_11.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc19_11.1: type = symbolic_binding U, 1 [symbolic = %U.loc19_11.1 (constants.%U)] +// CHECK:STDOUT: generic fn @Class.Get(@Class.%T.loc18_14.2: type, %U.loc19_19.2: type) { +// CHECK:STDOUT: %U.patt.loc19_19.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc19_19.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc19_19.1: type = symbolic_binding U, 1 [symbolic = %U.loc19_19.1 (constants.%U)] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T, %U.loc19_11.1) [symbolic = %tuple (constants.%tuple.4b9)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%T, %U.loc19_11.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] -// CHECK:STDOUT: %.loc19_28.2: Core.Form = init_form %tuple.type [symbolic = %.loc19_28.2 (constants.%.f18)] +// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T, %U.loc19_19.1) [symbolic = %tuple (constants.%tuple.4b9)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%T, %U.loc19_19.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %.loc19_35.2: Core.Form = init_form %tuple.type [symbolic = %.loc19_35.2 (constants.%.f18)] // CHECK:STDOUT: %pattern_type: type = pattern_type %tuple.type [symbolic = %pattern_type (constants.%pattern_type.eee)] -// CHECK:STDOUT: %return.param_patt.loc19_28.2: @Class.Get.%pattern_type (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc19_28.2 (constants.%return.param_patt.a41)] -// CHECK:STDOUT: %return.patt.loc19_20.2: @Class.Get.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc19_28.2, %tuple.type [symbolic = %return.patt.loc19_20.2 (constants.%return.patt.453)] +// CHECK:STDOUT: %return.param_patt.loc19_35.2: @Class.Get.%pattern_type (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc19_35.2 (constants.%return.param_patt.a41)] +// CHECK:STDOUT: %return.patt.loc19_27.2: @Class.Get.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc19_35.2, %tuple.type [symbolic = %return.patt.loc19_27.2 (constants.%return.patt.453)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.220)] // CHECK:STDOUT: %Class.Get.type: type = fn_type @Class.Get, @Class(%T) [symbolic = %Class.Get.type (constants.%Class.Get.type.49d)] // CHECK:STDOUT: %Class.Get: @Class.Get.%Class.Get.type (%Class.Get.type.49d) = struct_value () [symbolic = %Class.Get (constants.%Class.Get.ceb)] -// CHECK:STDOUT: %Class.Get.specific_fn.loc19_39.2: = specific_function %Class.Get, @Class.Get(%T, %U.loc19_11.1) [symbolic = %Class.Get.specific_fn.loc19_39.2 (constants.%Class.Get.specific_fn.ba5)] +// CHECK:STDOUT: %Class.Get.specific_fn.loc19_46.2: = specific_function %Class.Get, @Class.Get(%T, %U.loc19_19.1) [symbolic = %Class.Get.specific_fn.loc19_46.2 (constants.%Class.Get.specific_fn.ba5)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: @Class.Get.%tuple.type (%tuple.type.a5e) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_39: @Class.Get.%Class.Get.type (%Class.Get.type.49d) = specific_constant @Class.%Class.Get.decl, @Class(constants.%T) [symbolic = %Class.Get (constants.%Class.Get.ceb)] -// CHECK:STDOUT: %Get.ref: @Class.Get.%Class.Get.type (%Class.Get.type.49d) = name_ref Get, %.loc19_39 [symbolic = %Class.Get (constants.%Class.Get.ceb)] -// CHECK:STDOUT: %U.ref.loc19_43: type = name_ref U, %U.loc19_11.2 [symbolic = %U.loc19_11.1 (constants.%U)] -// CHECK:STDOUT: %Class.Get.specific_fn.loc19_39.1: = specific_function %Get.ref, @Class.Get(constants.%T, constants.%U) [symbolic = %Class.Get.specific_fn.loc19_39.2 (constants.%Class.Get.specific_fn.ba5)] -// CHECK:STDOUT: %.loc19_28.1: ref @Class.Get.%tuple.type (%tuple.type.a5e) = splice_block %return.param {} -// CHECK:STDOUT: %Class.Get.call: init @Class.Get.%tuple.type (%tuple.type.a5e) to %.loc19_28.1 = call %Class.Get.specific_fn.loc19_39.1() +// CHECK:STDOUT: %.loc19_46: @Class.Get.%Class.Get.type (%Class.Get.type.49d) = specific_constant @Class.%Class.Get.decl, @Class(constants.%T) [symbolic = %Class.Get (constants.%Class.Get.ceb)] +// CHECK:STDOUT: %Get.ref: @Class.Get.%Class.Get.type (%Class.Get.type.49d) = name_ref Get, %.loc19_46 [symbolic = %Class.Get (constants.%Class.Get.ceb)] +// CHECK:STDOUT: %U.ref.loc19_50: type = name_ref U, %U.loc19_19.2 [symbolic = %U.loc19_19.1 (constants.%U)] +// CHECK:STDOUT: %Class.Get.specific_fn.loc19_46.1: = specific_function %Get.ref, @Class.Get(constants.%T, constants.%U) [symbolic = %Class.Get.specific_fn.loc19_46.2 (constants.%Class.Get.specific_fn.ba5)] +// CHECK:STDOUT: %.loc19_35.1: ref @Class.Get.%tuple.type (%tuple.type.a5e) = splice_block %return.param {} +// CHECK:STDOUT: %Class.Get.call: init @Class.Get.%tuple.type (%tuple.type.a5e) to %.loc19_35.1 = call %Class.Get.specific_fn.loc19_46.1() // CHECK:STDOUT: return %Class.Get.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Class.GetNoDeduce(@Class.%T.loc18_14.2: type, %U.loc20_25.2: type) { +// CHECK:STDOUT: generic fn @Class.GetNoDeduce(@Class.%T.loc18_14.2: type, %U.loc20_33.2: type) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %pattern_type.loc20_19: type = pattern_type %T [symbolic = %pattern_type.loc20_19 (constants.%pattern_type.51d)] // CHECK:STDOUT: %x.param_patt.loc20_19.2: @Class.GetNoDeduce.%pattern_type.loc20_19 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc20_19.2 (constants.%x.param_patt.91d)] // CHECK:STDOUT: %x.patt.loc20_19.2: @Class.GetNoDeduce.%pattern_type.loc20_19 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc20_19.2 [symbolic = %x.patt.loc20_19.2 (constants.%x.patt.800)] -// CHECK:STDOUT: %U.patt.loc20_25.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc20_25.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc20_25.1: type = symbolic_binding U, 1 [symbolic = %U.loc20_25.1 (constants.%U)] -// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T, %U.loc20_25.1) [symbolic = %tuple (constants.%tuple.4b9)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%T, %U.loc20_25.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] -// CHECK:STDOUT: %.loc20_42.2: Core.Form = init_form %tuple.type [symbolic = %.loc20_42.2 (constants.%.f18)] -// CHECK:STDOUT: %pattern_type.loc20_42: type = pattern_type %tuple.type [symbolic = %pattern_type.loc20_42 (constants.%pattern_type.eee)] -// CHECK:STDOUT: %return.param_patt.loc20_42.2: @Class.GetNoDeduce.%pattern_type.loc20_42 (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc20_42.2 (constants.%return.param_patt.a41)] -// CHECK:STDOUT: %return.patt.loc20_34.2: @Class.GetNoDeduce.%pattern_type.loc20_42 (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc20_42.2, %tuple.type [symbolic = %return.patt.loc20_34.2 (constants.%return.patt.453)] +// CHECK:STDOUT: %U.patt.loc20_33.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc20_33.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc20_33.1: type = symbolic_binding U, 1 [symbolic = %U.loc20_33.1 (constants.%U)] +// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T, %U.loc20_33.1) [symbolic = %tuple (constants.%tuple.4b9)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%T, %U.loc20_33.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %.loc20_49.2: Core.Form = init_form %tuple.type [symbolic = %.loc20_49.2 (constants.%.f18)] +// CHECK:STDOUT: %pattern_type.loc20_49: type = pattern_type %tuple.type [symbolic = %pattern_type.loc20_49 (constants.%pattern_type.eee)] +// CHECK:STDOUT: %return.param_patt.loc20_49.2: @Class.GetNoDeduce.%pattern_type.loc20_49 (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc20_49.2 (constants.%return.param_patt.a41)] +// CHECK:STDOUT: %return.patt.loc20_41.2: @Class.GetNoDeduce.%pattern_type.loc20_49 (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc20_49.2, %tuple.type [symbolic = %return.patt.loc20_41.2 (constants.%return.patt.453)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic = %require_complete (constants.%require_complete.944)] // CHECK:STDOUT: %Class.GetNoDeduce.type: type = fn_type @Class.GetNoDeduce, @Class(%T) [symbolic = %Class.GetNoDeduce.type (constants.%Class.GetNoDeduce.type.83e)] // CHECK:STDOUT: %Class.GetNoDeduce: @Class.GetNoDeduce.%Class.GetNoDeduce.type (%Class.GetNoDeduce.type.83e) = struct_value () [symbolic = %Class.GetNoDeduce (constants.%Class.GetNoDeduce.a04)] -// CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.loc20_53.2: = specific_function %Class.GetNoDeduce, @Class.GetNoDeduce(%T, %U.loc20_25.1) [symbolic = %Class.GetNoDeduce.specific_fn.loc20_53.2 (constants.%Class.GetNoDeduce.specific_fn.def)] +// CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.loc20_60.2: = specific_function %Class.GetNoDeduce, @Class.GetNoDeduce(%T, %U.loc20_33.1) [symbolic = %Class.GetNoDeduce.specific_fn.loc20_60.2 (constants.%Class.GetNoDeduce.specific_fn.def)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Class.GetNoDeduce.%T (%T)) -> out %return.param: @Class.GetNoDeduce.%tuple.type (%tuple.type.a5e) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc20_53: @Class.GetNoDeduce.%Class.GetNoDeduce.type (%Class.GetNoDeduce.type.83e) = specific_constant @Class.%Class.GetNoDeduce.decl, @Class(constants.%T) [symbolic = %Class.GetNoDeduce (constants.%Class.GetNoDeduce.a04)] -// CHECK:STDOUT: %GetNoDeduce.ref: @Class.GetNoDeduce.%Class.GetNoDeduce.type (%Class.GetNoDeduce.type.83e) = name_ref GetNoDeduce, %.loc20_53 [symbolic = %Class.GetNoDeduce (constants.%Class.GetNoDeduce.a04)] +// CHECK:STDOUT: %.loc20_60: @Class.GetNoDeduce.%Class.GetNoDeduce.type (%Class.GetNoDeduce.type.83e) = specific_constant @Class.%Class.GetNoDeduce.decl, @Class(constants.%T) [symbolic = %Class.GetNoDeduce (constants.%Class.GetNoDeduce.a04)] +// CHECK:STDOUT: %GetNoDeduce.ref: @Class.GetNoDeduce.%Class.GetNoDeduce.type (%Class.GetNoDeduce.type.83e) = name_ref GetNoDeduce, %.loc20_60 [symbolic = %Class.GetNoDeduce (constants.%Class.GetNoDeduce.a04)] // CHECK:STDOUT: %x.ref: @Class.GetNoDeduce.%T (%T) = name_ref x, %x -// CHECK:STDOUT: %U.ref.loc20_68: type = name_ref U, %U.loc20_25.2 [symbolic = %U.loc20_25.1 (constants.%U)] -// CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.loc20_53.1: = specific_function %GetNoDeduce.ref, @Class.GetNoDeduce(constants.%T, constants.%U) [symbolic = %Class.GetNoDeduce.specific_fn.loc20_53.2 (constants.%Class.GetNoDeduce.specific_fn.def)] -// CHECK:STDOUT: %.loc20_42.1: ref @Class.GetNoDeduce.%tuple.type (%tuple.type.a5e) = splice_block %return.param {} -// CHECK:STDOUT: %Class.GetNoDeduce.call: init @Class.GetNoDeduce.%tuple.type (%tuple.type.a5e) to %.loc20_42.1 = call %Class.GetNoDeduce.specific_fn.loc20_53.1(%x.ref) +// CHECK:STDOUT: %U.ref.loc20_75: type = name_ref U, %U.loc20_33.2 [symbolic = %U.loc20_33.1 (constants.%U)] +// CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.loc20_60.1: = specific_function %GetNoDeduce.ref, @Class.GetNoDeduce(constants.%T, constants.%U) [symbolic = %Class.GetNoDeduce.specific_fn.loc20_60.2 (constants.%Class.GetNoDeduce.specific_fn.def)] +// CHECK:STDOUT: %.loc20_49.1: ref @Class.GetNoDeduce.%tuple.type (%tuple.type.a5e) = splice_block %return.param {} +// CHECK:STDOUT: %Class.GetNoDeduce.call: init @Class.GetNoDeduce.%tuple.type (%tuple.type.a5e) to %.loc20_49.1 = call %Class.GetNoDeduce.specific_fn.loc20_60.1(%x.ref) // CHECK:STDOUT: return %Class.GetNoDeduce.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -400,31 +400,31 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: generic fn @Class.F(@Class.%T.loc18_14.2: type, %U.loc21_9.2: type) { // CHECK:STDOUT: %U.patt.loc21_9.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc21_9.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc21_9.1: type = symbolic_binding U, 1 [symbolic = %U.loc21_9.1 (constants.%U)] -// CHECK:STDOUT: %Class.loc21_31.1: type = class_type @Class, @Class(%U.loc21_9.1) [symbolic = %Class.loc21_31.1 (constants.%Class.d74)] -// CHECK:STDOUT: %pattern_type.loc21_22: type = pattern_type %Class.loc21_31.1 [symbolic = %pattern_type.loc21_22 (constants.%pattern_type.cc0)] -// CHECK:STDOUT: %self.param_patt.loc21_22.2: @Class.F.%pattern_type.loc21_22 (%pattern_type.cc0) = value_param_pattern [symbolic = %self.param_patt.loc21_22.2 (constants.%self.param_patt.814)] -// CHECK:STDOUT: %self.patt.loc21_22.2: @Class.F.%pattern_type.loc21_22 (%pattern_type.cc0) = at_binding_pattern self, %self.param_patt.loc21_22.2 [symbolic = %self.patt.loc21_22.2 (constants.%self.patt.868)] -// CHECK:STDOUT: %.loc21_37.2: Core.Form = init_form %U.loc21_9.1 [symbolic = %.loc21_37.2 (constants.%.822)] -// CHECK:STDOUT: %pattern_type.loc21_37: type = pattern_type %U.loc21_9.1 [symbolic = %pattern_type.loc21_37 (constants.%pattern_type.946)] -// CHECK:STDOUT: %return.param_patt.loc21_37.2: @Class.F.%pattern_type.loc21_37 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc21_37.2 (constants.%return.param_patt.6dd)] -// CHECK:STDOUT: %return.patt.loc21_34.2: @Class.F.%pattern_type.loc21_37 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc21_37.2, %U.loc21_9.1 [symbolic = %return.patt.loc21_34.2 (constants.%return.patt.4dd)] +// CHECK:STDOUT: %Class.loc21_30.1: type = class_type @Class, @Class(%U.loc21_9.1) [symbolic = %Class.loc21_30.1 (constants.%Class.d74)] +// CHECK:STDOUT: %pattern_type.loc21_21: type = pattern_type %Class.loc21_30.1 [symbolic = %pattern_type.loc21_21 (constants.%pattern_type.cc0)] +// CHECK:STDOUT: %self.param_patt.loc21_21.2: @Class.F.%pattern_type.loc21_21 (%pattern_type.cc0) = value_param_pattern [symbolic = %self.param_patt.loc21_21.2 (constants.%self.param_patt.814)] +// CHECK:STDOUT: %self.patt.loc21_21.2: @Class.F.%pattern_type.loc21_21 (%pattern_type.cc0) = at_binding_pattern self, %self.param_patt.loc21_21.2 [symbolic = %self.patt.loc21_21.2 (constants.%self.patt.868)] +// CHECK:STDOUT: %.loc21_36.2: Core.Form = init_form %U.loc21_9.1 [symbolic = %.loc21_36.2 (constants.%.822)] +// CHECK:STDOUT: %pattern_type.loc21_36: type = pattern_type %U.loc21_9.1 [symbolic = %pattern_type.loc21_36 (constants.%pattern_type.946)] +// CHECK:STDOUT: %return.param_patt.loc21_36.2: @Class.F.%pattern_type.loc21_36 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc21_36.2 (constants.%return.param_patt.6dd)] +// CHECK:STDOUT: %return.patt.loc21_33.2: @Class.F.%pattern_type.loc21_36 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc21_36.2, %U.loc21_9.1 [symbolic = %return.patt.loc21_33.2 (constants.%return.patt.4dd)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %Class.loc21_31.1 [symbolic = %require_complete (constants.%require_complete.716)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Class.loc21_30.1 [symbolic = %require_complete (constants.%require_complete.716)] // CHECK:STDOUT: %Class.F.type: type = fn_type @Class.F, @Class(%U.loc21_9.1) [symbolic = %Class.F.type (constants.%Class.F.type.6df)] // CHECK:STDOUT: %Class.F: @Class.F.%Class.F.type (%Class.F.type.6df) = struct_value () [symbolic = %Class.F (constants.%Class.F.c29)] -// CHECK:STDOUT: %Class.F.specific_fn.loc21_52.2: = specific_function %Class.F, @Class.F(%U.loc21_9.1, %U.loc21_9.1) [symbolic = %Class.F.specific_fn.loc21_52.2 (constants.%Class.F.specific_fn.844)] +// CHECK:STDOUT: %Class.F.specific_fn.loc21_51.2: = specific_function %Class.F, @Class.F(%U.loc21_9.1, %U.loc21_9.1) [symbolic = %Class.F.specific_fn.loc21_51.2 (constants.%Class.F.specific_fn.844)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Class.F.%Class.loc21_31.1 (%Class.d74)) -> out %return.param: @Class.F.%U.loc21_9.1 (%U) { +// CHECK:STDOUT: fn(%self.param: @Class.F.%Class.loc21_30.1 (%Class.d74)) -> out %return.param: @Class.F.%U.loc21_9.1 (%U) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @Class.F.%Class.loc21_31.1 (%Class.d74) = name_ref self, %self -// CHECK:STDOUT: %.loc21_52: @Class.F.%Class.F.type (%Class.F.type.6df) = specific_constant @Class.%Class.F.decl, @Class(constants.%U) [symbolic = %Class.F (constants.%Class.F.c29)] -// CHECK:STDOUT: %F.ref: @Class.F.%Class.F.type (%Class.F.type.6df) = name_ref F, %.loc21_52 [symbolic = %Class.F (constants.%Class.F.c29)] +// CHECK:STDOUT: %self.ref: @Class.F.%Class.loc21_30.1 (%Class.d74) = name_ref self, %self +// CHECK:STDOUT: %.loc21_51: @Class.F.%Class.F.type (%Class.F.type.6df) = specific_constant @Class.%Class.F.decl, @Class(constants.%U) [symbolic = %Class.F (constants.%Class.F.c29)] +// CHECK:STDOUT: %F.ref: @Class.F.%Class.F.type (%Class.F.type.6df) = name_ref F, %.loc21_51 [symbolic = %Class.F (constants.%Class.F.c29)] // CHECK:STDOUT: %Class.F.bound: = bound_method %self.ref, %F.ref -// CHECK:STDOUT: %Class.F.specific_fn.loc21_52.1: = specific_function %F.ref, @Class.F(constants.%U, constants.%U) [symbolic = %Class.F.specific_fn.loc21_52.2 (constants.%Class.F.specific_fn.844)] -// CHECK:STDOUT: %bound_method: = bound_method %self.ref, %Class.F.specific_fn.loc21_52.1 -// CHECK:STDOUT: %.loc21_37.1: ref @Class.F.%U.loc21_9.1 (%U) = splice_block %return.param {} -// CHECK:STDOUT: %Class.F.call: init @Class.F.%U.loc21_9.1 (%U) to %.loc21_37.1 = call %bound_method(%self.ref) +// CHECK:STDOUT: %Class.F.specific_fn.loc21_51.1: = specific_function %F.ref, @Class.F(constants.%U, constants.%U) [symbolic = %Class.F.specific_fn.loc21_51.2 (constants.%Class.F.specific_fn.844)] +// CHECK:STDOUT: %bound_method: = bound_method %self.ref, %Class.F.specific_fn.loc21_51.1 +// CHECK:STDOUT: %.loc21_36.1: ref @Class.F.%U.loc21_9.1 (%U) = splice_block %return.param {} +// CHECK:STDOUT: %Class.F.call: init @Class.F.%U.loc21_9.1 (%U) to %.loc21_36.1 = call %bound_method(%self.ref) // CHECK:STDOUT: return %Class.F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -504,21 +504,21 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class.Get(constants.%T, constants.%U) { -// CHECK:STDOUT: %U.patt.loc19_11.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc19_11.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc19_19.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc19_19.1 => constants.%U // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %tuple => constants.%tuple.4b9 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a5e -// CHECK:STDOUT: %.loc19_28.2 => constants.%.f18 +// CHECK:STDOUT: %.loc19_35.2 => constants.%.f18 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.eee -// CHECK:STDOUT: %return.param_patt.loc19_28.2 => constants.%return.param_patt.a41 -// CHECK:STDOUT: %return.patt.loc19_20.2 => constants.%return.patt.453 +// CHECK:STDOUT: %return.param_patt.loc19_35.2 => constants.%return.param_patt.a41 +// CHECK:STDOUT: %return.patt.loc19_27.2 => constants.%return.patt.453 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.220 // CHECK:STDOUT: %Class.Get.type => constants.%Class.Get.type.49d // CHECK:STDOUT: %Class.Get => constants.%Class.Get.ceb -// CHECK:STDOUT: %Class.Get.specific_fn.loc19_39.2 => constants.%Class.Get.specific_fn.ba5 +// CHECK:STDOUT: %Class.Get.specific_fn.loc19_46.2 => constants.%Class.Get.specific_fn.ba5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class.GetNoDeduce(constants.%T, constants.%U) { @@ -526,20 +526,20 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %pattern_type.loc20_19 => constants.%pattern_type.51d // CHECK:STDOUT: %x.param_patt.loc20_19.2 => constants.%x.param_patt.91d // CHECK:STDOUT: %x.patt.loc20_19.2 => constants.%x.patt.800 -// CHECK:STDOUT: %U.patt.loc20_25.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc20_25.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc20_33.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc20_33.1 => constants.%U // CHECK:STDOUT: %tuple => constants.%tuple.4b9 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a5e -// CHECK:STDOUT: %.loc20_42.2 => constants.%.f18 -// CHECK:STDOUT: %pattern_type.loc20_42 => constants.%pattern_type.eee -// CHECK:STDOUT: %return.param_patt.loc20_42.2 => constants.%return.param_patt.a41 -// CHECK:STDOUT: %return.patt.loc20_34.2 => constants.%return.patt.453 +// CHECK:STDOUT: %.loc20_49.2 => constants.%.f18 +// CHECK:STDOUT: %pattern_type.loc20_49 => constants.%pattern_type.eee +// CHECK:STDOUT: %return.param_patt.loc20_49.2 => constants.%return.param_patt.a41 +// CHECK:STDOUT: %return.patt.loc20_41.2 => constants.%return.patt.453 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.944 // CHECK:STDOUT: %Class.GetNoDeduce.type => constants.%Class.GetNoDeduce.type.83e // CHECK:STDOUT: %Class.GetNoDeduce => constants.%Class.GetNoDeduce.a04 -// CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.loc20_53.2 => constants.%Class.GetNoDeduce.specific_fn.def +// CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.loc20_60.2 => constants.%Class.GetNoDeduce.specific_fn.def // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%U) { @@ -558,33 +558,33 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: specific @Class.F(constants.%T, constants.%U) { // CHECK:STDOUT: %U.patt.loc21_9.2 => constants.%U.patt // CHECK:STDOUT: %U.loc21_9.1 => constants.%U -// CHECK:STDOUT: %Class.loc21_31.1 => constants.%Class.d74 -// CHECK:STDOUT: %pattern_type.loc21_22 => constants.%pattern_type.cc0 -// CHECK:STDOUT: %self.param_patt.loc21_22.2 => constants.%self.param_patt.814 -// CHECK:STDOUT: %self.patt.loc21_22.2 => constants.%self.patt.868 -// CHECK:STDOUT: %.loc21_37.2 => constants.%.822 -// CHECK:STDOUT: %pattern_type.loc21_37 => constants.%pattern_type.946 -// CHECK:STDOUT: %return.param_patt.loc21_37.2 => constants.%return.param_patt.6dd -// CHECK:STDOUT: %return.patt.loc21_34.2 => constants.%return.patt.4dd +// CHECK:STDOUT: %Class.loc21_30.1 => constants.%Class.d74 +// CHECK:STDOUT: %pattern_type.loc21_21 => constants.%pattern_type.cc0 +// CHECK:STDOUT: %self.param_patt.loc21_21.2 => constants.%self.param_patt.814 +// CHECK:STDOUT: %self.patt.loc21_21.2 => constants.%self.patt.868 +// CHECK:STDOUT: %.loc21_36.2 => constants.%.822 +// CHECK:STDOUT: %pattern_type.loc21_36 => constants.%pattern_type.946 +// CHECK:STDOUT: %return.param_patt.loc21_36.2 => constants.%return.param_patt.6dd +// CHECK:STDOUT: %return.patt.loc21_33.2 => constants.%return.patt.4dd // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class.F(constants.%U, constants.%U) { // CHECK:STDOUT: %U.patt.loc21_9.2 => constants.%U.patt // CHECK:STDOUT: %U.loc21_9.1 => constants.%U -// CHECK:STDOUT: %Class.loc21_31.1 => constants.%Class.d74 -// CHECK:STDOUT: %pattern_type.loc21_22 => constants.%pattern_type.cc0 -// CHECK:STDOUT: %self.param_patt.loc21_22.2 => constants.%self.param_patt.814 -// CHECK:STDOUT: %self.patt.loc21_22.2 => constants.%self.patt.868 -// CHECK:STDOUT: %.loc21_37.2 => constants.%.822 -// CHECK:STDOUT: %pattern_type.loc21_37 => constants.%pattern_type.946 -// CHECK:STDOUT: %return.param_patt.loc21_37.2 => constants.%return.param_patt.6dd -// CHECK:STDOUT: %return.patt.loc21_34.2 => constants.%return.patt.4dd +// CHECK:STDOUT: %Class.loc21_30.1 => constants.%Class.d74 +// CHECK:STDOUT: %pattern_type.loc21_21 => constants.%pattern_type.cc0 +// CHECK:STDOUT: %self.param_patt.loc21_21.2 => constants.%self.param_patt.814 +// CHECK:STDOUT: %self.patt.loc21_21.2 => constants.%self.patt.868 +// CHECK:STDOUT: %.loc21_36.2 => constants.%.822 +// CHECK:STDOUT: %pattern_type.loc21_36 => constants.%pattern_type.946 +// CHECK:STDOUT: %return.param_patt.loc21_36.2 => constants.%return.param_patt.6dd +// CHECK:STDOUT: %return.patt.loc21_33.2 => constants.%return.patt.4dd // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.716 // CHECK:STDOUT: %Class.F.type => constants.%Class.F.type.6df // CHECK:STDOUT: %Class.F => constants.%Class.F.c29 -// CHECK:STDOUT: %Class.F.specific_fn.loc21_52.2 => constants.%Class.F.specific_fn.844 +// CHECK:STDOUT: %Class.F.specific_fn.loc21_51.2 => constants.%Class.F.specific_fn.844 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%A) { @@ -601,21 +601,21 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class.Get(constants.%A, constants.%B) { -// CHECK:STDOUT: %U.patt.loc19_11.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc19_11.1 => constants.%B +// CHECK:STDOUT: %U.patt.loc19_19.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc19_19.1 => constants.%B // CHECK:STDOUT: %T => constants.%A // CHECK:STDOUT: %tuple => constants.%tuple.9aa // CHECK:STDOUT: %tuple.type => constants.%tuple.type.1e7 -// CHECK:STDOUT: %.loc19_28.2 => constants.%.7f5 +// CHECK:STDOUT: %.loc19_35.2 => constants.%.7f5 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7c6 -// CHECK:STDOUT: %return.param_patt.loc19_28.2 => constants.%return.param_patt.1be -// CHECK:STDOUT: %return.patt.loc19_20.2 => constants.%return.patt.709 +// CHECK:STDOUT: %return.param_patt.loc19_35.2 => constants.%return.param_patt.1be +// CHECK:STDOUT: %return.patt.loc19_27.2 => constants.%return.patt.709 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.c44 // CHECK:STDOUT: %Class.Get.type => constants.%Class.Get.type.9a5 // CHECK:STDOUT: %Class.Get => constants.%Class.Get.e47 -// CHECK:STDOUT: %Class.Get.specific_fn.loc19_39.2 => constants.%Class.Get.specific_fn.0ec +// CHECK:STDOUT: %Class.Get.specific_fn.loc19_46.2 => constants.%Class.Get.specific_fn.0ec // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class.GetNoDeduce(constants.%A, constants.%B) { @@ -623,38 +623,38 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %pattern_type.loc20_19 => constants.%pattern_type.9ef // CHECK:STDOUT: %x.param_patt.loc20_19.2 => constants.%x.param_patt.4c3 // CHECK:STDOUT: %x.patt.loc20_19.2 => constants.%x.patt.313 -// CHECK:STDOUT: %U.patt.loc20_25.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc20_25.1 => constants.%B +// CHECK:STDOUT: %U.patt.loc20_33.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc20_33.1 => constants.%B // CHECK:STDOUT: %tuple => constants.%tuple.9aa // CHECK:STDOUT: %tuple.type => constants.%tuple.type.1e7 -// CHECK:STDOUT: %.loc20_42.2 => constants.%.7f5 -// CHECK:STDOUT: %pattern_type.loc20_42 => constants.%pattern_type.7c6 -// CHECK:STDOUT: %return.param_patt.loc20_42.2 => constants.%return.param_patt.1be -// CHECK:STDOUT: %return.patt.loc20_34.2 => constants.%return.patt.709 +// CHECK:STDOUT: %.loc20_49.2 => constants.%.7f5 +// CHECK:STDOUT: %pattern_type.loc20_49 => constants.%pattern_type.7c6 +// CHECK:STDOUT: %return.param_patt.loc20_49.2 => constants.%return.param_patt.1be +// CHECK:STDOUT: %return.patt.loc20_41.2 => constants.%return.patt.709 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.357 // CHECK:STDOUT: %Class.GetNoDeduce.type => constants.%Class.GetNoDeduce.type.7e9 // CHECK:STDOUT: %Class.GetNoDeduce => constants.%Class.GetNoDeduce.c1e -// CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.loc20_53.2 => constants.%Class.GetNoDeduce.specific_fn.931 +// CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.loc20_60.2 => constants.%Class.GetNoDeduce.specific_fn.931 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class.F(constants.%A, constants.%A) { // CHECK:STDOUT: %U.patt.loc21_9.2 => constants.%U.patt // CHECK:STDOUT: %U.loc21_9.1 => constants.%A -// CHECK:STDOUT: %Class.loc21_31.1 => constants.%Class.30a -// CHECK:STDOUT: %pattern_type.loc21_22 => constants.%pattern_type.89e -// CHECK:STDOUT: %self.param_patt.loc21_22.2 => constants.%self.param_patt.225 -// CHECK:STDOUT: %self.patt.loc21_22.2 => constants.%self.patt.39c -// CHECK:STDOUT: %.loc21_37.2 => constants.%.cbf -// CHECK:STDOUT: %pattern_type.loc21_37 => constants.%pattern_type.9ef -// CHECK:STDOUT: %return.param_patt.loc21_37.2 => constants.%return.param_patt.f0c -// CHECK:STDOUT: %return.patt.loc21_34.2 => constants.%return.patt.a6d +// CHECK:STDOUT: %Class.loc21_30.1 => constants.%Class.30a +// CHECK:STDOUT: %pattern_type.loc21_21 => constants.%pattern_type.89e +// CHECK:STDOUT: %self.param_patt.loc21_21.2 => constants.%self.param_patt.225 +// CHECK:STDOUT: %self.patt.loc21_21.2 => constants.%self.patt.39c +// CHECK:STDOUT: %.loc21_36.2 => constants.%.cbf +// CHECK:STDOUT: %pattern_type.loc21_36 => constants.%pattern_type.9ef +// CHECK:STDOUT: %return.param_patt.loc21_36.2 => constants.%return.param_patt.f0c +// CHECK:STDOUT: %return.patt.loc21_33.2 => constants.%return.patt.a6d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.357 // CHECK:STDOUT: %Class.F.type => constants.%Class.F.type.e68 // CHECK:STDOUT: %Class.F => constants.%Class.F.805 -// CHECK:STDOUT: %Class.F.specific_fn.loc21_52.2 => constants.%Class.F.specific_fn.0bd +// CHECK:STDOUT: %Class.F.specific_fn.loc21_51.2 => constants.%Class.F.specific_fn.0bd // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/redeclare.carbon b/toolchain/check/testdata/class/generic/redeclare.carbon index 0a6527c9a312..040e921bc043 100644 --- a/toolchain/check/testdata/class/generic/redeclare.carbon +++ b/toolchain/check/testdata/class/generic/redeclare.carbon @@ -16,9 +16,9 @@ library "[[@TEST_NAME]]"; -class Generic(T:! type); +class Generic(T: type); -class Generic(T:! type) { +class Generic(T: type) { } // --- fail_mismatch_param_list.carbon @@ -27,13 +27,13 @@ library "[[@TEST_NAME]]"; class A; // CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter list [RedeclParamListDiffers] -// CHECK:STDERR: class A(T:! type) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class A(T: type) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE-4]]:1: note: previously declared without parameter list [RedeclParamListPrevious] // CHECK:STDERR: class A; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -class A(T:! type) {} +class A(T: type) {} // --- fail_mismatch_implicit_param_list.carbon @@ -41,15 +41,15 @@ library "[[@TEST_NAME]]"; class A {} -class B(N:! A); +class B(N: A); // CHECK:STDERR: fail_mismatch_implicit_param_list.carbon:[[@LINE+7]]:1: error: redeclaration differs because of implicit parameter list [RedeclParamListDiffers] -// CHECK:STDERR: class B[T:! type](N:! T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class B[T: type](N: T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_mismatch_implicit_param_list.carbon:[[@LINE-4]]:1: note: previously declared without implicit parameter list [RedeclParamListPrevious] -// CHECK:STDERR: class B(N:! A); -// CHECK:STDERR: ^~~~~~~~~~~~~~~ +// CHECK:STDERR: class B(N: A); +// CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: -class B[T:! type](N:! T) {} +class B[T: type](N: T) {} // --- fail_mismatch_param_count.carbon @@ -57,15 +57,15 @@ library "[[@TEST_NAME]]"; class A {} -class C(T:! type); +class C(T: type); // CHECK:STDERR: fail_mismatch_param_count.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter count of 2 [RedeclParamCountDiffers] -// CHECK:STDERR: class C(T:! type, U:! A) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class C(T: type, U: A) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_mismatch_param_count.carbon:[[@LINE-4]]:1: note: previously declared with parameter count of 1 [RedeclParamCountPrevious] -// CHECK:STDERR: class C(T:! type); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class C(T: type); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: -class C(T:! type, U:! A) {} +class C(T: type, U: A) {} // --- fail_mismatch_param_type.carbon @@ -73,29 +73,29 @@ library "[[@TEST_NAME]]"; class A {} -class D(T:! type); +class D(T: type); // CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE+7]]:9: error: type `` of parameter 1 in redeclaration differs from previous parameter type `` [RedeclParamDiffersType] -// CHECK:STDERR: class D(T:! A) {} -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: class D(T: A) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE-4]]:9: note: previous declaration's corresponding parameter here [RedeclParamPrevious] -// CHECK:STDERR: class D(T:! type); -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: class D(T: type); +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -class D(T:! A) {} +class D(T: A) {} // --- fail_mismatch_param_name.carbon library "[[@TEST_NAME]]"; -class E(T:! type); +class E(T: type); // CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE+7]]:9: error: redeclaration differs at parameter 1 [RedeclParamDiffers] -// CHECK:STDERR: class E(U:! type) {} -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: class E(U: type) {} +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE-4]]:9: note: previous declaration's corresponding parameter here [RedeclParamPrevious] -// CHECK:STDERR: class E(T:! type); -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: class E(T: type); +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -class E(U:! type) {} +class E(U: type) {} // CHECK:STDOUT: --- valid.carbon // CHECK:STDOUT: @@ -128,18 +128,18 @@ class E(U:! type) {} // CHECK:STDOUT: %Generic.decl.loc4: %Generic.type = class_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt.loc6: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc4: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Generic.decl.loc6: %Generic.type = class_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt.loc6: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_18.1: type = splice_block %.loc6_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc6: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)] // CHECK:STDOUT: } @@ -198,9 +198,9 @@ class E(U:! type) {} // CHECK:STDOUT: %A.decl.loc12: %A.type = class_decl @A.loc12 [concrete = constants.%A.generic] { // CHECK:STDOUT: %T.patt.loc12_10.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_13.1: type = splice_block %.loc12_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc12_12.1: type = splice_block %.loc12_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc12_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_10.1 (constants.%T)] // CHECK:STDOUT: } @@ -278,18 +278,18 @@ class E(U:! type) {} // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl.loc14: %B.type.7937a9.2 = class_decl @B.loc14 [concrete = constants.%B.generic.60ca48.2] { // CHECK:STDOUT: %T.patt.loc14_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_10.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc14_20.1: @B.loc14.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc14_20.2 (constants.%N.patt.9f0)] +// CHECK:STDOUT: %N.patt.loc14_19.1: @B.loc14.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc14_19.2 (constants.%N.patt.9f0)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_13.1: type = splice_block %.loc14_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc14_12.1: type = splice_block %.loc14_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc14_10: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc14_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc14_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc14_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_10.1 (constants.%T)] -// CHECK:STDOUT: %.loc14_23: type = splice_block %T.ref [symbolic = %T.loc14_10.1 (constants.%T)] { -// CHECK:STDOUT: %.Self.frozen.loc14_20: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc14_21: type = splice_block %T.ref [symbolic = %T.loc14_10.1 (constants.%T)] { +// CHECK:STDOUT: %.Self.frozen.loc14_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_10.2 [symbolic = %T.loc14_10.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc14_20.2: @B.loc14.%T.loc14_10.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc14_20.1 (constants.%N.bd9)] +// CHECK:STDOUT: %N.loc14_19.2: @B.loc14.%T.loc14_10.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc14_19.1 (constants.%N.bd9)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -308,12 +308,12 @@ class E(U:! type) {} // CHECK:STDOUT: class; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @B.loc14(%T.loc14_10.2: type, %N.loc14_20.2: @B.loc14.%T.loc14_10.1 (%T)) { +// CHECK:STDOUT: generic class @B.loc14(%T.loc14_10.2: type, %N.loc14_19.2: @B.loc14.%T.loc14_10.1 (%T)) { // CHECK:STDOUT: %T.patt.loc14_10.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_10.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc14_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_10.1 (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc14_10.1 [symbolic = %pattern_type (constants.%pattern_type.51d)] -// CHECK:STDOUT: %N.patt.loc14_20.2: @B.loc14.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc14_20.2 (constants.%N.patt.9f0)] -// CHECK:STDOUT: %N.loc14_20.1: @B.loc14.%T.loc14_10.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc14_20.1 (constants.%N.bd9)] +// CHECK:STDOUT: %N.patt.loc14_19.2: @B.loc14.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc14_19.2 (constants.%N.patt.9f0)] +// CHECK:STDOUT: %N.loc14_19.1: @B.loc14.%T.loc14_10.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc14_19.1 (constants.%N.bd9)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -335,8 +335,8 @@ class E(U:! type) {} // CHECK:STDOUT: %T.patt.loc14_10.2 => constants.%T.patt // CHECK:STDOUT: %T.loc14_10.1 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %N.patt.loc14_20.2 => constants.%N.patt.9f0 -// CHECK:STDOUT: %N.loc14_20.1 => constants.%N.bd9 +// CHECK:STDOUT: %N.patt.loc14_19.2 => constants.%N.patt.9f0 +// CHECK:STDOUT: %N.loc14_19.1 => constants.%N.bd9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_mismatch_param_count.carbon @@ -378,26 +378,26 @@ class E(U:! type) {} // CHECK:STDOUT: %C.decl.loc6: %C.type.a601fe.1 = class_decl @C.loc6 [concrete = constants.%C.generic.4b4597.1] { // CHECK:STDOUT: %T.patt.loc6_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_13.1: type = splice_block %.loc6_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_10.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl.loc14: %C.type.a601fe.2 = class_decl @C.loc14 [concrete = constants.%C.generic.4b4597.2] { // CHECK:STDOUT: %T.patt.loc14_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_10.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc14_20.1: %pattern_type.9ef = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc14_20.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc14_19.1: %pattern_type.9ef = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc14_19.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_13.1: type = splice_block %.loc14_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc14_12.1: type = splice_block %.loc14_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc14_10: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc14_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc14_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc14_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_10.1 (constants.%T)] -// CHECK:STDOUT: %.loc14_23: type = splice_block %A.ref [concrete = constants.%A] { -// CHECK:STDOUT: %.Self.frozen.loc14_20: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc14_21: type = splice_block %A.ref [concrete = constants.%A] { +// CHECK:STDOUT: %.Self.frozen.loc14_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc14_20.2: %A = symbolic_binding U, 1 [symbolic = %U.loc14_20.1 (constants.%U)] +// CHECK:STDOUT: %U.loc14_19.2: %A = symbolic_binding U, 1 [symbolic = %U.loc14_19.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -416,11 +416,11 @@ class E(U:! type) {} // CHECK:STDOUT: class; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C.loc14(%T.loc14_10.2: type, %U.loc14_20.2: %A) { +// CHECK:STDOUT: generic class @C.loc14(%T.loc14_10.2: type, %U.loc14_19.2: %A) { // CHECK:STDOUT: %T.patt.loc14_10.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_10.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc14_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_10.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc14_20.2: %pattern_type.9ef = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc14_20.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc14_20.1: %A = symbolic_binding U, 1 [symbolic = %U.loc14_20.1 (constants.%U)] +// CHECK:STDOUT: %U.patt.loc14_19.2: %pattern_type.9ef = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc14_19.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc14_19.1: %A = symbolic_binding U, 1 [symbolic = %U.loc14_19.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -441,8 +441,8 @@ class E(U:! type) {} // CHECK:STDOUT: specific @C.loc14(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc14_10.2 => constants.%T.patt // CHECK:STDOUT: %T.loc14_10.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc14_20.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc14_20.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc14_19.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc14_19.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_mismatch_param_type.carbon @@ -484,9 +484,9 @@ class E(U:! type) {} // CHECK:STDOUT: %D.decl.loc6: %D.type.ff75f2.1 = class_decl @D.loc6 [concrete = constants.%D.generic.7223e9.1] { // CHECK:STDOUT: %T.patt.loc6_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_10.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_13.1: type = splice_block %.loc6_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_10.1 (constants.%T.67d)] // CHECK:STDOUT: } @@ -576,18 +576,18 @@ class E(U:! type) {} // CHECK:STDOUT: %E.decl.loc4: %E.type.0b1ef1.1 = class_decl @E.loc4 [concrete = constants.%E.generic.5469ef.1] { // CHECK:STDOUT: %T.patt.loc4_10.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_13.1: type = splice_block %.loc4_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_12.1: type = splice_block %.loc4_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_10.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %E.decl.loc12: %E.type.0b1ef1.2 = class_decl @E.loc12 [concrete = constants.%E.generic.5469ef.2] { // CHECK:STDOUT: %U.patt.loc12_10.1: %pattern_type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_10.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_13.1: type = splice_block %.loc12_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc12_12.1: type = splice_block %.loc12_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc12_10.2: type = symbolic_binding U, 0 [symbolic = %U.loc12_10.1 (constants.%U)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/self.carbon b/toolchain/check/testdata/class/generic/self.carbon index 8b1785e515a9..ea3c9ca9a8b8 100644 --- a/toolchain/check/testdata/class/generic/self.carbon +++ b/toolchain/check/testdata/class/generic/self.carbon @@ -12,7 +12,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/generic/self.carbon -class Class(T:! type) { +class Class(T: type) { // `Self` is the same as `Class(T)` here. // TODO: Find a better way to test two types are the same. fn MakeSelf() -> Self { return {}; } @@ -84,9 +84,9 @@ class Class(T:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc15_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_17.1: type = splice_block %.loc15_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_16.1: type = splice_block %.loc15_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_14.1 (constants.%T)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/stringify.carbon b/toolchain/check/testdata/class/generic/stringify.carbon index c66fcc2e3540..61b3463f8e34 100644 --- a/toolchain/check/testdata/class/generic/stringify.carbon +++ b/toolchain/check/testdata/class/generic/stringify.carbon @@ -33,8 +33,8 @@ var w: EmptyParams() = v; library "[[@TEST_NAME]]"; -class Outer(T:! type) { - class Inner(U:! type) { +class Outer(T: type) { + class Inner(U: type) { } } @@ -54,7 +54,7 @@ var w: Outer({}*).Inner({.a: i32}*) = v; library "[[@TEST_NAME]]"; -class C(N:! i32) {} +class C(N: i32) {} // CHECK:STDERR: fail_int_value.carbon:[[@LINE+7]]:1: error: cannot implicitly convert expression of type `()` to `C(123)` [ConversionFailure] // CHECK:STDERR: var v: C(123) = (); @@ -74,7 +74,7 @@ class D { var b: i32; } -class E(F:! D) {} +class E(F: D) {} // CHECK:STDERR: fail_class_param.carbon:[[@LINE+7]]:1: error: cannot implicitly convert expression of type `E({.a = 3, .b = 4})` to `E({.a = 1, .b = 2})` [ConversionFailure] // CHECK:STDERR: var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); @@ -264,9 +264,9 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T.67d)] // CHECK:STDOUT: } @@ -316,9 +316,9 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.8f7) = class_decl @Inner [symbolic = @Outer.%Inner.generic (constants.%Inner.generic.b3a)] { // CHECK:STDOUT: %U.patt.loc5_16.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc5_16.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_18.1: type = splice_block %.loc5_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc5_16.2: type = symbolic_binding U, 1 [symbolic = %U.loc5_16.1 (constants.%U)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/method/fail_generic_method.carbon b/toolchain/check/testdata/class/method/fail_generic_method.carbon index be73798092e2..d9f056da2468 100644 --- a/toolchain/check/testdata/class/method/fail_generic_method.carbon +++ b/toolchain/check/testdata/class/method/fail_generic_method.carbon @@ -12,7 +12,7 @@ class I {} -class Class(T:! type) { +class Class(T: type) { var a: T; fn F(self, n: T); } @@ -20,18 +20,18 @@ class Class(T:! type) { // TODO: The follow-on errors here aren't great. Investigate whether we can // enter the scope anyway if the parameters don't match. // CHECK:STDERR: fail_generic_method.carbon:[[@LINE+15]]:17: error: type `` of parameter 1 in redeclaration differs from previous parameter type `` [RedeclParamDiffersType] -// CHECK:STDERR: fn Class(unused N:! I).F(unused self, unused n: T) {} -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fn Class(unused N: I).F(unused self, unused n: T) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_generic_method.carbon:[[@LINE-10]]:13: note: previous declaration's corresponding parameter here [RedeclParamPrevious] -// CHECK:STDERR: class Class(T:! type) { -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: class Class(T: type) { +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+8]]:33: error: name `Self` not found [NameNotFound] -// CHECK:STDERR: fn Class(unused N:! I).F(unused self, unused n: T) {} -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+8]]:32: error: name `Self` not found [NameNotFound] +// CHECK:STDERR: fn Class(unused N: I).F(unused self, unused n: T) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+4]]:49: error: name `T` not found [NameNotFound] -// CHECK:STDERR: fn Class(unused N:! I).F(unused self, unused n: T) {} -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+4]]:48: error: name `T` not found [NameNotFound] +// CHECK:STDERR: fn Class(unused N: I).F(unused self, unused n: T) {} +// CHECK:STDERR: ^ // CHECK:STDERR: -fn Class(unused N:! I).F(unused self, unused n: T) {} +fn Class(unused N: I).F(unused self, unused n: T) {} diff --git a/toolchain/check/testdata/class/method/generic_method.carbon b/toolchain/check/testdata/class/method/generic_method.carbon index 9dad3de49eae..23f4c6b5761f 100644 --- a/toolchain/check/testdata/class/method/generic_method.carbon +++ b/toolchain/check/testdata/class/method/generic_method.carbon @@ -12,12 +12,12 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/method/generic_method.carbon -class Class(T:! type) { +class Class(T: type) { var a: T; fn F(self, n: T); } -fn Class(T:! type).F(unused self, unused n: T) {} +fn Class(T: type).F(unused self, unused n: T) {} // CHECK:STDOUT: --- generic_method.carbon @@ -63,9 +63,9 @@ fn Class(T:! type).F(unused self, unused n: T) {} // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc15_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_17.1: type = splice_block %.loc15_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_16.1: type = splice_block %.loc15_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_14.1 (constants.%T)] // CHECK:STDOUT: } @@ -75,15 +75,15 @@ fn Class(T:! type).F(unused self, unused n: T) {} // CHECK:STDOUT: %n.param_patt.loc20: @Class.F.%pattern_type.loc17_15 (%pattern_type.51d) = value_param_pattern [symbolic = %n.param_patt.loc17 (constants.%n.param_patt)] // CHECK:STDOUT: %n.patt.loc20: @Class.F.%pattern_type.loc17_15 (%pattern_type.51d) = at_binding_pattern n, %n.param_patt.loc20 [symbolic = %n.patt.loc17 (constants.%n.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_14.1: type = splice_block %.loc20_14.2 [concrete = type] { +// CHECK:STDOUT: %.loc20_13.1: type = splice_block %.loc20_13.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc20_14.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc20_13.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc20: type = symbolic_binding T, 0 [symbolic = @Class.%T.loc15_14.1 (constants.%T)] // CHECK:STDOUT: %self.param.loc20: @Class.F.%Class (%Class) = value_param call_param0 -// CHECK:STDOUT: %.loc20_29.1: type = splice_block %Self.ref.loc20 [symbolic = %Class (constants.%Class)] { -// CHECK:STDOUT: %.loc20_29.2: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, %.loc20_29.2 [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %.loc20_28.1: type = splice_block %Self.ref.loc20 [symbolic = %Class (constants.%Class)] { +// CHECK:STDOUT: %.loc20_28.2: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, %.loc20_28.2 [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: } // CHECK:STDOUT: %self.loc20: @Class.F.%Class (%Class) = wrapper_binding self, %self.param.loc20 // CHECK:STDOUT: %n.param.loc20: @Class.F.%T.loc17 (%T) = value_param call_param1 @@ -147,8 +147,8 @@ fn Class(T:! type).F(unused self, unused n: T) {} // CHECK:STDOUT: %n.patt.loc17: @Class.F.%pattern_type.loc17_15 (%pattern_type.51d) = at_binding_pattern n, %n.param_patt.loc17 [symbolic = %n.patt.loc17 (constants.%n.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc20_29: = require_complete_type %Class [symbolic = %require_complete.loc20_29 (constants.%require_complete.4d9)] -// CHECK:STDOUT: %require_complete.loc20_43: = require_complete_type %T.loc17 [symbolic = %require_complete.loc20_43 (constants.%require_complete.944)] +// CHECK:STDOUT: %require_complete.loc20_28: = require_complete_type %Class [symbolic = %require_complete.loc20_28 (constants.%require_complete.4d9)] +// CHECK:STDOUT: %require_complete.loc20_42: = require_complete_type %T.loc17 [symbolic = %require_complete.loc20_42 (constants.%require_complete.944)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param.loc20: @Class.F.%Class (%Class), %n.param.loc20: @Class.F.%T.loc17 (%T)) { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/class/method/virtual.carbon b/toolchain/check/testdata/class/method/virtual.carbon index 1d1283cb6130..d1c2395655a8 100644 --- a/toolchain/check/testdata/class/method/virtual.carbon +++ b/toolchain/check/testdata/class/method/virtual.carbon @@ -248,9 +248,9 @@ fn Derived.F(unused self) -> T2 { library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_generic_virtual_decl.carbon:[[@LINE+3]]:1: error: use of undefined generic function [MissingGenericFunctionDefinition] -// CHECK:STDERR: base class Base(T:! type) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -base class Base(T:! type) { +// CHECK:STDERR: base class Base(T: type) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ +base class Base(T: type) { // CHECK:STDERR: fail_generic_virtual_decl.carbon:[[@LINE+4]]:3: note: generic function declared here [MissingGenericFunctionDefinitionHere] // CHECK:STDERR: virtual fn F(self); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ @@ -266,7 +266,7 @@ library "[[@TEST_NAME]]"; class T1 { } -base class Base(T:! type) { +base class Base(T: type) { virtual fn F(unused self, unused t: T) { } } @@ -330,29 +330,29 @@ library "[[@TEST_NAME]]"; base class T1 { // CHECK:STDERR: fail_generic_virtual.carbon:[[@LINE+4]]:3: error: generic virtual function [GenericVirtual] - // CHECK:STDERR: virtual fn F[T:! type](self); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: virtual fn F[T: type](self); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - virtual fn F[T:! type](self); + virtual fn F[T: type](self); } // --- fail_generic_virtual_in_generic_class.carbon library "[[@TEST_NAME]]"; -base class T1(T:! type) { +base class T1(T: type) { // CHECK:STDERR: fail_generic_virtual_in_generic_class.carbon:[[@LINE+4]]:3: error: generic virtual function [GenericVirtual] - // CHECK:STDERR: virtual fn F[T:! type](self); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: virtual fn F[T: type](self); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - virtual fn F[T:! type](self); + virtual fn F[T: type](self); } // --- generic_with_virtual.carbon library "[[@TEST_NAME]]"; -base class T1(T:! type) { +base class T1(T: type) { //@dump-sem-ir-begin virtual fn F(unused self) { } //@dump-sem-ir-end @@ -362,7 +362,7 @@ base class T1(T:! type) { library "[[@TEST_NAME]]"; -base class T1(T:! type) { +base class T1(T: type) { //@dump-sem-ir-begin virtual fn F(unused self, unused t: T) { } //@dump-sem-ir-end @@ -385,7 +385,7 @@ base class NonGenericBase { virtual fn F2(unused self) { } } -base class GenericDerived(T:! type) { +base class GenericDerived(T: type) { extend base: NonGenericBase; override fn F2(unused self) { } virtual fn F3(unused self) { } @@ -395,7 +395,7 @@ base class GenericDerived(T:! type) { library "[[@TEST_NAME]]"; -base class GenericBase(T:! type) { +base class GenericBase(T: type) { virtual fn F1(unused self) { } virtual fn F2(unused self) { } } @@ -412,7 +412,7 @@ base class NonGenericDerived { library "[[@TEST_NAME]]"; -base class Base(T:! type) { +base class Base(T: type) { virtual fn F(unused self, unused t: Base(T)*) { } } class T1; @@ -432,7 +432,7 @@ library "[[@TEST_NAME]]"; class T1; class T2; -base class Base(T:! type) { +base class Base(T: type) { virtual fn F(unused self, unused t: T1*) { } } @@ -454,10 +454,10 @@ class D1 { library "[[@TEST_NAME]]"; -abstract class Base(T:! type) { +abstract class Base(T: type) { virtual fn F(unused self, unused t: T*) { } } -class Derived(T:! type) { +class Derived(T: type) { extend base: Base(T); // CHECK:STDERR: fail_impl_generic_generic_mismatch.carbon:[[@LINE+7]]:37: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: override fn F(unused self, unused t: T) { } @@ -473,10 +473,10 @@ class Derived(T:! type) { library "[[@TEST_NAME]]"; -abstract class Base(T:! type) { +abstract class Base(T: type) { virtual fn F(unused self, unused t: T) { } } -class Derived(T:! type) { +class Derived(T: type) { extend base: Base(T*); //@dump-sem-ir-begin override fn F(unused self, unused t: T*) { } @@ -487,7 +487,7 @@ class Derived(T:! type) { library "[[@TEST_NAME]]"; -abstract class Base(T:! type) { +abstract class Base(T: type) { abstract fn F(self); } @@ -502,7 +502,7 @@ class Derived { library "[[@TEST_NAME]]"; -base class Base(T:! type) { +base class Base(T: type) { virtual fn F(unused self) { } } @@ -519,11 +519,11 @@ var v: Base(T1) = {}; library "[[@TEST_NAME]]"; -base class T1(G1:! type) { +base class T1(G1: type) { virtual fn F(unused self) { } } -class T2(G2:! type) { +class T2(G2: type) { extend base: T1(G2); } @@ -531,11 +531,11 @@ class T2(G2:! type) { library "[[@TEST_NAME]]"; -base class T1(G1:! type) { +base class T1(G1: type) { virtual fn F(unused self) { } } -class T2(G2:! type) { +class T2(G2: type) { class T3 { extend base: T1(G2); } diff --git a/toolchain/check/testdata/class/partial/qualifier.carbon b/toolchain/check/testdata/class/partial/qualifier.carbon index 98d5a5043536..dc4c5c761dee 100644 --- a/toolchain/check/testdata/class/partial/qualifier.carbon +++ b/toolchain/check/testdata/class/partial/qualifier.carbon @@ -156,11 +156,11 @@ library "[[@TEST_NAME]]"; // TODO: This should be accepted because `T` might be final once we know what it // is. -// CHECK:STDERR: fail_todo_partial_template_dependent.carbon:[[@LINE+4]]:28: error: `partial` applied to final type `T` [PartialOnFinal] -// CHECK:STDERR: fn G[template T:! type](p: partial T*); -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_todo_partial_template_dependent.carbon:[[@LINE+4]]:27: error: `partial` applied to final type `T` [PartialOnFinal] +// CHECK:STDERR: fn G[template T: type](p: partial T*); +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -fn G[template T:! type](p: partial T*); +fn G[template T: type](p: partial T*); // --- fail_partial_generic.carbon library "[[@TEST_NAME]]"; @@ -169,11 +169,11 @@ library "[[@TEST_NAME]]"; // generic type and its requirements, as distinct from the concrete type that // might be used here in any specific. -// CHECK:STDERR: fail_partial_generic.carbon:[[@LINE+4]]:19: error: `partial` applied to final type `T` [PartialOnFinal] -// CHECK:STDERR: fn F[T:! type](p: partial T*); -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_partial_generic.carbon:[[@LINE+4]]:18: error: `partial` applied to final type `T` [PartialOnFinal] +// CHECK:STDERR: fn F[T: type](p: partial T*); +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -fn F[T:! type](p: partial T*); +fn F[T: type](p: partial T*); // CHECK:STDOUT: --- base.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/self/fail_self_param.carbon b/toolchain/check/testdata/class/self/fail_self_param.carbon index 683f7975230a..d276e2b62174 100644 --- a/toolchain/check/testdata/class/self/fail_self_param.carbon +++ b/toolchain/check/testdata/class/self/fail_self_param.carbon @@ -16,16 +16,16 @@ library "[[@TEST_NAME]]"; // `self` is not a valid parameter of a class declaration even when placed in // the explicit parameter list. // CHECK:STDERR: fail_self_param.carbon:[[@LINE+4]]:9: error: `self` parameter only allowed on functions [SelfParameterNotAllowed] -// CHECK:STDERR: class C(self:! type, x:! self) {} -// CHECK:STDERR: ^~~~~~~~~~~ +// CHECK:STDERR: class C(self: type, x: self) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -class C(self:! type, x:! self) {} +class C(self: type, x: self) {} // CHECK:STDERR: fail_self_param.carbon:[[@LINE+7]]:8: error: 1 argument passed to generic class expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: var v: C(()); // CHECK:STDERR: ^~~~~ // CHECK:STDERR: fail_self_param.carbon:[[@LINE-4]]:1: note: calling generic class declared here [InCallToEntity] -// CHECK:STDERR: class C(self:! type, x:! self) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class C(self: type, x: self) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var v: C(()); @@ -35,12 +35,12 @@ library "[[@TEST_NAME]]"; // `self` in the implicit parameter list of a class declaration is reported as // both being in the wrong list and not allowed on a class at all. // CHECK:STDERR: fail_self_param_implicit.carbon:[[@LINE+8]]:9: error: `self` must be declared in the explicit parameter list [SelfInImplicitParamList] -// CHECK:STDERR: class C[self:! type](x:! self) {} -// CHECK:STDERR: ^~~~~~~~~~~ +// CHECK:STDERR: class C[self: type](x: self) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_self_param_implicit.carbon:[[@LINE+4]]:9: error: `self` parameter only allowed on functions [SelfParameterNotAllowed] -// CHECK:STDERR: class C[self:! type](x:! self) {} -// CHECK:STDERR: ^~~~~~~~~~~ +// CHECK:STDERR: class C[self: type](x: self) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -class C[self:! type](x:! self) {} +class C[self: type](x: self) {} var v: C(()); diff --git a/toolchain/check/testdata/class/syntactic_merge.carbon b/toolchain/check/testdata/class/syntactic_merge.carbon index c10f52d15ba1..b86cb643fa8c 100644 --- a/toolchain/check/testdata/class/syntactic_merge.carbon +++ b/toolchain/check/testdata/class/syntactic_merge.carbon @@ -19,11 +19,11 @@ library "[[@TEST_NAME]]"; class C {} alias D = C; -class Foo(a:! C); -class Foo(a:! C) {} +class Foo(a: C); +class Foo(a: C) {} -class Bar(a:! D); -class Bar(a:! D) {} +class Bar(a: D); +class Bar(a: D) {} // --- spacing.carbon @@ -31,8 +31,8 @@ library "[[@TEST_NAME]]"; class C {} -class Foo [ ] ( a :! C ); -class Foo[](a:! C) {} +class Foo [ ] ( a : C ); +class Foo[](a: C) {} // --- fail_parens.carbon @@ -40,15 +40,15 @@ library "[[@TEST_NAME]]"; class C {} -class Foo(a:! C); -// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] -// CHECK:STDERR: class Foo(a:! (C)) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:15: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] -// CHECK:STDERR: class Foo(a:! C); -// CHECK:STDERR: ^ +class Foo(a: C); +// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:14: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] +// CHECK:STDERR: class Foo(a: (C)) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:14: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] +// CHECK:STDERR: class Foo(a: C); +// CHECK:STDERR: ^ // CHECK:STDERR: -class Foo(a:! (C)) {} +class Foo(a: (C)) {} // --- fail_raw_identifier.carbon @@ -56,15 +56,15 @@ library "[[@TEST_NAME]]"; class C {} -class Foo(a:! C); -// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] -// CHECK:STDERR: class Foo(a:! r#C) {} -// CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE-4]]:15: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] -// CHECK:STDERR: class Foo(a:! C); -// CHECK:STDERR: ^ +class Foo(a: C); +// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE+7]]:14: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] +// CHECK:STDERR: class Foo(a: r#C) {} +// CHECK:STDERR: ^~~ +// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE-4]]:14: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] +// CHECK:STDERR: class Foo(a: C); +// CHECK:STDERR: ^ // CHECK:STDERR: -class Foo(a:! r#C) {} +class Foo(a: r#C) {} // --- two_file.carbon @@ -73,15 +73,15 @@ library "[[@TEST_NAME]]"; class C {} alias D = C; -class Foo(a:! C); -class Bar(a:! D); +class Foo(a: C); +class Bar(a: D); // --- two_file.impl.carbon impl library "[[@TEST_NAME]]"; -class Foo(a:! C) {} -class Bar(a:! D) {} +class Foo(a: C) {} +class Bar(a: D) {} // --- fail_name_mismatch.carbon @@ -90,15 +90,15 @@ library "[[@TEST_NAME]]"; class C {} alias D = C; -class Foo(a:! C); +class Foo(a: C); // CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:11: error: redeclaration differs at parameter 1 [RedeclParamDiffers] -// CHECK:STDERR: class Foo(b:! D) {} -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: class Foo(b: D) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:11: note: previous declaration's corresponding parameter here [RedeclParamPrevious] -// CHECK:STDERR: class Foo(a:! C); -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: class Foo(a: C); +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -class Foo(b:! D) {} +class Foo(b: D) {} // --- fail_alias.carbon @@ -107,15 +107,15 @@ library "[[@TEST_NAME]]"; class C {} alias D = C; -class Foo(a:! C); -// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] -// CHECK:STDERR: class Foo(a:! D) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:15: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] -// CHECK:STDERR: class Foo(a:! C); -// CHECK:STDERR: ^ +class Foo(a: C); +// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:14: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] +// CHECK:STDERR: class Foo(a: D) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:14: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] +// CHECK:STDERR: class Foo(a: C); +// CHECK:STDERR: ^ // CHECK:STDERR: -class Foo(a:! D) {} +class Foo(a: D) {} // --- fail_deduced_alias.carbon @@ -124,15 +124,15 @@ library "[[@TEST_NAME]]"; class C {} alias D = C; -class Foo[a:! C](); -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] -// CHECK:STDERR: class Foo[a:! D]() {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:15: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] -// CHECK:STDERR: class Foo[a:! C](); -// CHECK:STDERR: ^ +class Foo[a: C](); +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:14: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] +// CHECK:STDERR: class Foo[a: D]() {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:14: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] +// CHECK:STDERR: class Foo[a: C](); +// CHECK:STDERR: ^ // CHECK:STDERR: -class Foo[a:! D]() {} +class Foo[a: D]() {} // --- alias_two_file.carbon @@ -140,7 +140,7 @@ library "[[@TEST_NAME]]"; class C {} -class Foo(a:! C); +class Foo(a: C); // --- todo_fail_alias_two_file.impl.carbon @@ -148,7 +148,7 @@ impl library "[[@TEST_NAME]]"; alias D = C; -class Foo(a:! D) {} +class Foo(a: D) {} // --- fail_repeat_const.carbon @@ -156,19 +156,19 @@ library "[[@TEST_NAME]]"; class C {} -class Foo(a:! const C); -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+11]]:15: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst] -// CHECK:STDERR: class Foo(a:! const (const C)) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~ +class Foo(a: const C); +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+11]]:14: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst] +// CHECK:STDERR: class Foo(a: const (const C)) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+7]]:21: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] -// CHECK:STDERR: class Foo(a:! const (const C)) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:21: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] -// CHECK:STDERR: class Foo(a:! const C); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+7]]:20: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] +// CHECK:STDERR: class Foo(a: const (const C)) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:20: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] +// CHECK:STDERR: class Foo(a: const C); +// CHECK:STDERR: ^ // CHECK:STDERR: -class Foo(a:! const (const C)) {} +class Foo(a: const (const C)) {} // --- fail_self_type.carbon @@ -1151,11 +1151,11 @@ fn Base.F(ref self: Base) { // CHECK:STDOUT: %Foo.decl.loc18: %Foo.type.3e04c8.2 = class_decl @Foo.loc18 [concrete = constants.%Foo.generic.04949d.2] { // CHECK:STDOUT: %a.patt.loc18_12.1: %pattern_type = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc18_12.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18: type = splice_block %const.loc18_15 [concrete = constants.%const] { +// CHECK:STDOUT: %.loc18: type = splice_block %const.loc18_14 [concrete = constants.%const] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %const.loc18_22: type = const_type %C.ref [concrete = constants.%const] -// CHECK:STDOUT: %const.loc18_15: type = const_type %const.loc18_22 [concrete = constants.%const] +// CHECK:STDOUT: %const.loc18_21: type = const_type %C.ref [concrete = constants.%const] +// CHECK:STDOUT: %const.loc18_14: type = const_type %const.loc18_21 [concrete = constants.%const] // CHECK:STDOUT: } // CHECK:STDOUT: %a.loc18_12.2: %const = symbolic_binding a, 0 [symbolic = %a.loc18_12.1 (constants.%a)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index 6c9cd827e3be..091e49a46535 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -16,24 +16,24 @@ library "[[@TEST_NAME]]"; -class C(a:! i32) {} -class D(b:! C(1_000)); -class D(b:! C(1_000)) {} +class C(a: i32) {} +class D(b: C(1_000)); +class D(b: C(1_000)) {} // --- fail_int_mismatch.carbon library "[[@TEST_NAME]]"; -class C(a:! i32) {} -class D(b:! C(1000)); -// CHECK:STDERR: fail_int_mismatch.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] -// CHECK:STDERR: class D(b:! C(1_000)) {} -// CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_int_mismatch.carbon:[[@LINE-4]]:15: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] -// CHECK:STDERR: class D(b:! C(1000)); -// CHECK:STDERR: ^~~~ +class C(a: i32) {} +class D(b: C(1000)); +// CHECK:STDERR: fail_int_mismatch.carbon:[[@LINE+7]]:14: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] +// CHECK:STDERR: class D(b: C(1_000)) {} +// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fail_int_mismatch.carbon:[[@LINE-4]]:14: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] +// CHECK:STDERR: class D(b: C(1000)); +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -class D(b:! C(1_000)) {} +class D(b: C(1_000)) {} // CHECK:STDOUT: --- int_match.carbon // CHECK:STDOUT: @@ -110,17 +110,17 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %D.decl.loc5: %D.type = class_decl @D [concrete = constants.%D.generic] { // CHECK:STDOUT: %b.patt.loc6: %pattern_type.053 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc5 (constants.%b.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_20.1: type = splice_block %C.loc5 [concrete = constants.%C.847] { +// CHECK:STDOUT: %.loc5_19.1: type = splice_block %C.loc5 [concrete = constants.%C.847] { // CHECK:STDOUT: %.Self.frozen.loc5: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %C.ref.loc5: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000.loc5: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] // CHECK:STDOUT: %impl.elem0.loc5: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] -// CHECK:STDOUT: %bound_method.loc5_20.1: = bound_method %int_1000.loc5, %impl.elem0.loc5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] +// CHECK:STDOUT: %bound_method.loc5_19.1: = bound_method %int_1000.loc5, %impl.elem0.loc5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc5_20.2: = bound_method %int_1000.loc5, %specific_fn.loc5 [concrete = constants.%bound_method] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5: init %i32 = call %bound_method.loc5_20.2(%int_1000.loc5) [concrete = constants.%int_1000.55f] -// CHECK:STDOUT: %.loc5_20.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5 [concrete = constants.%int_1000.55f] -// CHECK:STDOUT: %.loc5_20.3: %i32 = converted %int_1000.loc5, %.loc5_20.2 [concrete = constants.%int_1000.55f] +// CHECK:STDOUT: %bound_method.loc5_19.2: = bound_method %int_1000.loc5, %specific_fn.loc5 [concrete = constants.%bound_method] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5: init %i32 = call %bound_method.loc5_19.2(%int_1000.loc5) [concrete = constants.%int_1000.55f] +// CHECK:STDOUT: %.loc5_19.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5 [concrete = constants.%int_1000.55f] +// CHECK:STDOUT: %.loc5_19.3: %i32 = converted %int_1000.loc5, %.loc5_19.2 [concrete = constants.%int_1000.55f] // CHECK:STDOUT: %C.loc5: type = class_type @C, @C(constants.%int_1000.55f) [concrete = constants.%C.847] // CHECK:STDOUT: } // CHECK:STDOUT: %b.loc5_10.2: %C.847 = symbolic_binding b, 0 [symbolic = %b.loc5_10.1 (constants.%b)] @@ -128,17 +128,17 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %D.decl.loc6: %D.type = class_decl @D [concrete = constants.%D.generic] { // CHECK:STDOUT: %b.patt.loc6: %pattern_type.053 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc5 (constants.%b.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_20.1: type = splice_block %C.loc6 [concrete = constants.%C.847] { +// CHECK:STDOUT: %.loc6_19.1: type = splice_block %C.loc6 [concrete = constants.%C.847] { // CHECK:STDOUT: %.Self.frozen.loc6: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %C.ref.loc6: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000.loc6: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] // CHECK:STDOUT: %impl.elem0.loc6: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] -// CHECK:STDOUT: %bound_method.loc6_20.1: = bound_method %int_1000.loc6, %impl.elem0.loc6 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] +// CHECK:STDOUT: %bound_method.loc6_19.1: = bound_method %int_1000.loc6, %impl.elem0.loc6 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc6_20.2: = bound_method %int_1000.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6: init %i32 = call %bound_method.loc6_20.2(%int_1000.loc6) [concrete = constants.%int_1000.55f] -// CHECK:STDOUT: %.loc6_20.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6 [concrete = constants.%int_1000.55f] -// CHECK:STDOUT: %.loc6_20.3: %i32 = converted %int_1000.loc6, %.loc6_20.2 [concrete = constants.%int_1000.55f] +// CHECK:STDOUT: %bound_method.loc6_19.2: = bound_method %int_1000.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6: init %i32 = call %bound_method.loc6_19.2(%int_1000.loc6) [concrete = constants.%int_1000.55f] +// CHECK:STDOUT: %.loc6_19.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6 [concrete = constants.%int_1000.55f] +// CHECK:STDOUT: %.loc6_19.3: %i32 = converted %int_1000.loc6, %.loc6_19.2 [concrete = constants.%int_1000.55f] // CHECK:STDOUT: %C.loc6: type = class_type @C, @C(constants.%int_1000.55f) [concrete = constants.%C.847] // CHECK:STDOUT: } // CHECK:STDOUT: %b.loc6: %C.847 = symbolic_binding b, 0 [symbolic = %b.loc5_10.1 (constants.%b)] @@ -267,17 +267,17 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %D.decl.loc5: %D.type.ff75f2.1 = class_decl @D.loc5 [concrete = constants.%D.generic.7223e9.1] { // CHECK:STDOUT: %b.patt.loc5_10.1: %pattern_type.053 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc5_10.2 (constants.%b.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_19.1: type = splice_block %C [concrete = constants.%C.847] { +// CHECK:STDOUT: %.loc5_18.1: type = splice_block %C [concrete = constants.%C.847] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] // CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] -// CHECK:STDOUT: %bound_method.loc5_19.1: = bound_method %int_1000, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] +// CHECK:STDOUT: %bound_method.loc5_18.1: = bound_method %int_1000, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc5_19.2: = bound_method %int_1000, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_19.2(%int_1000) [concrete = constants.%int_1000.55f] -// CHECK:STDOUT: %.loc5_19.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1000.55f] -// CHECK:STDOUT: %.loc5_19.3: %i32 = converted %int_1000, %.loc5_19.2 [concrete = constants.%int_1000.55f] +// CHECK:STDOUT: %bound_method.loc5_18.2: = bound_method %int_1000, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_18.2(%int_1000) [concrete = constants.%int_1000.55f] +// CHECK:STDOUT: %.loc5_18.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1000.55f] +// CHECK:STDOUT: %.loc5_18.3: %i32 = converted %int_1000, %.loc5_18.2 [concrete = constants.%int_1000.55f] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_1000.55f) [concrete = constants.%C.847] // CHECK:STDOUT: } // CHECK:STDOUT: %b.loc5_10.2: %C.847 = symbolic_binding b, 0 [symbolic = %b.loc5_10.1 (constants.%b)] @@ -285,17 +285,17 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %D.decl.loc13: %D.type.ff75f2.2 = class_decl @D.loc13 [concrete = constants.%D.generic.7223e9.2] { // CHECK:STDOUT: %b.patt.loc13_10.1: %pattern_type.053 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc13_10.2 (constants.%b.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_20.1: type = splice_block %C [concrete = constants.%C.847] { +// CHECK:STDOUT: %.loc13_19.1: type = splice_block %C [concrete = constants.%C.847] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] // CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] -// CHECK:STDOUT: %bound_method.loc13_20.1: = bound_method %int_1000, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] +// CHECK:STDOUT: %bound_method.loc13_19.1: = bound_method %int_1000, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_20.2: = bound_method %int_1000, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc13_20.2(%int_1000) [concrete = constants.%int_1000.55f] -// CHECK:STDOUT: %.loc13_20.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1000.55f] -// CHECK:STDOUT: %.loc13_20.3: %i32 = converted %int_1000, %.loc13_20.2 [concrete = constants.%int_1000.55f] +// CHECK:STDOUT: %bound_method.loc13_19.2: = bound_method %int_1000, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc13_19.2(%int_1000) [concrete = constants.%int_1000.55f] +// CHECK:STDOUT: %.loc13_19.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1000.55f] +// CHECK:STDOUT: %.loc13_19.3: %i32 = converted %int_1000, %.loc13_19.2 [concrete = constants.%int_1000.55f] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_1000.55f) [concrete = constants.%C.847] // CHECK:STDOUT: } // CHECK:STDOUT: %b.loc13_10.2: %C.847 = symbolic_binding b, 0 [symbolic = %b.loc13_10.1 (constants.%b)] diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index d64b0cd6d808..72434122e644 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -18,7 +18,7 @@ library "[[@TEST_NAME]]"; class C {} -fn F[T:! type](a: array(T, 3)) -> T { return F(a); } +fn F[T: type](a: array(T, 3)) -> T { return F(a); } fn G() -> C { var a: array(C, 3) = ({}, {}, {}); @@ -31,7 +31,7 @@ library "[[@TEST_NAME]]"; class C {} -fn F[N:! Core.IntLiteral](unused a: array(C, N)) -> i32 { return N; } +fn F[N: Core.IntLiteral](unused a: array(C, N)) -> i32 { return N; } fn G() -> i32 { var a: array(C, 3) = ({}, {}, {}); @@ -44,7 +44,7 @@ library "[[@TEST_NAME]]"; class C {} -fn F[T:! type, N:! Core.IntLiteral](unused a: array(T, N)) {} +fn F[T: type, N: Core.IntLiteral](unused a: array(T, N)) {} fn G() { var a: array(C, 3) = ({}, {}, {}); @@ -57,7 +57,7 @@ library "[[@TEST_NAME]]"; class C {} -fn F[T:! type](a: array(T, 2)) -> T { return F(a); } +fn F[T: type](a: array(T, 2)) -> T { return F(a); } fn G() -> C { // TODO: We succeed at deducing T here but fail to convert. Is this the right behavior? @@ -68,9 +68,9 @@ fn G() -> C { // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE+7]]:12: note: type `array(C, 3)` does not implement interface `Core.ImplicitAs(array(C, 2))` [MissingImplInMemberAccessInContext] // CHECK:STDERR: return F(a); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE-11]]:16: note: initializing function parameter [InCallToFunctionParam] - // CHECK:STDERR: fn F[T:! type](a: array(T, 2)) -> T { return F(a); } - // CHECK:STDERR: ^~~~~~~~~~~~~~ + // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE-11]]:15: note: initializing function parameter [InCallToFunctionParam] + // CHECK:STDERR: fn F[T: type](a: array(T, 2)) -> T { return F(a); } + // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: return F(a); } @@ -82,7 +82,7 @@ library "[[@TEST_NAME]]"; class C {} class D {} -fn F[N:! Core.IntLiteral](unused a: array(C, N)) -> i32 { return N; } +fn F[N: Core.IntLiteral](unused a: array(C, N)) -> i32 { return N; } fn G() -> i32 { // TODO: We succeed at deducing N here but fail to convert. Is this the right behavior? @@ -93,9 +93,9 @@ fn G() -> i32 { // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:12: note: type `array(D, 3)` does not implement interface `Core.ImplicitAs(array(C, 3))` [MissingImplInMemberAccessInContext] // CHECK:STDERR: return F(a); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE-11]]:34: note: initializing function parameter [InCallToFunctionParam] - // CHECK:STDERR: fn F[N:! Core.IntLiteral](unused a: array(C, N)) -> i32 { return N; } - // CHECK:STDERR: ^~~~~~~~~~~~~~ + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE-11]]:33: note: initializing function parameter [InCallToFunctionParam] + // CHECK:STDERR: fn F[N: Core.IntLiteral](unused a: array(C, N)) -> i32 { return N; } + // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: return F(a); } @@ -106,7 +106,7 @@ library "[[@TEST_NAME]]"; class C {} -fn F[N:! i32](unused a: array(C, N)) -> i32 { return N; } +fn F[N: i32](unused a: array(C, N)) -> i32 { return N; } fn G() -> i32 { var a: array(C, 3) = ({}, {}, {}); @@ -119,8 +119,8 @@ fn G() -> i32 { // CHECK:STDERR: return F(a); // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_bound_type_mismatch.carbon:[[@LINE-12]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F[N:! i32](unused a: array(C, N)) -> i32 { return N; } - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F[N: i32](unused a: array(C, N)) -> i32 { return N; } + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: return F(a); } @@ -130,7 +130,7 @@ library "[[@TEST_NAME]]"; class C {} -fn F[N:! i32](unused a: array(C, N)) {} +fn F[N: i32](unused a: array(C, N)) {} fn G() { // TODO: Deduce N as 3 from the tuple's size. @@ -139,8 +139,8 @@ fn G() { // CHECK:STDERR: F(({}, {}, {})); // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_array_length_from_tuple.carbon:[[@LINE-8]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F[N:! i32](unused a: array(C, N)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F[N: i32](unused a: array(C, N)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(({}, {}, {})); } @@ -217,25 +217,25 @@ fn G() { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %a.param_patt.loc6_17.1: @F.%pattern_type.loc6_17 (%pattern_type.b3f) = value_param_pattern [symbolic = %a.param_patt.loc6_17.2 (constants.%a.param_patt.480)] -// CHECK:STDOUT: %a.patt.loc6_17.1: @F.%pattern_type.loc6_17 (%pattern_type.b3f) = at_binding_pattern a, %a.param_patt.loc6_17.1 [symbolic = %a.patt.loc6_17.2 (constants.%a.patt.2e7)] -// CHECK:STDOUT: %return.param_patt.loc6_35.1: @F.%pattern_type.loc6_35 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_35.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc6_32.1: @F.%pattern_type.loc6_35 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_35.1, %T.ref.loc6_35 [symbolic = %return.patt.loc6_32.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %a.param_patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.b3f) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.480)] +// CHECK:STDOUT: %a.patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.b3f) = at_binding_pattern a, %a.param_patt.loc6_16.1 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.2e7)] +// CHECK:STDOUT: %return.param_patt.loc6_34.1: @F.%pattern_type.loc6_34 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_34.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc6_31.1: @F.%pattern_type.loc6_34 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_34.1, %T.ref.loc6_34 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_35: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc6_35.3: Core.Form = init_form %T.ref.loc6_35 [symbolic = %.loc6_35.2 (constants.%.184)] -// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc6_34: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %.loc6_34.3: Core.Form = init_form %T.ref.loc6_34 [symbolic = %.loc6_34.2 (constants.%.184)] +// CHECK:STDOUT: %.loc6_9.1: type = splice_block %.loc6_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc6_29.1 (%array_type.3ec) = value_param call_param0 -// CHECK:STDOUT: %.loc6_29: type = splice_block %array_type.loc6_29.2 [symbolic = %array_type.loc6_29.1 (constants.%array_type.3ec)] { -// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %a.param: @F.%array_type.loc6_28.1 (%array_type.3ec) = value_param call_param0 +// CHECK:STDOUT: %.loc6_28: type = splice_block %array_type.loc6_28.2 [symbolic = %array_type.loc6_28.1 (constants.%array_type.3ec)] { +// CHECK:STDOUT: %T.ref.loc6_24: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %array_type.loc6_29.2: type = array_type %int_3, %T.ref.loc6_25 [symbolic = %array_type.loc6_29.1 (constants.%array_type.3ec)] +// CHECK:STDOUT: %array_type.loc6_28.2: type = array_type %int_3, %T.ref.loc6_24 [symbolic = %array_type.loc6_28.1 (constants.%array_type.3ec)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc6_29.1 (%array_type.3ec) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%array_type.loc6_28.1 (%array_type.3ec) = wrapper_binding a, %a.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_7.1 (%T) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_7.1 (%T) = return_slot %return.param // CHECK:STDOUT: } @@ -261,26 +261,26 @@ fn G() { // CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) { // CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %array_type.loc6_29.1: type = array_type constants.%int_3, %T.loc6_7.1 [symbolic = %array_type.loc6_29.1 (constants.%array_type.3ec)] -// CHECK:STDOUT: %pattern_type.loc6_17: type = pattern_type %array_type.loc6_29.1 [symbolic = %pattern_type.loc6_17 (constants.%pattern_type.b3f)] -// CHECK:STDOUT: %a.param_patt.loc6_17.2: @F.%pattern_type.loc6_17 (%pattern_type.b3f) = value_param_pattern [symbolic = %a.param_patt.loc6_17.2 (constants.%a.param_patt.480)] -// CHECK:STDOUT: %a.patt.loc6_17.2: @F.%pattern_type.loc6_17 (%pattern_type.b3f) = at_binding_pattern a, %a.param_patt.loc6_17.2 [symbolic = %a.patt.loc6_17.2 (constants.%a.patt.2e7)] -// CHECK:STDOUT: %.loc6_35.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_35.2 (constants.%.184)] -// CHECK:STDOUT: %pattern_type.loc6_35: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_35 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %return.param_patt.loc6_35.2: @F.%pattern_type.loc6_35 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_35.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc6_32.2: @F.%pattern_type.loc6_35 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_35.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_32.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %array_type.loc6_28.1: type = array_type constants.%int_3, %T.loc6_7.1 [symbolic = %array_type.loc6_28.1 (constants.%array_type.3ec)] +// CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %array_type.loc6_28.1 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.b3f)] +// CHECK:STDOUT: %a.param_patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.b3f) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.480)] +// CHECK:STDOUT: %a.patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.b3f) = at_binding_pattern a, %a.param_patt.loc6_16.2 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.2e7)] +// CHECK:STDOUT: %.loc6_34.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_34.2 (constants.%.184)] +// CHECK:STDOUT: %pattern_type.loc6_34: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_34 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %return.param_patt.loc6_34.2: @F.%pattern_type.loc6_34 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_34.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc6_31.2: @F.%pattern_type.loc6_34 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_34.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.b39)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_29.1 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %F.specific_fn.loc6_46.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_46.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_28.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %F.specific_fn.loc6_45.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.eab)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_29.1 (%array_type.3ec)) -> out %return.param: @F.%T.loc6_7.1 (%T) { +// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_28.1 (%array_type.3ec)) -> out %return.param: @F.%T.loc6_7.1 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %a.ref: @F.%array_type.loc6_29.1 (%array_type.3ec) = name_ref a, %a -// CHECK:STDOUT: %F.specific_fn.loc6_46.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_46.2 (constants.%F.specific_fn.eab)] -// CHECK:STDOUT: %.loc6_35.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_35.1 = call %F.specific_fn.loc6_46.1(%a.ref) +// CHECK:STDOUT: %a.ref: @F.%array_type.loc6_28.1 (%array_type.3ec) = name_ref a, %a +// CHECK:STDOUT: %F.specific_fn.loc6_45.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %.loc6_34.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_34.1 = call %F.specific_fn.loc6_45.1(%a.ref) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -351,35 +351,35 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %array_type.loc6_29.1 => constants.%array_type.3ec -// CHECK:STDOUT: %pattern_type.loc6_17 => constants.%pattern_type.b3f -// CHECK:STDOUT: %a.param_patt.loc6_17.2 => constants.%a.param_patt.480 -// CHECK:STDOUT: %a.patt.loc6_17.2 => constants.%a.patt.2e7 -// CHECK:STDOUT: %.loc6_35.2 => constants.%.184 -// CHECK:STDOUT: %pattern_type.loc6_35 => constants.%pattern_type.51d -// CHECK:STDOUT: %return.param_patt.loc6_35.2 => constants.%return.param_patt.41d -// CHECK:STDOUT: %return.patt.loc6_32.2 => constants.%return.patt.b39 +// CHECK:STDOUT: %array_type.loc6_28.1 => constants.%array_type.3ec +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.b3f +// CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.480 +// CHECK:STDOUT: %a.patt.loc6_16.2 => constants.%a.patt.2e7 +// CHECK:STDOUT: %.loc6_34.2 => constants.%.184 +// CHECK:STDOUT: %pattern_type.loc6_34 => constants.%pattern_type.51d +// CHECK:STDOUT: %return.param_patt.loc6_34.2 => constants.%return.param_patt.41d +// CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.b39 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete -// CHECK:STDOUT: %F.specific_fn.loc6_46.2 => constants.%F.specific_fn.eab +// CHECK:STDOUT: %F.specific_fn.loc6_45.2 => constants.%F.specific_fn.eab // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%C -// CHECK:STDOUT: %array_type.loc6_29.1 => constants.%array_type.9a3 -// CHECK:STDOUT: %pattern_type.loc6_17 => constants.%pattern_type.3f5 -// CHECK:STDOUT: %a.param_patt.loc6_17.2 => constants.%a.param_patt.79a -// CHECK:STDOUT: %a.patt.loc6_17.2 => constants.%a.patt.e9e -// CHECK:STDOUT: %.loc6_35.2 => constants.%.a44 -// CHECK:STDOUT: %pattern_type.loc6_35 => constants.%pattern_type.98b -// CHECK:STDOUT: %return.param_patt.loc6_35.2 => constants.%return.param_patt.89a -// CHECK:STDOUT: %return.patt.loc6_32.2 => constants.%return.patt.e4a +// CHECK:STDOUT: %array_type.loc6_28.1 => constants.%array_type.9a3 +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.3f5 +// CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.79a +// CHECK:STDOUT: %a.patt.loc6_16.2 => constants.%a.patt.e9e +// CHECK:STDOUT: %.loc6_34.2 => constants.%.a44 +// CHECK:STDOUT: %pattern_type.loc6_34 => constants.%pattern_type.98b +// CHECK:STDOUT: %return.param_patt.loc6_34.2 => constants.%return.param_patt.89a +// CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.e4a // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.1a4 -// CHECK:STDOUT: %F.specific_fn.loc6_46.2 => constants.%F.specific_fn.e0d +// CHECK:STDOUT: %F.specific_fn.loc6_45.2 => constants.%F.specific_fn.e0d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- bound_only.carbon @@ -480,26 +480,26 @@ fn G() { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %N.patt.loc6_7.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_7.2 (constants.%N.patt)] -// CHECK:STDOUT: %a.param_patt.loc6_35.1: @F.%pattern_type (%pattern_type.5ed) = value_param_pattern [symbolic = %a.param_patt.loc6_35.2 (constants.%a.param_patt.9e2)] -// CHECK:STDOUT: %a.patt.loc6_35.1: @F.%pattern_type (%pattern_type.5ed) = at_binding_pattern a, %a.param_patt.loc6_35.1 [symbolic = %a.patt.loc6_35.2 (constants.%a.patt.59e)] +// CHECK:STDOUT: %a.param_patt.loc6_34.1: @F.%pattern_type (%pattern_type.5ed) = value_param_pattern [symbolic = %a.param_patt.loc6_34.2 (constants.%a.param_patt.9e2)] +// CHECK:STDOUT: %a.patt.loc6_34.1: @F.%pattern_type (%pattern_type.5ed) = at_binding_pattern a, %a.param_patt.loc6_34.1 [symbolic = %a.patt.loc6_34.2 (constants.%a.patt.59e)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc6_53: Core.Form = init_form %i32 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc6_14: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.loc6_52: Core.Form = init_form %i32 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc6_13: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: } // CHECK:STDOUT: %N.loc6_7.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc6_7.1 (constants.%N)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc6_47.1 (%array_type.87f) = value_param call_param0 -// CHECK:STDOUT: %.loc6_47: type = splice_block %array_type.loc6_47.2 [symbolic = %array_type.loc6_47.1 (constants.%array_type.87f)] { +// CHECK:STDOUT: %a.param: @F.%array_type.loc6_46.1 (%array_type.87f) = value_param call_param0 +// CHECK:STDOUT: %.loc6_46: type = splice_block %array_type.loc6_46.2 [symbolic = %array_type.loc6_46.1 (constants.%array_type.87f)] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %N.ref.loc6_46: Core.IntLiteral = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N)] -// CHECK:STDOUT: %array_type.loc6_47.2: type = array_type %N.ref.loc6_46, %C.ref [symbolic = %array_type.loc6_47.1 (constants.%array_type.87f)] +// CHECK:STDOUT: %N.ref.loc6_45: Core.IntLiteral = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N)] +// CHECK:STDOUT: %array_type.loc6_46.2: type = array_type %N.ref.loc6_45, %C.ref [symbolic = %array_type.loc6_46.1 (constants.%array_type.87f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc6_47.1 (%array_type.87f) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%array_type.loc6_46.1 (%array_type.87f) = wrapper_binding a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -525,27 +525,27 @@ fn G() { // CHECK:STDOUT: generic fn @F(%N.loc6_7.2: Core.IntLiteral) { // CHECK:STDOUT: %N.patt.loc6_7.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_7.2 (constants.%N.patt)] // CHECK:STDOUT: %N.loc6_7.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc6_7.1 (constants.%N)] -// CHECK:STDOUT: %array_type.loc6_47.1: type = array_type %N.loc6_7.1, constants.%C [symbolic = %array_type.loc6_47.1 (constants.%array_type.87f)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc6_47.1 [symbolic = %pattern_type (constants.%pattern_type.5ed)] -// CHECK:STDOUT: %a.param_patt.loc6_35.2: @F.%pattern_type (%pattern_type.5ed) = value_param_pattern [symbolic = %a.param_patt.loc6_35.2 (constants.%a.param_patt.9e2)] -// CHECK:STDOUT: %a.patt.loc6_35.2: @F.%pattern_type (%pattern_type.5ed) = at_binding_pattern a, %a.param_patt.loc6_35.2 [symbolic = %a.patt.loc6_35.2 (constants.%a.patt.59e)] +// CHECK:STDOUT: %array_type.loc6_46.1: type = array_type %N.loc6_7.1, constants.%C [symbolic = %array_type.loc6_46.1 (constants.%array_type.87f)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc6_46.1 [symbolic = %pattern_type (constants.%pattern_type.5ed)] +// CHECK:STDOUT: %a.param_patt.loc6_34.2: @F.%pattern_type (%pattern_type.5ed) = value_param_pattern [symbolic = %a.param_patt.loc6_34.2 (constants.%a.param_patt.9e2)] +// CHECK:STDOUT: %a.patt.loc6_34.2: @F.%pattern_type (%pattern_type.5ed) = at_binding_pattern a, %a.param_patt.loc6_34.2 [symbolic = %a.patt.loc6_34.2 (constants.%a.patt.59e)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_47.1 [symbolic = %require_complete (constants.%require_complete.29f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_46.1 [symbolic = %require_complete (constants.%require_complete.29f)] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc6_7.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9)] -// CHECK:STDOUT: %bound_method.loc6_67.3: = bound_method %N.loc6_7.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc6_67.3 (constants.%bound_method.ee4)] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_67.2: init %i32 = call %bound_method.loc6_67.3(%N.loc6_7.1) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_67.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %bound_method.loc6_66.3: = bound_method %N.loc6_7.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc6_66.3 (constants.%bound_method.ee4)] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_66.2: init %i32 = call %bound_method.loc6_66.3(%N.loc6_7.1) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_66.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_47.1 (%array_type.87f)) -> out %return.param: %i32 { +// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_46.1 (%array_type.87f)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %N.ref.loc6_66: Core.IntLiteral = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N)] +// CHECK:STDOUT: %N.ref.loc6_65: Core.IntLiteral = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N)] // CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] -// CHECK:STDOUT: %bound_method.loc6_67.1: = bound_method %N.ref.loc6_66, %impl.elem0 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9)] +// CHECK:STDOUT: %bound_method.loc6_66.1: = bound_method %N.ref.loc6_65, %impl.elem0 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc6_67.2: = bound_method %N.ref.loc6_66, %specific_fn [symbolic = %bound_method.loc6_67.3 (constants.%bound_method.ee4)] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_67.1: init %i32 = call %bound_method.loc6_67.2(%N.ref.loc6_66) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_67.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %.loc6_67: init %i32 = converted %N.ref.loc6_66, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_67.1 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_67.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: return %.loc6_67 +// CHECK:STDOUT: %bound_method.loc6_66.2: = bound_method %N.ref.loc6_65, %specific_fn [symbolic = %bound_method.loc6_66.3 (constants.%bound_method.ee4)] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_66.1: init %i32 = call %bound_method.loc6_66.2(%N.ref.loc6_65) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_66.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %.loc6_66: init %i32 = converted %N.ref.loc6_65, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_66.1 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_66.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: return %.loc6_66 // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } @@ -614,25 +614,25 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%N) { // CHECK:STDOUT: %N.patt.loc6_7.2 => constants.%N.patt // CHECK:STDOUT: %N.loc6_7.1 => constants.%N -// CHECK:STDOUT: %array_type.loc6_47.1 => constants.%array_type.87f +// CHECK:STDOUT: %array_type.loc6_46.1 => constants.%array_type.87f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.5ed -// CHECK:STDOUT: %a.param_patt.loc6_35.2 => constants.%a.param_patt.9e2 -// CHECK:STDOUT: %a.patt.loc6_35.2 => constants.%a.patt.59e +// CHECK:STDOUT: %a.param_patt.loc6_34.2 => constants.%a.param_patt.9e2 +// CHECK:STDOUT: %a.patt.loc6_34.2 => constants.%a.patt.59e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%int_3.1ba) { // CHECK:STDOUT: %N.patt.loc6_7.2 => constants.%N.patt // CHECK:STDOUT: %N.loc6_7.1 => constants.%int_3.1ba -// CHECK:STDOUT: %array_type.loc6_47.1 => constants.%array_type.9a3 +// CHECK:STDOUT: %array_type.loc6_46.1 => constants.%array_type.9a3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3f5 -// CHECK:STDOUT: %a.param_patt.loc6_35.2 => constants.%a.param_patt.79a -// CHECK:STDOUT: %a.patt.loc6_35.2 => constants.%a.patt.e9e +// CHECK:STDOUT: %a.param_patt.loc6_34.2 => constants.%a.param_patt.79a +// CHECK:STDOUT: %a.patt.loc6_34.2 => constants.%a.patt.e9e // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.1a4 // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound => constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.485 -// CHECK:STDOUT: %bound_method.loc6_67.3 => constants.%bound_method.763 -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_67.2 => constants.%int_3.410 +// CHECK:STDOUT: %bound_method.loc6_66.3 => constants.%bound_method.763 +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_66.2 => constants.%int_3.410 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- type_and_bound.carbon @@ -703,28 +703,28 @@ fn G() { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc6_17.1: %pattern_type.dc0 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_17.2 (constants.%N.patt)] -// CHECK:STDOUT: %a.param_patt.loc6_45.1: @F.%pattern_type (%pattern_type.4d8) = value_param_pattern [symbolic = %a.param_patt.loc6_45.2 (constants.%a.param_patt.0e1)] -// CHECK:STDOUT: %a.patt.loc6_45.1: @F.%pattern_type (%pattern_type.4d8) = at_binding_pattern a, %a.param_patt.loc6_45.1 [symbolic = %a.patt.loc6_45.2 (constants.%a.patt.3a9)] +// CHECK:STDOUT: %N.patt.loc6_16.1: %pattern_type.dc0 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_16.2 (constants.%N.patt)] +// CHECK:STDOUT: %a.param_patt.loc6_43.1: @F.%pattern_type (%pattern_type.4d8) = value_param_pattern [symbolic = %a.param_patt.loc6_43.2 (constants.%a.param_patt.0e1)] +// CHECK:STDOUT: %a.patt.loc6_43.1: @F.%pattern_type (%pattern_type.4d8) = at_binding_pattern a, %a.param_patt.loc6_43.1 [symbolic = %a.patt.loc6_43.2 (constants.%a.patt.3a9)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_9.1: type = splice_block %.loc6_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc6_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc6_24: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] { -// CHECK:STDOUT: %.Self.frozen.loc6_17: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc6_22: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.Self.frozen.loc6_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc6_17.2: Core.IntLiteral = symbolic_binding N, 1 [symbolic = %N.loc6_17.1 (constants.%N)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc6_57.1 (%array_type.6d2) = value_param call_param0 -// CHECK:STDOUT: %.loc6_57: type = splice_block %array_type.loc6_57.2 [symbolic = %array_type.loc6_57.1 (constants.%array_type.6d2)] { +// CHECK:STDOUT: %N.loc6_16.2: Core.IntLiteral = symbolic_binding N, 1 [symbolic = %N.loc6_16.1 (constants.%N)] +// CHECK:STDOUT: %a.param: @F.%array_type.loc6_55.1 (%array_type.6d2) = value_param call_param0 +// CHECK:STDOUT: %.loc6_55: type = splice_block %array_type.loc6_55.2 [symbolic = %array_type.loc6_55.1 (constants.%array_type.6d2)] { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc6_17.2 [symbolic = %N.loc6_17.1 (constants.%N)] -// CHECK:STDOUT: %array_type.loc6_57.2: type = array_type %N.ref, %T.ref [symbolic = %array_type.loc6_57.1 (constants.%array_type.6d2)] +// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc6_16.2 [symbolic = %N.loc6_16.1 (constants.%N)] +// CHECK:STDOUT: %array_type.loc6_55.2: type = array_type %N.ref, %T.ref [symbolic = %array_type.loc6_55.1 (constants.%array_type.6d2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc6_57.1 (%array_type.6d2) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%array_type.loc6_55.1 (%array_type.6d2) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } @@ -737,20 +737,20 @@ fn G() { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type, %N.loc6_17.2: Core.IntLiteral) { +// CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type, %N.loc6_16.2: Core.IntLiteral) { // CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %N.patt.loc6_17.2: %pattern_type.dc0 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_17.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.loc6_17.1: Core.IntLiteral = symbolic_binding N, 1 [symbolic = %N.loc6_17.1 (constants.%N)] -// CHECK:STDOUT: %array_type.loc6_57.1: type = array_type %N.loc6_17.1, %T.loc6_7.1 [symbolic = %array_type.loc6_57.1 (constants.%array_type.6d2)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc6_57.1 [symbolic = %pattern_type (constants.%pattern_type.4d8)] -// CHECK:STDOUT: %a.param_patt.loc6_45.2: @F.%pattern_type (%pattern_type.4d8) = value_param_pattern [symbolic = %a.param_patt.loc6_45.2 (constants.%a.param_patt.0e1)] -// CHECK:STDOUT: %a.patt.loc6_45.2: @F.%pattern_type (%pattern_type.4d8) = at_binding_pattern a, %a.param_patt.loc6_45.2 [symbolic = %a.patt.loc6_45.2 (constants.%a.patt.3a9)] +// CHECK:STDOUT: %N.patt.loc6_16.2: %pattern_type.dc0 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_16.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.loc6_16.1: Core.IntLiteral = symbolic_binding N, 1 [symbolic = %N.loc6_16.1 (constants.%N)] +// CHECK:STDOUT: %array_type.loc6_55.1: type = array_type %N.loc6_16.1, %T.loc6_7.1 [symbolic = %array_type.loc6_55.1 (constants.%array_type.6d2)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc6_55.1 [symbolic = %pattern_type (constants.%pattern_type.4d8)] +// CHECK:STDOUT: %a.param_patt.loc6_43.2: @F.%pattern_type (%pattern_type.4d8) = value_param_pattern [symbolic = %a.param_patt.loc6_43.2 (constants.%a.param_patt.0e1)] +// CHECK:STDOUT: %a.patt.loc6_43.2: @F.%pattern_type (%pattern_type.4d8) = at_binding_pattern a, %a.param_patt.loc6_43.2 [symbolic = %a.patt.loc6_43.2 (constants.%a.patt.3a9)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_57.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_55.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_57.1 (%array_type.6d2)) { +// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_55.1 (%array_type.6d2)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -821,23 +821,23 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%T, constants.%N) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %N.patt.loc6_17.2 => constants.%N.patt -// CHECK:STDOUT: %N.loc6_17.1 => constants.%N -// CHECK:STDOUT: %array_type.loc6_57.1 => constants.%array_type.6d2 +// CHECK:STDOUT: %N.patt.loc6_16.2 => constants.%N.patt +// CHECK:STDOUT: %N.loc6_16.1 => constants.%N +// CHECK:STDOUT: %array_type.loc6_55.1 => constants.%array_type.6d2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4d8 -// CHECK:STDOUT: %a.param_patt.loc6_45.2 => constants.%a.param_patt.0e1 -// CHECK:STDOUT: %a.patt.loc6_45.2 => constants.%a.patt.3a9 +// CHECK:STDOUT: %a.param_patt.loc6_43.2 => constants.%a.param_patt.0e1 +// CHECK:STDOUT: %a.patt.loc6_43.2 => constants.%a.patt.3a9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C, constants.%int_3) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%C -// CHECK:STDOUT: %N.patt.loc6_17.2 => constants.%N.patt -// CHECK:STDOUT: %N.loc6_17.1 => constants.%int_3 -// CHECK:STDOUT: %array_type.loc6_57.1 => constants.%array_type.9a3 +// CHECK:STDOUT: %N.patt.loc6_16.2 => constants.%N.patt +// CHECK:STDOUT: %N.loc6_16.1 => constants.%int_3 +// CHECK:STDOUT: %array_type.loc6_55.1 => constants.%array_type.9a3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3f5 -// CHECK:STDOUT: %a.param_patt.loc6_45.2 => constants.%a.param_patt.79a -// CHECK:STDOUT: %a.patt.loc6_45.2 => constants.%a.patt.e9e +// CHECK:STDOUT: %a.param_patt.loc6_43.2 => constants.%a.param_patt.79a +// CHECK:STDOUT: %a.patt.loc6_43.2 => constants.%a.patt.e9e // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.1a4 @@ -921,25 +921,25 @@ fn G() { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %a.param_patt.loc6_17.1: @F.%pattern_type.loc6_17 (%pattern_type.b42) = value_param_pattern [symbolic = %a.param_patt.loc6_17.2 (constants.%a.param_patt.9b5)] -// CHECK:STDOUT: %a.patt.loc6_17.1: @F.%pattern_type.loc6_17 (%pattern_type.b42) = at_binding_pattern a, %a.param_patt.loc6_17.1 [symbolic = %a.patt.loc6_17.2 (constants.%a.patt.388)] -// CHECK:STDOUT: %return.param_patt.loc6_35.1: @F.%pattern_type.loc6_35 (%pattern_type.51d1c4.1) = out_param_pattern [symbolic = %return.param_patt.loc6_35.2 (constants.%return.param_patt.41d2d9.1)] -// CHECK:STDOUT: %return.patt.loc6_32.1: @F.%pattern_type.loc6_35 (%pattern_type.51d1c4.1) = return_slot_pattern %return.param_patt.loc6_35.1, %T.ref.loc6_35 [symbolic = %return.patt.loc6_32.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %a.param_patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.b42) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.9b5)] +// CHECK:STDOUT: %a.patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.b42) = at_binding_pattern a, %a.param_patt.loc6_16.1 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.388)] +// CHECK:STDOUT: %return.param_patt.loc6_34.1: @F.%pattern_type.loc6_34 (%pattern_type.51d1c4.1) = out_param_pattern [symbolic = %return.param_patt.loc6_34.2 (constants.%return.param_patt.41d2d9.1)] +// CHECK:STDOUT: %return.patt.loc6_31.1: @F.%pattern_type.loc6_34 (%pattern_type.51d1c4.1) = return_slot_pattern %return.param_patt.loc6_34.1, %T.ref.loc6_34 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_35: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc6_35.3: Core.Form = init_form %T.ref.loc6_35 [symbolic = %.loc6_35.2 (constants.%.184347.1)] -// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc6_34: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %.loc6_34.3: Core.Form = init_form %T.ref.loc6_34 [symbolic = %.loc6_34.2 (constants.%.184347.1)] +// CHECK:STDOUT: %.loc6_9.1: type = splice_block %.loc6_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc6_29.1 (%array_type.a0b) = value_param call_param0 -// CHECK:STDOUT: %.loc6_29: type = splice_block %array_type.loc6_29.2 [symbolic = %array_type.loc6_29.1 (constants.%array_type.a0b)] { -// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %a.param: @F.%array_type.loc6_28.1 (%array_type.a0b) = value_param call_param0 +// CHECK:STDOUT: %.loc6_28: type = splice_block %array_type.loc6_28.2 [symbolic = %array_type.loc6_28.1 (constants.%array_type.a0b)] { +// CHECK:STDOUT: %T.ref.loc6_24: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %array_type.loc6_29.2: type = array_type %int_2, %T.ref.loc6_25 [symbolic = %array_type.loc6_29.1 (constants.%array_type.a0b)] +// CHECK:STDOUT: %array_type.loc6_28.2: type = array_type %int_2, %T.ref.loc6_24 [symbolic = %array_type.loc6_28.1 (constants.%array_type.a0b)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc6_29.1 (%array_type.a0b) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%array_type.loc6_28.1 (%array_type.a0b) = wrapper_binding a, %a.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_7.1 (%T) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_7.1 (%T) = return_slot %return.param // CHECK:STDOUT: } @@ -965,26 +965,26 @@ fn G() { // CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) { // CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %array_type.loc6_29.1: type = array_type constants.%int_2, %T.loc6_7.1 [symbolic = %array_type.loc6_29.1 (constants.%array_type.a0b)] -// CHECK:STDOUT: %pattern_type.loc6_17: type = pattern_type %array_type.loc6_29.1 [symbolic = %pattern_type.loc6_17 (constants.%pattern_type.b42)] -// CHECK:STDOUT: %a.param_patt.loc6_17.2: @F.%pattern_type.loc6_17 (%pattern_type.b42) = value_param_pattern [symbolic = %a.param_patt.loc6_17.2 (constants.%a.param_patt.9b5)] -// CHECK:STDOUT: %a.patt.loc6_17.2: @F.%pattern_type.loc6_17 (%pattern_type.b42) = at_binding_pattern a, %a.param_patt.loc6_17.2 [symbolic = %a.patt.loc6_17.2 (constants.%a.patt.388)] -// CHECK:STDOUT: %.loc6_35.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_35.2 (constants.%.184347.1)] -// CHECK:STDOUT: %pattern_type.loc6_35: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_35 (constants.%pattern_type.51d1c4.1)] -// CHECK:STDOUT: %return.param_patt.loc6_35.2: @F.%pattern_type.loc6_35 (%pattern_type.51d1c4.1) = out_param_pattern [symbolic = %return.param_patt.loc6_35.2 (constants.%return.param_patt.41d2d9.1)] -// CHECK:STDOUT: %return.patt.loc6_32.2: @F.%pattern_type.loc6_35 (%pattern_type.51d1c4.1) = return_slot_pattern %return.param_patt.loc6_35.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_32.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %array_type.loc6_28.1: type = array_type constants.%int_2, %T.loc6_7.1 [symbolic = %array_type.loc6_28.1 (constants.%array_type.a0b)] +// CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %array_type.loc6_28.1 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.b42)] +// CHECK:STDOUT: %a.param_patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.b42) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.9b5)] +// CHECK:STDOUT: %a.patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.b42) = at_binding_pattern a, %a.param_patt.loc6_16.2 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.388)] +// CHECK:STDOUT: %.loc6_34.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_34.2 (constants.%.184347.1)] +// CHECK:STDOUT: %pattern_type.loc6_34: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_34 (constants.%pattern_type.51d1c4.1)] +// CHECK:STDOUT: %return.param_patt.loc6_34.2: @F.%pattern_type.loc6_34 (%pattern_type.51d1c4.1) = out_param_pattern [symbolic = %return.param_patt.loc6_34.2 (constants.%return.param_patt.41d2d9.1)] +// CHECK:STDOUT: %return.patt.loc6_31.2: @F.%pattern_type.loc6_34 (%pattern_type.51d1c4.1) = return_slot_pattern %return.param_patt.loc6_34.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.b39)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_29.1 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %F.specific_fn.loc6_46.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_46.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_28.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %F.specific_fn.loc6_45.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.eab)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_29.1 (%array_type.a0b)) -> out %return.param: @F.%T.loc6_7.1 (%T) { +// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_28.1 (%array_type.a0b)) -> out %return.param: @F.%T.loc6_7.1 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %a.ref: @F.%array_type.loc6_29.1 (%array_type.a0b) = name_ref a, %a -// CHECK:STDOUT: %F.specific_fn.loc6_46.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_46.2 (constants.%F.specific_fn.eab)] -// CHECK:STDOUT: %.loc6_35.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_35.1 = call %F.specific_fn.loc6_46.1(%a.ref) +// CHECK:STDOUT: %a.ref: @F.%array_type.loc6_28.1 (%array_type.a0b) = name_ref a, %a +// CHECK:STDOUT: %F.specific_fn.loc6_45.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %.loc6_34.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_34.1 = call %F.specific_fn.loc6_45.1(%a.ref) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -1055,35 +1055,35 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %array_type.loc6_29.1 => constants.%array_type.a0b -// CHECK:STDOUT: %pattern_type.loc6_17 => constants.%pattern_type.b42 -// CHECK:STDOUT: %a.param_patt.loc6_17.2 => constants.%a.param_patt.9b5 -// CHECK:STDOUT: %a.patt.loc6_17.2 => constants.%a.patt.388 -// CHECK:STDOUT: %.loc6_35.2 => constants.%.184347.1 -// CHECK:STDOUT: %pattern_type.loc6_35 => constants.%pattern_type.51d1c4.1 -// CHECK:STDOUT: %return.param_patt.loc6_35.2 => constants.%return.param_patt.41d2d9.1 -// CHECK:STDOUT: %return.patt.loc6_32.2 => constants.%return.patt.b39 +// CHECK:STDOUT: %array_type.loc6_28.1 => constants.%array_type.a0b +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.b42 +// CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.9b5 +// CHECK:STDOUT: %a.patt.loc6_16.2 => constants.%a.patt.388 +// CHECK:STDOUT: %.loc6_34.2 => constants.%.184347.1 +// CHECK:STDOUT: %pattern_type.loc6_34 => constants.%pattern_type.51d1c4.1 +// CHECK:STDOUT: %return.param_patt.loc6_34.2 => constants.%return.param_patt.41d2d9.1 +// CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.b39 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete -// CHECK:STDOUT: %F.specific_fn.loc6_46.2 => constants.%F.specific_fn.eab +// CHECK:STDOUT: %F.specific_fn.loc6_45.2 => constants.%F.specific_fn.eab // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%C -// CHECK:STDOUT: %array_type.loc6_29.1 => constants.%array_type.cc9 -// CHECK:STDOUT: %pattern_type.loc6_17 => constants.%pattern_type.08b -// CHECK:STDOUT: %a.param_patt.loc6_17.2 => constants.%a.param_patt.143 -// CHECK:STDOUT: %a.patt.loc6_17.2 => constants.%a.patt.7c0 -// CHECK:STDOUT: %.loc6_35.2 => constants.%.a44 -// CHECK:STDOUT: %pattern_type.loc6_35 => constants.%pattern_type.98b -// CHECK:STDOUT: %return.param_patt.loc6_35.2 => constants.%return.param_patt.89a -// CHECK:STDOUT: %return.patt.loc6_32.2 => constants.%return.patt.e4a +// CHECK:STDOUT: %array_type.loc6_28.1 => constants.%array_type.cc9 +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.08b +// CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.143 +// CHECK:STDOUT: %a.patt.loc6_16.2 => constants.%a.patt.7c0 +// CHECK:STDOUT: %.loc6_34.2 => constants.%.a44 +// CHECK:STDOUT: %pattern_type.loc6_34 => constants.%pattern_type.98b +// CHECK:STDOUT: %return.param_patt.loc6_34.2 => constants.%return.param_patt.89a +// CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.e4a // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.d6a -// CHECK:STDOUT: %F.specific_fn.loc6_46.2 => constants.%F.specific_fn.e0d +// CHECK:STDOUT: %F.specific_fn.loc6_45.2 => constants.%F.specific_fn.e0d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_type_mismatch.carbon @@ -1189,26 +1189,26 @@ fn G() { // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %N.patt.loc7_7.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc7_7.2 (constants.%N.patt)] -// CHECK:STDOUT: %a.param_patt.loc7_35.1: @F.%pattern_type (%pattern_type.5ed) = value_param_pattern [symbolic = %a.param_patt.loc7_35.2 (constants.%a.param_patt.9e2)] -// CHECK:STDOUT: %a.patt.loc7_35.1: @F.%pattern_type (%pattern_type.5ed) = at_binding_pattern a, %a.param_patt.loc7_35.1 [symbolic = %a.patt.loc7_35.2 (constants.%a.patt.59e)] +// CHECK:STDOUT: %a.param_patt.loc7_34.1: @F.%pattern_type (%pattern_type.5ed) = value_param_pattern [symbolic = %a.param_patt.loc7_34.2 (constants.%a.param_patt.9e2)] +// CHECK:STDOUT: %a.patt.loc7_34.1: @F.%pattern_type (%pattern_type.5ed) = at_binding_pattern a, %a.param_patt.loc7_34.1 [symbolic = %a.patt.loc7_34.2 (constants.%a.patt.59e)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc7_53: Core.Form = init_form %i32 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc7_14: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %.loc7_52: Core.Form = init_form %i32 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc7_13: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: } // CHECK:STDOUT: %N.loc7_7.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc7_7.1 (constants.%N)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc7_47.1 (%array_type.87f) = value_param call_param0 -// CHECK:STDOUT: %.loc7_47: type = splice_block %array_type.loc7_47.2 [symbolic = %array_type.loc7_47.1 (constants.%array_type.87f)] { +// CHECK:STDOUT: %a.param: @F.%array_type.loc7_46.1 (%array_type.87f) = value_param call_param0 +// CHECK:STDOUT: %.loc7_46: type = splice_block %array_type.loc7_46.2 [symbolic = %array_type.loc7_46.1 (constants.%array_type.87f)] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %N.ref.loc7_46: Core.IntLiteral = name_ref N, %N.loc7_7.2 [symbolic = %N.loc7_7.1 (constants.%N)] -// CHECK:STDOUT: %array_type.loc7_47.2: type = array_type %N.ref.loc7_46, %C.ref [symbolic = %array_type.loc7_47.1 (constants.%array_type.87f)] +// CHECK:STDOUT: %N.ref.loc7_45: Core.IntLiteral = name_ref N, %N.loc7_7.2 [symbolic = %N.loc7_7.1 (constants.%N)] +// CHECK:STDOUT: %array_type.loc7_46.2: type = array_type %N.ref.loc7_45, %C.ref [symbolic = %array_type.loc7_46.1 (constants.%array_type.87f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc7_47.1 (%array_type.87f) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%array_type.loc7_46.1 (%array_type.87f) = wrapper_binding a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -1242,27 +1242,27 @@ fn G() { // CHECK:STDOUT: generic fn @F(%N.loc7_7.2: Core.IntLiteral) { // CHECK:STDOUT: %N.patt.loc7_7.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc7_7.2 (constants.%N.patt)] // CHECK:STDOUT: %N.loc7_7.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc7_7.1 (constants.%N)] -// CHECK:STDOUT: %array_type.loc7_47.1: type = array_type %N.loc7_7.1, constants.%C [symbolic = %array_type.loc7_47.1 (constants.%array_type.87f)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc7_47.1 [symbolic = %pattern_type (constants.%pattern_type.5ed)] -// CHECK:STDOUT: %a.param_patt.loc7_35.2: @F.%pattern_type (%pattern_type.5ed) = value_param_pattern [symbolic = %a.param_patt.loc7_35.2 (constants.%a.param_patt.9e2)] -// CHECK:STDOUT: %a.patt.loc7_35.2: @F.%pattern_type (%pattern_type.5ed) = at_binding_pattern a, %a.param_patt.loc7_35.2 [symbolic = %a.patt.loc7_35.2 (constants.%a.patt.59e)] +// CHECK:STDOUT: %array_type.loc7_46.1: type = array_type %N.loc7_7.1, constants.%C [symbolic = %array_type.loc7_46.1 (constants.%array_type.87f)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc7_46.1 [symbolic = %pattern_type (constants.%pattern_type.5ed)] +// CHECK:STDOUT: %a.param_patt.loc7_34.2: @F.%pattern_type (%pattern_type.5ed) = value_param_pattern [symbolic = %a.param_patt.loc7_34.2 (constants.%a.param_patt.9e2)] +// CHECK:STDOUT: %a.patt.loc7_34.2: @F.%pattern_type (%pattern_type.5ed) = at_binding_pattern a, %a.param_patt.loc7_34.2 [symbolic = %a.patt.loc7_34.2 (constants.%a.patt.59e)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc7_47.1 [symbolic = %require_complete (constants.%require_complete.29f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc7_46.1 [symbolic = %require_complete (constants.%require_complete.29f)] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc7_7.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9)] -// CHECK:STDOUT: %bound_method.loc7_67.3: = bound_method %N.loc7_7.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc7_67.3 (constants.%bound_method.ee4)] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_67.2: init %i32 = call %bound_method.loc7_67.3(%N.loc7_7.1) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_67.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %bound_method.loc7_66.3: = bound_method %N.loc7_7.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc7_66.3 (constants.%bound_method.ee4)] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_66.2: init %i32 = call %bound_method.loc7_66.3(%N.loc7_7.1) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_66.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc7_47.1 (%array_type.87f)) -> out %return.param: %i32 { +// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc7_46.1 (%array_type.87f)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %N.ref.loc7_66: Core.IntLiteral = name_ref N, %N.loc7_7.2 [symbolic = %N.loc7_7.1 (constants.%N)] +// CHECK:STDOUT: %N.ref.loc7_65: Core.IntLiteral = name_ref N, %N.loc7_7.2 [symbolic = %N.loc7_7.1 (constants.%N)] // CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] -// CHECK:STDOUT: %bound_method.loc7_67.1: = bound_method %N.ref.loc7_66, %impl.elem0 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9)] +// CHECK:STDOUT: %bound_method.loc7_66.1: = bound_method %N.ref.loc7_65, %impl.elem0 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2b9)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc7_67.2: = bound_method %N.ref.loc7_66, %specific_fn [symbolic = %bound_method.loc7_67.3 (constants.%bound_method.ee4)] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_67.1: init %i32 = call %bound_method.loc7_67.2(%N.ref.loc7_66) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_67.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %.loc7_67: init %i32 = converted %N.ref.loc7_66, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_67.1 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_67.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: return %.loc7_67 +// CHECK:STDOUT: %bound_method.loc7_66.2: = bound_method %N.ref.loc7_65, %specific_fn [symbolic = %bound_method.loc7_66.3 (constants.%bound_method.ee4)] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_66.1: init %i32 = call %bound_method.loc7_66.2(%N.ref.loc7_65) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_66.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %.loc7_66: init %i32 = converted %N.ref.loc7_65, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_66.1 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_66.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: return %.loc7_66 // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } @@ -1331,25 +1331,25 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%N) { // CHECK:STDOUT: %N.patt.loc7_7.2 => constants.%N.patt // CHECK:STDOUT: %N.loc7_7.1 => constants.%N -// CHECK:STDOUT: %array_type.loc7_47.1 => constants.%array_type.87f +// CHECK:STDOUT: %array_type.loc7_46.1 => constants.%array_type.87f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.5ed -// CHECK:STDOUT: %a.param_patt.loc7_35.2 => constants.%a.param_patt.9e2 -// CHECK:STDOUT: %a.patt.loc7_35.2 => constants.%a.patt.59e +// CHECK:STDOUT: %a.param_patt.loc7_34.2 => constants.%a.param_patt.9e2 +// CHECK:STDOUT: %a.patt.loc7_34.2 => constants.%a.patt.59e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%int_3.1ba) { // CHECK:STDOUT: %N.patt.loc7_7.2 => constants.%N.patt // CHECK:STDOUT: %N.loc7_7.1 => constants.%int_3.1ba -// CHECK:STDOUT: %array_type.loc7_47.1 => constants.%array_type.9a3 +// CHECK:STDOUT: %array_type.loc7_46.1 => constants.%array_type.9a3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3f5 -// CHECK:STDOUT: %a.param_patt.loc7_35.2 => constants.%a.param_patt.79a -// CHECK:STDOUT: %a.patt.loc7_35.2 => constants.%a.patt.e9e +// CHECK:STDOUT: %a.param_patt.loc7_34.2 => constants.%a.param_patt.79a +// CHECK:STDOUT: %a.patt.loc7_34.2 => constants.%a.patt.e9e // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.1a4 // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound => constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.485 -// CHECK:STDOUT: %bound_method.loc7_67.3 => constants.%bound_method.763 -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_67.2 => constants.%int_3.410 +// CHECK:STDOUT: %bound_method.loc7_66.3 => constants.%bound_method.763 +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_66.2 => constants.%int_3.410 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_bound_type_mismatch.carbon @@ -1457,32 +1457,32 @@ fn G() { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %N.patt.loc6_7.1: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_7.2 (constants.%N.patt.38a)] -// CHECK:STDOUT: %a.param_patt.loc6_23.1: @F.%pattern_type (%pattern_type.f28) = value_param_pattern [symbolic = %a.param_patt.loc6_23.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc6_23.1: @F.%pattern_type (%pattern_type.f28) = at_binding_pattern a, %a.param_patt.loc6_23.1 [symbolic = %a.patt.loc6_23.2 (constants.%a.patt.624)] +// CHECK:STDOUT: %a.param_patt.loc6_22.1: @F.%pattern_type (%pattern_type.f28) = value_param_pattern [symbolic = %a.param_patt.loc6_22.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc6_22.1: @F.%pattern_type (%pattern_type.f28) = at_binding_pattern a, %a.param_patt.loc6_22.1 [symbolic = %a.patt.loc6_22.2 (constants.%a.patt.624)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] -// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc6_41 [concrete = constants.%return.patt.e1b] +// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc6_40 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { -// CHECK:STDOUT: %i32.loc6_41: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc6_41: Core.Form = init_form %i32.loc6_41 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc6_10: type = splice_block %i32.loc6_10 [concrete = constants.%i32] { +// CHECK:STDOUT: %i32.loc6_40: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc6_40: Core.Form = init_form %i32.loc6_40 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc6_9: type = splice_block %i32.loc6_9 [concrete = constants.%i32] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %i32.loc6_10: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %i32.loc6_9: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %N.loc6_7.2: %i32 = symbolic_binding N, 0 [symbolic = %N.loc6_7.1 (constants.%N.37f)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc6_35.1 (%array_type.47c) = value_param call_param0 -// CHECK:STDOUT: %.loc6_35: type = splice_block %array_type.loc6_35.2 [symbolic = %array_type.loc6_35.1 (constants.%array_type.47c)] { +// CHECK:STDOUT: %a.param: @F.%array_type.loc6_34.1 (%array_type.47c) = value_param call_param0 +// CHECK:STDOUT: %.loc6_34: type = splice_block %array_type.loc6_34.2 [symbolic = %array_type.loc6_34.1 (constants.%array_type.47c)] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %N.ref.loc6_34: %i32 = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N.37f)] -// CHECK:STDOUT: %impl.elem0.loc6_34: %.b08 = impl_witness_access constants.%ImplicitAs.impl_witness.416, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.69e] -// CHECK:STDOUT: %bound_method.loc6_34.2: = bound_method %N.ref.loc6_34, %impl.elem0.loc6_34 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] -// CHECK:STDOUT: %specific_fn.loc6_34: = specific_function %impl.elem0.loc6_34, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc6_34.3: = bound_method %N.ref.loc6_34, %specific_fn.loc6_34 [symbolic = %bound_method.loc6_34.1 (constants.%bound_method.7c3)] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc6_34.2: init Core.IntLiteral = call %bound_method.loc6_34.3(%N.ref.loc6_34) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc6_34.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %.loc6_34.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc6_34.2 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc6_34.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %.loc6_34.2: Core.IntLiteral = converted %N.ref.loc6_34, %.loc6_34.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc6_34.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc6_35.2: type = array_type %.loc6_34.2, %C.ref [symbolic = %array_type.loc6_35.1 (constants.%array_type.47c)] +// CHECK:STDOUT: %N.ref.loc6_33: %i32 = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N.37f)] +// CHECK:STDOUT: %impl.elem0.loc6_33: %.b08 = impl_witness_access constants.%ImplicitAs.impl_witness.416, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.69e] +// CHECK:STDOUT: %bound_method.loc6_33.2: = bound_method %N.ref.loc6_33, %impl.elem0.loc6_33 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] +// CHECK:STDOUT: %specific_fn.loc6_33: = specific_function %impl.elem0.loc6_33, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc6_33.3: = bound_method %N.ref.loc6_33, %specific_fn.loc6_33 [symbolic = %bound_method.loc6_33.1 (constants.%bound_method.7c3)] +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc6_33.2: init Core.IntLiteral = call %bound_method.loc6_33.3(%N.ref.loc6_33) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %.loc6_33.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc6_33.2 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %.loc6_33.2: Core.IntLiteral = converted %N.ref.loc6_33, %.loc6_33.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %array_type.loc6_34.2: type = array_type %.loc6_33.2, %C.ref [symbolic = %array_type.loc6_34.1 (constants.%array_type.47c)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc6_35.1 (%array_type.47c) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%array_type.loc6_34.1 (%array_type.47c) = wrapper_binding a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -1509,26 +1509,26 @@ fn G() { // CHECK:STDOUT: %N.patt.loc6_7.2: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_7.2 (constants.%N.patt.38a)] // CHECK:STDOUT: %N.loc6_7.1: %i32 = symbolic_binding N, 0 [symbolic = %N.loc6_7.1 (constants.%N.37f)] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc6_7.1, constants.%Int.as.ImplicitAs.impl.Convert.69e [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] -// CHECK:STDOUT: %bound_method.loc6_34.1: = bound_method %N.loc6_7.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc6_34.1 (constants.%bound_method.7c3)] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc6_34.1: init Core.IntLiteral = call %bound_method.loc6_34.1(%N.loc6_7.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc6_34.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc6_35.1: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc6_34.1, constants.%C [symbolic = %array_type.loc6_35.1 (constants.%array_type.47c)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc6_35.1 [symbolic = %pattern_type (constants.%pattern_type.f28)] -// CHECK:STDOUT: %a.param_patt.loc6_23.2: @F.%pattern_type (%pattern_type.f28) = value_param_pattern [symbolic = %a.param_patt.loc6_23.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc6_23.2: @F.%pattern_type (%pattern_type.f28) = at_binding_pattern a, %a.param_patt.loc6_23.2 [symbolic = %a.patt.loc6_23.2 (constants.%a.patt.624)] +// CHECK:STDOUT: %bound_method.loc6_33.1: = bound_method %N.loc6_7.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc6_33.1 (constants.%bound_method.7c3)] +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1: init Core.IntLiteral = call %bound_method.loc6_33.1(%N.loc6_7.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %array_type.loc6_34.1: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1, constants.%C [symbolic = %array_type.loc6_34.1 (constants.%array_type.47c)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc6_34.1 [symbolic = %pattern_type (constants.%pattern_type.f28)] +// CHECK:STDOUT: %a.param_patt.loc6_22.2: @F.%pattern_type (%pattern_type.f28) = value_param_pattern [symbolic = %a.param_patt.loc6_22.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc6_22.2: @F.%pattern_type (%pattern_type.f28) = at_binding_pattern a, %a.param_patt.loc6_22.2 [symbolic = %a.patt.loc6_22.2 (constants.%a.patt.624)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_35.1 [symbolic = %require_complete (constants.%require_complete.540)] +// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc6_34.1 [symbolic = %require_complete (constants.%require_complete.540)] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %N.loc6_7.1, constants.%Int.as.Copy.impl.Op.4f6 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound)] -// CHECK:STDOUT: %bound_method.loc6_54.3: = bound_method %N.loc6_7.1, constants.%Int.as.Copy.impl.Op.specific_fn [symbolic = %bound_method.loc6_54.3 (constants.%bound_method.d86)] +// CHECK:STDOUT: %bound_method.loc6_53.3: = bound_method %N.loc6_7.1, constants.%Int.as.Copy.impl.Op.specific_fn [symbolic = %bound_method.loc6_53.3 (constants.%bound_method.d86)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_35.1 (%array_type.47c)) -> out %return.param: %i32 { +// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_34.1 (%array_type.47c)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %N.ref.loc6_54: %i32 = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N.37f)] -// CHECK:STDOUT: %impl.elem0.loc6_54: %.7a6 = impl_witness_access constants.%Copy.impl_witness.0e0, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6] -// CHECK:STDOUT: %bound_method.loc6_54.1: = bound_method %N.ref.loc6_54, %impl.elem0.loc6_54 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound)] -// CHECK:STDOUT: %specific_fn.loc6_54: = specific_function %impl.elem0.loc6_54, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc6_54.2: = bound_method %N.ref.loc6_54, %specific_fn.loc6_54 [symbolic = %bound_method.loc6_54.3 (constants.%bound_method.d86)] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc6_54.2(%N.ref.loc6_54) [symbolic = %N.loc6_7.1 (constants.%N.37f)] +// CHECK:STDOUT: %N.ref.loc6_53: %i32 = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N.37f)] +// CHECK:STDOUT: %impl.elem0.loc6_53: %.7a6 = impl_witness_access constants.%Copy.impl_witness.0e0, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6] +// CHECK:STDOUT: %bound_method.loc6_53.1: = bound_method %N.ref.loc6_53, %impl.elem0.loc6_53 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound)] +// CHECK:STDOUT: %specific_fn.loc6_53: = specific_function %impl.elem0.loc6_53, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc6_53.2: = bound_method %N.ref.loc6_53, %specific_fn.loc6_53 [symbolic = %bound_method.loc6_53.3 (constants.%bound_method.d86)] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc6_53.2(%N.ref.loc6_53) [symbolic = %N.loc6_7.1 (constants.%N.37f)] // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -1596,12 +1596,12 @@ fn G() { // CHECK:STDOUT: %N.patt.loc6_7.2 => constants.%N.patt.38a // CHECK:STDOUT: %N.loc6_7.1 => constants.%N.37f // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound => constants.%Int.as.ImplicitAs.impl.Convert.bound -// CHECK:STDOUT: %bound_method.loc6_34.1 => constants.%bound_method.7c3 -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc6_34.1 => constants.%Int.as.ImplicitAs.impl.Convert.call -// CHECK:STDOUT: %array_type.loc6_35.1 => constants.%array_type.47c +// CHECK:STDOUT: %bound_method.loc6_33.1 => constants.%bound_method.7c3 +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc6_33.1 => constants.%Int.as.ImplicitAs.impl.Convert.call +// CHECK:STDOUT: %array_type.loc6_34.1 => constants.%array_type.47c // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f28 -// CHECK:STDOUT: %a.param_patt.loc6_23.2 => constants.%a.param_patt -// CHECK:STDOUT: %a.patt.loc6_23.2 => constants.%a.patt.624 +// CHECK:STDOUT: %a.param_patt.loc6_22.2 => constants.%a.param_patt +// CHECK:STDOUT: %a.patt.loc6_22.2 => constants.%a.patt.624 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_array_length_from_tuple.carbon @@ -1673,28 +1673,28 @@ fn G() { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %N.patt.loc5_7.1: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc5_7.2 (constants.%N.patt.38a)] -// CHECK:STDOUT: %a.param_patt.loc5_23.1: @F.%pattern_type (%pattern_type.f28) = value_param_pattern [symbolic = %a.param_patt.loc5_23.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc5_23.1: @F.%pattern_type (%pattern_type.f28) = at_binding_pattern a, %a.param_patt.loc5_23.1 [symbolic = %a.patt.loc5_23.2 (constants.%a.patt)] +// CHECK:STDOUT: %a.param_patt.loc5_22.1: @F.%pattern_type (%pattern_type.f28) = value_param_pattern [symbolic = %a.param_patt.loc5_22.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc5_22.1: @F.%pattern_type (%pattern_type.f28) = at_binding_pattern a, %a.param_patt.loc5_22.1 [symbolic = %a.patt.loc5_22.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_10: type = splice_block %i32 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc5_9: type = splice_block %i32 [concrete = constants.%i32] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %N.loc5_7.2: %i32 = symbolic_binding N, 0 [symbolic = %N.loc5_7.1 (constants.%N.37f)] -// CHECK:STDOUT: %a.param: @F.%array_type.loc5_35.1 (%array_type) = value_param call_param0 -// CHECK:STDOUT: %.loc5_35: type = splice_block %array_type.loc5_35.2 [symbolic = %array_type.loc5_35.1 (constants.%array_type)] { +// CHECK:STDOUT: %a.param: @F.%array_type.loc5_34.1 (%array_type) = value_param call_param0 +// CHECK:STDOUT: %.loc5_34: type = splice_block %array_type.loc5_34.2 [symbolic = %array_type.loc5_34.1 (constants.%array_type)] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc5_7.2 [symbolic = %N.loc5_7.1 (constants.%N.37f)] // CHECK:STDOUT: %impl.elem0: %.b08 = impl_witness_access constants.%ImplicitAs.impl_witness.416, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.69e] -// CHECK:STDOUT: %bound_method.loc5_34.2: = bound_method %N.ref, %impl.elem0 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] +// CHECK:STDOUT: %bound_method.loc5_33.2: = bound_method %N.ref, %impl.elem0 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc5_34.3: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc5_34.1 (constants.%bound_method)] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_34.2: init Core.IntLiteral = call %bound_method.loc5_34.3(%N.ref) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_34.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %.loc5_34.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc5_34.2 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_34.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %.loc5_34.2: Core.IntLiteral = converted %N.ref, %.loc5_34.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_34.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc5_35.2: type = array_type %.loc5_34.2, %C.ref [symbolic = %array_type.loc5_35.1 (constants.%array_type)] +// CHECK:STDOUT: %bound_method.loc5_33.3: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc5_33.1 (constants.%bound_method)] +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_33.2: init Core.IntLiteral = call %bound_method.loc5_33.3(%N.ref) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %.loc5_33.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc5_33.2 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %.loc5_33.2: Core.IntLiteral = converted %N.ref, %.loc5_33.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %array_type.loc5_34.2: type = array_type %.loc5_33.2, %C.ref [symbolic = %array_type.loc5_34.1 (constants.%array_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%array_type.loc5_35.1 (%array_type) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%array_type.loc5_34.1 (%array_type) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } @@ -1711,17 +1711,17 @@ fn G() { // CHECK:STDOUT: %N.patt.loc5_7.2: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc5_7.2 (constants.%N.patt.38a)] // CHECK:STDOUT: %N.loc5_7.1: %i32 = symbolic_binding N, 0 [symbolic = %N.loc5_7.1 (constants.%N.37f)] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc5_7.1, constants.%Int.as.ImplicitAs.impl.Convert.69e [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] -// CHECK:STDOUT: %bound_method.loc5_34.1: = bound_method %N.loc5_7.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc5_34.1 (constants.%bound_method)] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_34.1: init Core.IntLiteral = call %bound_method.loc5_34.1(%N.loc5_7.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_34.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc5_35.1: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc5_34.1, constants.%C [symbolic = %array_type.loc5_35.1 (constants.%array_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc5_35.1 [symbolic = %pattern_type (constants.%pattern_type.f28)] -// CHECK:STDOUT: %a.param_patt.loc5_23.2: @F.%pattern_type (%pattern_type.f28) = value_param_pattern [symbolic = %a.param_patt.loc5_23.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc5_23.2: @F.%pattern_type (%pattern_type.f28) = at_binding_pattern a, %a.param_patt.loc5_23.2 [symbolic = %a.patt.loc5_23.2 (constants.%a.patt)] +// CHECK:STDOUT: %bound_method.loc5_33.1: = bound_method %N.loc5_7.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc5_33.1 (constants.%bound_method)] +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1: init Core.IntLiteral = call %bound_method.loc5_33.1(%N.loc5_7.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %array_type.loc5_34.1: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1, constants.%C [symbolic = %array_type.loc5_34.1 (constants.%array_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc5_34.1 [symbolic = %pattern_type (constants.%pattern_type.f28)] +// CHECK:STDOUT: %a.param_patt.loc5_22.2: @F.%pattern_type (%pattern_type.f28) = value_param_pattern [symbolic = %a.param_patt.loc5_22.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc5_22.2: @F.%pattern_type (%pattern_type.f28) = at_binding_pattern a, %a.param_patt.loc5_22.2 [symbolic = %a.patt.loc5_22.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc5_35.1 [symbolic = %require_complete (constants.%require_complete.540)] +// CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc5_34.1 [symbolic = %require_complete (constants.%require_complete.540)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc5_35.1 (%array_type)) { +// CHECK:STDOUT: fn(%a.param: @F.%array_type.loc5_34.1 (%array_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -1745,11 +1745,11 @@ fn G() { // CHECK:STDOUT: %N.patt.loc5_7.2 => constants.%N.patt.38a // CHECK:STDOUT: %N.loc5_7.1 => constants.%N.37f // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound => constants.%Int.as.ImplicitAs.impl.Convert.bound -// CHECK:STDOUT: %bound_method.loc5_34.1 => constants.%bound_method -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_34.1 => constants.%Int.as.ImplicitAs.impl.Convert.call -// CHECK:STDOUT: %array_type.loc5_35.1 => constants.%array_type +// CHECK:STDOUT: %bound_method.loc5_33.1 => constants.%bound_method +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc5_33.1 => constants.%Int.as.ImplicitAs.impl.Convert.call +// CHECK:STDOUT: %array_type.loc5_34.1 => constants.%array_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f28 -// CHECK:STDOUT: %a.param_patt.loc5_23.2 => constants.%a.param_patt -// CHECK:STDOUT: %a.patt.loc5_23.2 => constants.%a.patt +// CHECK:STDOUT: %a.param_patt.loc5_22.2 => constants.%a.param_patt +// CHECK:STDOUT: %a.patt.loc5_22.2 => constants.%a.patt // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/binding_pattern.carbon b/toolchain/check/testdata/deduce/binding_pattern.carbon index 3233572d3154..b0cf9a17a3bf 100644 --- a/toolchain/check/testdata/deduce/binding_pattern.carbon +++ b/toolchain/check/testdata/deduce/binding_pattern.carbon @@ -14,11 +14,11 @@ library "[[@TEST_NAME]]"; -class C(T:! type) { +class C(T: type) { fn Create(unused value: T) {} } -fn F(unused U:! type, V:! type) { +fn F(unused generic U: type, generic V: type) { // CHECK:STDERR: fail_incompatible_deduce.carbon:[[@LINE+10]]:15: error: cannot implicitly convert expression of type `{}` to `V` [ConversionFailure] // CHECK:STDERR: C(V).Create({}); // CHECK:STDERR: ^~ @@ -36,12 +36,12 @@ fn F(unused U:! type, V:! type) { library "[[@TEST_NAME]]"; -class C(T:! type) { +class C(T: type) { fn Create(unused value: T) {} } // This `where` is sufficient to say that `{} as V` works. -fn F(unused U:! type, V:! Core.Destroy where {} impls Core.ImplicitAs(.Self)) { +fn F(unused generic U: type, generic V: Core.Destroy where {} impls Core.ImplicitAs(.Self)) { C(V).Create({}); } @@ -51,11 +51,11 @@ library "[[@TEST_NAME]]"; class A {}; -// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+4]]:10: error: name `DoesNotExist` not found [NameNotFound] -// CHECK:STDERR: fn F[T:! DoesNotExist](unused x: T) {} -// CHECK:STDERR: ^~~~~~~~~~~~ +// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+4]]:9: error: name `DoesNotExist` not found [NameNotFound] +// CHECK:STDERR: fn F[T: DoesNotExist](unused x: T) {} +// CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: -fn F[T:! DoesNotExist](unused x: T) {} +fn F[T: DoesNotExist](unused x: T) {} fn Call(a: A) { F(a); diff --git a/toolchain/check/testdata/deduce/conversion.carbon b/toolchain/check/testdata/deduce/conversion.carbon index bde4f822c798..07c2354f16d1 100644 --- a/toolchain/check/testdata/deduce/conversion.carbon +++ b/toolchain/check/testdata/deduce/conversion.carbon @@ -17,7 +17,7 @@ library "[[@TEST_NAME]]"; class A {} class B {} -fn F(unused T:! type) {} +fn F(unused generic T: type) {} // Requires a conversion from (type, type) -> type. fn G() { @@ -36,7 +36,7 @@ impl A as Core.ImplicitAs(type) { eval fn Convert(unused self) -> type { return B; } } -fn F(unused T:! type) {} +fn F(unused generic T: type) {} // Requires a conversion from A -> type. fn G() { @@ -56,7 +56,7 @@ impl A as Core.ImplicitAs(B) { fn Convert(self) -> B; } -fn F(unused T:! type, unused b: B) {} +fn F(unused generic T: type, unused b: B) {} fn G(a: A) { // This should only call the implicit conversion function from A to B once, diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index 5b44873ffc88..10b20bf272c7 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -16,10 +16,10 @@ library "[[@TEST_NAME]]"; -class C(T:! type) {} +class C(T: type) {} class D {} -fn F[T:! type](p: C(T)) -> T { return F(p); } +fn F[T: type](p: C(T)) -> T { return F(p); } fn G(p: C(D)) -> D { return F(p); @@ -29,10 +29,10 @@ fn G(p: C(D)) -> D { library "[[@TEST_NAME]]"; -class I(T:! type) {} +class I(T: type) {} class C {} -fn F[T:! type](p: I(T)) -> C { return F(p); } +fn F[T: type](p: I(T)) -> C { return F(p); } fn G(p: I(C)) -> C { return F(p); @@ -42,8 +42,8 @@ fn G(p: I(C)) -> C { library "[[@TEST_NAME]]"; -class Outer(T:! type) { - class Inner(U:! type) {} +class Outer(T: type) { + class Inner(U: type) {} } class C {} @@ -51,7 +51,7 @@ class D {} // C++ doesn't permit deducing `T` here because `Outer` might be specialized. // But that's not possible in Carbon, so we can deduce `T`. -fn F[T:! type, U:! type](p: Outer(T).Inner(U)) -> (T, U) { return F(p); } +fn F[T: type, U: type](p: Outer(T).Inner(U)) -> (T, U) { return F(p); } fn G(p: Outer(C).Inner(D)) -> (C, D) { return F(p); @@ -61,9 +61,9 @@ fn G(p: Outer(C).Inner(D)) -> (C, D) { library "[[@TEST_NAME]]"; -class WithNontype(N:! i32) {} +class WithNontype(N: i32) {} -fn F[N:! i32](unused x: WithNontype(N)) -> i32 { return N; } +fn F[N: i32](unused x: WithNontype(N)) -> i32 { return N; } fn G() -> i32 { return F({} as WithNontype(0)); @@ -127,34 +127,34 @@ fn G() -> i32 { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc4_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_13.1: type = splice_block %.loc4_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_12.1: type = splice_block %.loc4_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_10.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc7_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.param_patt.loc7_17.1: @F.%pattern_type.loc7_17 (%pattern_type.ebe) = value_param_pattern [symbolic = %p.param_patt.loc7_17.2 (constants.%p.param_patt.f49)] -// CHECK:STDOUT: %p.patt.loc7_17.1: @F.%pattern_type.loc7_17 (%pattern_type.ebe) = at_binding_pattern p, %p.param_patt.loc7_17.1 [symbolic = %p.patt.loc7_17.2 (constants.%p.patt.37b)] -// CHECK:STDOUT: %return.param_patt.loc7_28.1: @F.%pattern_type.loc7_28 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc7_28.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc7_25.1: @F.%pattern_type.loc7_28 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc7_28.1, %T.ref.loc7_28 [symbolic = %return.patt.loc7_25.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %p.param_patt.loc7_16.1: @F.%pattern_type.loc7_16 (%pattern_type.ebe) = value_param_pattern [symbolic = %p.param_patt.loc7_16.2 (constants.%p.param_patt.f49)] +// CHECK:STDOUT: %p.patt.loc7_16.1: @F.%pattern_type.loc7_16 (%pattern_type.ebe) = at_binding_pattern p, %p.param_patt.loc7_16.1 [symbolic = %p.patt.loc7_16.2 (constants.%p.patt.37b)] +// CHECK:STDOUT: %return.param_patt.loc7_27.1: @F.%pattern_type.loc7_27 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc7_27.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc7_24.1: @F.%pattern_type.loc7_27 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc7_27.1, %T.ref.loc7_27 [symbolic = %return.patt.loc7_24.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc7_28: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc7_28.3: Core.Form = init_form %T.ref.loc7_28 [symbolic = %.loc7_28.2 (constants.%.184)] -// CHECK:STDOUT: %.loc7_10.1: type = splice_block %.loc7_10.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc7_27: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] +// CHECK:STDOUT: %.loc7_27.3: Core.Form = init_form %T.ref.loc7_27 [symbolic = %.loc7_27.2 (constants.%.184)] +// CHECK:STDOUT: %.loc7_9.1: type = splice_block %.loc7_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%C.loc7_22.1 (%C.1d0) = value_param call_param0 -// CHECK:STDOUT: %.loc7_22: type = splice_block %C.loc7_22.2 [symbolic = %C.loc7_22.1 (constants.%C.1d0)] { +// CHECK:STDOUT: %p.param: @F.%C.loc7_21.1 (%C.1d0) = value_param call_param0 +// CHECK:STDOUT: %.loc7_21: type = splice_block %C.loc7_21.2 [symbolic = %C.loc7_21.1 (constants.%C.1d0)] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %T.ref.loc7_21: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %C.loc7_22.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc7_22.1 (constants.%C.1d0)] +// CHECK:STDOUT: %T.ref.loc7_20: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] +// CHECK:STDOUT: %C.loc7_21.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc7_21.1 (constants.%C.1d0)] // CHECK:STDOUT: } -// CHECK:STDOUT: %p: @F.%C.loc7_22.1 (%C.1d0) = wrapper_binding p, %p.param +// CHECK:STDOUT: %p: @F.%C.loc7_21.1 (%C.1d0) = wrapper_binding p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc7_7.1 (%T) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%T.loc7_7.1 (%T) = return_slot %return.param // CHECK:STDOUT: } @@ -204,27 +204,27 @@ fn G() -> i32 { // CHECK:STDOUT: generic fn @F(%T.loc7_7.2: type) { // CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc7_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %C.loc7_22.1: type = class_type @C, @C(%T.loc7_7.1) [symbolic = %C.loc7_22.1 (constants.%C.1d0)] -// CHECK:STDOUT: %pattern_type.loc7_17: type = pattern_type %C.loc7_22.1 [symbolic = %pattern_type.loc7_17 (constants.%pattern_type.ebe)] -// CHECK:STDOUT: %p.param_patt.loc7_17.2: @F.%pattern_type.loc7_17 (%pattern_type.ebe) = value_param_pattern [symbolic = %p.param_patt.loc7_17.2 (constants.%p.param_patt.f49)] -// CHECK:STDOUT: %p.patt.loc7_17.2: @F.%pattern_type.loc7_17 (%pattern_type.ebe) = at_binding_pattern p, %p.param_patt.loc7_17.2 [symbolic = %p.patt.loc7_17.2 (constants.%p.patt.37b)] -// CHECK:STDOUT: %.loc7_28.2: Core.Form = init_form %T.loc7_7.1 [symbolic = %.loc7_28.2 (constants.%.184)] -// CHECK:STDOUT: %pattern_type.loc7_28: type = pattern_type %T.loc7_7.1 [symbolic = %pattern_type.loc7_28 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %return.param_patt.loc7_28.2: @F.%pattern_type.loc7_28 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc7_28.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc7_25.2: @F.%pattern_type.loc7_28 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc7_28.2, %T.loc7_7.1 [symbolic = %return.patt.loc7_25.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %C.loc7_21.1: type = class_type @C, @C(%T.loc7_7.1) [symbolic = %C.loc7_21.1 (constants.%C.1d0)] +// CHECK:STDOUT: %pattern_type.loc7_16: type = pattern_type %C.loc7_21.1 [symbolic = %pattern_type.loc7_16 (constants.%pattern_type.ebe)] +// CHECK:STDOUT: %p.param_patt.loc7_16.2: @F.%pattern_type.loc7_16 (%pattern_type.ebe) = value_param_pattern [symbolic = %p.param_patt.loc7_16.2 (constants.%p.param_patt.f49)] +// CHECK:STDOUT: %p.patt.loc7_16.2: @F.%pattern_type.loc7_16 (%pattern_type.ebe) = at_binding_pattern p, %p.param_patt.loc7_16.2 [symbolic = %p.patt.loc7_16.2 (constants.%p.patt.37b)] +// CHECK:STDOUT: %.loc7_27.2: Core.Form = init_form %T.loc7_7.1 [symbolic = %.loc7_27.2 (constants.%.184)] +// CHECK:STDOUT: %pattern_type.loc7_27: type = pattern_type %T.loc7_7.1 [symbolic = %pattern_type.loc7_27 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %return.param_patt.loc7_27.2: @F.%pattern_type.loc7_27 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc7_27.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc7_24.2: @F.%pattern_type.loc7_27 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc7_27.2, %T.loc7_7.1 [symbolic = %return.patt.loc7_24.2 (constants.%return.patt.b39)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc7_17: = require_complete_type %C.loc7_22.1 [symbolic = %require_complete.loc7_17 (constants.%require_complete.74a)] -// CHECK:STDOUT: %require_complete.loc7_25: = require_complete_type %T.loc7_7.1 [symbolic = %require_complete.loc7_25 (constants.%require_complete.944)] -// CHECK:STDOUT: %F.specific_fn.loc7_39.2: = specific_function constants.%F, @F(%T.loc7_7.1) [symbolic = %F.specific_fn.loc7_39.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %require_complete.loc7_16: = require_complete_type %C.loc7_21.1 [symbolic = %require_complete.loc7_16 (constants.%require_complete.74a)] +// CHECK:STDOUT: %require_complete.loc7_24: = require_complete_type %T.loc7_7.1 [symbolic = %require_complete.loc7_24 (constants.%require_complete.944)] +// CHECK:STDOUT: %F.specific_fn.loc7_38.2: = specific_function constants.%F, @F(%T.loc7_7.1) [symbolic = %F.specific_fn.loc7_38.2 (constants.%F.specific_fn.eab)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%p.param: @F.%C.loc7_22.1 (%C.1d0)) -> out %return.param: @F.%T.loc7_7.1 (%T) { +// CHECK:STDOUT: fn(%p.param: @F.%C.loc7_21.1 (%C.1d0)) -> out %return.param: @F.%T.loc7_7.1 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%C.loc7_22.1 (%C.1d0) = name_ref p, %p -// CHECK:STDOUT: %F.specific_fn.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc7_39.2 (constants.%F.specific_fn.eab)] -// CHECK:STDOUT: %.loc7_28.1: ref @F.%T.loc7_7.1 (%T) = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init @F.%T.loc7_7.1 (%T) to %.loc7_28.1 = call %F.specific_fn.loc7_39.1(%p.ref) +// CHECK:STDOUT: %p.ref: @F.%C.loc7_21.1 (%C.1d0) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc7_38.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc7_38.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %.loc7_27.1: ref @F.%T.loc7_7.1 (%T) = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init @F.%T.loc7_7.1 (%T) to %.loc7_27.1 = call %F.specific_fn.loc7_38.1(%p.ref) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -253,19 +253,19 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_7.1 => constants.%T -// CHECK:STDOUT: %C.loc7_22.1 => constants.%C.1d0 -// CHECK:STDOUT: %pattern_type.loc7_17 => constants.%pattern_type.ebe -// CHECK:STDOUT: %p.param_patt.loc7_17.2 => constants.%p.param_patt.f49 -// CHECK:STDOUT: %p.patt.loc7_17.2 => constants.%p.patt.37b -// CHECK:STDOUT: %.loc7_28.2 => constants.%.184 -// CHECK:STDOUT: %pattern_type.loc7_28 => constants.%pattern_type.51d -// CHECK:STDOUT: %return.param_patt.loc7_28.2 => constants.%return.param_patt.41d -// CHECK:STDOUT: %return.patt.loc7_25.2 => constants.%return.patt.b39 +// CHECK:STDOUT: %C.loc7_21.1 => constants.%C.1d0 +// CHECK:STDOUT: %pattern_type.loc7_16 => constants.%pattern_type.ebe +// CHECK:STDOUT: %p.param_patt.loc7_16.2 => constants.%p.param_patt.f49 +// CHECK:STDOUT: %p.patt.loc7_16.2 => constants.%p.patt.37b +// CHECK:STDOUT: %.loc7_27.2 => constants.%.184 +// CHECK:STDOUT: %pattern_type.loc7_27 => constants.%pattern_type.51d +// CHECK:STDOUT: %return.param_patt.loc7_27.2 => constants.%return.param_patt.41d +// CHECK:STDOUT: %return.patt.loc7_24.2 => constants.%return.patt.b39 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc7_17 => constants.%require_complete.74a -// CHECK:STDOUT: %require_complete.loc7_25 => constants.%require_complete.944 -// CHECK:STDOUT: %F.specific_fn.loc7_39.2 => constants.%F.specific_fn.eab +// CHECK:STDOUT: %require_complete.loc7_16 => constants.%require_complete.74a +// CHECK:STDOUT: %require_complete.loc7_24 => constants.%require_complete.944 +// CHECK:STDOUT: %F.specific_fn.loc7_38.2 => constants.%F.specific_fn.eab // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%D) { @@ -278,19 +278,19 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%D) { // CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_7.1 => constants.%D -// CHECK:STDOUT: %C.loc7_22.1 => constants.%C.aae -// CHECK:STDOUT: %pattern_type.loc7_17 => constants.%pattern_type.3dc -// CHECK:STDOUT: %p.param_patt.loc7_17.2 => constants.%p.param_patt.ead -// CHECK:STDOUT: %p.patt.loc7_17.2 => constants.%p.patt.08c -// CHECK:STDOUT: %.loc7_28.2 => constants.%.592 -// CHECK:STDOUT: %pattern_type.loc7_28 => constants.%pattern_type.d8d -// CHECK:STDOUT: %return.param_patt.loc7_28.2 => constants.%return.param_patt.eae -// CHECK:STDOUT: %return.patt.loc7_25.2 => constants.%return.patt.e38 +// CHECK:STDOUT: %C.loc7_21.1 => constants.%C.aae +// CHECK:STDOUT: %pattern_type.loc7_16 => constants.%pattern_type.3dc +// CHECK:STDOUT: %p.param_patt.loc7_16.2 => constants.%p.param_patt.ead +// CHECK:STDOUT: %p.patt.loc7_16.2 => constants.%p.patt.08c +// CHECK:STDOUT: %.loc7_27.2 => constants.%.592 +// CHECK:STDOUT: %pattern_type.loc7_27 => constants.%pattern_type.d8d +// CHECK:STDOUT: %return.param_patt.loc7_27.2 => constants.%return.param_patt.eae +// CHECK:STDOUT: %return.patt.loc7_24.2 => constants.%return.patt.e38 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc7_17 => constants.%complete_type -// CHECK:STDOUT: %require_complete.loc7_25 => constants.%complete_type -// CHECK:STDOUT: %F.specific_fn.loc7_39.2 => constants.%F.specific_fn.8e7 +// CHECK:STDOUT: %require_complete.loc7_16 => constants.%complete_type +// CHECK:STDOUT: %require_complete.loc7_24 => constants.%complete_type +// CHECK:STDOUT: %F.specific_fn.loc7_38.2 => constants.%F.specific_fn.8e7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- interface.carbon @@ -346,34 +346,34 @@ fn G() -> i32 { // CHECK:STDOUT: %I.decl: %I.type = class_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc4_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_13.1: type = splice_block %.loc4_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_12.1: type = splice_block %.loc4_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_10.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc7_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.param_patt.loc7_17.1: @F.%pattern_type (%pattern_type.477) = value_param_pattern [symbolic = %p.param_patt.loc7_17.2 (constants.%p.param_patt.4f4)] -// CHECK:STDOUT: %p.patt.loc7_17.1: @F.%pattern_type (%pattern_type.477) = at_binding_pattern p, %p.param_patt.loc7_17.1 [symbolic = %p.patt.loc7_17.2 (constants.%p.patt.276)] +// CHECK:STDOUT: %p.param_patt.loc7_16.1: @F.%pattern_type (%pattern_type.477) = value_param_pattern [symbolic = %p.param_patt.loc7_16.2 (constants.%p.param_patt.4f4)] +// CHECK:STDOUT: %p.patt.loc7_16.1: @F.%pattern_type (%pattern_type.477) = at_binding_pattern p, %p.param_patt.loc7_16.1 [symbolic = %p.patt.loc7_16.2 (constants.%p.patt.276)] // CHECK:STDOUT: %return.param_patt: %pattern_type.98b = out_param_pattern [concrete = constants.%return.param_patt] // CHECK:STDOUT: %return.patt: %pattern_type.98b = return_slot_pattern %return.param_patt, %C.ref [concrete = constants.%return.patt] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %.loc7_28.2: Core.Form = init_form %C.ref [concrete = constants.%.a44] -// CHECK:STDOUT: %.loc7_10.1: type = splice_block %.loc7_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc7_27.2: Core.Form = init_form %C.ref [concrete = constants.%.a44] +// CHECK:STDOUT: %.loc7_9.1: type = splice_block %.loc7_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%I.loc7_22.1 (%I.76e) = value_param call_param0 -// CHECK:STDOUT: %.loc7_22: type = splice_block %I.loc7_22.2 [symbolic = %I.loc7_22.1 (constants.%I.76e)] { +// CHECK:STDOUT: %p.param: @F.%I.loc7_21.1 (%I.76e) = value_param call_param0 +// CHECK:STDOUT: %.loc7_21: type = splice_block %I.loc7_21.2 [symbolic = %I.loc7_21.1 (constants.%I.76e)] { // CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %I.loc7_22.2: type = class_type @I, @I(constants.%T) [symbolic = %I.loc7_22.1 (constants.%I.76e)] +// CHECK:STDOUT: %I.loc7_21.2: type = class_type @I, @I(constants.%T) [symbolic = %I.loc7_21.1 (constants.%I.76e)] // CHECK:STDOUT: } -// CHECK:STDOUT: %p: @F.%I.loc7_22.1 (%I.76e) = wrapper_binding p, %p.param +// CHECK:STDOUT: %p: @F.%I.loc7_21.1 (%I.76e) = wrapper_binding p, %p.param // CHECK:STDOUT: %return.param: ref %C = out_param call_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } @@ -423,22 +423,22 @@ fn G() -> i32 { // CHECK:STDOUT: generic fn @F(%T.loc7_7.2: type) { // CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc7_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %I.loc7_22.1: type = class_type @I, @I(%T.loc7_7.1) [symbolic = %I.loc7_22.1 (constants.%I.76e)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %I.loc7_22.1 [symbolic = %pattern_type (constants.%pattern_type.477)] -// CHECK:STDOUT: %p.param_patt.loc7_17.2: @F.%pattern_type (%pattern_type.477) = value_param_pattern [symbolic = %p.param_patt.loc7_17.2 (constants.%p.param_patt.4f4)] -// CHECK:STDOUT: %p.patt.loc7_17.2: @F.%pattern_type (%pattern_type.477) = at_binding_pattern p, %p.param_patt.loc7_17.2 [symbolic = %p.patt.loc7_17.2 (constants.%p.patt.276)] +// CHECK:STDOUT: %I.loc7_21.1: type = class_type @I, @I(%T.loc7_7.1) [symbolic = %I.loc7_21.1 (constants.%I.76e)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %I.loc7_21.1 [symbolic = %pattern_type (constants.%pattern_type.477)] +// CHECK:STDOUT: %p.param_patt.loc7_16.2: @F.%pattern_type (%pattern_type.477) = value_param_pattern [symbolic = %p.param_patt.loc7_16.2 (constants.%p.param_patt.4f4)] +// CHECK:STDOUT: %p.patt.loc7_16.2: @F.%pattern_type (%pattern_type.477) = at_binding_pattern p, %p.param_patt.loc7_16.2 [symbolic = %p.patt.loc7_16.2 (constants.%p.patt.276)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %I.loc7_22.1 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %F.specific_fn.loc7_39.2: = specific_function constants.%F, @F(%T.loc7_7.1) [symbolic = %F.specific_fn.loc7_39.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %require_complete: = require_complete_type %I.loc7_21.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %F.specific_fn.loc7_38.2: = specific_function constants.%F, @F(%T.loc7_7.1) [symbolic = %F.specific_fn.loc7_38.2 (constants.%F.specific_fn.eab)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%p.param: @F.%I.loc7_22.1 (%I.76e)) -> out %return.param: %C { +// CHECK:STDOUT: fn(%p.param: @F.%I.loc7_21.1 (%I.76e)) -> out %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%I.loc7_22.1 (%I.76e) = name_ref p, %p -// CHECK:STDOUT: %F.specific_fn.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc7_39.2 (constants.%F.specific_fn.eab)] -// CHECK:STDOUT: %.loc7_28.1: ref %C = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init %C to %.loc7_28.1 = call %F.specific_fn.loc7_39.1(%p.ref) +// CHECK:STDOUT: %p.ref: @F.%I.loc7_21.1 (%I.76e) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc7_38.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc7_38.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %.loc7_27.1: ref %C = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init %C to %.loc7_27.1 = call %F.specific_fn.loc7_38.1(%p.ref) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -467,14 +467,14 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_7.1 => constants.%T -// CHECK:STDOUT: %I.loc7_22.1 => constants.%I.76e +// CHECK:STDOUT: %I.loc7_21.1 => constants.%I.76e // CHECK:STDOUT: %pattern_type => constants.%pattern_type.477 -// CHECK:STDOUT: %p.param_patt.loc7_17.2 => constants.%p.param_patt.4f4 -// CHECK:STDOUT: %p.patt.loc7_17.2 => constants.%p.patt.276 +// CHECK:STDOUT: %p.param_patt.loc7_16.2 => constants.%p.param_patt.4f4 +// CHECK:STDOUT: %p.patt.loc7_16.2 => constants.%p.patt.276 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete -// CHECK:STDOUT: %F.specific_fn.loc7_39.2 => constants.%F.specific_fn.eab +// CHECK:STDOUT: %F.specific_fn.loc7_38.2 => constants.%F.specific_fn.eab // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%C) { @@ -487,14 +487,14 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_7.1 => constants.%C -// CHECK:STDOUT: %I.loc7_22.1 => constants.%I.d0b +// CHECK:STDOUT: %I.loc7_21.1 => constants.%I.d0b // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fa1 -// CHECK:STDOUT: %p.param_patt.loc7_17.2 => constants.%p.param_patt.e45 -// CHECK:STDOUT: %p.patt.loc7_17.2 => constants.%p.patt.6ae +// CHECK:STDOUT: %p.param_patt.loc7_16.2 => constants.%p.param_patt.e45 +// CHECK:STDOUT: %p.patt.loc7_16.2 => constants.%p.patt.6ae // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type -// CHECK:STDOUT: %F.specific_fn.loc7_39.2 => constants.%F.specific_fn.e0d +// CHECK:STDOUT: %F.specific_fn.loc7_38.2 => constants.%F.specific_fn.e0d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- nested.carbon @@ -572,9 +572,9 @@ fn G() -> i32 { // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] // CHECK:STDOUT: } @@ -582,38 +582,38 @@ fn G() -> i32 { // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc13_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc13_17.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_17.2 (constants.%U.patt)] -// CHECK:STDOUT: %p.param_patt.loc13_27.1: @F.%pattern_type.loc13_27 (%pattern_type.f00) = value_param_pattern [symbolic = %p.param_patt.loc13_27.2 (constants.%p.param_patt.785)] -// CHECK:STDOUT: %p.patt.loc13_27.1: @F.%pattern_type.loc13_27 (%pattern_type.f00) = at_binding_pattern p, %p.param_patt.loc13_27.1 [symbolic = %p.patt.loc13_27.2 (constants.%p.patt.b5b)] -// CHECK:STDOUT: %return.param_patt.loc13_56.1: @F.%pattern_type.loc13_56 (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc13_56.2 (constants.%return.param_patt.a41)] -// CHECK:STDOUT: %return.patt.loc13_48.1: @F.%pattern_type.loc13_56 (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc13_56.1, %.loc13_56.4 [symbolic = %return.patt.loc13_48.2 (constants.%return.patt.453)] +// CHECK:STDOUT: %U.patt.loc13_16.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_16.2 (constants.%U.patt)] +// CHECK:STDOUT: %p.param_patt.loc13_25.1: @F.%pattern_type.loc13_25 (%pattern_type.f00) = value_param_pattern [symbolic = %p.param_patt.loc13_25.2 (constants.%p.param_patt.785)] +// CHECK:STDOUT: %p.patt.loc13_25.1: @F.%pattern_type.loc13_25 (%pattern_type.f00) = at_binding_pattern p, %p.param_patt.loc13_25.1 [symbolic = %p.patt.loc13_25.2 (constants.%p.patt.b5b)] +// CHECK:STDOUT: %return.param_patt.loc13_54.1: @F.%pattern_type.loc13_54 (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc13_54.2 (constants.%return.param_patt.a41)] +// CHECK:STDOUT: %return.patt.loc13_46.1: @F.%pattern_type.loc13_54 (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc13_54.1, %.loc13_54.4 [symbolic = %return.patt.loc13_46.2 (constants.%return.patt.453)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc13_52: type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T)] -// CHECK:STDOUT: %U.ref.loc13_55: type = name_ref U, %U.loc13_17.2 [symbolic = %U.loc13_17.1 (constants.%U)] -// CHECK:STDOUT: %.loc13_56.3: %tuple.type.24b = tuple_literal (%T.ref.loc13_52, %U.ref.loc13_55) [symbolic = %tuple (constants.%tuple.4b9)] -// CHECK:STDOUT: %.loc13_56.4: type = converted %.loc13_56.3, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)] -// CHECK:STDOUT: %.loc13_56.5: Core.Form = init_form %.loc13_56.4 [symbolic = %.loc13_56.2 (constants.%.f18)] -// CHECK:STDOUT: %.loc13_10.1: type = splice_block %.loc13_10.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc13_50: type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T)] +// CHECK:STDOUT: %U.ref.loc13_53: type = name_ref U, %U.loc13_16.2 [symbolic = %U.loc13_16.1 (constants.%U)] +// CHECK:STDOUT: %.loc13_54.3: %tuple.type.24b = tuple_literal (%T.ref.loc13_50, %U.ref.loc13_53) [symbolic = %tuple (constants.%tuple.4b9)] +// CHECK:STDOUT: %.loc13_54.4: type = converted %.loc13_54.3, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %.loc13_54.5: Core.Form = init_form %.loc13_54.4 [symbolic = %.loc13_54.2 (constants.%.f18)] +// CHECK:STDOUT: %.loc13_9.1: type = splice_block %.loc13_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc13_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc13_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc13_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc13_20.1: type = splice_block %.loc13_20.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc13_17: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc13_18.1: type = splice_block %.loc13_18.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc13_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc13_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc13_17.2: type = symbolic_binding U, 1 [symbolic = %U.loc13_17.1 (constants.%U)] -// CHECK:STDOUT: %p.param: @F.%Inner.loc13_45.1 (%Inner.34b) = value_param call_param0 -// CHECK:STDOUT: %.loc13_45: type = splice_block %Inner.loc13_45.2 [symbolic = %Inner.loc13_45.1 (constants.%Inner.34b)] { +// CHECK:STDOUT: %U.loc13_16.2: type = symbolic_binding U, 1 [symbolic = %U.loc13_16.1 (constants.%U)] +// CHECK:STDOUT: %p.param: @F.%Inner.loc13_43.1 (%Inner.34b) = value_param call_param0 +// CHECK:STDOUT: %.loc13_43: type = splice_block %Inner.loc13_43.2 [symbolic = %Inner.loc13_43.1 (constants.%Inner.34b)] { // CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [concrete = constants.%Outer.generic] -// CHECK:STDOUT: %T.ref.loc13_35: type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T)] -// CHECK:STDOUT: %Outer.loc13_36.2: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc13_36.1 (constants.%Outer.dee)] -// CHECK:STDOUT: %.loc13_37: @F.%Inner.type (%Inner.type.8f7) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.generic (constants.%Inner.generic.b3a)] -// CHECK:STDOUT: %Inner.ref: @F.%Inner.type (%Inner.type.8f7) = name_ref Inner, %.loc13_37 [symbolic = %Inner.generic (constants.%Inner.generic.b3a)] -// CHECK:STDOUT: %U.ref.loc13_44: type = name_ref U, %U.loc13_17.2 [symbolic = %U.loc13_17.1 (constants.%U)] -// CHECK:STDOUT: %Inner.loc13_45.2: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_45.1 (constants.%Inner.34b)] +// CHECK:STDOUT: %T.ref.loc13_33: type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T)] +// CHECK:STDOUT: %Outer.loc13_34.2: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc13_34.1 (constants.%Outer.dee)] +// CHECK:STDOUT: %.loc13_35: @F.%Inner.type (%Inner.type.8f7) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.generic (constants.%Inner.generic.b3a)] +// CHECK:STDOUT: %Inner.ref: @F.%Inner.type (%Inner.type.8f7) = name_ref Inner, %.loc13_35 [symbolic = %Inner.generic (constants.%Inner.generic.b3a)] +// CHECK:STDOUT: %U.ref.loc13_42: type = name_ref U, %U.loc13_16.2 [symbolic = %U.loc13_16.1 (constants.%U)] +// CHECK:STDOUT: %Inner.loc13_43.2: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_43.1 (constants.%Inner.34b)] // CHECK:STDOUT: } -// CHECK:STDOUT: %p: @F.%Inner.loc13_45.1 (%Inner.34b) = wrapper_binding p, %p.param +// CHECK:STDOUT: %p: @F.%Inner.loc13_43.1 (%Inner.34b) = wrapper_binding p, %p.param // CHECK:STDOUT: %return.param: ref @F.%tuple.type (%tuple.type.a5e) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%tuple.type (%tuple.type.a5e) = return_slot %return.param // CHECK:STDOUT: } @@ -656,9 +656,9 @@ fn G() -> i32 { // CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.8f7) = class_decl @Inner [symbolic = @Outer.%Inner.generic (constants.%Inner.generic.b3a)] { // CHECK:STDOUT: %U.patt.loc5_16.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc5_16.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_18.1: type = splice_block %.loc5_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc5_16.2: type = symbolic_binding U, 1 [symbolic = %U.loc5_16.1 (constants.%U)] // CHECK:STDOUT: } @@ -702,38 +702,38 @@ fn G() -> i32 { // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc13_7.2: type, %U.loc13_17.2: type) { +// CHECK:STDOUT: generic fn @F(%T.loc13_7.2: type, %U.loc13_16.2: type) { // CHECK:STDOUT: %T.patt.loc13_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc13_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc13_17.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_17.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc13_17.1: type = symbolic_binding U, 1 [symbolic = %U.loc13_17.1 (constants.%U)] -// CHECK:STDOUT: %Outer.loc13_36.1: type = class_type @Outer, @Outer(%T.loc13_7.1) [symbolic = %Outer.loc13_36.1 (constants.%Outer.dee)] -// CHECK:STDOUT: %require_complete.loc13_37: = require_complete_type %Outer.loc13_36.1 [symbolic = %require_complete.loc13_37 (constants.%require_complete.dae)] +// CHECK:STDOUT: %U.patt.loc13_16.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_16.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc13_16.1: type = symbolic_binding U, 1 [symbolic = %U.loc13_16.1 (constants.%U)] +// CHECK:STDOUT: %Outer.loc13_34.1: type = class_type @Outer, @Outer(%T.loc13_7.1) [symbolic = %Outer.loc13_34.1 (constants.%Outer.dee)] +// CHECK:STDOUT: %require_complete.loc13_35: = require_complete_type %Outer.loc13_34.1 [symbolic = %require_complete.loc13_35 (constants.%require_complete.dae)] // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T.loc13_7.1) [symbolic = %Inner.type (constants.%Inner.type.8f7)] // CHECK:STDOUT: %Inner.generic: @F.%Inner.type (%Inner.type.8f7) = struct_value () [symbolic = %Inner.generic (constants.%Inner.generic.b3a)] -// CHECK:STDOUT: %Inner.loc13_45.1: type = class_type @Inner, @Inner(%T.loc13_7.1, %U.loc13_17.1) [symbolic = %Inner.loc13_45.1 (constants.%Inner.34b)] -// CHECK:STDOUT: %pattern_type.loc13_27: type = pattern_type %Inner.loc13_45.1 [symbolic = %pattern_type.loc13_27 (constants.%pattern_type.f00)] -// CHECK:STDOUT: %p.param_patt.loc13_27.2: @F.%pattern_type.loc13_27 (%pattern_type.f00) = value_param_pattern [symbolic = %p.param_patt.loc13_27.2 (constants.%p.param_patt.785)] -// CHECK:STDOUT: %p.patt.loc13_27.2: @F.%pattern_type.loc13_27 (%pattern_type.f00) = at_binding_pattern p, %p.param_patt.loc13_27.2 [symbolic = %p.patt.loc13_27.2 (constants.%p.patt.b5b)] -// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T.loc13_7.1, %U.loc13_17.1) [symbolic = %tuple (constants.%tuple.4b9)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%T.loc13_7.1, %U.loc13_17.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] -// CHECK:STDOUT: %.loc13_56.2: Core.Form = init_form %tuple.type [symbolic = %.loc13_56.2 (constants.%.f18)] -// CHECK:STDOUT: %pattern_type.loc13_56: type = pattern_type %tuple.type [symbolic = %pattern_type.loc13_56 (constants.%pattern_type.eee)] -// CHECK:STDOUT: %return.param_patt.loc13_56.2: @F.%pattern_type.loc13_56 (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc13_56.2 (constants.%return.param_patt.a41)] -// CHECK:STDOUT: %return.patt.loc13_48.2: @F.%pattern_type.loc13_56 (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc13_56.2, %tuple.type [symbolic = %return.patt.loc13_48.2 (constants.%return.patt.453)] +// CHECK:STDOUT: %Inner.loc13_43.1: type = class_type @Inner, @Inner(%T.loc13_7.1, %U.loc13_16.1) [symbolic = %Inner.loc13_43.1 (constants.%Inner.34b)] +// CHECK:STDOUT: %pattern_type.loc13_25: type = pattern_type %Inner.loc13_43.1 [symbolic = %pattern_type.loc13_25 (constants.%pattern_type.f00)] +// CHECK:STDOUT: %p.param_patt.loc13_25.2: @F.%pattern_type.loc13_25 (%pattern_type.f00) = value_param_pattern [symbolic = %p.param_patt.loc13_25.2 (constants.%p.param_patt.785)] +// CHECK:STDOUT: %p.patt.loc13_25.2: @F.%pattern_type.loc13_25 (%pattern_type.f00) = at_binding_pattern p, %p.param_patt.loc13_25.2 [symbolic = %p.patt.loc13_25.2 (constants.%p.patt.b5b)] +// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T.loc13_7.1, %U.loc13_16.1) [symbolic = %tuple (constants.%tuple.4b9)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%T.loc13_7.1, %U.loc13_16.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %.loc13_54.2: Core.Form = init_form %tuple.type [symbolic = %.loc13_54.2 (constants.%.f18)] +// CHECK:STDOUT: %pattern_type.loc13_54: type = pattern_type %tuple.type [symbolic = %pattern_type.loc13_54 (constants.%pattern_type.eee)] +// CHECK:STDOUT: %return.param_patt.loc13_54.2: @F.%pattern_type.loc13_54 (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc13_54.2 (constants.%return.param_patt.a41)] +// CHECK:STDOUT: %return.patt.loc13_46.2: @F.%pattern_type.loc13_54 (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc13_54.2, %tuple.type [symbolic = %return.patt.loc13_46.2 (constants.%return.patt.453)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc13_27: = require_complete_type %Inner.loc13_45.1 [symbolic = %require_complete.loc13_27 (constants.%require_complete.8ae)] -// CHECK:STDOUT: %require_complete.loc13_48: = require_complete_type %tuple.type [symbolic = %require_complete.loc13_48 (constants.%require_complete.220)] -// CHECK:STDOUT: %F.specific_fn.loc13_67.2: = specific_function constants.%F, @F(%T.loc13_7.1, %U.loc13_17.1) [symbolic = %F.specific_fn.loc13_67.2 (constants.%F.specific_fn.19a)] +// CHECK:STDOUT: %require_complete.loc13_25: = require_complete_type %Inner.loc13_43.1 [symbolic = %require_complete.loc13_25 (constants.%require_complete.8ae)] +// CHECK:STDOUT: %require_complete.loc13_46: = require_complete_type %tuple.type [symbolic = %require_complete.loc13_46 (constants.%require_complete.220)] +// CHECK:STDOUT: %F.specific_fn.loc13_65.2: = specific_function constants.%F, @F(%T.loc13_7.1, %U.loc13_16.1) [symbolic = %F.specific_fn.loc13_65.2 (constants.%F.specific_fn.19a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%p.param: @F.%Inner.loc13_45.1 (%Inner.34b)) -> out %return.param: @F.%tuple.type (%tuple.type.a5e) { +// CHECK:STDOUT: fn(%p.param: @F.%Inner.loc13_43.1 (%Inner.34b)) -> out %return.param: @F.%tuple.type (%tuple.type.a5e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%Inner.loc13_45.1 (%Inner.34b) = name_ref p, %p -// CHECK:STDOUT: %F.specific_fn.loc13_67.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %F.specific_fn.loc13_67.2 (constants.%F.specific_fn.19a)] -// CHECK:STDOUT: %.loc13_56.1: ref @F.%tuple.type (%tuple.type.a5e) = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.a5e) to %.loc13_56.1 = call %F.specific_fn.loc13_67.1(%p.ref) +// CHECK:STDOUT: %p.ref: @F.%Inner.loc13_43.1 (%Inner.34b) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc13_65.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %F.specific_fn.loc13_65.2 (constants.%F.specific_fn.19a)] +// CHECK:STDOUT: %.loc13_54.1: ref @F.%tuple.type (%tuple.type.a5e) = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.a5e) to %.loc13_54.1 = call %F.specific_fn.loc13_65.1(%p.ref) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -771,27 +771,27 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc13_7.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc13_17.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc13_17.1 => constants.%U -// CHECK:STDOUT: %Outer.loc13_36.1 => constants.%Outer.dee -// CHECK:STDOUT: %require_complete.loc13_37 => constants.%require_complete.dae +// CHECK:STDOUT: %U.patt.loc13_16.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc13_16.1 => constants.%U +// CHECK:STDOUT: %Outer.loc13_34.1 => constants.%Outer.dee +// CHECK:STDOUT: %require_complete.loc13_35 => constants.%require_complete.dae // CHECK:STDOUT: %Inner.type => constants.%Inner.type.8f7 // CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.b3a -// CHECK:STDOUT: %Inner.loc13_45.1 => constants.%Inner.34b -// CHECK:STDOUT: %pattern_type.loc13_27 => constants.%pattern_type.f00 -// CHECK:STDOUT: %p.param_patt.loc13_27.2 => constants.%p.param_patt.785 -// CHECK:STDOUT: %p.patt.loc13_27.2 => constants.%p.patt.b5b +// CHECK:STDOUT: %Inner.loc13_43.1 => constants.%Inner.34b +// CHECK:STDOUT: %pattern_type.loc13_25 => constants.%pattern_type.f00 +// CHECK:STDOUT: %p.param_patt.loc13_25.2 => constants.%p.param_patt.785 +// CHECK:STDOUT: %p.patt.loc13_25.2 => constants.%p.patt.b5b // CHECK:STDOUT: %tuple => constants.%tuple.4b9 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a5e -// CHECK:STDOUT: %.loc13_56.2 => constants.%.f18 -// CHECK:STDOUT: %pattern_type.loc13_56 => constants.%pattern_type.eee -// CHECK:STDOUT: %return.param_patt.loc13_56.2 => constants.%return.param_patt.a41 -// CHECK:STDOUT: %return.patt.loc13_48.2 => constants.%return.patt.453 +// CHECK:STDOUT: %.loc13_54.2 => constants.%.f18 +// CHECK:STDOUT: %pattern_type.loc13_54 => constants.%pattern_type.eee +// CHECK:STDOUT: %return.param_patt.loc13_54.2 => constants.%return.param_patt.a41 +// CHECK:STDOUT: %return.patt.loc13_46.2 => constants.%return.patt.453 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc13_27 => constants.%require_complete.8ae -// CHECK:STDOUT: %require_complete.loc13_48 => constants.%require_complete.220 -// CHECK:STDOUT: %F.specific_fn.loc13_67.2 => constants.%F.specific_fn.19a +// CHECK:STDOUT: %require_complete.loc13_25 => constants.%require_complete.8ae +// CHECK:STDOUT: %require_complete.loc13_46 => constants.%require_complete.220 +// CHECK:STDOUT: %F.specific_fn.loc13_65.2 => constants.%F.specific_fn.19a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%C) { @@ -813,27 +813,27 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%C, constants.%D) { // CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc13_7.1 => constants.%C -// CHECK:STDOUT: %U.patt.loc13_17.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc13_17.1 => constants.%D -// CHECK:STDOUT: %Outer.loc13_36.1 => constants.%Outer.10e -// CHECK:STDOUT: %require_complete.loc13_37 => constants.%complete_type.357 +// CHECK:STDOUT: %U.patt.loc13_16.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc13_16.1 => constants.%D +// CHECK:STDOUT: %Outer.loc13_34.1 => constants.%Outer.10e +// CHECK:STDOUT: %require_complete.loc13_35 => constants.%complete_type.357 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.91b // CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.bd3 -// CHECK:STDOUT: %Inner.loc13_45.1 => constants.%Inner.3ff -// CHECK:STDOUT: %pattern_type.loc13_27 => constants.%pattern_type.0d8 -// CHECK:STDOUT: %p.param_patt.loc13_27.2 => constants.%p.param_patt.f58 -// CHECK:STDOUT: %p.patt.loc13_27.2 => constants.%p.patt.cca +// CHECK:STDOUT: %Inner.loc13_43.1 => constants.%Inner.3ff +// CHECK:STDOUT: %pattern_type.loc13_25 => constants.%pattern_type.0d8 +// CHECK:STDOUT: %p.param_patt.loc13_25.2 => constants.%p.param_patt.f58 +// CHECK:STDOUT: %p.patt.loc13_25.2 => constants.%p.patt.cca // CHECK:STDOUT: %tuple => constants.%tuple.b04 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.af1 -// CHECK:STDOUT: %.loc13_56.2 => constants.%.71f -// CHECK:STDOUT: %pattern_type.loc13_56 => constants.%pattern_type.c66 -// CHECK:STDOUT: %return.param_patt.loc13_56.2 => constants.%return.param_patt.fc8 -// CHECK:STDOUT: %return.patt.loc13_48.2 => constants.%return.patt.964 +// CHECK:STDOUT: %.loc13_54.2 => constants.%.71f +// CHECK:STDOUT: %pattern_type.loc13_54 => constants.%pattern_type.c66 +// CHECK:STDOUT: %return.param_patt.loc13_54.2 => constants.%return.param_patt.fc8 +// CHECK:STDOUT: %return.patt.loc13_46.2 => constants.%return.patt.964 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc13_27 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc13_48 => constants.%complete_type.6db -// CHECK:STDOUT: %F.specific_fn.loc13_67.2 => constants.%F.specific_fn.fca +// CHECK:STDOUT: %require_complete.loc13_25 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc13_46 => constants.%complete_type.6db +// CHECK:STDOUT: %F.specific_fn.loc13_65.2 => constants.%F.specific_fn.fca // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- nontype.carbon @@ -949,25 +949,25 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %N.patt.loc6_7.1: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_7.2 (constants.%N.patt.38a)] -// CHECK:STDOUT: %x.param_patt.loc6_23.1: @F.%pattern_type (%pattern_type.e30) = value_param_pattern [symbolic = %x.param_patt.loc6_23.2 (constants.%x.param_patt.12a)] -// CHECK:STDOUT: %x.patt.loc6_23.1: @F.%pattern_type (%pattern_type.e30) = at_binding_pattern x, %x.param_patt.loc6_23.1 [symbolic = %x.patt.loc6_23.2 (constants.%x.patt.e34)] +// CHECK:STDOUT: %x.param_patt.loc6_22.1: @F.%pattern_type (%pattern_type.e30) = value_param_pattern [symbolic = %x.param_patt.loc6_22.2 (constants.%x.param_patt.12a)] +// CHECK:STDOUT: %x.patt.loc6_22.1: @F.%pattern_type (%pattern_type.e30) = at_binding_pattern x, %x.param_patt.loc6_22.1 [symbolic = %x.patt.loc6_22.2 (constants.%x.patt.e34)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] -// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc6_44 [concrete = constants.%return.patt.e1b] +// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc6_43 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { -// CHECK:STDOUT: %i32.loc6_44: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc6_44: Core.Form = init_form %i32.loc6_44 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc6_10: type = splice_block %i32.loc6_10 [concrete = constants.%i32] { +// CHECK:STDOUT: %i32.loc6_43: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc6_43: Core.Form = init_form %i32.loc6_43 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc6_9: type = splice_block %i32.loc6_9 [concrete = constants.%i32] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %i32.loc6_10: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %i32.loc6_9: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %N.loc6_7.2: %i32 = symbolic_binding N, 0 [symbolic = %N.loc6_7.1 (constants.%N.37f)] -// CHECK:STDOUT: %x.param: @F.%WithNontype.loc6_38.1 (%WithNontype.40e) = value_param call_param0 -// CHECK:STDOUT: %.loc6_38: type = splice_block %WithNontype.loc6_38.2 [symbolic = %WithNontype.loc6_38.1 (constants.%WithNontype.40e)] { +// CHECK:STDOUT: %x.param: @F.%WithNontype.loc6_37.1 (%WithNontype.40e) = value_param call_param0 +// CHECK:STDOUT: %.loc6_37: type = splice_block %WithNontype.loc6_37.2 [symbolic = %WithNontype.loc6_37.1 (constants.%WithNontype.40e)] { // CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [concrete = constants.%WithNontype.generic] -// CHECK:STDOUT: %N.ref.loc6_37: %i32 = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N.37f)] -// CHECK:STDOUT: %WithNontype.loc6_38.2: type = class_type @WithNontype, @WithNontype(constants.%N.37f) [symbolic = %WithNontype.loc6_38.1 (constants.%WithNontype.40e)] +// CHECK:STDOUT: %N.ref.loc6_36: %i32 = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N.37f)] +// CHECK:STDOUT: %WithNontype.loc6_37.2: type = class_type @WithNontype, @WithNontype(constants.%N.37f) [symbolic = %WithNontype.loc6_37.1 (constants.%WithNontype.40e)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%WithNontype.loc6_38.1 (%WithNontype.40e) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @F.%WithNontype.loc6_37.1 (%WithNontype.40e) = wrapper_binding x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -1000,24 +1000,24 @@ fn G() -> i32 { // CHECK:STDOUT: generic fn @F(%N.loc6_7.2: %i32) { // CHECK:STDOUT: %N.patt.loc6_7.2: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_7.2 (constants.%N.patt.38a)] // CHECK:STDOUT: %N.loc6_7.1: %i32 = symbolic_binding N, 0 [symbolic = %N.loc6_7.1 (constants.%N.37f)] -// CHECK:STDOUT: %WithNontype.loc6_38.1: type = class_type @WithNontype, @WithNontype(%N.loc6_7.1) [symbolic = %WithNontype.loc6_38.1 (constants.%WithNontype.40e)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %WithNontype.loc6_38.1 [symbolic = %pattern_type (constants.%pattern_type.e30)] -// CHECK:STDOUT: %x.param_patt.loc6_23.2: @F.%pattern_type (%pattern_type.e30) = value_param_pattern [symbolic = %x.param_patt.loc6_23.2 (constants.%x.param_patt.12a)] -// CHECK:STDOUT: %x.patt.loc6_23.2: @F.%pattern_type (%pattern_type.e30) = at_binding_pattern x, %x.param_patt.loc6_23.2 [symbolic = %x.patt.loc6_23.2 (constants.%x.patt.e34)] +// CHECK:STDOUT: %WithNontype.loc6_37.1: type = class_type @WithNontype, @WithNontype(%N.loc6_7.1) [symbolic = %WithNontype.loc6_37.1 (constants.%WithNontype.40e)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %WithNontype.loc6_37.1 [symbolic = %pattern_type (constants.%pattern_type.e30)] +// CHECK:STDOUT: %x.param_patt.loc6_22.2: @F.%pattern_type (%pattern_type.e30) = value_param_pattern [symbolic = %x.param_patt.loc6_22.2 (constants.%x.param_patt.12a)] +// CHECK:STDOUT: %x.patt.loc6_22.2: @F.%pattern_type (%pattern_type.e30) = at_binding_pattern x, %x.param_patt.loc6_22.2 [symbolic = %x.patt.loc6_22.2 (constants.%x.patt.e34)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %WithNontype.loc6_38.1 [symbolic = %require_complete (constants.%require_complete.fef)] +// CHECK:STDOUT: %require_complete: = require_complete_type %WithNontype.loc6_37.1 [symbolic = %require_complete (constants.%require_complete.fef)] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %N.loc6_7.1, constants.%Int.as.Copy.impl.Op.4f6 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound.987)] -// CHECK:STDOUT: %bound_method.loc6_57.3: = bound_method %N.loc6_7.1, constants.%Int.as.Copy.impl.Op.specific_fn [symbolic = %bound_method.loc6_57.3 (constants.%bound_method.d86)] +// CHECK:STDOUT: %bound_method.loc6_56.3: = bound_method %N.loc6_7.1, constants.%Int.as.Copy.impl.Op.specific_fn [symbolic = %bound_method.loc6_56.3 (constants.%bound_method.d86)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%WithNontype.loc6_38.1 (%WithNontype.40e)) -> out %return.param: %i32 { +// CHECK:STDOUT: fn(%x.param: @F.%WithNontype.loc6_37.1 (%WithNontype.40e)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %N.ref.loc6_57: %i32 = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N.37f)] +// CHECK:STDOUT: %N.ref.loc6_56: %i32 = name_ref N, %N.loc6_7.2 [symbolic = %N.loc6_7.1 (constants.%N.37f)] // CHECK:STDOUT: %impl.elem0: %.7a6 = impl_witness_access constants.%Copy.impl_witness.0e0, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6] -// CHECK:STDOUT: %bound_method.loc6_57.1: = bound_method %N.ref.loc6_57, %impl.elem0 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound.987)] +// CHECK:STDOUT: %bound_method.loc6_56.1: = bound_method %N.ref.loc6_56, %impl.elem0 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound.987)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc6_57.2: = bound_method %N.ref.loc6_57, %specific_fn [symbolic = %bound_method.loc6_57.3 (constants.%bound_method.d86)] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc6_57.2(%N.ref.loc6_57) [symbolic = %N.loc6_7.1 (constants.%N.37f)] +// CHECK:STDOUT: %bound_method.loc6_56.2: = bound_method %N.ref.loc6_56, %specific_fn [symbolic = %bound_method.loc6_56.3 (constants.%bound_method.d86)] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc6_56.2(%N.ref.loc6_56) [symbolic = %N.loc6_7.1 (constants.%N.37f)] // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -1070,10 +1070,10 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%N.37f) { // CHECK:STDOUT: %N.patt.loc6_7.2 => constants.%N.patt.38a // CHECK:STDOUT: %N.loc6_7.1 => constants.%N.37f -// CHECK:STDOUT: %WithNontype.loc6_38.1 => constants.%WithNontype.40e +// CHECK:STDOUT: %WithNontype.loc6_37.1 => constants.%WithNontype.40e // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e30 -// CHECK:STDOUT: %x.param_patt.loc6_23.2 => constants.%x.param_patt.12a -// CHECK:STDOUT: %x.patt.loc6_23.2 => constants.%x.patt.e34 +// CHECK:STDOUT: %x.param_patt.loc6_22.2 => constants.%x.param_patt.12a +// CHECK:STDOUT: %x.patt.loc6_22.2 => constants.%x.patt.e34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WithNontype(constants.%int_0.3c0) { @@ -1086,14 +1086,14 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%int_0.3c0) { // CHECK:STDOUT: %N.patt.loc6_7.2 => constants.%N.patt.38a // CHECK:STDOUT: %N.loc6_7.1 => constants.%int_0.3c0 -// CHECK:STDOUT: %WithNontype.loc6_38.1 => constants.%WithNontype.888 +// CHECK:STDOUT: %WithNontype.loc6_37.1 => constants.%WithNontype.888 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d30 -// CHECK:STDOUT: %x.param_patt.loc6_23.2 => constants.%x.param_patt.33b -// CHECK:STDOUT: %x.patt.loc6_23.2 => constants.%x.patt.a47 +// CHECK:STDOUT: %x.param_patt.loc6_22.2 => constants.%x.param_patt.33b +// CHECK:STDOUT: %x.patt.loc6_22.2 => constants.%x.patt.a47 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.357 // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound => constants.%Int.as.Copy.impl.Op.bound.678 -// CHECK:STDOUT: %bound_method.loc6_57.3 => constants.%bound_method.28e +// CHECK:STDOUT: %bound_method.loc6_56.3 => constants.%bound_method.28e // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/int_float.carbon b/toolchain/check/testdata/deduce/int_float.carbon index 6bbdd29ea13b..20f54ab0ccd6 100644 --- a/toolchain/check/testdata/deduce/int_float.carbon +++ b/toolchain/check/testdata/deduce/int_float.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -fn F[N:! Core.IntLiteral](unused n: Core.Int(N)) -> Core.IntLiteral { +fn F[N: Core.IntLiteral](unused n: Core.Int(N)) -> Core.IntLiteral { return N; } @@ -28,7 +28,7 @@ fn G(a: i64) -> Core.IntLiteral { library "[[@TEST_NAME]]"; -fn F[N:! Core.IntLiteral](unused n: Core.Float(N)) -> Core.IntLiteral { +fn F[N: Core.IntLiteral](unused n: Core.Float(N)) -> Core.IntLiteral { return N; } @@ -103,28 +103,28 @@ fn G(a: f64) -> Core.IntLiteral { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %N.patt.loc4_7.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_7.2 (constants.%N.patt)] -// CHECK:STDOUT: %n.param_patt.loc4_35.1: @F.%pattern_type (%pattern_type.142) = value_param_pattern [symbolic = %n.param_patt.loc4_35.2 (constants.%n.param_patt.283)] -// CHECK:STDOUT: %n.patt.loc4_35.1: @F.%pattern_type (%pattern_type.142) = at_binding_pattern n, %n.param_patt.loc4_35.1 [symbolic = %n.patt.loc4_35.2 (constants.%n.patt.f0b)] +// CHECK:STDOUT: %n.param_patt.loc4_34.1: @F.%pattern_type (%pattern_type.142) = value_param_pattern [symbolic = %n.param_patt.loc4_34.2 (constants.%n.param_patt.283)] +// CHECK:STDOUT: %n.patt.loc4_34.1: @F.%pattern_type (%pattern_type.142) = at_binding_pattern n, %n.param_patt.loc4_34.1 [symbolic = %n.patt.loc4_34.2 (constants.%n.patt.f0b)] // CHECK:STDOUT: %return.param_patt: %pattern_type.dc0 = out_param_pattern [concrete = constants.%return.param_patt.eab] -// CHECK:STDOUT: %return.patt: %pattern_type.dc0 = return_slot_pattern %return.param_patt, %IntLiteral.ref.loc4_57 [concrete = constants.%return.patt.cd4] +// CHECK:STDOUT: %return.patt: %pattern_type.dc0 = return_slot_pattern %return.param_patt, %IntLiteral.ref.loc4_56 [concrete = constants.%return.patt.cd4] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Core.ref.loc4_53: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %IntLiteral.ref.loc4_57: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] -// CHECK:STDOUT: %.loc4_57: Core.Form = init_form %IntLiteral.ref.loc4_57 [concrete = constants.%.f7d] -// CHECK:STDOUT: %.loc4_14: type = splice_block %IntLiteral.ref.loc4_14 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %Core.ref.loc4_52: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %IntLiteral.ref.loc4_56: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] +// CHECK:STDOUT: %.loc4_56: Core.Form = init_form %IntLiteral.ref.loc4_56 [concrete = constants.%.f7d] +// CHECK:STDOUT: %.loc4_13: type = splice_block %IntLiteral.ref.loc4_13 [concrete = Core.IntLiteral] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %Core.ref.loc4_10: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %IntLiteral.ref.loc4_14: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] +// CHECK:STDOUT: %Core.ref.loc4_9: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %IntLiteral.ref.loc4_13: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: } // CHECK:STDOUT: %N.loc4_7.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_7.1 (constants.%N)] -// CHECK:STDOUT: %n.param: @F.%Int.loc4_47.1 (%Int) = value_param call_param0 -// CHECK:STDOUT: %.loc4_47: type = splice_block %Int.loc4_47.2 [symbolic = %Int.loc4_47.1 (constants.%Int)] { -// CHECK:STDOUT: %Core.ref.loc4_37: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %n.param: @F.%Int.loc4_46.1 (%Int) = value_param call_param0 +// CHECK:STDOUT: %.loc4_46: type = splice_block %Int.loc4_46.2 [symbolic = %Int.loc4_46.1 (constants.%Int)] { +// CHECK:STDOUT: %Core.ref.loc4_36: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic] // CHECK:STDOUT: %N.ref.loc4: Core.IntLiteral = name_ref N, %N.loc4_7.2 [symbolic = %N.loc4_7.1 (constants.%N)] -// CHECK:STDOUT: %Int.loc4_47.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc4_47.1 (constants.%Int)] +// CHECK:STDOUT: %Int.loc4_46.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc4_46.1 (constants.%Int)] // CHECK:STDOUT: } -// CHECK:STDOUT: %n: @F.%Int.loc4_47.1 (%Int) = wrapper_binding n, %n.param +// CHECK:STDOUT: %n: @F.%Int.loc4_46.1 (%Int) = wrapper_binding n, %n.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param call_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param // CHECK:STDOUT: } @@ -148,16 +148,16 @@ fn G(a: f64) -> Core.IntLiteral { // CHECK:STDOUT: generic fn @F(%N.loc4_7.2: Core.IntLiteral) { // CHECK:STDOUT: %N.patt.loc4_7.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_7.2 (constants.%N.patt)] // CHECK:STDOUT: %N.loc4_7.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_7.1 (constants.%N)] -// CHECK:STDOUT: %Int.loc4_47.1: type = class_type @Int, @Int(%N.loc4_7.1) [symbolic = %Int.loc4_47.1 (constants.%Int)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Int.loc4_47.1 [symbolic = %pattern_type (constants.%pattern_type.142)] -// CHECK:STDOUT: %n.param_patt.loc4_35.2: @F.%pattern_type (%pattern_type.142) = value_param_pattern [symbolic = %n.param_patt.loc4_35.2 (constants.%n.param_patt.283)] -// CHECK:STDOUT: %n.patt.loc4_35.2: @F.%pattern_type (%pattern_type.142) = at_binding_pattern n, %n.param_patt.loc4_35.2 [symbolic = %n.patt.loc4_35.2 (constants.%n.patt.f0b)] +// CHECK:STDOUT: %Int.loc4_46.1: type = class_type @Int, @Int(%N.loc4_7.1) [symbolic = %Int.loc4_46.1 (constants.%Int)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Int.loc4_46.1 [symbolic = %pattern_type (constants.%pattern_type.142)] +// CHECK:STDOUT: %n.param_patt.loc4_34.2: @F.%pattern_type (%pattern_type.142) = value_param_pattern [symbolic = %n.param_patt.loc4_34.2 (constants.%n.param_patt.283)] +// CHECK:STDOUT: %n.patt.loc4_34.2: @F.%pattern_type (%pattern_type.142) = at_binding_pattern n, %n.param_patt.loc4_34.2 [symbolic = %n.patt.loc4_34.2 (constants.%n.patt.f0b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %Int.loc4_47.1 [symbolic = %require_complete (constants.%require_complete.4df)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Int.loc4_46.1 [symbolic = %require_complete (constants.%require_complete.4df)] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.bound: = bound_method %N.loc4_7.1, constants.%Core.IntLiteral.as.Copy.impl.Op [symbolic = %Core.IntLiteral.as.Copy.impl.Op.bound (constants.%Core.IntLiteral.as.Copy.impl.Op.bound.3c6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%n.param: @F.%Int.loc4_47.1 (%Int)) -> out %return.param: Core.IntLiteral { +// CHECK:STDOUT: fn(%n.param: @F.%Int.loc4_46.1 (%Int)) -> out %return.param: Core.IntLiteral { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc5: Core.IntLiteral = name_ref N, %N.loc4_7.2 [symbolic = %N.loc4_7.1 (constants.%N)] // CHECK:STDOUT: %impl.elem0: %.c22 = impl_witness_access constants.%Copy.impl_witness.6f1, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] @@ -183,19 +183,19 @@ fn G(a: f64) -> Core.IntLiteral { // CHECK:STDOUT: specific @F(constants.%N) { // CHECK:STDOUT: %N.patt.loc4_7.2 => constants.%N.patt // CHECK:STDOUT: %N.loc4_7.1 => constants.%N -// CHECK:STDOUT: %Int.loc4_47.1 => constants.%Int +// CHECK:STDOUT: %Int.loc4_46.1 => constants.%Int // CHECK:STDOUT: %pattern_type => constants.%pattern_type.142 -// CHECK:STDOUT: %n.param_patt.loc4_35.2 => constants.%n.param_patt.283 -// CHECK:STDOUT: %n.patt.loc4_35.2 => constants.%n.patt.f0b +// CHECK:STDOUT: %n.param_patt.loc4_34.2 => constants.%n.param_patt.283 +// CHECK:STDOUT: %n.patt.loc4_34.2 => constants.%n.patt.f0b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%int_64) { // CHECK:STDOUT: %N.patt.loc4_7.2 => constants.%N.patt // CHECK:STDOUT: %N.loc4_7.1 => constants.%int_64 -// CHECK:STDOUT: %Int.loc4_47.1 => constants.%i64 +// CHECK:STDOUT: %Int.loc4_46.1 => constants.%i64 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f57 -// CHECK:STDOUT: %n.param_patt.loc4_35.2 => constants.%n.param_patt.dfd -// CHECK:STDOUT: %n.patt.loc4_35.2 => constants.%n.patt.958 +// CHECK:STDOUT: %n.param_patt.loc4_34.2 => constants.%n.param_patt.dfd +// CHECK:STDOUT: %n.patt.loc4_34.2 => constants.%n.patt.958 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.4a1 @@ -269,28 +269,28 @@ fn G(a: f64) -> Core.IntLiteral { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %N.patt.loc4_7.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_7.2 (constants.%N.patt)] -// CHECK:STDOUT: %n.param_patt.loc4_35.1: @F.%pattern_type (%pattern_type.903) = value_param_pattern [symbolic = %n.param_patt.loc4_35.2 (constants.%n.param_patt.0bd)] -// CHECK:STDOUT: %n.patt.loc4_35.1: @F.%pattern_type (%pattern_type.903) = at_binding_pattern n, %n.param_patt.loc4_35.1 [symbolic = %n.patt.loc4_35.2 (constants.%n.patt.862)] +// CHECK:STDOUT: %n.param_patt.loc4_34.1: @F.%pattern_type (%pattern_type.903) = value_param_pattern [symbolic = %n.param_patt.loc4_34.2 (constants.%n.param_patt.0bd)] +// CHECK:STDOUT: %n.patt.loc4_34.1: @F.%pattern_type (%pattern_type.903) = at_binding_pattern n, %n.param_patt.loc4_34.1 [symbolic = %n.patt.loc4_34.2 (constants.%n.patt.862)] // CHECK:STDOUT: %return.param_patt: %pattern_type.dc0 = out_param_pattern [concrete = constants.%return.param_patt.eab] -// CHECK:STDOUT: %return.patt: %pattern_type.dc0 = return_slot_pattern %return.param_patt, %IntLiteral.ref.loc4_59 [concrete = constants.%return.patt.cd4] +// CHECK:STDOUT: %return.patt: %pattern_type.dc0 = return_slot_pattern %return.param_patt, %IntLiteral.ref.loc4_58 [concrete = constants.%return.patt.cd4] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Core.ref.loc4_55: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %IntLiteral.ref.loc4_59: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] -// CHECK:STDOUT: %.loc4_59: Core.Form = init_form %IntLiteral.ref.loc4_59 [concrete = constants.%.f7d] -// CHECK:STDOUT: %.loc4_14: type = splice_block %IntLiteral.ref.loc4_14 [concrete = Core.IntLiteral] { +// CHECK:STDOUT: %Core.ref.loc4_54: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %IntLiteral.ref.loc4_58: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] +// CHECK:STDOUT: %.loc4_58: Core.Form = init_form %IntLiteral.ref.loc4_58 [concrete = constants.%.f7d] +// CHECK:STDOUT: %.loc4_13: type = splice_block %IntLiteral.ref.loc4_13 [concrete = Core.IntLiteral] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %Core.ref.loc4_10: = name_ref Core, imports.%Core [concrete = imports.%Core] -// CHECK:STDOUT: %IntLiteral.ref.loc4_14: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] +// CHECK:STDOUT: %Core.ref.loc4_9: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %IntLiteral.ref.loc4_13: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: } // CHECK:STDOUT: %N.loc4_7.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_7.1 (constants.%N)] -// CHECK:STDOUT: %n.param: @F.%Float.loc4_49.1 (%Float) = value_param call_param0 -// CHECK:STDOUT: %.loc4_49: type = splice_block %Float.loc4_49.2 [symbolic = %Float.loc4_49.1 (constants.%Float)] { -// CHECK:STDOUT: %Core.ref.loc4_37: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %n.param: @F.%Float.loc4_48.1 (%Float) = value_param call_param0 +// CHECK:STDOUT: %.loc4_48: type = splice_block %Float.loc4_48.2 [symbolic = %Float.loc4_48.1 (constants.%Float)] { +// CHECK:STDOUT: %Core.ref.loc4_36: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, imports.%Core.Float [concrete = constants.%Float.generic] // CHECK:STDOUT: %N.ref.loc4: Core.IntLiteral = name_ref N, %N.loc4_7.2 [symbolic = %N.loc4_7.1 (constants.%N)] -// CHECK:STDOUT: %Float.loc4_49.2: type = class_type @Float, @Float(constants.%N) [symbolic = %Float.loc4_49.1 (constants.%Float)] +// CHECK:STDOUT: %Float.loc4_48.2: type = class_type @Float, @Float(constants.%N) [symbolic = %Float.loc4_48.1 (constants.%Float)] // CHECK:STDOUT: } -// CHECK:STDOUT: %n: @F.%Float.loc4_49.1 (%Float) = wrapper_binding n, %n.param +// CHECK:STDOUT: %n: @F.%Float.loc4_48.1 (%Float) = wrapper_binding n, %n.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param call_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param // CHECK:STDOUT: } @@ -314,16 +314,16 @@ fn G(a: f64) -> Core.IntLiteral { // CHECK:STDOUT: generic fn @F(%N.loc4_7.2: Core.IntLiteral) { // CHECK:STDOUT: %N.patt.loc4_7.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_7.2 (constants.%N.patt)] // CHECK:STDOUT: %N.loc4_7.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_7.1 (constants.%N)] -// CHECK:STDOUT: %Float.loc4_49.1: type = class_type @Float, @Float(%N.loc4_7.1) [symbolic = %Float.loc4_49.1 (constants.%Float)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Float.loc4_49.1 [symbolic = %pattern_type (constants.%pattern_type.903)] -// CHECK:STDOUT: %n.param_patt.loc4_35.2: @F.%pattern_type (%pattern_type.903) = value_param_pattern [symbolic = %n.param_patt.loc4_35.2 (constants.%n.param_patt.0bd)] -// CHECK:STDOUT: %n.patt.loc4_35.2: @F.%pattern_type (%pattern_type.903) = at_binding_pattern n, %n.param_patt.loc4_35.2 [symbolic = %n.patt.loc4_35.2 (constants.%n.patt.862)] +// CHECK:STDOUT: %Float.loc4_48.1: type = class_type @Float, @Float(%N.loc4_7.1) [symbolic = %Float.loc4_48.1 (constants.%Float)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Float.loc4_48.1 [symbolic = %pattern_type (constants.%pattern_type.903)] +// CHECK:STDOUT: %n.param_patt.loc4_34.2: @F.%pattern_type (%pattern_type.903) = value_param_pattern [symbolic = %n.param_patt.loc4_34.2 (constants.%n.param_patt.0bd)] +// CHECK:STDOUT: %n.patt.loc4_34.2: @F.%pattern_type (%pattern_type.903) = at_binding_pattern n, %n.param_patt.loc4_34.2 [symbolic = %n.patt.loc4_34.2 (constants.%n.patt.862)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %Float.loc4_49.1 [symbolic = %require_complete (constants.%require_complete.eb0)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Float.loc4_48.1 [symbolic = %require_complete (constants.%require_complete.eb0)] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.bound: = bound_method %N.loc4_7.1, constants.%Core.IntLiteral.as.Copy.impl.Op [symbolic = %Core.IntLiteral.as.Copy.impl.Op.bound (constants.%Core.IntLiteral.as.Copy.impl.Op.bound.3c6)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%n.param: @F.%Float.loc4_49.1 (%Float)) -> out %return.param: Core.IntLiteral { +// CHECK:STDOUT: fn(%n.param: @F.%Float.loc4_48.1 (%Float)) -> out %return.param: Core.IntLiteral { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc5: Core.IntLiteral = name_ref N, %N.loc4_7.2 [symbolic = %N.loc4_7.1 (constants.%N)] // CHECK:STDOUT: %impl.elem0: %.c22 = impl_witness_access constants.%Copy.impl_witness.6f1, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] @@ -349,19 +349,19 @@ fn G(a: f64) -> Core.IntLiteral { // CHECK:STDOUT: specific @F(constants.%N) { // CHECK:STDOUT: %N.patt.loc4_7.2 => constants.%N.patt // CHECK:STDOUT: %N.loc4_7.1 => constants.%N -// CHECK:STDOUT: %Float.loc4_49.1 => constants.%Float +// CHECK:STDOUT: %Float.loc4_48.1 => constants.%Float // CHECK:STDOUT: %pattern_type => constants.%pattern_type.903 -// CHECK:STDOUT: %n.param_patt.loc4_35.2 => constants.%n.param_patt.0bd -// CHECK:STDOUT: %n.patt.loc4_35.2 => constants.%n.patt.862 +// CHECK:STDOUT: %n.param_patt.loc4_34.2 => constants.%n.param_patt.0bd +// CHECK:STDOUT: %n.patt.loc4_34.2 => constants.%n.patt.862 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%int_64) { // CHECK:STDOUT: %N.patt.loc4_7.2 => constants.%N.patt // CHECK:STDOUT: %N.loc4_7.1 => constants.%int_64 -// CHECK:STDOUT: %Float.loc4_49.1 => constants.%f64.dc1 +// CHECK:STDOUT: %Float.loc4_48.1 => constants.%f64.dc1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fb7 -// CHECK:STDOUT: %n.param_patt.loc4_35.2 => constants.%n.param_patt.632 -// CHECK:STDOUT: %n.patt.loc4_35.2 => constants.%n.patt.572 +// CHECK:STDOUT: %n.param_patt.loc4_34.2 => constants.%n.param_patt.632 +// CHECK:STDOUT: %n.patt.loc4_34.2 => constants.%n.patt.572 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.7b9 diff --git a/toolchain/check/testdata/deduce/symbolic_facets.carbon b/toolchain/check/testdata/deduce/symbolic_facets.carbon index 06da29f0d640..278bc12cd55e 100644 --- a/toolchain/check/testdata/deduce/symbolic_facets.carbon +++ b/toolchain/check/testdata/deduce/symbolic_facets.carbon @@ -18,14 +18,14 @@ // --- fail_missing_interface.carbon library "[[@TEST_NAME]]"; -class C(CC:! type) { +class C(CC: type) { interface A {} - fn F(unused T:! A) {} + fn F(unused generic T: A) {} } -class D(DD:! type) { +class D(DD: type) { interface B {} - fn G(T:! B) { + fn G(generic T: B) { // T only implements D(DD).B, so should not convert to a facet value // implementing C(()).A. // @@ -33,8 +33,8 @@ class D(DD:! type) { // CHECK:STDERR: C(()).F(T); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: fail_missing_interface.carbon:[[@LINE-12]]:3: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F(unused T:! A) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F(unused generic T: A) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: C(()).F(T); } @@ -43,14 +43,14 @@ class D(DD:! type) { // --- fail_interface_wrong_generic_param.carbon library "[[@TEST_NAME]]"; -class C(CC:! type) { +class C(CC: type) { interface A {} - fn F(unused T:! A) {} + fn F(unused generic T: A) {} } -class D(DD:! type) { +class D(DD: type) { interface B {} - fn G(T:! B & C({}).A) { + fn G(generic T: B & C({}).A) { // T implements C({}).A and D(DD).B, so should not convert to a facet value // implementing C(()).A. // @@ -58,8 +58,8 @@ class D(DD:! type) { // CHECK:STDERR: C(()).F(T); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: fail_interface_wrong_generic_param.carbon:[[@LINE-12]]:3: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F(unused T:! A) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F(unused generic T: A) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: C(()).F(T); } @@ -68,14 +68,14 @@ class D(DD:! type) { // --- compatible_deduce.carbon library "[[@TEST_NAME]]"; -class C(CC:! type) { +class C(CC: type) { interface A {} - fn F(unused T:! A) {} + fn F(unused generic T: A) {} } -class D(DD:! type) { +class D(DD: type) { interface B {} - fn G(T:! B & C(()).A) { + fn G(generic T: B & C(()).A) { C(()).F(T); } } diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index 9023dfd9920f..c3a0800725d6 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -19,7 +19,7 @@ library "[[@TEST_NAME]]"; class C {} class D {} -fn F[T:! type, U:! type](pair: (T, U)) -> U { return F(pair); } +fn F[T: type, U: type](pair: (T, U)) -> U { return F(pair); } fn G(pair: (C, D)) -> D { return F(pair); @@ -29,9 +29,9 @@ fn G(pair: (C, D)) -> D { library "[[@TEST_NAME]]"; -class HasPair(Pair:! (i32, i32)) {} +class HasPair(Pair: (i32, i32)) {} -fn F[A:! i32, B:! i32](unused h: HasPair((A, B))) -> i32 { return B; } +fn F[A: i32, B: i32](unused h: HasPair((A, B))) -> i32 { return B; } fn G(h: HasPair((1, 2))) -> i32 { return F(h); @@ -44,15 +44,15 @@ library "[[@TEST_NAME]]"; class C {} class D {} -fn F[T:! type](pair: (T, T)) -> T; +fn F[T: type](pair: (T, T)) -> T; fn G(pair: (C, D)) -> D { // CHECK:STDERR: fail_inconsistent.carbon:[[@LINE+7]]:10: error: inconsistent deductions for value of generic parameter `T` [DeductionInconsistent] // CHECK:STDERR: return F(pair); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_inconsistent.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F[T:! type](pair: (T, T)) -> T; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F[T: type](pair: (T, T)) -> T; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: return F(pair); } @@ -120,34 +120,34 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc7_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc7_17.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_17.2 (constants.%U.patt)] -// CHECK:STDOUT: %pair.param_patt.loc7_30.1: @F.%pattern_type.loc7_30 (%pattern_type.eee) = value_param_pattern [symbolic = %pair.param_patt.loc7_30.2 (constants.%pair.param_patt.185)] -// CHECK:STDOUT: %pair.patt.loc7_30.1: @F.%pattern_type.loc7_30 (%pattern_type.eee) = at_binding_pattern pair, %pair.param_patt.loc7_30.1 [symbolic = %pair.patt.loc7_30.2 (constants.%pair.patt.940)] -// CHECK:STDOUT: %return.param_patt.loc7_43.1: @F.%pattern_type.loc7_43 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc7_43.2 (constants.%return.param_patt.6dd)] -// CHECK:STDOUT: %return.patt.loc7_40.1: @F.%pattern_type.loc7_43 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc7_43.1, %U.ref.loc7_43 [symbolic = %return.patt.loc7_40.2 (constants.%return.patt.4dd)] +// CHECK:STDOUT: %U.patt.loc7_16.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_16.2 (constants.%U.patt)] +// CHECK:STDOUT: %pair.param_patt.loc7_28.1: @F.%pattern_type.loc7_28 (%pattern_type.eee) = value_param_pattern [symbolic = %pair.param_patt.loc7_28.2 (constants.%pair.param_patt.185)] +// CHECK:STDOUT: %pair.patt.loc7_28.1: @F.%pattern_type.loc7_28 (%pattern_type.eee) = at_binding_pattern pair, %pair.param_patt.loc7_28.1 [symbolic = %pair.patt.loc7_28.2 (constants.%pair.patt.940)] +// CHECK:STDOUT: %return.param_patt.loc7_41.1: @F.%pattern_type.loc7_41 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc7_41.2 (constants.%return.param_patt.6dd)] +// CHECK:STDOUT: %return.patt.loc7_38.1: @F.%pattern_type.loc7_41 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc7_41.1, %U.ref.loc7_41 [symbolic = %return.patt.loc7_38.2 (constants.%return.patt.4dd)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref.loc7_43: type = name_ref U, %U.loc7_17.2 [symbolic = %U.loc7_17.1 (constants.%U)] -// CHECK:STDOUT: %.loc7_43.3: Core.Form = init_form %U.ref.loc7_43 [symbolic = %.loc7_43.2 (constants.%.822)] -// CHECK:STDOUT: %.loc7_10.1: type = splice_block %.loc7_10.2 [concrete = type] { +// CHECK:STDOUT: %U.ref.loc7_41: type = name_ref U, %U.loc7_16.2 [symbolic = %U.loc7_16.1 (constants.%U)] +// CHECK:STDOUT: %.loc7_41.3: Core.Form = init_form %U.ref.loc7_41 [symbolic = %.loc7_41.2 (constants.%.822)] +// CHECK:STDOUT: %.loc7_9.1: type = splice_block %.loc7_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc7_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc7_20.1: type = splice_block %.loc7_20.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc7_17: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_18.1: type = splice_block %.loc7_18.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc7_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc7_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc7_17.2: type = symbolic_binding U, 1 [symbolic = %U.loc7_17.1 (constants.%U)] +// CHECK:STDOUT: %U.loc7_16.2: type = symbolic_binding U, 1 [symbolic = %U.loc7_16.1 (constants.%U)] // CHECK:STDOUT: %pair.param: @F.%tuple.type (%tuple.type.a5e) = value_param call_param0 -// CHECK:STDOUT: %.loc7_37.1: type = splice_block %.loc7_37.3 [symbolic = %tuple.type (constants.%tuple.type.a5e)] { +// CHECK:STDOUT: %.loc7_35.1: type = splice_block %.loc7_35.3 [symbolic = %tuple.type (constants.%tuple.type.a5e)] { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %U.ref.loc7_36: type = name_ref U, %U.loc7_17.2 [symbolic = %U.loc7_17.1 (constants.%U)] -// CHECK:STDOUT: %.loc7_37.2: %tuple.type.24b = tuple_literal (%T.ref, %U.ref.loc7_36) [symbolic = %tuple (constants.%tuple.4b9)] -// CHECK:STDOUT: %.loc7_37.3: type = converted %.loc7_37.2, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %U.ref.loc7_34: type = name_ref U, %U.loc7_16.2 [symbolic = %U.loc7_16.1 (constants.%U)] +// CHECK:STDOUT: %.loc7_35.2: %tuple.type.24b = tuple_literal (%T.ref, %U.ref.loc7_34) [symbolic = %tuple (constants.%tuple.4b9)] +// CHECK:STDOUT: %.loc7_35.3: type = converted %.loc7_35.2, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)] // CHECK:STDOUT: } // CHECK:STDOUT: %pair: @F.%tuple.type (%tuple.type.a5e) = wrapper_binding pair, %pair.param -// CHECK:STDOUT: %return.param: ref @F.%U.loc7_17.1 (%U) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.%U.loc7_17.1 (%U) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.%U.loc7_16.1 (%U) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.%U.loc7_16.1 (%U) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %pair.param_patt: %pattern_type.c66 = value_param_pattern [concrete = constants.%pair.param_patt.f67] @@ -186,32 +186,32 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: type, %U.loc7_17.2: type) { +// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: type, %U.loc7_16.2: type) { // CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc7_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc7_17.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_17.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc7_17.1: type = symbolic_binding U, 1 [symbolic = %U.loc7_17.1 (constants.%U)] -// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T.loc7_7.1, %U.loc7_17.1) [symbolic = %tuple (constants.%tuple.4b9)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%T.loc7_7.1, %U.loc7_17.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] -// CHECK:STDOUT: %pattern_type.loc7_30: type = pattern_type %tuple.type [symbolic = %pattern_type.loc7_30 (constants.%pattern_type.eee)] -// CHECK:STDOUT: %pair.param_patt.loc7_30.2: @F.%pattern_type.loc7_30 (%pattern_type.eee) = value_param_pattern [symbolic = %pair.param_patt.loc7_30.2 (constants.%pair.param_patt.185)] -// CHECK:STDOUT: %pair.patt.loc7_30.2: @F.%pattern_type.loc7_30 (%pattern_type.eee) = at_binding_pattern pair, %pair.param_patt.loc7_30.2 [symbolic = %pair.patt.loc7_30.2 (constants.%pair.patt.940)] -// CHECK:STDOUT: %.loc7_43.2: Core.Form = init_form %U.loc7_17.1 [symbolic = %.loc7_43.2 (constants.%.822)] -// CHECK:STDOUT: %pattern_type.loc7_43: type = pattern_type %U.loc7_17.1 [symbolic = %pattern_type.loc7_43 (constants.%pattern_type.946)] -// CHECK:STDOUT: %return.param_patt.loc7_43.2: @F.%pattern_type.loc7_43 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc7_43.2 (constants.%return.param_patt.6dd)] -// CHECK:STDOUT: %return.patt.loc7_40.2: @F.%pattern_type.loc7_43 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc7_43.2, %U.loc7_17.1 [symbolic = %return.patt.loc7_40.2 (constants.%return.patt.4dd)] +// CHECK:STDOUT: %U.patt.loc7_16.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_16.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc7_16.1: type = symbolic_binding U, 1 [symbolic = %U.loc7_16.1 (constants.%U)] +// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T.loc7_7.1, %U.loc7_16.1) [symbolic = %tuple (constants.%tuple.4b9)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%T.loc7_7.1, %U.loc7_16.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %pattern_type.loc7_28: type = pattern_type %tuple.type [symbolic = %pattern_type.loc7_28 (constants.%pattern_type.eee)] +// CHECK:STDOUT: %pair.param_patt.loc7_28.2: @F.%pattern_type.loc7_28 (%pattern_type.eee) = value_param_pattern [symbolic = %pair.param_patt.loc7_28.2 (constants.%pair.param_patt.185)] +// CHECK:STDOUT: %pair.patt.loc7_28.2: @F.%pattern_type.loc7_28 (%pattern_type.eee) = at_binding_pattern pair, %pair.param_patt.loc7_28.2 [symbolic = %pair.patt.loc7_28.2 (constants.%pair.patt.940)] +// CHECK:STDOUT: %.loc7_41.2: Core.Form = init_form %U.loc7_16.1 [symbolic = %.loc7_41.2 (constants.%.822)] +// CHECK:STDOUT: %pattern_type.loc7_41: type = pattern_type %U.loc7_16.1 [symbolic = %pattern_type.loc7_41 (constants.%pattern_type.946)] +// CHECK:STDOUT: %return.param_patt.loc7_41.2: @F.%pattern_type.loc7_41 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc7_41.2 (constants.%return.param_patt.6dd)] +// CHECK:STDOUT: %return.patt.loc7_38.2: @F.%pattern_type.loc7_41 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc7_41.2, %U.loc7_16.1 [symbolic = %return.patt.loc7_38.2 (constants.%return.patt.4dd)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %F.specific_fn.loc7_54.2: = specific_function constants.%F, @F(%T.loc7_7.1, %U.loc7_17.1) [symbolic = %F.specific_fn.loc7_54.2 (constants.%F.specific_fn.19a)] +// CHECK:STDOUT: %F.specific_fn.loc7_52.2: = specific_function constants.%F, @F(%T.loc7_7.1, %U.loc7_16.1) [symbolic = %F.specific_fn.loc7_52.2 (constants.%F.specific_fn.19a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%pair.param: @F.%tuple.type (%tuple.type.a5e)) -> out %return.param: @F.%U.loc7_17.1 (%U) { +// CHECK:STDOUT: fn(%pair.param: @F.%tuple.type (%tuple.type.a5e)) -> out %return.param: @F.%U.loc7_16.1 (%U) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %pair.ref: @F.%tuple.type (%tuple.type.a5e) = name_ref pair, %pair -// CHECK:STDOUT: %F.specific_fn.loc7_54.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %F.specific_fn.loc7_54.2 (constants.%F.specific_fn.19a)] -// CHECK:STDOUT: %.loc7_43.1: ref @F.%U.loc7_17.1 (%U) = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init @F.%U.loc7_17.1 (%U) to %.loc7_43.1 = call %F.specific_fn.loc7_54.1(%pair.ref) +// CHECK:STDOUT: %F.specific_fn.loc7_52.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %F.specific_fn.loc7_52.2 (constants.%F.specific_fn.19a)] +// CHECK:STDOUT: %.loc7_41.1: ref @F.%U.loc7_16.1 (%U) = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init @F.%U.loc7_16.1 (%U) to %.loc7_41.1 = call %F.specific_fn.loc7_52.1(%pair.ref) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -233,41 +233,41 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: specific @F(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_7.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc7_17.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc7_17.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc7_16.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc7_16.1 => constants.%U // CHECK:STDOUT: %tuple => constants.%tuple.4b9 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a5e -// CHECK:STDOUT: %pattern_type.loc7_30 => constants.%pattern_type.eee -// CHECK:STDOUT: %pair.param_patt.loc7_30.2 => constants.%pair.param_patt.185 -// CHECK:STDOUT: %pair.patt.loc7_30.2 => constants.%pair.patt.940 -// CHECK:STDOUT: %.loc7_43.2 => constants.%.822 -// CHECK:STDOUT: %pattern_type.loc7_43 => constants.%pattern_type.946 -// CHECK:STDOUT: %return.param_patt.loc7_43.2 => constants.%return.param_patt.6dd -// CHECK:STDOUT: %return.patt.loc7_40.2 => constants.%return.patt.4dd +// CHECK:STDOUT: %pattern_type.loc7_28 => constants.%pattern_type.eee +// CHECK:STDOUT: %pair.param_patt.loc7_28.2 => constants.%pair.param_patt.185 +// CHECK:STDOUT: %pair.patt.loc7_28.2 => constants.%pair.patt.940 +// CHECK:STDOUT: %.loc7_41.2 => constants.%.822 +// CHECK:STDOUT: %pattern_type.loc7_41 => constants.%pattern_type.946 +// CHECK:STDOUT: %return.param_patt.loc7_41.2 => constants.%return.param_patt.6dd +// CHECK:STDOUT: %return.patt.loc7_38.2 => constants.%return.patt.4dd // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete -// CHECK:STDOUT: %F.specific_fn.loc7_54.2 => constants.%F.specific_fn.19a +// CHECK:STDOUT: %F.specific_fn.loc7_52.2 => constants.%F.specific_fn.19a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C, constants.%D) { // CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_7.1 => constants.%C -// CHECK:STDOUT: %U.patt.loc7_17.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc7_17.1 => constants.%D +// CHECK:STDOUT: %U.patt.loc7_16.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc7_16.1 => constants.%D // CHECK:STDOUT: %tuple => constants.%tuple.b04 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.af1 -// CHECK:STDOUT: %pattern_type.loc7_30 => constants.%pattern_type.c66 -// CHECK:STDOUT: %pair.param_patt.loc7_30.2 => constants.%pair.param_patt.f67 -// CHECK:STDOUT: %pair.patt.loc7_30.2 => constants.%pair.patt.a61 -// CHECK:STDOUT: %.loc7_43.2 => constants.%.592 -// CHECK:STDOUT: %pattern_type.loc7_43 => constants.%pattern_type.d8d -// CHECK:STDOUT: %return.param_patt.loc7_43.2 => constants.%return.param_patt.eae -// CHECK:STDOUT: %return.patt.loc7_40.2 => constants.%return.patt.e38 +// CHECK:STDOUT: %pattern_type.loc7_28 => constants.%pattern_type.c66 +// CHECK:STDOUT: %pair.param_patt.loc7_28.2 => constants.%pair.param_patt.f67 +// CHECK:STDOUT: %pair.patt.loc7_28.2 => constants.%pair.patt.a61 +// CHECK:STDOUT: %.loc7_41.2 => constants.%.592 +// CHECK:STDOUT: %pattern_type.loc7_41 => constants.%pattern_type.d8d +// CHECK:STDOUT: %return.param_patt.loc7_41.2 => constants.%return.param_patt.eae +// CHECK:STDOUT: %return.patt.loc7_38.2 => constants.%return.patt.e38 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.6db -// CHECK:STDOUT: %F.specific_fn.loc7_54.2 => constants.%F.specific_fn.fca +// CHECK:STDOUT: %F.specific_fn.loc7_52.2 => constants.%F.specific_fn.fca // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- tuple_value.carbon @@ -383,46 +383,46 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %HasPair.decl: %HasPair.type = class_decl @HasPair [concrete = constants.%HasPair.generic] { // CHECK:STDOUT: %Pair.patt.loc4_19.1: %pattern_type.394 = symbolic_binding_pattern Pair, 0 [symbolic = %Pair.patt.loc4_19.2 (constants.%Pair.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_31.1: type = splice_block %.loc4_31.3 [concrete = constants.%tuple.type.e55] { +// CHECK:STDOUT: %.loc4_30.1: type = splice_block %.loc4_30.3 [concrete = constants.%tuple.type.e55] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %i32.loc4_23: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %i32.loc4_28: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc4_31.2: %tuple.type.24b = tuple_literal (%i32.loc4_23, %i32.loc4_28) [concrete = constants.%tuple.b59] -// CHECK:STDOUT: %.loc4_31.3: type = converted %.loc4_31.2, constants.%tuple.type.e55 [concrete = constants.%tuple.type.e55] +// CHECK:STDOUT: %i32.loc4_22: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc4_30.2: %tuple.type.24b = tuple_literal (%i32.loc4_22, %i32.loc4_27) [concrete = constants.%tuple.b59] +// CHECK:STDOUT: %.loc4_30.3: type = converted %.loc4_30.2, constants.%tuple.type.e55 [concrete = constants.%tuple.type.e55] // CHECK:STDOUT: } // CHECK:STDOUT: %Pair.loc4_19.2: %tuple.type.e55 = symbolic_binding Pair, 0 [symbolic = %Pair.loc4_19.1 (constants.%Pair)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %A.patt.loc6_7.1: %pattern_type.6b6 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc6_7.2 (constants.%A.patt)] -// CHECK:STDOUT: %B.patt.loc6_16.1: %pattern_type.6b6 = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc6_16.2 (constants.%B.patt)] -// CHECK:STDOUT: %h.param_patt.loc6_32.1: @F.%pattern_type (%pattern_type.725) = value_param_pattern [symbolic = %h.param_patt.loc6_32.2 (constants.%h.param_patt.cdf)] -// CHECK:STDOUT: %h.patt.loc6_32.1: @F.%pattern_type (%pattern_type.725) = at_binding_pattern h, %h.param_patt.loc6_32.1 [symbolic = %h.patt.loc6_32.2 (constants.%h.patt.596)] +// CHECK:STDOUT: %B.patt.loc6_15.1: %pattern_type.6b6 = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc6_15.2 (constants.%B.patt)] +// CHECK:STDOUT: %h.param_patt.loc6_30.1: @F.%pattern_type (%pattern_type.725) = value_param_pattern [symbolic = %h.param_patt.loc6_30.2 (constants.%h.param_patt.cdf)] +// CHECK:STDOUT: %h.patt.loc6_30.1: @F.%pattern_type (%pattern_type.725) = at_binding_pattern h, %h.param_patt.loc6_30.1 [symbolic = %h.patt.loc6_30.2 (constants.%h.patt.596)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] -// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc6_54 [concrete = constants.%return.patt.e1b] +// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc6_52 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { -// CHECK:STDOUT: %i32.loc6_54: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc6_54: Core.Form = init_form %i32.loc6_54 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc6_10: type = splice_block %i32.loc6_10 [concrete = constants.%i32] { +// CHECK:STDOUT: %i32.loc6_52: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc6_52: Core.Form = init_form %i32.loc6_52 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc6_9: type = splice_block %i32.loc6_9 [concrete = constants.%i32] { // CHECK:STDOUT: %.Self.frozen.loc6_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %i32.loc6_10: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %i32.loc6_9: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: %A.loc6_7.2: %i32 = symbolic_binding A, 0 [symbolic = %A.loc6_7.1 (constants.%A)] -// CHECK:STDOUT: %.loc6_19: type = splice_block %i32.loc6_19 [concrete = constants.%i32] { -// CHECK:STDOUT: %.Self.frozen.loc6_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %i32.loc6_19: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc6_17: type = splice_block %i32.loc6_17 [concrete = constants.%i32] { +// CHECK:STDOUT: %.Self.frozen.loc6_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %i32.loc6_17: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %B.loc6_16.2: %i32 = symbolic_binding B, 1 [symbolic = %B.loc6_16.1 (constants.%B)] -// CHECK:STDOUT: %h.param: @F.%HasPair.loc6_48.1 (%HasPair.72f) = value_param call_param0 -// CHECK:STDOUT: %.loc6_48.1: type = splice_block %HasPair.loc6_48.2 [symbolic = %HasPair.loc6_48.1 (constants.%HasPair.72f)] { +// CHECK:STDOUT: %B.loc6_15.2: %i32 = symbolic_binding B, 1 [symbolic = %B.loc6_15.1 (constants.%B)] +// CHECK:STDOUT: %h.param: @F.%HasPair.loc6_46.1 (%HasPair.72f) = value_param call_param0 +// CHECK:STDOUT: %.loc6_46.1: type = splice_block %HasPair.loc6_46.2 [symbolic = %HasPair.loc6_46.1 (constants.%HasPair.72f)] { // CHECK:STDOUT: %HasPair.ref: %HasPair.type = name_ref HasPair, file.%HasPair.decl [concrete = constants.%HasPair.generic] // CHECK:STDOUT: %A.ref: %i32 = name_ref A, %A.loc6_7.2 [symbolic = %A.loc6_7.1 (constants.%A)] -// CHECK:STDOUT: %B.ref.loc6_46: %i32 = name_ref B, %B.loc6_16.2 [symbolic = %B.loc6_16.1 (constants.%B)] -// CHECK:STDOUT: %.loc6_47: %tuple.type.e55 = tuple_literal (%A.ref, %B.ref.loc6_46) [symbolic = %tuple.loc6_47.1 (constants.%tuple.509)] -// CHECK:STDOUT: %tuple.loc6_47.2: %tuple.type.e55 = tuple_value (%A.ref, %B.ref.loc6_46) [symbolic = %tuple.loc6_47.1 (constants.%tuple.509)] -// CHECK:STDOUT: %.loc6_48.2: %tuple.type.e55 = converted %.loc6_47, %tuple.loc6_47.2 [symbolic = %tuple.loc6_47.1 (constants.%tuple.509)] -// CHECK:STDOUT: %HasPair.loc6_48.2: type = class_type @HasPair, @HasPair(constants.%tuple.509) [symbolic = %HasPair.loc6_48.1 (constants.%HasPair.72f)] +// CHECK:STDOUT: %B.ref.loc6_44: %i32 = name_ref B, %B.loc6_15.2 [symbolic = %B.loc6_15.1 (constants.%B)] +// CHECK:STDOUT: %.loc6_45: %tuple.type.e55 = tuple_literal (%A.ref, %B.ref.loc6_44) [symbolic = %tuple.loc6_45.1 (constants.%tuple.509)] +// CHECK:STDOUT: %tuple.loc6_45.2: %tuple.type.e55 = tuple_value (%A.ref, %B.ref.loc6_44) [symbolic = %tuple.loc6_45.1 (constants.%tuple.509)] +// CHECK:STDOUT: %.loc6_46.2: %tuple.type.e55 = converted %.loc6_45, %tuple.loc6_45.2 [symbolic = %tuple.loc6_45.1 (constants.%tuple.509)] +// CHECK:STDOUT: %HasPair.loc6_46.2: type = class_type @HasPair, @HasPair(constants.%tuple.509) [symbolic = %HasPair.loc6_46.1 (constants.%HasPair.72f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %h: @F.%HasPair.loc6_48.1 (%HasPair.72f) = wrapper_binding h, %h.param +// CHECK:STDOUT: %h: @F.%HasPair.loc6_46.1 (%HasPair.72f) = wrapper_binding h, %h.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -479,30 +479,30 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%A.loc6_7.2: %i32, %B.loc6_16.2: %i32) { +// CHECK:STDOUT: generic fn @F(%A.loc6_7.2: %i32, %B.loc6_15.2: %i32) { // CHECK:STDOUT: %A.patt.loc6_7.2: %pattern_type.6b6 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc6_7.2 (constants.%A.patt)] // CHECK:STDOUT: %A.loc6_7.1: %i32 = symbolic_binding A, 0 [symbolic = %A.loc6_7.1 (constants.%A)] -// CHECK:STDOUT: %B.patt.loc6_16.2: %pattern_type.6b6 = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc6_16.2 (constants.%B.patt)] -// CHECK:STDOUT: %B.loc6_16.1: %i32 = symbolic_binding B, 1 [symbolic = %B.loc6_16.1 (constants.%B)] -// CHECK:STDOUT: %tuple.loc6_47.1: %tuple.type.e55 = tuple_value (%A.loc6_7.1, %B.loc6_16.1) [symbolic = %tuple.loc6_47.1 (constants.%tuple.509)] -// CHECK:STDOUT: %HasPair.loc6_48.1: type = class_type @HasPair, @HasPair(%tuple.loc6_47.1) [symbolic = %HasPair.loc6_48.1 (constants.%HasPair.72f)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %HasPair.loc6_48.1 [symbolic = %pattern_type (constants.%pattern_type.725)] -// CHECK:STDOUT: %h.param_patt.loc6_32.2: @F.%pattern_type (%pattern_type.725) = value_param_pattern [symbolic = %h.param_patt.loc6_32.2 (constants.%h.param_patt.cdf)] -// CHECK:STDOUT: %h.patt.loc6_32.2: @F.%pattern_type (%pattern_type.725) = at_binding_pattern h, %h.param_patt.loc6_32.2 [symbolic = %h.patt.loc6_32.2 (constants.%h.patt.596)] +// CHECK:STDOUT: %B.patt.loc6_15.2: %pattern_type.6b6 = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc6_15.2 (constants.%B.patt)] +// CHECK:STDOUT: %B.loc6_15.1: %i32 = symbolic_binding B, 1 [symbolic = %B.loc6_15.1 (constants.%B)] +// CHECK:STDOUT: %tuple.loc6_45.1: %tuple.type.e55 = tuple_value (%A.loc6_7.1, %B.loc6_15.1) [symbolic = %tuple.loc6_45.1 (constants.%tuple.509)] +// CHECK:STDOUT: %HasPair.loc6_46.1: type = class_type @HasPair, @HasPair(%tuple.loc6_45.1) [symbolic = %HasPair.loc6_46.1 (constants.%HasPair.72f)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %HasPair.loc6_46.1 [symbolic = %pattern_type (constants.%pattern_type.725)] +// CHECK:STDOUT: %h.param_patt.loc6_30.2: @F.%pattern_type (%pattern_type.725) = value_param_pattern [symbolic = %h.param_patt.loc6_30.2 (constants.%h.param_patt.cdf)] +// CHECK:STDOUT: %h.patt.loc6_30.2: @F.%pattern_type (%pattern_type.725) = at_binding_pattern h, %h.param_patt.loc6_30.2 [symbolic = %h.patt.loc6_30.2 (constants.%h.patt.596)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %HasPair.loc6_48.1 [symbolic = %require_complete (constants.%require_complete.39d)] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %B.loc6_16.1, constants.%Int.as.Copy.impl.Op.4f6 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound.273)] -// CHECK:STDOUT: %bound_method.loc6_67.3: = bound_method %B.loc6_16.1, constants.%Int.as.Copy.impl.Op.specific_fn [symbolic = %bound_method.loc6_67.3 (constants.%bound_method.523)] +// CHECK:STDOUT: %require_complete: = require_complete_type %HasPair.loc6_46.1 [symbolic = %require_complete (constants.%require_complete.39d)] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %B.loc6_15.1, constants.%Int.as.Copy.impl.Op.4f6 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound.273)] +// CHECK:STDOUT: %bound_method.loc6_65.3: = bound_method %B.loc6_15.1, constants.%Int.as.Copy.impl.Op.specific_fn [symbolic = %bound_method.loc6_65.3 (constants.%bound_method.523)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%h.param: @F.%HasPair.loc6_48.1 (%HasPair.72f)) -> out %return.param: %i32 { +// CHECK:STDOUT: fn(%h.param: @F.%HasPair.loc6_46.1 (%HasPair.72f)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %B.ref.loc6_67: %i32 = name_ref B, %B.loc6_16.2 [symbolic = %B.loc6_16.1 (constants.%B)] +// CHECK:STDOUT: %B.ref.loc6_65: %i32 = name_ref B, %B.loc6_15.2 [symbolic = %B.loc6_15.1 (constants.%B)] // CHECK:STDOUT: %impl.elem0: %.7a6 = impl_witness_access constants.%Copy.impl_witness.0e0, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6] -// CHECK:STDOUT: %bound_method.loc6_67.1: = bound_method %B.ref.loc6_67, %impl.elem0 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound.273)] +// CHECK:STDOUT: %bound_method.loc6_65.1: = bound_method %B.ref.loc6_65, %impl.elem0 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound.273)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc6_67.2: = bound_method %B.ref.loc6_67, %specific_fn [symbolic = %bound_method.loc6_67.3 (constants.%bound_method.523)] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc6_67.2(%B.ref.loc6_67) [symbolic = %B.loc6_16.1 (constants.%B)] +// CHECK:STDOUT: %bound_method.loc6_65.2: = bound_method %B.ref.loc6_65, %specific_fn [symbolic = %bound_method.loc6_65.3 (constants.%bound_method.523)] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc6_65.2(%B.ref.loc6_65) [symbolic = %B.loc6_15.1 (constants.%B)] // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -535,13 +535,13 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: specific @F(constants.%A, constants.%B) { // CHECK:STDOUT: %A.patt.loc6_7.2 => constants.%A.patt // CHECK:STDOUT: %A.loc6_7.1 => constants.%A -// CHECK:STDOUT: %B.patt.loc6_16.2 => constants.%B.patt -// CHECK:STDOUT: %B.loc6_16.1 => constants.%B -// CHECK:STDOUT: %tuple.loc6_47.1 => constants.%tuple.509 -// CHECK:STDOUT: %HasPair.loc6_48.1 => constants.%HasPair.72f +// CHECK:STDOUT: %B.patt.loc6_15.2 => constants.%B.patt +// CHECK:STDOUT: %B.loc6_15.1 => constants.%B +// CHECK:STDOUT: %tuple.loc6_45.1 => constants.%tuple.509 +// CHECK:STDOUT: %HasPair.loc6_46.1 => constants.%HasPair.72f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.725 -// CHECK:STDOUT: %h.param_patt.loc6_32.2 => constants.%h.param_patt.cdf -// CHECK:STDOUT: %h.patt.loc6_32.2 => constants.%h.patt.596 +// CHECK:STDOUT: %h.param_patt.loc6_30.2 => constants.%h.param_patt.cdf +// CHECK:STDOUT: %h.patt.loc6_30.2 => constants.%h.patt.596 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HasPair(constants.%tuple.102) { @@ -554,18 +554,18 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: specific @F(constants.%int_1.0c6, constants.%int_2.295) { // CHECK:STDOUT: %A.patt.loc6_7.2 => constants.%A.patt // CHECK:STDOUT: %A.loc6_7.1 => constants.%int_1.0c6 -// CHECK:STDOUT: %B.patt.loc6_16.2 => constants.%B.patt -// CHECK:STDOUT: %B.loc6_16.1 => constants.%int_2.295 -// CHECK:STDOUT: %tuple.loc6_47.1 => constants.%tuple.102 -// CHECK:STDOUT: %HasPair.loc6_48.1 => constants.%HasPair.69b +// CHECK:STDOUT: %B.patt.loc6_15.2 => constants.%B.patt +// CHECK:STDOUT: %B.loc6_15.1 => constants.%int_2.295 +// CHECK:STDOUT: %tuple.loc6_45.1 => constants.%tuple.102 +// CHECK:STDOUT: %HasPair.loc6_46.1 => constants.%HasPair.69b // CHECK:STDOUT: %pattern_type => constants.%pattern_type.adf -// CHECK:STDOUT: %h.param_patt.loc6_32.2 => constants.%h.param_patt.7d9 -// CHECK:STDOUT: %h.patt.loc6_32.2 => constants.%h.patt.25e585.2 +// CHECK:STDOUT: %h.param_patt.loc6_30.2 => constants.%h.param_patt.7d9 +// CHECK:STDOUT: %h.patt.loc6_30.2 => constants.%h.patt.25e585.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.357 // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound => constants.%Int.as.Copy.impl.Op.bound.245 -// CHECK:STDOUT: %bound_method.loc6_67.3 => constants.%bound_method.03a +// CHECK:STDOUT: %bound_method.loc6_65.3 => constants.%bound_method.03a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_inconsistent.carbon @@ -625,24 +625,24 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc7_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %pair.param_patt.loc7_20.1: @F.%pattern_type.loc7_20 (%pattern_type.c3f) = value_param_pattern [symbolic = %pair.param_patt.loc7_20.2 (constants.%pair.param_patt.5a3)] -// CHECK:STDOUT: %pair.patt.loc7_20.1: @F.%pattern_type.loc7_20 (%pattern_type.c3f) = at_binding_pattern pair, %pair.param_patt.loc7_20.1 [symbolic = %pair.patt.loc7_20.2 (constants.%pair.patt.f0f)] -// CHECK:STDOUT: %return.param_patt.loc7_33.1: @F.%pattern_type.loc7_33 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc7_33.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc7_30.1: @F.%pattern_type.loc7_33 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc7_33.1, %T.ref.loc7_33 [symbolic = %return.patt.loc7_30.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %pair.param_patt.loc7_19.1: @F.%pattern_type.loc7_19 (%pattern_type.c3f) = value_param_pattern [symbolic = %pair.param_patt.loc7_19.2 (constants.%pair.param_patt.5a3)] +// CHECK:STDOUT: %pair.patt.loc7_19.1: @F.%pattern_type.loc7_19 (%pattern_type.c3f) = at_binding_pattern pair, %pair.param_patt.loc7_19.1 [symbolic = %pair.patt.loc7_19.2 (constants.%pair.patt.f0f)] +// CHECK:STDOUT: %return.param_patt.loc7_32.1: @F.%pattern_type.loc7_32 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc7_32.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc7_29.1: @F.%pattern_type.loc7_32 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc7_32.1, %T.ref.loc7_32 [symbolic = %return.patt.loc7_29.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc7_33: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc7_33.2: Core.Form = init_form %T.ref.loc7_33 [symbolic = %.loc7_33.1 (constants.%.184)] -// CHECK:STDOUT: %.loc7_10.1: type = splice_block %.loc7_10.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc7_32: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] +// CHECK:STDOUT: %.loc7_32.2: Core.Form = init_form %T.ref.loc7_32 [symbolic = %.loc7_32.1 (constants.%.184)] +// CHECK:STDOUT: %.loc7_9.1: type = splice_block %.loc7_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] // CHECK:STDOUT: %pair.param: @F.%tuple.type (%tuple.type.07a) = value_param call_param0 -// CHECK:STDOUT: %.loc7_27.1: type = splice_block %.loc7_27.3 [symbolic = %tuple.type (constants.%tuple.type.07a)] { -// CHECK:STDOUT: %T.ref.loc7_23: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %T.ref.loc7_26: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc7_27.2: %tuple.type.24b = tuple_literal (%T.ref.loc7_23, %T.ref.loc7_26) [symbolic = %tuple (constants.%tuple.11e)] -// CHECK:STDOUT: %.loc7_27.3: type = converted %.loc7_27.2, constants.%tuple.type.07a [symbolic = %tuple.type (constants.%tuple.type.07a)] +// CHECK:STDOUT: %.loc7_26.1: type = splice_block %.loc7_26.3 [symbolic = %tuple.type (constants.%tuple.type.07a)] { +// CHECK:STDOUT: %T.ref.loc7_22: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc7_25: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] +// CHECK:STDOUT: %.loc7_26.2: %tuple.type.24b = tuple_literal (%T.ref.loc7_22, %T.ref.loc7_25) [symbolic = %tuple (constants.%tuple.11e)] +// CHECK:STDOUT: %.loc7_26.3: type = converted %.loc7_26.2, constants.%tuple.type.07a [symbolic = %tuple.type (constants.%tuple.type.07a)] // CHECK:STDOUT: } // CHECK:STDOUT: %pair: @F.%tuple.type (%tuple.type.07a) = wrapper_binding pair, %pair.param // CHECK:STDOUT: %return.param: ref @F.%T.loc7_7.1 (%T) = out_param call_param1 @@ -690,13 +690,13 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %T.loc7_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] // CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T.loc7_7.1, %T.loc7_7.1) [symbolic = %tuple (constants.%tuple.11e)] // CHECK:STDOUT: %tuple.type: type = tuple_type (%T.loc7_7.1, %T.loc7_7.1) [symbolic = %tuple.type (constants.%tuple.type.07a)] -// CHECK:STDOUT: %pattern_type.loc7_20: type = pattern_type %tuple.type [symbolic = %pattern_type.loc7_20 (constants.%pattern_type.c3f)] -// CHECK:STDOUT: %pair.param_patt.loc7_20.2: @F.%pattern_type.loc7_20 (%pattern_type.c3f) = value_param_pattern [symbolic = %pair.param_patt.loc7_20.2 (constants.%pair.param_patt.5a3)] -// CHECK:STDOUT: %pair.patt.loc7_20.2: @F.%pattern_type.loc7_20 (%pattern_type.c3f) = at_binding_pattern pair, %pair.param_patt.loc7_20.2 [symbolic = %pair.patt.loc7_20.2 (constants.%pair.patt.f0f)] -// CHECK:STDOUT: %.loc7_33.1: Core.Form = init_form %T.loc7_7.1 [symbolic = %.loc7_33.1 (constants.%.184)] -// CHECK:STDOUT: %pattern_type.loc7_33: type = pattern_type %T.loc7_7.1 [symbolic = %pattern_type.loc7_33 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %return.param_patt.loc7_33.2: @F.%pattern_type.loc7_33 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc7_33.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc7_30.2: @F.%pattern_type.loc7_33 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc7_33.2, %T.loc7_7.1 [symbolic = %return.patt.loc7_30.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %pattern_type.loc7_19: type = pattern_type %tuple.type [symbolic = %pattern_type.loc7_19 (constants.%pattern_type.c3f)] +// CHECK:STDOUT: %pair.param_patt.loc7_19.2: @F.%pattern_type.loc7_19 (%pattern_type.c3f) = value_param_pattern [symbolic = %pair.param_patt.loc7_19.2 (constants.%pair.param_patt.5a3)] +// CHECK:STDOUT: %pair.patt.loc7_19.2: @F.%pattern_type.loc7_19 (%pattern_type.c3f) = at_binding_pattern pair, %pair.param_patt.loc7_19.2 [symbolic = %pair.patt.loc7_19.2 (constants.%pair.patt.f0f)] +// CHECK:STDOUT: %.loc7_32.1: Core.Form = init_form %T.loc7_7.1 [symbolic = %.loc7_32.1 (constants.%.184)] +// CHECK:STDOUT: %pattern_type.loc7_32: type = pattern_type %T.loc7_7.1 [symbolic = %pattern_type.loc7_32 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %return.param_patt.loc7_32.2: @F.%pattern_type.loc7_32 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc7_32.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc7_29.2: @F.%pattern_type.loc7_32 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc7_32.2, %T.loc7_7.1 [symbolic = %return.patt.loc7_29.2 (constants.%return.patt.b39)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%pair.param: @F.%tuple.type (%tuple.type.07a)) -> out %return.param: @F.%T.loc7_7.1 (%T); // CHECK:STDOUT: } @@ -715,12 +715,12 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %T.loc7_7.1 => constants.%T // CHECK:STDOUT: %tuple => constants.%tuple.11e // CHECK:STDOUT: %tuple.type => constants.%tuple.type.07a -// CHECK:STDOUT: %pattern_type.loc7_20 => constants.%pattern_type.c3f -// CHECK:STDOUT: %pair.param_patt.loc7_20.2 => constants.%pair.param_patt.5a3 -// CHECK:STDOUT: %pair.patt.loc7_20.2 => constants.%pair.patt.f0f -// CHECK:STDOUT: %.loc7_33.1 => constants.%.184 -// CHECK:STDOUT: %pattern_type.loc7_33 => constants.%pattern_type.51d -// CHECK:STDOUT: %return.param_patt.loc7_33.2 => constants.%return.param_patt.41d -// CHECK:STDOUT: %return.patt.loc7_30.2 => constants.%return.patt.b39 +// CHECK:STDOUT: %pattern_type.loc7_19 => constants.%pattern_type.c3f +// CHECK:STDOUT: %pair.param_patt.loc7_19.2 => constants.%pair.param_patt.5a3 +// CHECK:STDOUT: %pair.patt.loc7_19.2 => constants.%pair.patt.f0f +// CHECK:STDOUT: %.loc7_32.1 => constants.%.184 +// CHECK:STDOUT: %pattern_type.loc7_32 => constants.%pattern_type.51d +// CHECK:STDOUT: %return.param_patt.loc7_32.2 => constants.%return.param_patt.41d +// CHECK:STDOUT: %return.patt.loc7_29.2 => constants.%return.patt.b39 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/type_operator.carbon b/toolchain/check/testdata/deduce/type_operator.carbon index 3fef2c3ff2c9..3154a6d39d61 100644 --- a/toolchain/check/testdata/deduce/type_operator.carbon +++ b/toolchain/check/testdata/deduce/type_operator.carbon @@ -18,7 +18,7 @@ library "[[@TEST_NAME]]"; class C {} -fn F[T:! type](p: T*) -> T { return F(p); } +fn F[T: type](p: T*) -> T { return F(p); } fn G(p: C*) -> C { return F(p); @@ -30,7 +30,7 @@ library "[[@TEST_NAME]]"; class C {} -fn F[T:! type](p: const T*) -> T { return F(p); } +fn F[T: type](p: const T*) -> T { return F(p); } fn G(p: const C*) -> C { return F(p); @@ -42,7 +42,7 @@ library "[[@TEST_NAME]]"; class C {} -fn F[T:! type](p: T*) -> T { return F(p); } +fn F[T: type](p: T*) -> T { return F(p); } fn G(p: const C*) -> const C { return F(p); @@ -54,15 +54,15 @@ library "[[@TEST_NAME]]"; class C {} -fn F[T:! type](p: const T*) -> T { return F(p); } +fn F[T: type](p: const T*) -> T { return F(p); } fn G(p: C*) -> const C { // CHECK:STDERR: fail_const_from_nonconst.carbon:[[@LINE+7]]:10: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: return F(p); // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_const_from_nonconst.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F[T:! type](p: const T*) -> T { return F(p); } - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F[T: type](p: const T*) -> T { return F(p); } + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: return F(p); } @@ -123,24 +123,24 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.param_patt.loc6_17.1: @F.%pattern_type.loc6_17 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_17.2 (constants.%p.param_patt.a12)] -// CHECK:STDOUT: %p.patt.loc6_17.1: @F.%pattern_type.loc6_17 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_17.1 [symbolic = %p.patt.loc6_17.2 (constants.%p.patt.14c)] -// CHECK:STDOUT: %return.param_patt.loc6_26.1: @F.%pattern_type.loc6_26 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_26.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc6_23.1: @F.%pattern_type.loc6_26 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_26.1, %T.ref.loc6_26 [symbolic = %return.patt.loc6_23.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %p.param_patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_16.2 (constants.%p.param_patt.a12)] +// CHECK:STDOUT: %p.patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_16.1 [symbolic = %p.patt.loc6_16.2 (constants.%p.patt.14c)] +// CHECK:STDOUT: %return.param_patt.loc6_25.1: @F.%pattern_type.loc6_25 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_25.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc6_22.1: @F.%pattern_type.loc6_25 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_25.1, %T.ref.loc6_25 [symbolic = %return.patt.loc6_22.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_26: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc6_26.3: Core.Form = init_form %T.ref.loc6_26 [symbolic = %.loc6_26.2 (constants.%.184)] -// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %.loc6_25.3: Core.Form = init_form %T.ref.loc6_25 [symbolic = %.loc6_25.2 (constants.%.184)] +// CHECK:STDOUT: %.loc6_9.1: type = splice_block %.loc6_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%ptr.loc6_20.1 (%ptr.e8f) = value_param call_param0 -// CHECK:STDOUT: %.loc6_20: type = splice_block %ptr.loc6_20.2 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] { -// CHECK:STDOUT: %T.ref.loc6_19: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_20.2: type = ptr_type %T.ref.loc6_19 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %p.param: @F.%ptr.loc6_19.1 (%ptr.e8f) = value_param call_param0 +// CHECK:STDOUT: %.loc6_19: type = splice_block %ptr.loc6_19.2 [symbolic = %ptr.loc6_19.1 (constants.%ptr.e8f)] { +// CHECK:STDOUT: %T.ref.loc6_18: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc6_19.2: type = ptr_type %T.ref.loc6_18 [symbolic = %ptr.loc6_19.1 (constants.%ptr.e8f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %p: @F.%ptr.loc6_20.1 (%ptr.e8f) = wrapper_binding p, %p.param +// CHECK:STDOUT: %p: @F.%ptr.loc6_19.1 (%ptr.e8f) = wrapper_binding p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_7.1 (%T) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_7.1 (%T) = return_slot %return.param // CHECK:STDOUT: } @@ -174,27 +174,27 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) { // CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_20.1: type = ptr_type %T.loc6_7.1 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %pattern_type.loc6_17: type = pattern_type %ptr.loc6_20.1 [symbolic = %pattern_type.loc6_17 (constants.%pattern_type.4f4)] -// CHECK:STDOUT: %p.param_patt.loc6_17.2: @F.%pattern_type.loc6_17 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_17.2 (constants.%p.param_patt.a12)] -// CHECK:STDOUT: %p.patt.loc6_17.2: @F.%pattern_type.loc6_17 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_17.2 [symbolic = %p.patt.loc6_17.2 (constants.%p.patt.14c)] -// CHECK:STDOUT: %.loc6_26.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_26.2 (constants.%.184)] -// CHECK:STDOUT: %pattern_type.loc6_26: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_26 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %return.param_patt.loc6_26.2: @F.%pattern_type.loc6_26 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_26.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc6_23.2: @F.%pattern_type.loc6_26 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_26.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_23.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %ptr.loc6_19.1: type = ptr_type %T.loc6_7.1 [symbolic = %ptr.loc6_19.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %ptr.loc6_19.1 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %p.param_patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_16.2 (constants.%p.param_patt.a12)] +// CHECK:STDOUT: %p.patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_16.2 [symbolic = %p.patt.loc6_16.2 (constants.%p.patt.14c)] +// CHECK:STDOUT: %.loc6_25.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_25.2 (constants.%.184)] +// CHECK:STDOUT: %pattern_type.loc6_25: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_25 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %return.param_patt.loc6_25.2: @F.%pattern_type.loc6_25 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_25.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc6_22.2: @F.%pattern_type.loc6_25 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_25.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_22.2 (constants.%return.patt.b39)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_17: = require_complete_type %ptr.loc6_20.1 [symbolic = %require_complete.loc6_17 (constants.%require_complete.ef1)] -// CHECK:STDOUT: %require_complete.loc6_23: = require_complete_type %T.loc6_7.1 [symbolic = %require_complete.loc6_23 (constants.%require_complete.944)] -// CHECK:STDOUT: %F.specific_fn.loc6_37.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_37.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %require_complete.loc6_16: = require_complete_type %ptr.loc6_19.1 [symbolic = %require_complete.loc6_16 (constants.%require_complete.ef1)] +// CHECK:STDOUT: %require_complete.loc6_22: = require_complete_type %T.loc6_7.1 [symbolic = %require_complete.loc6_22 (constants.%require_complete.944)] +// CHECK:STDOUT: %F.specific_fn.loc6_36.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_36.2 (constants.%F.specific_fn.eab)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc6_20.1 (%ptr.e8f)) -> out %return.param: @F.%T.loc6_7.1 (%T) { +// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc6_19.1 (%ptr.e8f)) -> out %return.param: @F.%T.loc6_7.1 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_20.1 (%ptr.e8f) = name_ref p, %p -// CHECK:STDOUT: %F.specific_fn.loc6_37.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_37.2 (constants.%F.specific_fn.eab)] -// CHECK:STDOUT: %.loc6_26.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_26.1 = call %F.specific_fn.loc6_37.1(%p.ref) +// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_19.1 (%ptr.e8f) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc6_36.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_36.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %.loc6_25.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_25.1 = call %F.specific_fn.loc6_36.1(%p.ref) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -216,37 +216,37 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %ptr.loc6_20.1 => constants.%ptr.e8f -// CHECK:STDOUT: %pattern_type.loc6_17 => constants.%pattern_type.4f4 -// CHECK:STDOUT: %p.param_patt.loc6_17.2 => constants.%p.param_patt.a12 -// CHECK:STDOUT: %p.patt.loc6_17.2 => constants.%p.patt.14c -// CHECK:STDOUT: %.loc6_26.2 => constants.%.184 -// CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.51d -// CHECK:STDOUT: %return.param_patt.loc6_26.2 => constants.%return.param_patt.41d -// CHECK:STDOUT: %return.patt.loc6_23.2 => constants.%return.patt.b39 +// CHECK:STDOUT: %ptr.loc6_19.1 => constants.%ptr.e8f +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.4f4 +// CHECK:STDOUT: %p.param_patt.loc6_16.2 => constants.%p.param_patt.a12 +// CHECK:STDOUT: %p.patt.loc6_16.2 => constants.%p.patt.14c +// CHECK:STDOUT: %.loc6_25.2 => constants.%.184 +// CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.51d +// CHECK:STDOUT: %return.param_patt.loc6_25.2 => constants.%return.param_patt.41d +// CHECK:STDOUT: %return.patt.loc6_22.2 => constants.%return.patt.b39 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_17 => constants.%require_complete.ef1 -// CHECK:STDOUT: %require_complete.loc6_23 => constants.%require_complete.944 -// CHECK:STDOUT: %F.specific_fn.loc6_37.2 => constants.%F.specific_fn.eab +// CHECK:STDOUT: %require_complete.loc6_16 => constants.%require_complete.ef1 +// CHECK:STDOUT: %require_complete.loc6_22 => constants.%require_complete.944 +// CHECK:STDOUT: %F.specific_fn.loc6_36.2 => constants.%F.specific_fn.eab // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%C -// CHECK:STDOUT: %ptr.loc6_20.1 => constants.%ptr.6b6 -// CHECK:STDOUT: %pattern_type.loc6_17 => constants.%pattern_type.fcb -// CHECK:STDOUT: %p.param_patt.loc6_17.2 => constants.%p.param_patt.9b8 -// CHECK:STDOUT: %p.patt.loc6_17.2 => constants.%p.patt.d88 -// CHECK:STDOUT: %.loc6_26.2 => constants.%.a44 -// CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.98b -// CHECK:STDOUT: %return.param_patt.loc6_26.2 => constants.%return.param_patt.89a -// CHECK:STDOUT: %return.patt.loc6_23.2 => constants.%return.patt.e4a +// CHECK:STDOUT: %ptr.loc6_19.1 => constants.%ptr.6b6 +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.fcb +// CHECK:STDOUT: %p.param_patt.loc6_16.2 => constants.%p.param_patt.9b8 +// CHECK:STDOUT: %p.patt.loc6_16.2 => constants.%p.patt.d88 +// CHECK:STDOUT: %.loc6_25.2 => constants.%.a44 +// CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.98b +// CHECK:STDOUT: %return.param_patt.loc6_25.2 => constants.%return.param_patt.89a +// CHECK:STDOUT: %return.patt.loc6_22.2 => constants.%return.patt.e4a // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_17 => constants.%complete_type.bf9 -// CHECK:STDOUT: %require_complete.loc6_23 => constants.%complete_type.357 -// CHECK:STDOUT: %F.specific_fn.loc6_37.2 => constants.%F.specific_fn.e0d +// CHECK:STDOUT: %require_complete.loc6_16 => constants.%complete_type.bf9 +// CHECK:STDOUT: %require_complete.loc6_22 => constants.%complete_type.357 +// CHECK:STDOUT: %F.specific_fn.loc6_36.2 => constants.%F.specific_fn.e0d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- const.carbon @@ -307,25 +307,25 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.param_patt.loc6_17.1: @F.%pattern_type.loc6_17 (%pattern_type.26f) = value_param_pattern [symbolic = %p.param_patt.loc6_17.2 (constants.%p.param_patt.b08)] -// CHECK:STDOUT: %p.patt.loc6_17.1: @F.%pattern_type.loc6_17 (%pattern_type.26f) = at_binding_pattern p, %p.param_patt.loc6_17.1 [symbolic = %p.patt.loc6_17.2 (constants.%p.patt.b03)] -// CHECK:STDOUT: %return.param_patt.loc6_32.1: @F.%pattern_type.loc6_32 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_32.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc6_29.1: @F.%pattern_type.loc6_32 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_32.1, %T.ref.loc6_32 [symbolic = %return.patt.loc6_29.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %p.param_patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.26f) = value_param_pattern [symbolic = %p.param_patt.loc6_16.2 (constants.%p.param_patt.b08)] +// CHECK:STDOUT: %p.patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.26f) = at_binding_pattern p, %p.param_patt.loc6_16.1 [symbolic = %p.patt.loc6_16.2 (constants.%p.patt.b03)] +// CHECK:STDOUT: %return.param_patt.loc6_31.1: @F.%pattern_type.loc6_31 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_31.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc6_28.1: @F.%pattern_type.loc6_31 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_31.1, %T.ref.loc6_31 [symbolic = %return.patt.loc6_28.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_32: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc6_32.3: Core.Form = init_form %T.ref.loc6_32 [symbolic = %.loc6_32.2 (constants.%.184)] -// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc6_31: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %.loc6_31.3: Core.Form = init_form %T.ref.loc6_31 [symbolic = %.loc6_31.2 (constants.%.184)] +// CHECK:STDOUT: %.loc6_9.1: type = splice_block %.loc6_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%ptr.loc6_26.1 (%ptr.a15) = value_param call_param0 -// CHECK:STDOUT: %.loc6_26: type = splice_block %ptr.loc6_26.2 [symbolic = %ptr.loc6_26.1 (constants.%ptr.a15)] { -// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %const.loc6_19.2: type = const_type %T.ref.loc6_25 [symbolic = %const.loc6_19.1 (constants.%const.4ff)] -// CHECK:STDOUT: %ptr.loc6_26.2: type = ptr_type %const.loc6_19.2 [symbolic = %ptr.loc6_26.1 (constants.%ptr.a15)] +// CHECK:STDOUT: %p.param: @F.%ptr.loc6_25.1 (%ptr.a15) = value_param call_param0 +// CHECK:STDOUT: %.loc6_25: type = splice_block %ptr.loc6_25.2 [symbolic = %ptr.loc6_25.1 (constants.%ptr.a15)] { +// CHECK:STDOUT: %T.ref.loc6_24: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %const.loc6_18.2: type = const_type %T.ref.loc6_24 [symbolic = %const.loc6_18.1 (constants.%const.4ff)] +// CHECK:STDOUT: %ptr.loc6_25.2: type = ptr_type %const.loc6_18.2 [symbolic = %ptr.loc6_25.1 (constants.%ptr.a15)] // CHECK:STDOUT: } -// CHECK:STDOUT: %p: @F.%ptr.loc6_26.1 (%ptr.a15) = wrapper_binding p, %p.param +// CHECK:STDOUT: %p: @F.%ptr.loc6_25.1 (%ptr.a15) = wrapper_binding p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_7.1 (%T) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_7.1 (%T) = return_slot %return.param // CHECK:STDOUT: } @@ -360,28 +360,28 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) { // CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %const.loc6_19.1: type = const_type %T.loc6_7.1 [symbolic = %const.loc6_19.1 (constants.%const.4ff)] -// CHECK:STDOUT: %ptr.loc6_26.1: type = ptr_type %const.loc6_19.1 [symbolic = %ptr.loc6_26.1 (constants.%ptr.a15)] -// CHECK:STDOUT: %pattern_type.loc6_17: type = pattern_type %ptr.loc6_26.1 [symbolic = %pattern_type.loc6_17 (constants.%pattern_type.26f)] -// CHECK:STDOUT: %p.param_patt.loc6_17.2: @F.%pattern_type.loc6_17 (%pattern_type.26f) = value_param_pattern [symbolic = %p.param_patt.loc6_17.2 (constants.%p.param_patt.b08)] -// CHECK:STDOUT: %p.patt.loc6_17.2: @F.%pattern_type.loc6_17 (%pattern_type.26f) = at_binding_pattern p, %p.param_patt.loc6_17.2 [symbolic = %p.patt.loc6_17.2 (constants.%p.patt.b03)] -// CHECK:STDOUT: %.loc6_32.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_32.2 (constants.%.184)] -// CHECK:STDOUT: %pattern_type.loc6_32: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_32 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %return.param_patt.loc6_32.2: @F.%pattern_type.loc6_32 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_32.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc6_29.2: @F.%pattern_type.loc6_32 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_32.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_29.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %const.loc6_18.1: type = const_type %T.loc6_7.1 [symbolic = %const.loc6_18.1 (constants.%const.4ff)] +// CHECK:STDOUT: %ptr.loc6_25.1: type = ptr_type %const.loc6_18.1 [symbolic = %ptr.loc6_25.1 (constants.%ptr.a15)] +// CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %ptr.loc6_25.1 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.26f)] +// CHECK:STDOUT: %p.param_patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.26f) = value_param_pattern [symbolic = %p.param_patt.loc6_16.2 (constants.%p.param_patt.b08)] +// CHECK:STDOUT: %p.patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.26f) = at_binding_pattern p, %p.param_patt.loc6_16.2 [symbolic = %p.patt.loc6_16.2 (constants.%p.patt.b03)] +// CHECK:STDOUT: %.loc6_31.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_31.2 (constants.%.184)] +// CHECK:STDOUT: %pattern_type.loc6_31: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_31 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %return.param_patt.loc6_31.2: @F.%pattern_type.loc6_31 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_31.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc6_28.2: @F.%pattern_type.loc6_31 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_31.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_28.2 (constants.%return.patt.b39)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_17: = require_complete_type %ptr.loc6_26.1 [symbolic = %require_complete.loc6_17 (constants.%require_complete.0c1)] -// CHECK:STDOUT: %require_complete.loc6_29: = require_complete_type %T.loc6_7.1 [symbolic = %require_complete.loc6_29 (constants.%require_complete.944)] -// CHECK:STDOUT: %F.specific_fn.loc6_43.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_43.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %require_complete.loc6_16: = require_complete_type %ptr.loc6_25.1 [symbolic = %require_complete.loc6_16 (constants.%require_complete.0c1)] +// CHECK:STDOUT: %require_complete.loc6_28: = require_complete_type %T.loc6_7.1 [symbolic = %require_complete.loc6_28 (constants.%require_complete.944)] +// CHECK:STDOUT: %F.specific_fn.loc6_42.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_42.2 (constants.%F.specific_fn.eab)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc6_26.1 (%ptr.a15)) -> out %return.param: @F.%T.loc6_7.1 (%T) { +// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc6_25.1 (%ptr.a15)) -> out %return.param: @F.%T.loc6_7.1 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_26.1 (%ptr.a15) = name_ref p, %p -// CHECK:STDOUT: %F.specific_fn.loc6_43.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_43.2 (constants.%F.specific_fn.eab)] -// CHECK:STDOUT: %.loc6_32.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_32.1 = call %F.specific_fn.loc6_43.1(%p.ref) +// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_25.1 (%ptr.a15) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc6_42.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_42.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %.loc6_31.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_31.1 = call %F.specific_fn.loc6_42.1(%p.ref) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -403,39 +403,39 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %const.loc6_19.1 => constants.%const.4ff -// CHECK:STDOUT: %ptr.loc6_26.1 => constants.%ptr.a15 -// CHECK:STDOUT: %pattern_type.loc6_17 => constants.%pattern_type.26f -// CHECK:STDOUT: %p.param_patt.loc6_17.2 => constants.%p.param_patt.b08 -// CHECK:STDOUT: %p.patt.loc6_17.2 => constants.%p.patt.b03 -// CHECK:STDOUT: %.loc6_32.2 => constants.%.184 -// CHECK:STDOUT: %pattern_type.loc6_32 => constants.%pattern_type.51d -// CHECK:STDOUT: %return.param_patt.loc6_32.2 => constants.%return.param_patt.41d -// CHECK:STDOUT: %return.patt.loc6_29.2 => constants.%return.patt.b39 +// CHECK:STDOUT: %const.loc6_18.1 => constants.%const.4ff +// CHECK:STDOUT: %ptr.loc6_25.1 => constants.%ptr.a15 +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.26f +// CHECK:STDOUT: %p.param_patt.loc6_16.2 => constants.%p.param_patt.b08 +// CHECK:STDOUT: %p.patt.loc6_16.2 => constants.%p.patt.b03 +// CHECK:STDOUT: %.loc6_31.2 => constants.%.184 +// CHECK:STDOUT: %pattern_type.loc6_31 => constants.%pattern_type.51d +// CHECK:STDOUT: %return.param_patt.loc6_31.2 => constants.%return.param_patt.41d +// CHECK:STDOUT: %return.patt.loc6_28.2 => constants.%return.patt.b39 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_17 => constants.%require_complete.0c1 -// CHECK:STDOUT: %require_complete.loc6_29 => constants.%require_complete.944 -// CHECK:STDOUT: %F.specific_fn.loc6_43.2 => constants.%F.specific_fn.eab +// CHECK:STDOUT: %require_complete.loc6_16 => constants.%require_complete.0c1 +// CHECK:STDOUT: %require_complete.loc6_28 => constants.%require_complete.944 +// CHECK:STDOUT: %F.specific_fn.loc6_42.2 => constants.%F.specific_fn.eab // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%C -// CHECK:STDOUT: %const.loc6_19.1 => constants.%const.13f -// CHECK:STDOUT: %ptr.loc6_26.1 => constants.%ptr.77f -// CHECK:STDOUT: %pattern_type.loc6_17 => constants.%pattern_type.7d2 -// CHECK:STDOUT: %p.param_patt.loc6_17.2 => constants.%p.param_patt.a6a -// CHECK:STDOUT: %p.patt.loc6_17.2 => constants.%p.patt.bb7 -// CHECK:STDOUT: %.loc6_32.2 => constants.%.a44 -// CHECK:STDOUT: %pattern_type.loc6_32 => constants.%pattern_type.98b -// CHECK:STDOUT: %return.param_patt.loc6_32.2 => constants.%return.param_patt.89a -// CHECK:STDOUT: %return.patt.loc6_29.2 => constants.%return.patt.e4a +// CHECK:STDOUT: %const.loc6_18.1 => constants.%const.13f +// CHECK:STDOUT: %ptr.loc6_25.1 => constants.%ptr.77f +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.7d2 +// CHECK:STDOUT: %p.param_patt.loc6_16.2 => constants.%p.param_patt.a6a +// CHECK:STDOUT: %p.patt.loc6_16.2 => constants.%p.patt.bb7 +// CHECK:STDOUT: %.loc6_31.2 => constants.%.a44 +// CHECK:STDOUT: %pattern_type.loc6_31 => constants.%pattern_type.98b +// CHECK:STDOUT: %return.param_patt.loc6_31.2 => constants.%return.param_patt.89a +// CHECK:STDOUT: %return.patt.loc6_28.2 => constants.%return.patt.e4a // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_17 => constants.%complete_type.8ec -// CHECK:STDOUT: %require_complete.loc6_29 => constants.%complete_type.357 -// CHECK:STDOUT: %F.specific_fn.loc6_43.2 => constants.%F.specific_fn.e0d +// CHECK:STDOUT: %require_complete.loc6_16 => constants.%complete_type.8ec +// CHECK:STDOUT: %require_complete.loc6_28 => constants.%complete_type.357 +// CHECK:STDOUT: %F.specific_fn.loc6_42.2 => constants.%F.specific_fn.e0d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- nonconst_from_const.carbon @@ -495,24 +495,24 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.param_patt.loc6_17.1: @F.%pattern_type.loc6_17 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_17.2 (constants.%p.param_patt.a12)] -// CHECK:STDOUT: %p.patt.loc6_17.1: @F.%pattern_type.loc6_17 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_17.1 [symbolic = %p.patt.loc6_17.2 (constants.%p.patt.14c)] -// CHECK:STDOUT: %return.param_patt.loc6_26.1: @F.%pattern_type.loc6_26 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_26.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc6_23.1: @F.%pattern_type.loc6_26 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_26.1, %T.ref.loc6_26 [symbolic = %return.patt.loc6_23.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %p.param_patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_16.2 (constants.%p.param_patt.a12)] +// CHECK:STDOUT: %p.patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_16.1 [symbolic = %p.patt.loc6_16.2 (constants.%p.patt.14c)] +// CHECK:STDOUT: %return.param_patt.loc6_25.1: @F.%pattern_type.loc6_25 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_25.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc6_22.1: @F.%pattern_type.loc6_25 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_25.1, %T.ref.loc6_25 [symbolic = %return.patt.loc6_22.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_26: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc6_26.3: Core.Form = init_form %T.ref.loc6_26 [symbolic = %.loc6_26.2 (constants.%.184)] -// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %.loc6_25.3: Core.Form = init_form %T.ref.loc6_25 [symbolic = %.loc6_25.2 (constants.%.184)] +// CHECK:STDOUT: %.loc6_9.1: type = splice_block %.loc6_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%ptr.loc6_20.1 (%ptr.e8f) = value_param call_param0 -// CHECK:STDOUT: %.loc6_20: type = splice_block %ptr.loc6_20.2 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] { -// CHECK:STDOUT: %T.ref.loc6_19: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_20.2: type = ptr_type %T.ref.loc6_19 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %p.param: @F.%ptr.loc6_19.1 (%ptr.e8f) = value_param call_param0 +// CHECK:STDOUT: %.loc6_19: type = splice_block %ptr.loc6_19.2 [symbolic = %ptr.loc6_19.1 (constants.%ptr.e8f)] { +// CHECK:STDOUT: %T.ref.loc6_18: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc6_19.2: type = ptr_type %T.ref.loc6_18 [symbolic = %ptr.loc6_19.1 (constants.%ptr.e8f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %p: @F.%ptr.loc6_20.1 (%ptr.e8f) = wrapper_binding p, %p.param +// CHECK:STDOUT: %p: @F.%ptr.loc6_19.1 (%ptr.e8f) = wrapper_binding p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_7.1 (%T) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_7.1 (%T) = return_slot %return.param // CHECK:STDOUT: } @@ -548,27 +548,27 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) { // CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_20.1: type = ptr_type %T.loc6_7.1 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %pattern_type.loc6_17: type = pattern_type %ptr.loc6_20.1 [symbolic = %pattern_type.loc6_17 (constants.%pattern_type.4f4)] -// CHECK:STDOUT: %p.param_patt.loc6_17.2: @F.%pattern_type.loc6_17 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_17.2 (constants.%p.param_patt.a12)] -// CHECK:STDOUT: %p.patt.loc6_17.2: @F.%pattern_type.loc6_17 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_17.2 [symbolic = %p.patt.loc6_17.2 (constants.%p.patt.14c)] -// CHECK:STDOUT: %.loc6_26.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_26.2 (constants.%.184)] -// CHECK:STDOUT: %pattern_type.loc6_26: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_26 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %return.param_patt.loc6_26.2: @F.%pattern_type.loc6_26 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_26.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc6_23.2: @F.%pattern_type.loc6_26 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_26.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_23.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %ptr.loc6_19.1: type = ptr_type %T.loc6_7.1 [symbolic = %ptr.loc6_19.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %ptr.loc6_19.1 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %p.param_patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_16.2 (constants.%p.param_patt.a12)] +// CHECK:STDOUT: %p.patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_16.2 [symbolic = %p.patt.loc6_16.2 (constants.%p.patt.14c)] +// CHECK:STDOUT: %.loc6_25.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_25.2 (constants.%.184)] +// CHECK:STDOUT: %pattern_type.loc6_25: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_25 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %return.param_patt.loc6_25.2: @F.%pattern_type.loc6_25 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_25.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc6_22.2: @F.%pattern_type.loc6_25 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_25.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_22.2 (constants.%return.patt.b39)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_17: = require_complete_type %ptr.loc6_20.1 [symbolic = %require_complete.loc6_17 (constants.%require_complete.ef1)] -// CHECK:STDOUT: %require_complete.loc6_23: = require_complete_type %T.loc6_7.1 [symbolic = %require_complete.loc6_23 (constants.%require_complete.944)] -// CHECK:STDOUT: %F.specific_fn.loc6_37.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_37.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %require_complete.loc6_16: = require_complete_type %ptr.loc6_19.1 [symbolic = %require_complete.loc6_16 (constants.%require_complete.ef1)] +// CHECK:STDOUT: %require_complete.loc6_22: = require_complete_type %T.loc6_7.1 [symbolic = %require_complete.loc6_22 (constants.%require_complete.944)] +// CHECK:STDOUT: %F.specific_fn.loc6_36.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_36.2 (constants.%F.specific_fn.eab)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc6_20.1 (%ptr.e8f)) -> out %return.param: @F.%T.loc6_7.1 (%T) { +// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc6_19.1 (%ptr.e8f)) -> out %return.param: @F.%T.loc6_7.1 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_20.1 (%ptr.e8f) = name_ref p, %p -// CHECK:STDOUT: %F.specific_fn.loc6_37.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_37.2 (constants.%F.specific_fn.eab)] -// CHECK:STDOUT: %.loc6_26.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_26.1 = call %F.specific_fn.loc6_37.1(%p.ref) +// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_19.1 (%ptr.e8f) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc6_36.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_36.2 (constants.%F.specific_fn.eab)] +// CHECK:STDOUT: %.loc6_25.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_25.1 = call %F.specific_fn.loc6_36.1(%p.ref) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -590,37 +590,37 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %ptr.loc6_20.1 => constants.%ptr.e8f -// CHECK:STDOUT: %pattern_type.loc6_17 => constants.%pattern_type.4f4 -// CHECK:STDOUT: %p.param_patt.loc6_17.2 => constants.%p.param_patt.a12 -// CHECK:STDOUT: %p.patt.loc6_17.2 => constants.%p.patt.14c -// CHECK:STDOUT: %.loc6_26.2 => constants.%.184 -// CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.51d -// CHECK:STDOUT: %return.param_patt.loc6_26.2 => constants.%return.param_patt.41d -// CHECK:STDOUT: %return.patt.loc6_23.2 => constants.%return.patt.b39 +// CHECK:STDOUT: %ptr.loc6_19.1 => constants.%ptr.e8f +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.4f4 +// CHECK:STDOUT: %p.param_patt.loc6_16.2 => constants.%p.param_patt.a12 +// CHECK:STDOUT: %p.patt.loc6_16.2 => constants.%p.patt.14c +// CHECK:STDOUT: %.loc6_25.2 => constants.%.184 +// CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.51d +// CHECK:STDOUT: %return.param_patt.loc6_25.2 => constants.%return.param_patt.41d +// CHECK:STDOUT: %return.patt.loc6_22.2 => constants.%return.patt.b39 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_17 => constants.%require_complete.ef1 -// CHECK:STDOUT: %require_complete.loc6_23 => constants.%require_complete.944 -// CHECK:STDOUT: %F.specific_fn.loc6_37.2 => constants.%F.specific_fn.eab +// CHECK:STDOUT: %require_complete.loc6_16 => constants.%require_complete.ef1 +// CHECK:STDOUT: %require_complete.loc6_22 => constants.%require_complete.944 +// CHECK:STDOUT: %F.specific_fn.loc6_36.2 => constants.%F.specific_fn.eab // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%const) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%const -// CHECK:STDOUT: %ptr.loc6_20.1 => constants.%ptr.77f -// CHECK:STDOUT: %pattern_type.loc6_17 => constants.%pattern_type.7d2 -// CHECK:STDOUT: %p.param_patt.loc6_17.2 => constants.%p.param_patt.a6a -// CHECK:STDOUT: %p.patt.loc6_17.2 => constants.%p.patt.bb7 -// CHECK:STDOUT: %.loc6_26.2 => constants.%.ab2 -// CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.1e4 -// CHECK:STDOUT: %return.param_patt.loc6_26.2 => constants.%return.param_patt.727 -// CHECK:STDOUT: %return.patt.loc6_23.2 => constants.%return.patt.dc5 +// CHECK:STDOUT: %ptr.loc6_19.1 => constants.%ptr.77f +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.7d2 +// CHECK:STDOUT: %p.param_patt.loc6_16.2 => constants.%p.param_patt.a6a +// CHECK:STDOUT: %p.patt.loc6_16.2 => constants.%p.patt.bb7 +// CHECK:STDOUT: %.loc6_25.2 => constants.%.ab2 +// CHECK:STDOUT: %pattern_type.loc6_25 => constants.%pattern_type.1e4 +// CHECK:STDOUT: %return.param_patt.loc6_25.2 => constants.%return.param_patt.727 +// CHECK:STDOUT: %return.patt.loc6_22.2 => constants.%return.patt.dc5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_17 => constants.%complete_type.8ec -// CHECK:STDOUT: %require_complete.loc6_23 => constants.%complete_type.357 -// CHECK:STDOUT: %F.specific_fn.loc6_37.2 => constants.%F.specific_fn.513 +// CHECK:STDOUT: %require_complete.loc6_16 => constants.%complete_type.8ec +// CHECK:STDOUT: %require_complete.loc6_22 => constants.%complete_type.357 +// CHECK:STDOUT: %F.specific_fn.loc6_36.2 => constants.%F.specific_fn.513 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_const_from_nonconst.carbon @@ -679,25 +679,25 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.param_patt.loc6_17.1: @F.%pattern_type.loc6_17 (%pattern_type.26f) = value_param_pattern [symbolic = %p.param_patt.loc6_17.2 (constants.%p.param_patt.b08)] -// CHECK:STDOUT: %p.patt.loc6_17.1: @F.%pattern_type.loc6_17 (%pattern_type.26f) = at_binding_pattern p, %p.param_patt.loc6_17.1 [symbolic = %p.patt.loc6_17.2 (constants.%p.patt.b03)] -// CHECK:STDOUT: %return.param_patt.loc6_32.1: @F.%pattern_type.loc6_32 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_32.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc6_29.1: @F.%pattern_type.loc6_32 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_32.1, %T.ref.loc6_32 [symbolic = %return.patt.loc6_29.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %p.param_patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.26f) = value_param_pattern [symbolic = %p.param_patt.loc6_16.2 (constants.%p.param_patt.b08)] +// CHECK:STDOUT: %p.patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.26f) = at_binding_pattern p, %p.param_patt.loc6_16.1 [symbolic = %p.patt.loc6_16.2 (constants.%p.patt.b03)] +// CHECK:STDOUT: %return.param_patt.loc6_31.1: @F.%pattern_type.loc6_31 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_31.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc6_28.1: @F.%pattern_type.loc6_31 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_31.1, %T.ref.loc6_31 [symbolic = %return.patt.loc6_28.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_32: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc6_32.3: Core.Form = init_form %T.ref.loc6_32 [symbolic = %.loc6_32.2 (constants.%.184)] -// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc6_31: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %.loc6_31.3: Core.Form = init_form %T.ref.loc6_31 [symbolic = %.loc6_31.2 (constants.%.184)] +// CHECK:STDOUT: %.loc6_9.1: type = splice_block %.loc6_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%ptr.loc6_26.1 (%ptr.a15) = value_param call_param0 -// CHECK:STDOUT: %.loc6_26: type = splice_block %ptr.loc6_26.2 [symbolic = %ptr.loc6_26.1 (constants.%ptr.a15)] { -// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %const.loc6_19.2: type = const_type %T.ref.loc6_25 [symbolic = %const.loc6_19.1 (constants.%const.4ff)] -// CHECK:STDOUT: %ptr.loc6_26.2: type = ptr_type %const.loc6_19.2 [symbolic = %ptr.loc6_26.1 (constants.%ptr.a15)] +// CHECK:STDOUT: %p.param: @F.%ptr.loc6_25.1 (%ptr.a15) = value_param call_param0 +// CHECK:STDOUT: %.loc6_25: type = splice_block %ptr.loc6_25.2 [symbolic = %ptr.loc6_25.1 (constants.%ptr.a15)] { +// CHECK:STDOUT: %T.ref.loc6_24: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %const.loc6_18.2: type = const_type %T.ref.loc6_24 [symbolic = %const.loc6_18.1 (constants.%const.4ff)] +// CHECK:STDOUT: %ptr.loc6_25.2: type = ptr_type %const.loc6_18.2 [symbolic = %ptr.loc6_25.1 (constants.%ptr.a15)] // CHECK:STDOUT: } -// CHECK:STDOUT: %p: @F.%ptr.loc6_26.1 (%ptr.a15) = wrapper_binding p, %p.param +// CHECK:STDOUT: %p: @F.%ptr.loc6_25.1 (%ptr.a15) = wrapper_binding p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_7.1 (%T) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_7.1 (%T) = return_slot %return.param // CHECK:STDOUT: } @@ -732,28 +732,28 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) { // CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %const.loc6_19.1: type = const_type %T.loc6_7.1 [symbolic = %const.loc6_19.1 (constants.%const.4ff)] -// CHECK:STDOUT: %ptr.loc6_26.1: type = ptr_type %const.loc6_19.1 [symbolic = %ptr.loc6_26.1 (constants.%ptr.a15)] -// CHECK:STDOUT: %pattern_type.loc6_17: type = pattern_type %ptr.loc6_26.1 [symbolic = %pattern_type.loc6_17 (constants.%pattern_type.26f)] -// CHECK:STDOUT: %p.param_patt.loc6_17.2: @F.%pattern_type.loc6_17 (%pattern_type.26f) = value_param_pattern [symbolic = %p.param_patt.loc6_17.2 (constants.%p.param_patt.b08)] -// CHECK:STDOUT: %p.patt.loc6_17.2: @F.%pattern_type.loc6_17 (%pattern_type.26f) = at_binding_pattern p, %p.param_patt.loc6_17.2 [symbolic = %p.patt.loc6_17.2 (constants.%p.patt.b03)] -// CHECK:STDOUT: %.loc6_32.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_32.2 (constants.%.184)] -// CHECK:STDOUT: %pattern_type.loc6_32: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_32 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %return.param_patt.loc6_32.2: @F.%pattern_type.loc6_32 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_32.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc6_29.2: @F.%pattern_type.loc6_32 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_32.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_29.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %const.loc6_18.1: type = const_type %T.loc6_7.1 [symbolic = %const.loc6_18.1 (constants.%const.4ff)] +// CHECK:STDOUT: %ptr.loc6_25.1: type = ptr_type %const.loc6_18.1 [symbolic = %ptr.loc6_25.1 (constants.%ptr.a15)] +// CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %ptr.loc6_25.1 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.26f)] +// CHECK:STDOUT: %p.param_patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.26f) = value_param_pattern [symbolic = %p.param_patt.loc6_16.2 (constants.%p.param_patt.b08)] +// CHECK:STDOUT: %p.patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.26f) = at_binding_pattern p, %p.param_patt.loc6_16.2 [symbolic = %p.patt.loc6_16.2 (constants.%p.patt.b03)] +// CHECK:STDOUT: %.loc6_31.2: Core.Form = init_form %T.loc6_7.1 [symbolic = %.loc6_31.2 (constants.%.184)] +// CHECK:STDOUT: %pattern_type.loc6_31: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc6_31 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %return.param_patt.loc6_31.2: @F.%pattern_type.loc6_31 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_31.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc6_28.2: @F.%pattern_type.loc6_31 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_31.2, %T.loc6_7.1 [symbolic = %return.patt.loc6_28.2 (constants.%return.patt.b39)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_17: = require_complete_type %ptr.loc6_26.1 [symbolic = %require_complete.loc6_17 (constants.%require_complete.0c1)] -// CHECK:STDOUT: %require_complete.loc6_29: = require_complete_type %T.loc6_7.1 [symbolic = %require_complete.loc6_29 (constants.%require_complete.944)] -// CHECK:STDOUT: %F.specific_fn.loc6_43.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_43.2 (constants.%F.specific_fn)] +// CHECK:STDOUT: %require_complete.loc6_16: = require_complete_type %ptr.loc6_25.1 [symbolic = %require_complete.loc6_16 (constants.%require_complete.0c1)] +// CHECK:STDOUT: %require_complete.loc6_28: = require_complete_type %T.loc6_7.1 [symbolic = %require_complete.loc6_28 (constants.%require_complete.944)] +// CHECK:STDOUT: %F.specific_fn.loc6_42.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_42.2 (constants.%F.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc6_26.1 (%ptr.a15)) -> out %return.param: @F.%T.loc6_7.1 (%T) { +// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc6_25.1 (%ptr.a15)) -> out %return.param: @F.%T.loc6_7.1 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_26.1 (%ptr.a15) = name_ref p, %p -// CHECK:STDOUT: %F.specific_fn.loc6_43.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_43.2 (constants.%F.specific_fn)] -// CHECK:STDOUT: %.loc6_32.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_32.1 = call %F.specific_fn.loc6_43.1(%p.ref) +// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_25.1 (%ptr.a15) = name_ref p, %p +// CHECK:STDOUT: %F.specific_fn.loc6_42.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_42.2 (constants.%F.specific_fn)] +// CHECK:STDOUT: %.loc6_31.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_31.1 = call %F.specific_fn.loc6_42.1(%p.ref) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -772,19 +772,19 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %const.loc6_19.1 => constants.%const.4ff -// CHECK:STDOUT: %ptr.loc6_26.1 => constants.%ptr.a15 -// CHECK:STDOUT: %pattern_type.loc6_17 => constants.%pattern_type.26f -// CHECK:STDOUT: %p.param_patt.loc6_17.2 => constants.%p.param_patt.b08 -// CHECK:STDOUT: %p.patt.loc6_17.2 => constants.%p.patt.b03 -// CHECK:STDOUT: %.loc6_32.2 => constants.%.184 -// CHECK:STDOUT: %pattern_type.loc6_32 => constants.%pattern_type.51d -// CHECK:STDOUT: %return.param_patt.loc6_32.2 => constants.%return.param_patt.41d -// CHECK:STDOUT: %return.patt.loc6_29.2 => constants.%return.patt.b39 +// CHECK:STDOUT: %const.loc6_18.1 => constants.%const.4ff +// CHECK:STDOUT: %ptr.loc6_25.1 => constants.%ptr.a15 +// CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.26f +// CHECK:STDOUT: %p.param_patt.loc6_16.2 => constants.%p.param_patt.b08 +// CHECK:STDOUT: %p.patt.loc6_16.2 => constants.%p.patt.b03 +// CHECK:STDOUT: %.loc6_31.2 => constants.%.184 +// CHECK:STDOUT: %pattern_type.loc6_31 => constants.%pattern_type.51d +// CHECK:STDOUT: %return.param_patt.loc6_31.2 => constants.%return.param_patt.41d +// CHECK:STDOUT: %return.patt.loc6_28.2 => constants.%return.patt.b39 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_17 => constants.%require_complete.0c1 -// CHECK:STDOUT: %require_complete.loc6_29 => constants.%require_complete.944 -// CHECK:STDOUT: %F.specific_fn.loc6_43.2 => constants.%F.specific_fn +// CHECK:STDOUT: %require_complete.loc6_16 => constants.%require_complete.0c1 +// CHECK:STDOUT: %require_complete.loc6_28 => constants.%require_complete.944 +// CHECK:STDOUT: %F.specific_fn.loc6_42.2 => constants.%F.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon index d91ee5977531..5fdad6b728ec 100644 --- a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon +++ b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon @@ -16,11 +16,11 @@ library "[[@TEST_NAME]]"; -class HoldsType(T:! (type, )) {} +class HoldsType(T: (type, )) {} // `a` is received as a value, and has a type that requires going through // TupleAccess. Building the value representation must handle this indirection. -fn F[T:! (type, )](unused x: HoldsType(T), unused a: T.0) {} +fn F[T: (type, )](unused x: HoldsType(T), unused a: T.0) {} class C {} @@ -32,11 +32,11 @@ fn G() { library "[[@TEST_NAME]]"; -class HoldsType(T:! {.t: type}) {} +class HoldsType(T: {.t: type}) {} // `a` is received as a value, and has a type that requires going through // StructAccess. Building the value representation must handle this indirection. -fn F[T:! {.t: type}](unused x: HoldsType(T), unused a: T.t) {} +fn F[T: {.t: type}](unused x: HoldsType(T), unused a: T.t) {} class C {} @@ -52,7 +52,7 @@ class Class { var t: type; } -class HoldsType(T:! Class) {} +class HoldsType(T: Class) {} // `a` is received as a value, and has a type that requires going through // StructAccess. Building the value representation must handle this indirection. @@ -61,15 +61,15 @@ class HoldsType(T:! Class) {} // should be able to eval to a type. We would expect the `.` in `T.t` to be a // ClassElementAccess but it is an AcquireValue, which has a runtime value. // -// CHECK:STDERR: fail_todo_class_access.carbon:[[@LINE+4]]:51: error: cannot evaluate type expression [TypeExprEvaluationFailure] -// CHECK:STDERR: fn F[T:! Class](unused x: HoldsType(T), unused a: T.t) {} -// CHECK:STDERR: ^~~ +// CHECK:STDERR: fail_todo_class_access.carbon:[[@LINE+4]]:50: error: cannot evaluate type expression [TypeExprEvaluationFailure] +// CHECK:STDERR: fn F[T: Class](unused x: HoldsType(T), unused a: T.t) {} +// CHECK:STDERR: ^~~ // CHECK:STDERR: -fn F[T:! Class](unused x: HoldsType(T), unused a: T.t) {} +fn F[T: Class](unused x: HoldsType(T), unused a: T.t) {} class C {} -fn G(c:! Class) { +fn G(generic c: Class) { F({} as HoldsType(c), {}); } @@ -81,15 +81,15 @@ fn H() { library "[[@TEST_NAME]]"; -class HoldsType(T:! array(type, 1)) {} +class HoldsType(T: array(type, 1)) {} // `a` is received as a value, and has a type that requires going through // ArrayIndex. Building the value representation must handle this indirection. -// CHECK:STDERR: fail_todo_array_index.carbon:[[@LINE+4]]:60: error: cannot evaluate type expression [TypeExprEvaluationFailure] -// CHECK:STDERR: fn F[T:! array(type, 1)](unused x: HoldsType(T), unused a: T[0]) {} -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: fail_todo_array_index.carbon:[[@LINE+4]]:59: error: cannot evaluate type expression [TypeExprEvaluationFailure] +// CHECK:STDERR: fn F[T: array(type, 1)](unused x: HoldsType(T), unused a: T[0]) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -fn F[T:! array(type, 1)](unused x: HoldsType(T), unused a: T[0]) {} +fn F[T: array(type, 1)](unused x: HoldsType(T), unused a: T[0]) {} class C {} @@ -174,42 +174,42 @@ fn G() { // CHECK:STDOUT: %HoldsType.decl: %HoldsType.type = class_decl @HoldsType [concrete = constants.%HoldsType.generic] { // CHECK:STDOUT: %T.patt.loc4_18.1: %pattern_type.f1e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_28.1: type = splice_block %.loc4_28.3 [concrete = constants.%tuple.type] { +// CHECK:STDOUT: %.loc4_27.1: type = splice_block %.loc4_27.3 [concrete = constants.%tuple.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_22: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.loc4_28.2: %tuple.type = tuple_literal (%.loc4_22) [concrete = constants.%tuple.0d2] -// CHECK:STDOUT: %.loc4_28.3: type = converted %.loc4_28.2, constants.%tuple.type [concrete = constants.%tuple.type] +// CHECK:STDOUT: %.loc4_21: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_27.2: %tuple.type = tuple_literal (%.loc4_21) [concrete = constants.%tuple.0d2] +// CHECK:STDOUT: %.loc4_27.3: type = converted %.loc4_27.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_18.2: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc8_7.1: %pattern_type.f1e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc8_28.1: @F.%pattern_type.loc8_28 (%pattern_type.b2f) = value_param_pattern [symbolic = %x.param_patt.loc8_28.2 (constants.%x.param_patt.321)] -// CHECK:STDOUT: %x.patt.loc8_28.1: @F.%pattern_type.loc8_28 (%pattern_type.b2f) = at_binding_pattern x, %x.param_patt.loc8_28.1 [symbolic = %x.patt.loc8_28.2 (constants.%x.patt.a80)] -// CHECK:STDOUT: %a.param_patt.loc8_52.1: @F.%pattern_type.loc8_52 (%pattern_type.e66) = value_param_pattern [symbolic = %a.param_patt.loc8_52.2 (constants.%a.param_patt.d7c)] -// CHECK:STDOUT: %a.patt.loc8_52.1: @F.%pattern_type.loc8_52 (%pattern_type.e66) = at_binding_pattern a, %a.param_patt.loc8_52.1 [symbolic = %a.patt.loc8_52.2 (constants.%a.patt.803)] +// CHECK:STDOUT: %x.param_patt.loc8_27.1: @F.%pattern_type.loc8_27 (%pattern_type.b2f) = value_param_pattern [symbolic = %x.param_patt.loc8_27.2 (constants.%x.param_patt.321)] +// CHECK:STDOUT: %x.patt.loc8_27.1: @F.%pattern_type.loc8_27 (%pattern_type.b2f) = at_binding_pattern x, %x.param_patt.loc8_27.1 [symbolic = %x.patt.loc8_27.2 (constants.%x.patt.a80)] +// CHECK:STDOUT: %a.param_patt.loc8_51.1: @F.%pattern_type.loc8_51 (%pattern_type.e66) = value_param_pattern [symbolic = %a.param_patt.loc8_51.2 (constants.%a.param_patt.d7c)] +// CHECK:STDOUT: %a.patt.loc8_51.1: @F.%pattern_type.loc8_51 (%pattern_type.e66) = at_binding_pattern a, %a.param_patt.loc8_51.1 [symbolic = %a.patt.loc8_51.2 (constants.%a.patt.803)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.3 [concrete = constants.%tuple.type] { +// CHECK:STDOUT: %.loc8_16.1: type = splice_block %.loc8_16.3 [concrete = constants.%tuple.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_11: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.loc8_17.2: %tuple.type = tuple_literal (%.loc8_11) [concrete = constants.%tuple.0d2] -// CHECK:STDOUT: %.loc8_17.3: type = converted %.loc8_17.2, constants.%tuple.type [concrete = constants.%tuple.type] +// CHECK:STDOUT: %.loc8_10: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_16.2: %tuple.type = tuple_literal (%.loc8_10) [concrete = constants.%tuple.0d2] +// CHECK:STDOUT: %.loc8_16.3: type = converted %.loc8_16.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_7.2: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @F.%HoldsType.loc8_41.1 (%HoldsType.a83) = value_param call_param0 -// CHECK:STDOUT: %.loc8_41: type = splice_block %HoldsType.loc8_41.2 [symbolic = %HoldsType.loc8_41.1 (constants.%HoldsType.a83)] { +// CHECK:STDOUT: %x.param: @F.%HoldsType.loc8_40.1 (%HoldsType.a83) = value_param call_param0 +// CHECK:STDOUT: %.loc8_40: type = splice_block %HoldsType.loc8_40.2 [symbolic = %HoldsType.loc8_40.1 (constants.%HoldsType.a83)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc8_40: %tuple.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %HoldsType.loc8_41.2: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc8_41.1 (constants.%HoldsType.a83)] +// CHECK:STDOUT: %T.ref.loc8_39: %tuple.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] +// CHECK:STDOUT: %HoldsType.loc8_40.2: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc8_40.1 (constants.%HoldsType.a83)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%HoldsType.loc8_41.1 (%HoldsType.a83) = wrapper_binding x, %x.param -// CHECK:STDOUT: %a.param: @F.%tuple.elem0.loc8_55.1 (%tuple.elem0) = value_param call_param1 -// CHECK:STDOUT: %.loc8_55: type = splice_block %tuple.elem0.loc8_55.2 [symbolic = %tuple.elem0.loc8_55.1 (constants.%tuple.elem0)] { -// CHECK:STDOUT: %T.ref.loc8_54: %tuple.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] +// CHECK:STDOUT: %x: @F.%HoldsType.loc8_40.1 (%HoldsType.a83) = wrapper_binding x, %x.param +// CHECK:STDOUT: %a.param: @F.%tuple.elem0.loc8_54.1 (%tuple.elem0) = value_param call_param1 +// CHECK:STDOUT: %.loc8_54: type = splice_block %tuple.elem0.loc8_54.2 [symbolic = %tuple.elem0.loc8_54.1 (constants.%tuple.elem0)] { +// CHECK:STDOUT: %T.ref.loc8_53: %tuple.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %tuple.elem0.loc8_55.2: type = tuple_access %T.ref.loc8_54, element0 [symbolic = %tuple.elem0.loc8_55.1 (constants.%tuple.elem0)] +// CHECK:STDOUT: %tuple.elem0.loc8_54.2: type = tuple_access %T.ref.loc8_53, element0 [symbolic = %tuple.elem0.loc8_54.1 (constants.%tuple.elem0)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%tuple.elem0.loc8_55.1 (%tuple.elem0) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%tuple.elem0.loc8_54.1 (%tuple.elem0) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} @@ -241,20 +241,20 @@ fn G() { // CHECK:STDOUT: generic fn @F(%T.loc8_7.2: %tuple.type) { // CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.f1e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc8_7.1: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %HoldsType.loc8_41.1: type = class_type @HoldsType, @HoldsType(%T.loc8_7.1) [symbolic = %HoldsType.loc8_41.1 (constants.%HoldsType.a83)] -// CHECK:STDOUT: %pattern_type.loc8_28: type = pattern_type %HoldsType.loc8_41.1 [symbolic = %pattern_type.loc8_28 (constants.%pattern_type.b2f)] -// CHECK:STDOUT: %x.param_patt.loc8_28.2: @F.%pattern_type.loc8_28 (%pattern_type.b2f) = value_param_pattern [symbolic = %x.param_patt.loc8_28.2 (constants.%x.param_patt.321)] -// CHECK:STDOUT: %x.patt.loc8_28.2: @F.%pattern_type.loc8_28 (%pattern_type.b2f) = at_binding_pattern x, %x.param_patt.loc8_28.2 [symbolic = %x.patt.loc8_28.2 (constants.%x.patt.a80)] -// CHECK:STDOUT: %tuple.elem0.loc8_55.1: type = tuple_access %T.loc8_7.1, element0 [symbolic = %tuple.elem0.loc8_55.1 (constants.%tuple.elem0)] -// CHECK:STDOUT: %pattern_type.loc8_52: type = pattern_type %tuple.elem0.loc8_55.1 [symbolic = %pattern_type.loc8_52 (constants.%pattern_type.e66)] -// CHECK:STDOUT: %a.param_patt.loc8_52.2: @F.%pattern_type.loc8_52 (%pattern_type.e66) = value_param_pattern [symbolic = %a.param_patt.loc8_52.2 (constants.%a.param_patt.d7c)] -// CHECK:STDOUT: %a.patt.loc8_52.2: @F.%pattern_type.loc8_52 (%pattern_type.e66) = at_binding_pattern a, %a.param_patt.loc8_52.2 [symbolic = %a.patt.loc8_52.2 (constants.%a.patt.803)] +// CHECK:STDOUT: %HoldsType.loc8_40.1: type = class_type @HoldsType, @HoldsType(%T.loc8_7.1) [symbolic = %HoldsType.loc8_40.1 (constants.%HoldsType.a83)] +// CHECK:STDOUT: %pattern_type.loc8_27: type = pattern_type %HoldsType.loc8_40.1 [symbolic = %pattern_type.loc8_27 (constants.%pattern_type.b2f)] +// CHECK:STDOUT: %x.param_patt.loc8_27.2: @F.%pattern_type.loc8_27 (%pattern_type.b2f) = value_param_pattern [symbolic = %x.param_patt.loc8_27.2 (constants.%x.param_patt.321)] +// CHECK:STDOUT: %x.patt.loc8_27.2: @F.%pattern_type.loc8_27 (%pattern_type.b2f) = at_binding_pattern x, %x.param_patt.loc8_27.2 [symbolic = %x.patt.loc8_27.2 (constants.%x.patt.a80)] +// CHECK:STDOUT: %tuple.elem0.loc8_54.1: type = tuple_access %T.loc8_7.1, element0 [symbolic = %tuple.elem0.loc8_54.1 (constants.%tuple.elem0)] +// CHECK:STDOUT: %pattern_type.loc8_51: type = pattern_type %tuple.elem0.loc8_54.1 [symbolic = %pattern_type.loc8_51 (constants.%pattern_type.e66)] +// CHECK:STDOUT: %a.param_patt.loc8_51.2: @F.%pattern_type.loc8_51 (%pattern_type.e66) = value_param_pattern [symbolic = %a.param_patt.loc8_51.2 (constants.%a.param_patt.d7c)] +// CHECK:STDOUT: %a.patt.loc8_51.2: @F.%pattern_type.loc8_51 (%pattern_type.e66) = at_binding_pattern a, %a.param_patt.loc8_51.2 [symbolic = %a.patt.loc8_51.2 (constants.%a.patt.803)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc8_28: = require_complete_type %HoldsType.loc8_41.1 [symbolic = %require_complete.loc8_28 (constants.%require_complete.9de)] -// CHECK:STDOUT: %require_complete.loc8_52: = require_complete_type %tuple.elem0.loc8_55.1 [symbolic = %require_complete.loc8_52 (constants.%require_complete.e7a)] +// CHECK:STDOUT: %require_complete.loc8_27: = require_complete_type %HoldsType.loc8_40.1 [symbolic = %require_complete.loc8_27 (constants.%require_complete.9de)] +// CHECK:STDOUT: %require_complete.loc8_51: = require_complete_type %tuple.elem0.loc8_54.1 [symbolic = %require_complete.loc8_51 (constants.%require_complete.e7a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%HoldsType.loc8_41.1 (%HoldsType.a83), %a.param: @F.%tuple.elem0.loc8_55.1 (%tuple.elem0)) { +// CHECK:STDOUT: fn(%x.param: @F.%HoldsType.loc8_40.1 (%HoldsType.a83), %a.param: @F.%tuple.elem0.loc8_54.1 (%tuple.elem0)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -318,14 +318,14 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_7.1 => constants.%T -// CHECK:STDOUT: %HoldsType.loc8_41.1 => constants.%HoldsType.a83 -// CHECK:STDOUT: %pattern_type.loc8_28 => constants.%pattern_type.b2f -// CHECK:STDOUT: %x.param_patt.loc8_28.2 => constants.%x.param_patt.321 -// CHECK:STDOUT: %x.patt.loc8_28.2 => constants.%x.patt.a80 -// CHECK:STDOUT: %tuple.elem0.loc8_55.1 => constants.%tuple.elem0 -// CHECK:STDOUT: %pattern_type.loc8_52 => constants.%pattern_type.e66 -// CHECK:STDOUT: %a.param_patt.loc8_52.2 => constants.%a.param_patt.d7c -// CHECK:STDOUT: %a.patt.loc8_52.2 => constants.%a.patt.803 +// CHECK:STDOUT: %HoldsType.loc8_40.1 => constants.%HoldsType.a83 +// CHECK:STDOUT: %pattern_type.loc8_27 => constants.%pattern_type.b2f +// CHECK:STDOUT: %x.param_patt.loc8_27.2 => constants.%x.param_patt.321 +// CHECK:STDOUT: %x.patt.loc8_27.2 => constants.%x.patt.a80 +// CHECK:STDOUT: %tuple.elem0.loc8_54.1 => constants.%tuple.elem0 +// CHECK:STDOUT: %pattern_type.loc8_51 => constants.%pattern_type.e66 +// CHECK:STDOUT: %a.param_patt.loc8_51.2 => constants.%a.param_patt.d7c +// CHECK:STDOUT: %a.patt.loc8_51.2 => constants.%a.patt.803 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%tuple.e45) { @@ -338,18 +338,18 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%tuple.e45) { // CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_7.1 => constants.%tuple.e45 -// CHECK:STDOUT: %HoldsType.loc8_41.1 => constants.%HoldsType.30f -// CHECK:STDOUT: %pattern_type.loc8_28 => constants.%pattern_type.ff4 -// CHECK:STDOUT: %x.param_patt.loc8_28.2 => constants.%x.param_patt.995 -// CHECK:STDOUT: %x.patt.loc8_28.2 => constants.%x.patt.ea0 -// CHECK:STDOUT: %tuple.elem0.loc8_55.1 => constants.%C -// CHECK:STDOUT: %pattern_type.loc8_52 => constants.%pattern_type.98b -// CHECK:STDOUT: %a.param_patt.loc8_52.2 => constants.%a.param_patt.c88 -// CHECK:STDOUT: %a.patt.loc8_52.2 => constants.%a.patt.159 +// CHECK:STDOUT: %HoldsType.loc8_40.1 => constants.%HoldsType.30f +// CHECK:STDOUT: %pattern_type.loc8_27 => constants.%pattern_type.ff4 +// CHECK:STDOUT: %x.param_patt.loc8_27.2 => constants.%x.param_patt.995 +// CHECK:STDOUT: %x.patt.loc8_27.2 => constants.%x.patt.ea0 +// CHECK:STDOUT: %tuple.elem0.loc8_54.1 => constants.%C +// CHECK:STDOUT: %pattern_type.loc8_51 => constants.%pattern_type.98b +// CHECK:STDOUT: %a.param_patt.loc8_51.2 => constants.%a.param_patt.c88 +// CHECK:STDOUT: %a.patt.loc8_51.2 => constants.%a.patt.159 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc8_28 => constants.%complete_type -// CHECK:STDOUT: %require_complete.loc8_52 => constants.%complete_type +// CHECK:STDOUT: %require_complete.loc8_27 => constants.%complete_type +// CHECK:STDOUT: %require_complete.loc8_51 => constants.%complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- struct_access.carbon @@ -425,39 +425,39 @@ fn G() { // CHECK:STDOUT: %HoldsType.decl: %HoldsType.type = class_decl @HoldsType [concrete = constants.%HoldsType.generic] { // CHECK:STDOUT: %T.patt.loc4_18.1: %pattern_type.7f2 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_30: type = splice_block %struct_type.t [concrete = constants.%struct_type.t] { +// CHECK:STDOUT: %.loc4_29: type = splice_block %struct_type.t [concrete = constants.%struct_type.t] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_26: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_25: type = type_literal type [concrete = type] // CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete = constants.%struct_type.t] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_18.2: %struct_type.t = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc8_7.1: %pattern_type.7f2 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc8_30.1: @F.%pattern_type.loc8_30 (%pattern_type.ce7) = value_param_pattern [symbolic = %x.param_patt.loc8_30.2 (constants.%x.param_patt.ade)] -// CHECK:STDOUT: %x.patt.loc8_30.1: @F.%pattern_type.loc8_30 (%pattern_type.ce7) = at_binding_pattern x, %x.param_patt.loc8_30.1 [symbolic = %x.patt.loc8_30.2 (constants.%x.patt.d2a)] -// CHECK:STDOUT: %a.param_patt.loc8_54.1: @F.%pattern_type.loc8_54 (%pattern_type.92c) = value_param_pattern [symbolic = %a.param_patt.loc8_54.2 (constants.%a.param_patt.314)] -// CHECK:STDOUT: %a.patt.loc8_54.1: @F.%pattern_type.loc8_54 (%pattern_type.92c) = at_binding_pattern a, %a.param_patt.loc8_54.1 [symbolic = %a.patt.loc8_54.2 (constants.%a.patt.92f)] +// CHECK:STDOUT: %x.param_patt.loc8_29.1: @F.%pattern_type.loc8_29 (%pattern_type.ce7) = value_param_pattern [symbolic = %x.param_patt.loc8_29.2 (constants.%x.param_patt.ade)] +// CHECK:STDOUT: %x.patt.loc8_29.1: @F.%pattern_type.loc8_29 (%pattern_type.ce7) = at_binding_pattern x, %x.param_patt.loc8_29.1 [symbolic = %x.patt.loc8_29.2 (constants.%x.patt.d2a)] +// CHECK:STDOUT: %a.param_patt.loc8_53.1: @F.%pattern_type.loc8_53 (%pattern_type.92c) = value_param_pattern [symbolic = %a.param_patt.loc8_53.2 (constants.%a.param_patt.314)] +// CHECK:STDOUT: %a.patt.loc8_53.1: @F.%pattern_type.loc8_53 (%pattern_type.92c) = at_binding_pattern a, %a.param_patt.loc8_53.1 [symbolic = %a.patt.loc8_53.2 (constants.%a.patt.92f)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_19: type = splice_block %struct_type.t [concrete = constants.%struct_type.t] { +// CHECK:STDOUT: %.loc8_18: type = splice_block %struct_type.t [concrete = constants.%struct_type.t] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_15: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_14: type = type_literal type [concrete = type] // CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete = constants.%struct_type.t] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_7.2: %struct_type.t = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @F.%HoldsType.loc8_43.1 (%HoldsType.07e) = value_param call_param0 -// CHECK:STDOUT: %.loc8_43: type = splice_block %HoldsType.loc8_43.2 [symbolic = %HoldsType.loc8_43.1 (constants.%HoldsType.07e)] { +// CHECK:STDOUT: %x.param: @F.%HoldsType.loc8_42.1 (%HoldsType.07e) = value_param call_param0 +// CHECK:STDOUT: %.loc8_42: type = splice_block %HoldsType.loc8_42.2 [symbolic = %HoldsType.loc8_42.1 (constants.%HoldsType.07e)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc8_42: %struct_type.t = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %HoldsType.loc8_43.2: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc8_43.1 (constants.%HoldsType.07e)] +// CHECK:STDOUT: %T.ref.loc8_41: %struct_type.t = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] +// CHECK:STDOUT: %HoldsType.loc8_42.2: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc8_42.1 (constants.%HoldsType.07e)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%HoldsType.loc8_43.1 (%HoldsType.07e) = wrapper_binding x, %x.param -// CHECK:STDOUT: %a.param: @F.%.loc8_57.1 (%.424) = value_param call_param1 -// CHECK:STDOUT: %.loc8_57.2: type = splice_block %.loc8_57.3 [symbolic = %.loc8_57.1 (constants.%.424)] { -// CHECK:STDOUT: %T.ref.loc8_56: %struct_type.t = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc8_57.3: type = struct_access %T.ref.loc8_56, element0 [symbolic = %.loc8_57.1 (constants.%.424)] +// CHECK:STDOUT: %x: @F.%HoldsType.loc8_42.1 (%HoldsType.07e) = wrapper_binding x, %x.param +// CHECK:STDOUT: %a.param: @F.%.loc8_56.1 (%.424) = value_param call_param1 +// CHECK:STDOUT: %.loc8_56.2: type = splice_block %.loc8_56.3 [symbolic = %.loc8_56.1 (constants.%.424)] { +// CHECK:STDOUT: %T.ref.loc8_55: %struct_type.t = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] +// CHECK:STDOUT: %.loc8_56.3: type = struct_access %T.ref.loc8_55, element0 [symbolic = %.loc8_56.1 (constants.%.424)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%.loc8_57.1 (%.424) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%.loc8_56.1 (%.424) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} @@ -489,20 +489,20 @@ fn G() { // CHECK:STDOUT: generic fn @F(%T.loc8_7.2: %struct_type.t) { // CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.7f2 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc8_7.1: %struct_type.t = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %HoldsType.loc8_43.1: type = class_type @HoldsType, @HoldsType(%T.loc8_7.1) [symbolic = %HoldsType.loc8_43.1 (constants.%HoldsType.07e)] -// CHECK:STDOUT: %pattern_type.loc8_30: type = pattern_type %HoldsType.loc8_43.1 [symbolic = %pattern_type.loc8_30 (constants.%pattern_type.ce7)] -// CHECK:STDOUT: %x.param_patt.loc8_30.2: @F.%pattern_type.loc8_30 (%pattern_type.ce7) = value_param_pattern [symbolic = %x.param_patt.loc8_30.2 (constants.%x.param_patt.ade)] -// CHECK:STDOUT: %x.patt.loc8_30.2: @F.%pattern_type.loc8_30 (%pattern_type.ce7) = at_binding_pattern x, %x.param_patt.loc8_30.2 [symbolic = %x.patt.loc8_30.2 (constants.%x.patt.d2a)] -// CHECK:STDOUT: %.loc8_57.1: type = struct_access %T.loc8_7.1, element0 [symbolic = %.loc8_57.1 (constants.%.424)] -// CHECK:STDOUT: %pattern_type.loc8_54: type = pattern_type %.loc8_57.1 [symbolic = %pattern_type.loc8_54 (constants.%pattern_type.92c)] -// CHECK:STDOUT: %a.param_patt.loc8_54.2: @F.%pattern_type.loc8_54 (%pattern_type.92c) = value_param_pattern [symbolic = %a.param_patt.loc8_54.2 (constants.%a.param_patt.314)] -// CHECK:STDOUT: %a.patt.loc8_54.2: @F.%pattern_type.loc8_54 (%pattern_type.92c) = at_binding_pattern a, %a.param_patt.loc8_54.2 [symbolic = %a.patt.loc8_54.2 (constants.%a.patt.92f)] +// CHECK:STDOUT: %HoldsType.loc8_42.1: type = class_type @HoldsType, @HoldsType(%T.loc8_7.1) [symbolic = %HoldsType.loc8_42.1 (constants.%HoldsType.07e)] +// CHECK:STDOUT: %pattern_type.loc8_29: type = pattern_type %HoldsType.loc8_42.1 [symbolic = %pattern_type.loc8_29 (constants.%pattern_type.ce7)] +// CHECK:STDOUT: %x.param_patt.loc8_29.2: @F.%pattern_type.loc8_29 (%pattern_type.ce7) = value_param_pattern [symbolic = %x.param_patt.loc8_29.2 (constants.%x.param_patt.ade)] +// CHECK:STDOUT: %x.patt.loc8_29.2: @F.%pattern_type.loc8_29 (%pattern_type.ce7) = at_binding_pattern x, %x.param_patt.loc8_29.2 [symbolic = %x.patt.loc8_29.2 (constants.%x.patt.d2a)] +// CHECK:STDOUT: %.loc8_56.1: type = struct_access %T.loc8_7.1, element0 [symbolic = %.loc8_56.1 (constants.%.424)] +// CHECK:STDOUT: %pattern_type.loc8_53: type = pattern_type %.loc8_56.1 [symbolic = %pattern_type.loc8_53 (constants.%pattern_type.92c)] +// CHECK:STDOUT: %a.param_patt.loc8_53.2: @F.%pattern_type.loc8_53 (%pattern_type.92c) = value_param_pattern [symbolic = %a.param_patt.loc8_53.2 (constants.%a.param_patt.314)] +// CHECK:STDOUT: %a.patt.loc8_53.2: @F.%pattern_type.loc8_53 (%pattern_type.92c) = at_binding_pattern a, %a.param_patt.loc8_53.2 [symbolic = %a.patt.loc8_53.2 (constants.%a.patt.92f)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc8_30: = require_complete_type %HoldsType.loc8_43.1 [symbolic = %require_complete.loc8_30 (constants.%require_complete.d40)] -// CHECK:STDOUT: %require_complete.loc8_54: = require_complete_type %.loc8_57.1 [symbolic = %require_complete.loc8_54 (constants.%require_complete.ba0)] +// CHECK:STDOUT: %require_complete.loc8_29: = require_complete_type %HoldsType.loc8_42.1 [symbolic = %require_complete.loc8_29 (constants.%require_complete.d40)] +// CHECK:STDOUT: %require_complete.loc8_53: = require_complete_type %.loc8_56.1 [symbolic = %require_complete.loc8_53 (constants.%require_complete.ba0)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%HoldsType.loc8_43.1 (%HoldsType.07e), %a.param: @F.%.loc8_57.1 (%.424)) { +// CHECK:STDOUT: fn(%x.param: @F.%HoldsType.loc8_42.1 (%HoldsType.07e), %a.param: @F.%.loc8_56.1 (%.424)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -566,14 +566,14 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_7.1 => constants.%T -// CHECK:STDOUT: %HoldsType.loc8_43.1 => constants.%HoldsType.07e -// CHECK:STDOUT: %pattern_type.loc8_30 => constants.%pattern_type.ce7 -// CHECK:STDOUT: %x.param_patt.loc8_30.2 => constants.%x.param_patt.ade -// CHECK:STDOUT: %x.patt.loc8_30.2 => constants.%x.patt.d2a -// CHECK:STDOUT: %.loc8_57.1 => constants.%.424 -// CHECK:STDOUT: %pattern_type.loc8_54 => constants.%pattern_type.92c -// CHECK:STDOUT: %a.param_patt.loc8_54.2 => constants.%a.param_patt.314 -// CHECK:STDOUT: %a.patt.loc8_54.2 => constants.%a.patt.92f +// CHECK:STDOUT: %HoldsType.loc8_42.1 => constants.%HoldsType.07e +// CHECK:STDOUT: %pattern_type.loc8_29 => constants.%pattern_type.ce7 +// CHECK:STDOUT: %x.param_patt.loc8_29.2 => constants.%x.param_patt.ade +// CHECK:STDOUT: %x.patt.loc8_29.2 => constants.%x.patt.d2a +// CHECK:STDOUT: %.loc8_56.1 => constants.%.424 +// CHECK:STDOUT: %pattern_type.loc8_53 => constants.%pattern_type.92c +// CHECK:STDOUT: %a.param_patt.loc8_53.2 => constants.%a.param_patt.314 +// CHECK:STDOUT: %a.patt.loc8_53.2 => constants.%a.patt.92f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%struct) { @@ -586,18 +586,18 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%struct) { // CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_7.1 => constants.%struct -// CHECK:STDOUT: %HoldsType.loc8_43.1 => constants.%HoldsType.53c -// CHECK:STDOUT: %pattern_type.loc8_30 => constants.%pattern_type.1fc -// CHECK:STDOUT: %x.param_patt.loc8_30.2 => constants.%x.param_patt.4a0 -// CHECK:STDOUT: %x.patt.loc8_30.2 => constants.%x.patt.5e6 -// CHECK:STDOUT: %.loc8_57.1 => constants.%C -// CHECK:STDOUT: %pattern_type.loc8_54 => constants.%pattern_type.98b -// CHECK:STDOUT: %a.param_patt.loc8_54.2 => constants.%a.param_patt.c88 -// CHECK:STDOUT: %a.patt.loc8_54.2 => constants.%a.patt.159 +// CHECK:STDOUT: %HoldsType.loc8_42.1 => constants.%HoldsType.53c +// CHECK:STDOUT: %pattern_type.loc8_29 => constants.%pattern_type.1fc +// CHECK:STDOUT: %x.param_patt.loc8_29.2 => constants.%x.param_patt.4a0 +// CHECK:STDOUT: %x.patt.loc8_29.2 => constants.%x.patt.5e6 +// CHECK:STDOUT: %.loc8_56.1 => constants.%C +// CHECK:STDOUT: %pattern_type.loc8_53 => constants.%pattern_type.98b +// CHECK:STDOUT: %a.param_patt.loc8_53.2 => constants.%a.param_patt.c88 +// CHECK:STDOUT: %a.patt.loc8_53.2 => constants.%a.patt.159 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc8_30 => constants.%complete_type -// CHECK:STDOUT: %require_complete.loc8_54 => constants.%complete_type +// CHECK:STDOUT: %require_complete.loc8_29 => constants.%complete_type +// CHECK:STDOUT: %require_complete.loc8_53 => constants.%complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_class_access.carbon @@ -692,41 +692,41 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc21_7.1: %pattern_type.f15 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_7.2 (constants.%T.patt.125)] -// CHECK:STDOUT: %x.param_patt.loc21_25.1: @F.%pattern_type (%pattern_type.e53) = value_param_pattern [symbolic = %x.param_patt.loc21_25.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc21_25.1: @F.%pattern_type (%pattern_type.e53) = at_binding_pattern x, %x.param_patt.loc21_25.1 [symbolic = %x.patt.loc21_25.2 (constants.%x.patt)] +// CHECK:STDOUT: %x.param_patt.loc21_24.1: @F.%pattern_type (%pattern_type.e53) = value_param_pattern [symbolic = %x.param_patt.loc21_24.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc21_24.1: @F.%pattern_type (%pattern_type.e53) = at_binding_pattern x, %x.param_patt.loc21_24.1 [symbolic = %x.patt.loc21_24.2 (constants.%x.patt)] // CHECK:STDOUT: %a.param_patt: = value_param_pattern [concrete = ] // CHECK:STDOUT: %a.patt: = at_binding_pattern a, %a.param_patt [concrete = ] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_10: type = splice_block %Class.ref [concrete = constants.%Class] { +// CHECK:STDOUT: %.loc21_9: type = splice_block %Class.ref [concrete = constants.%Class] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc21_7.2: %Class = symbolic_binding T, 0 [symbolic = %T.loc21_7.1 (constants.%T.f25)] -// CHECK:STDOUT: %x.param: @F.%HoldsType.loc21_38.1 (%HoldsType.3500da.1) = value_param call_param0 -// CHECK:STDOUT: %.loc21_38: type = splice_block %HoldsType.loc21_38.2 [symbolic = %HoldsType.loc21_38.1 (constants.%HoldsType.3500da.1)] { +// CHECK:STDOUT: %x.param: @F.%HoldsType.loc21_37.1 (%HoldsType.3500da.1) = value_param call_param0 +// CHECK:STDOUT: %.loc21_37: type = splice_block %HoldsType.loc21_37.2 [symbolic = %HoldsType.loc21_37.1 (constants.%HoldsType.3500da.1)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc21_37: %Class = name_ref T, %T.loc21_7.2 [symbolic = %T.loc21_7.1 (constants.%T.f25)] -// CHECK:STDOUT: %HoldsType.loc21_38.2: type = class_type @HoldsType, @HoldsType(constants.%T.f25) [symbolic = %HoldsType.loc21_38.1 (constants.%HoldsType.3500da.1)] +// CHECK:STDOUT: %T.ref.loc21_36: %Class = name_ref T, %T.loc21_7.2 [symbolic = %T.loc21_7.1 (constants.%T.f25)] +// CHECK:STDOUT: %HoldsType.loc21_37.2: type = class_type @HoldsType, @HoldsType(constants.%T.f25) [symbolic = %HoldsType.loc21_37.1 (constants.%HoldsType.3500da.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%HoldsType.loc21_38.1 (%HoldsType.3500da.1) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @F.%HoldsType.loc21_37.1 (%HoldsType.3500da.1) = wrapper_binding x, %x.param // CHECK:STDOUT: %a.param: = value_param call_param1 // CHECK:STDOUT: %.1: = splice_block [concrete = ] { -// CHECK:STDOUT: %T.ref.loc21_51: %Class = name_ref T, %T.loc21_7.2 [symbolic = %T.loc21_7.1 (constants.%T.f25)] +// CHECK:STDOUT: %T.ref.loc21_50: %Class = name_ref T, %T.loc21_7.2 [symbolic = %T.loc21_7.1 (constants.%T.f25)] // CHECK:STDOUT: %t.ref: %Class.elem = name_ref t, @Class.%.loc5 [concrete = @Class.%.loc5] -// CHECK:STDOUT: %.loc21_52.2: ref type = class_element_access %T.ref.loc21_51, element0 [symbolic = %.loc21_52.1 (constants.%.9dd)] -// CHECK:STDOUT: %.loc21_52.3: type = acquire_value %.loc21_52.2 +// CHECK:STDOUT: %.loc21_51.2: ref type = class_element_access %T.ref.loc21_50, element0 [symbolic = %.loc21_51.1 (constants.%.9dd)] +// CHECK:STDOUT: %.loc21_51.3: type = acquire_value %.loc21_51.2 // CHECK:STDOUT: } // CHECK:STDOUT: %a: = wrapper_binding a, [concrete = ] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %c.patt.loc25_7.1: %pattern_type.f15 = symbolic_binding_pattern c, 0 [symbolic = %c.patt.loc25_7.2 (constants.%c.patt)] +// CHECK:STDOUT: %c.patt.loc25_15.1: %pattern_type.f15 = symbolic_binding_pattern c, 0 [symbolic = %c.patt.loc25_15.2 (constants.%c.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc25: type = splice_block %Class.ref [concrete = constants.%Class] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] // CHECK:STDOUT: } -// CHECK:STDOUT: %c.loc25_7.2: %Class = symbolic_binding c, 0 [symbolic = %c.loc25_7.1 (constants.%c)] +// CHECK:STDOUT: %c.loc25_15.2: %Class = symbolic_binding c, 0 [symbolic = %c.loc25_15.1 (constants.%c)] // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {} {} // CHECK:STDOUT: } @@ -767,16 +767,16 @@ fn G() { // CHECK:STDOUT: generic fn @F(%T.loc21_7.2: %Class) { // CHECK:STDOUT: %T.patt.loc21_7.2: %pattern_type.f15 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_7.2 (constants.%T.patt.125)] // CHECK:STDOUT: %T.loc21_7.1: %Class = symbolic_binding T, 0 [symbolic = %T.loc21_7.1 (constants.%T.f25)] -// CHECK:STDOUT: %HoldsType.loc21_38.1: type = class_type @HoldsType, @HoldsType(%T.loc21_7.1) [symbolic = %HoldsType.loc21_38.1 (constants.%HoldsType.3500da.1)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %HoldsType.loc21_38.1 [symbolic = %pattern_type (constants.%pattern_type.e53)] -// CHECK:STDOUT: %x.param_patt.loc21_25.2: @F.%pattern_type (%pattern_type.e53) = value_param_pattern [symbolic = %x.param_patt.loc21_25.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc21_25.2: @F.%pattern_type (%pattern_type.e53) = at_binding_pattern x, %x.param_patt.loc21_25.2 [symbolic = %x.patt.loc21_25.2 (constants.%x.patt)] -// CHECK:STDOUT: %.loc21_52.1: ref type = class_element_access %T.loc21_7.1, element0 [symbolic = %.loc21_52.1 (constants.%.9dd)] +// CHECK:STDOUT: %HoldsType.loc21_37.1: type = class_type @HoldsType, @HoldsType(%T.loc21_7.1) [symbolic = %HoldsType.loc21_37.1 (constants.%HoldsType.3500da.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %HoldsType.loc21_37.1 [symbolic = %pattern_type (constants.%pattern_type.e53)] +// CHECK:STDOUT: %x.param_patt.loc21_24.2: @F.%pattern_type (%pattern_type.e53) = value_param_pattern [symbolic = %x.param_patt.loc21_24.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc21_24.2: @F.%pattern_type (%pattern_type.e53) = at_binding_pattern x, %x.param_patt.loc21_24.2 [symbolic = %x.patt.loc21_24.2 (constants.%x.patt)] +// CHECK:STDOUT: %.loc21_51.1: ref type = class_element_access %T.loc21_7.1, element0 [symbolic = %.loc21_51.1 (constants.%.9dd)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %HoldsType.loc21_38.1 [symbolic = %require_complete (constants.%require_complete.6f4d7d.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %HoldsType.loc21_37.1 [symbolic = %require_complete (constants.%require_complete.6f4d7d.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%HoldsType.loc21_38.1 (%HoldsType.3500da.1), %a.param: ) { +// CHECK:STDOUT: fn(%x.param: @F.%HoldsType.loc21_37.1 (%HoldsType.3500da.1), %a.param: ) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -784,12 +784,12 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%c.loc25_7.2: %Class) { -// CHECK:STDOUT: %c.patt.loc25_7.2: %pattern_type.f15 = symbolic_binding_pattern c, 0 [symbolic = %c.patt.loc25_7.2 (constants.%c.patt)] -// CHECK:STDOUT: %c.loc25_7.1: %Class = symbolic_binding c, 0 [symbolic = %c.loc25_7.1 (constants.%c)] +// CHECK:STDOUT: generic fn @G(%c.loc25_15.2: %Class) { +// CHECK:STDOUT: %c.patt.loc25_15.2: %pattern_type.f15 = symbolic_binding_pattern c, 0 [symbolic = %c.patt.loc25_15.2 (constants.%c.patt)] +// CHECK:STDOUT: %c.loc25_15.1: %Class = symbolic_binding c, 0 [symbolic = %c.loc25_15.1 (constants.%c)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %HoldsType.loc26_22.2: type = class_type @HoldsType, @HoldsType(%c.loc25_7.1) [symbolic = %HoldsType.loc26_22.2 (constants.%HoldsType.3500da.2)] +// CHECK:STDOUT: %HoldsType.loc26_22.2: type = class_type @HoldsType, @HoldsType(%c.loc25_15.1) [symbolic = %HoldsType.loc26_22.2 (constants.%HoldsType.3500da.2)] // CHECK:STDOUT: %require_complete: = require_complete_type %HoldsType.loc26_22.2 [symbolic = %require_complete (constants.%require_complete.6f4d7d.2)] // CHECK:STDOUT: %HoldsType.val: @G.%HoldsType.loc26_22.2 (%HoldsType.3500da.2) = struct_value () [symbolic = %HoldsType.val (constants.%HoldsType.val.7f1)] // CHECK:STDOUT: @@ -798,7 +798,7 @@ fn G() { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %.loc26_6.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %c.ref: %Class = name_ref c, %c.loc25_7.2 [symbolic = %c.loc25_7.1 (constants.%c)] +// CHECK:STDOUT: %c.ref: %Class = name_ref c, %c.loc25_15.2 [symbolic = %c.loc25_15.1 (constants.%c)] // CHECK:STDOUT: %HoldsType.loc26_22.1: type = class_type @HoldsType, @HoldsType(constants.%c) [symbolic = %HoldsType.loc26_22.2 (constants.%HoldsType.3500da.2)] // CHECK:STDOUT: %.loc26_6.2: ref @G.%HoldsType.loc26_22.2 (%HoldsType.3500da.2) = temporary_storage // CHECK:STDOUT: %.loc26_6.3: init @G.%HoldsType.loc26_22.2 (%HoldsType.3500da.2) to %.loc26_6.2 = class_init () [symbolic = %HoldsType.val (constants.%HoldsType.val.7f1)] @@ -859,16 +859,16 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%T.f25) { // CHECK:STDOUT: %T.patt.loc21_7.2 => constants.%T.patt.125 // CHECK:STDOUT: %T.loc21_7.1 => constants.%T.f25 -// CHECK:STDOUT: %HoldsType.loc21_38.1 => constants.%HoldsType.3500da.1 +// CHECK:STDOUT: %HoldsType.loc21_37.1 => constants.%HoldsType.3500da.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e53 -// CHECK:STDOUT: %x.param_patt.loc21_25.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc21_25.2 => constants.%x.patt -// CHECK:STDOUT: %.loc21_52.1 => constants.%.9dd +// CHECK:STDOUT: %x.param_patt.loc21_24.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc21_24.2 => constants.%x.patt +// CHECK:STDOUT: %.loc21_51.1 => constants.%.9dd // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%c) { -// CHECK:STDOUT: %c.patt.loc25_7.2 => constants.%c.patt -// CHECK:STDOUT: %c.loc25_7.1 => constants.%c +// CHECK:STDOUT: %c.patt.loc25_15.2 => constants.%c.patt +// CHECK:STDOUT: %c.loc25_15.1 => constants.%c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%c) { @@ -879,8 +879,8 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%Class.val) { -// CHECK:STDOUT: %c.patt.loc25_7.2 => constants.%c.patt -// CHECK:STDOUT: %c.loc25_7.1 => constants.%Class.val +// CHECK:STDOUT: %c.patt.loc25_15.2 => constants.%c.patt +// CHECK:STDOUT: %c.loc25_15.1 => constants.%Class.val // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HoldsType.loc26_22.2 => constants.%HoldsType.af5 @@ -993,49 +993,49 @@ fn G() { // CHECK:STDOUT: %HoldsType.decl: %HoldsType.type = class_decl @HoldsType [concrete = constants.%HoldsType.generic] { // CHECK:STDOUT: %T.patt.loc4_18.1: %pattern_type.dcb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt.4c7)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_34: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc4_33: type = splice_block %array_type [concrete = constants.%array_type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_27: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_26: type = type_literal type [concrete = type] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %.loc4_27 [concrete = constants.%array_type] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %.loc4_26 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_18.2: %array_type = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T.9b7)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc12_7.1: %pattern_type.dcb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_7.2 (constants.%T.patt.4c7)] -// CHECK:STDOUT: %x.param_patt.loc12_34.1: @F.%pattern_type (%pattern_type.d35) = value_param_pattern [symbolic = %x.param_patt.loc12_34.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc12_34.1: @F.%pattern_type (%pattern_type.d35) = at_binding_pattern x, %x.param_patt.loc12_34.1 [symbolic = %x.patt.loc12_34.2 (constants.%x.patt)] +// CHECK:STDOUT: %x.param_patt.loc12_33.1: @F.%pattern_type (%pattern_type.d35) = value_param_pattern [symbolic = %x.param_patt.loc12_33.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc12_33.1: @F.%pattern_type (%pattern_type.d35) = at_binding_pattern x, %x.param_patt.loc12_33.1 [symbolic = %x.patt.loc12_33.2 (constants.%x.patt)] // CHECK:STDOUT: %a.param_patt: = value_param_pattern [concrete = ] // CHECK:STDOUT: %a.patt: = at_binding_pattern a, %a.param_patt [concrete = ] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_23: type = splice_block %array_type [concrete = constants.%array_type] { +// CHECK:STDOUT: %.loc12_22: type = splice_block %array_type [concrete = constants.%array_type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_16: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_15: type = type_literal type [concrete = type] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %.loc12_16 [concrete = constants.%array_type] +// CHECK:STDOUT: %array_type: type = array_type %int_1, %.loc12_15 [concrete = constants.%array_type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc12_7.2: %array_type = symbolic_binding T, 0 [symbolic = %T.loc12_7.1 (constants.%T.9b7)] -// CHECK:STDOUT: %x.param: @F.%HoldsType.loc12_47.1 (%HoldsType.881) = value_param call_param0 -// CHECK:STDOUT: %.loc12_47: type = splice_block %HoldsType.loc12_47.2 [symbolic = %HoldsType.loc12_47.1 (constants.%HoldsType.881)] { +// CHECK:STDOUT: %x.param: @F.%HoldsType.loc12_46.1 (%HoldsType.881) = value_param call_param0 +// CHECK:STDOUT: %.loc12_46: type = splice_block %HoldsType.loc12_46.2 [symbolic = %HoldsType.loc12_46.1 (constants.%HoldsType.881)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc12_46: %array_type = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T.9b7)] -// CHECK:STDOUT: %HoldsType.loc12_47.2: type = class_type @HoldsType, @HoldsType(constants.%T.9b7) [symbolic = %HoldsType.loc12_47.1 (constants.%HoldsType.881)] +// CHECK:STDOUT: %T.ref.loc12_45: %array_type = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T.9b7)] +// CHECK:STDOUT: %HoldsType.loc12_46.2: type = class_type @HoldsType, @HoldsType(constants.%T.9b7) [symbolic = %HoldsType.loc12_46.1 (constants.%HoldsType.881)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%HoldsType.loc12_47.1 (%HoldsType.881) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @F.%HoldsType.loc12_46.1 (%HoldsType.881) = wrapper_binding x, %x.param // CHECK:STDOUT: %a.param: = value_param call_param1 // CHECK:STDOUT: %.1: = splice_block [concrete = ] { -// CHECK:STDOUT: %T.ref.loc12_60: %array_type = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T.9b7)] +// CHECK:STDOUT: %T.ref.loc12_59: %array_type = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T.9b7)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] -// CHECK:STDOUT: %bound_method.loc12_62.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] +// CHECK:STDOUT: %bound_method.loc12_61.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc12_62.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc12_62.2(%int_0) [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc12_62.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc12_62.2: %i32 = converted %int_0, %.loc12_62.1 [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc12_63.1: ref %array_type = value_as_ref %T.ref.loc12_60 -// CHECK:STDOUT: %.loc12_63.2: ref type = array_index %.loc12_63.1, %.loc12_62.2 -// CHECK:STDOUT: %.loc12_63.3: type = acquire_value %.loc12_63.2 +// CHECK:STDOUT: %bound_method.loc12_61.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc12_61.2(%int_0) [concrete = constants.%int_0.3c0] +// CHECK:STDOUT: %.loc12_61.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.3c0] +// CHECK:STDOUT: %.loc12_61.2: %i32 = converted %int_0, %.loc12_61.1 [concrete = constants.%int_0.3c0] +// CHECK:STDOUT: %.loc12_62.1: ref %array_type = value_as_ref %T.ref.loc12_59 +// CHECK:STDOUT: %.loc12_62.2: ref type = array_index %.loc12_62.1, %.loc12_61.2 +// CHECK:STDOUT: %.loc12_62.3: type = acquire_value %.loc12_62.2 // CHECK:STDOUT: } // CHECK:STDOUT: %a: = wrapper_binding a, [concrete = ] // CHECK:STDOUT: } @@ -1069,15 +1069,15 @@ fn G() { // CHECK:STDOUT: generic fn @F(%T.loc12_7.2: %array_type) { // CHECK:STDOUT: %T.patt.loc12_7.2: %pattern_type.dcb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_7.2 (constants.%T.patt.4c7)] // CHECK:STDOUT: %T.loc12_7.1: %array_type = symbolic_binding T, 0 [symbolic = %T.loc12_7.1 (constants.%T.9b7)] -// CHECK:STDOUT: %HoldsType.loc12_47.1: type = class_type @HoldsType, @HoldsType(%T.loc12_7.1) [symbolic = %HoldsType.loc12_47.1 (constants.%HoldsType.881)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %HoldsType.loc12_47.1 [symbolic = %pattern_type (constants.%pattern_type.d35)] -// CHECK:STDOUT: %x.param_patt.loc12_34.2: @F.%pattern_type (%pattern_type.d35) = value_param_pattern [symbolic = %x.param_patt.loc12_34.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc12_34.2: @F.%pattern_type (%pattern_type.d35) = at_binding_pattern x, %x.param_patt.loc12_34.2 [symbolic = %x.patt.loc12_34.2 (constants.%x.patt)] +// CHECK:STDOUT: %HoldsType.loc12_46.1: type = class_type @HoldsType, @HoldsType(%T.loc12_7.1) [symbolic = %HoldsType.loc12_46.1 (constants.%HoldsType.881)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %HoldsType.loc12_46.1 [symbolic = %pattern_type (constants.%pattern_type.d35)] +// CHECK:STDOUT: %x.param_patt.loc12_33.2: @F.%pattern_type (%pattern_type.d35) = value_param_pattern [symbolic = %x.param_patt.loc12_33.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc12_33.2: @F.%pattern_type (%pattern_type.d35) = at_binding_pattern x, %x.param_patt.loc12_33.2 [symbolic = %x.patt.loc12_33.2 (constants.%x.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %HoldsType.loc12_47.1 [symbolic = %require_complete (constants.%require_complete.80d)] +// CHECK:STDOUT: %require_complete: = require_complete_type %HoldsType.loc12_46.1 [symbolic = %require_complete (constants.%require_complete.80d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%HoldsType.loc12_47.1 (%HoldsType.881), %a.param: ) { +// CHECK:STDOUT: fn(%x.param: @F.%HoldsType.loc12_46.1 (%HoldsType.881), %a.param: ) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -1136,10 +1136,10 @@ fn G() { // CHECK:STDOUT: specific @F(constants.%T.9b7) { // CHECK:STDOUT: %T.patt.loc12_7.2 => constants.%T.patt.4c7 // CHECK:STDOUT: %T.loc12_7.1 => constants.%T.9b7 -// CHECK:STDOUT: %HoldsType.loc12_47.1 => constants.%HoldsType.881 +// CHECK:STDOUT: %HoldsType.loc12_46.1 => constants.%HoldsType.881 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d35 -// CHECK:STDOUT: %x.param_patt.loc12_34.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc12_34.2 => constants.%x.patt +// CHECK:STDOUT: %x.param_patt.loc12_33.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc12_33.2 => constants.%x.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%array) { diff --git a/toolchain/check/testdata/deduce/where.carbon b/toolchain/check/testdata/deduce/where.carbon index 4b39bfba4e5c..fe5b0ff5bc7f 100644 --- a/toolchain/check/testdata/deduce/where.carbon +++ b/toolchain/check/testdata/deduce/where.carbon @@ -14,12 +14,12 @@ library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } -class C(unused T:! type) {} +class C(unused T: type) {} -fn F[U:! type](unused T:! Z where .Z1 = C(U)) {} +fn F[U: type](unused generic T: Z where .Z1 = C(U)) {} class D {} final impl () as Z where .Z1 = C(D) {} @@ -32,8 +32,8 @@ fn G() { // CHECK:STDERR: F(() as type); // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_where.carbon:[[@LINE-12]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F[U:! type](unused T:! Z where .Z1 = C(U)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F[U: type](unused generic T: Z where .Z1 = C(U)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(() as type); } diff --git a/toolchain/check/testdata/eval/aggregates.carbon b/toolchain/check/testdata/eval/aggregates.carbon index 3c9abc226d84..24a115e12f17 100644 --- a/toolchain/check/testdata/eval/aggregates.carbon +++ b/toolchain/check/testdata/eval/aggregates.carbon @@ -39,7 +39,7 @@ var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, library "[[@TEST_NAME]]"; // Check that we propagate the `symbolic` tag through evaluations. -fn F(T:! Core.Destroy) { +fn F(generic T: Core.Destroy) { //@dump-sem-ir-begin var unused u: (T*, const T); var unused v: {.a: T}; @@ -47,7 +47,7 @@ fn F(T:! Core.Destroy) { //@dump-sem-ir-end } -fn G(N:! i32) { +fn G(generic N: i32) { //@dump-sem-ir-begin var unused k: array(i32, N); //@dump-sem-ir-end @@ -609,11 +609,11 @@ fn G(N:! i32) { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.b8b = impl_witness_table (%Core.import_ref.32e), @Int.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc4_7.2: %Destroy.type) { +// CHECK:STDOUT: generic fn @F(%T.loc4_15.2: %Destroy.type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc6_19.2: type = facet_access_type %T.loc4_7.1 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] +// CHECK:STDOUT: %T.as_type.loc6_19.2: type = facet_access_type %T.loc4_15.1 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] // CHECK:STDOUT: %ptr.loc6_19.2: type = ptr_type %T.as_type.loc6_19.2 [symbolic = %ptr.loc6_19.2 (constants.%ptr.b37)] // CHECK:STDOUT: %const.loc6_22.2: type = const_type %T.as_type.loc6_19.2 [symbolic = %const.loc6_22.2 (constants.%const)] // CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%ptr.loc6_19.2, %const.loc6_22.2) [symbolic = %tuple (constants.%tuple)] @@ -685,11 +685,11 @@ fn G(N:! i32) { // CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call.loc6: init @F.%tuple.type (%tuple.type.cd5) to %.loc6_3.1 = call %specific_impl_fn.loc6_30.1() // CHECK:STDOUT: assign %u.var, %DefaultOrUnformed.WithSelf.Op.call.loc6 // CHECK:STDOUT: %.loc6_29.1: type = splice_block %.loc6_29.3 [symbolic = %tuple.type (constants.%tuple.type.cd5)] { -// CHECK:STDOUT: %T.ref.loc6_18: %Destroy.type = name_ref T, %T.loc4_7.2 [symbolic = %T.loc4_7.1 (constants.%T.0e7)] +// CHECK:STDOUT: %T.ref.loc6_18: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.0e7)] // CHECK:STDOUT: %T.as_type.loc6_19.1: type = facet_access_type %T.ref.loc6_18 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] // CHECK:STDOUT: %.loc6_19: type = converted %T.ref.loc6_18, %T.as_type.loc6_19.1 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] // CHECK:STDOUT: %ptr.loc6_19.1: type = ptr_type %.loc6_19 [symbolic = %ptr.loc6_19.2 (constants.%ptr.b37)] -// CHECK:STDOUT: %T.ref.loc6_28: %Destroy.type = name_ref T, %T.loc4_7.2 [symbolic = %T.loc4_7.1 (constants.%T.0e7)] +// CHECK:STDOUT: %T.ref.loc6_28: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.0e7)] // CHECK:STDOUT: %T.as_type.loc6_22: type = facet_access_type %T.ref.loc6_28 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] // CHECK:STDOUT: %.loc6_22: type = converted %T.ref.loc6_28, %T.as_type.loc6_22 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] // CHECK:STDOUT: %const.loc6_22.1: type = const_type %.loc6_22 [symbolic = %const.loc6_22.2 (constants.%const)] @@ -711,7 +711,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call.loc7: init @F.%struct_type.a.loc7_23.2 (%struct_type.a) = call %specific_impl_fn.loc7_24.1() // CHECK:STDOUT: assign %v.var, %DefaultOrUnformed.WithSelf.Op.call.loc7 // CHECK:STDOUT: %.loc7_23: type = splice_block %struct_type.a.loc7_23.1 [symbolic = %struct_type.a.loc7_23.2 (constants.%struct_type.a)] { -// CHECK:STDOUT: %T.ref.loc7: %Destroy.type = name_ref T, %T.loc4_7.2 [symbolic = %T.loc4_7.1 (constants.%T.0e7)] +// CHECK:STDOUT: %T.ref.loc7: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.0e7)] // CHECK:STDOUT: %T.as_type.loc7: type = facet_access_type %T.ref.loc7 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] // CHECK:STDOUT: %.loc7_22: type = converted %T.ref.loc7, %T.as_type.loc7 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] // CHECK:STDOUT: %struct_type.a.loc7_23.1: type = struct_type {.a: @F.%T.as_type.loc6_19.2 (%T.as_type.700)} [symbolic = %struct_type.a.loc7_23.2 (constants.%struct_type.a)] @@ -732,7 +732,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call.loc8: init @F.%array_type.loc8_27.2 (%array_type.50f) to %.loc8_3.1 = call %specific_impl_fn.loc8_28.1() // CHECK:STDOUT: assign %w.var, %DefaultOrUnformed.WithSelf.Op.call.loc8 // CHECK:STDOUT: %.loc8_27: type = splice_block %array_type.loc8_27.1 [symbolic = %array_type.loc8_27.2 (constants.%array_type.50f)] { -// CHECK:STDOUT: %T.ref.loc8: %Destroy.type = name_ref T, %T.loc4_7.2 [symbolic = %T.loc4_7.1 (constants.%T.0e7)] +// CHECK:STDOUT: %T.ref.loc8: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.0e7)] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5] // CHECK:STDOUT: %T.as_type.loc8: type = facet_access_type %T.ref.loc8 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] // CHECK:STDOUT: %.loc8_23: type = converted %T.ref.loc8, %T.as_type.loc8 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] @@ -776,13 +776,13 @@ fn G(N:! i32) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%N.loc12_7.2: %i32) { +// CHECK:STDOUT: generic fn @G(%N.loc12_15.2: %i32) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc12_7.1, constants.%Int.as.ImplicitAs.impl.Convert.69e [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] -// CHECK:STDOUT: %bound_method.loc14_28.3: = bound_method %N.loc12_7.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc14_28.3 (constants.%bound_method)] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc14_28.2: init Core.IntLiteral = call %bound_method.loc14_28.3(%N.loc12_7.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc14_28.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc12_15.1, constants.%Int.as.ImplicitAs.impl.Convert.69e [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] +// CHECK:STDOUT: %bound_method.loc14_28.3: = bound_method %N.loc12_15.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc14_28.3 (constants.%bound_method)] +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc14_28.2: init Core.IntLiteral = call %bound_method.loc14_28.3(%N.loc12_15.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc14_28.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: %array_type.loc14_29.2: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc14_28.2, constants.%i32 [symbolic = %array_type.loc14_29.2 (constants.%array_type.359)] // CHECK:STDOUT: %require_complete: = require_complete_type %array_type.loc14_29.2 [symbolic = %require_complete (constants.%require_complete.f47)] // CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc14_29.2 [symbolic = %pattern_type (constants.%pattern_type.486)] @@ -816,7 +816,7 @@ fn G(N:! i32) { // CHECK:STDOUT: assign %k.var, %DefaultOrUnformed.WithSelf.Op.call // CHECK:STDOUT: %.loc14_29: type = splice_block %array_type.loc14_29.1 [symbolic = %array_type.loc14_29.2 (constants.%array_type.359)] { // CHECK:STDOUT: %i32.loc14: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc12_7.2 [symbolic = %N.loc12_7.1 (constants.%N.37f)] +// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc12_15.2 [symbolic = %N.loc12_15.1 (constants.%N.37f)] // CHECK:STDOUT: %impl.elem0.loc14_28: %.b08 = impl_witness_access constants.%ImplicitAs.impl_witness.416, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.69e] // CHECK:STDOUT: %bound_method.loc14_28.1: = bound_method %N.ref, %impl.elem0.loc14_28 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc14_28, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] @@ -847,12 +847,12 @@ fn G(N:! i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.0e7) { -// CHECK:STDOUT: %T.patt.loc4_7.2 => constants.%T.patt.351 -// CHECK:STDOUT: %T.loc4_7.1 => constants.%T.0e7 +// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt.351 +// CHECK:STDOUT: %T.loc4_15.1 => constants.%T.0e7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%N.37f) { -// CHECK:STDOUT: %N.patt.loc12_7.2 => constants.%N.patt.38a -// CHECK:STDOUT: %N.loc12_7.1 => constants.%N.37f +// CHECK:STDOUT: %N.patt.loc12_15.2 => constants.%N.patt.38a +// CHECK:STDOUT: %N.loc12_15.1 => constants.%N.37f // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/eval/call.carbon b/toolchain/check/testdata/eval/call.carbon index 8f241db939a2..a78e6c9f779f 100644 --- a/toolchain/check/testdata/eval/call.carbon +++ b/toolchain/check/testdata/eval/call.carbon @@ -71,7 +71,7 @@ library "[[@TEST_NAME]]"; eval fn F(x: i32) -> i32 { return x; } -fn G(N:! i32) { +fn G(generic N: i32) { // CHECK:STDERR: fail_todo_dependent_call.carbon:[[@LINE+4]]:17: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var unused a: array(i32, F(N)) = (0, 1, 2); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ @@ -90,7 +90,7 @@ eval fn F(_: i32) -> type { return C; } -fn UseFGenerically(X:! i32) { +fn UseFGenerically(generic X: i32) { // CHECK:STDERR: fail_todo_dependent_call_type.carbon:[[@LINE+12]]:3: error: member name of type `` in compound member access is not an instance member or an interface member [CompoundMemberAccessDoesNotUseBase] // CHECK:STDERR: var unused v: F(X) = {}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ @@ -164,7 +164,7 @@ class C {} eval fn F() -> C { return {}; } //@dump-sem-ir-end -fn G(_:! C) {} +fn G(generic _: C) {} fn H() { //@dump-sem-ir-begin diff --git a/toolchain/check/testdata/eval/symbolic.carbon b/toolchain/check/testdata/eval/symbolic.carbon index 1c4b1c6f3d8c..575ba2c57204 100644 --- a/toolchain/check/testdata/eval/symbolic.carbon +++ b/toolchain/check/testdata/eval/symbolic.carbon @@ -13,12 +13,12 @@ // --- symbolic_call_to_eval_fn.carbon library "[[@TEST_NAME]]"; -eval fn F(B:! bool) -> type { +eval fn F(generic B: bool) -> type { if (B) { return (); } return ({}, {}); } -fn G(B:! bool) { +fn G(generic B: bool) { let unused n: F(B) = ({}, {}); } @@ -30,12 +30,12 @@ fn H() { // --- fail_symbolic_call_to_eval_fn_invalid_instantiation.carbon library "[[@TEST_NAME]]"; -eval fn F(B:! bool) -> type { +eval fn F(generic B: bool) -> type { if (B) { return (); } return ({}, {}); } -fn G(B:! bool) { +fn G(generic B: bool) { let unused n: F(B) = ({}, {}); } @@ -55,7 +55,7 @@ library "[[@TEST_NAME]]"; interface Z {} impl {} as Z {} -eval fn E(U:! Z) -> type { +eval fn E(generic U: Z) -> type { // This makes a FacetAccessType(U) instruction, for which we have to get a // constant value from the definition in the called function's specific. This // requires that the called function has its specific definition resolved. @@ -95,16 +95,16 @@ fn F() { // CHECK:STDOUT: %Copy.impl_witness_table.4d6 = impl_witness_table (%Core.import_ref.9c3), @type.as.Copy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @E(%U.loc6_12.2: %Z.type) { +// CHECK:STDOUT: generic fn @E(%U.loc6_20.2: %Z.type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %U.as_type.loc11_11.2: type = facet_access_type %U.loc6_12.1 [symbolic = %U.as_type.loc11_11.2 (constants.%U.as_type.ff1)] +// CHECK:STDOUT: %U.as_type.loc11_11.2: type = facet_access_type %U.loc6_20.1 [symbolic = %U.as_type.loc11_11.2 (constants.%U.as_type.ff1)] // CHECK:STDOUT: %type.as.Copy.impl.Op.bound: = bound_method %U.as_type.loc11_11.2, constants.%type.as.Copy.impl.Op [symbolic = %type.as.Copy.impl.Op.bound (constants.%type.as.Copy.impl.Op.bound.05d)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %U.ref: %Z.type = name_ref U, %U.loc6_12.2 [symbolic = %U.loc6_12.1 (constants.%U.013)] +// CHECK:STDOUT: %U.ref: %Z.type = name_ref U, %U.loc6_20.2 [symbolic = %U.loc6_20.1 (constants.%U.013)] // CHECK:STDOUT: %U.as_type.loc11_11.1: type = facet_access_type %U.ref [symbolic = %U.as_type.loc11_11.2 (constants.%U.as_type.ff1)] // CHECK:STDOUT: %.loc11: type = converted %U.ref, %U.as_type.loc11_11.1 [symbolic = %U.as_type.loc11_11.2 (constants.%U.as_type.ff1)] // CHECK:STDOUT: %impl.elem0: %.524 = impl_witness_access constants.%Copy.impl_witness.638, element0 [concrete = constants.%type.as.Copy.impl.Op] @@ -117,13 +117,13 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @E(constants.%U.013) { -// CHECK:STDOUT: %U.patt.loc6_12.2 => constants.%U.patt.4a7 -// CHECK:STDOUT: %U.loc6_12.1 => constants.%U.013 +// CHECK:STDOUT: %U.patt.loc6_20.2 => constants.%U.patt.4a7 +// CHECK:STDOUT: %U.loc6_20.1 => constants.%U.013 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @E(constants.%Z.facet) { -// CHECK:STDOUT: %U.patt.loc6_12.2 => constants.%U.patt.4a7 -// CHECK:STDOUT: %U.loc6_12.1 => constants.%Z.facet +// CHECK:STDOUT: %U.patt.loc6_20.2 => constants.%U.patt.4a7 +// CHECK:STDOUT: %U.loc6_20.1 => constants.%Z.facet // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %U.as_type.loc11_11.2 => constants.%empty_struct_type diff --git a/toolchain/check/testdata/eval/unexpected_runtime.carbon b/toolchain/check/testdata/eval/unexpected_runtime.carbon index 5a243754787f..f7e633f08cad 100644 --- a/toolchain/check/testdata/eval/unexpected_runtime.carbon +++ b/toolchain/check/testdata/eval/unexpected_runtime.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; var x: type; interface Z { - let T:! type; + let T: type; } class D { @@ -33,7 +33,7 @@ library "[[@TEST_NAME]]"; var x: type; interface Z { - let T:! type; + let T: type; } class D { @@ -54,7 +54,7 @@ library "[[@TEST_NAME]]"; var x: type; interface Z { - let T:! type; + let T: type; } class D { @@ -70,7 +70,7 @@ library "[[@TEST_NAME]]"; var x: type; -interface Z(T:! type) {} +interface Z(T: type) {} class D { // CHECK:STDERR: fail_unexpected_runtime_impls_lhs.carbon:[[@LINE+4]]:29: error: cannot evaluate type expression [TypeExprEvaluationFailure] diff --git a/toolchain/check/testdata/facet/access.carbon b/toolchain/check/testdata/facet/access.carbon index c34f3c4f3f62..5dd52ddb56b5 100644 --- a/toolchain/check/testdata/facet/access.carbon +++ b/toolchain/check/testdata/facet/access.carbon @@ -18,7 +18,7 @@ interface I { fn DoIt(); } -fn Use(T:! I) { +fn Use(generic T: I) { //@dump-sem-ir-begin T.DoIt(); //@dump-sem-ir-end @@ -32,7 +32,7 @@ interface I { fn Make() -> Self; } -fn Use(T:! I) -> T { +fn Use(generic T: I) -> T { //@dump-sem-ir-begin return T.Make(); //@dump-sem-ir-end @@ -47,7 +47,7 @@ interface I { } //@dump-sem-ir-begin -fn Use[T:! I](x: T) -> T { +fn Use[T: I](x: T) -> T { return x.Copy(); } //@dump-sem-ir-end @@ -60,7 +60,7 @@ interface I { fn Hello(); } -fn Use[T:! I](x: T){ +fn Use[T: I](x: T){ //@dump-sem-ir-begin x.Hello(); //@dump-sem-ir-end @@ -74,7 +74,7 @@ interface I { fn Copy(self) -> Self; } -fn UseIndirect[T:! I](x: T) -> T { +fn UseIndirect[T: I](x: T) -> T { //@dump-sem-ir-begin return x.(T.Copy)(); //@dump-sem-ir-end @@ -84,10 +84,10 @@ fn UseIndirect[T:! I](x: T) -> T { library "[[@TEST_NAME]]"; interface I { - let I1:! type; + let I1: type; } -fn F(U:! I where .I1 = .Self) { +fn F(generic U: I where .I1 = .Self) { U as (I where .I1 = U); (U as type) as (I where .I1 = U); } @@ -96,11 +96,11 @@ fn F(U:! I where .I1 = .Self) { library "[[@TEST_NAME]]"; interface I { - let I1:! type; - let I2:! type; + let I1: type; + let I2: type; } -fn F(U:! I where .I1 = .Self and .I2 = ()) { +fn F(generic U: I where .I1 = .Self and .I2 = ()) { U as (I where .I1 = .Self); (U as type) as (I where .I1 = .Self); } @@ -109,14 +109,14 @@ fn F(U:! I where .I1 = .Self and .I2 = ()) { library "[[@TEST_NAME]]"; interface I { - let X:! type; + let X: type; fn G() -> X*; } -fn F2[U:! I](unused V: U*) {} -fn F3[U:! I where .X = .Self](unused V: U*) {} +fn F2[U: I](unused V: U*) {} +fn F3[U: I where .X = .Self](unused V: U*) {} -fn F(U:! I where .X = .Self, unused V: U*) { +fn F(generic U: I where .X = .Self, unused V: U*) { // The returned value of `G` type `U` which has access to the methods of `I`. U.G()->G()->G(); (U as type).G()->G()->G(); @@ -133,11 +133,11 @@ fn F(U:! I where .X = .Self, unused V: U*) { library "[[@TEST_NAME]]"; interface I { - let X:! type; + let X: type; fn G() -> X; } -fn F(U:! Core.Destroy & I where .X = .Self) { +fn F(generic U: Core.Destroy & I where .X = .Self) { // Compound member lookup through a non-type value is possible for methods // which take a `self` parameter. But it's not possible for methods without // `self`. For those you need to go directly throug the type. @@ -174,11 +174,11 @@ fn F(U:! Core.Destroy & I where .X = .Self) { library "[[@TEST_NAME]]"; interface I { - let X:! type; + let X: type; fn G(self) -> X*; } -fn F(U:! I where .X = .Self, v: U) { +fn F(generic U: I where .X = .Self, v: U) { // Compound member lookup through a non-type value is possible for methods // which take a `self` parameter. @@ -196,8 +196,8 @@ fn F(U:! I where .X = .Self, v: U) { // --- fail_non_const_associated.carbon library "[[@TEST_NAME]]"; -interface I { let T:! type; } -fn Id[U:! type](x: U) -> U { return Id(x); } +interface I { let T: type; } +fn Id[U: type](x: U) -> U { return Id(x); } impl () as I where .T = () {} // Type of member expr is associated entity type, // but value is not constant. @@ -210,10 +210,10 @@ var v: ().(Id(I.T)); // --- fail_non_const_associated_in_interface.carbon library "[[@TEST_NAME]]"; -fn Id[U:! type](x: U) -> U { return Id(x); } +fn Id[U: type](x: U) -> U { return Id(x); } interface J { - let T:! type; + let T: type; // CHECK:STDERR: fail_non_const_associated_in_interface.carbon:[[@LINE+4]]:13: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: fn F() -> Id(T); // CHECK:STDERR: ^~~~~ @@ -225,7 +225,7 @@ interface J { library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } // CHECK:STDERR: fail_alias_to_non_const_assoc_entity.carbon:[[@LINE+4]]:8: error: semantics TODO: `HandleAutoTypeLiteral` [SemanticsTodo] @@ -245,7 +245,7 @@ interface J { library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } alias U = I.T; @@ -268,17 +268,17 @@ interface J { // --- access_constant_in_self_facet.carbon library "[[@TEST_NAME]]"; -interface A { let X:! type; } +interface A { let X: type; } -fn F(AA:! A where .X = ()) -> AA.X { +fn F(generic AA: A where .X = ()) -> AA.X { return (); } // --- access_constant_in_self_facet_with_multiple_interfaces.carbon library "[[@TEST_NAME]]"; -interface A { let X:! type; } -interface B { let Y:! type; } +interface A { let X: type; } +interface B { let Y: type; } // The rewrite rules of .X and .Y come in some canonically sorted order. The // ImplWitnessAccess instruction looks at them to try find a value for the @@ -287,24 +287,24 @@ interface B { let Y:! type; } // an interface other than the one it is accessing before finding the correct // rewrite. -fn F(AB:! A & B where .X = () and .Y = {}) -> AB.X { +fn F(generic AB: A & B where .X = () and .Y = {}) -> AB.X { return (); } -fn G(AB:! A & B where .X = () and .Y = {}) -> AB.Y { +fn G(generic AB: A & B where .X = () and .Y = {}) -> AB.Y { return {}; } // --- fail_todo_access_constant_through_named_constraint.carbon library "[[@TEST_NAME]]"; -interface A { let X:! type; } +interface A { let X: type; } constraint N { extend require impls A where .X = (); } -fn F(AA:! N) { +fn F(generic AA: N) { // TODO: The identified facet type `N` includes `A` and should provide a // same-type constraint `A.X == ()` which would allow this conversion. // CHECK:STDERR: fail_todo_access_constant_through_named_constraint.carbon:[[@LINE+7]]:3: error: cannot convert expression of type `()` to `AA.(A.X)` with `as` [ConversionFailure] @@ -323,7 +323,7 @@ interface Y {} impl () as Y {} interface Z { - let Y1:! Y; + let Y1: Y; fn G() -> Y1*; } @@ -338,9 +338,9 @@ interface Z { // This requires that `SymbolicBindingType` evaluation correctly handles // arbitrary facet value instructions. Not just the common case of `FacetValue` // or `SymbolicBinding`. -fn F1(T:! Y, unused t: T*) {} +fn F1(generic T: Y, unused t: T*) {} -fn F2(U:! Z) { +fn F2(generic U: Z) { F1(U.Y1, U.G()); } @@ -349,16 +349,16 @@ library "[[@TEST_NAME]]"; interface W {} interface X { - let X1:! type; + let X1: type; } -interface Y(U:! type) { - let Y1:! X where .X1 = U; +interface Y(U: type) { + let Y1: X where .X1 = U; } -interface Z(T:! type) { - let Z1:! type; +interface Z(T: type) { + let Z1: type; } -fn F(U:! W, V:! Z(.Self) where .Z1 impls Y(U)) { +fn F(generic U: W, generic V: Z(.Self) where .Z1 impls Y(U)) { // This has to search for a value for `.Z1.Y1.X1` in V. To do so it needs to // look for a rewrite of .X1. First it looks in `V.Z1.Y1`, where // it finds the rewrite of `.X1 = U`. @@ -372,25 +372,25 @@ library "[[@TEST_NAME]]"; interface W {} interface X { - let X1:! type; + let X1: type; } -interface Y(T:! type) { - let Y0:! type; - let Y1:! type; - let Y2:! type; +interface Y(T: type) { + let Y0: type; + let Y1: type; + let Y2: type; } -constraint NX(V:! type) { +constraint NX(V: type) { extend require impls X where .X1 = V; } -interface Z(PeriodSelf:! type) { - let Z1:! Y(PeriodSelf) where .Y0 impls NX(()) +interface Z(PeriodSelf: type) { + let Z1: Y(PeriodSelf) where .Y0 impls NX(()) and .Y1 impls NX({}) and .Y2 impls NX(()); } -fn F(V:! Z(.Self)) { +fn F(generic V: Z(.Self)) { // This has to search for a value for `.Z1.Y1.X1` in V. To do so it needs to // look for a rewrite of .X1. First it looks in `V.Z1.Y1`, then `V.Z1`, where // it finds the rewrite of `.Y1.X1 = {}`. @@ -412,26 +412,26 @@ library "[[@TEST_NAME]]"; interface W {} interface X { - let X1:! type; + let X1: type; } interface Y { - let Y1:! type; + let Y1: type; } -interface Z(T:! type) { - let Z0:! type; - let Z1:! type; - let Z2:! type; +interface Z(T: type) { + let Z0: type; + let Z1: type; + let Z2: type; } -constraint NX(V:! type) { +constraint NX(V: type) { extend require impls X where .X1 = V; } -constraint NY(V:! type) { +constraint NY(V: type) { extend require impls Y where .Y1 = NX(V); } -fn F(V:! Z(.Self) where .Z0 impls NY(()) +fn F(generic V: Z(.Self) where .Z0 impls NY(()) and .Z1 impls NY({}) and .Z2 impls NY(())) { // This has to search for a value for `.Z1.Y1.X1` in V. To do so it needs to @@ -451,19 +451,19 @@ fn F(V:! Z(.Self) where .Z0 impls NY(()) library "[[@TEST_NAME]]"; interface Z {} -interface Y(T:! type) { - let Y1:! type; +interface Y(T: type) { + let Y1: type; } class C; -constraint NY(PeriodSelf:! type) { +constraint NY(PeriodSelf: type) { extend require impls Y(PeriodSelf) where .Y1 = {}; } // TODO: We need to look in `T` for the rewrite in the access of // `(C as Y(T)).Y1` but we currently only look in `C`. See the TODO in // `TryFindValueInRewriteConstraints()`. -fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { +fn F(generic T: Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDERR: fail_todo_find_access_value_in_facet_from_specific_interface.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `{}` to `C.(Y(T).Y1)` [ConversionFailure] // CHECK:STDERR: return {}; // CHECK:STDERR: ^~~~~~~~~~ @@ -492,20 +492,20 @@ fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.WithSelf.DoIt(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Use(%T.loc8_9.2: %I.type) { +// CHECK:STDOUT: generic fn @Use(%T.loc8_17.2: %I.type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc10_4.2: type = facet_access_type %T.loc8_9.1 [symbolic = %T.as_type.loc10_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %I.WithSelf.DoIt.type: type = fn_type @I.WithSelf.DoIt, @I.WithSelf(%T.loc8_9.1) [symbolic = %I.WithSelf.DoIt.type (constants.%I.WithSelf.DoIt.type.0a5)] -// CHECK:STDOUT: %.loc10_4.2: type = fn_type_with_self_type %I.WithSelf.DoIt.type, %T.loc8_9.1 [symbolic = %.loc10_4.2 (constants.%.9ca)] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_9.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %T.as_type.loc10_4.2: type = facet_access_type %T.loc8_17.1 [symbolic = %T.as_type.loc10_4.2 (constants.%T.as_type)] +// CHECK:STDOUT: %I.WithSelf.DoIt.type: type = fn_type @I.WithSelf.DoIt, @I.WithSelf(%T.loc8_17.1) [symbolic = %I.WithSelf.DoIt.type (constants.%I.WithSelf.DoIt.type.0a5)] +// CHECK:STDOUT: %.loc10_4.2: type = fn_type_with_self_type %I.WithSelf.DoIt.type, %T.loc8_17.1 [symbolic = %.loc10_4.2 (constants.%.9ca)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_17.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc10_4.2: @Use.%.loc10_4.2 (%.9ca) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @I.WithSelf.DoIt(%T.loc8_9.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @I.WithSelf.DoIt(%T.loc8_17.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc8_9.2 [symbolic = %T.loc8_9.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc8_17.2 [symbolic = %T.loc8_17.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc10_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc10_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc10_4.1: type = converted %T.ref, %T.as_type.loc10_4.1 [symbolic = %T.as_type.loc10_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %DoIt.ref: %I.assoc_type = name_ref DoIt, @I.WithSelf.%assoc0 [concrete = constants.%assoc0] @@ -519,8 +519,8 @@ fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Use(constants.%T) { -// CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_9.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc8_17.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_17.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- assoc_fn_using_self.carbon @@ -544,27 +544,27 @@ fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.WithSelf.Make(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Use(%T.loc8_9.2: %I.type) { +// CHECK:STDOUT: generic fn @Use(%T.loc8_17.2: %I.type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %I.WithSelf.Make.type: type = fn_type @I.WithSelf.Make, @I.WithSelf(%T.loc8_9.1) [symbolic = %I.WithSelf.Make.type (constants.%I.WithSelf.Make.type.9c0)] -// CHECK:STDOUT: %.loc10_11.2: type = fn_type_with_self_type %I.WithSelf.Make.type, %T.loc8_9.1 [symbolic = %.loc10_11.2 (constants.%.889)] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_9.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %I.WithSelf.Make.type: type = fn_type @I.WithSelf.Make, @I.WithSelf(%T.loc8_17.1) [symbolic = %I.WithSelf.Make.type (constants.%I.WithSelf.Make.type.9c0)] +// CHECK:STDOUT: %.loc10_11.2: type = fn_type_with_self_type %I.WithSelf.Make.type, %T.loc8_17.1 [symbolic = %.loc10_11.2 (constants.%.889)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_17.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc10_11.2: @Use.%.loc10_11.2 (%.889) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc10_11.2: = specific_impl_function %impl.elem0.loc10_11.2, @I.WithSelf.Make(%T.loc8_9.1) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc10_11.2: = specific_impl_function %impl.elem0.loc10_11.2, @I.WithSelf.Make(%T.loc8_17.1) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @Use.%T.as_type.loc8_18.1 (%T.as_type) { +// CHECK:STDOUT: fn() -> out %return.param: @Use.%T.as_type.loc8_25.1 (%T.as_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref.loc10: %I.type = name_ref T, %T.loc8_9.2 [symbolic = %T.loc8_9.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc10: type = facet_access_type %T.ref.loc10 [symbolic = %T.as_type.loc8_18.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc10_11.1: type = converted %T.ref.loc10, %T.as_type.loc10 [symbolic = %T.as_type.loc8_18.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.ref.loc10: %I.type = name_ref T, %T.loc8_17.2 [symbolic = %T.loc8_17.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc10: type = facet_access_type %T.ref.loc10 [symbolic = %T.as_type.loc8_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc10_11.1: type = converted %T.ref.loc10, %T.as_type.loc10 [symbolic = %T.as_type.loc8_25.1 (constants.%T.as_type)] // CHECK:STDOUT: %Make.ref: %I.assoc_type = name_ref Make, @I.WithSelf.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc10_11.1: @Use.%.loc10_11.2 (%.889) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc10_11.1: = specific_impl_function %impl.elem0.loc10_11.1, @I.WithSelf.Make(constants.%T) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: %I.WithSelf.Make.call: init @Use.%T.as_type.loc8_18.1 (%T.as_type) to %.loc8_18.1 = call %specific_impl_fn.loc10_11.1() +// CHECK:STDOUT: %I.WithSelf.Make.call: init @Use.%T.as_type.loc8_25.1 (%T.as_type) to %.loc8_25.1 = call %specific_impl_fn.loc10_11.1() // CHECK:STDOUT: return %I.WithSelf.Make.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -572,13 +572,13 @@ fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Use(constants.%T) { -// CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_9.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc8_18.1 => constants.%T.as_type -// CHECK:STDOUT: %.loc8_18.2 => constants.%.0ce +// CHECK:STDOUT: %T.patt.loc8_17.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_17.1 => constants.%T +// CHECK:STDOUT: %T.as_type.loc8_25.1 => constants.%T.as_type +// CHECK:STDOUT: %.loc8_25.2 => constants.%.0ce // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a -// CHECK:STDOUT: %return.param_patt.loc8_18.2 => constants.%return.param_patt.b82 -// CHECK:STDOUT: %return.patt.loc8_15.2 => constants.%return.patt.2e6 +// CHECK:STDOUT: %return.param_patt.loc8_25.2 => constants.%return.param_patt.b82 +// CHECK:STDOUT: %return.patt.loc8_22.2 => constants.%return.patt.2e6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- access_assoc_method.carbon @@ -612,54 +612,54 @@ fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDOUT: file { // CHECK:STDOUT: %Use.decl: %Use.type = fn_decl @Use [concrete = constants.%Use] { // CHECK:STDOUT: %T.patt.loc9_9.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_9.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc9_16.1: @Use.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %x.param_patt.loc9_16.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc9_16.1: @Use.%pattern_type (%pattern_type.b3a) = at_binding_pattern x, %x.param_patt.loc9_16.1 [symbolic = %x.patt.loc9_16.2 (constants.%x.patt)] -// CHECK:STDOUT: %return.param_patt.loc9_24.1: @Use.%pattern_type (%pattern_type.b3a) = out_param_pattern [symbolic = %return.param_patt.loc9_24.2 (constants.%return.param_patt.b82)] -// CHECK:STDOUT: %return.patt.loc9_21.1: @Use.%pattern_type (%pattern_type.b3a) = return_slot_pattern %return.param_patt.loc9_24.1, %.loc9_24.3 [symbolic = %return.patt.loc9_21.2 (constants.%return.patt.2e6)] +// CHECK:STDOUT: %x.param_patt.loc9_15.1: @Use.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %x.param_patt.loc9_15.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc9_15.1: @Use.%pattern_type (%pattern_type.b3a) = at_binding_pattern x, %x.param_patt.loc9_15.1 [symbolic = %x.patt.loc9_15.2 (constants.%x.patt)] +// CHECK:STDOUT: %return.param_patt.loc9_23.1: @Use.%pattern_type (%pattern_type.b3a) = out_param_pattern [symbolic = %return.param_patt.loc9_23.2 (constants.%return.param_patt.b82)] +// CHECK:STDOUT: %return.patt.loc9_20.1: @Use.%pattern_type (%pattern_type.b3a) = return_slot_pattern %return.param_patt.loc9_23.1, %.loc9_23.3 [symbolic = %return.patt.loc9_20.2 (constants.%return.patt.2e6)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc9_24: %I.type = name_ref T, %T.loc9_9.2 [symbolic = %T.loc9_9.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc9_24: type = facet_access_type %T.ref.loc9_24 [symbolic = %T.as_type.loc9_18.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_24.3: type = converted %T.ref.loc9_24, %T.as_type.loc9_24 [symbolic = %T.as_type.loc9_18.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_24.4: Core.Form = init_form %.loc9_24.3 [symbolic = %.loc9_24.2 (constants.%.0ce)] -// CHECK:STDOUT: %.loc9_12: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %T.ref.loc9_23: %I.type = name_ref T, %T.loc9_9.2 [symbolic = %T.loc9_9.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc9_23: type = facet_access_type %T.ref.loc9_23 [symbolic = %T.as_type.loc9_17.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_23.3: type = converted %T.ref.loc9_23, %T.as_type.loc9_23 [symbolic = %T.as_type.loc9_17.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_23.4: Core.Form = init_form %.loc9_23.3 [symbolic = %.loc9_23.2 (constants.%.0ce)] +// CHECK:STDOUT: %.loc9_11: type = splice_block %I.ref [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_9.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc9_9.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @Use.%T.as_type.loc9_18.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [symbolic = %T.as_type.loc9_18.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc9_18: %I.type = name_ref T, %T.loc9_9.2 [symbolic = %T.loc9_9.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc9_18.2: type = facet_access_type %T.ref.loc9_18 [symbolic = %T.as_type.loc9_18.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_18.2: type = converted %T.ref.loc9_18, %T.as_type.loc9_18.2 [symbolic = %T.as_type.loc9_18.1 (constants.%T.as_type)] +// CHECK:STDOUT: %x.param: @Use.%T.as_type.loc9_17.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc9_17.1: type = splice_block %.loc9_17.2 [symbolic = %T.as_type.loc9_17.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref.loc9_17: %I.type = name_ref T, %T.loc9_9.2 [symbolic = %T.loc9_9.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc9_17.2: type = facet_access_type %T.ref.loc9_17 [symbolic = %T.as_type.loc9_17.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_17.2: type = converted %T.ref.loc9_17, %T.as_type.loc9_17.2 [symbolic = %T.as_type.loc9_17.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @Use.%T.as_type.loc9_18.1 (%T.as_type) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @Use.%T.as_type.loc9_18.1 (%T.as_type) = out_param call_param1 -// CHECK:STDOUT: %return: ref @Use.%T.as_type.loc9_18.1 (%T.as_type) = return_slot %return.param +// CHECK:STDOUT: %x: @Use.%T.as_type.loc9_17.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %return.param: ref @Use.%T.as_type.loc9_17.1 (%T.as_type) = out_param call_param1 +// CHECK:STDOUT: %return: ref @Use.%T.as_type.loc9_17.1 (%T.as_type) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Use(%T.loc9_9.2: %I.type) { // CHECK:STDOUT: %T.patt.loc9_9.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc9_9.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc9_9.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc9_18.1: type = facet_access_type %T.loc9_9.1 [symbolic = %T.as_type.loc9_18.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc9_18.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] -// CHECK:STDOUT: %x.param_patt.loc9_16.2: @Use.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %x.param_patt.loc9_16.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc9_16.2: @Use.%pattern_type (%pattern_type.b3a) = at_binding_pattern x, %x.param_patt.loc9_16.2 [symbolic = %x.patt.loc9_16.2 (constants.%x.patt)] -// CHECK:STDOUT: %.loc9_24.2: Core.Form = init_form %T.as_type.loc9_18.1 [symbolic = %.loc9_24.2 (constants.%.0ce)] -// CHECK:STDOUT: %return.param_patt.loc9_24.2: @Use.%pattern_type (%pattern_type.b3a) = out_param_pattern [symbolic = %return.param_patt.loc9_24.2 (constants.%return.param_patt.b82)] -// CHECK:STDOUT: %return.patt.loc9_21.2: @Use.%pattern_type (%pattern_type.b3a) = return_slot_pattern %return.param_patt.loc9_24.2, %T.as_type.loc9_18.1 [symbolic = %return.patt.loc9_21.2 (constants.%return.patt.2e6)] +// CHECK:STDOUT: %T.as_type.loc9_17.1: type = facet_access_type %T.loc9_9.1 [symbolic = %T.as_type.loc9_17.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc9_17.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] +// CHECK:STDOUT: %x.param_patt.loc9_15.2: @Use.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %x.param_patt.loc9_15.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc9_15.2: @Use.%pattern_type (%pattern_type.b3a) = at_binding_pattern x, %x.param_patt.loc9_15.2 [symbolic = %x.patt.loc9_15.2 (constants.%x.patt)] +// CHECK:STDOUT: %.loc9_23.2: Core.Form = init_form %T.as_type.loc9_17.1 [symbolic = %.loc9_23.2 (constants.%.0ce)] +// CHECK:STDOUT: %return.param_patt.loc9_23.2: @Use.%pattern_type (%pattern_type.b3a) = out_param_pattern [symbolic = %return.param_patt.loc9_23.2 (constants.%return.param_patt.b82)] +// CHECK:STDOUT: %return.patt.loc9_20.2: @Use.%pattern_type (%pattern_type.b3a) = return_slot_pattern %return.param_patt.loc9_23.2, %T.as_type.loc9_17.1 [symbolic = %return.patt.loc9_20.2 (constants.%return.patt.2e6)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc9_18.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc9_17.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %I.WithSelf.Copy.type: type = fn_type @I.WithSelf.Copy, @I.WithSelf(%T.loc9_9.1) [symbolic = %I.WithSelf.Copy.type (constants.%I.WithSelf.Copy.type.54f)] // CHECK:STDOUT: %.loc10_11: type = fn_type_with_self_type %I.WithSelf.Copy.type, %T.loc9_9.1 [symbolic = %.loc10_11 (constants.%.c06)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc9_9.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc10_11.2: @Use.%.loc10_11 (%.c06) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc10_11.2: = specific_impl_function %impl.elem0.loc10_11.2, @I.WithSelf.Copy(%T.loc9_9.1) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @Use.%T.as_type.loc9_18.1 (%T.as_type)) -> out %return.param: @Use.%T.as_type.loc9_18.1 (%T.as_type) { +// CHECK:STDOUT: fn(%x.param: @Use.%T.as_type.loc9_17.1 (%T.as_type)) -> out %return.param: @Use.%T.as_type.loc9_17.1 (%T.as_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @Use.%T.as_type.loc9_18.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @Use.%T.as_type.loc9_17.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %Copy.ref: %I.assoc_type = name_ref Copy, @I.WithSelf.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc10_11.1: @Use.%.loc10_11 (%.c06) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc10_11: = bound_method %x.ref, %impl.elem0.loc10_11.1 @@ -667,8 +667,8 @@ fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDOUT: %.loc10_17.2: %I.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_9.1 (constants.%T)] // CHECK:STDOUT: %specific_impl_fn.loc10_11.1: = specific_impl_function %impl.elem0.loc10_11.1, @I.WithSelf.Copy(constants.%T) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc10_17: = bound_method %x.ref, %specific_impl_fn.loc10_11.1 -// CHECK:STDOUT: %.loc9_24.1: ref @Use.%T.as_type.loc9_18.1 (%T.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %I.WithSelf.Copy.call: init @Use.%T.as_type.loc9_18.1 (%T.as_type) to %.loc9_24.1 = call %bound_method.loc10_17(%x.ref) +// CHECK:STDOUT: %.loc9_23.1: ref @Use.%T.as_type.loc9_17.1 (%T.as_type) = splice_block %return.param {} +// CHECK:STDOUT: %I.WithSelf.Copy.call: init @Use.%T.as_type.loc9_17.1 (%T.as_type) to %.loc9_23.1 = call %bound_method.loc10_17(%x.ref) // CHECK:STDOUT: return %I.WithSelf.Copy.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -678,13 +678,13 @@ fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDOUT: specific @Use(constants.%T) { // CHECK:STDOUT: %T.patt.loc9_9.2 => constants.%T.patt // CHECK:STDOUT: %T.loc9_9.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc9_18.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc9_17.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a -// CHECK:STDOUT: %x.param_patt.loc9_16.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc9_16.2 => constants.%x.patt -// CHECK:STDOUT: %.loc9_24.2 => constants.%.0ce -// CHECK:STDOUT: %return.param_patt.loc9_24.2 => constants.%return.param_patt.b82 -// CHECK:STDOUT: %return.patt.loc9_21.2 => constants.%return.patt.2e6 +// CHECK:STDOUT: %x.param_patt.loc9_15.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc9_15.2 => constants.%x.patt +// CHECK:STDOUT: %.loc9_23.2 => constants.%.0ce +// CHECK:STDOUT: %return.param_patt.loc9_23.2 => constants.%return.param_patt.b82 +// CHECK:STDOUT: %return.patt.loc9_20.2 => constants.%return.patt.2e6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- access_selfless_method.carbon @@ -719,9 +719,9 @@ fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDOUT: %impl.elem0.loc10_4.2: @Use.%.loc10 (%.244) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @I.WithSelf.Hello(%T.loc8_9.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @Use.%T.as_type.loc8_18.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%x.param: @Use.%T.as_type.loc8_17.1 (%T.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @Use.%T.as_type.loc8_18.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @Use.%T.as_type.loc8_17.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %Hello.ref: %I.assoc_type = name_ref Hello, @I.WithSelf.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc10_4.1: @Use.%.loc10 (%.244) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = specific_impl_function %impl.elem0.loc10_4.1, @I.WithSelf.Hello(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] @@ -735,10 +735,10 @@ fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDOUT: specific @Use(constants.%T) { // CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_9.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc8_18.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc8_17.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a -// CHECK:STDOUT: %x.param_patt.loc8_16.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc8_16.2 => constants.%x.patt +// CHECK:STDOUT: %x.param_patt.loc8_15.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc8_15.2 => constants.%x.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- access_assoc_method_indirect.carbon @@ -775,12 +775,12 @@ fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDOUT: %impl.elem0.loc10_14.2: @UseIndirect.%.loc10_14.2 (%.c06) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_14.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc10_14.2: = specific_impl_function %impl.elem0.loc10_14.2, @I.WithSelf.Copy(%T.loc8_17.1) [symbolic = %specific_impl_fn.loc10_14.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @UseIndirect.%T.as_type.loc8_26.1 (%T.as_type)) -> out %return.param: @UseIndirect.%T.as_type.loc8_26.1 (%T.as_type) { +// CHECK:STDOUT: fn(%x.param: @UseIndirect.%T.as_type.loc8_25.1 (%T.as_type)) -> out %return.param: @UseIndirect.%T.as_type.loc8_25.1 (%T.as_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @UseIndirect.%T.as_type.loc8_26.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @UseIndirect.%T.as_type.loc8_25.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %T.ref.loc10: %I.type = name_ref T, %T.loc8_17.2 [symbolic = %T.loc8_17.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc10: type = facet_access_type %T.ref.loc10 [symbolic = %T.as_type.loc8_26.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc10_14.1: type = converted %T.ref.loc10, %T.as_type.loc10 [symbolic = %T.as_type.loc8_26.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc10: type = facet_access_type %T.ref.loc10 [symbolic = %T.as_type.loc8_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc10_14.1: type = converted %T.ref.loc10, %T.as_type.loc10 [symbolic = %T.as_type.loc8_25.1 (constants.%T.as_type)] // CHECK:STDOUT: %Copy.ref: %I.assoc_type = name_ref Copy, @I.WithSelf.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc10_14.1: @UseIndirect.%.loc10_14.2 (%.c06) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_14.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc10_11: = bound_method %x.ref, %impl.elem0.loc10_14.1 @@ -789,7 +789,7 @@ fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDOUT: %specific_impl_fn.loc10_14.1: = specific_impl_function %impl.elem0.loc10_14.1, @I.WithSelf.Copy(constants.%T) [symbolic = %specific_impl_fn.loc10_14.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc10_21: = bound_method %x.ref, %specific_impl_fn.loc10_14.1 // CHECK:STDOUT: -// CHECK:STDOUT: %I.WithSelf.Copy.call: init @UseIndirect.%T.as_type.loc8_26.1 (%T.as_type) to %.loc8_32.1 = call %bound_method.loc10_21(%x.ref) +// CHECK:STDOUT: %I.WithSelf.Copy.call: init @UseIndirect.%T.as_type.loc8_25.1 (%T.as_type) to %.loc8_31.1 = call %bound_method.loc10_21(%x.ref) // CHECK:STDOUT: return %I.WithSelf.Copy.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -799,12 +799,12 @@ fn F(T:! Z where C impls NY(.Self)) -> C.(Y(T).Y1) { // CHECK:STDOUT: specific @UseIndirect(constants.%T) { // CHECK:STDOUT: %T.patt.loc8_17.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_17.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc8_26.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc8_25.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a -// CHECK:STDOUT: %x.param_patt.loc8_24.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc8_24.2 => constants.%x.patt -// CHECK:STDOUT: %.loc8_32.2 => constants.%.0ce -// CHECK:STDOUT: %return.param_patt.loc8_32.2 => constants.%return.param_patt.b82 -// CHECK:STDOUT: %return.patt.loc8_29.2 => constants.%return.patt.2e6 +// CHECK:STDOUT: %x.param_patt.loc8_23.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc8_23.2 => constants.%x.patt +// CHECK:STDOUT: %.loc8_31.2 => constants.%.0ce +// CHECK:STDOUT: %return.param_patt.loc8_31.2 => constants.%return.param_patt.b82 +// CHECK:STDOUT: %return.patt.loc8_28.2 => constants.%return.patt.2e6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/aggregate_through_access.carbon b/toolchain/check/testdata/facet/aggregate_through_access.carbon index 3a8cfa351f6f..280e30e9c06b 100644 --- a/toolchain/check/testdata/facet/aggregate_through_access.carbon +++ b/toolchain/check/testdata/facet/aggregate_through_access.carbon @@ -14,14 +14,14 @@ library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } -// CHECK:STDERR: fail_todo_tuple_access_through_witness.carbon:[[@LINE+4]]:34: error: type `type` does not support tuple indexing; only tuples can be indexed that way [TupleIndexOnANonTupleType] -// CHECK:STDERR: fn F(T:! Z where .X = ({}, )) -> T.X.0 { -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fail_todo_tuple_access_through_witness.carbon:[[@LINE+4]]:41: error: type `type` does not support tuple indexing; only tuples can be indexed that way [TupleIndexOnANonTupleType] +// CHECK:STDERR: fn F(generic T: Z where .X = ({}, )) -> T.X.0 { +// CHECK:STDERR: ^~~~~ // CHECK:STDERR: -fn F(T:! Z where .X = ({}, )) -> T.X.0 { +fn F(generic T: Z where .X = ({}, )) -> T.X.0 { return {}; } @@ -29,14 +29,14 @@ fn F(T:! Z where .X = ({}, )) -> T.X.0 { library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } -// CHECK:STDERR: fail_todo_struct_access_through_witness.carbon:[[@LINE+4]]:36: error: type `type` does not support qualified expressions [QualifiedExprUnsupported] -// CHECK:STDERR: fn F(T:! Z where .X = {.t: ()}) -> T.X.t { -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fail_todo_struct_access_through_witness.carbon:[[@LINE+4]]:43: error: type `type` does not support qualified expressions [QualifiedExprUnsupported] +// CHECK:STDERR: fn F(generic T: Z where .X = {.t: ()}) -> T.X.t { +// CHECK:STDERR: ^~~~~ // CHECK:STDERR: -fn F(T:! Z where .X = {.t: ()}) -> T.X.t { +fn F(generic T: Z where .X = {.t: ()}) -> T.X.t { return (); } @@ -44,14 +44,14 @@ fn F(T:! Z where .X = {.t: ()}) -> T.X.t { library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } -// CHECK:STDERR: fail_todo_array_access_through_witness.carbon:[[@LINE+4]]:40: error: cannot access member of interface `Core.IndexWith(Core.IntLiteral)` in type `type` that does not implement that interface [MissingImplInMemberAccess] -// CHECK:STDERR: fn F(T:! Z where .X = array({}, 1)) -> T.X[0] { -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: fail_todo_array_access_through_witness.carbon:[[@LINE+4]]:47: error: cannot access member of interface `Core.IndexWith(Core.IntLiteral)` in type `type` that does not implement that interface [MissingImplInMemberAccess] +// CHECK:STDERR: fn F(generic T: Z where .X = array({}, 1)) -> T.X[0] { +// CHECK:STDERR: ^~~~~~ // CHECK:STDERR: -fn F(T:! Z where .X = array({}, 1)) -> T.X[0] { +fn F(generic T: Z where .X = array({}, 1)) -> T.X[0] { return {}; } @@ -59,16 +59,16 @@ fn F(T:! Z where .X = array({}, 1)) -> T.X[0] { library "[[@TEST_NAME]]"; interface Z { - let X1:! type; + let X1: type; } interface Y { - let X2:! type; + let X2: type; } class C; impl C as Y where .X2 = {} {} -fn F(T:! Z where .X1 = C) -> T.X1.(Y.X2) { +fn F(generic T: Z where .X1 = C) -> T.X1.(Y.X2) { return {}; } diff --git a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon index 2c5815f93a7b..6d1e32397bd2 100644 --- a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon +++ b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon @@ -30,7 +30,7 @@ impl C as B { fn BB() {} } -fn G[T:! A & Empty & B](t: T) { +fn G[T: A & Empty & B](t: T) { t.AA(); t.BB(); @@ -183,33 +183,33 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %T.patt.loc33_7.1: %pattern_type.a67 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc33_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %t.param_patt.loc33_26.1: @G.%pattern_type (%pattern_type.653) = value_param_pattern [symbolic = %t.param_patt.loc33_26.2 (constants.%t.param_patt.4f9)] -// CHECK:STDOUT: %t.patt.loc33_26.1: @G.%pattern_type (%pattern_type.653) = at_binding_pattern t, %t.param_patt.loc33_26.1 [symbolic = %t.patt.loc33_26.2 (constants.%t.patt.ecc)] +// CHECK:STDOUT: %t.param_patt.loc33_25.1: @G.%pattern_type (%pattern_type.653) = value_param_pattern [symbolic = %t.param_patt.loc33_25.2 (constants.%t.param_patt.4f9)] +// CHECK:STDOUT: %t.patt.loc33_25.1: @G.%pattern_type (%pattern_type.653) = at_binding_pattern t, %t.param_patt.loc33_25.1 [symbolic = %t.patt.loc33_25.2 (constants.%t.patt.ecc)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc33_20.1: type = splice_block %.loc33_20.3 [concrete = constants.%facet_type.22e] { +// CHECK:STDOUT: %.loc33_19.1: type = splice_block %.loc33_19.3 [concrete = constants.%facet_type.22e] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %A.ref.loc33: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] -// CHECK:STDOUT: %impl.elem0.loc33_12: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method.loc33_12: = bound_method %A.ref.loc33, %impl.elem0.loc33_12 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.36e] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc33_12: init type = call %bound_method.loc33_12(%A.ref.loc33, %Empty.ref) [concrete = constants.%facet_type.b34] +// CHECK:STDOUT: %impl.elem0.loc33_11: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %bound_method.loc33_11: = bound_method %A.ref.loc33, %impl.elem0.loc33_11 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.36e] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc33_11: init type = call %bound_method.loc33_11(%A.ref.loc33, %Empty.ref) [concrete = constants.%facet_type.b34] // CHECK:STDOUT: %B.ref.loc33: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %impl.elem0.loc33_20: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method.loc33_20: = bound_method %type.as.BitAndWith.impl.Op.call.loc33_12, %impl.elem0.loc33_20 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.188] -// CHECK:STDOUT: %.loc33_12.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc33_12 [concrete = constants.%facet_type.b34] -// CHECK:STDOUT: %.loc33_12.2: type = converted %type.as.BitAndWith.impl.Op.call.loc33_12, %.loc33_12.1 [concrete = constants.%facet_type.b34] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc33_20: init type = call %bound_method.loc33_20(%.loc33_12.2, %B.ref.loc33) [concrete = constants.%facet_type.22e] -// CHECK:STDOUT: %.loc33_20.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc33_20 [concrete = constants.%facet_type.22e] -// CHECK:STDOUT: %.loc33_20.3: type = converted %type.as.BitAndWith.impl.Op.call.loc33_20, %.loc33_20.2 [concrete = constants.%facet_type.22e] +// CHECK:STDOUT: %impl.elem0.loc33_19: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %bound_method.loc33_19: = bound_method %type.as.BitAndWith.impl.Op.call.loc33_11, %impl.elem0.loc33_19 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.188] +// CHECK:STDOUT: %.loc33_11.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc33_11 [concrete = constants.%facet_type.b34] +// CHECK:STDOUT: %.loc33_11.2: type = converted %type.as.BitAndWith.impl.Op.call.loc33_11, %.loc33_11.1 [concrete = constants.%facet_type.b34] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc33_19: init type = call %bound_method.loc33_19(%.loc33_11.2, %B.ref.loc33) [concrete = constants.%facet_type.22e] +// CHECK:STDOUT: %.loc33_19.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc33_19 [concrete = constants.%facet_type.22e] +// CHECK:STDOUT: %.loc33_19.3: type = converted %type.as.BitAndWith.impl.Op.call.loc33_19, %.loc33_19.2 [concrete = constants.%facet_type.22e] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc33_7.2: %facet_type.22e = symbolic_binding T, 0 [symbolic = %T.loc33_7.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @G.%T.as_type.loc33_28.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc33_28.1: type = splice_block %.loc33_28.2 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %t.param: @G.%T.as_type.loc33_27.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc33_27.1: type = splice_block %.loc33_27.2 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref.loc33: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc33_28.2: type = facet_access_type %T.ref.loc33 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc33_28.2: type = converted %T.ref.loc33, %T.as_type.loc33_28.2 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc33_27.2: type = facet_access_type %T.ref.loc33 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc33_27.2: type = converted %T.ref.loc33, %T.as_type.loc33_27.2 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @G.%T.as_type.loc33_28.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @G.%T.as_type.loc33_27.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } @@ -331,48 +331,48 @@ fn F() { // CHECK:STDOUT: generic fn @G(%T.loc33_7.2: %facet_type.22e) { // CHECK:STDOUT: %T.patt.loc33_7.2: %pattern_type.a67 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc33_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc33_7.1: %facet_type.22e = symbolic_binding T, 0 [symbolic = %T.loc33_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc33_28.1: type = facet_access_type %T.loc33_7.1 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc33_28.1 [symbolic = %pattern_type (constants.%pattern_type.653)] -// CHECK:STDOUT: %t.param_patt.loc33_26.2: @G.%pattern_type (%pattern_type.653) = value_param_pattern [symbolic = %t.param_patt.loc33_26.2 (constants.%t.param_patt.4f9)] -// CHECK:STDOUT: %t.patt.loc33_26.2: @G.%pattern_type (%pattern_type.653) = at_binding_pattern t, %t.param_patt.loc33_26.2 [symbolic = %t.patt.loc33_26.2 (constants.%t.patt.ecc)] +// CHECK:STDOUT: %T.as_type.loc33_27.1: type = facet_access_type %T.loc33_7.1 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc33_27.1 [symbolic = %pattern_type (constants.%pattern_type.653)] +// CHECK:STDOUT: %t.param_patt.loc33_25.2: @G.%pattern_type (%pattern_type.653) = value_param_pattern [symbolic = %t.param_patt.loc33_25.2 (constants.%t.param_patt.4f9)] +// CHECK:STDOUT: %t.patt.loc33_25.2: @G.%pattern_type (%pattern_type.653) = at_binding_pattern t, %t.param_patt.loc33_25.2 [symbolic = %t.patt.loc33_25.2 (constants.%t.patt.ecc)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc33_28.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc33_27.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc33_7.1, @A [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] -// CHECK:STDOUT: %A.facet.loc34: %A.type = facet_value %T.as_type.loc33_28.1, (%A.lookup_impl_witness) [symbolic = %A.facet.loc34 (constants.%A.facet.7b4)] +// CHECK:STDOUT: %A.facet.loc34: %A.type = facet_value %T.as_type.loc33_27.1, (%A.lookup_impl_witness) [symbolic = %A.facet.loc34 (constants.%A.facet.7b4)] // CHECK:STDOUT: %A.WithSelf.AA.type: type = fn_type @A.WithSelf.AA, @A.WithSelf(%A.facet.loc34) [symbolic = %A.WithSelf.AA.type (constants.%A.WithSelf.AA.type.c6d)] // CHECK:STDOUT: %.loc34: type = fn_type_with_self_type %A.WithSelf.AA.type, %A.facet.loc34 [symbolic = %.loc34 (constants.%.03b)] // CHECK:STDOUT: %impl.elem0.loc34_4.2: @G.%.loc34 (%.03b) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.739)] // CHECK:STDOUT: %specific_impl_fn.loc34_4.2: = specific_impl_function %impl.elem0.loc34_4.2, @A.WithSelf.AA(%A.facet.loc34) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.ece)] // CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T.loc33_7.1, @B [symbolic = %B.lookup_impl_witness (constants.%B.lookup_impl_witness)] -// CHECK:STDOUT: %B.facet.loc35: %B.type = facet_value %T.as_type.loc33_28.1, (%B.lookup_impl_witness) [symbolic = %B.facet.loc35 (constants.%B.facet.746)] +// CHECK:STDOUT: %B.facet.loc35: %B.type = facet_value %T.as_type.loc33_27.1, (%B.lookup_impl_witness) [symbolic = %B.facet.loc35 (constants.%B.facet.746)] // CHECK:STDOUT: %B.WithSelf.BB.type: type = fn_type @B.WithSelf.BB, @B.WithSelf(%B.facet.loc35) [symbolic = %B.WithSelf.BB.type (constants.%B.WithSelf.BB.type.a69)] // CHECK:STDOUT: %.loc35: type = fn_type_with_self_type %B.WithSelf.BB.type, %B.facet.loc35 [symbolic = %.loc35 (constants.%.655)] // CHECK:STDOUT: %impl.elem0.loc35_4.2: @G.%.loc35 (%.655) = impl_witness_access %B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.793)] // CHECK:STDOUT: %specific_impl_fn.loc35_4.2: = specific_impl_function %impl.elem0.loc35_4.2, @B.WithSelf.BB(%B.facet.loc35) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.c6b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @G.%T.as_type.loc33_28.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @G.%T.as_type.loc33_27.1 (%T.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref.loc34: @G.%T.as_type.loc33_28.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref.loc34: @G.%T.as_type.loc33_27.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %AA.ref.loc34: %A.assoc_type = name_ref AA, @A.WithSelf.%assoc0 [concrete = constants.%assoc0.2af] // CHECK:STDOUT: %impl.elem0.loc34_4.1: @G.%.loc34 (%.03b) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.739)] // CHECK:STDOUT: %specific_impl_fn.loc34_4.1: = specific_impl_function %impl.elem0.loc34_4.1, @A.WithSelf.AA(constants.%A.facet.7b4) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.ece)] // CHECK:STDOUT: %A.WithSelf.AA.call.loc34: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1() -// CHECK:STDOUT: %t.ref.loc35: @G.%T.as_type.loc33_28.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref.loc35: @G.%T.as_type.loc33_27.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %BB.ref.loc35: %B.assoc_type = name_ref BB, @B.WithSelf.%assoc0 [concrete = constants.%assoc0.880] // CHECK:STDOUT: %impl.elem0.loc35_4.1: @G.%.loc35 (%.655) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.793)] // CHECK:STDOUT: %specific_impl_fn.loc35_4.1: = specific_impl_function %impl.elem0.loc35_4.1, @B.WithSelf.BB(constants.%B.facet.746) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.c6b)] // CHECK:STDOUT: %B.WithSelf.BB.call.loc35: init %empty_tuple.type = call %specific_impl_fn.loc35_4.1() // CHECK:STDOUT: %T.ref.loc37: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc37: type = facet_access_type %T.ref.loc37 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc37: type = converted %T.ref.loc37, %T.as_type.loc37 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc37: type = facet_access_type %T.ref.loc37 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc37: type = converted %T.ref.loc37, %T.as_type.loc37 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] // CHECK:STDOUT: %AA.ref.loc37: %A.assoc_type = name_ref AA, @A.WithSelf.%assoc0 [concrete = constants.%assoc0.2af] // CHECK:STDOUT: %impl.elem0.loc37: @G.%.loc34 (%.03b) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.739)] // CHECK:STDOUT: %specific_impl_fn.loc37: = specific_impl_function %impl.elem0.loc37, @A.WithSelf.AA(constants.%A.facet.7b4) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.ece)] // CHECK:STDOUT: %A.WithSelf.AA.call.loc37: init %empty_tuple.type = call %specific_impl_fn.loc37() // CHECK:STDOUT: %T.ref.loc38: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc38: type = facet_access_type %T.ref.loc38 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc38: type = converted %T.ref.loc38, %T.as_type.loc38 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc38: type = facet_access_type %T.ref.loc38 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc38: type = converted %T.ref.loc38, %T.as_type.loc38 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] // CHECK:STDOUT: %BB.ref.loc38: %B.assoc_type = name_ref BB, @B.WithSelf.%assoc0 [concrete = constants.%assoc0.880] // CHECK:STDOUT: %impl.elem0.loc38: @G.%.loc35 (%.655) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.793)] // CHECK:STDOUT: %specific_impl_fn.loc38: = specific_impl_function %impl.elem0.loc38, @B.WithSelf.BB(constants.%B.facet.746) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.c6b)] @@ -380,7 +380,7 @@ fn F() { // CHECK:STDOUT: %T.ref.loc40: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T)] // CHECK:STDOUT: %A.ref.loc40: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %AA.ref.loc40: %A.assoc_type = name_ref AA, @A.WithSelf.%assoc0 [concrete = constants.%assoc0.2af] -// CHECK:STDOUT: %T.as_type.loc40: type = facet_access_type %T.ref.loc40 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc40: type = facet_access_type %T.ref.loc40 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] // CHECK:STDOUT: %A.facet.loc40: %A.type = facet_value %T.as_type.loc40, (constants.%A.lookup_impl_witness) [symbolic = %A.facet.loc34 (constants.%A.facet.7b4)] // CHECK:STDOUT: %.loc40: %A.type = converted %T.ref.loc40, %A.facet.loc40 [symbolic = %A.facet.loc34 (constants.%A.facet.7b4)] // CHECK:STDOUT: %impl.elem0.loc40: @G.%.loc34 (%.03b) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.739)] @@ -389,7 +389,7 @@ fn F() { // CHECK:STDOUT: %T.ref.loc41: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T)] // CHECK:STDOUT: %B.ref.loc41: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: %BB.ref.loc41: %B.assoc_type = name_ref BB, @B.WithSelf.%assoc0 [concrete = constants.%assoc0.880] -// CHECK:STDOUT: %T.as_type.loc41: type = facet_access_type %T.ref.loc41 [symbolic = %T.as_type.loc33_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc41: type = facet_access_type %T.ref.loc41 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] // CHECK:STDOUT: %B.facet.loc41: %B.type = facet_value %T.as_type.loc41, (constants.%B.lookup_impl_witness) [symbolic = %B.facet.loc35 (constants.%B.facet.746)] // CHECK:STDOUT: %.loc41: %B.type = converted %T.ref.loc41, %B.facet.loc41 [symbolic = %B.facet.loc35 (constants.%B.facet.746)] // CHECK:STDOUT: %impl.elem0.loc41: @G.%.loc35 (%.655) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.793)] @@ -479,10 +479,10 @@ fn F() { // CHECK:STDOUT: specific @G(constants.%T) { // CHECK:STDOUT: %T.patt.loc33_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc33_7.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc33_28.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc33_27.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.653 -// CHECK:STDOUT: %t.param_patt.loc33_26.2 => constants.%t.param_patt.4f9 -// CHECK:STDOUT: %t.patt.loc33_26.2 => constants.%t.patt.ecc +// CHECK:STDOUT: %t.param_patt.loc33_25.2 => constants.%t.param_patt.4f9 +// CHECK:STDOUT: %t.patt.loc33_25.2 => constants.%t.patt.ecc // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Empty.WithSelf(constants.%T) { @@ -524,10 +524,10 @@ fn F() { // CHECK:STDOUT: specific @G(constants.%facet_value) { // CHECK:STDOUT: %T.patt.loc33_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc33_7.1 => constants.%facet_value -// CHECK:STDOUT: %T.as_type.loc33_28.1 => constants.%C +// CHECK:STDOUT: %T.as_type.loc33_27.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b -// CHECK:STDOUT: %t.param_patt.loc33_26.2 => constants.%t.param_patt.5f9 -// CHECK:STDOUT: %t.patt.loc33_26.2 => constants.%t.patt.c3d +// CHECK:STDOUT: %t.param_patt.loc33_25.2 => constants.%t.param_patt.5f9 +// CHECK:STDOUT: %t.patt.loc33_25.2 => constants.%t.patt.c3d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type diff --git a/toolchain/check/testdata/facet/combine.carbon b/toolchain/check/testdata/facet/combine.carbon index 841ce1af8cb4..9144ebe0ebfd 100644 --- a/toolchain/check/testdata/facet/combine.carbon +++ b/toolchain/check/testdata/facet/combine.carbon @@ -52,7 +52,7 @@ impl C as B { fn BB(unused self) {} } -fn G[T:! A & B](unused t: T) {} +fn G[T: A & B](unused t: T) {} fn F() { ({} as C).((A & B).BB)(); @@ -66,7 +66,7 @@ fn F() { // --- generic_interface.carbon library "[[@TEST_NAME]]"; -interface A(T:! type) {} +interface A(T: type) {} interface B {} class P1 {} @@ -76,7 +76,7 @@ class C {} impl C as A(P1) {} impl C as B {} -fn G[T:! A(P1) & B](unused t: T) {} +fn G[T: A(P1) & B](unused t: T) {} fn F() { G({} as C); @@ -85,7 +85,7 @@ fn F() { // --- fail_wrong_generic_interface.carbon library "[[@TEST_NAME]]"; -interface A(T:! type) {} +interface A(T: type) {} interface B {} class P1 {} @@ -95,15 +95,15 @@ class C {} impl C as A(P1) {} impl C as B {} -fn G[T:! A(P2) & B](unused t: T) {} +fn G[T: A(P2) & B](unused t: T) {} fn F() { // CHECK:STDERR: fail_wrong_generic_interface.carbon:[[@LINE+7]]:3: error: cannot convert type `C` into type implementing `A(P2) & B` [ConversionFailureTypeToFacet] // CHECK:STDERR: G({} as C); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: fail_wrong_generic_interface.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn G[T:! A(P2) & B](unused t: T) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn G[T: A(P2) & B](unused t: T) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: G({} as C); } @@ -112,9 +112,9 @@ fn F() { library "[[@TEST_NAME]]"; interface Iface {} -interface GenericIface(T:! type) {} +interface GenericIface(T: type) {} -class GenericClass(T:! type) {} +class GenericClass(T: type) {} class ImplIface {} impl ImplIface as Iface {} @@ -122,9 +122,9 @@ impl ImplIface as Iface {} class C {} impl C as Iface {} -impl forall [IfaceType:! Iface] C as GenericIface(GenericClass(IfaceType)) {} +impl forall [IfaceType: Iface] C as GenericIface(GenericClass(IfaceType)) {} -fn G[T:! Iface & GenericIface(GenericClass(ImplIface))](unused t: T) {} +fn G[T: Iface & GenericIface(GenericClass(ImplIface))](unused t: T) {} fn F() { G({} as C); @@ -133,13 +133,13 @@ fn F() { // --- compare_equal.carbon library "[[@TEST_NAME]]"; -class WrapType(T:! type) {} -fn AssertSame[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} -fn Type(T:! type) -> WrapType(T) { return {}; } +class WrapType(T: type) {} +fn AssertSame[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} +fn Type(generic T: type) -> WrapType(T) { return {}; } interface I; interface J; -interface K(T:! type); +interface K(T: type); fn TestIncomplete() { AssertSame(Type(I), Type(I & I)); @@ -154,7 +154,7 @@ fn TestIncomplete() { interface I {} interface J {} -interface K(T:! type) {} +interface K(T: type) {} fn TestComplete() { AssertSame(Type(I), Type(I & I)); @@ -170,9 +170,9 @@ fn TestComplete() { // --- fail_compare_not_equal.carbon library "[[@TEST_NAME]]"; -class WrapType(T:! type) {} -fn Same[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} -fn Type(T:! type) -> WrapType(T) { return {}; } +class WrapType(T: type) {} +fn Same[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} +fn Type(generic T: type) -> WrapType(T) { return {}; } interface I {} interface J {} @@ -183,8 +183,8 @@ fn Test() { // CHECK:STDERR: Same(Type(I & J), Type(K & I & J)); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_compare_not_equal.carbon:[[@LINE-11]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Same[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Same[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Same(Type(I & J), Type(K & I & J)); } @@ -192,20 +192,20 @@ fn Test() { // --- fail_compare_not_equal_parameterized.carbon library "[[@TEST_NAME]]"; -class WrapType(T:! type) {} -fn Same[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} -fn Type(T:! type) -> WrapType(T) { return {}; } +class WrapType(T: type) {} +fn Same[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} +fn Type(generic T: type) -> WrapType(T) { return {}; } interface I {} -interface J(T:! type) {} +interface J(T: type) {} fn Test() { // CHECK:STDERR: fail_compare_not_equal_parameterized.carbon:[[@LINE+7]]:3: error: inconsistent deductions for value of generic parameter `T` [DeductionInconsistent] // CHECK:STDERR: Same(Type(I & J(())), Type(J({}) & I)); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_compare_not_equal_parameterized.carbon:[[@LINE-10]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Same[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Same[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Same(Type(I & J(())), Type(J({}) & I)); } @@ -213,20 +213,20 @@ fn Test() { // --- fail_compare_not_equal_parameterized_extra.carbon library "[[@TEST_NAME]]"; -class WrapType(T:! type) {} -fn Same[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} -fn Type(T:! type) -> WrapType(T) { return {}; } +class WrapType(T: type) {} +fn Same[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} +fn Type(generic T: type) -> WrapType(T) { return {}; } interface I {} -interface J(T:! type) {} +interface J(T: type) {} fn Test() { // CHECK:STDERR: fail_compare_not_equal_parameterized_extra.carbon:[[@LINE+7]]:3: error: inconsistent deductions for value of generic parameter `T` [DeductionInconsistent] // CHECK:STDERR: Same(Type(I & J(())), Type(J(()) & J({}) & I)); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_compare_not_equal_parameterized_extra.carbon:[[@LINE-10]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Same[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Same[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Same(Type(I & J(())), Type(J(()) & J({}) & I)); } diff --git a/toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon b/toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon index d361f65007c5..f392ea5b3787 100644 --- a/toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon +++ b/toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon @@ -17,7 +17,7 @@ interface Animal {} class Goat {} impl Goat as Animal {} -fn WalkAnimal(unused A:! Animal) {} +fn WalkAnimal(unused generic A: Animal) {} fn F() { WalkAnimal(Goat); @@ -69,13 +69,13 @@ fn F() { // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } // CHECK:STDOUT: %WalkAnimal.decl: %WalkAnimal.type = fn_decl @WalkAnimal [concrete = constants.%WalkAnimal] { -// CHECK:STDOUT: %A.patt.loc20_23.1: %pattern_type = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc20_23.2 (constants.%A.patt)] +// CHECK:STDOUT: %A.patt.loc20_31.1: %pattern_type = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc20_31.2 (constants.%A.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc20: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %A.loc20_23.2: %Animal.type = symbolic_binding A, 0 [symbolic = %A.loc20_23.1 (constants.%A)] +// CHECK:STDOUT: %A.loc20_31.2: %Animal.type = symbolic_binding A, 0 [symbolic = %A.loc20_31.1 (constants.%A)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } @@ -110,9 +110,9 @@ fn F() { // CHECK:STDOUT: .Self = constants.%Goat // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @WalkAnimal(%A.loc20_23.2: %Animal.type) { -// CHECK:STDOUT: %A.patt.loc20_23.2: %pattern_type = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc20_23.2 (constants.%A.patt)] -// CHECK:STDOUT: %A.loc20_23.1: %Animal.type = symbolic_binding A, 0 [symbolic = %A.loc20_23.1 (constants.%A)] +// CHECK:STDOUT: generic fn @WalkAnimal(%A.loc20_31.2: %Animal.type) { +// CHECK:STDOUT: %A.patt.loc20_31.2: %pattern_type = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc20_31.2 (constants.%A.patt)] +// CHECK:STDOUT: %A.loc20_31.1: %Animal.type = symbolic_binding A, 0 [symbolic = %A.loc20_31.1 (constants.%A)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -146,13 +146,13 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WalkAnimal(constants.%A) { -// CHECK:STDOUT: %A.patt.loc20_23.2 => constants.%A.patt -// CHECK:STDOUT: %A.loc20_23.1 => constants.%A +// CHECK:STDOUT: %A.patt.loc20_31.2 => constants.%A.patt +// CHECK:STDOUT: %A.loc20_31.1 => constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WalkAnimal(constants.%Animal.facet) { -// CHECK:STDOUT: %A.patt.loc20_23.2 => constants.%A.patt -// CHECK:STDOUT: %A.loc20_23.1 => constants.%Animal.facet +// CHECK:STDOUT: %A.patt.loc20_31.2 => constants.%A.patt +// CHECK:STDOUT: %A.loc20_31.1 => constants.%Animal.facet // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon b/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon index ec22abc004b3..c4fead2401d7 100644 --- a/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -interface Generic(Scalar:! type) { +interface Generic(Scalar: type) { fn F(); } @@ -27,13 +27,13 @@ impl ImplsGeneric as Generic(GenericParam) { fn F() {} } -fn CallGenericMethod(T:! type, unused U:! Generic(T)) {} +fn CallGenericMethod(generic T: type, unused generic U: Generic(T)) {} fn G() { CallGenericMethod(GenericParam, ImplsGeneric); } -fn PassThroughToGenericMethod(T:! type, U:! Generic(T)) { +fn PassThroughToGenericMethod(generic T: type, generic U: Generic(T)) { CallGenericMethod(T, U); } @@ -45,7 +45,7 @@ fn H() { library "[[@TEST_NAME]]"; -interface Generic(Scalar:! type) { +interface Generic(Scalar: type) { fn F(); } @@ -56,7 +56,7 @@ impl ImplsGeneric as Generic(GenericParam) { fn F() {} } -fn CallGenericMethod[T:! type](unused U:! Generic(T), unused t: T) {} +fn CallGenericMethod[T: type](unused generic U: Generic(T), unused t: T) {} fn G() { CallGenericMethod(ImplsGeneric, {} as GenericParam); @@ -146,9 +146,9 @@ fn G() { // CHECK:STDOUT: %Generic.decl: %Generic.type.30d = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %Scalar.patt.loc4_25.1: %pattern_type.98f = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc4_25.2 (constants.%Scalar.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_28.1: type = splice_block %.loc4_28.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_27.1: type = splice_block %.loc4_27.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_28.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_27.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %Scalar.loc4_25.2: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc4_25.1 (constants.%Scalar)] // CHECK:STDOUT: } @@ -161,39 +161,39 @@ fn G() { // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%GenericParam)> [concrete = constants.%Generic.type.b40] // CHECK:STDOUT: } // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { -// CHECK:STDOUT: %T.patt.loc15_23.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc15_40.1: @CallGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_40.2 (constants.%U.patt.8a63c8.1)] +// CHECK:STDOUT: %T.patt.loc15_31.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_31.2 (constants.%T.patt)] +// CHECK:STDOUT: %U.patt.loc15_55.1: @CallGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_55.2 (constants.%U.patt.8a63c8.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_26.1: type = splice_block %.loc15_26.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc15_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_26.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_33.1: type = splice_block %.loc15_33.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc15_31: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc15_33.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc15_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %.loc15_52: type = splice_block %Generic.type.loc15_52.2 [symbolic = %Generic.type.loc15_52.1 (constants.%Generic.type.ee14e9.2)] { -// CHECK:STDOUT: %.Self.frozen.loc15_40: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %T.loc15_31.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_31.1 (constants.%T)] +// CHECK:STDOUT: %.loc15_66: type = splice_block %Generic.type.loc15_66.2 [symbolic = %Generic.type.loc15_66.1 (constants.%Generic.type.ee14e9.2)] { +// CHECK:STDOUT: %.Self.frozen.loc15_55: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Generic.ref: %Generic.type.30d = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc15_52.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc15_52.1 (constants.%Generic.type.ee14e9.2)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_31.2 [symbolic = %T.loc15_31.1 (constants.%T)] +// CHECK:STDOUT: %Generic.type.loc15_66.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc15_66.1 (constants.%Generic.type.ee14e9.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc15_40.2: @CallGenericMethod.%Generic.type.loc15_52.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc15_40.1 (constants.%U.af9edd.1)] +// CHECK:STDOUT: %U.loc15_55.2: @CallGenericMethod.%Generic.type.loc15_66.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc15_55.1 (constants.%U.af9edd.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: %PassThroughToGenericMethod.decl: %PassThroughToGenericMethod.type = fn_decl @PassThroughToGenericMethod [concrete = constants.%PassThroughToGenericMethod] { -// CHECK:STDOUT: %T.patt.loc21_32.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_32.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc21_42.1: @PassThroughToGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc21_42.2 (constants.%U.patt.8a63c8.2)] +// CHECK:STDOUT: %T.patt.loc21_40.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_40.2 (constants.%T.patt)] +// CHECK:STDOUT: %U.patt.loc21_57.1: @PassThroughToGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc21_57.2 (constants.%U.patt.8a63c8.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_35.1: type = splice_block %.loc21_35.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc21_32: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc21_35.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc21_42.1: type = splice_block %.loc21_42.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc21_40: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc21_42.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc21_32.2: type = symbolic_binding T, 0 [symbolic = %T.loc21_32.1 (constants.%T)] -// CHECK:STDOUT: %.loc21_54: type = splice_block %Generic.type.loc21_54.2 [symbolic = %Generic.type.loc21_54.1 (constants.%Generic.type.ee14e9.2)] { -// CHECK:STDOUT: %.Self.frozen.loc21_42: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %T.loc21_40.2: type = symbolic_binding T, 0 [symbolic = %T.loc21_40.1 (constants.%T)] +// CHECK:STDOUT: %.loc21_68: type = splice_block %Generic.type.loc21_68.2 [symbolic = %Generic.type.loc21_68.1 (constants.%Generic.type.ee14e9.2)] { +// CHECK:STDOUT: %.Self.frozen.loc21_57: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Generic.ref: %Generic.type.30d = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] -// CHECK:STDOUT: %T.ref.loc21: type = name_ref T, %T.loc21_32.2 [symbolic = %T.loc21_32.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc21_54.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc21_54.1 (constants.%Generic.type.ee14e9.2)] +// CHECK:STDOUT: %T.ref.loc21: type = name_ref T, %T.loc21_40.2 [symbolic = %T.loc21_40.1 (constants.%T)] +// CHECK:STDOUT: %Generic.type.loc21_68.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc21_68.1 (constants.%Generic.type.ee14e9.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc21_42.2: @PassThroughToGenericMethod.%Generic.type.loc21_54.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc21_42.1 (constants.%U.af9edd.2)] +// CHECK:STDOUT: %U.loc21_57.2: @PassThroughToGenericMethod.%Generic.type.loc21_68.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc21_57.1 (constants.%U.af9edd.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {} {} // CHECK:STDOUT: } @@ -204,10 +204,10 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc4_25.1)> [symbolic = %Generic.type (constants.%Generic.type.ee14e9.1)] -// CHECK:STDOUT: %Self.loc4_34.2: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.8ea1ea.1)] +// CHECK:STDOUT: %Self.loc4_33.2: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.8ea1ea.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_34.1: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.8ea1ea.1)] +// CHECK:STDOUT: %Self.loc4_33.1: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.8ea1ea.1)] // CHECK:STDOUT: %Generic.WithSelf.decl = interface_with_self_decl @Generic [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -215,7 +215,7 @@ fn G() { // CHECK:STDOUT: %assoc0.loc5_9.1: @Generic.WithSelf.%Generic.assoc_type (%Generic.assoc_type.d7021d.1) = assoc_entity element0, %Generic.WithSelf.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.31052a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_34.1 +// CHECK:STDOUT: .Self = %Self.loc4_33.1 // CHECK:STDOUT: .F = @Generic.WithSelf.%assoc0.loc5_9.1 // CHECK:STDOUT: witness = (@Generic.WithSelf.%Generic.WithSelf.F.decl) // CHECK:STDOUT: @@ -252,7 +252,7 @@ fn G() { // CHECK:STDOUT: .Self = constants.%ImplsGeneric // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc4_25.2: type, @Generic.%Self.loc4_34.1: @Generic.%Generic.type (%Generic.type.ee14e9.1)) { +// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc4_25.2: type, @Generic.%Self.loc4_33.1: @Generic.%Generic.type (%Generic.type.ee14e9.1)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -263,13 +263,13 @@ fn G() { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc15_23.2: type, %U.loc15_40.2: @CallGenericMethod.%Generic.type.loc15_52.1 (%Generic.type.ee14e9.2)) { -// CHECK:STDOUT: %T.patt.loc15_23.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc15_23.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc15_52.1: type = facet_type <@Generic, @Generic(%T.loc15_23.1)> [symbolic = %Generic.type.loc15_52.1 (constants.%Generic.type.ee14e9.2)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Generic.type.loc15_52.1 [symbolic = %pattern_type (constants.%pattern_type.4e0)] -// CHECK:STDOUT: %U.patt.loc15_40.2: @CallGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_40.2 (constants.%U.patt.8a63c8.1)] -// CHECK:STDOUT: %U.loc15_40.1: @CallGenericMethod.%Generic.type.loc15_52.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc15_40.1 (constants.%U.af9edd.1)] +// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc15_31.2: type, %U.loc15_55.2: @CallGenericMethod.%Generic.type.loc15_66.1 (%Generic.type.ee14e9.2)) { +// CHECK:STDOUT: %T.patt.loc15_31.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_31.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc15_31.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_31.1 (constants.%T)] +// CHECK:STDOUT: %Generic.type.loc15_66.1: type = facet_type <@Generic, @Generic(%T.loc15_31.1)> [symbolic = %Generic.type.loc15_66.1 (constants.%Generic.type.ee14e9.2)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Generic.type.loc15_66.1 [symbolic = %pattern_type (constants.%pattern_type.4e0)] +// CHECK:STDOUT: %U.patt.loc15_55.2: @CallGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_55.2 (constants.%U.patt.8a63c8.1)] +// CHECK:STDOUT: %U.loc15_55.1: @CallGenericMethod.%Generic.type.loc15_66.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc15_55.1 (constants.%U.af9edd.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -295,22 +295,22 @@ fn G() { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @PassThroughToGenericMethod(%T.loc21_32.2: type, %U.loc21_42.2: @PassThroughToGenericMethod.%Generic.type.loc21_54.1 (%Generic.type.ee14e9.2)) { -// CHECK:STDOUT: %T.patt.loc21_32.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_32.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc21_32.1: type = symbolic_binding T, 0 [symbolic = %T.loc21_32.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc21_54.1: type = facet_type <@Generic, @Generic(%T.loc21_32.1)> [symbolic = %Generic.type.loc21_54.1 (constants.%Generic.type.ee14e9.2)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Generic.type.loc21_54.1 [symbolic = %pattern_type (constants.%pattern_type.4e0)] -// CHECK:STDOUT: %U.patt.loc21_42.2: @PassThroughToGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc21_42.2 (constants.%U.patt.8a63c8.2)] -// CHECK:STDOUT: %U.loc21_42.1: @PassThroughToGenericMethod.%Generic.type.loc21_54.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc21_42.1 (constants.%U.af9edd.2)] +// CHECK:STDOUT: generic fn @PassThroughToGenericMethod(%T.loc21_40.2: type, %U.loc21_57.2: @PassThroughToGenericMethod.%Generic.type.loc21_68.1 (%Generic.type.ee14e9.2)) { +// CHECK:STDOUT: %T.patt.loc21_40.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_40.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc21_40.1: type = symbolic_binding T, 0 [symbolic = %T.loc21_40.1 (constants.%T)] +// CHECK:STDOUT: %Generic.type.loc21_68.1: type = facet_type <@Generic, @Generic(%T.loc21_40.1)> [symbolic = %Generic.type.loc21_68.1 (constants.%Generic.type.ee14e9.2)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Generic.type.loc21_68.1 [symbolic = %pattern_type (constants.%pattern_type.4e0)] +// CHECK:STDOUT: %U.patt.loc21_57.2: @PassThroughToGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc21_57.2 (constants.%U.patt.8a63c8.2)] +// CHECK:STDOUT: %U.loc21_57.1: @PassThroughToGenericMethod.%Generic.type.loc21_68.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc21_57.1 (constants.%U.af9edd.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %CallGenericMethod.specific_fn.loc22_3.2: = specific_function constants.%CallGenericMethod, @CallGenericMethod(%T.loc21_32.1, %U.loc21_42.1) [symbolic = %CallGenericMethod.specific_fn.loc22_3.2 (constants.%CallGenericMethod.specific_fn.151)] +// CHECK:STDOUT: %CallGenericMethod.specific_fn.loc22_3.2: = specific_function constants.%CallGenericMethod, @CallGenericMethod(%T.loc21_40.1, %U.loc21_57.1) [symbolic = %CallGenericMethod.specific_fn.loc22_3.2 (constants.%CallGenericMethod.specific_fn.151)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %CallGenericMethod.ref: %CallGenericMethod.type = name_ref CallGenericMethod, file.%CallGenericMethod.decl [concrete = constants.%CallGenericMethod] -// CHECK:STDOUT: %T.ref.loc22: type = name_ref T, %T.loc21_32.2 [symbolic = %T.loc21_32.1 (constants.%T)] -// CHECK:STDOUT: %U.ref: @PassThroughToGenericMethod.%Generic.type.loc21_54.1 (%Generic.type.ee14e9.2) = name_ref U, %U.loc21_42.2 [symbolic = %U.loc21_42.1 (constants.%U.af9edd.2)] +// CHECK:STDOUT: %T.ref.loc22: type = name_ref T, %T.loc21_40.2 [symbolic = %T.loc21_40.1 (constants.%T)] +// CHECK:STDOUT: %U.ref: @PassThroughToGenericMethod.%Generic.type.loc21_68.1 (%Generic.type.ee14e9.2) = name_ref U, %U.loc21_57.2 [symbolic = %U.loc21_57.1 (constants.%U.af9edd.2)] // CHECK:STDOUT: %CallGenericMethod.specific_fn.loc22_3.1: = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%T, constants.%U.af9edd.2) [symbolic = %CallGenericMethod.specific_fn.loc22_3.2 (constants.%CallGenericMethod.specific_fn.151)] // CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn.loc22_3.1() // CHECK:STDOUT: return @@ -348,7 +348,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type => constants.%Generic.type.b40 -// CHECK:STDOUT: %Self.loc4_34.2 => constants.%Self.685 +// CHECK:STDOUT: %Self.loc4_33.2 => constants.%Self.685 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.WithSelf(constants.%GenericParam, constants.%Self.8ea1ea.1) { @@ -381,36 +381,36 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type => constants.%Generic.type.ee14e9.2 -// CHECK:STDOUT: %Self.loc4_34.2 => constants.%Self.8ea1ea.2 +// CHECK:STDOUT: %Self.loc4_33.2 => constants.%Self.8ea1ea.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U.af9edd.1) { -// CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc15_23.1 => constants.%T -// CHECK:STDOUT: %Generic.type.loc15_52.1 => constants.%Generic.type.ee14e9.2 +// CHECK:STDOUT: %T.patt.loc15_31.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc15_31.1 => constants.%T +// CHECK:STDOUT: %Generic.type.loc15_66.1 => constants.%Generic.type.ee14e9.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4e0 -// CHECK:STDOUT: %U.patt.loc15_40.2 => constants.%U.patt.8a63c8.1 -// CHECK:STDOUT: %U.loc15_40.1 => constants.%U.af9edd.1 +// CHECK:STDOUT: %U.patt.loc15_55.2 => constants.%U.patt.8a63c8.1 +// CHECK:STDOUT: %U.loc15_55.1 => constants.%U.af9edd.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) { -// CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc15_23.1 => constants.%GenericParam -// CHECK:STDOUT: %Generic.type.loc15_52.1 => constants.%Generic.type.b40 +// CHECK:STDOUT: %T.patt.loc15_31.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc15_31.1 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc15_66.1 => constants.%Generic.type.b40 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.de1 -// CHECK:STDOUT: %U.patt.loc15_40.2 => constants.%U.patt.e09a67.1 -// CHECK:STDOUT: %U.loc15_40.1 => constants.%Generic.facet +// CHECK:STDOUT: %U.patt.loc15_55.2 => constants.%U.patt.e09a67.1 +// CHECK:STDOUT: %U.loc15_55.1 => constants.%Generic.facet // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @PassThroughToGenericMethod(constants.%T, constants.%U.af9edd.2) { -// CHECK:STDOUT: %T.patt.loc21_32.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc21_32.1 => constants.%T -// CHECK:STDOUT: %Generic.type.loc21_54.1 => constants.%Generic.type.ee14e9.2 +// CHECK:STDOUT: %T.patt.loc21_40.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc21_40.1 => constants.%T +// CHECK:STDOUT: %Generic.type.loc21_68.1 => constants.%Generic.type.ee14e9.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4e0 -// CHECK:STDOUT: %U.patt.loc21_42.2 => constants.%U.patt.8a63c8.2 -// CHECK:STDOUT: %U.loc21_42.1 => constants.%U.af9edd.2 +// CHECK:STDOUT: %U.patt.loc21_57.2 => constants.%U.patt.8a63c8.2 +// CHECK:STDOUT: %U.loc21_57.1 => constants.%U.af9edd.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.WithSelf(constants.%T, constants.%Self.8ea1ea.1) { @@ -425,23 +425,23 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U.af9edd.2) { -// CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc15_23.1 => constants.%T -// CHECK:STDOUT: %Generic.type.loc15_52.1 => constants.%Generic.type.ee14e9.2 +// CHECK:STDOUT: %T.patt.loc15_31.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc15_31.1 => constants.%T +// CHECK:STDOUT: %Generic.type.loc15_66.1 => constants.%Generic.type.ee14e9.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4e0 -// CHECK:STDOUT: %U.patt.loc15_40.2 => constants.%U.patt.8a63c8.1 -// CHECK:STDOUT: %U.loc15_40.1 => constants.%U.af9edd.2 +// CHECK:STDOUT: %U.patt.loc15_55.2 => constants.%U.patt.8a63c8.1 +// CHECK:STDOUT: %U.loc15_55.1 => constants.%U.af9edd.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @PassThroughToGenericMethod(constants.%GenericParam, constants.%Generic.facet) { -// CHECK:STDOUT: %T.patt.loc21_32.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc21_32.1 => constants.%GenericParam -// CHECK:STDOUT: %Generic.type.loc21_54.1 => constants.%Generic.type.b40 +// CHECK:STDOUT: %T.patt.loc21_40.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc21_40.1 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc21_68.1 => constants.%Generic.type.b40 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.de1 -// CHECK:STDOUT: %U.patt.loc21_42.2 => constants.%U.patt.e09a67.2 -// CHECK:STDOUT: %U.loc21_42.1 => constants.%Generic.facet +// CHECK:STDOUT: %U.patt.loc21_57.2 => constants.%U.patt.e09a67.2 +// CHECK:STDOUT: %U.loc21_57.1 => constants.%Generic.facet // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CallGenericMethod.specific_fn.loc22_3.2 => constants.%CallGenericMethod.specific_fn.42a @@ -531,9 +531,9 @@ fn G() { // CHECK:STDOUT: %Generic.decl: %Generic.type.30d = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %Scalar.patt.loc4_25.1: %pattern_type.98f = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc4_25.2 (constants.%Scalar.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_28.1: type = splice_block %.loc4_28.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_27.1: type = splice_block %.loc4_27.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_28.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_27.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %Scalar.loc4_25.2: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc4_25.1 (constants.%Scalar)] // CHECK:STDOUT: } @@ -547,24 +547,24 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { // CHECK:STDOUT: %T.patt.loc15_23.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc15_40.1: @CallGenericMethod.%pattern_type.loc15_40 (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_40.2 (constants.%U.patt.8a6)] -// CHECK:STDOUT: %t.param_patt.loc15_63.1: @CallGenericMethod.%pattern_type.loc15_63 (%pattern_type.51d) = value_param_pattern [symbolic = %t.param_patt.loc15_63.2 (constants.%t.param_patt.513)] -// CHECK:STDOUT: %t.patt.loc15_63.1: @CallGenericMethod.%pattern_type.loc15_63 (%pattern_type.51d) = at_binding_pattern t, %t.param_patt.loc15_63.1 [symbolic = %t.patt.loc15_63.2 (constants.%t.patt.dcb)] +// CHECK:STDOUT: %U.patt.loc15_47.1: @CallGenericMethod.%pattern_type.loc15_47 (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_47.2 (constants.%U.patt.8a6)] +// CHECK:STDOUT: %t.param_patt.loc15_69.1: @CallGenericMethod.%pattern_type.loc15_69 (%pattern_type.51d) = value_param_pattern [symbolic = %t.param_patt.loc15_69.2 (constants.%t.param_patt.513)] +// CHECK:STDOUT: %t.patt.loc15_69.1: @CallGenericMethod.%pattern_type.loc15_69 (%pattern_type.51d) = at_binding_pattern t, %t.param_patt.loc15_69.1 [symbolic = %t.patt.loc15_69.2 (constants.%t.patt.dcb)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_26.1: type = splice_block %.loc15_26.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_25.1: type = splice_block %.loc15_25.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc15_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_26.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_25.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %.loc15_52: type = splice_block %Generic.type.loc15_52.2 [symbolic = %Generic.type.loc15_52.1 (constants.%Generic.type.ee14e9.2)] { -// CHECK:STDOUT: %.Self.frozen.loc15_40: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc15_58: type = splice_block %Generic.type.loc15_58.2 [symbolic = %Generic.type.loc15_58.1 (constants.%Generic.type.ee14e9.2)] { +// CHECK:STDOUT: %.Self.frozen.loc15_47: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Generic.ref: %Generic.type.30d = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] -// CHECK:STDOUT: %T.ref.loc15_51: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc15_52.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc15_52.1 (constants.%Generic.type.ee14e9.2)] +// CHECK:STDOUT: %T.ref.loc15_57: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] +// CHECK:STDOUT: %Generic.type.loc15_58.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc15_58.1 (constants.%Generic.type.ee14e9.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc15_40.2: @CallGenericMethod.%Generic.type.loc15_52.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc15_40.1 (constants.%U)] +// CHECK:STDOUT: %U.loc15_47.2: @CallGenericMethod.%Generic.type.loc15_58.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc15_47.1 (constants.%U)] // CHECK:STDOUT: %t.param: @CallGenericMethod.%T.loc15_23.1 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc15_65: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc15_71: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] // CHECK:STDOUT: %t: @CallGenericMethod.%T.loc15_23.1 (%T) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} @@ -576,10 +576,10 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc4_25.1)> [symbolic = %Generic.type (constants.%Generic.type.ee14e9.1)] -// CHECK:STDOUT: %Self.loc4_34.2: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.8ea)] +// CHECK:STDOUT: %Self.loc4_33.2: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.8ea)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_34.1: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.8ea)] +// CHECK:STDOUT: %Self.loc4_33.1: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.8ea)] // CHECK:STDOUT: %Generic.WithSelf.decl = interface_with_self_decl @Generic [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -587,7 +587,7 @@ fn G() { // CHECK:STDOUT: %assoc0.loc5_9.1: @Generic.WithSelf.%Generic.assoc_type (%Generic.assoc_type.d70) = assoc_entity element0, %Generic.WithSelf.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.310)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_34.1 +// CHECK:STDOUT: .Self = %Self.loc4_33.1 // CHECK:STDOUT: .F = @Generic.WithSelf.%assoc0.loc5_9.1 // CHECK:STDOUT: witness = (@Generic.WithSelf.%Generic.WithSelf.F.decl) // CHECK:STDOUT: @@ -624,7 +624,7 @@ fn G() { // CHECK:STDOUT: .Self = constants.%ImplsGeneric // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc4_25.2: type, @Generic.%Self.loc4_34.1: @Generic.%Generic.type (%Generic.type.ee14e9.1)) { +// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc4_25.2: type, @Generic.%Self.loc4_33.1: @Generic.%Generic.type (%Generic.type.ee14e9.1)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -635,16 +635,16 @@ fn G() { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc15_23.2: type, %U.loc15_40.2: @CallGenericMethod.%Generic.type.loc15_52.1 (%Generic.type.ee14e9.2)) { +// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc15_23.2: type, %U.loc15_47.2: @CallGenericMethod.%Generic.type.loc15_58.1 (%Generic.type.ee14e9.2)) { // CHECK:STDOUT: %T.patt.loc15_23.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc15_23.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc15_52.1: type = facet_type <@Generic, @Generic(%T.loc15_23.1)> [symbolic = %Generic.type.loc15_52.1 (constants.%Generic.type.ee14e9.2)] -// CHECK:STDOUT: %pattern_type.loc15_40: type = pattern_type %Generic.type.loc15_52.1 [symbolic = %pattern_type.loc15_40 (constants.%pattern_type.4e0)] -// CHECK:STDOUT: %U.patt.loc15_40.2: @CallGenericMethod.%pattern_type.loc15_40 (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_40.2 (constants.%U.patt.8a6)] -// CHECK:STDOUT: %U.loc15_40.1: @CallGenericMethod.%Generic.type.loc15_52.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc15_40.1 (constants.%U)] -// CHECK:STDOUT: %pattern_type.loc15_63: type = pattern_type %T.loc15_23.1 [symbolic = %pattern_type.loc15_63 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %t.param_patt.loc15_63.2: @CallGenericMethod.%pattern_type.loc15_63 (%pattern_type.51d) = value_param_pattern [symbolic = %t.param_patt.loc15_63.2 (constants.%t.param_patt.513)] -// CHECK:STDOUT: %t.patt.loc15_63.2: @CallGenericMethod.%pattern_type.loc15_63 (%pattern_type.51d) = at_binding_pattern t, %t.param_patt.loc15_63.2 [symbolic = %t.patt.loc15_63.2 (constants.%t.patt.dcb)] +// CHECK:STDOUT: %Generic.type.loc15_58.1: type = facet_type <@Generic, @Generic(%T.loc15_23.1)> [symbolic = %Generic.type.loc15_58.1 (constants.%Generic.type.ee14e9.2)] +// CHECK:STDOUT: %pattern_type.loc15_47: type = pattern_type %Generic.type.loc15_58.1 [symbolic = %pattern_type.loc15_47 (constants.%pattern_type.4e0)] +// CHECK:STDOUT: %U.patt.loc15_47.2: @CallGenericMethod.%pattern_type.loc15_47 (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_47.2 (constants.%U.patt.8a6)] +// CHECK:STDOUT: %U.loc15_47.1: @CallGenericMethod.%Generic.type.loc15_58.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc15_47.1 (constants.%U)] +// CHECK:STDOUT: %pattern_type.loc15_69: type = pattern_type %T.loc15_23.1 [symbolic = %pattern_type.loc15_69 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %t.param_patt.loc15_69.2: @CallGenericMethod.%pattern_type.loc15_69 (%pattern_type.51d) = value_param_pattern [symbolic = %t.param_patt.loc15_69.2 (constants.%t.param_patt.513)] +// CHECK:STDOUT: %t.patt.loc15_69.2: @CallGenericMethod.%pattern_type.loc15_69 (%pattern_type.51d) = at_binding_pattern t, %t.param_patt.loc15_69.2 [symbolic = %t.patt.loc15_69.2 (constants.%t.patt.dcb)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc15_23.1 [symbolic = %require_complete (constants.%require_complete)] @@ -702,7 +702,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type => constants.%Generic.type.b40 -// CHECK:STDOUT: %Self.loc4_34.2 => constants.%Self.685 +// CHECK:STDOUT: %Self.loc4_33.2 => constants.%Self.685 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.WithSelf(constants.%GenericParam, constants.%Self.8ea) { @@ -737,25 +737,25 @@ fn G() { // CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt // CHECK:STDOUT: %T.loc15_23.1 => constants.%T -// CHECK:STDOUT: %Generic.type.loc15_52.1 => constants.%Generic.type.ee14e9.2 -// CHECK:STDOUT: %pattern_type.loc15_40 => constants.%pattern_type.4e0 -// CHECK:STDOUT: %U.patt.loc15_40.2 => constants.%U.patt.8a6 -// CHECK:STDOUT: %U.loc15_40.1 => constants.%U -// CHECK:STDOUT: %pattern_type.loc15_63 => constants.%pattern_type.51d -// CHECK:STDOUT: %t.param_patt.loc15_63.2 => constants.%t.param_patt.513 -// CHECK:STDOUT: %t.patt.loc15_63.2 => constants.%t.patt.dcb +// CHECK:STDOUT: %Generic.type.loc15_58.1 => constants.%Generic.type.ee14e9.2 +// CHECK:STDOUT: %pattern_type.loc15_47 => constants.%pattern_type.4e0 +// CHECK:STDOUT: %U.patt.loc15_47.2 => constants.%U.patt.8a6 +// CHECK:STDOUT: %U.loc15_47.1 => constants.%U +// CHECK:STDOUT: %pattern_type.loc15_69 => constants.%pattern_type.51d +// CHECK:STDOUT: %t.param_patt.loc15_69.2 => constants.%t.param_patt.513 +// CHECK:STDOUT: %t.patt.loc15_69.2 => constants.%t.patt.dcb // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) { // CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt // CHECK:STDOUT: %T.loc15_23.1 => constants.%GenericParam -// CHECK:STDOUT: %Generic.type.loc15_52.1 => constants.%Generic.type.b40 -// CHECK:STDOUT: %pattern_type.loc15_40 => constants.%pattern_type.de1 -// CHECK:STDOUT: %U.patt.loc15_40.2 => constants.%U.patt.e09 -// CHECK:STDOUT: %U.loc15_40.1 => constants.%Generic.facet -// CHECK:STDOUT: %pattern_type.loc15_63 => constants.%pattern_type.485 -// CHECK:STDOUT: %t.param_patt.loc15_63.2 => constants.%t.param_patt.4d1 -// CHECK:STDOUT: %t.patt.loc15_63.2 => constants.%t.patt.0d5 +// CHECK:STDOUT: %Generic.type.loc15_58.1 => constants.%Generic.type.b40 +// CHECK:STDOUT: %pattern_type.loc15_47 => constants.%pattern_type.de1 +// CHECK:STDOUT: %U.patt.loc15_47.2 => constants.%U.patt.e09 +// CHECK:STDOUT: %U.loc15_47.1 => constants.%Generic.facet +// CHECK:STDOUT: %pattern_type.loc15_69 => constants.%pattern_type.485 +// CHECK:STDOUT: %t.param_patt.loc15_69.2 => constants.%t.param_patt.4d1 +// CHECK:STDOUT: %t.patt.loc15_69.2 => constants.%t.patt.0d5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type diff --git a/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon index cc60ae337043..66bf195fd6ac 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon @@ -14,7 +14,7 @@ interface Animal {} -fn WalkAnimal[T:! Animal](unused a: T) {} +fn WalkAnimal[T: Animal](unused a: T) {} class Goat {} impl Goat as Animal {} @@ -82,21 +82,21 @@ fn F() { // CHECK:STDOUT: %Animal.decl: type = interface_decl @Animal [concrete = constants.%Animal.type] {} {} // CHECK:STDOUT: %WalkAnimal.decl: %WalkAnimal.type = fn_decl @WalkAnimal [concrete = constants.%WalkAnimal] { // CHECK:STDOUT: %T.patt.loc17_16.1: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %a.param_patt.loc17_35.1: @WalkAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc17_35.2 (constants.%a.param_patt.84e)] -// CHECK:STDOUT: %a.patt.loc17_35.1: @WalkAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc17_35.1 [symbolic = %a.patt.loc17_35.2 (constants.%a.patt.3e6)] +// CHECK:STDOUT: %a.param_patt.loc17_34.1: @WalkAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc17_34.2 (constants.%a.param_patt.84e)] +// CHECK:STDOUT: %a.patt.loc17_34.1: @WalkAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc17_34.1 [symbolic = %a.patt.loc17_34.2 (constants.%a.patt.3e6)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_19: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.loc17_18: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc17_16.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_16.1 (constants.%T)] -// CHECK:STDOUT: %a.param: @WalkAnimal.%T.as_type.loc17_37.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc17_37.1: type = splice_block %.loc17_37.2 [symbolic = %T.as_type.loc17_37.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %a.param: @WalkAnimal.%T.as_type.loc17_36.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc17_36.1: type = splice_block %.loc17_36.2 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc17_16.2 [symbolic = %T.loc17_16.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc17_37.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc17_37.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc17_37.2: type = converted %T.ref, %T.as_type.loc17_37.2 [symbolic = %T.as_type.loc17_37.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc17_36.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc17_36.2: type = converted %T.ref, %T.as_type.loc17_36.2 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @WalkAnimal.%T.as_type.loc17_37.1 (%T.as_type) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @WalkAnimal.%T.as_type.loc17_36.1 (%T.as_type) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Goat.decl: type = class_decl @Goat [concrete = constants.%Goat] {} {} // CHECK:STDOUT: impl_decl @Goat.as.Animal.impl [concrete] {} { @@ -139,15 +139,15 @@ fn F() { // CHECK:STDOUT: generic fn @WalkAnimal(%T.loc17_16.2: %Animal.type) { // CHECK:STDOUT: %T.patt.loc17_16.2: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_16.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc17_16.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_16.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc17_37.1: type = facet_access_type %T.loc17_16.1 [symbolic = %T.as_type.loc17_37.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc17_37.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] -// CHECK:STDOUT: %a.param_patt.loc17_35.2: @WalkAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc17_35.2 (constants.%a.param_patt.84e)] -// CHECK:STDOUT: %a.patt.loc17_35.2: @WalkAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc17_35.2 [symbolic = %a.patt.loc17_35.2 (constants.%a.patt.3e6)] +// CHECK:STDOUT: %T.as_type.loc17_36.1: type = facet_access_type %T.loc17_16.1 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc17_36.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] +// CHECK:STDOUT: %a.param_patt.loc17_34.2: @WalkAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc17_34.2 (constants.%a.param_patt.84e)] +// CHECK:STDOUT: %a.patt.loc17_34.2: @WalkAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc17_34.2 [symbolic = %a.patt.loc17_34.2 (constants.%a.patt.3e6)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc17_37.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc17_36.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @WalkAnimal.%T.as_type.loc17_37.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%a.param: @WalkAnimal.%T.as_type.loc17_36.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -193,10 +193,10 @@ fn F() { // CHECK:STDOUT: specific @WalkAnimal(constants.%T) { // CHECK:STDOUT: %T.patt.loc17_16.2 => constants.%T.patt // CHECK:STDOUT: %T.loc17_16.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc17_37.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc17_36.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e90 -// CHECK:STDOUT: %a.param_patt.loc17_35.2 => constants.%a.param_patt.84e -// CHECK:STDOUT: %a.patt.loc17_35.2 => constants.%a.patt.3e6 +// CHECK:STDOUT: %a.param_patt.loc17_34.2 => constants.%a.param_patt.84e +// CHECK:STDOUT: %a.patt.loc17_34.2 => constants.%a.patt.3e6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Animal.WithSelf(constants.%Animal.facet) { @@ -206,10 +206,10 @@ fn F() { // CHECK:STDOUT: specific @WalkAnimal(constants.%Animal.facet) { // CHECK:STDOUT: %T.patt.loc17_16.2 => constants.%T.patt // CHECK:STDOUT: %T.loc17_16.1 => constants.%Animal.facet -// CHECK:STDOUT: %T.as_type.loc17_37.1 => constants.%Goat +// CHECK:STDOUT: %T.as_type.loc17_36.1 => constants.%Goat // CHECK:STDOUT: %pattern_type => constants.%pattern_type.283 -// CHECK:STDOUT: %a.param_patt.loc17_35.2 => constants.%a.param_patt.8f5 -// CHECK:STDOUT: %a.patt.loc17_35.2 => constants.%a.patt.8aa +// CHECK:STDOUT: %a.param_patt.loc17_34.2 => constants.%a.param_patt.8f5 +// CHECK:STDOUT: %a.patt.loc17_34.2 => constants.%a.patt.8aa // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type diff --git a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon index d7b5cd418837..c1f77b7207be 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -interface Generic(Scalar:! type) { +interface Generic(Scalar: type) { fn F(); } @@ -27,7 +27,7 @@ impl ImplsGeneric as Generic(GenericParam) { fn F() {} } -fn CallGenericMethod[T:! type, U:! Generic(T)](unused a: U, unused s: T) { +fn CallGenericMethod[T: type, U: Generic(T)](unused a: U, unused s: T) { U.F(); } @@ -38,13 +38,13 @@ fn G() { // --- multiple_generic_params_one_fixed_one_deduced.carbon library "[[@TEST_NAME]]"; -interface I(V:! type, W:! type) {} +interface I(V: type, W: type) {} class C {} -impl forall [T:! type] C as I(T, ()) {} +impl forall [T: type] C as I(T, ()) {} -fn A[T:! I({}, ())](unused t: T) {} +fn A[T: I({}, ())](unused t: T) {} fn B() { A({} as C); @@ -53,21 +53,21 @@ fn B() { // --- fail_mismatch_impl_constraint_with_fixed_specific.carbon library "[[@TEST_NAME]]"; -interface I(V:! type, W:! type) {} +interface I(V: type, W: type) {} class C {} -impl forall [T:! type] C as I(T, ()) {} +impl forall [T: type] C as I(T, ()) {} -fn A[T:! I({}, {})](unused t: T) {} +fn A[T: I({}, {})](unused t: T) {} fn B() { // CHECK:STDERR: fail_mismatch_impl_constraint_with_fixed_specific.carbon:[[@LINE+7]]:3: error: cannot convert type `C` into type implementing `I({}, {})` [ConversionFailureTypeToFacet] // CHECK:STDERR: A({} as C); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: fail_mismatch_impl_constraint_with_fixed_specific.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn A[T:! I({}, {})](unused t: T) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn A[T: I({}, {})](unused t: T) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: A({} as C); } @@ -77,19 +77,19 @@ library "[[@TEST_NAME]]"; interface I {} -class C(V:! type, W:! type) {} +class C(V: type, W: type) {} -impl forall [T:! type] C(T, ()) as I {} +impl forall [T: type] C(T, ()) as I {} -fn A[T:! I](unused t: T) {} +fn A[T: I](unused t: T) {} fn B() { // CHECK:STDERR: fail_mismatch_impl_self_with_fixed_specific.carbon:[[@LINE+7]]:3: error: cannot convert type `C({}, {})` into type implementing `I` [ConversionFailureTypeToFacet] // CHECK:STDERR: A({} as C({}, {})); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_mismatch_impl_self_with_fixed_specific.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn A[T:! I](unused t: T) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn A[T: I](unused t: T) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: A({} as C({}, {})); } @@ -205,9 +205,9 @@ fn B() { // CHECK:STDOUT: %Generic.decl: %Generic.type.30d = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %Scalar.patt.loc4_25.1: %pattern_type.98f = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc4_25.2 (constants.%Scalar.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_28.1: type = splice_block %.loc4_28.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_27.1: type = splice_block %.loc4_27.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_28.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_27.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %Scalar.loc4_25.2: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc4_25.1 (constants.%Scalar)] // CHECK:STDOUT: } @@ -221,33 +221,33 @@ fn B() { // CHECK:STDOUT: } // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { // CHECK:STDOUT: %T.patt.loc15_23.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc15_33.1: @CallGenericMethod.%pattern_type.loc15_33 (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_33.2 (constants.%U.patt.8a6)] -// CHECK:STDOUT: %a.param_patt.loc15_56.1: @CallGenericMethod.%pattern_type.loc15_56 (%pattern_type.70f) = value_param_pattern [symbolic = %a.param_patt.loc15_56.2 (constants.%a.param_patt.98a)] -// CHECK:STDOUT: %a.patt.loc15_56.1: @CallGenericMethod.%pattern_type.loc15_56 (%pattern_type.70f) = at_binding_pattern a, %a.param_patt.loc15_56.1 [symbolic = %a.patt.loc15_56.2 (constants.%a.patt.03d)] -// CHECK:STDOUT: %s.param_patt.loc15_69.1: @CallGenericMethod.%pattern_type.loc15_69 (%pattern_type.51d) = value_param_pattern [symbolic = %s.param_patt.loc15_69.2 (constants.%s.param_patt.cb5)] -// CHECK:STDOUT: %s.patt.loc15_69.1: @CallGenericMethod.%pattern_type.loc15_69 (%pattern_type.51d) = at_binding_pattern s, %s.param_patt.loc15_69.1 [symbolic = %s.patt.loc15_69.2 (constants.%s.patt.a4f)] +// CHECK:STDOUT: %U.patt.loc15_32.1: @CallGenericMethod.%pattern_type.loc15_32 (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_32.2 (constants.%U.patt.8a6)] +// CHECK:STDOUT: %a.param_patt.loc15_54.1: @CallGenericMethod.%pattern_type.loc15_54 (%pattern_type.70f) = value_param_pattern [symbolic = %a.param_patt.loc15_54.2 (constants.%a.param_patt.98a)] +// CHECK:STDOUT: %a.patt.loc15_54.1: @CallGenericMethod.%pattern_type.loc15_54 (%pattern_type.70f) = at_binding_pattern a, %a.param_patt.loc15_54.1 [symbolic = %a.patt.loc15_54.2 (constants.%a.patt.03d)] +// CHECK:STDOUT: %s.param_patt.loc15_67.1: @CallGenericMethod.%pattern_type.loc15_67 (%pattern_type.51d) = value_param_pattern [symbolic = %s.param_patt.loc15_67.2 (constants.%s.param_patt.cb5)] +// CHECK:STDOUT: %s.patt.loc15_67.1: @CallGenericMethod.%pattern_type.loc15_67 (%pattern_type.51d) = at_binding_pattern s, %s.param_patt.loc15_67.1 [symbolic = %s.patt.loc15_67.2 (constants.%s.patt.a4f)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_26.1: type = splice_block %.loc15_26.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_25.1: type = splice_block %.loc15_25.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc15_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_26.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_25.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %.loc15_45: type = splice_block %Generic.type.loc15_45.2 [symbolic = %Generic.type.loc15_45.1 (constants.%Generic.type.ee14e9.2)] { -// CHECK:STDOUT: %.Self.frozen.loc15_33: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc15_43: type = splice_block %Generic.type.loc15_43.2 [symbolic = %Generic.type.loc15_43.1 (constants.%Generic.type.ee14e9.2)] { +// CHECK:STDOUT: %.Self.frozen.loc15_32: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Generic.ref: %Generic.type.30d = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] -// CHECK:STDOUT: %T.ref.loc15_44: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc15_45.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc15_45.1 (constants.%Generic.type.ee14e9.2)] +// CHECK:STDOUT: %T.ref.loc15_42: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] +// CHECK:STDOUT: %Generic.type.loc15_43.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc15_43.1 (constants.%Generic.type.ee14e9.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc15_33.2: @CallGenericMethod.%Generic.type.loc15_45.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc15_33.1 (constants.%U)] -// CHECK:STDOUT: %a.param: @CallGenericMethod.%U.as_type.loc15_58.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc15_58.1: type = splice_block %.loc15_58.2 [symbolic = %U.as_type.loc15_58.1 (constants.%U.as_type)] { -// CHECK:STDOUT: %U.ref.loc15: @CallGenericMethod.%Generic.type.loc15_45.1 (%Generic.type.ee14e9.2) = name_ref U, %U.loc15_33.2 [symbolic = %U.loc15_33.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc15_58.2: type = facet_access_type %U.ref.loc15 [symbolic = %U.as_type.loc15_58.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc15_58.2: type = converted %U.ref.loc15, %U.as_type.loc15_58.2 [symbolic = %U.as_type.loc15_58.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.loc15_32.2: @CallGenericMethod.%Generic.type.loc15_43.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc15_32.1 (constants.%U)] +// CHECK:STDOUT: %a.param: @CallGenericMethod.%U.as_type.loc15_56.1 (%U.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc15_56.1: type = splice_block %.loc15_56.2 [symbolic = %U.as_type.loc15_56.1 (constants.%U.as_type)] { +// CHECK:STDOUT: %U.ref.loc15: @CallGenericMethod.%Generic.type.loc15_43.1 (%Generic.type.ee14e9.2) = name_ref U, %U.loc15_32.2 [symbolic = %U.loc15_32.1 (constants.%U)] +// CHECK:STDOUT: %U.as_type.loc15_56.2: type = facet_access_type %U.ref.loc15 [symbolic = %U.as_type.loc15_56.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc15_56.2: type = converted %U.ref.loc15, %U.as_type.loc15_56.2 [symbolic = %U.as_type.loc15_56.1 (constants.%U.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @CallGenericMethod.%U.as_type.loc15_58.1 (%U.as_type) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @CallGenericMethod.%U.as_type.loc15_56.1 (%U.as_type) = wrapper_binding a, %a.param // CHECK:STDOUT: %s.param: @CallGenericMethod.%T.loc15_23.1 (%T) = value_param call_param1 -// CHECK:STDOUT: %T.ref.loc15_71: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc15_69: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] // CHECK:STDOUT: %s: @CallGenericMethod.%T.loc15_23.1 (%T) = wrapper_binding s, %s.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} @@ -259,10 +259,10 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc4_25.1)> [symbolic = %Generic.type (constants.%Generic.type.ee14e9.1)] -// CHECK:STDOUT: %Self.loc4_34.2: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.8ea1ea.1)] +// CHECK:STDOUT: %Self.loc4_33.2: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.8ea1ea.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_34.1: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.8ea1ea.1)] +// CHECK:STDOUT: %Self.loc4_33.1: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.8ea1ea.1)] // CHECK:STDOUT: %Generic.WithSelf.decl = interface_with_self_decl @Generic [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -270,7 +270,7 @@ fn B() { // CHECK:STDOUT: %assoc0.loc5_9.1: @Generic.WithSelf.%Generic.assoc_type (%Generic.assoc_type.d7021d.1) = assoc_entity element0, %Generic.WithSelf.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.31052a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_34.1 +// CHECK:STDOUT: .Self = %Self.loc4_33.1 // CHECK:STDOUT: .F = @Generic.WithSelf.%assoc0.loc5_9.1 // CHECK:STDOUT: witness = (@Generic.WithSelf.%Generic.WithSelf.F.decl) // CHECK:STDOUT: @@ -307,7 +307,7 @@ fn B() { // CHECK:STDOUT: .Self = constants.%ImplsGeneric // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc4_25.2: type, @Generic.%Self.loc4_34.1: @Generic.%Generic.type (%Generic.type.ee14e9.1)) { +// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc4_25.2: type, @Generic.%Self.loc4_33.1: @Generic.%Generic.type (%Generic.type.ee14e9.1)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -318,38 +318,38 @@ fn B() { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc15_23.2: type, %U.loc15_33.2: @CallGenericMethod.%Generic.type.loc15_45.1 (%Generic.type.ee14e9.2)) { +// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc15_23.2: type, %U.loc15_32.2: @CallGenericMethod.%Generic.type.loc15_43.1 (%Generic.type.ee14e9.2)) { // CHECK:STDOUT: %T.patt.loc15_23.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc15_23.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc15_45.1: type = facet_type <@Generic, @Generic(%T.loc15_23.1)> [symbolic = %Generic.type.loc15_45.1 (constants.%Generic.type.ee14e9.2)] -// CHECK:STDOUT: %pattern_type.loc15_33: type = pattern_type %Generic.type.loc15_45.1 [symbolic = %pattern_type.loc15_33 (constants.%pattern_type.4e0)] -// CHECK:STDOUT: %U.patt.loc15_33.2: @CallGenericMethod.%pattern_type.loc15_33 (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_33.2 (constants.%U.patt.8a6)] -// CHECK:STDOUT: %U.loc15_33.1: @CallGenericMethod.%Generic.type.loc15_45.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc15_33.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc15_58.1: type = facet_access_type %U.loc15_33.1 [symbolic = %U.as_type.loc15_58.1 (constants.%U.as_type)] -// CHECK:STDOUT: %pattern_type.loc15_56: type = pattern_type %U.as_type.loc15_58.1 [symbolic = %pattern_type.loc15_56 (constants.%pattern_type.70f)] -// CHECK:STDOUT: %a.param_patt.loc15_56.2: @CallGenericMethod.%pattern_type.loc15_56 (%pattern_type.70f) = value_param_pattern [symbolic = %a.param_patt.loc15_56.2 (constants.%a.param_patt.98a)] -// CHECK:STDOUT: %a.patt.loc15_56.2: @CallGenericMethod.%pattern_type.loc15_56 (%pattern_type.70f) = at_binding_pattern a, %a.param_patt.loc15_56.2 [symbolic = %a.patt.loc15_56.2 (constants.%a.patt.03d)] -// CHECK:STDOUT: %pattern_type.loc15_69: type = pattern_type %T.loc15_23.1 [symbolic = %pattern_type.loc15_69 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %s.param_patt.loc15_69.2: @CallGenericMethod.%pattern_type.loc15_69 (%pattern_type.51d) = value_param_pattern [symbolic = %s.param_patt.loc15_69.2 (constants.%s.param_patt.cb5)] -// CHECK:STDOUT: %s.patt.loc15_69.2: @CallGenericMethod.%pattern_type.loc15_69 (%pattern_type.51d) = at_binding_pattern s, %s.param_patt.loc15_69.2 [symbolic = %s.patt.loc15_69.2 (constants.%s.patt.a4f)] +// CHECK:STDOUT: %Generic.type.loc15_43.1: type = facet_type <@Generic, @Generic(%T.loc15_23.1)> [symbolic = %Generic.type.loc15_43.1 (constants.%Generic.type.ee14e9.2)] +// CHECK:STDOUT: %pattern_type.loc15_32: type = pattern_type %Generic.type.loc15_43.1 [symbolic = %pattern_type.loc15_32 (constants.%pattern_type.4e0)] +// CHECK:STDOUT: %U.patt.loc15_32.2: @CallGenericMethod.%pattern_type.loc15_32 (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_32.2 (constants.%U.patt.8a6)] +// CHECK:STDOUT: %U.loc15_32.1: @CallGenericMethod.%Generic.type.loc15_43.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc15_32.1 (constants.%U)] +// CHECK:STDOUT: %U.as_type.loc15_56.1: type = facet_access_type %U.loc15_32.1 [symbolic = %U.as_type.loc15_56.1 (constants.%U.as_type)] +// CHECK:STDOUT: %pattern_type.loc15_54: type = pattern_type %U.as_type.loc15_56.1 [symbolic = %pattern_type.loc15_54 (constants.%pattern_type.70f)] +// CHECK:STDOUT: %a.param_patt.loc15_54.2: @CallGenericMethod.%pattern_type.loc15_54 (%pattern_type.70f) = value_param_pattern [symbolic = %a.param_patt.loc15_54.2 (constants.%a.param_patt.98a)] +// CHECK:STDOUT: %a.patt.loc15_54.2: @CallGenericMethod.%pattern_type.loc15_54 (%pattern_type.70f) = at_binding_pattern a, %a.param_patt.loc15_54.2 [symbolic = %a.patt.loc15_54.2 (constants.%a.patt.03d)] +// CHECK:STDOUT: %pattern_type.loc15_67: type = pattern_type %T.loc15_23.1 [symbolic = %pattern_type.loc15_67 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %s.param_patt.loc15_67.2: @CallGenericMethod.%pattern_type.loc15_67 (%pattern_type.51d) = value_param_pattern [symbolic = %s.param_patt.loc15_67.2 (constants.%s.param_patt.cb5)] +// CHECK:STDOUT: %s.patt.loc15_67.2: @CallGenericMethod.%pattern_type.loc15_67 (%pattern_type.51d) = at_binding_pattern s, %s.param_patt.loc15_67.2 [symbolic = %s.patt.loc15_67.2 (constants.%s.patt.a4f)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc15_56: = require_complete_type %U.as_type.loc15_58.1 [symbolic = %require_complete.loc15_56 (constants.%require_complete.096)] -// CHECK:STDOUT: %require_complete.loc15_69: = require_complete_type %T.loc15_23.1 [symbolic = %require_complete.loc15_69 (constants.%require_complete.944)] -// CHECK:STDOUT: %require_complete.loc16: = require_complete_type %Generic.type.loc15_45.1 [symbolic = %require_complete.loc16 (constants.%require_complete.13f)] +// CHECK:STDOUT: %require_complete.loc15_54: = require_complete_type %U.as_type.loc15_56.1 [symbolic = %require_complete.loc15_54 (constants.%require_complete.096)] +// CHECK:STDOUT: %require_complete.loc15_67: = require_complete_type %T.loc15_23.1 [symbolic = %require_complete.loc15_67 (constants.%require_complete.944)] +// CHECK:STDOUT: %require_complete.loc16: = require_complete_type %Generic.type.loc15_43.1 [symbolic = %require_complete.loc16 (constants.%require_complete.13f)] // CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%T.loc15_23.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.d7021d.2)] // CHECK:STDOUT: %assoc0: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.d7021d.2) = assoc_entity element0, @Generic.WithSelf.%Generic.WithSelf.F.decl [symbolic = %assoc0 (constants.%assoc0.31052a.2)] -// CHECK:STDOUT: %Generic.WithSelf.F.type: type = fn_type @Generic.WithSelf.F, @Generic.WithSelf(%T.loc15_23.1, %U.loc15_33.1) [symbolic = %Generic.WithSelf.F.type (constants.%Generic.WithSelf.F.type.a70)] -// CHECK:STDOUT: %.loc16_4.3: type = fn_type_with_self_type %Generic.WithSelf.F.type, %U.loc15_33.1 [symbolic = %.loc16_4.3 (constants.%.aca)] -// CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U.loc15_33.1, @Generic, @Generic(%T.loc15_23.1) [symbolic = %Generic.lookup_impl_witness (constants.%Generic.lookup_impl_witness)] +// CHECK:STDOUT: %Generic.WithSelf.F.type: type = fn_type @Generic.WithSelf.F, @Generic.WithSelf(%T.loc15_23.1, %U.loc15_32.1) [symbolic = %Generic.WithSelf.F.type (constants.%Generic.WithSelf.F.type.a70)] +// CHECK:STDOUT: %.loc16_4.3: type = fn_type_with_self_type %Generic.WithSelf.F.type, %U.loc15_32.1 [symbolic = %.loc16_4.3 (constants.%.aca)] +// CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U.loc15_32.1, @Generic, @Generic(%T.loc15_23.1) [symbolic = %Generic.lookup_impl_witness (constants.%Generic.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc16_4.2: @CallGenericMethod.%.loc16_4.3 (%.aca) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc16_4.2: = specific_impl_function %impl.elem0.loc16_4.2, @Generic.WithSelf.F(%T.loc15_23.1, %U.loc15_33.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc16_4.2: = specific_impl_function %impl.elem0.loc16_4.2, @Generic.WithSelf.F(%T.loc15_23.1, %U.loc15_32.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @CallGenericMethod.%U.as_type.loc15_58.1 (%U.as_type), %s.param: @CallGenericMethod.%T.loc15_23.1 (%T)) { +// CHECK:STDOUT: fn(%a.param: @CallGenericMethod.%U.as_type.loc15_56.1 (%U.as_type), %s.param: @CallGenericMethod.%T.loc15_23.1 (%T)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %U.ref.loc16: @CallGenericMethod.%Generic.type.loc15_45.1 (%Generic.type.ee14e9.2) = name_ref U, %U.loc15_33.2 [symbolic = %U.loc15_33.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc16: type = facet_access_type %U.ref.loc16 [symbolic = %U.as_type.loc15_58.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc16_4.1: type = converted %U.ref.loc16, %U.as_type.loc16 [symbolic = %U.as_type.loc15_58.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.ref.loc16: @CallGenericMethod.%Generic.type.loc15_43.1 (%Generic.type.ee14e9.2) = name_ref U, %U.loc15_32.2 [symbolic = %U.loc15_32.1 (constants.%U)] +// CHECK:STDOUT: %U.as_type.loc16: type = facet_access_type %U.ref.loc16 [symbolic = %U.as_type.loc15_56.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc16_4.1: type = converted %U.ref.loc16, %U.as_type.loc16 [symbolic = %U.as_type.loc15_56.1 (constants.%U.as_type)] // CHECK:STDOUT: %.loc16_4.2: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.d7021d.2) = specific_constant @Generic.WithSelf.%assoc0.loc5_9.1, @Generic.WithSelf(constants.%T, constants.%U) [symbolic = %assoc0 (constants.%assoc0.31052a.2)] // CHECK:STDOUT: %F.ref: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.d7021d.2) = name_ref F, %.loc16_4.2 [symbolic = %assoc0 (constants.%assoc0.31052a.2)] // CHECK:STDOUT: %impl.elem0.loc16_4.1: @CallGenericMethod.%.loc16_4.3 (%.aca) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] @@ -420,7 +420,7 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type => constants.%Generic.type.b40 -// CHECK:STDOUT: %Self.loc4_34.2 => constants.%Self.685 +// CHECK:STDOUT: %Self.loc4_33.2 => constants.%Self.685 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.WithSelf(constants.%GenericParam, constants.%Self.8ea1ea.1) { @@ -453,7 +453,7 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type => constants.%Generic.type.ee14e9.2 -// CHECK:STDOUT: %Self.loc4_34.2 => constants.%Self.8ea1ea.2 +// CHECK:STDOUT: %Self.loc4_33.2 => constants.%Self.8ea1ea.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.WithSelf(constants.%T, constants.%Self.8ea1ea.1) { @@ -470,17 +470,17 @@ fn B() { // CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt // CHECK:STDOUT: %T.loc15_23.1 => constants.%T -// CHECK:STDOUT: %Generic.type.loc15_45.1 => constants.%Generic.type.ee14e9.2 -// CHECK:STDOUT: %pattern_type.loc15_33 => constants.%pattern_type.4e0 -// CHECK:STDOUT: %U.patt.loc15_33.2 => constants.%U.patt.8a6 -// CHECK:STDOUT: %U.loc15_33.1 => constants.%U -// CHECK:STDOUT: %U.as_type.loc15_58.1 => constants.%U.as_type -// CHECK:STDOUT: %pattern_type.loc15_56 => constants.%pattern_type.70f -// CHECK:STDOUT: %a.param_patt.loc15_56.2 => constants.%a.param_patt.98a -// CHECK:STDOUT: %a.patt.loc15_56.2 => constants.%a.patt.03d -// CHECK:STDOUT: %pattern_type.loc15_69 => constants.%pattern_type.51d -// CHECK:STDOUT: %s.param_patt.loc15_69.2 => constants.%s.param_patt.cb5 -// CHECK:STDOUT: %s.patt.loc15_69.2 => constants.%s.patt.a4f +// CHECK:STDOUT: %Generic.type.loc15_43.1 => constants.%Generic.type.ee14e9.2 +// CHECK:STDOUT: %pattern_type.loc15_32 => constants.%pattern_type.4e0 +// CHECK:STDOUT: %U.patt.loc15_32.2 => constants.%U.patt.8a6 +// CHECK:STDOUT: %U.loc15_32.1 => constants.%U +// CHECK:STDOUT: %U.as_type.loc15_56.1 => constants.%U.as_type +// CHECK:STDOUT: %pattern_type.loc15_54 => constants.%pattern_type.70f +// CHECK:STDOUT: %a.param_patt.loc15_54.2 => constants.%a.param_patt.98a +// CHECK:STDOUT: %a.patt.loc15_54.2 => constants.%a.patt.03d +// CHECK:STDOUT: %pattern_type.loc15_67 => constants.%pattern_type.51d +// CHECK:STDOUT: %s.param_patt.loc15_67.2 => constants.%s.param_patt.cb5 +// CHECK:STDOUT: %s.patt.loc15_67.2 => constants.%s.patt.a4f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.WithSelf(constants.%T, constants.%U) { @@ -499,21 +499,21 @@ fn B() { // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) { // CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt // CHECK:STDOUT: %T.loc15_23.1 => constants.%GenericParam -// CHECK:STDOUT: %Generic.type.loc15_45.1 => constants.%Generic.type.b40 -// CHECK:STDOUT: %pattern_type.loc15_33 => constants.%pattern_type.de1 -// CHECK:STDOUT: %U.patt.loc15_33.2 => constants.%U.patt.e09 -// CHECK:STDOUT: %U.loc15_33.1 => constants.%Generic.facet -// CHECK:STDOUT: %U.as_type.loc15_58.1 => constants.%ImplsGeneric -// CHECK:STDOUT: %pattern_type.loc15_56 => constants.%pattern_type.488 -// CHECK:STDOUT: %a.param_patt.loc15_56.2 => constants.%a.param_patt.150 -// CHECK:STDOUT: %a.patt.loc15_56.2 => constants.%a.patt.065 -// CHECK:STDOUT: %pattern_type.loc15_69 => constants.%pattern_type.485 -// CHECK:STDOUT: %s.param_patt.loc15_69.2 => constants.%s.param_patt.12f -// CHECK:STDOUT: %s.patt.loc15_69.2 => constants.%s.patt.a2c +// CHECK:STDOUT: %Generic.type.loc15_43.1 => constants.%Generic.type.b40 +// CHECK:STDOUT: %pattern_type.loc15_32 => constants.%pattern_type.de1 +// CHECK:STDOUT: %U.patt.loc15_32.2 => constants.%U.patt.e09 +// CHECK:STDOUT: %U.loc15_32.1 => constants.%Generic.facet +// CHECK:STDOUT: %U.as_type.loc15_56.1 => constants.%ImplsGeneric +// CHECK:STDOUT: %pattern_type.loc15_54 => constants.%pattern_type.488 +// CHECK:STDOUT: %a.param_patt.loc15_54.2 => constants.%a.param_patt.150 +// CHECK:STDOUT: %a.patt.loc15_54.2 => constants.%a.patt.065 +// CHECK:STDOUT: %pattern_type.loc15_67 => constants.%pattern_type.485 +// CHECK:STDOUT: %s.param_patt.loc15_67.2 => constants.%s.param_patt.12f +// CHECK:STDOUT: %s.patt.loc15_67.2 => constants.%s.patt.a2c // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc15_56 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc15_69 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc15_54 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc15_67 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc16 => constants.%complete_type.35b // CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.c13 // CHECK:STDOUT: %assoc0 => constants.%assoc0.b4a @@ -600,18 +600,18 @@ fn B() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %V.patt.loc3_14.1: %pattern_type.98f = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc3_14.2 (constants.%V.patt)] -// CHECK:STDOUT: %W.patt.loc3_24.1: %pattern_type.98f = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc3_24.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.patt.loc3_23.1: %pattern_type.98f = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc3_23.2 (constants.%W.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_16.1: type = splice_block %.loc3_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc3_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %V.loc3_14.2: type = symbolic_binding V, 0 [symbolic = %V.loc3_14.1 (constants.%V)] -// CHECK:STDOUT: %.loc3_27.1: type = splice_block %.loc3_27.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc3_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_27.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_25.1: type = splice_block %.loc3_25.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc3_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc3_25.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %W.loc3_24.2: type = symbolic_binding W, 1 [symbolic = %W.loc3_24.1 (constants.%W)] +// CHECK:STDOUT: %W.loc3_23.2: type = symbolic_binding W, 1 [symbolic = %W.loc3_23.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] { @@ -620,57 +620,57 @@ fn B() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_15.1 [symbolic = %T.loc7_15.2 (constants.%T.67d)] -// CHECK:STDOUT: %.loc7_35: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_36: type = converted %.loc7_35, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %I.type.loc7_36.1: type = facet_type <@I, @I(constants.%T.67d, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_36.2 (constants.%I.type.269)] -// CHECK:STDOUT: %.loc7_18.1: type = splice_block %.loc7_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc7_34: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_35: type = converted %.loc7_34, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %I.type.loc7_35.1: type = facet_type <@I, @I(constants.%T.67d, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_35.2 (constants.%I.type.269)] +// CHECK:STDOUT: %.loc7_17.1: type = splice_block %.loc7_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_15.2 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] { // CHECK:STDOUT: %T.patt.loc9_7.1: %pattern_type.bd4 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.be3)] -// CHECK:STDOUT: %t.param_patt.loc9_29.1: @A.%pattern_type (%pattern_type.d7b) = value_param_pattern [symbolic = %t.param_patt.loc9_29.2 (constants.%t.param_patt.be8)] -// CHECK:STDOUT: %t.patt.loc9_29.1: @A.%pattern_type (%pattern_type.d7b) = at_binding_pattern t, %t.param_patt.loc9_29.1 [symbolic = %t.patt.loc9_29.2 (constants.%t.patt.9d2)] +// CHECK:STDOUT: %t.param_patt.loc9_28.1: @A.%pattern_type (%pattern_type.d7b) = value_param_pattern [symbolic = %t.param_patt.loc9_28.2 (constants.%t.param_patt.be8)] +// CHECK:STDOUT: %t.patt.loc9_28.1: @A.%pattern_type (%pattern_type.d7b) = at_binding_pattern t, %t.param_patt.loc9_28.1 [symbolic = %t.patt.loc9_28.2 (constants.%t.patt.9d2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_18.1: type = splice_block %I.type [concrete = constants.%I.type.722] { +// CHECK:STDOUT: %.loc9_17.1: type = splice_block %I.type [concrete = constants.%I.type.722] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] -// CHECK:STDOUT: %.loc9_13: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc9_17: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_18.2: type = converted %.loc9_13, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc9_18.3: type = converted %.loc9_17, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc9_12: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc9_16: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_17.2: type = converted %.loc9_12, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc9_17.3: type = converted %.loc9_16, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%empty_struct_type, constants.%empty_tuple.type)> [concrete = constants.%I.type.722] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_7.2: %I.type.722 = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.a08)] -// CHECK:STDOUT: %t.param: @A.%T.as_type.loc9_31.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc9_31.1: type = splice_block %.loc9_31.2 [symbolic = %T.as_type.loc9_31.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %t.param: @A.%T.as_type.loc9_30.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc9_30.1: type = splice_block %.loc9_30.2 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %I.type.722 = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.a08)] -// CHECK:STDOUT: %T.as_type.loc9_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_31.2: type = converted %T.ref, %T.as_type.loc9_31.2 [symbolic = %T.as_type.loc9_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc9_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_30.2: type = converted %T.ref, %T.as_type.loc9_30.2 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @A.%T.as_type.loc9_31.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @A.%T.as_type.loc9_30.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(%V.loc3_14.2: type, %W.loc3_24.2: type) { +// CHECK:STDOUT: generic interface @I(%V.loc3_14.2: type, %W.loc3_23.2: type) { // CHECK:STDOUT: %V.patt.loc3_14.2: %pattern_type.98f = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc3_14.2 (constants.%V.patt)] // CHECK:STDOUT: %V.loc3_14.1: type = symbolic_binding V, 0 [symbolic = %V.loc3_14.1 (constants.%V)] -// CHECK:STDOUT: %W.patt.loc3_24.2: %pattern_type.98f = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc3_24.2 (constants.%W.patt)] -// CHECK:STDOUT: %W.loc3_24.1: type = symbolic_binding W, 1 [symbolic = %W.loc3_24.1 (constants.%W)] +// CHECK:STDOUT: %W.patt.loc3_23.2: %pattern_type.98f = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc3_23.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.loc3_23.1: type = symbolic_binding W, 1 [symbolic = %W.loc3_23.1 (constants.%W)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%V.loc3_14.1, %W.loc3_24.1)> [symbolic = %I.type (constants.%I.type.d96)] -// CHECK:STDOUT: %Self.loc3_33.2: @I.%I.type (%I.type.d96) = symbolic_binding Self, 2 [symbolic = %Self.loc3_33.2 (constants.%Self.299)] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%V.loc3_14.1, %W.loc3_23.1)> [symbolic = %I.type (constants.%I.type.d96)] +// CHECK:STDOUT: %Self.loc3_31.2: @I.%I.type (%I.type.d96) = symbolic_binding Self, 2 [symbolic = %Self.loc3_31.2 (constants.%Self.299)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_33.1: @I.%I.type (%I.type.d96) = symbolic_binding Self, 2 [symbolic = %Self.loc3_33.2 (constants.%Self.299)] +// CHECK:STDOUT: %Self.loc3_31.1: @I.%I.type (%I.type.d96) = symbolic_binding Self, 2 [symbolic = %Self.loc3_31.2 (constants.%Self.299)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_33.1 +// CHECK:STDOUT: .Self = %Self.loc3_31.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -682,19 +682,19 @@ fn B() { // CHECK:STDOUT: generic impl @C.as.I.impl(%T.loc7_15.1: type) { // CHECK:STDOUT: %T.patt.loc7_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt.d47)] // CHECK:STDOUT: %T.loc7_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_15.2 (constants.%T.67d)] -// CHECK:STDOUT: %I.type.loc7_36.2: type = facet_type <@I, @I(%T.loc7_15.2, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_36.2 (constants.%I.type.269)] -// CHECK:STDOUT: %I.impl_witness.loc7_38.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc7_15.2) [symbolic = %I.impl_witness.loc7_38.2 (constants.%I.impl_witness.a35)] +// CHECK:STDOUT: %I.type.loc7_35.2: type = facet_type <@I, @I(%T.loc7_15.2, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_35.2 (constants.%I.type.269)] +// CHECK:STDOUT: %I.impl_witness.loc7_37.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc7_15.2) [symbolic = %I.impl_witness.loc7_37.2 (constants.%I.impl_witness.a35)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc7_36.2 [symbolic = %require_complete (constants.%require_complete.2dc)] +// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc7_35.2 [symbolic = %require_complete (constants.%require_complete.2dc)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %I.type.loc7_36.1 { +// CHECK:STDOUT: impl: %C.ref as %I.type.loc7_35.1 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl [concrete] -// CHECK:STDOUT: %I.impl_witness.loc7_38.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T.67d) [symbolic = %I.impl_witness.loc7_38.2 (constants.%I.impl_witness.a35)] +// CHECK:STDOUT: %I.impl_witness.loc7_37.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T.67d) [symbolic = %I.impl_witness.loc7_37.2 (constants.%I.impl_witness.a35)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %I.type.loc7_36.1 -// CHECK:STDOUT: witness = %I.impl_witness.loc7_38.1 +// CHECK:STDOUT: extend %I.type.loc7_35.1 +// CHECK:STDOUT: witness = %I.impl_witness.loc7_37.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -709,15 +709,15 @@ fn B() { // CHECK:STDOUT: generic fn @A(%T.loc9_7.2: %I.type.722) { // CHECK:STDOUT: %T.patt.loc9_7.2: %pattern_type.bd4 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.be3)] // CHECK:STDOUT: %T.loc9_7.1: %I.type.722 = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.a08)] -// CHECK:STDOUT: %T.as_type.loc9_31.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc9_31.1 [symbolic = %pattern_type (constants.%pattern_type.d7b)] -// CHECK:STDOUT: %t.param_patt.loc9_29.2: @A.%pattern_type (%pattern_type.d7b) = value_param_pattern [symbolic = %t.param_patt.loc9_29.2 (constants.%t.param_patt.be8)] -// CHECK:STDOUT: %t.patt.loc9_29.2: @A.%pattern_type (%pattern_type.d7b) = at_binding_pattern t, %t.param_patt.loc9_29.2 [symbolic = %t.patt.loc9_29.2 (constants.%t.patt.9d2)] +// CHECK:STDOUT: %T.as_type.loc9_30.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc9_30.1 [symbolic = %pattern_type (constants.%pattern_type.d7b)] +// CHECK:STDOUT: %t.param_patt.loc9_28.2: @A.%pattern_type (%pattern_type.d7b) = value_param_pattern [symbolic = %t.param_patt.loc9_28.2 (constants.%t.param_patt.be8)] +// CHECK:STDOUT: %t.patt.loc9_28.2: @A.%pattern_type (%pattern_type.d7b) = at_binding_pattern t, %t.param_patt.loc9_28.2 [symbolic = %t.patt.loc9_28.2 (constants.%t.patt.9d2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc9_31.1 [symbolic = %require_complete (constants.%require_complete.d9e)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc9_30.1 [symbolic = %require_complete (constants.%require_complete.d9e)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @A.%T.as_type.loc9_31.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @A.%T.as_type.loc9_30.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -759,8 +759,8 @@ fn B() { // CHECK:STDOUT: specific @I(constants.%V, constants.%W) { // CHECK:STDOUT: %V.patt.loc3_14.2 => constants.%V.patt // CHECK:STDOUT: %V.loc3_14.1 => constants.%V -// CHECK:STDOUT: %W.patt.loc3_24.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc3_24.1 => constants.%W +// CHECK:STDOUT: %W.patt.loc3_23.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc3_23.1 => constants.%W // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%V, constants.%W, constants.%Self.299) {} @@ -768,19 +768,19 @@ fn B() { // CHECK:STDOUT: specific @I(constants.%T.67d, constants.%empty_tuple.type) { // CHECK:STDOUT: %V.patt.loc3_14.2 => constants.%V.patt // CHECK:STDOUT: %V.loc3_14.1 => constants.%T.67d -// CHECK:STDOUT: %W.patt.loc3_24.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc3_24.1 => constants.%empty_tuple.type +// CHECK:STDOUT: %W.patt.loc3_23.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc3_23.1 => constants.%empty_tuple.type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.269 -// CHECK:STDOUT: %Self.loc3_33.2 => constants.%Self.7df +// CHECK:STDOUT: %Self.loc3_31.2 => constants.%Self.7df // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl(constants.%T.67d) { // CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc7_15.2 => constants.%T.67d -// CHECK:STDOUT: %I.type.loc7_36.2 => constants.%I.type.269 -// CHECK:STDOUT: %I.impl_witness.loc7_38.2 => constants.%I.impl_witness.a35 +// CHECK:STDOUT: %I.type.loc7_35.2 => constants.%I.type.269 +// CHECK:STDOUT: %I.impl_witness.loc7_37.2 => constants.%I.impl_witness.a35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T.67d, constants.%empty_tuple.type, constants.%Self.299) { @@ -794,12 +794,12 @@ fn B() { // CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%empty_tuple.type) { // CHECK:STDOUT: %V.patt.loc3_14.2 => constants.%V.patt // CHECK:STDOUT: %V.loc3_14.1 => constants.%empty_struct_type -// CHECK:STDOUT: %W.patt.loc3_24.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc3_24.1 => constants.%empty_tuple.type +// CHECK:STDOUT: %W.patt.loc3_23.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc3_23.1 => constants.%empty_tuple.type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.722 -// CHECK:STDOUT: %Self.loc3_33.2 => constants.%Self.9e2 +// CHECK:STDOUT: %Self.loc3_31.2 => constants.%Self.9e2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%empty_struct_type, constants.%empty_tuple.type, constants.%Self.299) { @@ -809,17 +809,17 @@ fn B() { // CHECK:STDOUT: specific @A(constants.%T.a08) { // CHECK:STDOUT: %T.patt.loc9_7.2 => constants.%T.patt.be3 // CHECK:STDOUT: %T.loc9_7.1 => constants.%T.a08 -// CHECK:STDOUT: %T.as_type.loc9_31.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc9_30.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d7b -// CHECK:STDOUT: %t.param_patt.loc9_29.2 => constants.%t.param_patt.be8 -// CHECK:STDOUT: %t.patt.loc9_29.2 => constants.%t.patt.9d2 +// CHECK:STDOUT: %t.param_patt.loc9_28.2 => constants.%t.param_patt.be8 +// CHECK:STDOUT: %t.patt.loc9_28.2 => constants.%t.patt.9d2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl(constants.%empty_struct_type) { // CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc7_15.2 => constants.%empty_struct_type -// CHECK:STDOUT: %I.type.loc7_36.2 => constants.%I.type.722 -// CHECK:STDOUT: %I.impl_witness.loc7_38.2 => constants.%I.impl_witness.a7c +// CHECK:STDOUT: %I.type.loc7_35.2 => constants.%I.type.722 +// CHECK:STDOUT: %I.impl_witness.loc7_37.2 => constants.%I.impl_witness.a7c // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.dfa @@ -828,10 +828,10 @@ fn B() { // CHECK:STDOUT: specific @A(constants.%I.facet.831) { // CHECK:STDOUT: %T.patt.loc9_7.2 => constants.%T.patt.be3 // CHECK:STDOUT: %T.loc9_7.1 => constants.%I.facet.831 -// CHECK:STDOUT: %T.as_type.loc9_31.1 => constants.%C +// CHECK:STDOUT: %T.as_type.loc9_30.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b -// CHECK:STDOUT: %t.param_patt.loc9_29.2 => constants.%t.param_patt.5f9 -// CHECK:STDOUT: %t.patt.loc9_29.2 => constants.%t.patt.c3d +// CHECK:STDOUT: %t.param_patt.loc9_28.2 => constants.%t.param_patt.5f9 +// CHECK:STDOUT: %t.patt.loc9_28.2 => constants.%t.patt.c3d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.357 @@ -899,18 +899,18 @@ fn B() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %V.patt.loc3_14.1: %pattern_type.98f = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc3_14.2 (constants.%V.patt)] -// CHECK:STDOUT: %W.patt.loc3_24.1: %pattern_type.98f = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc3_24.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.patt.loc3_23.1: %pattern_type.98f = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc3_23.2 (constants.%W.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_16.1: type = splice_block %.loc3_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc3_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %V.loc3_14.2: type = symbolic_binding V, 0 [symbolic = %V.loc3_14.1 (constants.%V)] -// CHECK:STDOUT: %.loc3_27.1: type = splice_block %.loc3_27.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc3_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_27.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_25.1: type = splice_block %.loc3_25.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc3_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc3_25.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %W.loc3_24.2: type = symbolic_binding W, 1 [symbolic = %W.loc3_24.1 (constants.%W)] +// CHECK:STDOUT: %W.loc3_23.2: type = symbolic_binding W, 1 [symbolic = %W.loc3_23.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] { @@ -919,57 +919,57 @@ fn B() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_15.1 [symbolic = %T.loc7_15.2 (constants.%T.67d)] -// CHECK:STDOUT: %.loc7_35: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_36: type = converted %.loc7_35, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %I.type.loc7_36.1: type = facet_type <@I, @I(constants.%T.67d, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_36.2 (constants.%I.type.269)] -// CHECK:STDOUT: %.loc7_18.1: type = splice_block %.loc7_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc7_34: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_35: type = converted %.loc7_34, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %I.type.loc7_35.1: type = facet_type <@I, @I(constants.%T.67d, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_35.2 (constants.%I.type.269)] +// CHECK:STDOUT: %.loc7_17.1: type = splice_block %.loc7_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_15.2 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] { // CHECK:STDOUT: %T.patt.loc9_7.1: %pattern_type.5c6 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.c4c)] -// CHECK:STDOUT: %t.param_patt.loc9_29.1: @A.%pattern_type (%pattern_type.67d) = value_param_pattern [symbolic = %t.param_patt.loc9_29.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc9_29.1: @A.%pattern_type (%pattern_type.67d) = at_binding_pattern t, %t.param_patt.loc9_29.1 [symbolic = %t.patt.loc9_29.2 (constants.%t.patt)] +// CHECK:STDOUT: %t.param_patt.loc9_28.1: @A.%pattern_type (%pattern_type.67d) = value_param_pattern [symbolic = %t.param_patt.loc9_28.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc9_28.1: @A.%pattern_type (%pattern_type.67d) = at_binding_pattern t, %t.param_patt.loc9_28.1 [symbolic = %t.patt.loc9_28.2 (constants.%t.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_18.1: type = splice_block %I.type [concrete = constants.%I.type.6c0] { +// CHECK:STDOUT: %.loc9_17.1: type = splice_block %I.type [concrete = constants.%I.type.6c0] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] -// CHECK:STDOUT: %.loc9_13: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc9_17: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc9_18.2: type = converted %.loc9_13, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc9_18.3: type = converted %.loc9_17, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc9_12: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc9_16: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc9_17.2: type = converted %.loc9_12, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc9_17.3: type = converted %.loc9_16, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%empty_struct_type, constants.%empty_struct_type)> [concrete = constants.%I.type.6c0] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_7.2: %I.type.6c0 = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.b75)] -// CHECK:STDOUT: %t.param: @A.%T.as_type.loc9_31.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc9_31.1: type = splice_block %.loc9_31.2 [symbolic = %T.as_type.loc9_31.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %t.param: @A.%T.as_type.loc9_30.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc9_30.1: type = splice_block %.loc9_30.2 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %I.type.6c0 = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.b75)] -// CHECK:STDOUT: %T.as_type.loc9_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_31.2: type = converted %T.ref, %T.as_type.loc9_31.2 [symbolic = %T.as_type.loc9_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc9_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_30.2: type = converted %T.ref, %T.as_type.loc9_30.2 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @A.%T.as_type.loc9_31.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @A.%T.as_type.loc9_30.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(%V.loc3_14.2: type, %W.loc3_24.2: type) { +// CHECK:STDOUT: generic interface @I(%V.loc3_14.2: type, %W.loc3_23.2: type) { // CHECK:STDOUT: %V.patt.loc3_14.2: %pattern_type.98f = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc3_14.2 (constants.%V.patt)] // CHECK:STDOUT: %V.loc3_14.1: type = symbolic_binding V, 0 [symbolic = %V.loc3_14.1 (constants.%V)] -// CHECK:STDOUT: %W.patt.loc3_24.2: %pattern_type.98f = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc3_24.2 (constants.%W.patt)] -// CHECK:STDOUT: %W.loc3_24.1: type = symbolic_binding W, 1 [symbolic = %W.loc3_24.1 (constants.%W)] +// CHECK:STDOUT: %W.patt.loc3_23.2: %pattern_type.98f = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc3_23.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.loc3_23.1: type = symbolic_binding W, 1 [symbolic = %W.loc3_23.1 (constants.%W)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%V.loc3_14.1, %W.loc3_24.1)> [symbolic = %I.type (constants.%I.type.d96)] -// CHECK:STDOUT: %Self.loc3_33.2: @I.%I.type (%I.type.d96) = symbolic_binding Self, 2 [symbolic = %Self.loc3_33.2 (constants.%Self.299)] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%V.loc3_14.1, %W.loc3_23.1)> [symbolic = %I.type (constants.%I.type.d96)] +// CHECK:STDOUT: %Self.loc3_31.2: @I.%I.type (%I.type.d96) = symbolic_binding Self, 2 [symbolic = %Self.loc3_31.2 (constants.%Self.299)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_33.1: @I.%I.type (%I.type.d96) = symbolic_binding Self, 2 [symbolic = %Self.loc3_33.2 (constants.%Self.299)] +// CHECK:STDOUT: %Self.loc3_31.1: @I.%I.type (%I.type.d96) = symbolic_binding Self, 2 [symbolic = %Self.loc3_31.2 (constants.%Self.299)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_33.1 +// CHECK:STDOUT: .Self = %Self.loc3_31.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -981,19 +981,19 @@ fn B() { // CHECK:STDOUT: generic impl @C.as.I.impl(%T.loc7_15.1: type) { // CHECK:STDOUT: %T.patt.loc7_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt.d47)] // CHECK:STDOUT: %T.loc7_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_15.2 (constants.%T.67d)] -// CHECK:STDOUT: %I.type.loc7_36.2: type = facet_type <@I, @I(%T.loc7_15.2, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_36.2 (constants.%I.type.269)] -// CHECK:STDOUT: %I.impl_witness.loc7_38.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc7_15.2) [symbolic = %I.impl_witness.loc7_38.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %I.type.loc7_35.2: type = facet_type <@I, @I(%T.loc7_15.2, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_35.2 (constants.%I.type.269)] +// CHECK:STDOUT: %I.impl_witness.loc7_37.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc7_15.2) [symbolic = %I.impl_witness.loc7_37.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc7_36.2 [symbolic = %require_complete (constants.%require_complete.2dc)] +// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc7_35.2 [symbolic = %require_complete (constants.%require_complete.2dc)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %I.type.loc7_36.1 { +// CHECK:STDOUT: impl: %C.ref as %I.type.loc7_35.1 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl [concrete] -// CHECK:STDOUT: %I.impl_witness.loc7_38.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T.67d) [symbolic = %I.impl_witness.loc7_38.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %I.impl_witness.loc7_37.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T.67d) [symbolic = %I.impl_witness.loc7_37.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %I.type.loc7_36.1 -// CHECK:STDOUT: witness = %I.impl_witness.loc7_38.1 +// CHECK:STDOUT: extend %I.type.loc7_35.1 +// CHECK:STDOUT: witness = %I.impl_witness.loc7_37.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1008,15 +1008,15 @@ fn B() { // CHECK:STDOUT: generic fn @A(%T.loc9_7.2: %I.type.6c0) { // CHECK:STDOUT: %T.patt.loc9_7.2: %pattern_type.5c6 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.c4c)] // CHECK:STDOUT: %T.loc9_7.1: %I.type.6c0 = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.b75)] -// CHECK:STDOUT: %T.as_type.loc9_31.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc9_31.1 [symbolic = %pattern_type (constants.%pattern_type.67d)] -// CHECK:STDOUT: %t.param_patt.loc9_29.2: @A.%pattern_type (%pattern_type.67d) = value_param_pattern [symbolic = %t.param_patt.loc9_29.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc9_29.2: @A.%pattern_type (%pattern_type.67d) = at_binding_pattern t, %t.param_patt.loc9_29.2 [symbolic = %t.patt.loc9_29.2 (constants.%t.patt)] +// CHECK:STDOUT: %T.as_type.loc9_30.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc9_30.1 [symbolic = %pattern_type (constants.%pattern_type.67d)] +// CHECK:STDOUT: %t.param_patt.loc9_28.2: @A.%pattern_type (%pattern_type.67d) = value_param_pattern [symbolic = %t.param_patt.loc9_28.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc9_28.2: @A.%pattern_type (%pattern_type.67d) = at_binding_pattern t, %t.param_patt.loc9_28.2 [symbolic = %t.patt.loc9_28.2 (constants.%t.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc9_31.1 [symbolic = %require_complete (constants.%require_complete.401)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc9_30.1 [symbolic = %require_complete (constants.%require_complete.401)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @A.%T.as_type.loc9_31.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @A.%T.as_type.loc9_30.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -1040,8 +1040,8 @@ fn B() { // CHECK:STDOUT: specific @I(constants.%V, constants.%W) { // CHECK:STDOUT: %V.patt.loc3_14.2 => constants.%V.patt // CHECK:STDOUT: %V.loc3_14.1 => constants.%V -// CHECK:STDOUT: %W.patt.loc3_24.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc3_24.1 => constants.%W +// CHECK:STDOUT: %W.patt.loc3_23.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc3_23.1 => constants.%W // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%V, constants.%W, constants.%Self.299) {} @@ -1049,19 +1049,19 @@ fn B() { // CHECK:STDOUT: specific @I(constants.%T.67d, constants.%empty_tuple.type) { // CHECK:STDOUT: %V.patt.loc3_14.2 => constants.%V.patt // CHECK:STDOUT: %V.loc3_14.1 => constants.%T.67d -// CHECK:STDOUT: %W.patt.loc3_24.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc3_24.1 => constants.%empty_tuple.type +// CHECK:STDOUT: %W.patt.loc3_23.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc3_23.1 => constants.%empty_tuple.type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.269 -// CHECK:STDOUT: %Self.loc3_33.2 => constants.%Self.7df +// CHECK:STDOUT: %Self.loc3_31.2 => constants.%Self.7df // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl(constants.%T.67d) { // CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc7_15.2 => constants.%T.67d -// CHECK:STDOUT: %I.type.loc7_36.2 => constants.%I.type.269 -// CHECK:STDOUT: %I.impl_witness.loc7_38.2 => constants.%I.impl_witness +// CHECK:STDOUT: %I.type.loc7_35.2 => constants.%I.type.269 +// CHECK:STDOUT: %I.impl_witness.loc7_37.2 => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T.67d, constants.%empty_tuple.type, constants.%Self.299) { @@ -1075,12 +1075,12 @@ fn B() { // CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%empty_struct_type) { // CHECK:STDOUT: %V.patt.loc3_14.2 => constants.%V.patt // CHECK:STDOUT: %V.loc3_14.1 => constants.%empty_struct_type -// CHECK:STDOUT: %W.patt.loc3_24.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc3_24.1 => constants.%empty_struct_type +// CHECK:STDOUT: %W.patt.loc3_23.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc3_23.1 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.6c0 -// CHECK:STDOUT: %Self.loc3_33.2 => constants.%Self.136 +// CHECK:STDOUT: %Self.loc3_31.2 => constants.%Self.136 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%empty_struct_type, constants.%empty_struct_type, constants.%Self.299) { @@ -1090,10 +1090,10 @@ fn B() { // CHECK:STDOUT: specific @A(constants.%T.b75) { // CHECK:STDOUT: %T.patt.loc9_7.2 => constants.%T.patt.c4c // CHECK:STDOUT: %T.loc9_7.1 => constants.%T.b75 -// CHECK:STDOUT: %T.as_type.loc9_31.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc9_30.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.67d -// CHECK:STDOUT: %t.param_patt.loc9_29.2 => constants.%t.param_patt -// CHECK:STDOUT: %t.patt.loc9_29.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc9_28.2 => constants.%t.param_patt +// CHECK:STDOUT: %t.patt.loc9_28.2 => constants.%t.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_mismatch_impl_self_with_fixed_specific.carbon @@ -1156,51 +1156,51 @@ fn B() { // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %V.patt.loc5_10.1: %pattern_type.98f = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc5_10.2 (constants.%V.patt)] -// CHECK:STDOUT: %W.patt.loc5_20.1: %pattern_type.98f = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc5_20.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.patt.loc5_19.1: %pattern_type.98f = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc5_19.2 (constants.%W.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_13.1: type = splice_block %.loc5_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_12.1: type = splice_block %.loc5_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc5_10: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %V.loc5_10.2: type = symbolic_binding V, 0 [symbolic = %V.loc5_10.1 (constants.%V)] -// CHECK:STDOUT: %.loc5_23.1: type = splice_block %.loc5_23.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc5_20: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_23.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_21.1: type = splice_block %.loc5_21.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc5_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc5_21.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %W.loc5_20.2: type = symbolic_binding W, 1 [symbolic = %W.loc5_20.1 (constants.%W)] +// CHECK:STDOUT: %W.loc5_19.2: type = symbolic_binding W, 1 [symbolic = %W.loc5_19.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] { // CHECK:STDOUT: %T.patt.loc7_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_15.1 [symbolic = %T.loc7_15.2 (constants.%T.67d)] -// CHECK:STDOUT: %.loc7_30: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_31: type = converted %.loc7_30, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %C.loc7_31.1: type = class_type @C, @C(constants.%T.67d, constants.%empty_tuple.type) [symbolic = %C.loc7_31.2 (constants.%C.ab0)] +// CHECK:STDOUT: %.loc7_29: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_30: type = converted %.loc7_29, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %C.loc7_30.1: type = class_type @C, @C(constants.%T.67d, constants.%empty_tuple.type) [symbolic = %C.loc7_30.2 (constants.%C.ab0)] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.loc7_18.1: type = splice_block %.loc7_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc7_17.1: type = splice_block %.loc7_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_15.2 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] { // CHECK:STDOUT: %T.patt.loc9_7.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.1df)] -// CHECK:STDOUT: %t.param_patt.loc9_21.1: @A.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %t.param_patt.loc9_21.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc9_21.1: @A.%pattern_type (%pattern_type.b3a) = at_binding_pattern t, %t.param_patt.loc9_21.1 [symbolic = %t.patt.loc9_21.2 (constants.%t.patt)] +// CHECK:STDOUT: %t.param_patt.loc9_20.1: @A.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %t.param_patt.loc9_20.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc9_20.1: @A.%pattern_type (%pattern_type.b3a) = at_binding_pattern t, %t.param_patt.loc9_20.1 [symbolic = %t.patt.loc9_20.2 (constants.%t.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_10: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %.loc9_9: type = splice_block %I.ref [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_7.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.dda)] -// CHECK:STDOUT: %t.param: @A.%T.as_type.loc9_23.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.2 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %t.param: @A.%T.as_type.loc9_22.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.dda)] -// CHECK:STDOUT: %T.as_type.loc9_23.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_23.2: type = converted %T.ref, %T.as_type.loc9_23.2 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc9_22.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_22.2: type = converted %T.ref, %T.as_type.loc9_22.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @A.%T.as_type.loc9_23.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @A.%T.as_type.loc9_22.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: } @@ -1221,26 +1221,26 @@ fn B() { // CHECK:STDOUT: generic impl @C.as.I.impl(%T.loc7_15.1: type) { // CHECK:STDOUT: %T.patt.loc7_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt.d47)] // CHECK:STDOUT: %T.loc7_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_15.2 (constants.%T.67d)] -// CHECK:STDOUT: %C.loc7_31.2: type = class_type @C, @C(%T.loc7_15.2, constants.%empty_tuple.type) [symbolic = %C.loc7_31.2 (constants.%C.ab0)] -// CHECK:STDOUT: %I.impl_witness.loc7_38.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc7_15.2) [symbolic = %I.impl_witness.loc7_38.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %C.loc7_30.2: type = class_type @C, @C(%T.loc7_15.2, constants.%empty_tuple.type) [symbolic = %C.loc7_30.2 (constants.%C.ab0)] +// CHECK:STDOUT: %I.impl_witness.loc7_37.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc7_15.2) [symbolic = %I.impl_witness.loc7_37.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.loc7_31.1 as %I.ref { +// CHECK:STDOUT: impl: %C.loc7_30.1 as %I.ref { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl [concrete] -// CHECK:STDOUT: %I.impl_witness.loc7_38.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T.67d) [symbolic = %I.impl_witness.loc7_38.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %I.impl_witness.loc7_37.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T.67d) [symbolic = %I.impl_witness.loc7_37.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %I.ref -// CHECK:STDOUT: witness = %I.impl_witness.loc7_38.1 +// CHECK:STDOUT: witness = %I.impl_witness.loc7_37.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%V.loc5_10.2: type, %W.loc5_20.2: type) { +// CHECK:STDOUT: generic class @C(%V.loc5_10.2: type, %W.loc5_19.2: type) { // CHECK:STDOUT: %V.patt.loc5_10.2: %pattern_type.98f = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc5_10.2 (constants.%V.patt)] // CHECK:STDOUT: %V.loc5_10.1: type = symbolic_binding V, 0 [symbolic = %V.loc5_10.1 (constants.%V)] -// CHECK:STDOUT: %W.patt.loc5_20.2: %pattern_type.98f = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc5_20.2 (constants.%W.patt)] -// CHECK:STDOUT: %W.loc5_20.1: type = symbolic_binding W, 1 [symbolic = %W.loc5_20.1 (constants.%W)] +// CHECK:STDOUT: %W.patt.loc5_19.2: %pattern_type.98f = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc5_19.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.loc5_19.1: type = symbolic_binding W, 1 [symbolic = %W.loc5_19.1 (constants.%W)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1256,15 +1256,15 @@ fn B() { // CHECK:STDOUT: generic fn @A(%T.loc9_7.2: %I.type) { // CHECK:STDOUT: %T.patt.loc9_7.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.1df)] // CHECK:STDOUT: %T.loc9_7.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.dda)] -// CHECK:STDOUT: %T.as_type.loc9_23.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc9_23.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] -// CHECK:STDOUT: %t.param_patt.loc9_21.2: @A.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %t.param_patt.loc9_21.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc9_21.2: @A.%pattern_type (%pattern_type.b3a) = at_binding_pattern t, %t.param_patt.loc9_21.2 [symbolic = %t.patt.loc9_21.2 (constants.%t.patt)] +// CHECK:STDOUT: %T.as_type.loc9_22.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc9_22.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] +// CHECK:STDOUT: %t.param_patt.loc9_20.2: @A.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %t.param_patt.loc9_20.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc9_20.2: @A.%pattern_type (%pattern_type.b3a) = at_binding_pattern t, %t.param_patt.loc9_20.2 [symbolic = %t.patt.loc9_20.2 (constants.%t.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc9_23.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc9_22.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @A.%T.as_type.loc9_23.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @A.%T.as_type.loc9_22.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -1297,22 +1297,22 @@ fn B() { // CHECK:STDOUT: specific @C(constants.%V, constants.%W) { // CHECK:STDOUT: %V.patt.loc5_10.2 => constants.%V.patt // CHECK:STDOUT: %V.loc5_10.1 => constants.%V -// CHECK:STDOUT: %W.patt.loc5_20.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc5_20.1 => constants.%W +// CHECK:STDOUT: %W.patt.loc5_19.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc5_19.1 => constants.%W // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%T.67d, constants.%empty_tuple.type) { // CHECK:STDOUT: %V.patt.loc5_10.2 => constants.%V.patt // CHECK:STDOUT: %V.loc5_10.1 => constants.%T.67d -// CHECK:STDOUT: %W.patt.loc5_20.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc5_20.1 => constants.%empty_tuple.type +// CHECK:STDOUT: %W.patt.loc5_19.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc5_19.1 => constants.%empty_tuple.type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl(constants.%T.67d) { // CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc7_15.2 => constants.%T.67d -// CHECK:STDOUT: %C.loc7_31.2 => constants.%C.ab0 -// CHECK:STDOUT: %I.impl_witness.loc7_38.2 => constants.%I.impl_witness +// CHECK:STDOUT: %C.loc7_30.2 => constants.%C.ab0 +// CHECK:STDOUT: %I.impl_witness.loc7_37.2 => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet) { @@ -1322,17 +1322,17 @@ fn B() { // CHECK:STDOUT: specific @A(constants.%T.dda) { // CHECK:STDOUT: %T.patt.loc9_7.2 => constants.%T.patt.1df // CHECK:STDOUT: %T.loc9_7.1 => constants.%T.dda -// CHECK:STDOUT: %T.as_type.loc9_23.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc9_22.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a -// CHECK:STDOUT: %t.param_patt.loc9_21.2 => constants.%t.param_patt -// CHECK:STDOUT: %t.patt.loc9_21.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc9_20.2 => constants.%t.param_patt +// CHECK:STDOUT: %t.patt.loc9_20.2 => constants.%t.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%empty_struct_type, constants.%empty_struct_type) { // CHECK:STDOUT: %V.patt.loc5_10.2 => constants.%V.patt // CHECK:STDOUT: %V.loc5_10.1 => constants.%empty_struct_type -// CHECK:STDOUT: %W.patt.loc5_20.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc5_20.1 => constants.%empty_struct_type +// CHECK:STDOUT: %W.patt.loc5_19.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc5_19.1 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/convert_facet_type_to_facet_value.carbon b/toolchain/check/testdata/facet/convert_facet_type_to_facet_value.carbon index 0963f662c1f9..2509f201e18b 100644 --- a/toolchain/check/testdata/facet/convert_facet_type_to_facet_value.carbon +++ b/toolchain/check/testdata/facet/convert_facet_type_to_facet_value.carbon @@ -20,7 +20,7 @@ interface Animal {} // https://github.com/carbon-language/carbon-lang/issues/4853 impl Animal as Eats {} -fn Feed(unused e:! Eats) {} +fn Feed(unused generic e: Eats) {} fn F() { Feed(Animal); } @@ -35,7 +35,7 @@ interface Animal {} // https://github.com/carbon-language/carbon-lang/issues/4853 impl Animal as Eats {} -fn Feed(unused e:! Eats) {} +fn Feed(unused generic e: Eats) {} class Goat {} impl Goat as Animal {} @@ -43,9 +43,9 @@ fn F() { // CHECK:STDERR: fail_facet_value_to_facet_type.carbon:[[@LINE+7]]:3: error: cannot convert type `Goat as Animal` that implements `Animal` into type implementing `Eats` [ConversionFailureFacetToFacet] // CHECK:STDERR: Feed(Goat as Animal); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_facet_value_to_facet_type.carbon:[[@LINE-8]]:16: note: initializing generic parameter `e` declared here [InitializingGenericParam] - // CHECK:STDERR: fn Feed(unused e:! Eats) {} - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_facet_value_to_facet_type.carbon:[[@LINE-8]]:24: note: initializing generic parameter `e` declared here [InitializingGenericParam] + // CHECK:STDERR: fn Feed(unused generic e: Eats) {} + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: Feed(Goat as Animal); } @@ -61,7 +61,7 @@ interface Climbs {} // https://github.com/carbon-language/carbon-lang/issues/4853 impl Animal as Eats {} -fn Feed(unused e:! Eats) {} +fn Feed(unused generic e: Eats) {} class Goat {} impl Goat as Animal {} impl Goat as Climbs {} @@ -72,18 +72,18 @@ fn F() { // CHECK:STDERR: fail_convert_multi_interface_facet_value_to_facet_value.carbon:[[@LINE+7]]:3: error: cannot convert type `Goat as Animal & Climbs` that implements `Animal & Climbs` into type implementing `Eats` [ConversionFailureFacetToFacet] // CHECK:STDERR: Feed(Goat as (Animal & Climbs)); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_convert_multi_interface_facet_value_to_facet_value.carbon:[[@LINE-11]]:16: note: initializing generic parameter `e` declared here [InitializingGenericParam] - // CHECK:STDERR: fn Feed(unused e:! Eats) {} - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_convert_multi_interface_facet_value_to_facet_value.carbon:[[@LINE-11]]:24: note: initializing generic parameter `e` declared here [InitializingGenericParam] + // CHECK:STDERR: fn Feed(unused generic e: Eats) {} + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: Feed(Goat as (Animal & Climbs)); // CHECK:STDERR: fail_convert_multi_interface_facet_value_to_facet_value.carbon:[[@LINE+7]]:3: error: cannot convert type `Animal & Climbs` into type implementing `Eats` [ConversionFailureTypeToFacet] // CHECK:STDERR: Feed(Animal & Climbs); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_convert_multi_interface_facet_value_to_facet_value.carbon:[[@LINE-20]]:16: note: initializing generic parameter `e` declared here [InitializingGenericParam] - // CHECK:STDERR: fn Feed(unused e:! Eats) {} - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_convert_multi_interface_facet_value_to_facet_value.carbon:[[@LINE-20]]:24: note: initializing generic parameter `e` declared here [InitializingGenericParam] + // CHECK:STDERR: fn Feed(unused generic e: Eats) {} + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: Feed(Animal & Climbs); } diff --git a/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon b/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon index 4ae74b4f397e..0ce5c4c1e348 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon @@ -21,7 +21,7 @@ class Goat {} impl Goat as Animal {} impl Goat as Eats {} -fn Feed(unused e:! Eats) {} +fn Feed(unused generic e: Eats) {} fn F() { //@dump-sem-ir-begin @@ -65,7 +65,7 @@ library "[[@TEST_NAME]]"; interface J {} -class C(A:! J, B:! A) {} +class C(A: J, B: A) {} // The class C is holding a specific with a 2 SymbolicBindings where one is a // *symbolic* type of the other. @@ -83,9 +83,9 @@ class C(A:! J, B:! A) {} // referring to the same symbolic type and with the same facet type. // Essentially, it allows lossless round trips through a FacetAccessType when // converting back to the type of its original facet value. -fn G[A:! J, B:! A](unused x: C(A, B)) {} +fn G[A: J, B: A](unused x: C(A, B)) {} -fn F[A:! J, B:! A](x: C(A, B)) { +fn F[A: J, B: A](x: C(A, B)) { //@dump-sem-ir-begin G(x); //@dump-sem-ir-end @@ -251,17 +251,17 @@ fn F[A:! J, B:! A](x: C(A, B)) { // CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%A, %B) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%A.loc25_7.2: %J.type, %B.loc25_14.2: @F.%A.as_type.loc25_17.1 (%A.as_type)) { +// CHECK:STDOUT: generic fn @F(%A.loc25_7.2: %J.type, %B.loc25_13.2: @F.%A.as_type.loc25_15.1 (%A.as_type)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %G.specific_fn.loc27_3.2: = specific_function constants.%G, @G(%A.loc25_7.1, %B.loc25_14.1) [symbolic = %G.specific_fn.loc27_3.2 (constants.%G.specific_fn)] +// CHECK:STDOUT: %G.specific_fn.loc27_3.2: = specific_function constants.%G, @G(%A.loc25_7.1, %B.loc25_13.1) [symbolic = %G.specific_fn.loc27_3.2 (constants.%G.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%C.loc25_29.1 (%C)) { +// CHECK:STDOUT: fn(%x.param: @F.%C.loc25_27.1 (%C)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] -// CHECK:STDOUT: %x.ref: @F.%C.loc25_29.1 (%C) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @F.%C.loc25_27.1 (%C) = name_ref x, %x // CHECK:STDOUT: %.loc27_6.1: %J.type = converted constants.%A.as_type, constants.%A [symbolic = %A.loc25_7.1 (constants.%A)] // CHECK:STDOUT: %.loc27_6.2: %J.type = converted constants.%A.as_type, constants.%A [symbolic = %A.loc25_7.1 (constants.%A)] // CHECK:STDOUT: %G.specific_fn.loc27_3.1: = specific_function %G.ref, @G(constants.%A, constants.%B) [symbolic = %G.specific_fn.loc27_3.2 (constants.%G.specific_fn)] @@ -275,13 +275,13 @@ fn F[A:! J, B:! A](x: C(A, B)) { // CHECK:STDOUT: specific @F(constants.%A, constants.%B) { // CHECK:STDOUT: %A.patt.loc25_7.2 => constants.%A.patt // CHECK:STDOUT: %A.loc25_7.1 => constants.%A -// CHECK:STDOUT: %A.as_type.loc25_17.1 => constants.%A.as_type -// CHECK:STDOUT: %pattern_type.loc25_14 => constants.%pattern_type.76a -// CHECK:STDOUT: %B.patt.loc25_14.2 => constants.%B.patt -// CHECK:STDOUT: %B.loc25_14.1 => constants.%B -// CHECK:STDOUT: %C.loc25_29.1 => constants.%C -// CHECK:STDOUT: %pattern_type.loc25_21 => constants.%pattern_type.bac -// CHECK:STDOUT: %x.param_patt.loc25_21.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc25_21.2 => constants.%x.patt.390072.2 +// CHECK:STDOUT: %A.as_type.loc25_15.1 => constants.%A.as_type +// CHECK:STDOUT: %pattern_type.loc25_13 => constants.%pattern_type.76a +// CHECK:STDOUT: %B.patt.loc25_13.2 => constants.%B.patt +// CHECK:STDOUT: %B.loc25_13.1 => constants.%B +// CHECK:STDOUT: %C.loc25_27.1 => constants.%C +// CHECK:STDOUT: %pattern_type.loc25_19 => constants.%pattern_type.bac +// CHECK:STDOUT: %x.param_patt.loc25_19.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc25_19.2 => constants.%x.patt.390072.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_facet_value_to_facet_value.carbon b/toolchain/check/testdata/facet/convert_facet_value_to_facet_value.carbon index 5ee78336f71f..031d3443bdf2 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_to_facet_value.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_to_facet_value.carbon @@ -20,7 +20,7 @@ class C {} impl C as Z {} impl C as Y {} -fn G(unused z:! Z) {} +fn G(unused generic z: Z) {} fn F() { G(C); @@ -38,8 +38,8 @@ library "[[@TEST_NAME]]"; interface Z {} interface Y {} -impl forall [T:! Y] T as Z {} +impl forall [T: Y] T as Z {} -fn F(U:! Y) { +fn F(generic U: Y) { U as Z; } diff --git a/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon b/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon index 060a7b4494c9..ed5b4821bfc0 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon @@ -14,9 +14,9 @@ interface Animal {} -fn FeedAnimal(unused T:! Animal) {} +fn FeedAnimal(unused generic T: Animal) {} -fn HandleAnimal(T:! Animal) { FeedAnimal(T); } +fn HandleAnimal(generic T: Animal) { FeedAnimal(T); } class Goat {} impl Goat as Animal {} @@ -73,22 +73,22 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Animal.decl: type = interface_decl @Animal [concrete = constants.%Animal.type] {} {} // CHECK:STDOUT: %FeedAnimal.decl: %FeedAnimal.type = fn_decl @FeedAnimal [concrete = constants.%FeedAnimal] { -// CHECK:STDOUT: %T.patt.loc17_23.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_23.2 (constants.%T.patt.e44e2f.1)] +// CHECK:STDOUT: %T.patt.loc17_31.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_31.2 (constants.%T.patt.e44e2f.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc17: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc17_23.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_23.1 (constants.%T.443025.1)] +// CHECK:STDOUT: %T.loc17_31.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_31.1 (constants.%T.443025.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %HandleAnimal.decl: %HandleAnimal.type = fn_decl @HandleAnimal [concrete = constants.%HandleAnimal] { -// CHECK:STDOUT: %T.patt.loc19_18.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_18.2 (constants.%T.patt.e44e2f.2)] +// CHECK:STDOUT: %T.patt.loc19_26.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_26.2 (constants.%T.patt.e44e2f.2)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc19: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc19_18.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc19_18.1 (constants.%T.443025.2)] +// CHECK:STDOUT: %T.loc19_26.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc19_26.1 (constants.%T.443025.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %Goat.decl: type = class_decl @Goat [concrete = constants.%Goat] {} {} // CHECK:STDOUT: impl_decl @Goat.as.Animal.impl [concrete] {} { @@ -128,9 +128,9 @@ fn F() { // CHECK:STDOUT: .Self = constants.%Goat // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @FeedAnimal(%T.loc17_23.2: %Animal.type) { -// CHECK:STDOUT: %T.patt.loc17_23.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_23.2 (constants.%T.patt.e44e2f.1)] -// CHECK:STDOUT: %T.loc17_23.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_23.1 (constants.%T.443025.1)] +// CHECK:STDOUT: generic fn @FeedAnimal(%T.loc17_31.2: %Animal.type) { +// CHECK:STDOUT: %T.patt.loc17_31.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_31.2 (constants.%T.patt.e44e2f.1)] +// CHECK:STDOUT: %T.loc17_31.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_31.1 (constants.%T.443025.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -142,19 +142,19 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HandleAnimal(%T.loc19_18.2: %Animal.type) { -// CHECK:STDOUT: %T.patt.loc19_18.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_18.2 (constants.%T.patt.e44e2f.2)] -// CHECK:STDOUT: %T.loc19_18.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc19_18.1 (constants.%T.443025.2)] +// CHECK:STDOUT: generic fn @HandleAnimal(%T.loc19_26.2: %Animal.type) { +// CHECK:STDOUT: %T.patt.loc19_26.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_26.2 (constants.%T.patt.e44e2f.2)] +// CHECK:STDOUT: %T.loc19_26.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc19_26.1 (constants.%T.443025.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_31.2: = specific_function constants.%FeedAnimal, @FeedAnimal(%T.loc19_18.1) [symbolic = %FeedAnimal.specific_fn.loc19_31.2 (constants.%FeedAnimal.specific_fn.5bd)] +// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_38.2: = specific_function constants.%FeedAnimal, @FeedAnimal(%T.loc19_26.1) [symbolic = %FeedAnimal.specific_fn.loc19_38.2 (constants.%FeedAnimal.specific_fn.5bd)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %FeedAnimal.ref: %FeedAnimal.type = name_ref FeedAnimal, file.%FeedAnimal.decl [concrete = constants.%FeedAnimal] -// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc19_18.2 [symbolic = %T.loc19_18.1 (constants.%T.443025.2)] -// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_31.1: = specific_function %FeedAnimal.ref, @FeedAnimal(constants.%T.443025.2) [symbolic = %FeedAnimal.specific_fn.loc19_31.2 (constants.%FeedAnimal.specific_fn.5bd)] -// CHECK:STDOUT: %FeedAnimal.call: init %empty_tuple.type = call %FeedAnimal.specific_fn.loc19_31.1() +// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc19_26.2 [symbolic = %T.loc19_26.1 (constants.%T.443025.2)] +// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_38.1: = specific_function %FeedAnimal.ref, @FeedAnimal(constants.%T.443025.2) [symbolic = %FeedAnimal.specific_fn.loc19_38.2 (constants.%FeedAnimal.specific_fn.5bd)] +// CHECK:STDOUT: %FeedAnimal.call: init %empty_tuple.type = call %FeedAnimal.specific_fn.loc19_38.1() // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -179,18 +179,18 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @FeedAnimal(constants.%T.443025.1) { -// CHECK:STDOUT: %T.patt.loc17_23.2 => constants.%T.patt.e44e2f.1 -// CHECK:STDOUT: %T.loc17_23.1 => constants.%T.443025.1 +// CHECK:STDOUT: %T.patt.loc17_31.2 => constants.%T.patt.e44e2f.1 +// CHECK:STDOUT: %T.loc17_31.1 => constants.%T.443025.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%T.443025.2) { -// CHECK:STDOUT: %T.patt.loc19_18.2 => constants.%T.patt.e44e2f.2 -// CHECK:STDOUT: %T.loc19_18.1 => constants.%T.443025.2 +// CHECK:STDOUT: %T.patt.loc19_26.2 => constants.%T.patt.e44e2f.2 +// CHECK:STDOUT: %T.loc19_26.1 => constants.%T.443025.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @FeedAnimal(constants.%T.443025.2) { -// CHECK:STDOUT: %T.patt.loc17_23.2 => constants.%T.patt.e44e2f.1 -// CHECK:STDOUT: %T.loc17_23.1 => constants.%T.443025.2 +// CHECK:STDOUT: %T.patt.loc17_31.2 => constants.%T.patt.e44e2f.1 +// CHECK:STDOUT: %T.loc17_31.1 => constants.%T.443025.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -200,16 +200,16 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%Animal.facet) { -// CHECK:STDOUT: %T.patt.loc19_18.2 => constants.%T.patt.e44e2f.2 -// CHECK:STDOUT: %T.loc19_18.1 => constants.%Animal.facet +// CHECK:STDOUT: %T.patt.loc19_26.2 => constants.%T.patt.e44e2f.2 +// CHECK:STDOUT: %T.loc19_26.1 => constants.%Animal.facet // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_31.2 => constants.%FeedAnimal.specific_fn.42c +// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_38.2 => constants.%FeedAnimal.specific_fn.42c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @FeedAnimal(constants.%Animal.facet) { -// CHECK:STDOUT: %T.patt.loc17_23.2 => constants.%T.patt.e44e2f.1 -// CHECK:STDOUT: %T.loc17_23.1 => constants.%Animal.facet +// CHECK:STDOUT: %T.patt.loc17_31.2 => constants.%T.patt.e44e2f.1 +// CHECK:STDOUT: %T.loc17_31.1 => constants.%Animal.facet // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon b/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon index 8165a4b22b4f..418d3ccecc0a 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon @@ -18,9 +18,9 @@ library "[[@TEST_NAME]]"; interface Eats {} interface Animal {} -fn Feed[T:! Eats](unused e: T) {} +fn Feed[T: Eats](unused e: T) {} -fn HandleAnimal[U:! Animal & Eats](a: U) { Feed(a); } +fn HandleAnimal[U: Animal & Eats](a: U) { Feed(a); } // --- bigger.carbon library "[[@TEST_NAME]]"; @@ -29,9 +29,9 @@ interface Eats {} interface Animal {} interface Tame {} -fn FeedTame[V:! Tame & Eats](unused v: V) {} +fn FeedTame[V: Tame & Eats](unused v: V) {} -fn HandleTameAnimal[W:! Eats & Animal & Tame](w: W) { +fn HandleTameAnimal[W: Eats & Animal & Tame](w: W) { FeedTame(w); } @@ -42,11 +42,11 @@ interface Eats {} interface Animal {} interface Tame {} -impl forall [A:! Animal] A as Eats {} +impl forall [A: Animal] A as Eats {} -fn FeedTame2[V:! Tame & Eats](unused v: V) {} +fn FeedTame2[V: Tame & Eats](unused v: V) {} -fn HandleTameAnimal2[W:! Animal & Tame](w: W) { +fn HandleTameAnimal2[W: Animal & Tame](w: W) { FeedTame2(w); } @@ -57,35 +57,35 @@ library "[[@TEST_NAME]]"; interface A {} -fn TakesA[T:! A](unused x: T) {} +fn TakesA[T: A](unused x: T) {} -fn WithExtraWhere[U:! A where .Self impls type](y: U) { +fn WithExtraWhere[U: A where .Self impls type](y: U) { TakesA(y); } // --- no_interfaces_success.carbon library "[[@TEST_NAME]]"; -fn TakesTypeDeduced[T:! type](unused x: T) {} -fn CallsWithExtraWhere[U:! type where .Self impls type](y: U) { +fn TakesTypeDeduced[T: type](unused x: T) {} +fn CallsWithExtraWhere[U: type where .Self impls type](y: U) { TakesTypeDeduced(y); } -fn TakesTypeExplicit(unused T:! type) {} -fn CallsWithExtraWhereExplicit(U:! type where .Self impls type) { +fn TakesTypeExplicit(unused generic T: type) {} +fn CallsWithExtraWhereExplicit(generic U: type where .Self impls type) { TakesTypeExplicit(U); } // --- no_interfaces.carbon library "[[@TEST_NAME]]"; -fn TakesExtraWhereDeduced[T:! type where .Self impls type](unused x: T) {} -fn CallsWithType[U:! type](y: U) { +fn TakesExtraWhereDeduced[T: type where .Self impls type](unused x: T) {} +fn CallsWithType[U: type](y: U) { TakesExtraWhereDeduced(y); } -fn TakesExtraWhereExplicit(unused T:! type where .Self impls type) {} -fn CallsWithTypeExplicit(U:! type) { +fn TakesExtraWhereExplicit(unused generic T: type where .Self impls type) {} +fn CallsWithTypeExplicit(generic U: type) { TakesExtraWhereExplicit(U); } @@ -161,45 +161,45 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Animal.decl: type = interface_decl @Animal [concrete = constants.%Animal.type] {} {} // CHECK:STDOUT: %Feed.decl: %Feed.type = fn_decl @Feed [concrete = constants.%Feed] { // CHECK:STDOUT: %T.patt.loc6_10.1: %pattern_type.880 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_10.2 (constants.%T.patt)] -// CHECK:STDOUT: %e.param_patt.loc6_27.1: @Feed.%pattern_type (%pattern_type.aed) = value_param_pattern [symbolic = %e.param_patt.loc6_27.2 (constants.%e.param_patt.0be)] -// CHECK:STDOUT: %e.patt.loc6_27.1: @Feed.%pattern_type (%pattern_type.aed) = at_binding_pattern e, %e.param_patt.loc6_27.1 [symbolic = %e.patt.loc6_27.2 (constants.%e.patt.543)] +// CHECK:STDOUT: %e.param_patt.loc6_26.1: @Feed.%pattern_type (%pattern_type.aed) = value_param_pattern [symbolic = %e.param_patt.loc6_26.2 (constants.%e.param_patt.0be)] +// CHECK:STDOUT: %e.patt.loc6_26.1: @Feed.%pattern_type (%pattern_type.aed) = at_binding_pattern e, %e.param_patt.loc6_26.1 [symbolic = %e.patt.loc6_26.2 (constants.%e.patt.543)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_13: type = splice_block %Eats.ref [concrete = constants.%Eats.type] { +// CHECK:STDOUT: %.loc6_12: type = splice_block %Eats.ref [concrete = constants.%Eats.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_10.2: %Eats.type = symbolic_binding T, 0 [symbolic = %T.loc6_10.1 (constants.%T)] -// CHECK:STDOUT: %e.param: @Feed.%T.as_type.loc6_29.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc6_29.1: type = splice_block %.loc6_29.2 [symbolic = %T.as_type.loc6_29.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %e.param: @Feed.%T.as_type.loc6_28.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc6_28.1: type = splice_block %.loc6_28.2 [symbolic = %T.as_type.loc6_28.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %Eats.type = name_ref T, %T.loc6_10.2 [symbolic = %T.loc6_10.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_29.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_29.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_29.2: type = converted %T.ref, %T.as_type.loc6_29.2 [symbolic = %T.as_type.loc6_29.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_28.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_28.2: type = converted %T.ref, %T.as_type.loc6_28.2 [symbolic = %T.as_type.loc6_28.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %e: @Feed.%T.as_type.loc6_29.1 (%T.as_type) = wrapper_binding e, %e.param +// CHECK:STDOUT: %e: @Feed.%T.as_type.loc6_28.1 (%T.as_type) = wrapper_binding e, %e.param // CHECK:STDOUT: } // CHECK:STDOUT: %HandleAnimal.decl: %HandleAnimal.type = fn_decl @HandleAnimal [concrete = constants.%HandleAnimal] { // CHECK:STDOUT: %U.patt.loc8_18.1: %pattern_type.018 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc8_18.2 (constants.%U.patt)] -// CHECK:STDOUT: %a.param_patt.loc8_37.1: @HandleAnimal.%pattern_type (%pattern_type.c56) = value_param_pattern [symbolic = %a.param_patt.loc8_37.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc8_37.1: @HandleAnimal.%pattern_type (%pattern_type.c56) = at_binding_pattern a, %a.param_patt.loc8_37.1 [symbolic = %a.patt.loc8_37.2 (constants.%a.patt)] +// CHECK:STDOUT: %a.param_patt.loc8_36.1: @HandleAnimal.%pattern_type (%pattern_type.c56) = value_param_pattern [symbolic = %a.param_patt.loc8_36.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc8_36.1: @HandleAnimal.%pattern_type (%pattern_type.c56) = at_binding_pattern a, %a.param_patt.loc8_36.1 [symbolic = %a.patt.loc8_36.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %.loc8_27.1: type = splice_block %.loc8_27.3 [concrete = constants.%facet_type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: %impl.elem0: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %Animal.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%Animal.ref, %Eats.ref) [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc8_28.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc8_28.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc8_28.2 [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc8_27.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc8_27.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc8_27.2 [concrete = constants.%facet_type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc8_18.2: %facet_type = symbolic_binding U, 0 [symbolic = %U.loc8_18.1 (constants.%U)] -// CHECK:STDOUT: %a.param: @HandleAnimal.%U.as_type.loc8_39.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc8_39.1: type = splice_block %.loc8_39.2 [symbolic = %U.as_type.loc8_39.1 (constants.%U.as_type)] { +// CHECK:STDOUT: %a.param: @HandleAnimal.%U.as_type.loc8_38.1 (%U.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc8_38.1: type = splice_block %.loc8_38.2 [symbolic = %U.as_type.loc8_38.1 (constants.%U.as_type)] { // CHECK:STDOUT: %U.ref: %facet_type = name_ref U, %U.loc8_18.2 [symbolic = %U.loc8_18.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc8_39.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc8_39.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc8_39.2: type = converted %U.ref, %U.as_type.loc8_39.2 [symbolic = %U.as_type.loc8_39.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.as_type.loc8_38.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc8_38.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc8_38.2: type = converted %U.ref, %U.as_type.loc8_38.2 [symbolic = %U.as_type.loc8_38.1 (constants.%U.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @HandleAnimal.%U.as_type.loc8_39.1 (%U.as_type) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @HandleAnimal.%U.as_type.loc8_38.1 (%U.as_type) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -232,15 +232,15 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: generic fn @Feed(%T.loc6_10.2: %Eats.type) { // CHECK:STDOUT: %T.patt.loc6_10.2: %pattern_type.880 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_10.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_10.1: %Eats.type = symbolic_binding T, 0 [symbolic = %T.loc6_10.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_29.1: type = facet_access_type %T.loc6_10.1 [symbolic = %T.as_type.loc6_29.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_29.1 [symbolic = %pattern_type (constants.%pattern_type.aed)] -// CHECK:STDOUT: %e.param_patt.loc6_27.2: @Feed.%pattern_type (%pattern_type.aed) = value_param_pattern [symbolic = %e.param_patt.loc6_27.2 (constants.%e.param_patt.0be)] -// CHECK:STDOUT: %e.patt.loc6_27.2: @Feed.%pattern_type (%pattern_type.aed) = at_binding_pattern e, %e.param_patt.loc6_27.2 [symbolic = %e.patt.loc6_27.2 (constants.%e.patt.543)] +// CHECK:STDOUT: %T.as_type.loc6_28.1: type = facet_access_type %T.loc6_10.1 [symbolic = %T.as_type.loc6_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_28.1 [symbolic = %pattern_type (constants.%pattern_type.aed)] +// CHECK:STDOUT: %e.param_patt.loc6_26.2: @Feed.%pattern_type (%pattern_type.aed) = value_param_pattern [symbolic = %e.param_patt.loc6_26.2 (constants.%e.param_patt.0be)] +// CHECK:STDOUT: %e.patt.loc6_26.2: @Feed.%pattern_type (%pattern_type.aed) = at_binding_pattern e, %e.param_patt.loc6_26.2 [symbolic = %e.patt.loc6_26.2 (constants.%e.patt.543)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_29.1 [symbolic = %require_complete (constants.%require_complete.c4d)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_28.1 [symbolic = %require_complete (constants.%require_complete.c4d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%e.param: @Feed.%T.as_type.loc6_29.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%e.param: @Feed.%T.as_type.loc6_28.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -251,27 +251,27 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: generic fn @HandleAnimal(%U.loc8_18.2: %facet_type) { // CHECK:STDOUT: %U.patt.loc8_18.2: %pattern_type.018 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc8_18.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc8_18.1: %facet_type = symbolic_binding U, 0 [symbolic = %U.loc8_18.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc8_39.1: type = facet_access_type %U.loc8_18.1 [symbolic = %U.as_type.loc8_39.1 (constants.%U.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc8_39.1 [symbolic = %pattern_type (constants.%pattern_type.c56)] -// CHECK:STDOUT: %a.param_patt.loc8_37.2: @HandleAnimal.%pattern_type (%pattern_type.c56) = value_param_pattern [symbolic = %a.param_patt.loc8_37.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc8_37.2: @HandleAnimal.%pattern_type (%pattern_type.c56) = at_binding_pattern a, %a.param_patt.loc8_37.2 [symbolic = %a.patt.loc8_37.2 (constants.%a.patt)] +// CHECK:STDOUT: %U.as_type.loc8_38.1: type = facet_access_type %U.loc8_18.1 [symbolic = %U.as_type.loc8_38.1 (constants.%U.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc8_38.1 [symbolic = %pattern_type (constants.%pattern_type.c56)] +// CHECK:STDOUT: %a.param_patt.loc8_36.2: @HandleAnimal.%pattern_type (%pattern_type.c56) = value_param_pattern [symbolic = %a.param_patt.loc8_36.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc8_36.2: @HandleAnimal.%pattern_type (%pattern_type.c56) = at_binding_pattern a, %a.param_patt.loc8_36.2 [symbolic = %a.patt.loc8_36.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc8_39.1 [symbolic = %require_complete (constants.%require_complete.ad2)] +// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc8_38.1 [symbolic = %require_complete (constants.%require_complete.ad2)] // CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %U.loc8_18.1, @Eats [symbolic = %Eats.lookup_impl_witness (constants.%Eats.lookup_impl_witness)] -// CHECK:STDOUT: %Eats.facet.loc8_50.3: %Eats.type = facet_value %U.as_type.loc8_39.1, (%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] -// CHECK:STDOUT: %Feed.specific_fn.loc8_44.2: = specific_function constants.%Feed, @Feed(%Eats.facet.loc8_50.3) [symbolic = %Feed.specific_fn.loc8_44.2 (constants.%Feed.specific_fn)] +// CHECK:STDOUT: %Eats.facet.loc8_49.3: %Eats.type = facet_value %U.as_type.loc8_38.1, (%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc8_49.3 (constants.%Eats.facet)] +// CHECK:STDOUT: %Feed.specific_fn.loc8_43.2: = specific_function constants.%Feed, @Feed(%Eats.facet.loc8_49.3) [symbolic = %Feed.specific_fn.loc8_43.2 (constants.%Feed.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @HandleAnimal.%U.as_type.loc8_39.1 (%U.as_type)) { +// CHECK:STDOUT: fn(%a.param: @HandleAnimal.%U.as_type.loc8_38.1 (%U.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Feed.ref: %Feed.type = name_ref Feed, file.%Feed.decl [concrete = constants.%Feed] -// CHECK:STDOUT: %a.ref: @HandleAnimal.%U.as_type.loc8_39.1 (%U.as_type) = name_ref a, %a -// CHECK:STDOUT: %Eats.facet.loc8_50.1: %Eats.type = facet_value constants.%U.as_type, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] -// CHECK:STDOUT: %.loc8_50.1: %Eats.type = converted constants.%U.as_type, %Eats.facet.loc8_50.1 [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] -// CHECK:STDOUT: %Eats.facet.loc8_50.2: %Eats.type = facet_value constants.%U.as_type, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] -// CHECK:STDOUT: %.loc8_50.2: %Eats.type = converted constants.%U.as_type, %Eats.facet.loc8_50.2 [symbolic = %Eats.facet.loc8_50.3 (constants.%Eats.facet)] -// CHECK:STDOUT: %Feed.specific_fn.loc8_44.1: = specific_function %Feed.ref, @Feed(constants.%Eats.facet) [symbolic = %Feed.specific_fn.loc8_44.2 (constants.%Feed.specific_fn)] -// CHECK:STDOUT: %Feed.call: init %empty_tuple.type = call %Feed.specific_fn.loc8_44.1(%a.ref) +// CHECK:STDOUT: %a.ref: @HandleAnimal.%U.as_type.loc8_38.1 (%U.as_type) = name_ref a, %a +// CHECK:STDOUT: %Eats.facet.loc8_49.1: %Eats.type = facet_value constants.%U.as_type, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc8_49.3 (constants.%Eats.facet)] +// CHECK:STDOUT: %.loc8_49.1: %Eats.type = converted constants.%U.as_type, %Eats.facet.loc8_49.1 [symbolic = %Eats.facet.loc8_49.3 (constants.%Eats.facet)] +// CHECK:STDOUT: %Eats.facet.loc8_49.2: %Eats.type = facet_value constants.%U.as_type, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc8_49.3 (constants.%Eats.facet)] +// CHECK:STDOUT: %.loc8_49.2: %Eats.type = converted constants.%U.as_type, %Eats.facet.loc8_49.2 [symbolic = %Eats.facet.loc8_49.3 (constants.%Eats.facet)] +// CHECK:STDOUT: %Feed.specific_fn.loc8_43.1: = specific_function %Feed.ref, @Feed(constants.%Eats.facet) [symbolic = %Feed.specific_fn.loc8_43.2 (constants.%Feed.specific_fn)] +// CHECK:STDOUT: %Feed.call: init %empty_tuple.type = call %Feed.specific_fn.loc8_43.1(%a.ref) // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -289,28 +289,28 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @Feed(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_10.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_10.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc6_29.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc6_28.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.aed -// CHECK:STDOUT: %e.param_patt.loc6_27.2 => constants.%e.param_patt.0be -// CHECK:STDOUT: %e.patt.loc6_27.2 => constants.%e.patt.543 +// CHECK:STDOUT: %e.param_patt.loc6_26.2 => constants.%e.param_patt.0be +// CHECK:STDOUT: %e.patt.loc6_26.2 => constants.%e.patt.543 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%U) { // CHECK:STDOUT: %U.patt.loc8_18.2 => constants.%U.patt // CHECK:STDOUT: %U.loc8_18.1 => constants.%U -// CHECK:STDOUT: %U.as_type.loc8_39.1 => constants.%U.as_type +// CHECK:STDOUT: %U.as_type.loc8_38.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c56 -// CHECK:STDOUT: %a.param_patt.loc8_37.2 => constants.%a.param_patt -// CHECK:STDOUT: %a.patt.loc8_37.2 => constants.%a.patt +// CHECK:STDOUT: %a.param_patt.loc8_36.2 => constants.%a.param_patt +// CHECK:STDOUT: %a.patt.loc8_36.2 => constants.%a.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Feed(constants.%Eats.facet) { // CHECK:STDOUT: %T.patt.loc6_10.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_10.1 => constants.%Eats.facet -// CHECK:STDOUT: %T.as_type.loc6_29.1 => constants.%U.as_type +// CHECK:STDOUT: %T.as_type.loc6_28.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c56 -// CHECK:STDOUT: %e.param_patt.loc6_27.2 => constants.%e.param_patt.80a -// CHECK:STDOUT: %e.patt.loc6_27.2 => constants.%e.patt.3cb +// CHECK:STDOUT: %e.param_patt.loc6_26.2 => constants.%e.param_patt.80a +// CHECK:STDOUT: %e.patt.loc6_26.2 => constants.%e.patt.3cb // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ad2 @@ -397,57 +397,57 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Tame.decl: type = interface_decl @Tame [concrete = constants.%Tame.type] {} {} // CHECK:STDOUT: %FeedTame.decl: %FeedTame.type = fn_decl @FeedTame [concrete = constants.%FeedTame] { // CHECK:STDOUT: %V.patt.loc7_14.1: %pattern_type.fbb = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc7_14.2 (constants.%V.patt)] -// CHECK:STDOUT: %v.param_patt.loc7_38.1: @FeedTame.%pattern_type (%pattern_type.7b2) = value_param_pattern [symbolic = %v.param_patt.loc7_38.2 (constants.%v.param_patt.bb4)] -// CHECK:STDOUT: %v.patt.loc7_38.1: @FeedTame.%pattern_type (%pattern_type.7b2) = at_binding_pattern v, %v.param_patt.loc7_38.1 [symbolic = %v.patt.loc7_38.2 (constants.%v.patt.d6a)] +// CHECK:STDOUT: %v.param_patt.loc7_37.1: @FeedTame.%pattern_type (%pattern_type.7b2) = value_param_pattern [symbolic = %v.param_patt.loc7_37.2 (constants.%v.param_patt.bb4)] +// CHECK:STDOUT: %v.patt.loc7_37.1: @FeedTame.%pattern_type (%pattern_type.7b2) = at_binding_pattern v, %v.param_patt.loc7_37.1 [symbolic = %v.patt.loc7_37.2 (constants.%v.patt.d6a)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_22.1: type = splice_block %.loc7_22.3 [concrete = constants.%facet_type.bbb] { +// CHECK:STDOUT: %.loc7_21.1: type = splice_block %.loc7_21.3 [concrete = constants.%facet_type.bbb] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: %impl.elem0: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %Tame.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.73d] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%Tame.ref, %Eats.ref) [concrete = constants.%facet_type.bbb] -// CHECK:STDOUT: %.loc7_22.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.bbb] -// CHECK:STDOUT: %.loc7_22.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc7_22.2 [concrete = constants.%facet_type.bbb] +// CHECK:STDOUT: %.loc7_21.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.bbb] +// CHECK:STDOUT: %.loc7_21.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc7_21.2 [concrete = constants.%facet_type.bbb] // CHECK:STDOUT: } // CHECK:STDOUT: %V.loc7_14.2: %facet_type.bbb = symbolic_binding V, 0 [symbolic = %V.loc7_14.1 (constants.%V)] -// CHECK:STDOUT: %v.param: @FeedTame.%V.as_type.loc7_40.1 (%V.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc7_40.1: type = splice_block %.loc7_40.2 [symbolic = %V.as_type.loc7_40.1 (constants.%V.as_type)] { +// CHECK:STDOUT: %v.param: @FeedTame.%V.as_type.loc7_39.1 (%V.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc7_39.1: type = splice_block %.loc7_39.2 [symbolic = %V.as_type.loc7_39.1 (constants.%V.as_type)] { // CHECK:STDOUT: %V.ref: %facet_type.bbb = name_ref V, %V.loc7_14.2 [symbolic = %V.loc7_14.1 (constants.%V)] -// CHECK:STDOUT: %V.as_type.loc7_40.2: type = facet_access_type %V.ref [symbolic = %V.as_type.loc7_40.1 (constants.%V.as_type)] -// CHECK:STDOUT: %.loc7_40.2: type = converted %V.ref, %V.as_type.loc7_40.2 [symbolic = %V.as_type.loc7_40.1 (constants.%V.as_type)] +// CHECK:STDOUT: %V.as_type.loc7_39.2: type = facet_access_type %V.ref [symbolic = %V.as_type.loc7_39.1 (constants.%V.as_type)] +// CHECK:STDOUT: %.loc7_39.2: type = converted %V.ref, %V.as_type.loc7_39.2 [symbolic = %V.as_type.loc7_39.1 (constants.%V.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: @FeedTame.%V.as_type.loc7_40.1 (%V.as_type) = wrapper_binding v, %v.param +// CHECK:STDOUT: %v: @FeedTame.%V.as_type.loc7_39.1 (%V.as_type) = wrapper_binding v, %v.param // CHECK:STDOUT: } // CHECK:STDOUT: %HandleTameAnimal.decl: %HandleTameAnimal.type = fn_decl @HandleTameAnimal [concrete = constants.%HandleTameAnimal] { // CHECK:STDOUT: %W.patt.loc9_22.1: %pattern_type.66f = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc9_22.2 (constants.%W.patt)] -// CHECK:STDOUT: %w.param_patt.loc9_48.1: @HandleTameAnimal.%pattern_type (%pattern_type.b23) = value_param_pattern [symbolic = %w.param_patt.loc9_48.2 (constants.%w.param_patt)] -// CHECK:STDOUT: %w.patt.loc9_48.1: @HandleTameAnimal.%pattern_type (%pattern_type.b23) = at_binding_pattern w, %w.param_patt.loc9_48.1 [symbolic = %w.patt.loc9_48.2 (constants.%w.patt)] +// CHECK:STDOUT: %w.param_patt.loc9_47.1: @HandleTameAnimal.%pattern_type (%pattern_type.b23) = value_param_pattern [symbolic = %w.param_patt.loc9_47.2 (constants.%w.param_patt)] +// CHECK:STDOUT: %w.patt.loc9_47.1: @HandleTameAnimal.%pattern_type (%pattern_type.b23) = at_binding_pattern w, %w.param_patt.loc9_47.1 [symbolic = %w.patt.loc9_47.2 (constants.%w.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_39.1: type = splice_block %.loc9_39.3 [concrete = constants.%facet_type.dd5] { +// CHECK:STDOUT: %.loc9_38.1: type = splice_block %.loc9_38.3 [concrete = constants.%facet_type.dd5] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] -// CHECK:STDOUT: %impl.elem0.loc9_30: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method.loc9_30: = bound_method %Eats.ref, %impl.elem0.loc9_30 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.93f] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc9_30: init type = call %bound_method.loc9_30(%Eats.ref, %Animal.ref) [concrete = constants.%facet_type.0b4] +// CHECK:STDOUT: %impl.elem0.loc9_29: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %bound_method.loc9_29: = bound_method %Eats.ref, %impl.elem0.loc9_29 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.93f] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc9_29: init type = call %bound_method.loc9_29(%Eats.ref, %Animal.ref) [concrete = constants.%facet_type.0b4] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] -// CHECK:STDOUT: %impl.elem0.loc9_39: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method.loc9_39: = bound_method %type.as.BitAndWith.impl.Op.call.loc9_30, %impl.elem0.loc9_39 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.07c] -// CHECK:STDOUT: %.loc9_30.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc9_30 [concrete = constants.%facet_type.0b4] -// CHECK:STDOUT: %.loc9_30.2: type = converted %type.as.BitAndWith.impl.Op.call.loc9_30, %.loc9_30.1 [concrete = constants.%facet_type.0b4] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc9_39: init type = call %bound_method.loc9_39(%.loc9_30.2, %Tame.ref) [concrete = constants.%facet_type.dd5] -// CHECK:STDOUT: %.loc9_39.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc9_39 [concrete = constants.%facet_type.dd5] -// CHECK:STDOUT: %.loc9_39.3: type = converted %type.as.BitAndWith.impl.Op.call.loc9_39, %.loc9_39.2 [concrete = constants.%facet_type.dd5] +// CHECK:STDOUT: %impl.elem0.loc9_38: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %bound_method.loc9_38: = bound_method %type.as.BitAndWith.impl.Op.call.loc9_29, %impl.elem0.loc9_38 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.07c] +// CHECK:STDOUT: %.loc9_29.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc9_29 [concrete = constants.%facet_type.0b4] +// CHECK:STDOUT: %.loc9_29.2: type = converted %type.as.BitAndWith.impl.Op.call.loc9_29, %.loc9_29.1 [concrete = constants.%facet_type.0b4] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc9_38: init type = call %bound_method.loc9_38(%.loc9_29.2, %Tame.ref) [concrete = constants.%facet_type.dd5] +// CHECK:STDOUT: %.loc9_38.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc9_38 [concrete = constants.%facet_type.dd5] +// CHECK:STDOUT: %.loc9_38.3: type = converted %type.as.BitAndWith.impl.Op.call.loc9_38, %.loc9_38.2 [concrete = constants.%facet_type.dd5] // CHECK:STDOUT: } // CHECK:STDOUT: %W.loc9_22.2: %facet_type.dd5 = symbolic_binding W, 0 [symbolic = %W.loc9_22.1 (constants.%W)] -// CHECK:STDOUT: %w.param: @HandleTameAnimal.%W.as_type.loc9_50.1 (%W.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc9_50.1: type = splice_block %.loc9_50.2 [symbolic = %W.as_type.loc9_50.1 (constants.%W.as_type)] { +// CHECK:STDOUT: %w.param: @HandleTameAnimal.%W.as_type.loc9_49.1 (%W.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc9_49.1: type = splice_block %.loc9_49.2 [symbolic = %W.as_type.loc9_49.1 (constants.%W.as_type)] { // CHECK:STDOUT: %W.ref: %facet_type.dd5 = name_ref W, %W.loc9_22.2 [symbolic = %W.loc9_22.1 (constants.%W)] -// CHECK:STDOUT: %W.as_type.loc9_50.2: type = facet_access_type %W.ref [symbolic = %W.as_type.loc9_50.1 (constants.%W.as_type)] -// CHECK:STDOUT: %.loc9_50.2: type = converted %W.ref, %W.as_type.loc9_50.2 [symbolic = %W.as_type.loc9_50.1 (constants.%W.as_type)] +// CHECK:STDOUT: %W.as_type.loc9_49.2: type = facet_access_type %W.ref [symbolic = %W.as_type.loc9_49.1 (constants.%W.as_type)] +// CHECK:STDOUT: %.loc9_49.2: type = converted %W.ref, %W.as_type.loc9_49.2 [symbolic = %W.as_type.loc9_49.1 (constants.%W.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %w: @HandleTameAnimal.%W.as_type.loc9_50.1 (%W.as_type) = wrapper_binding w, %w.param +// CHECK:STDOUT: %w: @HandleTameAnimal.%W.as_type.loc9_49.1 (%W.as_type) = wrapper_binding w, %w.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -493,15 +493,15 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: generic fn @FeedTame(%V.loc7_14.2: %facet_type.bbb) { // CHECK:STDOUT: %V.patt.loc7_14.2: %pattern_type.fbb = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc7_14.2 (constants.%V.patt)] // CHECK:STDOUT: %V.loc7_14.1: %facet_type.bbb = symbolic_binding V, 0 [symbolic = %V.loc7_14.1 (constants.%V)] -// CHECK:STDOUT: %V.as_type.loc7_40.1: type = facet_access_type %V.loc7_14.1 [symbolic = %V.as_type.loc7_40.1 (constants.%V.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %V.as_type.loc7_40.1 [symbolic = %pattern_type (constants.%pattern_type.7b2)] -// CHECK:STDOUT: %v.param_patt.loc7_38.2: @FeedTame.%pattern_type (%pattern_type.7b2) = value_param_pattern [symbolic = %v.param_patt.loc7_38.2 (constants.%v.param_patt.bb4)] -// CHECK:STDOUT: %v.patt.loc7_38.2: @FeedTame.%pattern_type (%pattern_type.7b2) = at_binding_pattern v, %v.param_patt.loc7_38.2 [symbolic = %v.patt.loc7_38.2 (constants.%v.patt.d6a)] +// CHECK:STDOUT: %V.as_type.loc7_39.1: type = facet_access_type %V.loc7_14.1 [symbolic = %V.as_type.loc7_39.1 (constants.%V.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %V.as_type.loc7_39.1 [symbolic = %pattern_type (constants.%pattern_type.7b2)] +// CHECK:STDOUT: %v.param_patt.loc7_37.2: @FeedTame.%pattern_type (%pattern_type.7b2) = value_param_pattern [symbolic = %v.param_patt.loc7_37.2 (constants.%v.param_patt.bb4)] +// CHECK:STDOUT: %v.patt.loc7_37.2: @FeedTame.%pattern_type (%pattern_type.7b2) = at_binding_pattern v, %v.param_patt.loc7_37.2 [symbolic = %v.patt.loc7_37.2 (constants.%v.patt.d6a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %V.as_type.loc7_40.1 [symbolic = %require_complete (constants.%require_complete.08b)] +// CHECK:STDOUT: %require_complete: = require_complete_type %V.as_type.loc7_39.1 [symbolic = %require_complete (constants.%require_complete.08b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%v.param: @FeedTame.%V.as_type.loc7_40.1 (%V.as_type)) { +// CHECK:STDOUT: fn(%v.param: @FeedTame.%V.as_type.loc7_39.1 (%V.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -512,22 +512,22 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: generic fn @HandleTameAnimal(%W.loc9_22.2: %facet_type.dd5) { // CHECK:STDOUT: %W.patt.loc9_22.2: %pattern_type.66f = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc9_22.2 (constants.%W.patt)] // CHECK:STDOUT: %W.loc9_22.1: %facet_type.dd5 = symbolic_binding W, 0 [symbolic = %W.loc9_22.1 (constants.%W)] -// CHECK:STDOUT: %W.as_type.loc9_50.1: type = facet_access_type %W.loc9_22.1 [symbolic = %W.as_type.loc9_50.1 (constants.%W.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %W.as_type.loc9_50.1 [symbolic = %pattern_type (constants.%pattern_type.b23)] -// CHECK:STDOUT: %w.param_patt.loc9_48.2: @HandleTameAnimal.%pattern_type (%pattern_type.b23) = value_param_pattern [symbolic = %w.param_patt.loc9_48.2 (constants.%w.param_patt)] -// CHECK:STDOUT: %w.patt.loc9_48.2: @HandleTameAnimal.%pattern_type (%pattern_type.b23) = at_binding_pattern w, %w.param_patt.loc9_48.2 [symbolic = %w.patt.loc9_48.2 (constants.%w.patt)] +// CHECK:STDOUT: %W.as_type.loc9_49.1: type = facet_access_type %W.loc9_22.1 [symbolic = %W.as_type.loc9_49.1 (constants.%W.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %W.as_type.loc9_49.1 [symbolic = %pattern_type (constants.%pattern_type.b23)] +// CHECK:STDOUT: %w.param_patt.loc9_47.2: @HandleTameAnimal.%pattern_type (%pattern_type.b23) = value_param_pattern [symbolic = %w.param_patt.loc9_47.2 (constants.%w.param_patt)] +// CHECK:STDOUT: %w.patt.loc9_47.2: @HandleTameAnimal.%pattern_type (%pattern_type.b23) = at_binding_pattern w, %w.param_patt.loc9_47.2 [symbolic = %w.patt.loc9_47.2 (constants.%w.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %W.as_type.loc9_50.1 [symbolic = %require_complete (constants.%require_complete.ec1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %W.as_type.loc9_49.1 [symbolic = %require_complete (constants.%require_complete.ec1)] // CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %W.loc9_22.1, @Eats [symbolic = %Eats.lookup_impl_witness (constants.%Eats.lookup_impl_witness)] // CHECK:STDOUT: %Tame.lookup_impl_witness: = lookup_impl_witness %W.loc9_22.1, @Tame [symbolic = %Tame.lookup_impl_witness (constants.%Tame.lookup_impl_witness)] -// CHECK:STDOUT: %facet_value.loc10_13.3: %facet_type.bbb = facet_value %W.as_type.loc9_50.1, (%Eats.lookup_impl_witness, %Tame.lookup_impl_witness) [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] +// CHECK:STDOUT: %facet_value.loc10_13.3: %facet_type.bbb = facet_value %W.as_type.loc9_49.1, (%Eats.lookup_impl_witness, %Tame.lookup_impl_witness) [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] // CHECK:STDOUT: %FeedTame.specific_fn.loc10_3.2: = specific_function constants.%FeedTame, @FeedTame(%facet_value.loc10_13.3) [symbolic = %FeedTame.specific_fn.loc10_3.2 (constants.%FeedTame.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%w.param: @HandleTameAnimal.%W.as_type.loc9_50.1 (%W.as_type)) { +// CHECK:STDOUT: fn(%w.param: @HandleTameAnimal.%W.as_type.loc9_49.1 (%W.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %FeedTame.ref: %FeedTame.type = name_ref FeedTame, file.%FeedTame.decl [concrete = constants.%FeedTame] -// CHECK:STDOUT: %w.ref: @HandleTameAnimal.%W.as_type.loc9_50.1 (%W.as_type) = name_ref w, %w +// CHECK:STDOUT: %w.ref: @HandleTameAnimal.%W.as_type.loc9_49.1 (%W.as_type) = name_ref w, %w // CHECK:STDOUT: %facet_value.loc10_13.1: %facet_type.bbb = facet_value constants.%W.as_type, (constants.%Eats.lookup_impl_witness, constants.%Tame.lookup_impl_witness) [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] // CHECK:STDOUT: %.loc10_13.1: %facet_type.bbb = converted constants.%W.as_type, %facet_value.loc10_13.1 [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] // CHECK:STDOUT: %facet_value.loc10_13.2: %facet_type.bbb = facet_value constants.%W.as_type, (constants.%Eats.lookup_impl_witness, constants.%Tame.lookup_impl_witness) [symbolic = %facet_value.loc10_13.3 (constants.%facet_value)] @@ -555,28 +555,28 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @FeedTame(constants.%V) { // CHECK:STDOUT: %V.patt.loc7_14.2 => constants.%V.patt // CHECK:STDOUT: %V.loc7_14.1 => constants.%V -// CHECK:STDOUT: %V.as_type.loc7_40.1 => constants.%V.as_type +// CHECK:STDOUT: %V.as_type.loc7_39.1 => constants.%V.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7b2 -// CHECK:STDOUT: %v.param_patt.loc7_38.2 => constants.%v.param_patt.bb4 -// CHECK:STDOUT: %v.patt.loc7_38.2 => constants.%v.patt.d6a +// CHECK:STDOUT: %v.param_patt.loc7_37.2 => constants.%v.param_patt.bb4 +// CHECK:STDOUT: %v.patt.loc7_37.2 => constants.%v.patt.d6a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HandleTameAnimal(constants.%W) { // CHECK:STDOUT: %W.patt.loc9_22.2 => constants.%W.patt // CHECK:STDOUT: %W.loc9_22.1 => constants.%W -// CHECK:STDOUT: %W.as_type.loc9_50.1 => constants.%W.as_type +// CHECK:STDOUT: %W.as_type.loc9_49.1 => constants.%W.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b23 -// CHECK:STDOUT: %w.param_patt.loc9_48.2 => constants.%w.param_patt -// CHECK:STDOUT: %w.patt.loc9_48.2 => constants.%w.patt +// CHECK:STDOUT: %w.param_patt.loc9_47.2 => constants.%w.param_patt +// CHECK:STDOUT: %w.patt.loc9_47.2 => constants.%w.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @FeedTame(constants.%facet_value) { // CHECK:STDOUT: %V.patt.loc7_14.2 => constants.%V.patt // CHECK:STDOUT: %V.loc7_14.1 => constants.%facet_value -// CHECK:STDOUT: %V.as_type.loc7_40.1 => constants.%W.as_type +// CHECK:STDOUT: %V.as_type.loc7_39.1 => constants.%W.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b23 -// CHECK:STDOUT: %v.param_patt.loc7_38.2 => constants.%v.param_patt.631 -// CHECK:STDOUT: %v.patt.loc7_38.2 => constants.%v.patt.273 +// CHECK:STDOUT: %v.param_patt.loc7_37.2 => constants.%v.param_patt.631 +// CHECK:STDOUT: %v.patt.loc7_37.2 => constants.%v.patt.273 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ec1 @@ -673,10 +673,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %A.patt.loc7_15.1: %pattern_type.333 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc7_15.2 (constants.%A.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: %Animal.type = name_ref A, %A.loc7_15.1 [symbolic = %A.loc7_15.2 (constants.%A)] -// CHECK:STDOUT: %A.as_type.loc7_26.1: type = facet_access_type %A.ref [symbolic = %A.as_type.loc7_26.2 (constants.%A.as_type)] -// CHECK:STDOUT: %.loc7_26: type = converted %A.ref, %A.as_type.loc7_26.1 [symbolic = %A.as_type.loc7_26.2 (constants.%A.as_type)] +// CHECK:STDOUT: %A.as_type.loc7_25.1: type = facet_access_type %A.ref [symbolic = %A.as_type.loc7_25.2 (constants.%A.as_type)] +// CHECK:STDOUT: %.loc7_25: type = converted %A.ref, %A.as_type.loc7_25.1 [symbolic = %A.as_type.loc7_25.2 (constants.%A.as_type)] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %.loc7_18: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.loc7_17: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } @@ -684,51 +684,51 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %FeedTame2.decl: %FeedTame2.type = fn_decl @FeedTame2 [concrete = constants.%FeedTame2] { // CHECK:STDOUT: %V.patt.loc9_15.1: %pattern_type.fbb = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc9_15.2 (constants.%V.patt)] -// CHECK:STDOUT: %v.param_patt.loc9_39.1: @FeedTame2.%pattern_type (%pattern_type.7b2) = value_param_pattern [symbolic = %v.param_patt.loc9_39.2 (constants.%v.param_patt.bb4)] -// CHECK:STDOUT: %v.patt.loc9_39.1: @FeedTame2.%pattern_type (%pattern_type.7b2) = at_binding_pattern v, %v.param_patt.loc9_39.1 [symbolic = %v.patt.loc9_39.2 (constants.%v.patt.d6a)] +// CHECK:STDOUT: %v.param_patt.loc9_38.1: @FeedTame2.%pattern_type (%pattern_type.7b2) = value_param_pattern [symbolic = %v.param_patt.loc9_38.2 (constants.%v.param_patt.bb4)] +// CHECK:STDOUT: %v.patt.loc9_38.1: @FeedTame2.%pattern_type (%pattern_type.7b2) = at_binding_pattern v, %v.param_patt.loc9_38.1 [symbolic = %v.patt.loc9_38.2 (constants.%v.patt.d6a)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.3 [concrete = constants.%facet_type.bbb] { +// CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.3 [concrete = constants.%facet_type.bbb] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: %impl.elem0: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %Tame.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.73d] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%Tame.ref, %Eats.ref) [concrete = constants.%facet_type.bbb] -// CHECK:STDOUT: %.loc9_23.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.bbb] -// CHECK:STDOUT: %.loc9_23.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc9_23.2 [concrete = constants.%facet_type.bbb] +// CHECK:STDOUT: %.loc9_22.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.bbb] +// CHECK:STDOUT: %.loc9_22.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc9_22.2 [concrete = constants.%facet_type.bbb] // CHECK:STDOUT: } // CHECK:STDOUT: %V.loc9_15.2: %facet_type.bbb = symbolic_binding V, 0 [symbolic = %V.loc9_15.1 (constants.%V)] -// CHECK:STDOUT: %v.param: @FeedTame2.%V.as_type.loc9_41.1 (%V.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc9_41.1: type = splice_block %.loc9_41.2 [symbolic = %V.as_type.loc9_41.1 (constants.%V.as_type)] { +// CHECK:STDOUT: %v.param: @FeedTame2.%V.as_type.loc9_40.1 (%V.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc9_40.1: type = splice_block %.loc9_40.2 [symbolic = %V.as_type.loc9_40.1 (constants.%V.as_type)] { // CHECK:STDOUT: %V.ref: %facet_type.bbb = name_ref V, %V.loc9_15.2 [symbolic = %V.loc9_15.1 (constants.%V)] -// CHECK:STDOUT: %V.as_type.loc9_41.2: type = facet_access_type %V.ref [symbolic = %V.as_type.loc9_41.1 (constants.%V.as_type)] -// CHECK:STDOUT: %.loc9_41.2: type = converted %V.ref, %V.as_type.loc9_41.2 [symbolic = %V.as_type.loc9_41.1 (constants.%V.as_type)] +// CHECK:STDOUT: %V.as_type.loc9_40.2: type = facet_access_type %V.ref [symbolic = %V.as_type.loc9_40.1 (constants.%V.as_type)] +// CHECK:STDOUT: %.loc9_40.2: type = converted %V.ref, %V.as_type.loc9_40.2 [symbolic = %V.as_type.loc9_40.1 (constants.%V.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: @FeedTame2.%V.as_type.loc9_41.1 (%V.as_type) = wrapper_binding v, %v.param +// CHECK:STDOUT: %v: @FeedTame2.%V.as_type.loc9_40.1 (%V.as_type) = wrapper_binding v, %v.param // CHECK:STDOUT: } // CHECK:STDOUT: %HandleTameAnimal2.decl: %HandleTameAnimal2.type = fn_decl @HandleTameAnimal2 [concrete = constants.%HandleTameAnimal2] { // CHECK:STDOUT: %W.patt.loc11_23.1: %pattern_type.82c = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc11_23.2 (constants.%W.patt)] -// CHECK:STDOUT: %w.param_patt.loc11_42.1: @HandleTameAnimal2.%pattern_type (%pattern_type.493) = value_param_pattern [symbolic = %w.param_patt.loc11_42.2 (constants.%w.param_patt)] -// CHECK:STDOUT: %w.patt.loc11_42.1: @HandleTameAnimal2.%pattern_type (%pattern_type.493) = at_binding_pattern w, %w.param_patt.loc11_42.1 [symbolic = %w.patt.loc11_42.2 (constants.%w.patt)] +// CHECK:STDOUT: %w.param_patt.loc11_41.1: @HandleTameAnimal2.%pattern_type (%pattern_type.493) = value_param_pattern [symbolic = %w.param_patt.loc11_41.2 (constants.%w.param_patt)] +// CHECK:STDOUT: %w.patt.loc11_41.1: @HandleTameAnimal2.%pattern_type (%pattern_type.493) = at_binding_pattern w, %w.param_patt.loc11_41.1 [symbolic = %w.patt.loc11_41.2 (constants.%w.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_33.1: type = splice_block %.loc11_33.3 [concrete = constants.%facet_type.83c] { +// CHECK:STDOUT: %.loc11_32.1: type = splice_block %.loc11_32.3 [concrete = constants.%facet_type.83c] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] // CHECK:STDOUT: %impl.elem0: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %Animal.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.f7d] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%Animal.ref, %Tame.ref) [concrete = constants.%facet_type.83c] -// CHECK:STDOUT: %.loc11_33.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.83c] -// CHECK:STDOUT: %.loc11_33.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc11_33.2 [concrete = constants.%facet_type.83c] +// CHECK:STDOUT: %.loc11_32.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.83c] +// CHECK:STDOUT: %.loc11_32.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc11_32.2 [concrete = constants.%facet_type.83c] // CHECK:STDOUT: } // CHECK:STDOUT: %W.loc11_23.2: %facet_type.83c = symbolic_binding W, 0 [symbolic = %W.loc11_23.1 (constants.%W)] -// CHECK:STDOUT: %w.param: @HandleTameAnimal2.%W.as_type.loc11_44.1 (%W.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc11_44.1: type = splice_block %.loc11_44.2 [symbolic = %W.as_type.loc11_44.1 (constants.%W.as_type)] { +// CHECK:STDOUT: %w.param: @HandleTameAnimal2.%W.as_type.loc11_43.1 (%W.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc11_43.1: type = splice_block %.loc11_43.2 [symbolic = %W.as_type.loc11_43.1 (constants.%W.as_type)] { // CHECK:STDOUT: %W.ref: %facet_type.83c = name_ref W, %W.loc11_23.2 [symbolic = %W.loc11_23.1 (constants.%W)] -// CHECK:STDOUT: %W.as_type.loc11_44.2: type = facet_access_type %W.ref [symbolic = %W.as_type.loc11_44.1 (constants.%W.as_type)] -// CHECK:STDOUT: %.loc11_44.2: type = converted %W.ref, %W.as_type.loc11_44.2 [symbolic = %W.as_type.loc11_44.1 (constants.%W.as_type)] +// CHECK:STDOUT: %W.as_type.loc11_43.2: type = facet_access_type %W.ref [symbolic = %W.as_type.loc11_43.1 (constants.%W.as_type)] +// CHECK:STDOUT: %.loc11_43.2: type = converted %W.ref, %W.as_type.loc11_43.2 [symbolic = %W.as_type.loc11_43.1 (constants.%W.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %w: @HandleTameAnimal2.%W.as_type.loc11_44.1 (%W.as_type) = wrapper_binding w, %w.param +// CHECK:STDOUT: %w: @HandleTameAnimal2.%W.as_type.loc11_43.1 (%W.as_type) = wrapper_binding w, %w.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -774,33 +774,33 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: generic impl @A.as_type.as.Eats.impl(%A.loc7_15.1: %Animal.type) { // CHECK:STDOUT: %A.patt.loc7_15.2: %pattern_type.333 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc7_15.2 (constants.%A.patt)] // CHECK:STDOUT: %A.loc7_15.2: %Animal.type = symbolic_binding A, 0 [symbolic = %A.loc7_15.2 (constants.%A)] -// CHECK:STDOUT: %A.as_type.loc7_26.2: type = facet_access_type %A.loc7_15.2 [symbolic = %A.as_type.loc7_26.2 (constants.%A.as_type)] -// CHECK:STDOUT: %Eats.impl_witness.loc7_36.2: = impl_witness %Eats.impl_witness_table, @A.as_type.as.Eats.impl(%A.loc7_15.2) [symbolic = %Eats.impl_witness.loc7_36.2 (constants.%Eats.impl_witness.e08)] +// CHECK:STDOUT: %A.as_type.loc7_25.2: type = facet_access_type %A.loc7_15.2 [symbolic = %A.as_type.loc7_25.2 (constants.%A.as_type)] +// CHECK:STDOUT: %Eats.impl_witness.loc7_35.2: = impl_witness %Eats.impl_witness_table, @A.as_type.as.Eats.impl(%A.loc7_15.2) [symbolic = %Eats.impl_witness.loc7_35.2 (constants.%Eats.impl_witness.e08)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc7_26 as %Eats.ref { +// CHECK:STDOUT: impl: %.loc7_25 as %Eats.ref { // CHECK:STDOUT: %Eats.impl_witness_table = impl_witness_table (), @A.as_type.as.Eats.impl [concrete] -// CHECK:STDOUT: %Eats.impl_witness.loc7_36.1: = impl_witness %Eats.impl_witness_table, @A.as_type.as.Eats.impl(constants.%A) [symbolic = %Eats.impl_witness.loc7_36.2 (constants.%Eats.impl_witness.e08)] +// CHECK:STDOUT: %Eats.impl_witness.loc7_35.1: = impl_witness %Eats.impl_witness_table, @A.as_type.as.Eats.impl(constants.%A) [symbolic = %Eats.impl_witness.loc7_35.2 (constants.%Eats.impl_witness.e08)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %Eats.ref -// CHECK:STDOUT: witness = %Eats.impl_witness.loc7_36.1 +// CHECK:STDOUT: witness = %Eats.impl_witness.loc7_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @FeedTame2(%V.loc9_15.2: %facet_type.bbb) { // CHECK:STDOUT: %V.patt.loc9_15.2: %pattern_type.fbb = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc9_15.2 (constants.%V.patt)] // CHECK:STDOUT: %V.loc9_15.1: %facet_type.bbb = symbolic_binding V, 0 [symbolic = %V.loc9_15.1 (constants.%V)] -// CHECK:STDOUT: %V.as_type.loc9_41.1: type = facet_access_type %V.loc9_15.1 [symbolic = %V.as_type.loc9_41.1 (constants.%V.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %V.as_type.loc9_41.1 [symbolic = %pattern_type (constants.%pattern_type.7b2)] -// CHECK:STDOUT: %v.param_patt.loc9_39.2: @FeedTame2.%pattern_type (%pattern_type.7b2) = value_param_pattern [symbolic = %v.param_patt.loc9_39.2 (constants.%v.param_patt.bb4)] -// CHECK:STDOUT: %v.patt.loc9_39.2: @FeedTame2.%pattern_type (%pattern_type.7b2) = at_binding_pattern v, %v.param_patt.loc9_39.2 [symbolic = %v.patt.loc9_39.2 (constants.%v.patt.d6a)] +// CHECK:STDOUT: %V.as_type.loc9_40.1: type = facet_access_type %V.loc9_15.1 [symbolic = %V.as_type.loc9_40.1 (constants.%V.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %V.as_type.loc9_40.1 [symbolic = %pattern_type (constants.%pattern_type.7b2)] +// CHECK:STDOUT: %v.param_patt.loc9_38.2: @FeedTame2.%pattern_type (%pattern_type.7b2) = value_param_pattern [symbolic = %v.param_patt.loc9_38.2 (constants.%v.param_patt.bb4)] +// CHECK:STDOUT: %v.patt.loc9_38.2: @FeedTame2.%pattern_type (%pattern_type.7b2) = at_binding_pattern v, %v.param_patt.loc9_38.2 [symbolic = %v.patt.loc9_38.2 (constants.%v.patt.d6a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %V.as_type.loc9_41.1 [symbolic = %require_complete (constants.%require_complete.08b)] +// CHECK:STDOUT: %require_complete: = require_complete_type %V.as_type.loc9_40.1 [symbolic = %require_complete (constants.%require_complete.08b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%v.param: @FeedTame2.%V.as_type.loc9_41.1 (%V.as_type)) { +// CHECK:STDOUT: fn(%v.param: @FeedTame2.%V.as_type.loc9_40.1 (%V.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -811,25 +811,25 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: generic fn @HandleTameAnimal2(%W.loc11_23.2: %facet_type.83c) { // CHECK:STDOUT: %W.patt.loc11_23.2: %pattern_type.82c = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc11_23.2 (constants.%W.patt)] // CHECK:STDOUT: %W.loc11_23.1: %facet_type.83c = symbolic_binding W, 0 [symbolic = %W.loc11_23.1 (constants.%W)] -// CHECK:STDOUT: %W.as_type.loc11_44.1: type = facet_access_type %W.loc11_23.1 [symbolic = %W.as_type.loc11_44.1 (constants.%W.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %W.as_type.loc11_44.1 [symbolic = %pattern_type (constants.%pattern_type.493)] -// CHECK:STDOUT: %w.param_patt.loc11_42.2: @HandleTameAnimal2.%pattern_type (%pattern_type.493) = value_param_pattern [symbolic = %w.param_patt.loc11_42.2 (constants.%w.param_patt)] -// CHECK:STDOUT: %w.patt.loc11_42.2: @HandleTameAnimal2.%pattern_type (%pattern_type.493) = at_binding_pattern w, %w.param_patt.loc11_42.2 [symbolic = %w.patt.loc11_42.2 (constants.%w.patt)] +// CHECK:STDOUT: %W.as_type.loc11_43.1: type = facet_access_type %W.loc11_23.1 [symbolic = %W.as_type.loc11_43.1 (constants.%W.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %W.as_type.loc11_43.1 [symbolic = %pattern_type (constants.%pattern_type.493)] +// CHECK:STDOUT: %w.param_patt.loc11_41.2: @HandleTameAnimal2.%pattern_type (%pattern_type.493) = value_param_pattern [symbolic = %w.param_patt.loc11_41.2 (constants.%w.param_patt)] +// CHECK:STDOUT: %w.patt.loc11_41.2: @HandleTameAnimal2.%pattern_type (%pattern_type.493) = at_binding_pattern w, %w.param_patt.loc11_41.2 [symbolic = %w.patt.loc11_41.2 (constants.%w.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %W.as_type.loc11_44.1 [symbolic = %require_complete (constants.%require_complete.837)] +// CHECK:STDOUT: %require_complete: = require_complete_type %W.as_type.loc11_43.1 [symbolic = %require_complete (constants.%require_complete.837)] // CHECK:STDOUT: %Animal.lookup_impl_witness: = lookup_impl_witness %W.loc11_23.1, @Animal [symbolic = %Animal.lookup_impl_witness (constants.%Animal.lookup_impl_witness)] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %W.as_type.loc11_44.1, (%Animal.lookup_impl_witness) [symbolic = %Animal.facet (constants.%Animal.facet)] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %W.as_type.loc11_43.1, (%Animal.lookup_impl_witness) [symbolic = %Animal.facet (constants.%Animal.facet)] // CHECK:STDOUT: %.loc12_14.3: require_specific_def_type = require_specific_def @A.as_type.as.Eats.impl(%Animal.facet) [symbolic = %.loc12_14.3 (constants.%.86f)] // CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %W.loc11_23.1, @Eats [symbolic = %Eats.lookup_impl_witness (constants.%Eats.lookup_impl_witness)] // CHECK:STDOUT: %Tame.lookup_impl_witness: = lookup_impl_witness %W.loc11_23.1, @Tame [symbolic = %Tame.lookup_impl_witness (constants.%Tame.lookup_impl_witness)] -// CHECK:STDOUT: %facet_value.loc12_14.3: %facet_type.bbb = facet_value %W.as_type.loc11_44.1, (%Eats.lookup_impl_witness, %Tame.lookup_impl_witness) [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] +// CHECK:STDOUT: %facet_value.loc12_14.3: %facet_type.bbb = facet_value %W.as_type.loc11_43.1, (%Eats.lookup_impl_witness, %Tame.lookup_impl_witness) [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] // CHECK:STDOUT: %FeedTame2.specific_fn.loc12_3.2: = specific_function constants.%FeedTame2, @FeedTame2(%facet_value.loc12_14.3) [symbolic = %FeedTame2.specific_fn.loc12_3.2 (constants.%FeedTame2.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%w.param: @HandleTameAnimal2.%W.as_type.loc11_44.1 (%W.as_type)) { +// CHECK:STDOUT: fn(%w.param: @HandleTameAnimal2.%W.as_type.loc11_43.1 (%W.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %FeedTame2.ref: %FeedTame2.type = name_ref FeedTame2, file.%FeedTame2.decl [concrete = constants.%FeedTame2] -// CHECK:STDOUT: %w.ref: @HandleTameAnimal2.%W.as_type.loc11_44.1 (%W.as_type) = name_ref w, %w +// CHECK:STDOUT: %w.ref: @HandleTameAnimal2.%W.as_type.loc11_43.1 (%W.as_type) = name_ref w, %w // CHECK:STDOUT: %facet_value.loc12_14.1: %facet_type.bbb = facet_value constants.%W.as_type, (constants.%Eats.lookup_impl_witness, constants.%Tame.lookup_impl_witness) [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] // CHECK:STDOUT: %.loc12_14.1: %facet_type.bbb = converted constants.%W.as_type, %facet_value.loc12_14.1 [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] // CHECK:STDOUT: %facet_value.loc12_14.2: %facet_type.bbb = facet_value constants.%W.as_type, (constants.%Eats.lookup_impl_witness, constants.%Tame.lookup_impl_witness) [symbolic = %facet_value.loc12_14.3 (constants.%facet_value)] @@ -857,8 +857,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @A.as_type.as.Eats.impl(constants.%A) { // CHECK:STDOUT: %A.patt.loc7_15.2 => constants.%A.patt // CHECK:STDOUT: %A.loc7_15.2 => constants.%A -// CHECK:STDOUT: %A.as_type.loc7_26.2 => constants.%A.as_type -// CHECK:STDOUT: %Eats.impl_witness.loc7_36.2 => constants.%Eats.impl_witness.e08 +// CHECK:STDOUT: %A.as_type.loc7_25.2 => constants.%A.as_type +// CHECK:STDOUT: %Eats.impl_witness.loc7_35.2 => constants.%Eats.impl_witness.e08 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Eats.WithSelf(constants.%Eats.facet) { @@ -868,26 +868,26 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @FeedTame2(constants.%V) { // CHECK:STDOUT: %V.patt.loc9_15.2 => constants.%V.patt // CHECK:STDOUT: %V.loc9_15.1 => constants.%V -// CHECK:STDOUT: %V.as_type.loc9_41.1 => constants.%V.as_type +// CHECK:STDOUT: %V.as_type.loc9_40.1 => constants.%V.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7b2 -// CHECK:STDOUT: %v.param_patt.loc9_39.2 => constants.%v.param_patt.bb4 -// CHECK:STDOUT: %v.patt.loc9_39.2 => constants.%v.patt.d6a +// CHECK:STDOUT: %v.param_patt.loc9_38.2 => constants.%v.param_patt.bb4 +// CHECK:STDOUT: %v.patt.loc9_38.2 => constants.%v.patt.d6a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HandleTameAnimal2(constants.%W) { // CHECK:STDOUT: %W.patt.loc11_23.2 => constants.%W.patt // CHECK:STDOUT: %W.loc11_23.1 => constants.%W -// CHECK:STDOUT: %W.as_type.loc11_44.1 => constants.%W.as_type +// CHECK:STDOUT: %W.as_type.loc11_43.1 => constants.%W.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.493 -// CHECK:STDOUT: %w.param_patt.loc11_42.2 => constants.%w.param_patt -// CHECK:STDOUT: %w.patt.loc11_42.2 => constants.%w.patt +// CHECK:STDOUT: %w.param_patt.loc11_41.2 => constants.%w.param_patt +// CHECK:STDOUT: %w.patt.loc11_41.2 => constants.%w.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.as_type.as.Eats.impl(constants.%Animal.facet) { // CHECK:STDOUT: %A.patt.loc7_15.2 => constants.%A.patt // CHECK:STDOUT: %A.loc7_15.2 => constants.%Animal.facet -// CHECK:STDOUT: %A.as_type.loc7_26.2 => constants.%W.as_type -// CHECK:STDOUT: %Eats.impl_witness.loc7_36.2 => constants.%Eats.impl_witness.7a5 +// CHECK:STDOUT: %A.as_type.loc7_25.2 => constants.%W.as_type +// CHECK:STDOUT: %Eats.impl_witness.loc7_35.2 => constants.%Eats.impl_witness.7a5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -895,10 +895,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @FeedTame2(constants.%facet_value) { // CHECK:STDOUT: %V.patt.loc9_15.2 => constants.%V.patt // CHECK:STDOUT: %V.loc9_15.1 => constants.%facet_value -// CHECK:STDOUT: %V.as_type.loc9_41.1 => constants.%W.as_type +// CHECK:STDOUT: %V.as_type.loc9_40.1 => constants.%W.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.493 -// CHECK:STDOUT: %v.param_patt.loc9_39.2 => constants.%v.param_patt.ef6 -// CHECK:STDOUT: %v.patt.loc9_39.2 => constants.%v.patt.346 +// CHECK:STDOUT: %v.param_patt.loc9_38.2 => constants.%v.param_patt.ef6 +// CHECK:STDOUT: %v.patt.loc9_38.2 => constants.%v.patt.346 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.837 @@ -958,55 +958,55 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {} // CHECK:STDOUT: %TakesA.decl: %TakesA.type = fn_decl @TakesA [concrete = constants.%TakesA] { // CHECK:STDOUT: %T.patt.loc7_12.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_12.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc7_26.1: @TakesA.%pattern_type (%pattern_type.a0e098.1) = value_param_pattern [symbolic = %x.param_patt.loc7_26.2 (constants.%x.param_patt.241db7.1)] -// CHECK:STDOUT: %x.patt.loc7_26.1: @TakesA.%pattern_type (%pattern_type.a0e098.1) = at_binding_pattern x, %x.param_patt.loc7_26.1 [symbolic = %x.patt.loc7_26.2 (constants.%x.patt.19b9f1.1)] +// CHECK:STDOUT: %x.param_patt.loc7_25.1: @TakesA.%pattern_type (%pattern_type.a0e098.1) = value_param_pattern [symbolic = %x.param_patt.loc7_25.2 (constants.%x.param_patt.241db7.1)] +// CHECK:STDOUT: %x.patt.loc7_25.1: @TakesA.%pattern_type (%pattern_type.a0e098.1) = at_binding_pattern x, %x.param_patt.loc7_25.1 [symbolic = %x.patt.loc7_25.2 (constants.%x.patt.19b9f1.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_15: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc7_14: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_12.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_12.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @TakesA.%T.as_type.loc7_28.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc7_28.1: type = splice_block %.loc7_28.2 [symbolic = %T.as_type.loc7_28.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %x.param: @TakesA.%T.as_type.loc7_27.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc7_27.1: type = splice_block %.loc7_27.2 [symbolic = %T.as_type.loc7_27.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc7_12.2 [symbolic = %T.loc7_12.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc7_28.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc7_28.2: type = converted %T.ref, %T.as_type.loc7_28.2 [symbolic = %T.as_type.loc7_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc7_27.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc7_27.2: type = converted %T.ref, %T.as_type.loc7_27.2 [symbolic = %T.as_type.loc7_27.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @TakesA.%T.as_type.loc7_28.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @TakesA.%T.as_type.loc7_27.1 (%T.as_type) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %WithExtraWhere.decl: %WithExtraWhere.type = fn_decl @WithExtraWhere [concrete = constants.%WithExtraWhere] { // CHECK:STDOUT: %U.patt.loc9_20.1: %pattern_type.029 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_20.2 (constants.%U.patt)] -// CHECK:STDOUT: %y.param_patt.loc9_50.1: @WithExtraWhere.%pattern_type (%pattern_type.a0e098.2) = value_param_pattern [symbolic = %y.param_patt.loc9_50.2 (constants.%y.param_patt)] -// CHECK:STDOUT: %y.patt.loc9_50.1: @WithExtraWhere.%pattern_type (%pattern_type.a0e098.2) = at_binding_pattern y, %y.param_patt.loc9_50.1 [symbolic = %y.patt.loc9_50.2 (constants.%y.patt)] +// CHECK:STDOUT: %y.param_patt.loc9_49.1: @WithExtraWhere.%pattern_type (%pattern_type.a0e098.2) = value_param_pattern [symbolic = %y.param_patt.loc9_49.2 (constants.%y.param_patt)] +// CHECK:STDOUT: %y.patt.loc9_49.1: @WithExtraWhere.%pattern_type (%pattern_type.a0e098.2) = at_binding_pattern y, %y.param_patt.loc9_49.1 [symbolic = %y.patt.loc9_49.2 (constants.%y.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_25.1: type = splice_block %.loc9_25.2 [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc9_24.1: type = splice_block %.loc9_24.2 [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen.loc9_20: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %.Self.frozen.loc9_25: %A.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.d4e] +// CHECK:STDOUT: %.Self.frozen.loc9_24: %A.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.d4e] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc9_31.1: %A.type = name_ref .Self, %.Self.frozen.loc9_25 [symbolic_self = constants.%.Self.frozen.d4e] -// CHECK:STDOUT: %.loc9_43: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.Self.as_type.loc9_31.1: type = facet_access_type %.Self.ref.loc9_31.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc9_31.1: type = converted %.Self.ref.loc9_31.1, %.Self.as_type.loc9_31.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %impls.loc9_37.1 = requirement_impls %.loc9_31.1, %.loc9_43 [concrete] +// CHECK:STDOUT: %.Self.ref.loc9_30.1: %A.type = name_ref .Self, %.Self.frozen.loc9_24 [symbolic_self = constants.%.Self.frozen.d4e] +// CHECK:STDOUT: %.loc9_42: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.as_type.loc9_30.1: type = facet_access_type %.Self.ref.loc9_30.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc9_30.1: type = converted %.Self.ref.loc9_30.1, %.Self.as_type.loc9_30.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %impls.loc9_36.1 = requirement_impls %.loc9_30.1, %.loc9_42 [concrete] // CHECK:STDOUT: %.Self: %A.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc9_31.2: %A.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type.loc9_31.2: type = facet_access_type %.Self.ref.loc9_31.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc9_31.2: type = converted %.Self.ref.loc9_31.1, %.Self.as_type.loc9_31.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impls.loc9_37.2 = requirement_impls %.loc9_31.2, %.loc9_43 [concrete] -// CHECK:STDOUT: %.loc9_25.2: type = where_expr [concrete = constants.%A.type] { +// CHECK:STDOUT: %.Self.ref.loc9_30.2: %A.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.as_type.loc9_30.2: type = facet_access_type %.Self.ref.loc9_30.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc9_30.2: type = converted %.Self.ref.loc9_30.1, %.Self.as_type.loc9_30.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impls.loc9_36.2 = requirement_impls %.loc9_30.2, %.loc9_42 [concrete] +// CHECK:STDOUT: %.loc9_24.2: type = where_expr [concrete = constants.%A.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.ref [concrete] -// CHECK:STDOUT: %impls.loc9_37.2 = requirement_impls %.loc9_31.2, %.loc9_43 [concrete] +// CHECK:STDOUT: %impls.loc9_36.2 = requirement_impls %.loc9_30.2, %.loc9_42 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc9_20.2: %A.type = symbolic_binding U, 0 [symbolic = %U.loc9_20.1 (constants.%U)] -// CHECK:STDOUT: %y.param: @WithExtraWhere.%U.as_type.loc9_52.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc9_52.1: type = splice_block %.loc9_52.2 [symbolic = %U.as_type.loc9_52.1 (constants.%U.as_type)] { +// CHECK:STDOUT: %y.param: @WithExtraWhere.%U.as_type.loc9_51.1 (%U.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc9_51.1: type = splice_block %.loc9_51.2 [symbolic = %U.as_type.loc9_51.1 (constants.%U.as_type)] { // CHECK:STDOUT: %U.ref: %A.type = name_ref U, %U.loc9_20.2 [symbolic = %U.loc9_20.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc9_52.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc9_52.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc9_52.2: type = converted %U.ref, %U.as_type.loc9_52.2 [symbolic = %U.as_type.loc9_52.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.as_type.loc9_51.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc9_51.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc9_51.2: type = converted %U.ref, %U.as_type.loc9_51.2 [symbolic = %U.as_type.loc9_51.1 (constants.%U.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %y: @WithExtraWhere.%U.as_type.loc9_52.1 (%U.as_type) = wrapper_binding y, %y.param +// CHECK:STDOUT: %y: @WithExtraWhere.%U.as_type.loc9_51.1 (%U.as_type) = wrapper_binding y, %y.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1026,15 +1026,15 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: generic fn @TakesA(%T.loc7_12.2: %A.type) { // CHECK:STDOUT: %T.patt.loc7_12.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_12.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc7_12.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_12.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc7_28.1: type = facet_access_type %T.loc7_12.1 [symbolic = %T.as_type.loc7_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc7_28.1 [symbolic = %pattern_type (constants.%pattern_type.a0e098.1)] -// CHECK:STDOUT: %x.param_patt.loc7_26.2: @TakesA.%pattern_type (%pattern_type.a0e098.1) = value_param_pattern [symbolic = %x.param_patt.loc7_26.2 (constants.%x.param_patt.241db7.1)] -// CHECK:STDOUT: %x.patt.loc7_26.2: @TakesA.%pattern_type (%pattern_type.a0e098.1) = at_binding_pattern x, %x.param_patt.loc7_26.2 [symbolic = %x.patt.loc7_26.2 (constants.%x.patt.19b9f1.1)] +// CHECK:STDOUT: %T.as_type.loc7_27.1: type = facet_access_type %T.loc7_12.1 [symbolic = %T.as_type.loc7_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc7_27.1 [symbolic = %pattern_type (constants.%pattern_type.a0e098.1)] +// CHECK:STDOUT: %x.param_patt.loc7_25.2: @TakesA.%pattern_type (%pattern_type.a0e098.1) = value_param_pattern [symbolic = %x.param_patt.loc7_25.2 (constants.%x.param_patt.241db7.1)] +// CHECK:STDOUT: %x.patt.loc7_25.2: @TakesA.%pattern_type (%pattern_type.a0e098.1) = at_binding_pattern x, %x.param_patt.loc7_25.2 [symbolic = %x.patt.loc7_25.2 (constants.%x.patt.19b9f1.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc7_28.1 [symbolic = %require_complete (constants.%require_complete.94f9a3.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc7_27.1 [symbolic = %require_complete (constants.%require_complete.94f9a3.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @TakesA.%T.as_type.loc7_28.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%x.param: @TakesA.%T.as_type.loc7_27.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -1045,19 +1045,19 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: generic fn @WithExtraWhere(%U.loc9_20.2: %A.type) { // CHECK:STDOUT: %U.patt.loc9_20.2: %pattern_type.029 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_20.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc9_20.1: %A.type = symbolic_binding U, 0 [symbolic = %U.loc9_20.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc9_52.1: type = facet_access_type %U.loc9_20.1 [symbolic = %U.as_type.loc9_52.1 (constants.%U.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc9_52.1 [symbolic = %pattern_type (constants.%pattern_type.a0e098.2)] -// CHECK:STDOUT: %y.param_patt.loc9_50.2: @WithExtraWhere.%pattern_type (%pattern_type.a0e098.2) = value_param_pattern [symbolic = %y.param_patt.loc9_50.2 (constants.%y.param_patt)] -// CHECK:STDOUT: %y.patt.loc9_50.2: @WithExtraWhere.%pattern_type (%pattern_type.a0e098.2) = at_binding_pattern y, %y.param_patt.loc9_50.2 [symbolic = %y.patt.loc9_50.2 (constants.%y.patt)] +// CHECK:STDOUT: %U.as_type.loc9_51.1: type = facet_access_type %U.loc9_20.1 [symbolic = %U.as_type.loc9_51.1 (constants.%U.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc9_51.1 [symbolic = %pattern_type (constants.%pattern_type.a0e098.2)] +// CHECK:STDOUT: %y.param_patt.loc9_49.2: @WithExtraWhere.%pattern_type (%pattern_type.a0e098.2) = value_param_pattern [symbolic = %y.param_patt.loc9_49.2 (constants.%y.param_patt)] +// CHECK:STDOUT: %y.patt.loc9_49.2: @WithExtraWhere.%pattern_type (%pattern_type.a0e098.2) = at_binding_pattern y, %y.param_patt.loc9_49.2 [symbolic = %y.patt.loc9_49.2 (constants.%y.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc9_52.1 [symbolic = %require_complete (constants.%require_complete.94f9a3.2)] +// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc9_51.1 [symbolic = %require_complete (constants.%require_complete.94f9a3.2)] // CHECK:STDOUT: %TakesA.specific_fn.loc10_3.2: = specific_function constants.%TakesA, @TakesA(%U.loc9_20.1) [symbolic = %TakesA.specific_fn.loc10_3.2 (constants.%TakesA.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%y.param: @WithExtraWhere.%U.as_type.loc9_52.1 (%U.as_type)) { +// CHECK:STDOUT: fn(%y.param: @WithExtraWhere.%U.as_type.loc9_51.1 (%U.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %TakesA.ref: %TakesA.type = name_ref TakesA, file.%TakesA.decl [concrete = constants.%TakesA] -// CHECK:STDOUT: %y.ref: @WithExtraWhere.%U.as_type.loc9_52.1 (%U.as_type) = name_ref y, %y +// CHECK:STDOUT: %y.ref: @WithExtraWhere.%U.as_type.loc9_51.1 (%U.as_type) = name_ref y, %y // CHECK:STDOUT: %.loc10_11.1: %A.type = converted constants.%U.as_type, constants.%U [symbolic = %U.loc9_20.1 (constants.%U)] // CHECK:STDOUT: %.loc10_11.2: %A.type = converted constants.%U.as_type, constants.%U [symbolic = %U.loc9_20.1 (constants.%U)] // CHECK:STDOUT: %TakesA.specific_fn.loc10_3.1: = specific_function %TakesA.ref, @TakesA(constants.%U) [symbolic = %TakesA.specific_fn.loc10_3.2 (constants.%TakesA.specific_fn)] @@ -1075,28 +1075,28 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @TakesA(constants.%T) { // CHECK:STDOUT: %T.patt.loc7_12.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_12.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc7_28.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc7_27.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e098.1 -// CHECK:STDOUT: %x.param_patt.loc7_26.2 => constants.%x.param_patt.241db7.1 -// CHECK:STDOUT: %x.patt.loc7_26.2 => constants.%x.patt.19b9f1.1 +// CHECK:STDOUT: %x.param_patt.loc7_25.2 => constants.%x.param_patt.241db7.1 +// CHECK:STDOUT: %x.patt.loc7_25.2 => constants.%x.patt.19b9f1.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WithExtraWhere(constants.%U) { // CHECK:STDOUT: %U.patt.loc9_20.2 => constants.%U.patt // CHECK:STDOUT: %U.loc9_20.1 => constants.%U -// CHECK:STDOUT: %U.as_type.loc9_52.1 => constants.%U.as_type +// CHECK:STDOUT: %U.as_type.loc9_51.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e098.2 -// CHECK:STDOUT: %y.param_patt.loc9_50.2 => constants.%y.param_patt -// CHECK:STDOUT: %y.patt.loc9_50.2 => constants.%y.patt +// CHECK:STDOUT: %y.param_patt.loc9_49.2 => constants.%y.param_patt +// CHECK:STDOUT: %y.patt.loc9_49.2 => constants.%y.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TakesA(constants.%U) { // CHECK:STDOUT: %T.patt.loc7_12.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_12.1 => constants.%U -// CHECK:STDOUT: %T.as_type.loc7_28.1 => constants.%U.as_type +// CHECK:STDOUT: %T.as_type.loc7_27.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e098.2 -// CHECK:STDOUT: %x.param_patt.loc7_26.2 => constants.%x.param_patt.241db7.2 -// CHECK:STDOUT: %x.patt.loc7_26.2 => constants.%x.patt.19b9f1.2 +// CHECK:STDOUT: %x.param_patt.loc7_25.2 => constants.%x.param_patt.241db7.2 +// CHECK:STDOUT: %x.patt.loc7_25.2 => constants.%x.patt.19b9f1.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.94f9a3.2 @@ -1159,12 +1159,12 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %TakesTypeDeduced.decl: %TakesTypeDeduced.type = fn_decl @TakesTypeDeduced [concrete = constants.%TakesTypeDeduced] { // CHECK:STDOUT: %T.patt.loc3_22.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_22.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc3_39.1: @TakesTypeDeduced.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc3_39.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc3_39.1: @TakesTypeDeduced.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc3_39.1 [symbolic = %x.patt.loc3_39.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %x.param_patt.loc3_38.1: @TakesTypeDeduced.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc3_38.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc3_38.1: @TakesTypeDeduced.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc3_38.1 [symbolic = %x.patt.loc3_38.2 (constants.%x.patt.800)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_25.1: type = splice_block %.loc3_25.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_24.1: type = splice_block %.loc3_24.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_25.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_24.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc3_22.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_22.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %x.param: @TakesTypeDeduced.%T.loc3_22.1 (%T.67db0b.1) = value_param call_param0 @@ -1173,71 +1173,71 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %CallsWithExtraWhere.decl: %CallsWithExtraWhere.type = fn_decl @CallsWithExtraWhere [concrete = constants.%CallsWithExtraWhere] { // CHECK:STDOUT: %U.patt.loc4_25.1: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc4_25.2 (constants.%U.patt)] -// CHECK:STDOUT: %y.param_patt.loc4_58.1: @CallsWithExtraWhere.%pattern_type (%pattern_type.86a) = value_param_pattern [symbolic = %y.param_patt.loc4_58.2 (constants.%y.param_patt)] -// CHECK:STDOUT: %y.patt.loc4_58.1: @CallsWithExtraWhere.%pattern_type (%pattern_type.86a) = at_binding_pattern y, %y.param_patt.loc4_58.1 [symbolic = %y.patt.loc4_58.2 (constants.%y.patt)] +// CHECK:STDOUT: %y.param_patt.loc4_57.1: @CallsWithExtraWhere.%pattern_type (%pattern_type.86a) = value_param_pattern [symbolic = %y.param_patt.loc4_57.2 (constants.%y.param_patt)] +// CHECK:STDOUT: %y.patt.loc4_57.1: @CallsWithExtraWhere.%pattern_type (%pattern_type.86a) = at_binding_pattern y, %y.param_patt.loc4_57.1 [symbolic = %y.patt.loc4_57.2 (constants.%y.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_33.1: type = splice_block %.loc4_33.2 [concrete = constants.%type] { +// CHECK:STDOUT: %.loc4_32.1: type = splice_block %.loc4_32.2 [concrete = constants.%type] { // CHECK:STDOUT: %.Self.frozen.loc4_25: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_28: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.Self.frozen.loc4_33: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc4_28 [concrete] -// CHECK:STDOUT: %.Self.ref.loc4_39.1: %type = name_ref .Self, %.Self.frozen.loc4_33 [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_51: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.Self.as_type.loc4_39.1: type = facet_access_type %.Self.ref.loc4_39.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc4_39.1: type = converted %.Self.ref.loc4_39.1, %.Self.as_type.loc4_39.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %impls.loc4_45.1 = requirement_impls %.loc4_39.1, %.loc4_51 [concrete] +// CHECK:STDOUT: %.loc4_27: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.frozen.loc4_32: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc4_27 [concrete] +// CHECK:STDOUT: %.Self.ref.loc4_38.1: %type = name_ref .Self, %.Self.frozen.loc4_32 [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_50: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.as_type.loc4_38.1: type = facet_access_type %.Self.ref.loc4_38.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc4_38.1: type = converted %.Self.ref.loc4_38.1, %.Self.as_type.loc4_38.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %impls.loc4_44.1 = requirement_impls %.loc4_38.1, %.loc4_50 [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc4_39.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type.loc4_39.2: type = facet_access_type %.Self.ref.loc4_39.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc4_39.2: type = converted %.Self.ref.loc4_39.1, %.Self.as_type.loc4_39.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impls.loc4_45.2 = requirement_impls %.loc4_39.2, %.loc4_51 [concrete] -// CHECK:STDOUT: %.loc4_33.2: type = where_expr [concrete = constants.%type] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc4_28 [concrete] -// CHECK:STDOUT: %impls.loc4_45.2 = requirement_impls %.loc4_39.2, %.loc4_51 [concrete] +// CHECK:STDOUT: %.Self.ref.loc4_38.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.as_type.loc4_38.2: type = facet_access_type %.Self.ref.loc4_38.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc4_38.2: type = converted %.Self.ref.loc4_38.1, %.Self.as_type.loc4_38.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impls.loc4_44.2 = requirement_impls %.loc4_38.2, %.loc4_50 [concrete] +// CHECK:STDOUT: %.loc4_32.2: type = where_expr [concrete = constants.%type] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc4_27 [concrete] +// CHECK:STDOUT: %impls.loc4_44.2 = requirement_impls %.loc4_38.2, %.loc4_50 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc4_25.2: %type = symbolic_binding U, 0 [symbolic = %U.loc4_25.1 (constants.%U)] -// CHECK:STDOUT: %y.param: @CallsWithExtraWhere.%U.as_type.loc4_60.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc4_60.1: type = splice_block %.loc4_60.2 [symbolic = %U.as_type.loc4_60.1 (constants.%U.as_type)] { +// CHECK:STDOUT: %y.param: @CallsWithExtraWhere.%U.as_type.loc4_59.1 (%U.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc4_59.1: type = splice_block %.loc4_59.2 [symbolic = %U.as_type.loc4_59.1 (constants.%U.as_type)] { // CHECK:STDOUT: %U.ref: %type = name_ref U, %U.loc4_25.2 [symbolic = %U.loc4_25.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc4_60.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc4_60.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc4_60.2: type = converted %U.ref, %U.as_type.loc4_60.2 [symbolic = %U.as_type.loc4_60.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.as_type.loc4_59.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc4_59.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc4_59.2: type = converted %U.ref, %U.as_type.loc4_59.2 [symbolic = %U.as_type.loc4_59.1 (constants.%U.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %y: @CallsWithExtraWhere.%U.as_type.loc4_60.1 (%U.as_type) = wrapper_binding y, %y.param +// CHECK:STDOUT: %y: @CallsWithExtraWhere.%U.as_type.loc4_59.1 (%U.as_type) = wrapper_binding y, %y.param // CHECK:STDOUT: } // CHECK:STDOUT: %TakesTypeExplicit.decl: %TakesTypeExplicit.type = fn_decl @TakesTypeExplicit [concrete = constants.%TakesTypeExplicit] { -// CHECK:STDOUT: %T.patt.loc8_30.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_30.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc8_38.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_38.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_33.1: type = splice_block %.loc8_33.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_40.1: type = splice_block %.loc8_40.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_33.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_40.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_30.3: type = symbolic_binding T, 0 [symbolic = %T.loc8_30.2 (constants.%T.67db0b.2)] +// CHECK:STDOUT: %T.loc8_38.3: type = symbolic_binding T, 0 [symbolic = %T.loc8_38.2 (constants.%T.67db0b.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallsWithExtraWhereExplicit.decl: %CallsWithExtraWhereExplicit.type = fn_decl @CallsWithExtraWhereExplicit [concrete = constants.%CallsWithExtraWhereExplicit] { -// CHECK:STDOUT: %U.patt.loc9_33.1: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_33.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc9_41.1: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_41.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_41.1: type = splice_block %.loc9_41.2 [concrete = constants.%type] { -// CHECK:STDOUT: %.Self.frozen.loc9_33: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_36: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_48.1: type = splice_block %.loc9_48.2 [concrete = constants.%type] { // CHECK:STDOUT: %.Self.frozen.loc9_41: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc9_36 [concrete] -// CHECK:STDOUT: %.Self.ref.loc9_47.1: %type = name_ref .Self, %.Self.frozen.loc9_41 [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_59: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.Self.as_type.loc9_47.1: type = facet_access_type %.Self.ref.loc9_47.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc9_47.1: type = converted %.Self.ref.loc9_47.1, %.Self.as_type.loc9_47.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %impls.loc9_53.1 = requirement_impls %.loc9_47.1, %.loc9_59 [concrete] +// CHECK:STDOUT: %.loc9_43: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.frozen.loc9_48: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc9_43 [concrete] +// CHECK:STDOUT: %.Self.ref.loc9_54.1: %type = name_ref .Self, %.Self.frozen.loc9_48 [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc9_66: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.as_type.loc9_54.1: type = facet_access_type %.Self.ref.loc9_54.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc9_54.1: type = converted %.Self.ref.loc9_54.1, %.Self.as_type.loc9_54.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %impls.loc9_60.1 = requirement_impls %.loc9_54.1, %.loc9_66 [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc9_47.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type.loc9_47.2: type = facet_access_type %.Self.ref.loc9_47.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc9_47.2: type = converted %.Self.ref.loc9_47.1, %.Self.as_type.loc9_47.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impls.loc9_53.2 = requirement_impls %.loc9_47.2, %.loc9_59 [concrete] -// CHECK:STDOUT: %.loc9_41.2: type = where_expr [concrete = constants.%type] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc9_36 [concrete] -// CHECK:STDOUT: %impls.loc9_53.2 = requirement_impls %.loc9_47.2, %.loc9_59 [concrete] +// CHECK:STDOUT: %.Self.ref.loc9_54.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.as_type.loc9_54.2: type = facet_access_type %.Self.ref.loc9_54.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc9_54.2: type = converted %.Self.ref.loc9_54.1, %.Self.as_type.loc9_54.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impls.loc9_60.2 = requirement_impls %.loc9_54.2, %.loc9_66 [concrete] +// CHECK:STDOUT: %.loc9_48.2: type = where_expr [concrete = constants.%type] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc9_43 [concrete] +// CHECK:STDOUT: %impls.loc9_60.2 = requirement_impls %.loc9_54.2, %.loc9_66 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc9_33.2: %type = symbolic_binding U, 0 [symbolic = %U.loc9_33.1 (constants.%U)] +// CHECK:STDOUT: %U.loc9_41.2: %type = symbolic_binding U, 0 [symbolic = %U.loc9_41.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1245,8 +1245,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %T.patt.loc3_22.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_22.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc3_22.1: type = symbolic_binding T, 0 [symbolic = %T.loc3_22.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc3_22.1 [symbolic = %pattern_type (constants.%pattern_type.51d)] -// CHECK:STDOUT: %x.param_patt.loc3_39.2: @TakesTypeDeduced.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc3_39.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc3_39.2: @TakesTypeDeduced.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc3_39.2 [symbolic = %x.patt.loc3_39.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %x.param_patt.loc3_38.2: @TakesTypeDeduced.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc3_38.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc3_38.2: @TakesTypeDeduced.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc3_38.2 [symbolic = %x.patt.loc3_38.2 (constants.%x.patt.800)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc3_22.1 [symbolic = %require_complete (constants.%require_complete.944)] @@ -1262,19 +1262,19 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: generic fn @CallsWithExtraWhere(%U.loc4_25.2: %type) { // CHECK:STDOUT: %U.patt.loc4_25.2: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc4_25.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc4_25.1: %type = symbolic_binding U, 0 [symbolic = %U.loc4_25.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc4_60.1: type = facet_access_type %U.loc4_25.1 [symbolic = %U.as_type.loc4_60.1 (constants.%U.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc4_60.1 [symbolic = %pattern_type (constants.%pattern_type.86a)] -// CHECK:STDOUT: %y.param_patt.loc4_58.2: @CallsWithExtraWhere.%pattern_type (%pattern_type.86a) = value_param_pattern [symbolic = %y.param_patt.loc4_58.2 (constants.%y.param_patt)] -// CHECK:STDOUT: %y.patt.loc4_58.2: @CallsWithExtraWhere.%pattern_type (%pattern_type.86a) = at_binding_pattern y, %y.param_patt.loc4_58.2 [symbolic = %y.patt.loc4_58.2 (constants.%y.patt)] +// CHECK:STDOUT: %U.as_type.loc4_59.1: type = facet_access_type %U.loc4_25.1 [symbolic = %U.as_type.loc4_59.1 (constants.%U.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc4_59.1 [symbolic = %pattern_type (constants.%pattern_type.86a)] +// CHECK:STDOUT: %y.param_patt.loc4_57.2: @CallsWithExtraWhere.%pattern_type (%pattern_type.86a) = value_param_pattern [symbolic = %y.param_patt.loc4_57.2 (constants.%y.param_patt)] +// CHECK:STDOUT: %y.patt.loc4_57.2: @CallsWithExtraWhere.%pattern_type (%pattern_type.86a) = at_binding_pattern y, %y.param_patt.loc4_57.2 [symbolic = %y.patt.loc4_57.2 (constants.%y.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc4_60.1 [symbolic = %require_complete (constants.%require_complete.5ef)] -// CHECK:STDOUT: %TakesTypeDeduced.specific_fn.loc5_3.2: = specific_function constants.%TakesTypeDeduced, @TakesTypeDeduced(%U.as_type.loc4_60.1) [symbolic = %TakesTypeDeduced.specific_fn.loc5_3.2 (constants.%TakesTypeDeduced.specific_fn)] +// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc4_59.1 [symbolic = %require_complete (constants.%require_complete.5ef)] +// CHECK:STDOUT: %TakesTypeDeduced.specific_fn.loc5_3.2: = specific_function constants.%TakesTypeDeduced, @TakesTypeDeduced(%U.as_type.loc4_59.1) [symbolic = %TakesTypeDeduced.specific_fn.loc5_3.2 (constants.%TakesTypeDeduced.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%y.param: @CallsWithExtraWhere.%U.as_type.loc4_60.1 (%U.as_type)) { +// CHECK:STDOUT: fn(%y.param: @CallsWithExtraWhere.%U.as_type.loc4_59.1 (%U.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %TakesTypeDeduced.ref: %TakesTypeDeduced.type = name_ref TakesTypeDeduced, file.%TakesTypeDeduced.decl [concrete = constants.%TakesTypeDeduced] -// CHECK:STDOUT: %y.ref: @CallsWithExtraWhere.%U.as_type.loc4_60.1 (%U.as_type) = name_ref y, %y +// CHECK:STDOUT: %y.ref: @CallsWithExtraWhere.%U.as_type.loc4_59.1 (%U.as_type) = name_ref y, %y // CHECK:STDOUT: %TakesTypeDeduced.specific_fn.loc5_3.1: = specific_function %TakesTypeDeduced.ref, @TakesTypeDeduced(constants.%U.as_type) [symbolic = %TakesTypeDeduced.specific_fn.loc5_3.2 (constants.%TakesTypeDeduced.specific_fn)] // CHECK:STDOUT: %TakesTypeDeduced.call: init %empty_tuple.type = call %TakesTypeDeduced.specific_fn.loc5_3.1(%y.ref) // CHECK:STDOUT: return @@ -1283,10 +1283,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TakesTypeExplicit(%T.loc8_30.3: type) { -// CHECK:STDOUT: %T.patt.loc8_30.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_30.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_30.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_30.1 (constants.%T.67db0b.1)] -// CHECK:STDOUT: %T.loc8_30.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_30.2 (constants.%T.67db0b.2)] +// CHECK:STDOUT: generic fn @TakesTypeExplicit(%T.loc8_38.3: type) { +// CHECK:STDOUT: %T.patt.loc8_38.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_38.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc8_38.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_38.1 (constants.%T.67db0b.1)] +// CHECK:STDOUT: %T.loc8_38.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_38.2 (constants.%T.67db0b.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1298,18 +1298,18 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallsWithExtraWhereExplicit(%U.loc9_33.2: %type) { -// CHECK:STDOUT: %U.patt.loc9_33.2: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_33.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc9_33.1: %type = symbolic_binding U, 0 [symbolic = %U.loc9_33.1 (constants.%U)] +// CHECK:STDOUT: generic fn @CallsWithExtraWhereExplicit(%U.loc9_41.2: %type) { +// CHECK:STDOUT: %U.patt.loc9_41.2: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_41.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc9_41.1: %type = symbolic_binding U, 0 [symbolic = %U.loc9_41.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %U.as_type.loc10_22.2: type = facet_access_type %U.loc9_33.1 [symbolic = %U.as_type.loc10_22.2 (constants.%U.as_type)] +// CHECK:STDOUT: %U.as_type.loc10_22.2: type = facet_access_type %U.loc9_41.1 [symbolic = %U.as_type.loc10_22.2 (constants.%U.as_type)] // CHECK:STDOUT: %TakesTypeExplicit.specific_fn.loc10_3.2: = specific_function constants.%TakesTypeExplicit, @TakesTypeExplicit(%U.as_type.loc10_22.2) [symbolic = %TakesTypeExplicit.specific_fn.loc10_3.2 (constants.%TakesTypeExplicit.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %TakesTypeExplicit.ref: %TakesTypeExplicit.type = name_ref TakesTypeExplicit, file.%TakesTypeExplicit.decl [concrete = constants.%TakesTypeExplicit] -// CHECK:STDOUT: %U.ref: %type = name_ref U, %U.loc9_33.2 [symbolic = %U.loc9_33.1 (constants.%U)] +// CHECK:STDOUT: %U.ref: %type = name_ref U, %U.loc9_41.2 [symbolic = %U.loc9_41.1 (constants.%U)] // CHECK:STDOUT: %U.as_type.loc10_22.1: type = facet_access_type %U.ref [symbolic = %U.as_type.loc10_22.2 (constants.%U.as_type)] // CHECK:STDOUT: %.loc10: type = converted %U.ref, %U.as_type.loc10_22.1 [symbolic = %U.as_type.loc10_22.2 (constants.%U.as_type)] // CHECK:STDOUT: %TakesTypeExplicit.specific_fn.loc10_3.1: = specific_function %TakesTypeExplicit.ref, @TakesTypeExplicit(constants.%U.as_type) [symbolic = %TakesTypeExplicit.specific_fn.loc10_3.2 (constants.%TakesTypeExplicit.specific_fn)] @@ -1324,45 +1324,45 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %T.patt.loc3_22.2 => constants.%T.patt // CHECK:STDOUT: %T.loc3_22.1 => constants.%T.67db0b.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %x.param_patt.loc3_39.2 => constants.%x.param_patt.91d -// CHECK:STDOUT: %x.patt.loc3_39.2 => constants.%x.patt.800 +// CHECK:STDOUT: %x.param_patt.loc3_38.2 => constants.%x.param_patt.91d +// CHECK:STDOUT: %x.patt.loc3_38.2 => constants.%x.patt.800 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallsWithExtraWhere(constants.%U) { // CHECK:STDOUT: %U.patt.loc4_25.2 => constants.%U.patt // CHECK:STDOUT: %U.loc4_25.1 => constants.%U -// CHECK:STDOUT: %U.as_type.loc4_60.1 => constants.%U.as_type +// CHECK:STDOUT: %U.as_type.loc4_59.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.86a -// CHECK:STDOUT: %y.param_patt.loc4_58.2 => constants.%y.param_patt -// CHECK:STDOUT: %y.patt.loc4_58.2 => constants.%y.patt +// CHECK:STDOUT: %y.param_patt.loc4_57.2 => constants.%y.param_patt +// CHECK:STDOUT: %y.patt.loc4_57.2 => constants.%y.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TakesTypeDeduced(constants.%U.as_type) { // CHECK:STDOUT: %T.patt.loc3_22.2 => constants.%T.patt // CHECK:STDOUT: %T.loc3_22.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.86a -// CHECK:STDOUT: %x.param_patt.loc3_39.2 => constants.%x.param_patt.9a2 -// CHECK:STDOUT: %x.patt.loc3_39.2 => constants.%x.patt.fe1 +// CHECK:STDOUT: %x.param_patt.loc3_38.2 => constants.%x.param_patt.9a2 +// CHECK:STDOUT: %x.patt.loc3_38.2 => constants.%x.patt.fe1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.5ef // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TakesTypeExplicit(constants.%T.67db0b.2) { -// CHECK:STDOUT: %T.patt.loc8_30.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_30.1 => constants.%T.67db0b.2 -// CHECK:STDOUT: %T.loc8_30.2 => constants.%T.67db0b.2 +// CHECK:STDOUT: %T.patt.loc8_38.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_38.1 => constants.%T.67db0b.2 +// CHECK:STDOUT: %T.loc8_38.2 => constants.%T.67db0b.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallsWithExtraWhereExplicit(constants.%U) { -// CHECK:STDOUT: %U.patt.loc9_33.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc9_33.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc9_41.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc9_41.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TakesTypeExplicit(constants.%U.as_type) { -// CHECK:STDOUT: %T.patt.loc8_30.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_30.1 => constants.%U.as_type -// CHECK:STDOUT: %T.loc8_30.2 => constants.%U.as_type +// CHECK:STDOUT: %T.patt.loc8_38.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_38.1 => constants.%U.as_type +// CHECK:STDOUT: %T.loc8_38.2 => constants.%U.as_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -1425,46 +1425,46 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %TakesExtraWhereDeduced.decl: %TakesExtraWhereDeduced.type = fn_decl @TakesExtraWhereDeduced [concrete = constants.%TakesExtraWhereDeduced] { // CHECK:STDOUT: %T.patt.loc3_28.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_28.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc3_68.1: @TakesExtraWhereDeduced.%pattern_type (%pattern_type.86a) = value_param_pattern [symbolic = %x.param_patt.loc3_68.2 (constants.%x.param_patt.9a2)] -// CHECK:STDOUT: %x.patt.loc3_68.1: @TakesExtraWhereDeduced.%pattern_type (%pattern_type.86a) = at_binding_pattern x, %x.param_patt.loc3_68.1 [symbolic = %x.patt.loc3_68.2 (constants.%x.patt.fe1)] +// CHECK:STDOUT: %x.param_patt.loc3_67.1: @TakesExtraWhereDeduced.%pattern_type (%pattern_type.86a) = value_param_pattern [symbolic = %x.param_patt.loc3_67.2 (constants.%x.param_patt.9a2)] +// CHECK:STDOUT: %x.patt.loc3_67.1: @TakesExtraWhereDeduced.%pattern_type (%pattern_type.86a) = at_binding_pattern x, %x.param_patt.loc3_67.1 [symbolic = %x.patt.loc3_67.2 (constants.%x.patt.fe1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_36.1: type = splice_block %.loc3_36.2 [concrete = constants.%type] { +// CHECK:STDOUT: %.loc3_35.1: type = splice_block %.loc3_35.2 [concrete = constants.%type] { // CHECK:STDOUT: %.Self.frozen.loc3_28: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_31: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.Self.frozen.loc3_36: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc3_31 [concrete] -// CHECK:STDOUT: %.Self.ref.loc3_42.1: %type = name_ref .Self, %.Self.frozen.loc3_36 [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_54: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.Self.as_type.loc3_42.1: type = facet_access_type %.Self.ref.loc3_42.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc3_42.1: type = converted %.Self.ref.loc3_42.1, %.Self.as_type.loc3_42.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %impls.loc3_48.1 = requirement_impls %.loc3_42.1, %.loc3_54 [concrete] +// CHECK:STDOUT: %.loc3_30: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.frozen.loc3_35: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc3_30 [concrete] +// CHECK:STDOUT: %.Self.ref.loc3_41.1: %type = name_ref .Self, %.Self.frozen.loc3_35 [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc3_53: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.as_type.loc3_41.1: type = facet_access_type %.Self.ref.loc3_41.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc3_41.1: type = converted %.Self.ref.loc3_41.1, %.Self.as_type.loc3_41.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %impls.loc3_47.1 = requirement_impls %.loc3_41.1, %.loc3_53 [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc3_42.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type.loc3_42.2: type = facet_access_type %.Self.ref.loc3_42.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc3_42.2: type = converted %.Self.ref.loc3_42.1, %.Self.as_type.loc3_42.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impls.loc3_48.2 = requirement_impls %.loc3_42.2, %.loc3_54 [concrete] -// CHECK:STDOUT: %.loc3_36.2: type = where_expr [concrete = constants.%type] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc3_31 [concrete] -// CHECK:STDOUT: %impls.loc3_48.2 = requirement_impls %.loc3_42.2, %.loc3_54 [concrete] +// CHECK:STDOUT: %.Self.ref.loc3_41.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.as_type.loc3_41.2: type = facet_access_type %.Self.ref.loc3_41.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc3_41.2: type = converted %.Self.ref.loc3_41.1, %.Self.as_type.loc3_41.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impls.loc3_47.2 = requirement_impls %.loc3_41.2, %.loc3_53 [concrete] +// CHECK:STDOUT: %.loc3_35.2: type = where_expr [concrete = constants.%type] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc3_30 [concrete] +// CHECK:STDOUT: %impls.loc3_47.2 = requirement_impls %.loc3_41.2, %.loc3_53 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc3_28.2: %type = symbolic_binding T, 0 [symbolic = %T.loc3_28.1 (constants.%T.f45530.1)] -// CHECK:STDOUT: %x.param: @TakesExtraWhereDeduced.%T.as_type.loc3_70.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc3_70.1: type = splice_block %.loc3_70.2 [symbolic = %T.as_type.loc3_70.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %x.param: @TakesExtraWhereDeduced.%T.as_type.loc3_69.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc3_69.1: type = splice_block %.loc3_69.2 [symbolic = %T.as_type.loc3_69.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %type = name_ref T, %T.loc3_28.2 [symbolic = %T.loc3_28.1 (constants.%T.f45530.1)] -// CHECK:STDOUT: %T.as_type.loc3_70.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc3_70.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc3_70.2: type = converted %T.ref, %T.as_type.loc3_70.2 [symbolic = %T.as_type.loc3_70.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc3_69.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc3_69.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc3_69.2: type = converted %T.ref, %T.as_type.loc3_69.2 [symbolic = %T.as_type.loc3_69.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @TakesExtraWhereDeduced.%T.as_type.loc3_70.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @TakesExtraWhereDeduced.%T.as_type.loc3_69.1 (%T.as_type) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallsWithType.decl: %CallsWithType.type = fn_decl @CallsWithType [concrete = constants.%CallsWithType] { // CHECK:STDOUT: %U.patt.loc4_19.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc4_19.2 (constants.%U.patt)] -// CHECK:STDOUT: %y.param_patt.loc4_29.1: @CallsWithType.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %y.param_patt.loc4_29.2 (constants.%y.param_patt)] -// CHECK:STDOUT: %y.patt.loc4_29.1: @CallsWithType.%pattern_type (%pattern_type.51d) = at_binding_pattern y, %y.param_patt.loc4_29.1 [symbolic = %y.patt.loc4_29.2 (constants.%y.patt)] +// CHECK:STDOUT: %y.param_patt.loc4_28.1: @CallsWithType.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %y.param_patt.loc4_28.2 (constants.%y.param_patt)] +// CHECK:STDOUT: %y.patt.loc4_28.1: @CallsWithType.%pattern_type (%pattern_type.51d) = at_binding_pattern y, %y.param_patt.loc4_28.1 [symbolic = %y.patt.loc4_28.2 (constants.%y.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_22.1: type = splice_block %.loc4_22.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_21.1: type = splice_block %.loc4_21.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_22.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_21.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc4_19.2: type = symbolic_binding U, 0 [symbolic = %U.loc4_19.1 (constants.%U)] // CHECK:STDOUT: %y.param: @CallsWithType.%U.loc4_19.1 (%U) = value_param call_param0 @@ -1472,53 +1472,53 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %y: @CallsWithType.%U.loc4_19.1 (%U) = wrapper_binding y, %y.param // CHECK:STDOUT: } // CHECK:STDOUT: %TakesExtraWhereExplicit.decl: %TakesExtraWhereExplicit.type = fn_decl @TakesExtraWhereExplicit [concrete = constants.%TakesExtraWhereExplicit] { -// CHECK:STDOUT: %T.patt.loc8_36.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_36.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc8_44.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_44.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_44.1: type = splice_block %.loc8_44.2 [concrete = constants.%type] { -// CHECK:STDOUT: %.Self.frozen.loc8_36: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_39: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_51.1: type = splice_block %.loc8_51.2 [concrete = constants.%type] { // CHECK:STDOUT: %.Self.frozen.loc8_44: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc8_39 [concrete] -// CHECK:STDOUT: %.Self.ref.loc8_50.1: %type = name_ref .Self, %.Self.frozen.loc8_44 [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_62: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.Self.as_type.loc8_50.1: type = facet_access_type %.Self.ref.loc8_50.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc8_50.1: type = converted %.Self.ref.loc8_50.1, %.Self.as_type.loc8_50.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %impls.loc8_56.1 = requirement_impls %.loc8_50.1, %.loc8_62 [concrete] +// CHECK:STDOUT: %.loc8_46: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.frozen.loc8_51: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc8_46 [concrete] +// CHECK:STDOUT: %.Self.ref.loc8_57.1: %type = name_ref .Self, %.Self.frozen.loc8_51 [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc8_69: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.as_type.loc8_57.1: type = facet_access_type %.Self.ref.loc8_57.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc8_57.1: type = converted %.Self.ref.loc8_57.1, %.Self.as_type.loc8_57.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %impls.loc8_63.1 = requirement_impls %.loc8_57.1, %.loc8_69 [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc8_50.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type.loc8_50.2: type = facet_access_type %.Self.ref.loc8_50.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc8_50.2: type = converted %.Self.ref.loc8_50.1, %.Self.as_type.loc8_50.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impls.loc8_56.2 = requirement_impls %.loc8_50.2, %.loc8_62 [concrete] -// CHECK:STDOUT: %.loc8_44.2: type = where_expr [concrete = constants.%type] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc8_39 [concrete] -// CHECK:STDOUT: %impls.loc8_56.2 = requirement_impls %.loc8_50.2, %.loc8_62 [concrete] +// CHECK:STDOUT: %.Self.ref.loc8_57.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.as_type.loc8_57.2: type = facet_access_type %.Self.ref.loc8_57.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc8_57.2: type = converted %.Self.ref.loc8_57.1, %.Self.as_type.loc8_57.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impls.loc8_63.2 = requirement_impls %.loc8_57.2, %.loc8_69 [concrete] +// CHECK:STDOUT: %.loc8_51.2: type = where_expr [concrete = constants.%type] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc8_46 [concrete] +// CHECK:STDOUT: %impls.loc8_63.2 = requirement_impls %.loc8_57.2, %.loc8_69 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_36.3: %type = symbolic_binding T, 0 [symbolic = %T.loc8_36.2 (constants.%T.f45530.2)] +// CHECK:STDOUT: %T.loc8_44.3: %type = symbolic_binding T, 0 [symbolic = %T.loc8_44.2 (constants.%T.f45530.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallsWithTypeExplicit.decl: %CallsWithTypeExplicit.type = fn_decl @CallsWithTypeExplicit [concrete = constants.%CallsWithTypeExplicit] { -// CHECK:STDOUT: %U.patt.loc9_27.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_27.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc9_35.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_35.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_30.1: type = splice_block %.loc9_30.2 [concrete = type] { +// CHECK:STDOUT: %.loc9_37.1: type = splice_block %.loc9_37.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_30.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_37.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc9_27.2: type = symbolic_binding U, 0 [symbolic = %U.loc9_27.1 (constants.%U)] +// CHECK:STDOUT: %U.loc9_35.2: type = symbolic_binding U, 0 [symbolic = %U.loc9_35.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @TakesExtraWhereDeduced(%T.loc3_28.2: %type) { // CHECK:STDOUT: %T.patt.loc3_28.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_28.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc3_28.1: %type = symbolic_binding T, 0 [symbolic = %T.loc3_28.1 (constants.%T.f45530.1)] -// CHECK:STDOUT: %T.as_type.loc3_70.1: type = facet_access_type %T.loc3_28.1 [symbolic = %T.as_type.loc3_70.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc3_70.1 [symbolic = %pattern_type (constants.%pattern_type.86a)] -// CHECK:STDOUT: %x.param_patt.loc3_68.2: @TakesExtraWhereDeduced.%pattern_type (%pattern_type.86a) = value_param_pattern [symbolic = %x.param_patt.loc3_68.2 (constants.%x.param_patt.9a2)] -// CHECK:STDOUT: %x.patt.loc3_68.2: @TakesExtraWhereDeduced.%pattern_type (%pattern_type.86a) = at_binding_pattern x, %x.param_patt.loc3_68.2 [symbolic = %x.patt.loc3_68.2 (constants.%x.patt.fe1)] +// CHECK:STDOUT: %T.as_type.loc3_69.1: type = facet_access_type %T.loc3_28.1 [symbolic = %T.as_type.loc3_69.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc3_69.1 [symbolic = %pattern_type (constants.%pattern_type.86a)] +// CHECK:STDOUT: %x.param_patt.loc3_67.2: @TakesExtraWhereDeduced.%pattern_type (%pattern_type.86a) = value_param_pattern [symbolic = %x.param_patt.loc3_67.2 (constants.%x.param_patt.9a2)] +// CHECK:STDOUT: %x.patt.loc3_67.2: @TakesExtraWhereDeduced.%pattern_type (%pattern_type.86a) = at_binding_pattern x, %x.param_patt.loc3_67.2 [symbolic = %x.patt.loc3_67.2 (constants.%x.patt.fe1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc3_70.1 [symbolic = %require_complete (constants.%require_complete.5ef)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc3_69.1 [symbolic = %require_complete (constants.%require_complete.5ef)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @TakesExtraWhereDeduced.%T.as_type.loc3_70.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%x.param: @TakesExtraWhereDeduced.%T.as_type.loc3_69.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -1530,8 +1530,8 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %U.patt.loc4_19.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc4_19.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc4_19.1: type = symbolic_binding U, 0 [symbolic = %U.loc4_19.1 (constants.%U)] // CHECK:STDOUT: %pattern_type: type = pattern_type %U.loc4_19.1 [symbolic = %pattern_type (constants.%pattern_type.51d)] -// CHECK:STDOUT: %y.param_patt.loc4_29.2: @CallsWithType.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %y.param_patt.loc4_29.2 (constants.%y.param_patt)] -// CHECK:STDOUT: %y.patt.loc4_29.2: @CallsWithType.%pattern_type (%pattern_type.51d) = at_binding_pattern y, %y.param_patt.loc4_29.2 [symbolic = %y.patt.loc4_29.2 (constants.%y.patt)] +// CHECK:STDOUT: %y.param_patt.loc4_28.2: @CallsWithType.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %y.param_patt.loc4_28.2 (constants.%y.param_patt)] +// CHECK:STDOUT: %y.patt.loc4_28.2: @CallsWithType.%pattern_type (%pattern_type.51d) = at_binding_pattern y, %y.param_patt.loc4_28.2 [symbolic = %y.patt.loc4_28.2 (constants.%y.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %U.loc4_19.1 [symbolic = %require_complete (constants.%require_complete.944)] @@ -1554,10 +1554,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TakesExtraWhereExplicit(%T.loc8_36.3: %type) { -// CHECK:STDOUT: %T.patt.loc8_36.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_36.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_36.1: %type = symbolic_binding T, 0 [symbolic = %T.loc8_36.1 (constants.%T.f45530.1)] -// CHECK:STDOUT: %T.loc8_36.2: %type = symbolic_binding T, 0 [symbolic = %T.loc8_36.2 (constants.%T.f45530.2)] +// CHECK:STDOUT: generic fn @TakesExtraWhereExplicit(%T.loc8_44.3: %type) { +// CHECK:STDOUT: %T.patt.loc8_44.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_44.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc8_44.1: %type = symbolic_binding T, 0 [symbolic = %T.loc8_44.1 (constants.%T.f45530.1)] +// CHECK:STDOUT: %T.loc8_44.2: %type = symbolic_binding T, 0 [symbolic = %T.loc8_44.2 (constants.%T.f45530.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1569,18 +1569,18 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallsWithTypeExplicit(%U.loc9_27.2: type) { -// CHECK:STDOUT: %U.patt.loc9_27.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_27.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc9_27.1: type = symbolic_binding U, 0 [symbolic = %U.loc9_27.1 (constants.%U)] +// CHECK:STDOUT: generic fn @CallsWithTypeExplicit(%U.loc9_35.2: type) { +// CHECK:STDOUT: %U.patt.loc9_35.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_35.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc9_35.1: type = symbolic_binding U, 0 [symbolic = %U.loc9_35.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %facet_value.loc10_28.2: %type = facet_value %U.loc9_27.1, () [symbolic = %facet_value.loc10_28.2 (constants.%facet_value)] +// CHECK:STDOUT: %facet_value.loc10_28.2: %type = facet_value %U.loc9_35.1, () [symbolic = %facet_value.loc10_28.2 (constants.%facet_value)] // CHECK:STDOUT: %TakesExtraWhereExplicit.specific_fn.loc10_3.2: = specific_function constants.%TakesExtraWhereExplicit, @TakesExtraWhereExplicit(%facet_value.loc10_28.2) [symbolic = %TakesExtraWhereExplicit.specific_fn.loc10_3.2 (constants.%TakesExtraWhereExplicit.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %TakesExtraWhereExplicit.ref: %TakesExtraWhereExplicit.type = name_ref TakesExtraWhereExplicit, file.%TakesExtraWhereExplicit.decl [concrete = constants.%TakesExtraWhereExplicit] -// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc9_27.2 [symbolic = %U.loc9_27.1 (constants.%U)] +// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc9_35.2 [symbolic = %U.loc9_35.1 (constants.%U)] // CHECK:STDOUT: %facet_value.loc10_28.1: %type = facet_value %U.ref, () [symbolic = %facet_value.loc10_28.2 (constants.%facet_value)] // CHECK:STDOUT: %.loc10: %type = converted %U.ref, %facet_value.loc10_28.1 [symbolic = %facet_value.loc10_28.2 (constants.%facet_value)] // CHECK:STDOUT: %TakesExtraWhereExplicit.specific_fn.loc10_3.1: = specific_function %TakesExtraWhereExplicit.ref, @TakesExtraWhereExplicit(constants.%facet_value) [symbolic = %TakesExtraWhereExplicit.specific_fn.loc10_3.2 (constants.%TakesExtraWhereExplicit.specific_fn)] @@ -1594,47 +1594,47 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: specific @TakesExtraWhereDeduced(constants.%T.f45530.1) { // CHECK:STDOUT: %T.patt.loc3_28.2 => constants.%T.patt // CHECK:STDOUT: %T.loc3_28.1 => constants.%T.f45530.1 -// CHECK:STDOUT: %T.as_type.loc3_70.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc3_69.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.86a -// CHECK:STDOUT: %x.param_patt.loc3_68.2 => constants.%x.param_patt.9a2 -// CHECK:STDOUT: %x.patt.loc3_68.2 => constants.%x.patt.fe1 +// CHECK:STDOUT: %x.param_patt.loc3_67.2 => constants.%x.param_patt.9a2 +// CHECK:STDOUT: %x.patt.loc3_67.2 => constants.%x.patt.fe1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallsWithType(constants.%U) { // CHECK:STDOUT: %U.patt.loc4_19.2 => constants.%U.patt // CHECK:STDOUT: %U.loc4_19.1 => constants.%U // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %y.param_patt.loc4_29.2 => constants.%y.param_patt -// CHECK:STDOUT: %y.patt.loc4_29.2 => constants.%y.patt +// CHECK:STDOUT: %y.param_patt.loc4_28.2 => constants.%y.param_patt +// CHECK:STDOUT: %y.patt.loc4_28.2 => constants.%y.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TakesExtraWhereDeduced(constants.%facet_value) { // CHECK:STDOUT: %T.patt.loc3_28.2 => constants.%T.patt // CHECK:STDOUT: %T.loc3_28.1 => constants.%facet_value -// CHECK:STDOUT: %T.as_type.loc3_70.1 => constants.%U +// CHECK:STDOUT: %T.as_type.loc3_69.1 => constants.%U // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %x.param_patt.loc3_68.2 => constants.%x.param_patt.91d -// CHECK:STDOUT: %x.patt.loc3_68.2 => constants.%x.patt.800 +// CHECK:STDOUT: %x.param_patt.loc3_67.2 => constants.%x.param_patt.91d +// CHECK:STDOUT: %x.patt.loc3_67.2 => constants.%x.patt.800 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.944 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TakesExtraWhereExplicit(constants.%T.f45530.2) { -// CHECK:STDOUT: %T.patt.loc8_36.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_36.1 => constants.%T.f45530.2 -// CHECK:STDOUT: %T.loc8_36.2 => constants.%T.f45530.2 +// CHECK:STDOUT: %T.patt.loc8_44.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_44.1 => constants.%T.f45530.2 +// CHECK:STDOUT: %T.loc8_44.2 => constants.%T.f45530.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallsWithTypeExplicit(constants.%U) { -// CHECK:STDOUT: %U.patt.loc9_27.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc9_27.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc9_35.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc9_35.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TakesExtraWhereExplicit(constants.%facet_value) { -// CHECK:STDOUT: %T.patt.loc8_36.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_36.1 => constants.%facet_value -// CHECK:STDOUT: %T.loc8_36.2 => constants.%facet_value +// CHECK:STDOUT: %T.patt.loc8_44.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_44.1 => constants.%facet_value +// CHECK:STDOUT: %T.loc8_44.2 => constants.%facet_value // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon index 0e9e321d0672..df19c931dd2e 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon @@ -15,11 +15,11 @@ interface Eats {} interface Animal {} -impl forall [A:! Animal] A as Eats {} +impl forall [A: Animal] A as Eats {} -fn Feed[T:! Eats](unused e: T) {} +fn Feed[T: Eats](unused e: T) {} -fn HandleAnimal[T:! Animal](a: T) { Feed(a); } +fn HandleAnimal[T: Animal](a: T) { Feed(a); } // CHECK:STDOUT: --- convert_facet_value_value_to_blanket_impl.carbon // CHECK:STDOUT: @@ -87,10 +87,10 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %A.patt.loc18_15.1: %pattern_type.333 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc18_15.2 (constants.%A.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: %Animal.type = name_ref A, %A.loc18_15.1 [symbolic = %A.loc18_15.2 (constants.%A)] -// CHECK:STDOUT: %A.as_type.loc18_26.1: type = facet_access_type %A.ref [symbolic = %A.as_type.loc18_26.2 (constants.%A.as_type)] -// CHECK:STDOUT: %.loc18_26: type = converted %A.ref, %A.as_type.loc18_26.1 [symbolic = %A.as_type.loc18_26.2 (constants.%A.as_type)] +// CHECK:STDOUT: %A.as_type.loc18_25.1: type = facet_access_type %A.ref [symbolic = %A.as_type.loc18_25.2 (constants.%A.as_type)] +// CHECK:STDOUT: %.loc18_25: type = converted %A.ref, %A.as_type.loc18_25.1 [symbolic = %A.as_type.loc18_25.2 (constants.%A.as_type)] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %.loc18_18: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.loc18_17: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } @@ -98,39 +98,39 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: } // CHECK:STDOUT: %Feed.decl: %Feed.type = fn_decl @Feed [concrete = constants.%Feed] { // CHECK:STDOUT: %T.patt.loc20_10.1: %pattern_type.880 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_10.2 (constants.%T.patt.9e8)] -// CHECK:STDOUT: %e.param_patt.loc20_27.1: @Feed.%pattern_type (%pattern_type.aed) = value_param_pattern [symbolic = %e.param_patt.loc20_27.2 (constants.%e.param_patt.0be)] -// CHECK:STDOUT: %e.patt.loc20_27.1: @Feed.%pattern_type (%pattern_type.aed) = at_binding_pattern e, %e.param_patt.loc20_27.1 [symbolic = %e.patt.loc20_27.2 (constants.%e.patt.543)] +// CHECK:STDOUT: %e.param_patt.loc20_26.1: @Feed.%pattern_type (%pattern_type.aed) = value_param_pattern [symbolic = %e.param_patt.loc20_26.2 (constants.%e.param_patt.0be)] +// CHECK:STDOUT: %e.patt.loc20_26.1: @Feed.%pattern_type (%pattern_type.aed) = at_binding_pattern e, %e.param_patt.loc20_26.1 [symbolic = %e.patt.loc20_26.2 (constants.%e.patt.543)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_13: type = splice_block %Eats.ref [concrete = constants.%Eats.type] { +// CHECK:STDOUT: %.loc20_12: type = splice_block %Eats.ref [concrete = constants.%Eats.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc20_10.2: %Eats.type = symbolic_binding T, 0 [symbolic = %T.loc20_10.1 (constants.%T.672)] -// CHECK:STDOUT: %e.param: @Feed.%T.as_type.loc20_29.1 (%T.as_type.422) = value_param call_param0 -// CHECK:STDOUT: %.loc20_29.1: type = splice_block %.loc20_29.2 [symbolic = %T.as_type.loc20_29.1 (constants.%T.as_type.422)] { +// CHECK:STDOUT: %e.param: @Feed.%T.as_type.loc20_28.1 (%T.as_type.422) = value_param call_param0 +// CHECK:STDOUT: %.loc20_28.1: type = splice_block %.loc20_28.2 [symbolic = %T.as_type.loc20_28.1 (constants.%T.as_type.422)] { // CHECK:STDOUT: %T.ref: %Eats.type = name_ref T, %T.loc20_10.2 [symbolic = %T.loc20_10.1 (constants.%T.672)] -// CHECK:STDOUT: %T.as_type.loc20_29.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc20_29.1 (constants.%T.as_type.422)] -// CHECK:STDOUT: %.loc20_29.2: type = converted %T.ref, %T.as_type.loc20_29.2 [symbolic = %T.as_type.loc20_29.1 (constants.%T.as_type.422)] +// CHECK:STDOUT: %T.as_type.loc20_28.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc20_28.1 (constants.%T.as_type.422)] +// CHECK:STDOUT: %.loc20_28.2: type = converted %T.ref, %T.as_type.loc20_28.2 [symbolic = %T.as_type.loc20_28.1 (constants.%T.as_type.422)] // CHECK:STDOUT: } -// CHECK:STDOUT: %e: @Feed.%T.as_type.loc20_29.1 (%T.as_type.422) = wrapper_binding e, %e.param +// CHECK:STDOUT: %e: @Feed.%T.as_type.loc20_28.1 (%T.as_type.422) = wrapper_binding e, %e.param // CHECK:STDOUT: } // CHECK:STDOUT: %HandleAnimal.decl: %HandleAnimal.type = fn_decl @HandleAnimal [concrete = constants.%HandleAnimal] { // CHECK:STDOUT: %T.patt.loc22_18.1: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_18.2 (constants.%T.patt.e44)] -// CHECK:STDOUT: %a.param_patt.loc22_30.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc22_30.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc22_30.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc22_30.1 [symbolic = %a.patt.loc22_30.2 (constants.%a.patt)] +// CHECK:STDOUT: %a.param_patt.loc22_29.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc22_29.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc22_29.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc22_29.1 [symbolic = %a.patt.loc22_29.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc22_21: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.loc22_20: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc22_18.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc22_18.1 (constants.%T.443)] -// CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc22_32.1 (%T.as_type.01d) = value_param call_param0 -// CHECK:STDOUT: %.loc22_32.1: type = splice_block %.loc22_32.2 [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.01d)] { +// CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc22_31.1 (%T.as_type.01d) = value_param call_param0 +// CHECK:STDOUT: %.loc22_31.1: type = splice_block %.loc22_31.2 [symbolic = %T.as_type.loc22_31.1 (constants.%T.as_type.01d)] { // CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc22_18.2 [symbolic = %T.loc22_18.1 (constants.%T.443)] -// CHECK:STDOUT: %T.as_type.loc22_32.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.01d)] -// CHECK:STDOUT: %.loc22_32.2: type = converted %T.ref, %T.as_type.loc22_32.2 [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.01d)] +// CHECK:STDOUT: %T.as_type.loc22_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc22_31.1 (constants.%T.as_type.01d)] +// CHECK:STDOUT: %.loc22_31.2: type = converted %T.ref, %T.as_type.loc22_31.2 [symbolic = %T.as_type.loc22_31.1 (constants.%T.as_type.01d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @HandleAnimal.%T.as_type.loc22_32.1 (%T.as_type.01d) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @HandleAnimal.%T.as_type.loc22_31.1 (%T.as_type.01d) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -163,33 +163,33 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: generic impl @A.as_type.as.Eats.impl(%A.loc18_15.1: %Animal.type) { // CHECK:STDOUT: %A.patt.loc18_15.2: %pattern_type.333 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc18_15.2 (constants.%A.patt)] // CHECK:STDOUT: %A.loc18_15.2: %Animal.type = symbolic_binding A, 0 [symbolic = %A.loc18_15.2 (constants.%A)] -// CHECK:STDOUT: %A.as_type.loc18_26.2: type = facet_access_type %A.loc18_15.2 [symbolic = %A.as_type.loc18_26.2 (constants.%A.as_type)] -// CHECK:STDOUT: %Eats.impl_witness.loc18_36.2: = impl_witness %Eats.impl_witness_table, @A.as_type.as.Eats.impl(%A.loc18_15.2) [symbolic = %Eats.impl_witness.loc18_36.2 (constants.%Eats.impl_witness.e0811c.1)] +// CHECK:STDOUT: %A.as_type.loc18_25.2: type = facet_access_type %A.loc18_15.2 [symbolic = %A.as_type.loc18_25.2 (constants.%A.as_type)] +// CHECK:STDOUT: %Eats.impl_witness.loc18_35.2: = impl_witness %Eats.impl_witness_table, @A.as_type.as.Eats.impl(%A.loc18_15.2) [symbolic = %Eats.impl_witness.loc18_35.2 (constants.%Eats.impl_witness.e0811c.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc18_26 as %Eats.ref { +// CHECK:STDOUT: impl: %.loc18_25 as %Eats.ref { // CHECK:STDOUT: %Eats.impl_witness_table = impl_witness_table (), @A.as_type.as.Eats.impl [concrete] -// CHECK:STDOUT: %Eats.impl_witness.loc18_36.1: = impl_witness %Eats.impl_witness_table, @A.as_type.as.Eats.impl(constants.%A) [symbolic = %Eats.impl_witness.loc18_36.2 (constants.%Eats.impl_witness.e0811c.1)] +// CHECK:STDOUT: %Eats.impl_witness.loc18_35.1: = impl_witness %Eats.impl_witness_table, @A.as_type.as.Eats.impl(constants.%A) [symbolic = %Eats.impl_witness.loc18_35.2 (constants.%Eats.impl_witness.e0811c.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %Eats.ref -// CHECK:STDOUT: witness = %Eats.impl_witness.loc18_36.1 +// CHECK:STDOUT: witness = %Eats.impl_witness.loc18_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Feed(%T.loc20_10.2: %Eats.type) { // CHECK:STDOUT: %T.patt.loc20_10.2: %pattern_type.880 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_10.2 (constants.%T.patt.9e8)] // CHECK:STDOUT: %T.loc20_10.1: %Eats.type = symbolic_binding T, 0 [symbolic = %T.loc20_10.1 (constants.%T.672)] -// CHECK:STDOUT: %T.as_type.loc20_29.1: type = facet_access_type %T.loc20_10.1 [symbolic = %T.as_type.loc20_29.1 (constants.%T.as_type.422)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc20_29.1 [symbolic = %pattern_type (constants.%pattern_type.aed)] -// CHECK:STDOUT: %e.param_patt.loc20_27.2: @Feed.%pattern_type (%pattern_type.aed) = value_param_pattern [symbolic = %e.param_patt.loc20_27.2 (constants.%e.param_patt.0be)] -// CHECK:STDOUT: %e.patt.loc20_27.2: @Feed.%pattern_type (%pattern_type.aed) = at_binding_pattern e, %e.param_patt.loc20_27.2 [symbolic = %e.patt.loc20_27.2 (constants.%e.patt.543)] +// CHECK:STDOUT: %T.as_type.loc20_28.1: type = facet_access_type %T.loc20_10.1 [symbolic = %T.as_type.loc20_28.1 (constants.%T.as_type.422)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc20_28.1 [symbolic = %pattern_type (constants.%pattern_type.aed)] +// CHECK:STDOUT: %e.param_patt.loc20_26.2: @Feed.%pattern_type (%pattern_type.aed) = value_param_pattern [symbolic = %e.param_patt.loc20_26.2 (constants.%e.param_patt.0be)] +// CHECK:STDOUT: %e.patt.loc20_26.2: @Feed.%pattern_type (%pattern_type.aed) = at_binding_pattern e, %e.param_patt.loc20_26.2 [symbolic = %e.patt.loc20_26.2 (constants.%e.patt.543)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc20_29.1 [symbolic = %require_complete (constants.%require_complete.c4d)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc20_28.1 [symbolic = %require_complete (constants.%require_complete.c4d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%e.param: @Feed.%T.as_type.loc20_29.1 (%T.as_type.422)) { +// CHECK:STDOUT: fn(%e.param: @Feed.%T.as_type.loc20_28.1 (%T.as_type.422)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -200,28 +200,28 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: generic fn @HandleAnimal(%T.loc22_18.2: %Animal.type) { // CHECK:STDOUT: %T.patt.loc22_18.2: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_18.2 (constants.%T.patt.e44)] // CHECK:STDOUT: %T.loc22_18.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc22_18.1 (constants.%T.443)] -// CHECK:STDOUT: %T.as_type.loc22_32.1: type = facet_access_type %T.loc22_18.1 [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.01d)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_32.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] -// CHECK:STDOUT: %a.param_patt.loc22_30.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc22_30.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc22_30.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc22_30.2 [symbolic = %a.patt.loc22_30.2 (constants.%a.patt)] +// CHECK:STDOUT: %T.as_type.loc22_31.1: type = facet_access_type %T.loc22_18.1 [symbolic = %T.as_type.loc22_31.1 (constants.%T.as_type.01d)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_31.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] +// CHECK:STDOUT: %a.param_patt.loc22_29.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc22_29.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc22_29.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc22_29.2 [symbolic = %a.patt.loc22_29.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc22_32.1 [symbolic = %require_complete (constants.%require_complete.db4)] -// CHECK:STDOUT: %.loc22_43.3: require_specific_def_type = require_specific_def @A.as_type.as.Eats.impl(%T.loc22_18.1) [symbolic = %.loc22_43.3 (constants.%.2fe)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc22_31.1 [symbolic = %require_complete (constants.%require_complete.db4)] +// CHECK:STDOUT: %.loc22_42.3: require_specific_def_type = require_specific_def @A.as_type.as.Eats.impl(%T.loc22_18.1) [symbolic = %.loc22_42.3 (constants.%.2fe)] // CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %T.loc22_18.1, @Eats [symbolic = %Eats.lookup_impl_witness (constants.%Eats.lookup_impl_witness)] -// CHECK:STDOUT: %Eats.facet.loc22_43.3: %Eats.type = facet_value %T.as_type.loc22_32.1, (%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet.934)] -// CHECK:STDOUT: %Feed.specific_fn.loc22_37.2: = specific_function constants.%Feed, @Feed(%Eats.facet.loc22_43.3) [symbolic = %Feed.specific_fn.loc22_37.2 (constants.%Feed.specific_fn)] +// CHECK:STDOUT: %Eats.facet.loc22_42.3: %Eats.type = facet_value %T.as_type.loc22_31.1, (%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc22_42.3 (constants.%Eats.facet.934)] +// CHECK:STDOUT: %Feed.specific_fn.loc22_36.2: = specific_function constants.%Feed, @Feed(%Eats.facet.loc22_42.3) [symbolic = %Feed.specific_fn.loc22_36.2 (constants.%Feed.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @HandleAnimal.%T.as_type.loc22_32.1 (%T.as_type.01d)) { +// CHECK:STDOUT: fn(%a.param: @HandleAnimal.%T.as_type.loc22_31.1 (%T.as_type.01d)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Feed.ref: %Feed.type = name_ref Feed, file.%Feed.decl [concrete = constants.%Feed] -// CHECK:STDOUT: %a.ref: @HandleAnimal.%T.as_type.loc22_32.1 (%T.as_type.01d) = name_ref a, %a -// CHECK:STDOUT: %Eats.facet.loc22_43.1: %Eats.type = facet_value constants.%T.as_type.01d, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet.934)] -// CHECK:STDOUT: %.loc22_43.1: %Eats.type = converted constants.%T.as_type.01d, %Eats.facet.loc22_43.1 [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet.934)] -// CHECK:STDOUT: %Eats.facet.loc22_43.2: %Eats.type = facet_value constants.%T.as_type.01d, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet.934)] -// CHECK:STDOUT: %.loc22_43.2: %Eats.type = converted constants.%T.as_type.01d, %Eats.facet.loc22_43.2 [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet.934)] -// CHECK:STDOUT: %Feed.specific_fn.loc22_37.1: = specific_function %Feed.ref, @Feed(constants.%Eats.facet.934) [symbolic = %Feed.specific_fn.loc22_37.2 (constants.%Feed.specific_fn)] -// CHECK:STDOUT: %Feed.call: init %empty_tuple.type = call %Feed.specific_fn.loc22_37.1(%a.ref) +// CHECK:STDOUT: %a.ref: @HandleAnimal.%T.as_type.loc22_31.1 (%T.as_type.01d) = name_ref a, %a +// CHECK:STDOUT: %Eats.facet.loc22_42.1: %Eats.type = facet_value constants.%T.as_type.01d, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc22_42.3 (constants.%Eats.facet.934)] +// CHECK:STDOUT: %.loc22_42.1: %Eats.type = converted constants.%T.as_type.01d, %Eats.facet.loc22_42.1 [symbolic = %Eats.facet.loc22_42.3 (constants.%Eats.facet.934)] +// CHECK:STDOUT: %Eats.facet.loc22_42.2: %Eats.type = facet_value constants.%T.as_type.01d, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc22_42.3 (constants.%Eats.facet.934)] +// CHECK:STDOUT: %.loc22_42.2: %Eats.type = converted constants.%T.as_type.01d, %Eats.facet.loc22_42.2 [symbolic = %Eats.facet.loc22_42.3 (constants.%Eats.facet.934)] +// CHECK:STDOUT: %Feed.specific_fn.loc22_36.1: = specific_function %Feed.ref, @Feed(constants.%Eats.facet.934) [symbolic = %Feed.specific_fn.loc22_36.2 (constants.%Feed.specific_fn)] +// CHECK:STDOUT: %Feed.call: init %empty_tuple.type = call %Feed.specific_fn.loc22_36.1(%a.ref) // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -239,8 +239,8 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: specific @A.as_type.as.Eats.impl(constants.%A) { // CHECK:STDOUT: %A.patt.loc18_15.2 => constants.%A.patt // CHECK:STDOUT: %A.loc18_15.2 => constants.%A -// CHECK:STDOUT: %A.as_type.loc18_26.2 => constants.%A.as_type -// CHECK:STDOUT: %Eats.impl_witness.loc18_36.2 => constants.%Eats.impl_witness.e0811c.1 +// CHECK:STDOUT: %A.as_type.loc18_25.2 => constants.%A.as_type +// CHECK:STDOUT: %Eats.impl_witness.loc18_35.2 => constants.%Eats.impl_witness.e0811c.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Eats.WithSelf(constants.%Eats.facet.f93) { @@ -250,26 +250,26 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: specific @Feed(constants.%T.672) { // CHECK:STDOUT: %T.patt.loc20_10.2 => constants.%T.patt.9e8 // CHECK:STDOUT: %T.loc20_10.1 => constants.%T.672 -// CHECK:STDOUT: %T.as_type.loc20_29.1 => constants.%T.as_type.422 +// CHECK:STDOUT: %T.as_type.loc20_28.1 => constants.%T.as_type.422 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.aed -// CHECK:STDOUT: %e.param_patt.loc20_27.2 => constants.%e.param_patt.0be -// CHECK:STDOUT: %e.patt.loc20_27.2 => constants.%e.patt.543 +// CHECK:STDOUT: %e.param_patt.loc20_26.2 => constants.%e.param_patt.0be +// CHECK:STDOUT: %e.patt.loc20_26.2 => constants.%e.patt.543 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%T.443) { // CHECK:STDOUT: %T.patt.loc22_18.2 => constants.%T.patt.e44 // CHECK:STDOUT: %T.loc22_18.1 => constants.%T.443 -// CHECK:STDOUT: %T.as_type.loc22_32.1 => constants.%T.as_type.01d +// CHECK:STDOUT: %T.as_type.loc22_31.1 => constants.%T.as_type.01d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e90 -// CHECK:STDOUT: %a.param_patt.loc22_30.2 => constants.%a.param_patt -// CHECK:STDOUT: %a.patt.loc22_30.2 => constants.%a.patt +// CHECK:STDOUT: %a.param_patt.loc22_29.2 => constants.%a.param_patt +// CHECK:STDOUT: %a.patt.loc22_29.2 => constants.%a.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.as_type.as.Eats.impl(constants.%T.443) { // CHECK:STDOUT: %A.patt.loc18_15.2 => constants.%A.patt // CHECK:STDOUT: %A.loc18_15.2 => constants.%T.443 -// CHECK:STDOUT: %A.as_type.loc18_26.2 => constants.%T.as_type.01d -// CHECK:STDOUT: %Eats.impl_witness.loc18_36.2 => constants.%Eats.impl_witness.e0811c.2 +// CHECK:STDOUT: %A.as_type.loc18_25.2 => constants.%T.as_type.01d +// CHECK:STDOUT: %Eats.impl_witness.loc18_35.2 => constants.%Eats.impl_witness.e0811c.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -277,10 +277,10 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: specific @Feed(constants.%Eats.facet.934) { // CHECK:STDOUT: %T.patt.loc20_10.2 => constants.%T.patt.9e8 // CHECK:STDOUT: %T.loc20_10.1 => constants.%Eats.facet.934 -// CHECK:STDOUT: %T.as_type.loc20_29.1 => constants.%T.as_type.01d +// CHECK:STDOUT: %T.as_type.loc20_28.1 => constants.%T.as_type.01d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e90 -// CHECK:STDOUT: %e.param_patt.loc20_27.2 => constants.%e.param_patt.1c7 -// CHECK:STDOUT: %e.patt.loc20_27.2 => constants.%e.patt.637 +// CHECK:STDOUT: %e.param_patt.loc20_26.2 => constants.%e.param_patt.1c7 +// CHECK:STDOUT: %e.patt.loc20_26.2 => constants.%e.patt.637 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.db4 diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon index 2e07b061f4b9..d3914b120a55 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon @@ -18,18 +18,18 @@ class Grass {} impl Grass as Edible {} interface Animal {} -interface Eats(Food:! type) {} +interface Eats(Food: type) {} // When answering a query "does Goat impl Animal", we must avoid trying to deduce // parameters for this impl. Not only is doing so unnecessary, it would start a new // "does Goat impl Animal" query, leading to a "cycle in impl lookup" error. -impl forall [T:! Animal, U:! Edible] T as Eats(U) {} +impl forall [T: Animal, U: Edible] T as Eats(U) {} class Goat {} impl Goat as Animal {} -fn Feed[Food:! Edible, T:! Eats(Food)](unused e: T, unused food: Food) {} -fn HandleAnimal[A:! Animal, Food:! Edible](a: A, food: Food) { Feed(a, food); } +fn Feed[Food: Edible, T: Eats(Food)](unused e: T, unused food: Food) {} +fn HandleAnimal[A: Animal, Food: Edible](a: A, food: Food) { Feed(a, food); } fn F() { HandleAnimal({} as Goat, {} as Grass); @@ -187,34 +187,34 @@ fn F() { // CHECK:STDOUT: %Eats.decl: %Eats.type.8ef = interface_decl @Eats [concrete = constants.%Eats.generic] { // CHECK:STDOUT: %Food.patt.loc21_20.1: %pattern_type.98f = symbolic_binding_pattern Food, 0 [symbolic = %Food.patt.loc21_20.2 (constants.%Food.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_23.1: type = splice_block %.loc21_23.2 [concrete = type] { +// CHECK:STDOUT: %.loc21_22.1: type = splice_block %.loc21_22.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc21_23.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc21_22.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %Food.loc21_20.2: type = symbolic_binding Food, 0 [symbolic = %Food.loc21_20.1 (constants.%Food.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @T.as_type.as.Eats.impl [concrete] { // CHECK:STDOUT: %T.patt.loc26_15.1: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_15.2 (constants.%T.patt.e44)] -// CHECK:STDOUT: %U.patt.loc26_27.1: %pattern_type.e90e = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc26_27.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc26_26.1: %pattern_type.e90e = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc26_26.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc26_15.1 [symbolic = %T.loc26_15.2 (constants.%T.443)] -// CHECK:STDOUT: %T.as_type.loc26_38.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc26_38.2 (constants.%T.as_type.01d)] -// CHECK:STDOUT: %.loc26_38: type = converted %T.ref, %T.as_type.loc26_38.1 [symbolic = %T.as_type.loc26_38.2 (constants.%T.as_type.01d)] +// CHECK:STDOUT: %T.as_type.loc26_36.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc26_36.2 (constants.%T.as_type.01d)] +// CHECK:STDOUT: %.loc26_36: type = converted %T.ref, %T.as_type.loc26_36.1 [symbolic = %T.as_type.loc26_36.2 (constants.%T.as_type.01d)] // CHECK:STDOUT: %Eats.ref: %Eats.type.8ef = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.generic] -// CHECK:STDOUT: %U.ref: %Edible.type = name_ref U, %U.loc26_27.1 [symbolic = %U.loc26_27.2 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc26_49.1: type = facet_access_type %U.ref [symbolic = %U.as_type.loc26_49.2 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc26_49: type = converted %U.ref, %U.as_type.loc26_49.1 [symbolic = %U.as_type.loc26_49.2 (constants.%U.as_type)] -// CHECK:STDOUT: %Eats.type.loc26_49.1: type = facet_type <@Eats, @Eats(constants.%U.as_type)> [symbolic = %Eats.type.loc26_49.2 (constants.%Eats.type.ceea62.1)] -// CHECK:STDOUT: %.loc26_18: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %U.ref: %Edible.type = name_ref U, %U.loc26_26.1 [symbolic = %U.loc26_26.2 (constants.%U)] +// CHECK:STDOUT: %U.as_type.loc26_47.1: type = facet_access_type %U.ref [symbolic = %U.as_type.loc26_47.2 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc26_47: type = converted %U.ref, %U.as_type.loc26_47.1 [symbolic = %U.as_type.loc26_47.2 (constants.%U.as_type)] +// CHECK:STDOUT: %Eats.type.loc26_47.1: type = facet_type <@Eats, @Eats(constants.%U.as_type)> [symbolic = %Eats.type.loc26_47.2 (constants.%Eats.type.ceea62.1)] +// CHECK:STDOUT: %.loc26_17: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { // CHECK:STDOUT: %.Self.frozen.loc26_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc26_15.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc26_15.2 (constants.%T.443)] -// CHECK:STDOUT: %.loc26_30: type = splice_block %Edible.ref [concrete = constants.%Edible.type] { -// CHECK:STDOUT: %.Self.frozen.loc26_27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc26_28: type = splice_block %Edible.ref [concrete = constants.%Edible.type] { +// CHECK:STDOUT: %.Self.frozen.loc26_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Edible.ref: type = name_ref Edible, file.%Edible.decl [concrete = constants.%Edible.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc26_27.1: %Edible.type = symbolic_binding U, 1 [symbolic = %U.loc26_27.2 (constants.%U)] +// CHECK:STDOUT: %U.loc26_26.1: %Edible.type = symbolic_binding U, 1 [symbolic = %U.loc26_26.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Goat.decl: type = class_decl @Goat [concrete = constants.%Goat] {} {} // CHECK:STDOUT: impl_decl @Goat.as.Animal.impl [concrete] {} { @@ -223,73 +223,73 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Feed.decl: %Feed.type = fn_decl @Feed [concrete = constants.%Feed] { // CHECK:STDOUT: %Food.patt.loc31_13.1: %pattern_type.e90e = symbolic_binding_pattern Food, 0 [symbolic = %Food.patt.loc31_13.2 (constants.%Food.patt.bbd)] -// CHECK:STDOUT: %T.patt.loc31_25.1: @Feed.%pattern_type.loc31_25 (%pattern_type.560) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc31_25.2 (constants.%T.patt.02f)] -// CHECK:STDOUT: %e.param_patt.loc31_48.1: @Feed.%pattern_type.loc31_48 (%pattern_type.371) = value_param_pattern [symbolic = %e.param_patt.loc31_48.2 (constants.%e.param_patt.32e)] -// CHECK:STDOUT: %e.patt.loc31_48.1: @Feed.%pattern_type.loc31_48 (%pattern_type.371) = at_binding_pattern e, %e.param_patt.loc31_48.1 [symbolic = %e.patt.loc31_48.2 (constants.%e.patt.af1)] -// CHECK:STDOUT: %food.param_patt.loc31_64.1: @Feed.%pattern_type.loc31_64 (%pattern_type.e40) = value_param_pattern [symbolic = %food.param_patt.loc31_64.2 (constants.%food.param_patt.1bd)] -// CHECK:STDOUT: %food.patt.loc31_64.1: @Feed.%pattern_type.loc31_64 (%pattern_type.e40) = at_binding_pattern food, %food.param_patt.loc31_64.1 [symbolic = %food.patt.loc31_64.2 (constants.%food.patt.bcf)] +// CHECK:STDOUT: %T.patt.loc31_24.1: @Feed.%pattern_type.loc31_24 (%pattern_type.560) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc31_24.2 (constants.%T.patt.02f)] +// CHECK:STDOUT: %e.param_patt.loc31_46.1: @Feed.%pattern_type.loc31_46 (%pattern_type.371) = value_param_pattern [symbolic = %e.param_patt.loc31_46.2 (constants.%e.param_patt.32e)] +// CHECK:STDOUT: %e.patt.loc31_46.1: @Feed.%pattern_type.loc31_46 (%pattern_type.371) = at_binding_pattern e, %e.param_patt.loc31_46.1 [symbolic = %e.patt.loc31_46.2 (constants.%e.patt.af1)] +// CHECK:STDOUT: %food.param_patt.loc31_62.1: @Feed.%pattern_type.loc31_62 (%pattern_type.e40) = value_param_pattern [symbolic = %food.param_patt.loc31_62.2 (constants.%food.param_patt.1bd)] +// CHECK:STDOUT: %food.patt.loc31_62.1: @Feed.%pattern_type.loc31_62 (%pattern_type.e40) = at_binding_pattern food, %food.param_patt.loc31_62.1 [symbolic = %food.patt.loc31_62.2 (constants.%food.patt.bcf)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc31_16: type = splice_block %Edible.ref [concrete = constants.%Edible.type] { +// CHECK:STDOUT: %.loc31_15: type = splice_block %Edible.ref [concrete = constants.%Edible.type] { // CHECK:STDOUT: %.Self.frozen.loc31_13: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Edible.ref: type = name_ref Edible, file.%Edible.decl [concrete = constants.%Edible.type] // CHECK:STDOUT: } // CHECK:STDOUT: %Food.loc31_13.2: %Edible.type = symbolic_binding Food, 0 [symbolic = %Food.loc31_13.1 (constants.%Food.196)] -// CHECK:STDOUT: %.loc31_37.1: type = splice_block %Eats.type.loc31_37.2 [symbolic = %Eats.type.loc31_37.1 (constants.%Eats.type.eb4)] { -// CHECK:STDOUT: %.Self.frozen.loc31_25: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc31_35.1: type = splice_block %Eats.type.loc31_35.2 [symbolic = %Eats.type.loc31_35.1 (constants.%Eats.type.eb4)] { +// CHECK:STDOUT: %.Self.frozen.loc31_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Eats.ref: %Eats.type.8ef = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.generic] -// CHECK:STDOUT: %Food.ref.loc31_33: %Edible.type = name_ref Food, %Food.loc31_13.2 [symbolic = %Food.loc31_13.1 (constants.%Food.196)] -// CHECK:STDOUT: %Food.as_type.loc31_37.2: type = facet_access_type %Food.ref.loc31_33 [symbolic = %Food.as_type.loc31_37.1 (constants.%Food.as_type.bca)] -// CHECK:STDOUT: %.loc31_37.2: type = converted %Food.ref.loc31_33, %Food.as_type.loc31_37.2 [symbolic = %Food.as_type.loc31_37.1 (constants.%Food.as_type.bca)] -// CHECK:STDOUT: %Eats.type.loc31_37.2: type = facet_type <@Eats, @Eats(constants.%Food.as_type.bca)> [symbolic = %Eats.type.loc31_37.1 (constants.%Eats.type.eb4)] +// CHECK:STDOUT: %Food.ref.loc31_31: %Edible.type = name_ref Food, %Food.loc31_13.2 [symbolic = %Food.loc31_13.1 (constants.%Food.196)] +// CHECK:STDOUT: %Food.as_type.loc31_35.2: type = facet_access_type %Food.ref.loc31_31 [symbolic = %Food.as_type.loc31_35.1 (constants.%Food.as_type.bca)] +// CHECK:STDOUT: %.loc31_35.2: type = converted %Food.ref.loc31_31, %Food.as_type.loc31_35.2 [symbolic = %Food.as_type.loc31_35.1 (constants.%Food.as_type.bca)] +// CHECK:STDOUT: %Eats.type.loc31_35.2: type = facet_type <@Eats, @Eats(constants.%Food.as_type.bca)> [symbolic = %Eats.type.loc31_35.1 (constants.%Eats.type.eb4)] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc31_25.2: @Feed.%Eats.type.loc31_37.1 (%Eats.type.eb4) = symbolic_binding T, 1 [symbolic = %T.loc31_25.1 (constants.%T.b01)] -// CHECK:STDOUT: %e.param: @Feed.%T.as_type.loc31_50.1 (%T.as_type.b84) = value_param call_param0 -// CHECK:STDOUT: %.loc31_50.1: type = splice_block %.loc31_50.2 [symbolic = %T.as_type.loc31_50.1 (constants.%T.as_type.b84)] { -// CHECK:STDOUT: %T.ref: @Feed.%Eats.type.loc31_37.1 (%Eats.type.eb4) = name_ref T, %T.loc31_25.2 [symbolic = %T.loc31_25.1 (constants.%T.b01)] -// CHECK:STDOUT: %T.as_type.loc31_50.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc31_50.1 (constants.%T.as_type.b84)] -// CHECK:STDOUT: %.loc31_50.2: type = converted %T.ref, %T.as_type.loc31_50.2 [symbolic = %T.as_type.loc31_50.1 (constants.%T.as_type.b84)] +// CHECK:STDOUT: %T.loc31_24.2: @Feed.%Eats.type.loc31_35.1 (%Eats.type.eb4) = symbolic_binding T, 1 [symbolic = %T.loc31_24.1 (constants.%T.b01)] +// CHECK:STDOUT: %e.param: @Feed.%T.as_type.loc31_48.1 (%T.as_type.b84) = value_param call_param0 +// CHECK:STDOUT: %.loc31_48.1: type = splice_block %.loc31_48.2 [symbolic = %T.as_type.loc31_48.1 (constants.%T.as_type.b84)] { +// CHECK:STDOUT: %T.ref: @Feed.%Eats.type.loc31_35.1 (%Eats.type.eb4) = name_ref T, %T.loc31_24.2 [symbolic = %T.loc31_24.1 (constants.%T.b01)] +// CHECK:STDOUT: %T.as_type.loc31_48.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc31_48.1 (constants.%T.as_type.b84)] +// CHECK:STDOUT: %.loc31_48.2: type = converted %T.ref, %T.as_type.loc31_48.2 [symbolic = %T.as_type.loc31_48.1 (constants.%T.as_type.b84)] // CHECK:STDOUT: } -// CHECK:STDOUT: %e: @Feed.%T.as_type.loc31_50.1 (%T.as_type.b84) = wrapper_binding e, %e.param -// CHECK:STDOUT: %food.param: @Feed.%Food.as_type.loc31_37.1 (%Food.as_type.bca) = value_param call_param1 -// CHECK:STDOUT: %.loc31_66.1: type = splice_block %.loc31_66.2 [symbolic = %Food.as_type.loc31_37.1 (constants.%Food.as_type.bca)] { -// CHECK:STDOUT: %Food.ref.loc31_66: %Edible.type = name_ref Food, %Food.loc31_13.2 [symbolic = %Food.loc31_13.1 (constants.%Food.196)] -// CHECK:STDOUT: %Food.as_type.loc31_66: type = facet_access_type %Food.ref.loc31_66 [symbolic = %Food.as_type.loc31_37.1 (constants.%Food.as_type.bca)] -// CHECK:STDOUT: %.loc31_66.2: type = converted %Food.ref.loc31_66, %Food.as_type.loc31_66 [symbolic = %Food.as_type.loc31_37.1 (constants.%Food.as_type.bca)] +// CHECK:STDOUT: %e: @Feed.%T.as_type.loc31_48.1 (%T.as_type.b84) = wrapper_binding e, %e.param +// CHECK:STDOUT: %food.param: @Feed.%Food.as_type.loc31_35.1 (%Food.as_type.bca) = value_param call_param1 +// CHECK:STDOUT: %.loc31_64.1: type = splice_block %.loc31_64.2 [symbolic = %Food.as_type.loc31_35.1 (constants.%Food.as_type.bca)] { +// CHECK:STDOUT: %Food.ref.loc31_64: %Edible.type = name_ref Food, %Food.loc31_13.2 [symbolic = %Food.loc31_13.1 (constants.%Food.196)] +// CHECK:STDOUT: %Food.as_type.loc31_64: type = facet_access_type %Food.ref.loc31_64 [symbolic = %Food.as_type.loc31_35.1 (constants.%Food.as_type.bca)] +// CHECK:STDOUT: %.loc31_64.2: type = converted %Food.ref.loc31_64, %Food.as_type.loc31_64 [symbolic = %Food.as_type.loc31_35.1 (constants.%Food.as_type.bca)] // CHECK:STDOUT: } -// CHECK:STDOUT: %food: @Feed.%Food.as_type.loc31_37.1 (%Food.as_type.bca) = wrapper_binding food, %food.param +// CHECK:STDOUT: %food: @Feed.%Food.as_type.loc31_35.1 (%Food.as_type.bca) = wrapper_binding food, %food.param // CHECK:STDOUT: } // CHECK:STDOUT: %HandleAnimal.decl: %HandleAnimal.type = fn_decl @HandleAnimal [concrete = constants.%HandleAnimal] { // CHECK:STDOUT: %A.patt.loc32_18.1: %pattern_type.333 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc32_18.2 (constants.%A.patt)] -// CHECK:STDOUT: %Food.patt.loc32_33.1: %pattern_type.e90e = symbolic_binding_pattern Food, 1 [symbolic = %Food.patt.loc32_33.2 (constants.%Food.patt.0d1)] -// CHECK:STDOUT: %a.param_patt.loc32_45.1: @HandleAnimal.%pattern_type.loc32_45 (%pattern_type.e90c) = value_param_pattern [symbolic = %a.param_patt.loc32_45.2 (constants.%a.param_patt.84e)] -// CHECK:STDOUT: %a.patt.loc32_45.1: @HandleAnimal.%pattern_type.loc32_45 (%pattern_type.e90c) = at_binding_pattern a, %a.param_patt.loc32_45.1 [symbolic = %a.patt.loc32_45.2 (constants.%a.patt.3e6)] -// CHECK:STDOUT: %food.param_patt.loc32_54.1: @HandleAnimal.%pattern_type.loc32_54 (%pattern_type.ea8) = value_param_pattern [symbolic = %food.param_patt.loc32_54.2 (constants.%food.param_patt.38d)] -// CHECK:STDOUT: %food.patt.loc32_54.1: @HandleAnimal.%pattern_type.loc32_54 (%pattern_type.ea8) = at_binding_pattern food, %food.param_patt.loc32_54.1 [symbolic = %food.patt.loc32_54.2 (constants.%food.patt.09a8ec.1)] +// CHECK:STDOUT: %Food.patt.loc32_32.1: %pattern_type.e90e = symbolic_binding_pattern Food, 1 [symbolic = %Food.patt.loc32_32.2 (constants.%Food.patt.0d1)] +// CHECK:STDOUT: %a.param_patt.loc32_43.1: @HandleAnimal.%pattern_type.loc32_43 (%pattern_type.e90c) = value_param_pattern [symbolic = %a.param_patt.loc32_43.2 (constants.%a.param_patt.84e)] +// CHECK:STDOUT: %a.patt.loc32_43.1: @HandleAnimal.%pattern_type.loc32_43 (%pattern_type.e90c) = at_binding_pattern a, %a.param_patt.loc32_43.1 [symbolic = %a.patt.loc32_43.2 (constants.%a.patt.3e6)] +// CHECK:STDOUT: %food.param_patt.loc32_52.1: @HandleAnimal.%pattern_type.loc32_52 (%pattern_type.ea8) = value_param_pattern [symbolic = %food.param_patt.loc32_52.2 (constants.%food.param_patt.38d)] +// CHECK:STDOUT: %food.patt.loc32_52.1: @HandleAnimal.%pattern_type.loc32_52 (%pattern_type.ea8) = at_binding_pattern food, %food.param_patt.loc32_52.1 [symbolic = %food.patt.loc32_52.2 (constants.%food.patt.09a8ec.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc32_21: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.loc32_20: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { // CHECK:STDOUT: %.Self.frozen.loc32_18: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } // CHECK:STDOUT: %A.loc32_18.2: %Animal.type = symbolic_binding A, 0 [symbolic = %A.loc32_18.1 (constants.%A)] -// CHECK:STDOUT: %.loc32_36: type = splice_block %Edible.ref [concrete = constants.%Edible.type] { -// CHECK:STDOUT: %.Self.frozen.loc32_33: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc32_34: type = splice_block %Edible.ref [concrete = constants.%Edible.type] { +// CHECK:STDOUT: %.Self.frozen.loc32_32: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Edible.ref: type = name_ref Edible, file.%Edible.decl [concrete = constants.%Edible.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %Food.loc32_33.2: %Edible.type = symbolic_binding Food, 1 [symbolic = %Food.loc32_33.1 (constants.%Food.5f8)] -// CHECK:STDOUT: %a.param: @HandleAnimal.%A.as_type.loc32_47.1 (%A.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc32_47.1: type = splice_block %.loc32_47.2 [symbolic = %A.as_type.loc32_47.1 (constants.%A.as_type)] { +// CHECK:STDOUT: %Food.loc32_32.2: %Edible.type = symbolic_binding Food, 1 [symbolic = %Food.loc32_32.1 (constants.%Food.5f8)] +// CHECK:STDOUT: %a.param: @HandleAnimal.%A.as_type.loc32_45.1 (%A.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc32_45.1: type = splice_block %.loc32_45.2 [symbolic = %A.as_type.loc32_45.1 (constants.%A.as_type)] { // CHECK:STDOUT: %A.ref: %Animal.type = name_ref A, %A.loc32_18.2 [symbolic = %A.loc32_18.1 (constants.%A)] -// CHECK:STDOUT: %A.as_type.loc32_47.2: type = facet_access_type %A.ref [symbolic = %A.as_type.loc32_47.1 (constants.%A.as_type)] -// CHECK:STDOUT: %.loc32_47.2: type = converted %A.ref, %A.as_type.loc32_47.2 [symbolic = %A.as_type.loc32_47.1 (constants.%A.as_type)] +// CHECK:STDOUT: %A.as_type.loc32_45.2: type = facet_access_type %A.ref [symbolic = %A.as_type.loc32_45.1 (constants.%A.as_type)] +// CHECK:STDOUT: %.loc32_45.2: type = converted %A.ref, %A.as_type.loc32_45.2 [symbolic = %A.as_type.loc32_45.1 (constants.%A.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @HandleAnimal.%A.as_type.loc32_47.1 (%A.as_type) = wrapper_binding a, %a.param -// CHECK:STDOUT: %food.param: @HandleAnimal.%Food.as_type.loc32_56.1 (%Food.as_type.24e) = value_param call_param1 -// CHECK:STDOUT: %.loc32_56.1: type = splice_block %.loc32_56.2 [symbolic = %Food.as_type.loc32_56.1 (constants.%Food.as_type.24e)] { -// CHECK:STDOUT: %Food.ref: %Edible.type = name_ref Food, %Food.loc32_33.2 [symbolic = %Food.loc32_33.1 (constants.%Food.5f8)] -// CHECK:STDOUT: %Food.as_type.loc32_56.2: type = facet_access_type %Food.ref [symbolic = %Food.as_type.loc32_56.1 (constants.%Food.as_type.24e)] -// CHECK:STDOUT: %.loc32_56.2: type = converted %Food.ref, %Food.as_type.loc32_56.2 [symbolic = %Food.as_type.loc32_56.1 (constants.%Food.as_type.24e)] +// CHECK:STDOUT: %a: @HandleAnimal.%A.as_type.loc32_45.1 (%A.as_type) = wrapper_binding a, %a.param +// CHECK:STDOUT: %food.param: @HandleAnimal.%Food.as_type.loc32_54.1 (%Food.as_type.24e) = value_param call_param1 +// CHECK:STDOUT: %.loc32_54.1: type = splice_block %.loc32_54.2 [symbolic = %Food.as_type.loc32_54.1 (constants.%Food.as_type.24e)] { +// CHECK:STDOUT: %Food.ref: %Edible.type = name_ref Food, %Food.loc32_32.2 [symbolic = %Food.loc32_32.1 (constants.%Food.5f8)] +// CHECK:STDOUT: %Food.as_type.loc32_54.2: type = facet_access_type %Food.ref [symbolic = %Food.as_type.loc32_54.1 (constants.%Food.as_type.24e)] +// CHECK:STDOUT: %.loc32_54.2: type = converted %Food.ref, %Food.as_type.loc32_54.2 [symbolic = %Food.as_type.loc32_54.1 (constants.%Food.as_type.24e)] // CHECK:STDOUT: } -// CHECK:STDOUT: %food: @HandleAnimal.%Food.as_type.loc32_56.1 (%Food.as_type.24e) = wrapper_binding food, %food.param +// CHECK:STDOUT: %food: @HandleAnimal.%Food.as_type.loc32_54.1 (%Food.as_type.24e) = wrapper_binding food, %food.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } @@ -326,14 +326,14 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Eats.type: type = facet_type <@Eats, @Eats(%Food.loc21_20.1)> [symbolic = %Eats.type (constants.%Eats.type.b81)] -// CHECK:STDOUT: %Self.loc21_29.2: @Eats.%Eats.type (%Eats.type.b81) = symbolic_binding Self, 1 [symbolic = %Self.loc21_29.2 (constants.%Self.db3)] +// CHECK:STDOUT: %Self.loc21_28.2: @Eats.%Eats.type (%Eats.type.b81) = symbolic_binding Self, 1 [symbolic = %Self.loc21_28.2 (constants.%Self.db3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc21_29.1: @Eats.%Eats.type (%Eats.type.b81) = symbolic_binding Self, 1 [symbolic = %Self.loc21_29.2 (constants.%Self.db3)] +// CHECK:STDOUT: %Self.loc21_28.1: @Eats.%Eats.type (%Eats.type.b81) = symbolic_binding Self, 1 [symbolic = %Self.loc21_28.2 (constants.%Self.db3)] // CHECK:STDOUT: %Eats.WithSelf.decl = interface_with_self_decl @Eats [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc21_29.1 +// CHECK:STDOUT: .Self = %Self.loc21_28.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -351,26 +351,26 @@ fn F() { // CHECK:STDOUT: witness = %Edible.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @T.as_type.as.Eats.impl(%T.loc26_15.1: %Animal.type, %U.loc26_27.1: %Edible.type) { +// CHECK:STDOUT: generic impl @T.as_type.as.Eats.impl(%T.loc26_15.1: %Animal.type, %U.loc26_26.1: %Edible.type) { // CHECK:STDOUT: %T.patt.loc26_15.2: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_15.2 (constants.%T.patt.e44)] // CHECK:STDOUT: %T.loc26_15.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc26_15.2 (constants.%T.443)] -// CHECK:STDOUT: %U.patt.loc26_27.2: %pattern_type.e90e = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc26_27.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc26_27.2: %Edible.type = symbolic_binding U, 1 [symbolic = %U.loc26_27.2 (constants.%U)] -// CHECK:STDOUT: %T.as_type.loc26_38.2: type = facet_access_type %T.loc26_15.2 [symbolic = %T.as_type.loc26_38.2 (constants.%T.as_type.01d)] -// CHECK:STDOUT: %U.as_type.loc26_49.2: type = facet_access_type %U.loc26_27.2 [symbolic = %U.as_type.loc26_49.2 (constants.%U.as_type)] -// CHECK:STDOUT: %Eats.type.loc26_49.2: type = facet_type <@Eats, @Eats(%U.as_type.loc26_49.2)> [symbolic = %Eats.type.loc26_49.2 (constants.%Eats.type.ceea62.1)] -// CHECK:STDOUT: %Eats.impl_witness.loc26_51.2: = impl_witness %Eats.impl_witness_table, @T.as_type.as.Eats.impl(%T.loc26_15.2, %U.loc26_27.2) [symbolic = %Eats.impl_witness.loc26_51.2 (constants.%Eats.impl_witness.4ca0a7.1)] +// CHECK:STDOUT: %U.patt.loc26_26.2: %pattern_type.e90e = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc26_26.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc26_26.2: %Edible.type = symbolic_binding U, 1 [symbolic = %U.loc26_26.2 (constants.%U)] +// CHECK:STDOUT: %T.as_type.loc26_36.2: type = facet_access_type %T.loc26_15.2 [symbolic = %T.as_type.loc26_36.2 (constants.%T.as_type.01d)] +// CHECK:STDOUT: %U.as_type.loc26_47.2: type = facet_access_type %U.loc26_26.2 [symbolic = %U.as_type.loc26_47.2 (constants.%U.as_type)] +// CHECK:STDOUT: %Eats.type.loc26_47.2: type = facet_type <@Eats, @Eats(%U.as_type.loc26_47.2)> [symbolic = %Eats.type.loc26_47.2 (constants.%Eats.type.ceea62.1)] +// CHECK:STDOUT: %Eats.impl_witness.loc26_49.2: = impl_witness %Eats.impl_witness_table, @T.as_type.as.Eats.impl(%T.loc26_15.2, %U.loc26_26.2) [symbolic = %Eats.impl_witness.loc26_49.2 (constants.%Eats.impl_witness.4ca0a7.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %Eats.type.loc26_49.2 [symbolic = %require_complete (constants.%require_complete.54fb7e.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Eats.type.loc26_47.2 [symbolic = %require_complete (constants.%require_complete.54fb7e.1)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc26_38 as %Eats.type.loc26_49.1 { +// CHECK:STDOUT: impl: %.loc26_36 as %Eats.type.loc26_47.1 { // CHECK:STDOUT: %Eats.impl_witness_table = impl_witness_table (), @T.as_type.as.Eats.impl [concrete] -// CHECK:STDOUT: %Eats.impl_witness.loc26_51.1: = impl_witness %Eats.impl_witness_table, @T.as_type.as.Eats.impl(constants.%T.443, constants.%U) [symbolic = %Eats.impl_witness.loc26_51.2 (constants.%Eats.impl_witness.4ca0a7.1)] +// CHECK:STDOUT: %Eats.impl_witness.loc26_49.1: = impl_witness %Eats.impl_witness_table, @T.as_type.as.Eats.impl(constants.%T.443, constants.%U) [symbolic = %Eats.impl_witness.loc26_49.2 (constants.%Eats.impl_witness.4ca0a7.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %Eats.type.loc26_49.1 -// CHECK:STDOUT: witness = %Eats.impl_witness.loc26_51.1 +// CHECK:STDOUT: extend %Eats.type.loc26_47.1 +// CHECK:STDOUT: witness = %Eats.impl_witness.loc26_49.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -399,27 +399,27 @@ fn F() { // CHECK:STDOUT: .Self = constants.%Goat // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Feed(%Food.loc31_13.2: %Edible.type, %T.loc31_25.2: @Feed.%Eats.type.loc31_37.1 (%Eats.type.eb4)) { +// CHECK:STDOUT: generic fn @Feed(%Food.loc31_13.2: %Edible.type, %T.loc31_24.2: @Feed.%Eats.type.loc31_35.1 (%Eats.type.eb4)) { // CHECK:STDOUT: %Food.patt.loc31_13.2: %pattern_type.e90e = symbolic_binding_pattern Food, 0 [symbolic = %Food.patt.loc31_13.2 (constants.%Food.patt.bbd)] // CHECK:STDOUT: %Food.loc31_13.1: %Edible.type = symbolic_binding Food, 0 [symbolic = %Food.loc31_13.1 (constants.%Food.196)] -// CHECK:STDOUT: %Food.as_type.loc31_37.1: type = facet_access_type %Food.loc31_13.1 [symbolic = %Food.as_type.loc31_37.1 (constants.%Food.as_type.bca)] -// CHECK:STDOUT: %Eats.type.loc31_37.1: type = facet_type <@Eats, @Eats(%Food.as_type.loc31_37.1)> [symbolic = %Eats.type.loc31_37.1 (constants.%Eats.type.eb4)] -// CHECK:STDOUT: %pattern_type.loc31_25: type = pattern_type %Eats.type.loc31_37.1 [symbolic = %pattern_type.loc31_25 (constants.%pattern_type.560)] -// CHECK:STDOUT: %T.patt.loc31_25.2: @Feed.%pattern_type.loc31_25 (%pattern_type.560) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc31_25.2 (constants.%T.patt.02f)] -// CHECK:STDOUT: %T.loc31_25.1: @Feed.%Eats.type.loc31_37.1 (%Eats.type.eb4) = symbolic_binding T, 1 [symbolic = %T.loc31_25.1 (constants.%T.b01)] -// CHECK:STDOUT: %T.as_type.loc31_50.1: type = facet_access_type %T.loc31_25.1 [symbolic = %T.as_type.loc31_50.1 (constants.%T.as_type.b84)] -// CHECK:STDOUT: %pattern_type.loc31_48: type = pattern_type %T.as_type.loc31_50.1 [symbolic = %pattern_type.loc31_48 (constants.%pattern_type.371)] -// CHECK:STDOUT: %e.param_patt.loc31_48.2: @Feed.%pattern_type.loc31_48 (%pattern_type.371) = value_param_pattern [symbolic = %e.param_patt.loc31_48.2 (constants.%e.param_patt.32e)] -// CHECK:STDOUT: %e.patt.loc31_48.2: @Feed.%pattern_type.loc31_48 (%pattern_type.371) = at_binding_pattern e, %e.param_patt.loc31_48.2 [symbolic = %e.patt.loc31_48.2 (constants.%e.patt.af1)] -// CHECK:STDOUT: %pattern_type.loc31_64: type = pattern_type %Food.as_type.loc31_37.1 [symbolic = %pattern_type.loc31_64 (constants.%pattern_type.e40)] -// CHECK:STDOUT: %food.param_patt.loc31_64.2: @Feed.%pattern_type.loc31_64 (%pattern_type.e40) = value_param_pattern [symbolic = %food.param_patt.loc31_64.2 (constants.%food.param_patt.1bd)] -// CHECK:STDOUT: %food.patt.loc31_64.2: @Feed.%pattern_type.loc31_64 (%pattern_type.e40) = at_binding_pattern food, %food.param_patt.loc31_64.2 [symbolic = %food.patt.loc31_64.2 (constants.%food.patt.bcf)] +// CHECK:STDOUT: %Food.as_type.loc31_35.1: type = facet_access_type %Food.loc31_13.1 [symbolic = %Food.as_type.loc31_35.1 (constants.%Food.as_type.bca)] +// CHECK:STDOUT: %Eats.type.loc31_35.1: type = facet_type <@Eats, @Eats(%Food.as_type.loc31_35.1)> [symbolic = %Eats.type.loc31_35.1 (constants.%Eats.type.eb4)] +// CHECK:STDOUT: %pattern_type.loc31_24: type = pattern_type %Eats.type.loc31_35.1 [symbolic = %pattern_type.loc31_24 (constants.%pattern_type.560)] +// CHECK:STDOUT: %T.patt.loc31_24.2: @Feed.%pattern_type.loc31_24 (%pattern_type.560) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc31_24.2 (constants.%T.patt.02f)] +// CHECK:STDOUT: %T.loc31_24.1: @Feed.%Eats.type.loc31_35.1 (%Eats.type.eb4) = symbolic_binding T, 1 [symbolic = %T.loc31_24.1 (constants.%T.b01)] +// CHECK:STDOUT: %T.as_type.loc31_48.1: type = facet_access_type %T.loc31_24.1 [symbolic = %T.as_type.loc31_48.1 (constants.%T.as_type.b84)] +// CHECK:STDOUT: %pattern_type.loc31_46: type = pattern_type %T.as_type.loc31_48.1 [symbolic = %pattern_type.loc31_46 (constants.%pattern_type.371)] +// CHECK:STDOUT: %e.param_patt.loc31_46.2: @Feed.%pattern_type.loc31_46 (%pattern_type.371) = value_param_pattern [symbolic = %e.param_patt.loc31_46.2 (constants.%e.param_patt.32e)] +// CHECK:STDOUT: %e.patt.loc31_46.2: @Feed.%pattern_type.loc31_46 (%pattern_type.371) = at_binding_pattern e, %e.param_patt.loc31_46.2 [symbolic = %e.patt.loc31_46.2 (constants.%e.patt.af1)] +// CHECK:STDOUT: %pattern_type.loc31_62: type = pattern_type %Food.as_type.loc31_35.1 [symbolic = %pattern_type.loc31_62 (constants.%pattern_type.e40)] +// CHECK:STDOUT: %food.param_patt.loc31_62.2: @Feed.%pattern_type.loc31_62 (%pattern_type.e40) = value_param_pattern [symbolic = %food.param_patt.loc31_62.2 (constants.%food.param_patt.1bd)] +// CHECK:STDOUT: %food.patt.loc31_62.2: @Feed.%pattern_type.loc31_62 (%pattern_type.e40) = at_binding_pattern food, %food.param_patt.loc31_62.2 [symbolic = %food.patt.loc31_62.2 (constants.%food.patt.bcf)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc31_48: = require_complete_type %T.as_type.loc31_50.1 [symbolic = %require_complete.loc31_48 (constants.%require_complete.363)] -// CHECK:STDOUT: %require_complete.loc31_64: = require_complete_type %Food.as_type.loc31_37.1 [symbolic = %require_complete.loc31_64 (constants.%require_complete.d57)] +// CHECK:STDOUT: %require_complete.loc31_46: = require_complete_type %T.as_type.loc31_48.1 [symbolic = %require_complete.loc31_46 (constants.%require_complete.363)] +// CHECK:STDOUT: %require_complete.loc31_62: = require_complete_type %Food.as_type.loc31_35.1 [symbolic = %require_complete.loc31_62 (constants.%require_complete.d57)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%e.param: @Feed.%T.as_type.loc31_50.1 (%T.as_type.b84), %food.param: @Feed.%Food.as_type.loc31_37.1 (%Food.as_type.bca)) { +// CHECK:STDOUT: fn(%e.param: @Feed.%T.as_type.loc31_48.1 (%T.as_type.b84), %food.param: @Feed.%Food.as_type.loc31_35.1 (%Food.as_type.bca)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -427,40 +427,40 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HandleAnimal(%A.loc32_18.2: %Animal.type, %Food.loc32_33.2: %Edible.type) { +// CHECK:STDOUT: generic fn @HandleAnimal(%A.loc32_18.2: %Animal.type, %Food.loc32_32.2: %Edible.type) { // CHECK:STDOUT: %A.patt.loc32_18.2: %pattern_type.333 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc32_18.2 (constants.%A.patt)] // CHECK:STDOUT: %A.loc32_18.1: %Animal.type = symbolic_binding A, 0 [symbolic = %A.loc32_18.1 (constants.%A)] -// CHECK:STDOUT: %Food.patt.loc32_33.2: %pattern_type.e90e = symbolic_binding_pattern Food, 1 [symbolic = %Food.patt.loc32_33.2 (constants.%Food.patt.0d1)] -// CHECK:STDOUT: %Food.loc32_33.1: %Edible.type = symbolic_binding Food, 1 [symbolic = %Food.loc32_33.1 (constants.%Food.5f8)] -// CHECK:STDOUT: %A.as_type.loc32_47.1: type = facet_access_type %A.loc32_18.1 [symbolic = %A.as_type.loc32_47.1 (constants.%A.as_type)] -// CHECK:STDOUT: %pattern_type.loc32_45: type = pattern_type %A.as_type.loc32_47.1 [symbolic = %pattern_type.loc32_45 (constants.%pattern_type.e90c)] -// CHECK:STDOUT: %a.param_patt.loc32_45.2: @HandleAnimal.%pattern_type.loc32_45 (%pattern_type.e90c) = value_param_pattern [symbolic = %a.param_patt.loc32_45.2 (constants.%a.param_patt.84e)] -// CHECK:STDOUT: %a.patt.loc32_45.2: @HandleAnimal.%pattern_type.loc32_45 (%pattern_type.e90c) = at_binding_pattern a, %a.param_patt.loc32_45.2 [symbolic = %a.patt.loc32_45.2 (constants.%a.patt.3e6)] -// CHECK:STDOUT: %Food.as_type.loc32_56.1: type = facet_access_type %Food.loc32_33.1 [symbolic = %Food.as_type.loc32_56.1 (constants.%Food.as_type.24e)] -// CHECK:STDOUT: %pattern_type.loc32_54: type = pattern_type %Food.as_type.loc32_56.1 [symbolic = %pattern_type.loc32_54 (constants.%pattern_type.ea8)] -// CHECK:STDOUT: %food.param_patt.loc32_54.2: @HandleAnimal.%pattern_type.loc32_54 (%pattern_type.ea8) = value_param_pattern [symbolic = %food.param_patt.loc32_54.2 (constants.%food.param_patt.38d)] -// CHECK:STDOUT: %food.patt.loc32_54.2: @HandleAnimal.%pattern_type.loc32_54 (%pattern_type.ea8) = at_binding_pattern food, %food.param_patt.loc32_54.2 [symbolic = %food.patt.loc32_54.2 (constants.%food.patt.09a8ec.1)] +// CHECK:STDOUT: %Food.patt.loc32_32.2: %pattern_type.e90e = symbolic_binding_pattern Food, 1 [symbolic = %Food.patt.loc32_32.2 (constants.%Food.patt.0d1)] +// CHECK:STDOUT: %Food.loc32_32.1: %Edible.type = symbolic_binding Food, 1 [symbolic = %Food.loc32_32.1 (constants.%Food.5f8)] +// CHECK:STDOUT: %A.as_type.loc32_45.1: type = facet_access_type %A.loc32_18.1 [symbolic = %A.as_type.loc32_45.1 (constants.%A.as_type)] +// CHECK:STDOUT: %pattern_type.loc32_43: type = pattern_type %A.as_type.loc32_45.1 [symbolic = %pattern_type.loc32_43 (constants.%pattern_type.e90c)] +// CHECK:STDOUT: %a.param_patt.loc32_43.2: @HandleAnimal.%pattern_type.loc32_43 (%pattern_type.e90c) = value_param_pattern [symbolic = %a.param_patt.loc32_43.2 (constants.%a.param_patt.84e)] +// CHECK:STDOUT: %a.patt.loc32_43.2: @HandleAnimal.%pattern_type.loc32_43 (%pattern_type.e90c) = at_binding_pattern a, %a.param_patt.loc32_43.2 [symbolic = %a.patt.loc32_43.2 (constants.%a.patt.3e6)] +// CHECK:STDOUT: %Food.as_type.loc32_54.1: type = facet_access_type %Food.loc32_32.1 [symbolic = %Food.as_type.loc32_54.1 (constants.%Food.as_type.24e)] +// CHECK:STDOUT: %pattern_type.loc32_52: type = pattern_type %Food.as_type.loc32_54.1 [symbolic = %pattern_type.loc32_52 (constants.%pattern_type.ea8)] +// CHECK:STDOUT: %food.param_patt.loc32_52.2: @HandleAnimal.%pattern_type.loc32_52 (%pattern_type.ea8) = value_param_pattern [symbolic = %food.param_patt.loc32_52.2 (constants.%food.param_patt.38d)] +// CHECK:STDOUT: %food.patt.loc32_52.2: @HandleAnimal.%pattern_type.loc32_52 (%pattern_type.ea8) = at_binding_pattern food, %food.param_patt.loc32_52.2 [symbolic = %food.patt.loc32_52.2 (constants.%food.patt.09a8ec.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc32_45: = require_complete_type %A.as_type.loc32_47.1 [symbolic = %require_complete.loc32_45 (constants.%require_complete.db4)] -// CHECK:STDOUT: %require_complete.loc32_54: = require_complete_type %Food.as_type.loc32_56.1 [symbolic = %require_complete.loc32_54 (constants.%require_complete.3cc)] -// CHECK:STDOUT: %.loc32_76.4: require_specific_def_type = require_specific_def @T.as_type.as.Eats.impl(%A.loc32_18.1, %Food.loc32_33.1) [symbolic = %.loc32_76.4 (constants.%.86d)] -// CHECK:STDOUT: %Eats.type: type = facet_type <@Eats, @Eats(%Food.as_type.loc32_56.1)> [symbolic = %Eats.type (constants.%Eats.type.ceea62.2)] -// CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %A.loc32_18.1, @Eats, @Eats(%Food.as_type.loc32_56.1) [symbolic = %Eats.lookup_impl_witness (constants.%Eats.lookup_impl_witness)] -// CHECK:STDOUT: %Eats.facet.loc32_76.2: @HandleAnimal.%Eats.type (%Eats.type.ceea62.2) = facet_value %A.as_type.loc32_47.1, (%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc32_76.2 (constants.%Eats.facet.f11)] -// CHECK:STDOUT: %Feed.specific_fn.loc32_64.2: = specific_function constants.%Feed, @Feed(%Food.loc32_33.1, %Eats.facet.loc32_76.2) [symbolic = %Feed.specific_fn.loc32_64.2 (constants.%Feed.specific_fn.292)] +// CHECK:STDOUT: %require_complete.loc32_43: = require_complete_type %A.as_type.loc32_45.1 [symbolic = %require_complete.loc32_43 (constants.%require_complete.db4)] +// CHECK:STDOUT: %require_complete.loc32_52: = require_complete_type %Food.as_type.loc32_54.1 [symbolic = %require_complete.loc32_52 (constants.%require_complete.3cc)] +// CHECK:STDOUT: %.loc32_74.4: require_specific_def_type = require_specific_def @T.as_type.as.Eats.impl(%A.loc32_18.1, %Food.loc32_32.1) [symbolic = %.loc32_74.4 (constants.%.86d)] +// CHECK:STDOUT: %Eats.type: type = facet_type <@Eats, @Eats(%Food.as_type.loc32_54.1)> [symbolic = %Eats.type (constants.%Eats.type.ceea62.2)] +// CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %A.loc32_18.1, @Eats, @Eats(%Food.as_type.loc32_54.1) [symbolic = %Eats.lookup_impl_witness (constants.%Eats.lookup_impl_witness)] +// CHECK:STDOUT: %Eats.facet.loc32_74.2: @HandleAnimal.%Eats.type (%Eats.type.ceea62.2) = facet_value %A.as_type.loc32_45.1, (%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc32_74.2 (constants.%Eats.facet.f11)] +// CHECK:STDOUT: %Feed.specific_fn.loc32_62.2: = specific_function constants.%Feed, @Feed(%Food.loc32_32.1, %Eats.facet.loc32_74.2) [symbolic = %Feed.specific_fn.loc32_62.2 (constants.%Feed.specific_fn.292)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @HandleAnimal.%A.as_type.loc32_47.1 (%A.as_type), %food.param: @HandleAnimal.%Food.as_type.loc32_56.1 (%Food.as_type.24e)) { +// CHECK:STDOUT: fn(%a.param: @HandleAnimal.%A.as_type.loc32_45.1 (%A.as_type), %food.param: @HandleAnimal.%Food.as_type.loc32_54.1 (%Food.as_type.24e)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Feed.ref: %Feed.type = name_ref Feed, file.%Feed.decl [concrete = constants.%Feed] -// CHECK:STDOUT: %a.ref: @HandleAnimal.%A.as_type.loc32_47.1 (%A.as_type) = name_ref a, %a -// CHECK:STDOUT: %food.ref: @HandleAnimal.%Food.as_type.loc32_56.1 (%Food.as_type.24e) = name_ref food, %food -// CHECK:STDOUT: %.loc32_76.1: %Edible.type = converted constants.%Food.as_type.24e, constants.%Food.5f8 [symbolic = %Food.loc32_33.1 (constants.%Food.5f8)] -// CHECK:STDOUT: %.loc32_76.2: %Edible.type = converted constants.%Food.as_type.24e, constants.%Food.5f8 [symbolic = %Food.loc32_33.1 (constants.%Food.5f8)] -// CHECK:STDOUT: %Eats.facet.loc32_76.1: @HandleAnimal.%Eats.type (%Eats.type.ceea62.2) = facet_value constants.%A.as_type, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc32_76.2 (constants.%Eats.facet.f11)] -// CHECK:STDOUT: %.loc32_76.3: @HandleAnimal.%Eats.type (%Eats.type.ceea62.2) = converted constants.%A.as_type, %Eats.facet.loc32_76.1 [symbolic = %Eats.facet.loc32_76.2 (constants.%Eats.facet.f11)] -// CHECK:STDOUT: %Feed.specific_fn.loc32_64.1: = specific_function %Feed.ref, @Feed(constants.%Food.5f8, constants.%Eats.facet.f11) [symbolic = %Feed.specific_fn.loc32_64.2 (constants.%Feed.specific_fn.292)] -// CHECK:STDOUT: %Feed.call: init %empty_tuple.type = call %Feed.specific_fn.loc32_64.1(%a.ref, %food.ref) +// CHECK:STDOUT: %a.ref: @HandleAnimal.%A.as_type.loc32_45.1 (%A.as_type) = name_ref a, %a +// CHECK:STDOUT: %food.ref: @HandleAnimal.%Food.as_type.loc32_54.1 (%Food.as_type.24e) = name_ref food, %food +// CHECK:STDOUT: %.loc32_74.1: %Edible.type = converted constants.%Food.as_type.24e, constants.%Food.5f8 [symbolic = %Food.loc32_32.1 (constants.%Food.5f8)] +// CHECK:STDOUT: %.loc32_74.2: %Edible.type = converted constants.%Food.as_type.24e, constants.%Food.5f8 [symbolic = %Food.loc32_32.1 (constants.%Food.5f8)] +// CHECK:STDOUT: %Eats.facet.loc32_74.1: @HandleAnimal.%Eats.type (%Eats.type.ceea62.2) = facet_value constants.%A.as_type, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc32_74.2 (constants.%Eats.facet.f11)] +// CHECK:STDOUT: %.loc32_74.3: @HandleAnimal.%Eats.type (%Eats.type.ceea62.2) = converted constants.%A.as_type, %Eats.facet.loc32_74.1 [symbolic = %Eats.facet.loc32_74.2 (constants.%Eats.facet.f11)] +// CHECK:STDOUT: %Feed.specific_fn.loc32_62.1: = specific_function %Feed.ref, @Feed(constants.%Food.5f8, constants.%Eats.facet.f11) [symbolic = %Feed.specific_fn.loc32_62.2 (constants.%Feed.specific_fn.292)] +// CHECK:STDOUT: %Feed.call: init %empty_tuple.type = call %Feed.specific_fn.loc32_62.1(%a.ref, %food.ref) // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -542,18 +542,18 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Eats.type => constants.%Eats.type.ceea62.1 -// CHECK:STDOUT: %Self.loc21_29.2 => constants.%Self.e18 +// CHECK:STDOUT: %Self.loc21_28.2 => constants.%Self.e18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as_type.as.Eats.impl(constants.%T.443, constants.%U) { // CHECK:STDOUT: %T.patt.loc26_15.2 => constants.%T.patt.e44 // CHECK:STDOUT: %T.loc26_15.2 => constants.%T.443 -// CHECK:STDOUT: %U.patt.loc26_27.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc26_27.2 => constants.%U -// CHECK:STDOUT: %T.as_type.loc26_38.2 => constants.%T.as_type.01d -// CHECK:STDOUT: %U.as_type.loc26_49.2 => constants.%U.as_type -// CHECK:STDOUT: %Eats.type.loc26_49.2 => constants.%Eats.type.ceea62.1 -// CHECK:STDOUT: %Eats.impl_witness.loc26_51.2 => constants.%Eats.impl_witness.4ca0a7.1 +// CHECK:STDOUT: %U.patt.loc26_26.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc26_26.2 => constants.%U +// CHECK:STDOUT: %T.as_type.loc26_36.2 => constants.%T.as_type.01d +// CHECK:STDOUT: %U.as_type.loc26_47.2 => constants.%U.as_type +// CHECK:STDOUT: %Eats.type.loc26_47.2 => constants.%Eats.type.ceea62.1 +// CHECK:STDOUT: %Eats.impl_witness.loc26_49.2 => constants.%Eats.impl_witness.4ca0a7.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Eats.WithSelf(constants.%U.as_type, constants.%Self.db3) { @@ -574,7 +574,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Eats.type => constants.%Eats.type.eb4 -// CHECK:STDOUT: %Self.loc21_29.2 => constants.%Self.377 +// CHECK:STDOUT: %Self.loc21_28.2 => constants.%Self.377 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Eats.WithSelf(constants.%Food.as_type.bca, constants.%Self.db3) { @@ -584,33 +584,33 @@ fn F() { // CHECK:STDOUT: specific @Feed(constants.%Food.196, constants.%T.b01) { // CHECK:STDOUT: %Food.patt.loc31_13.2 => constants.%Food.patt.bbd // CHECK:STDOUT: %Food.loc31_13.1 => constants.%Food.196 -// CHECK:STDOUT: %Food.as_type.loc31_37.1 => constants.%Food.as_type.bca -// CHECK:STDOUT: %Eats.type.loc31_37.1 => constants.%Eats.type.eb4 -// CHECK:STDOUT: %pattern_type.loc31_25 => constants.%pattern_type.560 -// CHECK:STDOUT: %T.patt.loc31_25.2 => constants.%T.patt.02f -// CHECK:STDOUT: %T.loc31_25.1 => constants.%T.b01 -// CHECK:STDOUT: %T.as_type.loc31_50.1 => constants.%T.as_type.b84 -// CHECK:STDOUT: %pattern_type.loc31_48 => constants.%pattern_type.371 -// CHECK:STDOUT: %e.param_patt.loc31_48.2 => constants.%e.param_patt.32e -// CHECK:STDOUT: %e.patt.loc31_48.2 => constants.%e.patt.af1 -// CHECK:STDOUT: %pattern_type.loc31_64 => constants.%pattern_type.e40 -// CHECK:STDOUT: %food.param_patt.loc31_64.2 => constants.%food.param_patt.1bd -// CHECK:STDOUT: %food.patt.loc31_64.2 => constants.%food.patt.bcf +// CHECK:STDOUT: %Food.as_type.loc31_35.1 => constants.%Food.as_type.bca +// CHECK:STDOUT: %Eats.type.loc31_35.1 => constants.%Eats.type.eb4 +// CHECK:STDOUT: %pattern_type.loc31_24 => constants.%pattern_type.560 +// CHECK:STDOUT: %T.patt.loc31_24.2 => constants.%T.patt.02f +// CHECK:STDOUT: %T.loc31_24.1 => constants.%T.b01 +// CHECK:STDOUT: %T.as_type.loc31_48.1 => constants.%T.as_type.b84 +// CHECK:STDOUT: %pattern_type.loc31_46 => constants.%pattern_type.371 +// CHECK:STDOUT: %e.param_patt.loc31_46.2 => constants.%e.param_patt.32e +// CHECK:STDOUT: %e.patt.loc31_46.2 => constants.%e.patt.af1 +// CHECK:STDOUT: %pattern_type.loc31_62 => constants.%pattern_type.e40 +// CHECK:STDOUT: %food.param_patt.loc31_62.2 => constants.%food.param_patt.1bd +// CHECK:STDOUT: %food.patt.loc31_62.2 => constants.%food.patt.bcf // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%A, constants.%Food.5f8) { // CHECK:STDOUT: %A.patt.loc32_18.2 => constants.%A.patt // CHECK:STDOUT: %A.loc32_18.1 => constants.%A -// CHECK:STDOUT: %Food.patt.loc32_33.2 => constants.%Food.patt.0d1 -// CHECK:STDOUT: %Food.loc32_33.1 => constants.%Food.5f8 -// CHECK:STDOUT: %A.as_type.loc32_47.1 => constants.%A.as_type -// CHECK:STDOUT: %pattern_type.loc32_45 => constants.%pattern_type.e90c -// CHECK:STDOUT: %a.param_patt.loc32_45.2 => constants.%a.param_patt.84e -// CHECK:STDOUT: %a.patt.loc32_45.2 => constants.%a.patt.3e6 -// CHECK:STDOUT: %Food.as_type.loc32_56.1 => constants.%Food.as_type.24e -// CHECK:STDOUT: %pattern_type.loc32_54 => constants.%pattern_type.ea8 -// CHECK:STDOUT: %food.param_patt.loc32_54.2 => constants.%food.param_patt.38d -// CHECK:STDOUT: %food.patt.loc32_54.2 => constants.%food.patt.09a8ec.1 +// CHECK:STDOUT: %Food.patt.loc32_32.2 => constants.%Food.patt.0d1 +// CHECK:STDOUT: %Food.loc32_32.1 => constants.%Food.5f8 +// CHECK:STDOUT: %A.as_type.loc32_45.1 => constants.%A.as_type +// CHECK:STDOUT: %pattern_type.loc32_43 => constants.%pattern_type.e90c +// CHECK:STDOUT: %a.param_patt.loc32_43.2 => constants.%a.param_patt.84e +// CHECK:STDOUT: %a.patt.loc32_43.2 => constants.%a.patt.3e6 +// CHECK:STDOUT: %Food.as_type.loc32_54.1 => constants.%Food.as_type.24e +// CHECK:STDOUT: %pattern_type.loc32_52 => constants.%pattern_type.ea8 +// CHECK:STDOUT: %food.param_patt.loc32_52.2 => constants.%food.param_patt.38d +// CHECK:STDOUT: %food.patt.loc32_52.2 => constants.%food.patt.09a8ec.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Eats(constants.%Food.as_type.24e) { @@ -621,12 +621,12 @@ fn F() { // CHECK:STDOUT: specific @T.as_type.as.Eats.impl(constants.%A, constants.%Food.5f8) { // CHECK:STDOUT: %T.patt.loc26_15.2 => constants.%T.patt.e44 // CHECK:STDOUT: %T.loc26_15.2 => constants.%A -// CHECK:STDOUT: %U.patt.loc26_27.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc26_27.2 => constants.%Food.5f8 -// CHECK:STDOUT: %T.as_type.loc26_38.2 => constants.%A.as_type -// CHECK:STDOUT: %U.as_type.loc26_49.2 => constants.%Food.as_type.24e -// CHECK:STDOUT: %Eats.type.loc26_49.2 => constants.%Eats.type.ceea62.2 -// CHECK:STDOUT: %Eats.impl_witness.loc26_51.2 => constants.%Eats.impl_witness.4ca0a7.2 +// CHECK:STDOUT: %U.patt.loc26_26.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc26_26.2 => constants.%Food.5f8 +// CHECK:STDOUT: %T.as_type.loc26_36.2 => constants.%A.as_type +// CHECK:STDOUT: %U.as_type.loc26_47.2 => constants.%Food.as_type.24e +// CHECK:STDOUT: %Eats.type.loc26_47.2 => constants.%Eats.type.ceea62.2 +// CHECK:STDOUT: %Eats.impl_witness.loc26_49.2 => constants.%Eats.impl_witness.4ca0a7.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.54fb7e.2 @@ -635,57 +635,57 @@ fn F() { // CHECK:STDOUT: specific @Feed(constants.%Food.5f8, constants.%Eats.facet.f11) { // CHECK:STDOUT: %Food.patt.loc31_13.2 => constants.%Food.patt.bbd // CHECK:STDOUT: %Food.loc31_13.1 => constants.%Food.5f8 -// CHECK:STDOUT: %Food.as_type.loc31_37.1 => constants.%Food.as_type.24e -// CHECK:STDOUT: %Eats.type.loc31_37.1 => constants.%Eats.type.ceea62.2 -// CHECK:STDOUT: %pattern_type.loc31_25 => constants.%pattern_type.efc -// CHECK:STDOUT: %T.patt.loc31_25.2 => constants.%T.patt.59c -// CHECK:STDOUT: %T.loc31_25.1 => constants.%Eats.facet.f11 -// CHECK:STDOUT: %T.as_type.loc31_50.1 => constants.%A.as_type -// CHECK:STDOUT: %pattern_type.loc31_48 => constants.%pattern_type.e90c -// CHECK:STDOUT: %e.param_patt.loc31_48.2 => constants.%e.param_patt.1c7 -// CHECK:STDOUT: %e.patt.loc31_48.2 => constants.%e.patt.637 -// CHECK:STDOUT: %pattern_type.loc31_64 => constants.%pattern_type.ea8 -// CHECK:STDOUT: %food.param_patt.loc31_64.2 => constants.%food.param_patt.38d -// CHECK:STDOUT: %food.patt.loc31_64.2 => constants.%food.patt.09a8ec.2 +// CHECK:STDOUT: %Food.as_type.loc31_35.1 => constants.%Food.as_type.24e +// CHECK:STDOUT: %Eats.type.loc31_35.1 => constants.%Eats.type.ceea62.2 +// CHECK:STDOUT: %pattern_type.loc31_24 => constants.%pattern_type.efc +// CHECK:STDOUT: %T.patt.loc31_24.2 => constants.%T.patt.59c +// CHECK:STDOUT: %T.loc31_24.1 => constants.%Eats.facet.f11 +// CHECK:STDOUT: %T.as_type.loc31_48.1 => constants.%A.as_type +// CHECK:STDOUT: %pattern_type.loc31_46 => constants.%pattern_type.e90c +// CHECK:STDOUT: %e.param_patt.loc31_46.2 => constants.%e.param_patt.1c7 +// CHECK:STDOUT: %e.patt.loc31_46.2 => constants.%e.patt.637 +// CHECK:STDOUT: %pattern_type.loc31_62 => constants.%pattern_type.ea8 +// CHECK:STDOUT: %food.param_patt.loc31_62.2 => constants.%food.param_patt.38d +// CHECK:STDOUT: %food.patt.loc31_62.2 => constants.%food.patt.09a8ec.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc31_48 => constants.%require_complete.db4 -// CHECK:STDOUT: %require_complete.loc31_64 => constants.%require_complete.3cc +// CHECK:STDOUT: %require_complete.loc31_46 => constants.%require_complete.db4 +// CHECK:STDOUT: %require_complete.loc31_62 => constants.%require_complete.3cc // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%Animal.facet, constants.%Edible.facet) { // CHECK:STDOUT: %A.patt.loc32_18.2 => constants.%A.patt // CHECK:STDOUT: %A.loc32_18.1 => constants.%Animal.facet -// CHECK:STDOUT: %Food.patt.loc32_33.2 => constants.%Food.patt.0d1 -// CHECK:STDOUT: %Food.loc32_33.1 => constants.%Edible.facet -// CHECK:STDOUT: %A.as_type.loc32_47.1 => constants.%Goat -// CHECK:STDOUT: %pattern_type.loc32_45 => constants.%pattern_type.283 -// CHECK:STDOUT: %a.param_patt.loc32_45.2 => constants.%a.param_patt.8f5 -// CHECK:STDOUT: %a.patt.loc32_45.2 => constants.%a.patt.8aa -// CHECK:STDOUT: %Food.as_type.loc32_56.1 => constants.%Grass -// CHECK:STDOUT: %pattern_type.loc32_54 => constants.%pattern_type.92e -// CHECK:STDOUT: %food.param_patt.loc32_54.2 => constants.%food.param_patt.42e -// CHECK:STDOUT: %food.patt.loc32_54.2 => constants.%food.patt.b2a068.1 +// CHECK:STDOUT: %Food.patt.loc32_32.2 => constants.%Food.patt.0d1 +// CHECK:STDOUT: %Food.loc32_32.1 => constants.%Edible.facet +// CHECK:STDOUT: %A.as_type.loc32_45.1 => constants.%Goat +// CHECK:STDOUT: %pattern_type.loc32_43 => constants.%pattern_type.283 +// CHECK:STDOUT: %a.param_patt.loc32_43.2 => constants.%a.param_patt.8f5 +// CHECK:STDOUT: %a.patt.loc32_43.2 => constants.%a.patt.8aa +// CHECK:STDOUT: %Food.as_type.loc32_54.1 => constants.%Grass +// CHECK:STDOUT: %pattern_type.loc32_52 => constants.%pattern_type.92e +// CHECK:STDOUT: %food.param_patt.loc32_52.2 => constants.%food.param_patt.42e +// CHECK:STDOUT: %food.patt.loc32_52.2 => constants.%food.patt.b2a068.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc32_45 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc32_54 => constants.%complete_type.357 -// CHECK:STDOUT: %.loc32_76.4 => constants.%.86e +// CHECK:STDOUT: %require_complete.loc32_43 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc32_52 => constants.%complete_type.357 +// CHECK:STDOUT: %.loc32_74.4 => constants.%.86e // CHECK:STDOUT: %Eats.type => constants.%Eats.type.682 // CHECK:STDOUT: %Eats.lookup_impl_witness => constants.%Eats.impl_witness.fd5 -// CHECK:STDOUT: %Eats.facet.loc32_76.2 => constants.%Eats.facet.d00 -// CHECK:STDOUT: %Feed.specific_fn.loc32_64.2 => constants.%Feed.specific_fn.166 +// CHECK:STDOUT: %Eats.facet.loc32_74.2 => constants.%Eats.facet.d00 +// CHECK:STDOUT: %Feed.specific_fn.loc32_62.2 => constants.%Feed.specific_fn.166 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as_type.as.Eats.impl(constants.%Animal.facet, constants.%Edible.facet) { // CHECK:STDOUT: %T.patt.loc26_15.2 => constants.%T.patt.e44 // CHECK:STDOUT: %T.loc26_15.2 => constants.%Animal.facet -// CHECK:STDOUT: %U.patt.loc26_27.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc26_27.2 => constants.%Edible.facet -// CHECK:STDOUT: %T.as_type.loc26_38.2 => constants.%Goat -// CHECK:STDOUT: %U.as_type.loc26_49.2 => constants.%Grass -// CHECK:STDOUT: %Eats.type.loc26_49.2 => constants.%Eats.type.682 -// CHECK:STDOUT: %Eats.impl_witness.loc26_51.2 => constants.%Eats.impl_witness.fd5 +// CHECK:STDOUT: %U.patt.loc26_26.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc26_26.2 => constants.%Edible.facet +// CHECK:STDOUT: %T.as_type.loc26_36.2 => constants.%Goat +// CHECK:STDOUT: %U.as_type.loc26_47.2 => constants.%Grass +// CHECK:STDOUT: %Eats.type.loc26_47.2 => constants.%Eats.type.682 +// CHECK:STDOUT: %Eats.impl_witness.loc26_49.2 => constants.%Eats.impl_witness.fd5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.70f @@ -697,7 +697,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Eats.type => constants.%Eats.type.682 -// CHECK:STDOUT: %Self.loc21_29.2 => constants.%Self.3ec +// CHECK:STDOUT: %Self.loc21_28.2 => constants.%Self.3ec // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Eats.WithSelf(constants.%Grass, constants.%Self.db3) { @@ -707,21 +707,21 @@ fn F() { // CHECK:STDOUT: specific @Feed(constants.%Edible.facet, constants.%Eats.facet.d00) { // CHECK:STDOUT: %Food.patt.loc31_13.2 => constants.%Food.patt.bbd // CHECK:STDOUT: %Food.loc31_13.1 => constants.%Edible.facet -// CHECK:STDOUT: %Food.as_type.loc31_37.1 => constants.%Grass -// CHECK:STDOUT: %Eats.type.loc31_37.1 => constants.%Eats.type.682 -// CHECK:STDOUT: %pattern_type.loc31_25 => constants.%pattern_type.a69 -// CHECK:STDOUT: %T.patt.loc31_25.2 => constants.%T.patt.55e -// CHECK:STDOUT: %T.loc31_25.1 => constants.%Eats.facet.d00 -// CHECK:STDOUT: %T.as_type.loc31_50.1 => constants.%Goat -// CHECK:STDOUT: %pattern_type.loc31_48 => constants.%pattern_type.283 -// CHECK:STDOUT: %e.param_patt.loc31_48.2 => constants.%e.param_patt.b2f -// CHECK:STDOUT: %e.patt.loc31_48.2 => constants.%e.patt.ccf -// CHECK:STDOUT: %pattern_type.loc31_64 => constants.%pattern_type.92e -// CHECK:STDOUT: %food.param_patt.loc31_64.2 => constants.%food.param_patt.42e -// CHECK:STDOUT: %food.patt.loc31_64.2 => constants.%food.patt.b2a068.2 +// CHECK:STDOUT: %Food.as_type.loc31_35.1 => constants.%Grass +// CHECK:STDOUT: %Eats.type.loc31_35.1 => constants.%Eats.type.682 +// CHECK:STDOUT: %pattern_type.loc31_24 => constants.%pattern_type.a69 +// CHECK:STDOUT: %T.patt.loc31_24.2 => constants.%T.patt.55e +// CHECK:STDOUT: %T.loc31_24.1 => constants.%Eats.facet.d00 +// CHECK:STDOUT: %T.as_type.loc31_48.1 => constants.%Goat +// CHECK:STDOUT: %pattern_type.loc31_46 => constants.%pattern_type.283 +// CHECK:STDOUT: %e.param_patt.loc31_46.2 => constants.%e.param_patt.b2f +// CHECK:STDOUT: %e.patt.loc31_46.2 => constants.%e.patt.ccf +// CHECK:STDOUT: %pattern_type.loc31_62 => constants.%pattern_type.92e +// CHECK:STDOUT: %food.param_patt.loc31_62.2 => constants.%food.param_patt.42e +// CHECK:STDOUT: %food.patt.loc31_62.2 => constants.%food.patt.b2a068.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc31_48 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc31_64 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc31_46 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc31_62 => constants.%complete_type.357 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon index 10e3deedf2f5..5f286042dd9b 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon @@ -14,9 +14,9 @@ interface Animal {} -fn FeedAnimal[T:! Animal](unused a: T) {} +fn FeedAnimal[T: Animal](unused a: T) {} -fn HandleAnimal[T:! Animal](a: T) { FeedAnimal(a); } +fn HandleAnimal[T: Animal](a: T) { FeedAnimal(a); } class Goat {} impl Goat as Animal {} @@ -91,39 +91,39 @@ fn F() { // CHECK:STDOUT: %Animal.decl: type = interface_decl @Animal [concrete = constants.%Animal.type] {} {} // CHECK:STDOUT: %FeedAnimal.decl: %FeedAnimal.type = fn_decl @FeedAnimal [concrete = constants.%FeedAnimal] { // CHECK:STDOUT: %T.patt.loc17_16.1: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %a.param_patt.loc17_35.1: @FeedAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc17_35.2 (constants.%a.param_patt.84e)] -// CHECK:STDOUT: %a.patt.loc17_35.1: @FeedAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc17_35.1 [symbolic = %a.patt.loc17_35.2 (constants.%a.patt.3e60af.1)] +// CHECK:STDOUT: %a.param_patt.loc17_34.1: @FeedAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc17_34.2 (constants.%a.param_patt.84e)] +// CHECK:STDOUT: %a.patt.loc17_34.1: @FeedAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc17_34.1 [symbolic = %a.patt.loc17_34.2 (constants.%a.patt.3e60af.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_19: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.loc17_18: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc17_16.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_16.1 (constants.%T)] -// CHECK:STDOUT: %a.param: @FeedAnimal.%T.as_type.loc17_37.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc17_37.1: type = splice_block %.loc17_37.2 [symbolic = %T.as_type.loc17_37.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %a.param: @FeedAnimal.%T.as_type.loc17_36.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc17_36.1: type = splice_block %.loc17_36.2 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc17_16.2 [symbolic = %T.loc17_16.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc17_37.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc17_37.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc17_37.2: type = converted %T.ref, %T.as_type.loc17_37.2 [symbolic = %T.as_type.loc17_37.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc17_36.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc17_36.2: type = converted %T.ref, %T.as_type.loc17_36.2 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @FeedAnimal.%T.as_type.loc17_37.1 (%T.as_type) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @FeedAnimal.%T.as_type.loc17_36.1 (%T.as_type) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %HandleAnimal.decl: %HandleAnimal.type = fn_decl @HandleAnimal [concrete = constants.%HandleAnimal] { // CHECK:STDOUT: %T.patt.loc19_18.1: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_18.2 (constants.%T.patt)] -// CHECK:STDOUT: %a.param_patt.loc19_30.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc19_30.2 (constants.%a.param_patt.84e)] -// CHECK:STDOUT: %a.patt.loc19_30.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc19_30.1 [symbolic = %a.patt.loc19_30.2 (constants.%a.patt.3e60af.2)] +// CHECK:STDOUT: %a.param_patt.loc19_29.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc19_29.2 (constants.%a.param_patt.84e)] +// CHECK:STDOUT: %a.patt.loc19_29.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc19_29.1 [symbolic = %a.patt.loc19_29.2 (constants.%a.patt.3e60af.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_21: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.loc19_20: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc19_18.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc19_18.1 (constants.%T)] -// CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc19_32.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc19_32.1: type = splice_block %.loc19_32.2 [symbolic = %T.as_type.loc19_32.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc19_31.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc19_31.1: type = splice_block %.loc19_31.2 [symbolic = %T.as_type.loc19_31.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc19_18.2 [symbolic = %T.loc19_18.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc19_32.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc19_32.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc19_32.2: type = converted %T.ref, %T.as_type.loc19_32.2 [symbolic = %T.as_type.loc19_32.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc19_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc19_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc19_31.2: type = converted %T.ref, %T.as_type.loc19_31.2 [symbolic = %T.as_type.loc19_31.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @HandleAnimal.%T.as_type.loc19_32.1 (%T.as_type) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @HandleAnimal.%T.as_type.loc19_31.1 (%T.as_type) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Goat.decl: type = class_decl @Goat [concrete = constants.%Goat] {} {} // CHECK:STDOUT: impl_decl @Goat.as.Animal.impl [concrete] {} { @@ -166,15 +166,15 @@ fn F() { // CHECK:STDOUT: generic fn @FeedAnimal(%T.loc17_16.2: %Animal.type) { // CHECK:STDOUT: %T.patt.loc17_16.2: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_16.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc17_16.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_16.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc17_37.1: type = facet_access_type %T.loc17_16.1 [symbolic = %T.as_type.loc17_37.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc17_37.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] -// CHECK:STDOUT: %a.param_patt.loc17_35.2: @FeedAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc17_35.2 (constants.%a.param_patt.84e)] -// CHECK:STDOUT: %a.patt.loc17_35.2: @FeedAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc17_35.2 [symbolic = %a.patt.loc17_35.2 (constants.%a.patt.3e60af.1)] +// CHECK:STDOUT: %T.as_type.loc17_36.1: type = facet_access_type %T.loc17_16.1 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc17_36.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] +// CHECK:STDOUT: %a.param_patt.loc17_34.2: @FeedAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc17_34.2 (constants.%a.param_patt.84e)] +// CHECK:STDOUT: %a.patt.loc17_34.2: @FeedAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc17_34.2 [symbolic = %a.patt.loc17_34.2 (constants.%a.patt.3e60af.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc17_37.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc17_36.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @FeedAnimal.%T.as_type.loc17_37.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%a.param: @FeedAnimal.%T.as_type.loc17_36.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -185,23 +185,23 @@ fn F() { // CHECK:STDOUT: generic fn @HandleAnimal(%T.loc19_18.2: %Animal.type) { // CHECK:STDOUT: %T.patt.loc19_18.2: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_18.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc19_18.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc19_18.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc19_32.1: type = facet_access_type %T.loc19_18.1 [symbolic = %T.as_type.loc19_32.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc19_32.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] -// CHECK:STDOUT: %a.param_patt.loc19_30.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc19_30.2 (constants.%a.param_patt.84e)] -// CHECK:STDOUT: %a.patt.loc19_30.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc19_30.2 [symbolic = %a.patt.loc19_30.2 (constants.%a.patt.3e60af.2)] +// CHECK:STDOUT: %T.as_type.loc19_31.1: type = facet_access_type %T.loc19_18.1 [symbolic = %T.as_type.loc19_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc19_31.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] +// CHECK:STDOUT: %a.param_patt.loc19_29.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc19_29.2 (constants.%a.param_patt.84e)] +// CHECK:STDOUT: %a.patt.loc19_29.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc19_29.2 [symbolic = %a.patt.loc19_29.2 (constants.%a.patt.3e60af.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc19_32.1 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_37.2: = specific_function constants.%FeedAnimal, @FeedAnimal(%T.loc19_18.1) [symbolic = %FeedAnimal.specific_fn.loc19_37.2 (constants.%FeedAnimal.specific_fn.5bd)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc19_31.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_36.2: = specific_function constants.%FeedAnimal, @FeedAnimal(%T.loc19_18.1) [symbolic = %FeedAnimal.specific_fn.loc19_36.2 (constants.%FeedAnimal.specific_fn.5bd)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @HandleAnimal.%T.as_type.loc19_32.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%a.param: @HandleAnimal.%T.as_type.loc19_31.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %FeedAnimal.ref: %FeedAnimal.type = name_ref FeedAnimal, file.%FeedAnimal.decl [concrete = constants.%FeedAnimal] -// CHECK:STDOUT: %a.ref: @HandleAnimal.%T.as_type.loc19_32.1 (%T.as_type) = name_ref a, %a -// CHECK:STDOUT: %.loc19_49.1: %Animal.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc19_18.1 (constants.%T)] -// CHECK:STDOUT: %.loc19_49.2: %Animal.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc19_18.1 (constants.%T)] -// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_37.1: = specific_function %FeedAnimal.ref, @FeedAnimal(constants.%T) [symbolic = %FeedAnimal.specific_fn.loc19_37.2 (constants.%FeedAnimal.specific_fn.5bd)] -// CHECK:STDOUT: %FeedAnimal.call: init %empty_tuple.type = call %FeedAnimal.specific_fn.loc19_37.1(%a.ref) +// CHECK:STDOUT: %a.ref: @HandleAnimal.%T.as_type.loc19_31.1 (%T.as_type) = name_ref a, %a +// CHECK:STDOUT: %.loc19_48.1: %Animal.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc19_18.1 (constants.%T)] +// CHECK:STDOUT: %.loc19_48.2: %Animal.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc19_18.1 (constants.%T)] +// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_36.1: = specific_function %FeedAnimal.ref, @FeedAnimal(constants.%T) [symbolic = %FeedAnimal.specific_fn.loc19_36.2 (constants.%FeedAnimal.specific_fn.5bd)] +// CHECK:STDOUT: %FeedAnimal.call: init %empty_tuple.type = call %FeedAnimal.specific_fn.loc19_36.1(%a.ref) // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -246,10 +246,10 @@ fn F() { // CHECK:STDOUT: specific @FeedAnimal(constants.%T) { // CHECK:STDOUT: %T.patt.loc17_16.2 => constants.%T.patt // CHECK:STDOUT: %T.loc17_16.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc17_37.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc17_36.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e90 -// CHECK:STDOUT: %a.param_patt.loc17_35.2 => constants.%a.param_patt.84e -// CHECK:STDOUT: %a.patt.loc17_35.2 => constants.%a.patt.3e60af.1 +// CHECK:STDOUT: %a.param_patt.loc17_34.2 => constants.%a.param_patt.84e +// CHECK:STDOUT: %a.patt.loc17_34.2 => constants.%a.patt.3e60af.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete @@ -258,10 +258,10 @@ fn F() { // CHECK:STDOUT: specific @HandleAnimal(constants.%T) { // CHECK:STDOUT: %T.patt.loc19_18.2 => constants.%T.patt // CHECK:STDOUT: %T.loc19_18.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc19_32.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc19_31.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e90 -// CHECK:STDOUT: %a.param_patt.loc19_30.2 => constants.%a.param_patt.84e -// CHECK:STDOUT: %a.patt.loc19_30.2 => constants.%a.patt.3e60af.2 +// CHECK:STDOUT: %a.param_patt.loc19_29.2 => constants.%a.param_patt.84e +// CHECK:STDOUT: %a.patt.loc19_29.2 => constants.%a.patt.3e60af.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Animal.WithSelf(constants.%Animal.facet) { @@ -271,23 +271,23 @@ fn F() { // CHECK:STDOUT: specific @HandleAnimal(constants.%Animal.facet) { // CHECK:STDOUT: %T.patt.loc19_18.2 => constants.%T.patt // CHECK:STDOUT: %T.loc19_18.1 => constants.%Animal.facet -// CHECK:STDOUT: %T.as_type.loc19_32.1 => constants.%Goat +// CHECK:STDOUT: %T.as_type.loc19_31.1 => constants.%Goat // CHECK:STDOUT: %pattern_type => constants.%pattern_type.283 -// CHECK:STDOUT: %a.param_patt.loc19_30.2 => constants.%a.param_patt.8f5 -// CHECK:STDOUT: %a.patt.loc19_30.2 => constants.%a.patt.8aa5e9.1 +// CHECK:STDOUT: %a.param_patt.loc19_29.2 => constants.%a.param_patt.8f5 +// CHECK:STDOUT: %a.patt.loc19_29.2 => constants.%a.patt.8aa5e9.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type -// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_37.2 => constants.%FeedAnimal.specific_fn.42c +// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_36.2 => constants.%FeedAnimal.specific_fn.42c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @FeedAnimal(constants.%Animal.facet) { // CHECK:STDOUT: %T.patt.loc17_16.2 => constants.%T.patt // CHECK:STDOUT: %T.loc17_16.1 => constants.%Animal.facet -// CHECK:STDOUT: %T.as_type.loc17_37.1 => constants.%Goat +// CHECK:STDOUT: %T.as_type.loc17_36.1 => constants.%Goat // CHECK:STDOUT: %pattern_type => constants.%pattern_type.283 -// CHECK:STDOUT: %a.param_patt.loc17_35.2 => constants.%a.param_patt.8f5 -// CHECK:STDOUT: %a.patt.loc17_35.2 => constants.%a.patt.8aa5e9.2 +// CHECK:STDOUT: %a.param_patt.loc17_34.2 => constants.%a.param_patt.8f5 +// CHECK:STDOUT: %a.patt.loc17_34.2 => constants.%a.patt.8aa5e9.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type diff --git a/toolchain/check/testdata/facet/early_impls.carbon b/toolchain/check/testdata/facet/early_impls.carbon index 78fef24d43ac..0930265156a0 100644 --- a/toolchain/check/testdata/facet/early_impls.carbon +++ b/toolchain/check/testdata/facet/early_impls.carbon @@ -17,203 +17,203 @@ library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } interface Y { - let Y1:! type; + let Y1: type; } -fn F(_:! Z where .Z1 impls Y and .Z2 = .Z1.(Y.Y1)) {} +fn F(generic _: Z where .Z1 impls Y and .Z2 = .Z1.(Y.Y1)) {} -class C(T:! type); +class C(T: type); constraint X { require C(Self) impls Y; } -fn G(_:! Z where .Z1 impls X and .Z2 = C(.Z1).(Y.Y1)) {} +fn G(generic _: Z where .Z1 impls X and .Z2 = C(.Z1).(Y.Y1)) {} // --- early_self_impls.carbon library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } interface Y { - let Y1:! type; + let Y1: type; } -fn F(_:! Z where .Self impls Y and .Z1 = .Self.(Y.Y1)) {} +fn F(generic _: Z where .Self impls Y and .Z1 = .Self.(Y.Y1)) {} // --- early_generic_class_impls.carbon library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } interface Y { - let Y1:! type; + let Y1: type; } -class C(T:! type); +class C(T: type); -fn F(_:! Z where C(.Self) impls Y and .Z1 = C(.Self).(Y.Y1)) {} +fn F(generic _: Z where C(.Self) impls Y and .Z1 = C(.Self).(Y.Y1)) {} // --- early_class_impls_generic_interface.carbon library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } -interface Y(T:! type) {} -interface X(U:! Y(.Self)) {} +interface Y(T: type) {} +interface X(U: Y(.Self)) {} class C; // Needs to identify `C as Y(.Self)` without replacing this `.Self` with `C`, // since it refers to `T`. -fn F(unused T:! Z where C impls Y(.Self) and .Z1 = (C as Y(.Self))) {} +fn F(unused generic T: Z where C impls Y(.Self) and .Z1 = (C as Y(.Self))) {} -class D(V:! type); +class D(V: type); // Needs to identify `D(.Self) as Y(D(.Self))` without replacing the argument // `.Self` to `D` since it refers to `T`. But we _do_ need to replace the // `.Self` in the type of `U`, since it refers to `U` which is being replaced by // `D(.Self)` in this specific. -fn G(unused T:! Z where D(.Self) impls Y(D(.Self)) and D(.Self) impls X(D(.Self))) {} +fn G(unused generic T: Z where D(.Self) impls Y(D(.Self)) and D(.Self) impls X(D(.Self))) {} // --- early_class_impls_generic_interface_with_member_designator.carbon library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } -interface Y(T:! type) { - let Y1:! type; +interface Y(T: type) { + let Y1: type; } class C; -fn F(_:! Z where C impls Y(.Z2) and .Z1 = C.(Y(.Z2).Y1)) {} +fn F(generic _: Z where C impls Y(.Z2) and .Z1 = C.(Y(.Z2).Y1)) {} // --- early_tuple_impls_generic_interface.carbon library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } -interface Y(T:! type) { - let Y1:! type; +interface Y(T: type) { + let Y1: type; } interface X { - let X1:! type; + let X1: type; } class C; -fn F(_:! Z where () impls Y(.Self) and .Z1 = ().(Y(.Self).Y1)) {} +fn F(generic _: Z where () impls Y(.Self) and .Z1 = ().(Y(.Self).Y1)) {} -fn G(_:! Z where (C, ) impls Y(.Self) and .Z1 = (C, ).(Y(.Self).Y1)) {} +fn G(generic _: Z where (C, ) impls Y(.Self) and .Z1 = (C, ).(Y(.Self).Y1)) {} -fn H(_:! Z where (.Self, ) impls X and .Z1 = (.Self, ).(X.X1)) {} +fn H(generic _: Z where (.Self, ) impls X and .Z1 = (.Self, ).(X.X1)) {} // --- early_struct_impls.carbon library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } -interface Y(T:! type) { - let Y1:! type; +interface Y(T: type) { + let Y1: type; } interface X { - let X1:! type; + let X1: type; } class C; -fn F(_:! Z where {} impls Y(.Self) and .Z1 = {}.(Y(.Self).Y1)) {} +fn F(generic _: Z where {} impls Y(.Self) and .Z1 = {}.(Y(.Self).Y1)) {} // --- early_concrete_impls.carbon library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } -interface Y(T:! type) { - let Y1:! type; +interface Y(T: type) { + let Y1: type; } // A concrete type that is not a class, tuple, or struct. fn MakeIntLiteral() -> type = "int_literal.make_type"; alias IntLiteral = MakeIntLiteral(); -fn F(_:! Z where IntLiteral impls Y(.Self) and .Z1 = IntLiteral.(Y(.Self).Y1)) {} +fn F(generic _: Z where IntLiteral impls Y(.Self) and .Z1 = IntLiteral.(Y(.Self).Y1)) {} // --- early_impl_named_constraint.carbon library "[[@TEST_NAME]]"; interface Y {} interface Z { - let Z1:! type; - let Z2:! Y; + let Z1: type; + let Z2: Y; } constraint N { require impls Y; } -fn F(_:! Z where .Z1 impls N and .Z2 = .Z1) {} +fn F(generic _: Z where .Z1 impls N and .Z2 = .Z1) {} // --- early_impl_named_constraint_gives_witness_for_different_self.carbon library "[[@TEST_NAME]]"; class C; -interface Y(T:! type) {} +interface Y(T: type) {} interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } -constraint N(V:! type) { +constraint N(V: type) { require V impls Y(Self); } // `C impls N(.Z1)` gives `.Z1 impls Y(C)`. -fn F(_:! Z where C impls N(.Z1) and .Z2 = (.Z1 as Y(C))) {} +fn F(generic _: Z where C impls N(.Z1) and .Z2 = (.Z1 as Y(C))) {} // --- fail_early_impl_named_constraint_gives_wrong_witness_for_different_self.carbon library "[[@TEST_NAME]]"; class C; -interface Y(T:! type) {} -interface Z(U:! type) { - let Z1:! type; - let Z2:! type; +interface Y(T: type) {} +interface Z(U: type) { + let Z1: type; + let Z2: type; } -constraint N(V:! type) { +constraint N(V: type) { require V impls Y(Self); } // `C impls N(.Z1)` gives `.Z1 impls Y(C)`. // -// CHECK:STDERR: fail_early_impl_named_constraint_gives_wrong_witness_for_different_self.carbon:[[@LINE+4]]:51: error: cannot convert type `.(Z(.Self).Z1)` into type implementing `Y(.Self)` [ConversionFailureTypeToFacet] -// CHECK:STDERR: fn F(_:! Z(.Self) where C impls N(.Z1) and .Z2 = (.Z1 as Y(.Self))) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_early_impl_named_constraint_gives_wrong_witness_for_different_self.carbon:[[@LINE+4]]:58: error: cannot convert type `.(Z(.Self).Z1)` into type implementing `Y(.Self)` [ConversionFailureTypeToFacet] +// CHECK:STDERR: fn F(generic _: Z(.Self) where C impls N(.Z1) and .Z2 = (.Z1 as Y(.Self))) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(_:! Z(.Self) where C impls N(.Z1) and .Z2 = (.Z1 as Y(.Self))) {} +fn F(generic _: Z(.Self) where C impls N(.Z1) and .Z2 = (.Z1 as Y(.Self))) {} // --- early_type_impls_nested_self_impls.carbon library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } interface Y { - let Y1:! type; + let Y1: type; } interface X {} -class C(T:! type); -class D(T:! X); +class C(T: type); +class D(T: X); constraint NY { require impls Y where .Y1 impls X; @@ -222,66 +222,66 @@ constraint NY { // A lookup of `C(V).(Y.Y1) as X` requires us to see that the `.Y1 impls X` // constraint is visible through the `C(.Self) impls NY` constraint and that // `C(.Self)` is used as the implied `.Self` in `.Y1 impls X`. -fn F(unused V:! Z where C(.Self) impls NY and .Z1 = D(C(.Self).(Y.Y1))) {} +fn F(unused generic V: Z where C(.Self) impls NY and .Z1 = D(C(.Self).(Y.Y1))) {} // --- early_impls_with_period_self_not_replaced.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} class C; -class NeedZ(V:! Z(.Self)); -class NeedZU(U:! type, V:! Z(U)); +class NeedZ(V: Z(.Self)); +class NeedZU(U: type, V: Z(U)); -interface S(T:! type); +interface S(T: type); // The conversion `C as Z(.Self)` written explicitly, where the `.Self` refers // to `T` and thus must not be replaced. It is not `C as Z(C)`. -fn F1(unused T:! type where C impls Z(.Self) and (C as Z(.Self)) impls S(.Self)) {} +fn F1(unused generic T: type where C impls Z(.Self) and (C as Z(.Self)) impls S(.Self)) {} // NeedZU contains a `C as Z(.Self)` conversion and identify step, but the // `.Self` has been smuggled out of the facet type being constructed and placed // into a new facet type, which is the type of the `V` parameter. The `.Self` // refers to `T` and we need to keep track of that so it is not replaced during // the conversion. -fn F2(unused T:! type where C impls Z(.Self) and NeedZU(.Self, C) impls S(.Self)) {} +fn F2(unused generic T: type where C impls Z(.Self) and NeedZU(.Self, C) impls S(.Self)) {} // NeedZ contains a `C as Z(.Self)` conversion but the `.Self` refers to the `V` // parameter which is being replaced by `C`, so it's `C as Z(C)`. The `.Self` // there should be replaced during the conversion. impl C as Z(C) {} -fn F3(unused T:! type where C impls Z(.Self) and NeedZ(C) impls S(.Self)) {} +fn F3(unused generic T: type where C impls Z(.Self) and NeedZ(C) impls S(.Self)) {} // --- fail_early_impls_with_period_self_replaced.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} class C; -class NeedZ(V:! Z(.Self)); +class NeedZ(V: Z(.Self)); -interface S(T:! type); +interface S(T: type); // NeedZ contains a `C as Z(.Self)` conversion but the `.Self` refers to the `V` // parameter which is being replaced by `C`, so it's `C as Z(C)`. The `.Self` // there should be replaced during the conversion. We show that it was replaced // because the `C impls Z(.Self)` constraint does not satisfy `C as Z(C)` so the // conversion fails. -// CHECK:STDERR: fail_early_impls_with_period_self_replaced.carbon:[[@LINE+7]]:49: error: cannot convert type `C` into type implementing `Z(.Self)` [ConversionFailureTypeToFacet] -// CHECK:STDERR: fn F(unused T:! type where C impls Z(.Self) and NeedZ(C) impls S(.Self)) {} -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_early_impls_with_period_self_replaced.carbon:[[@LINE+7]]:56: error: cannot convert type `C` into type implementing `Z(.Self)` [ConversionFailureTypeToFacet] +// CHECK:STDERR: fn F(unused generic T: type where C impls Z(.Self) and NeedZ(C) impls S(.Self)) {} +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_early_impls_with_period_self_replaced.carbon:[[@LINE-12]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: class NeedZ(V:! Z(.Self)); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class NeedZ(V: Z(.Self)); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! type where C impls Z(.Self) and NeedZ(C) impls S(.Self)) {} +fn F(unused generic T: type where C impls Z(.Self) and NeedZ(C) impls S(.Self)) {} // --- period_self_impls_named_constraint_used_in_later_constraint.carbon library "[[@TEST_NAME]]"; interface X {} interface Y { - let Y1:! type; + let Y1: type; } constraint ConstraintForY { @@ -289,7 +289,7 @@ constraint ConstraintForY { } interface Z { - let Z1:! type; + let Z1: type; } private constraint ConstraintForZ { @@ -300,6 +300,6 @@ private constraint ConstraintForZ { // replacing `.Self` in the `.Z1` from the specific args for the named // constraint, which replaces `Self` in the named constraint. Doing this is // incorrect and was leading to an infinite loop of `.Self` substitution. -fn F(_:! ConstraintForZ where +fn F(generic _: ConstraintForZ where .Z1 impls ConstraintForY and .Z1.(Y.Y1) == ()) {} diff --git a/toolchain/check/testdata/facet/early_rewrites.carbon b/toolchain/check/testdata/facet/early_rewrites.carbon index 2e73a34fd488..f3caa4d1b80d 100644 --- a/toolchain/check/testdata/facet/early_rewrites.carbon +++ b/toolchain/check/testdata/facet/early_rewrites.carbon @@ -21,25 +21,25 @@ library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } -class C(T:! Z where .Z1 = ()) {} +class C(T: Z where .Z1 = ()) {} interface J { // Implied: .Z1 == () - // CHECK:STDERR: fail_todo_implied_constraint_on_self.carbon:[[@LINE+7]]:26: error: cannot convert type `.Self` that implements `Z` into type implementing `Z where .(Z.Z1) = ()` [ConversionFailureFacetToFacet] - // CHECK:STDERR: let J1:! Z where .Z2 = C(.Self); - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_todo_implied_constraint_on_self.carbon:[[@LINE+7]]:25: error: cannot convert type `.Self` that implements `Z` into type implementing `Z where .(Z.Z1) = ()` [ConversionFailureFacetToFacet] + // CHECK:STDERR: let J1: Z where .Z2 = C(.Self); + // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_implied_constraint_on_self.carbon:[[@LINE-7]]:9: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: class C(T:! Z where .Z1 = ()) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: class C(T: Z where .Z1 = ()) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - let J1:! Z where .Z2 = C(.Self); + let J1: Z where .Z2 = C(.Self); } -fn F(unused T:! J) {} +fn F(unused generic T: J) {} class D; // Satisfies the implied constraint in J.J1. @@ -47,11 +47,11 @@ class D; // CHECK:STDERR: impl D as Z where .Z1 = () and .Z2 = C(.Self) {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_implied_constraint_on_self.carbon:[[@LINE-21]]:9: note: initializing generic parameter `T` declared here [InitializingGenericParam] -// CHECK:STDERR: class C(T:! Z where .Z1 = ()) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class C(T: Z where .Z1 = ()) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: impl D as Z where .Z1 = () and .Z2 = C(.Self) {} -fn G(T:! J where .J1 = D) { +fn G(generic T: J where .J1 = D) { F(T); } @@ -59,33 +59,33 @@ fn G(T:! J where .J1 = D) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } interface Tuple {} impl () as Tuple {} -class C(T:! Tuple) {} +class C(T: Tuple) {} interface J { // Implied: .Z1 impls Tuple - // CHECK:STDERR: fail_todo_implied_constraint_on_associated_constant.carbon:[[@LINE+7]]:26: error: cannot convert type `.(Z.Z1)` into type implementing `Tuple` [ConversionFailureTypeToFacet] - // CHECK:STDERR: let J1:! Z where .Z2 = C(.Z1); - // CHECK:STDERR: ^~~~~~ + // CHECK:STDERR: fail_todo_implied_constraint_on_associated_constant.carbon:[[@LINE+7]]:25: error: cannot convert type `.(Z.Z1)` into type implementing `Tuple` [ConversionFailureTypeToFacet] + // CHECK:STDERR: let J1: Z where .Z2 = C(.Z1); + // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: fail_todo_implied_constraint_on_associated_constant.carbon:[[@LINE-7]]:9: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: class C(T:! Tuple) {} - // CHECK:STDERR: ^~~~~~~~~ + // CHECK:STDERR: class C(T: Tuple) {} + // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: - let J1:! Z where .Z2 = C(.Z1); + let J1: Z where .Z2 = C(.Z1); } -fn F(unused T:! J) {} +fn F(unused generic T: J) {} class D; // Satisfies the implied constraint in J.J1. impl D as Z where .Z1 = () and .Z2 = C(()) {} -fn G(T:! J where .J1 = D) { +fn G(generic T: J where .J1 = D) { F(T); } @@ -93,25 +93,25 @@ fn G(T:! J where .J1 = D) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } -class C(T:! Z where .Z1 = ()) {} +class C(T: Z where .Z1 = ()) {} interface J { // Implied: .Z1 == (), but this is also explicitly required for J1. - // CHECK:STDERR: fail_todo_nested_constraint_visible_in_type_parameter.carbon:[[@LINE+7]]:43: error: cannot convert type `.Self` that implements `Z` into type implementing `Z where .(Z.Z1) = ()` [ConversionFailureFacetToFacet] - // CHECK:STDERR: let J1:! (Z where .Z1 = ()) where .Z2 = C(.Self); - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_todo_nested_constraint_visible_in_type_parameter.carbon:[[@LINE+7]]:42: error: cannot convert type `.Self` that implements `Z` into type implementing `Z where .(Z.Z1) = ()` [ConversionFailureFacetToFacet] + // CHECK:STDERR: let J1: (Z where .Z1 = ()) where .Z2 = C(.Self); + // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_nested_constraint_visible_in_type_parameter.carbon:[[@LINE-7]]:9: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: class C(T:! Z where .Z1 = ()) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: class C(T: Z where .Z1 = ()) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - let J1:! (Z where .Z1 = ()) where .Z2 = C(.Self); + let J1: (Z where .Z1 = ()) where .Z2 = C(.Self); } -fn F(unused T:! J) {} +fn F(unused generic T: J) {} class D; // Satisfies the implied constraint in J.J1. @@ -119,11 +119,11 @@ class D; // CHECK:STDERR: impl D as Z where .Z1 = () and .Z2 = C(.Self) {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_nested_constraint_visible_in_type_parameter.carbon:[[@LINE-21]]:9: note: initializing generic parameter `T` declared here [InitializingGenericParam] -// CHECK:STDERR: class C(T:! Z where .Z1 = ()) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class C(T: Z where .Z1 = ()) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: impl D as Z where .Z1 = () and .Z2 = C(.Self) {} -fn G(T:! J where .J1 = D) { +fn G(generic T: J where .J1 = D) { F(T); } @@ -131,25 +131,25 @@ fn G(T:! J where .J1 = D) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } -class C(T:! Z where .Z1 = ()) {} +class C(T: Z where .Z1 = ()) {} interface J { // Implied: .Z1 == (), but this is also explicitly required for J1. - // CHECK:STDERR: fail_todo_outer_nested_constraint_visible_in_type_parameter.carbon:[[@LINE+7]]:27: error: cannot convert type `.Self` that implements `Z` into type implementing `Z where .(Z.Z1) = ()` [ConversionFailureFacetToFacet] - // CHECK:STDERR: let J1:! (Z where .Z2 = C(.Self)) where .Z1 = (); - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_todo_outer_nested_constraint_visible_in_type_parameter.carbon:[[@LINE+7]]:26: error: cannot convert type `.Self` that implements `Z` into type implementing `Z where .(Z.Z1) = ()` [ConversionFailureFacetToFacet] + // CHECK:STDERR: let J1: (Z where .Z2 = C(.Self)) where .Z1 = (); + // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_outer_nested_constraint_visible_in_type_parameter.carbon:[[@LINE-7]]:9: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: class C(T:! Z where .Z1 = ()) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: class C(T: Z where .Z1 = ()) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - let J1:! (Z where .Z2 = C(.Self)) where .Z1 = (); + let J1: (Z where .Z2 = C(.Self)) where .Z1 = (); } -fn F(unused T:! J) {} +fn F(unused generic T: J) {} class D; // Satisfies the implied constraint in J.J1. @@ -157,11 +157,11 @@ class D; // CHECK:STDERR: impl D as Z where .Z1 = () and .Z2 = C(.Self) {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_outer_nested_constraint_visible_in_type_parameter.carbon:[[@LINE-21]]:9: note: initializing generic parameter `T` declared here [InitializingGenericParam] -// CHECK:STDERR: class C(T:! Z where .Z1 = ()) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class C(T: Z where .Z1 = ()) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: impl D as Z where .Z1 = () and .Z2 = C(.Self) {} -fn G(T:! J where .J1 = D) { +fn G(generic T: J where .J1 = D) { F(T); } @@ -169,25 +169,25 @@ fn G(T:! J where .J1 = D) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } -class C(T:! Z where .Z1 = ()) {} +class C(T: Z where .Z1 = ()) {} interface J { // Implied: .Z1 == (), but this is also explicitly required for J1. - // CHECK:STDERR: fail_todo_earlier_constraint_visible_in_type_parameter.carbon:[[@LINE+7]]:39: error: cannot convert type `.Self` that implements `Z` into type implementing `Z where .(Z.Z1) = ()` [ConversionFailureFacetToFacet] - // CHECK:STDERR: let J1:! Z where .Z1 = () and .Z2 = C(.Self); - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_todo_earlier_constraint_visible_in_type_parameter.carbon:[[@LINE+7]]:38: error: cannot convert type `.Self` that implements `Z` into type implementing `Z where .(Z.Z1) = ()` [ConversionFailureFacetToFacet] + // CHECK:STDERR: let J1: Z where .Z1 = () and .Z2 = C(.Self); + // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_earlier_constraint_visible_in_type_parameter.carbon:[[@LINE-7]]:9: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: class C(T:! Z where .Z1 = ()) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: class C(T: Z where .Z1 = ()) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - let J1:! Z where .Z1 = () and .Z2 = C(.Self); + let J1: Z where .Z1 = () and .Z2 = C(.Self); } -fn F(unused T:! J) {} +fn F(unused generic T: J) {} class D; // Satisfies the implied constraint in J.J1. @@ -195,11 +195,11 @@ class D; // CHECK:STDERR: impl D as Z where .Z1 = () and .Z2 = C(.Self) {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_earlier_constraint_visible_in_type_parameter.carbon:[[@LINE-21]]:9: note: initializing generic parameter `T` declared here [InitializingGenericParam] -// CHECK:STDERR: class C(T:! Z where .Z1 = ()) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class C(T: Z where .Z1 = ()) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: impl D as Z where .Z1 = () and .Z2 = C(.Self) {} -fn G(T:! J where .J1 = D) { +fn G(generic T: J where .J1 = D) { F(T); } @@ -207,25 +207,25 @@ fn G(T:! J where .J1 = D) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } -class C(T:! Z where .Z1 = ()) {} +class C(T: Z where .Z1 = ()) {} interface J { // Implied: .Z1 == (), but this is also explicitly required for J1. - // CHECK:STDERR: fail_todo_later_constraint_visible_in_type_parameter.carbon:[[@LINE+7]]:26: error: cannot convert type `.Self` that implements `Z` into type implementing `Z where .(Z.Z1) = ()` [ConversionFailureFacetToFacet] - // CHECK:STDERR: let J1:! Z where .Z2 = C(.Self) and .Z1 = (); - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_todo_later_constraint_visible_in_type_parameter.carbon:[[@LINE+7]]:25: error: cannot convert type `.Self` that implements `Z` into type implementing `Z where .(Z.Z1) = ()` [ConversionFailureFacetToFacet] + // CHECK:STDERR: let J1: Z where .Z2 = C(.Self) and .Z1 = (); + // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_later_constraint_visible_in_type_parameter.carbon:[[@LINE-7]]:9: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: class C(T:! Z where .Z1 = ()) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: class C(T: Z where .Z1 = ()) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - let J1:! Z where .Z2 = C(.Self) and .Z1 = (); + let J1: Z where .Z2 = C(.Self) and .Z1 = (); } -fn F(unused T:! J) {} +fn F(unused generic T: J) {} class D; // Satisfies the implied constraint in J.J1. @@ -233,11 +233,11 @@ class D; // CHECK:STDERR: impl D as Z where .Z1 = () and .Z2 = C(.Self) {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_later_constraint_visible_in_type_parameter.carbon:[[@LINE-21]]:9: note: initializing generic parameter `T` declared here [InitializingGenericParam] -// CHECK:STDERR: class C(T:! Z where .Z1 = ()) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class C(T: Z where .Z1 = ()) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: impl D as Z where .Z1 = () and .Z2 = C(.Self) {} -fn G(T:! J where .J1 = D) { +fn G(generic T: J where .J1 = D) { F(T); } @@ -245,25 +245,25 @@ fn G(T:! J where .J1 = D) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } interface Tuple {} impl () as Tuple {} -class C(T:! Tuple) {} +class C(T: Tuple) {} interface J { // Implied: .Z1 == (), but this is also explicitly required for J1. - let J1:! Z where .Z1 = () and .Z2 = C(.Z1); + let J1: Z where .Z1 = () and .Z2 = C(.Z1); } -fn F(unused T:! J) {} +fn F(unused generic T: J) {} class D; // Satisfies the implied constraint in J.J1. impl D as Z where .Z1 = () and .Z2 = C(()) {} -fn G(T:! J where .J1 = D) { +fn G(generic T: J where .J1 = D) { F(T); } @@ -271,25 +271,25 @@ fn G(T:! J where .J1 = D) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } interface Tuple {} impl () as Tuple {} -class C(T:! Tuple) {} +class C(T: Tuple) {} interface J { // Implied: .Z1 == (), but this is also explicitly required for J1. - let J1:! (Z where .Z1 = ()) where .Z2 = C(.Z1); + let J1: (Z where .Z1 = ()) where .Z2 = C(.Z1); } -fn F(unused T:! J) {} +fn F(unused generic T: J) {} class D; // Satisfies the implied constraint in J.J1. impl D as Z where .Z1 = () and .Z2 = C(()) {} -fn G(T:! J where .J1 = D) { +fn G(generic T: J where .J1 = D) { F(T); } @@ -297,29 +297,29 @@ fn G(T:! J where .J1 = D) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } interface Y { - let Y1:! Z; + let Y1: Z; } interface Tuple {} impl () as Tuple {} -class C(T:! Tuple) {} +class C(T: Tuple) {} interface J { // .Z2 depends on an two nested accesses of rewrite constraints. - let J1:! Y & Z where .Y1 = .Self and .Z1 = () and .Z2 = C(.Y1.Z1); + let J1: Y & Z where .Y1 = .Self and .Z1 = () and .Z2 = C(.Y1.Z1); } -fn F(unused T:! J) {} +fn F(unused generic T: J) {} class D; impl D as Z where .Z1 = () and .Z2 = C(()) {} impl D as Y where .Y1 = D {} -fn G(T:! J where .J1 = D) { +fn G(generic T: J where .J1 = D) { F(T); } @@ -327,46 +327,46 @@ fn G(T:! J where .J1 = D) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } interface Y {} -class NeedY(T:! Y) {} +class NeedY(T: Y) {} impl () as Y {} // These are written differently but should behave the same. // Designator access of `.Z1`. -fn F(_:! Z where .Z1 = () and .Z2 = NeedY(.Z1)) {} +fn F(generic _: Z where .Z1 = () and .Z2 = NeedY(.Z1)) {} // Compound member access of `.Z1`. -fn G(_:! Z where .Z1 = () and .Z2 = NeedY(.Self.(Z.Z1))) {} +fn G(generic _: Z where .Z1 = () and .Z2 = NeedY(.Self.(Z.Z1))) {} // --- fail_todo_resolved_constraint_visible_in_type_parameter.carbon library "[[@TEST_NAME]]"; interface Y { - let Y1:! type; + let Y1: type; } interface Z { - let Z1:! Y; - let Z2:! type; - let Z3:! type; + let Z1: Y; + let Z2: type; + let Z3: type; } interface Tuple {} impl () as Tuple {} -class C(T:! Tuple) {} +class C(T: Tuple) {} interface J { // Implied: .Y1 impls Tuple, but this is also explicitly required for J1. - let J1:! Z & Y where .Y1 = () and .Z1 = .Self and .Z2 = .Z1.Y1 and .Z3 = C(.Z2); + let J1: Z & Y where .Y1 = () and .Z1 = .Self and .Z2 = .Z1.Y1 and .Z3 = C(.Z2); } -fn F(unused T:! J) {} +fn F(unused generic T: J) {} class D; // Satisfies the implied constraint in J.J1. @@ -376,11 +376,11 @@ impl D as Y where .Y1 = () {} // CHECK:STDERR: ^~~~~ // CHECK:STDERR: impl D as Z where .Z1 = .Self and .Z2 = () and .Z3 = C(()) {} -// CHECK:STDERR: fail_todo_resolved_constraint_visible_in_type_parameter.carbon:[[@LINE+4]]:24: error: cannot convert type `D` into type implementing `Y & Z where .(Y.Y1) = () and .(Z.Z1) = .Self as Y and .(Z.Z2) = () and .(Z.Z3) = C(() as Tuple)` [ConversionFailureTypeToFacet] -// CHECK:STDERR: fn G(T:! J where .J1 = D) { -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_todo_resolved_constraint_visible_in_type_parameter.carbon:[[@LINE+4]]:31: error: cannot convert type `D` into type implementing `Y & Z where .(Y.Y1) = () and .(Z.Z1) = .Self as Y and .(Z.Z2) = () and .(Z.Z3) = C(() as Tuple)` [ConversionFailureTypeToFacet] +// CHECK:STDERR: fn G(generic T: J where .J1 = D) { +// CHECK:STDERR: ^ // CHECK:STDERR: -fn G(T:! J where .J1 = D) { +fn G(generic T: J where .J1 = D) { F(T); } @@ -388,103 +388,103 @@ fn G(T:! J where .J1 = D) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } interface Y { - let Y1:! type; + let Y1: type; } interface Tuple {} impl () as Tuple {} -class C(U:! Tuple); +class C(U: Tuple); -constraint NY(V:! type) { +constraint NY(V: type) { extend require impls Y where .Y1 = V; } -// CHECK:STDERR: fail_todo_early_rewrite_from_previous_impls_constraint.carbon:[[@LINE+7]]:52: error: cannot convert type `.(Z.Z1).(Y.Y1)` into type implementing `Tuple` [ConversionFailureTypeToFacet] -// CHECK:STDERR: fn F(unused T:! Z where .Z1 impls NY(()) and .Z2 = C(.Z1.(Y.Y1))) {} -// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: fail_todo_early_rewrite_from_previous_impls_constraint.carbon:[[@LINE+7]]:59: error: cannot convert type `.(Z.Z1).(Y.Y1)` into type implementing `Tuple` [ConversionFailureTypeToFacet] +// CHECK:STDERR: fn F(unused generic T: Z where .Z1 impls NY(()) and .Z2 = C(.Z1.(Y.Y1))) {} +// CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_early_rewrite_from_previous_impls_constraint.carbon:[[@LINE-9]]:9: note: initializing generic parameter `U` declared here [InitializingGenericParam] -// CHECK:STDERR: class C(U:! Tuple); -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: class C(U: Tuple); +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -fn F(unused T:! Z where .Z1 impls NY(()) and .Z2 = C(.Z1.(Y.Y1))) {} +fn F(unused generic T: Z where .Z1 impls NY(()) and .Z2 = C(.Z1.(Y.Y1))) {} // --- fail_early_rewrite_correct_interface_wrong_self_access_rewrite_in_period_self.carbon library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } interface Y { - let Y1:! type; + let Y1: type; } interface Tuple {} impl () as Tuple {} -class C(U:! Tuple); +class C(U: Tuple); -constraint NY(V:! type) { +constraint NY(V: type) { extend require impls Y where .Y1 = V; } // This should fail: `T.(Y.Y1)` is rewritten to be `()` but `T.(Z.Z1).(Y.Y1)` // is used in the argument to `C`. // -// CHECK:STDERR: fail_early_rewrite_correct_interface_wrong_self_access_rewrite_in_period_self.carbon:[[@LINE+7]]:70: error: cannot convert type `.(Z.Z1).(Y.Y1)` into type implementing `Tuple` [ConversionFailureTypeToFacet] -// CHECK:STDERR: fn F(unused T:! Z where .Self impls NY(()) and .Z1 impls Y and .Z2 = C(.Z1.(Y.Y1))) {} -// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: fail_early_rewrite_correct_interface_wrong_self_access_rewrite_in_period_self.carbon:[[@LINE+7]]:77: error: cannot convert type `.(Z.Z1).(Y.Y1)` into type implementing `Tuple` [ConversionFailureTypeToFacet] +// CHECK:STDERR: fn F(unused generic T: Z where .Self impls NY(()) and .Z1 impls Y and .Z2 = C(.Z1.(Y.Y1))) {} +// CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: fail_early_rewrite_correct_interface_wrong_self_access_rewrite_in_period_self.carbon:[[@LINE-12]]:9: note: initializing generic parameter `U` declared here [InitializingGenericParam] -// CHECK:STDERR: class C(U:! Tuple); -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: class C(U: Tuple); +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -fn F(unused T:! Z where .Self impls NY(()) and .Z1 impls Y and .Z2 = C(.Z1.(Y.Y1))) {} +fn F(unused generic T: Z where .Self impls NY(()) and .Z1 impls Y and .Z2 = C(.Z1.(Y.Y1))) {} // --- fail_early_rewrite_correct_interface_wrong_self_access_rewrite_in_associated_constant.carbon library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } interface Y { - let Y1:! type; + let Y1: type; } interface Tuple {} impl () as Tuple {} -class C(U:! Tuple); +class C(U: Tuple); -constraint NY(V:! type) { +constraint NY(V: type) { extend require impls Y where .Y1 = V; } // This should fail: `T.(Z.Z1).(Y.Y1)` is rewritten to be `()` but `T.(Y.Y1)` is used // in the argument to `C`. // -// CHECK:STDERR: fail_early_rewrite_correct_interface_wrong_self_access_rewrite_in_associated_constant.carbon:[[@LINE+4]]:72: error: name `Self` not found [NameNotFound] -// CHECK:STDERR: fn G(unused T:! Z where .Z1 impls NY(()) and .Self impls Y and .Z2 = C(Self.(Y.Y1))) {} -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: fail_early_rewrite_correct_interface_wrong_self_access_rewrite_in_associated_constant.carbon:[[@LINE+4]]:79: error: name `Self` not found [NameNotFound] +// CHECK:STDERR: fn G(unused generic T: Z where .Z1 impls NY(()) and .Self impls Y and .Z2 = C(Self.(Y.Y1))) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -fn G(unused T:! Z where .Z1 impls NY(()) and .Self impls Y and .Z2 = C(Self.(Y.Y1))) {} +fn G(unused generic T: Z where .Z1 impls NY(()) and .Self impls Y and .Z2 = C(Self.(Y.Y1))) {} // --- fail_nested_facet_type_in_rewrite_does_not_use_rewrite_from_outside.carbon library "[[@TEST_NAME]]"; interface Z { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } -constraint NZ(PeriodY:! type) { +constraint NZ(PeriodY: type) { extend require impls Z where .X = PeriodY; } -fn F(T:! Z where .Y = {} and .X = NZ(.Y), U:! T.X) -> U.(Z.X) { - // This should fail: `U:! T.X` contains a rewrite `.X = .Y` in its type, but +fn F(generic T: Z where .Y = {} and .X = NZ(.Y), generic U: T.X) -> U.(Z.X) { + // This should fail: `U: T.X` contains a rewrite `.X = .Y` in its type, but // the value of `U.(Z.Y)` is not known. Only `T.(Z.Y)` is rewritten to `{}`. // // CHECK:STDERR: fail_nested_facet_type_in_rewrite_does_not_use_rewrite_from_outside.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `{}` to `U.(Z.X)` [ConversionFailure] diff --git a/toolchain/check/testdata/facet/facet_assoc_const.carbon b/toolchain/check/testdata/facet/facet_assoc_const.carbon index 8f6e5713ec2d..a60098a6a996 100644 --- a/toolchain/check/testdata/facet/facet_assoc_const.carbon +++ b/toolchain/check/testdata/facet/facet_assoc_const.carbon @@ -13,107 +13,107 @@ // --- success.carbon library "[[@TEST_NAME]]"; -interface I { let T:! type; } +interface I { let T: type; } -fn F(unused T:! I where .T = {}) {} +fn F(unused generic T: I where .T = {}) {} // --- success_associated.carbon library "[[@TEST_NAME]]"; -interface I { let T:! type; let U:! type; } +interface I { let T: type; let U: type; } -fn F(unused T:! I where .T = .U) {} +fn F(unused generic T: I where .T = .U) {} // --- fail_two_different.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } -// CHECK:STDERR: fail_two_different.carbon:[[@LINE+4]]:17: error: associated constant `.(L.W)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused T:! L where .W = {} and .W = ()) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_two_different.carbon:[[@LINE+4]]:24: error: associated constant `.(L.W)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic T: L where .W = {} and .W = ()) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! L where .W = {} and .W = ()) {} +fn F(unused generic T: L where .W = {} and .W = ()) {} // --- fail_two_different_first_associated.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; let X:! type; } +interface L { let W: type; let X: type; } -// CHECK:STDERR: fail_two_different_first_associated.carbon:[[@LINE+4]]:17: error: associated constant `.(L.W)` given two different values `()` and `.(L.X)` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused T:! L where .W = .X and .W = ()) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_two_different_first_associated.carbon:[[@LINE+4]]:24: error: associated constant `.(L.W)` given two different values `()` and `.(L.X)` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic T: L where .W = .X and .W = ()) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! L where .W = .X and .W = ()) {} +fn F(unused generic T: L where .W = .X and .W = ()) {} // --- fail_two_different_second_associated.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; let X:! type; } +interface L { let W: type; let X: type; } -// CHECK:STDERR: fail_two_different_second_associated.carbon:[[@LINE+4]]:17: error: associated constant `.(L.W)` given two different values `()` and `.(L.X)` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused T:! L where .W = () and .W = .X) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_two_different_second_associated.carbon:[[@LINE+4]]:24: error: associated constant `.(L.W)` given two different values `()` and `.(L.X)` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic T: L where .W = () and .W = .X) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! L where .W = () and .W = .X) {} +fn F(unused generic T: L where .W = () and .W = .X) {} // --- fail_two_different_first_bad.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } -// CHECK:STDERR: fail_two_different_first_bad.carbon:[[@LINE+4]]:30: error: name `BAD5` not found [NameNotFound] -// CHECK:STDERR: fn F(unused T:! L where .W = BAD5 and .W = ()) {} -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: fail_two_different_first_bad.carbon:[[@LINE+4]]:37: error: name `BAD5` not found [NameNotFound] +// CHECK:STDERR: fn F(unused generic T: L where .W = BAD5 and .W = ()) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -fn F(unused T:! L where .W = BAD5 and .W = ()) {} +fn F(unused generic T: L where .W = BAD5 and .W = ()) {} // --- fail_two_different_second_bad.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } -// CHECK:STDERR: fail_two_different_second_bad.carbon:[[@LINE+4]]:42: error: name `BAD6` not found [NameNotFound] -// CHECK:STDERR: fn F(unused T:! L where .W = {} and .W = BAD6) {} -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: fail_two_different_second_bad.carbon:[[@LINE+4]]:49: error: name `BAD6` not found [NameNotFound] +// CHECK:STDERR: fn F(unused generic T: L where .W = {} and .W = BAD6) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -fn F(unused T:! L where .W = {} and .W = BAD6) {} +fn F(unused generic T: L where .W = {} and .W = BAD6) {} // --- fail_two_different_both_bad.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } -// CHECK:STDERR: fail_two_different_both_bad.carbon:[[@LINE+8]]:30: error: name `BAD7` not found [NameNotFound] -// CHECK:STDERR: fn F(unused T:! L where .W = BAD7 and .W = BAD8) {} -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: fail_two_different_both_bad.carbon:[[@LINE+8]]:37: error: name `BAD7` not found [NameNotFound] +// CHECK:STDERR: fn F(unused generic T: L where .W = BAD7 and .W = BAD8) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_two_different_both_bad.carbon:[[@LINE+4]]:44: error: name `BAD8` not found [NameNotFound] -// CHECK:STDERR: fn F(unused T:! L where .W = BAD7 and .W = BAD8) {} -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: fail_two_different_both_bad.carbon:[[@LINE+4]]:51: error: name `BAD8` not found [NameNotFound] +// CHECK:STDERR: fn F(unused generic T: L where .W = BAD7 and .W = BAD8) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -fn F(unused T:! L where .W = BAD7 and .W = BAD8) {} +fn F(unused generic T: L where .W = BAD7 and .W = BAD8) {} // --- fail_two_different_combined_from_bitand.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } -// CHECK:STDERR: fail_two_different_combined_from_bitand.carbon:[[@LINE+4]]:17: error: associated constant `.(L.W)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused T:! (L where .W = {}) & (L where .W = ())) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_two_different_combined_from_bitand.carbon:[[@LINE+4]]:24: error: associated constant `.(L.W)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic T: (L where .W = {}) & (L where .W = ())) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! (L where .W = {}) & (L where .W = ())) {} +fn F(unused generic T: (L where .W = {}) & (L where .W = ())) {} // --- two_different_combined_from_impl_and_facet.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } interface M {} -impl forall [T:! M] T as L where .W = () {} +impl forall [T: M] T as L where .W = () {} -fn F(unused T:! M & (L where .W = {})) {} +fn F(unused generic T: M & (L where .W = {})) {} class C; impl C as L where .W = {} {} @@ -126,16 +126,16 @@ fn G() { // --- fail_two_different_combined_from_final_impl_and_facet.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } interface M {} -final impl forall [T:! M] T as L where .W = () {} +final impl forall [T: M] T as L where .W = () {} -fn G(T:! M & L, a: T.W) -> () { return a; } +fn G(generic T: M & L, a: T.W) -> () { return a; } -fn H(T:! L where .W = {}, a: T.W) -> {} { return a; } +fn H(generic T: L where .W = {}, a: T.W) -> {} { return a; } -fn F(T:! M & (L where .W = {}), a: T.W) { +fn F(generic T: M & (L where .W = {}), a: T.W) { // One of `b` or `c` must fail, because `T.W` is either found to be `()` from // the impl or `{}` from the facet type of T. @@ -148,9 +148,9 @@ fn F(T:! M & (L where .W = {}), a: T.W) { // CHECK:STDERR: fail_two_different_combined_from_final_impl_and_facet.carbon:[[@LINE+7]]:22: error: cannot convert type `T` that implements `L & M where .(L.W) = {}` into type implementing `L where .(L.W) = {}` [ConversionFailureFacetToFacet] // CHECK:STDERR: let unused c: {} = H(T, a); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_two_different_combined_from_final_impl_and_facet.carbon:[[@LINE-15]]:6: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn H(T:! L where .W = {}, a: T.W) -> {} { return a; } - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_two_different_combined_from_final_impl_and_facet.carbon:[[@LINE-15]]:14: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn H(generic T: L where .W = {}, a: T.W) -> {} { return a; } + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let unused c: {} = H(T, a); } @@ -158,66 +158,66 @@ fn F(T:! M & (L where .W = {}), a: T.W) { // --- fail_many_different.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } -// CHECK:STDERR: fail_many_different.carbon:[[@LINE+4]]:17: error: associated constant `.(L.W)` given two different values `((), (), ())` and `({}, (), ())` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn G(unused T:! L where .W = ((), (), ()) and .W = ({}, (), ()) and .W = ({}, {}, ()) and .W = ({}, (), {})) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_many_different.carbon:[[@LINE+4]]:24: error: associated constant `.(L.W)` given two different values `((), (), ())` and `({}, (), ())` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn G(unused generic T: L where .W = ((), (), ()) and .W = ({}, (), ()) and .W = ({}, {}, ()) and .W = ({}, (), {})) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn G(unused T:! L where .W = ((), (), ()) and .W = ({}, (), ()) and .W = ({}, {}, ()) and .W = ({}, (), {})) {} +fn G(unused generic T: L where .W = ((), (), ()) and .W = ({}, (), ()) and .W = ({}, {}, ()) and .W = ({}, (), {})) {} // --- rewrite_uses_second_facet.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; let Y:! type; } +interface M { let X: type; let Y: type; } -fn F(T:! M where .X = (), U:! M where .Y = T.X) -> U.Y { +fn F(generic T: M where .X = (), generic U: M where .Y = T.X) -> U.Y { return (); } // --- fail_rewrite_conflicts_with_second_facet.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; let Y:! type; } +interface M { let X: type; let Y: type; } -// CHECK:STDERR: fail_rewrite_conflicts_with_second_facet.carbon:[[@LINE+4]]:38: error: associated constant `.(M.Y)` given two different values `T.(M.X)` and `.(M.X)` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(T:! M where .X = (), unused U:! M where .Y = T.X and .Y = .X) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_rewrite_conflicts_with_second_facet.carbon:[[@LINE+4]]:52: error: associated constant `.(M.Y)` given two different values `T.(M.X)` and `.(M.X)` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(generic T: M where .X = (), unused generic U: M where .Y = T.X and .Y = .X) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(T:! M where .X = (), unused U:! M where .Y = T.X and .Y = .X) {} +fn F(generic T: M where .X = (), unused generic U: M where .Y = T.X and .Y = .X) {} // --- repeated.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; } +interface M { let X: type; } -fn F(unused T:! M where .X = {} and .X = {}) {} +fn F(unused generic T: M where .X = {} and .X = {}) {} -fn G(T:! M where .X = {}) { +fn G(generic T: M where .X = {}) { F(T); } // --- repeated_associated.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; let Y:! type; } +interface M { let X: type; let Y: type; } -fn F(unused T:! M where .X = .Y and .X = .Y) {} +fn F(unused generic T: M where .X = .Y and .X = .Y) {} -fn G(T:! M where .X = () and .Y = ()) { +fn G(generic T: M where .X = () and .Y = ()) { F(T); } // --- repeated_concrete_value_and_associated.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; let Y:! type; } +interface M { let X: type; let Y: type; } -fn F1(unused T:! M where .X = () and .Y = .X and .X = .Y) {} +fn F1(unused generic T: M where .X = () and .Y = .X and .X = .Y) {} -fn F2(unused T:! M where .X = () and .X = .X) {} +fn F2(unused generic T: M where .X = () and .X = .X) {} -fn G(T:! M where .X = () and .Y = ()) { +fn G(generic T: M where .X = () and .Y = ()) { F1(T); F2(T); } @@ -225,143 +225,143 @@ fn G(T:! M where .X = () and .Y = ()) { // --- repeated_with_bitand.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; let Y:! type; } +interface M { let X: type; let Y: type; } -fn F1(T:! (M where .X = .Y) & (M where .X = .Y and .Y = ())) -> T.X { +fn F1(generic T: (M where .X = .Y) & (M where .X = .Y and .Y = ())) -> T.X { return (); } -fn F2(T:! (M where .X = .Y and .Y = ()) & (M where .X = .Y)) -> T.X { +fn F2(generic T: (M where .X = .Y and .Y = ()) & (M where .X = .Y)) -> T.X { return (); } // --- fail_repeated_and_different.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; } +interface M { let X: type; } -// CHECK:STDERR: fail_repeated_and_different.carbon:[[@LINE+4]]:17: error: associated constant `.(M.X)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused T:! M where .X = {} and .X = () and .X = {}) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_repeated_and_different.carbon:[[@LINE+4]]:24: error: associated constant `.(M.X)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic T: M where .X = {} and .X = () and .X = {}) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! M where .X = {} and .X = () and .X = {}) {} +fn F(unused generic T: M where .X = {} and .X = () and .X = {}) {} // --- fail_cycle_single.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; } +interface M { let X: type; } // This fails because it resolves to `.X = .X` which is cyclical. // -// CHECK:STDERR: fail_cycle_single.carbon:[[@LINE+4]]:17: error: found cycle in facet type constraint for `.(M.X)` [FacetTypeConstraintCycle] -// CHECK:STDERR: fn F(unused T:! M where .X = .X) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_cycle_single.carbon:[[@LINE+4]]:24: error: found cycle in facet type constraint for `.(M.X)` [FacetTypeConstraintCycle] +// CHECK:STDERR: fn F(unused generic T: M where .X = .X) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! M where .X = .X) {} +fn F(unused generic T: M where .X = .X) {} // Even though `.X = ()` is specified, the rewrites are resolved left to right // and a cycle `.X = .X` is found first. // -// CHECK:STDERR: fail_cycle_single.carbon:[[@LINE+4]]:17: error: found cycle in facet type constraint for `.(M.X)` [FacetTypeConstraintCycle] -// CHECK:STDERR: fn G(unused T:! M where .X = .X and .X = ()) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_cycle_single.carbon:[[@LINE+4]]:24: error: found cycle in facet type constraint for `.(M.X)` [FacetTypeConstraintCycle] +// CHECK:STDERR: fn G(unused generic T: M where .X = .X and .X = ()) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn G(unused T:! M where .X = .X and .X = ()) {} +fn G(unused generic T: M where .X = .X and .X = ()) {} // --- fail_cycle.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; let Y:! type; let Z:! type; } +interface M { let X: type; let Y: type; let Z: type; } // This fails because it resolves to `.X = .X` which is cyclical. // The value of .X and .Y becomes but .Z is still valid. // //@dump-sem-ir-begin -// CHECK:STDERR: fail_cycle.carbon:[[@LINE+4]]:17: error: found cycle in facet type constraint for `.(M.Y)` [FacetTypeConstraintCycle] -// CHECK:STDERR: fn F(unused T:! M where .X = .Y and .Y = .X and .Z = ()) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_cycle.carbon:[[@LINE+4]]:24: error: found cycle in facet type constraint for `.(M.Y)` [FacetTypeConstraintCycle] +// CHECK:STDERR: fn F(unused generic T: M where .X = .Y and .Y = .X and .Z = ()) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! M where .X = .Y and .Y = .X and .Z = ()) {} +fn F(unused generic T: M where .X = .Y and .Y = .X and .Z = ()) {} //@dump-sem-ir-end // --- fail_cycle_between_interfaces.carbon library "[[@TEST_NAME]]"; interface I { - let X1:! type; - let X2:! type; + let X1: type; + let X2: type; } interface J { - let X3:! type; + let X3: type; } // This fails because it resolves to `.X1 = .X1` which is cyclical. // -// CHECK:STDERR: fail_cycle_between_interfaces.carbon:[[@LINE+4]]:17: error: found cycle in facet type constraint for `.(J.X3)` [FacetTypeConstraintCycle] -// CHECK:STDERR: fn G(unused T:! I & J where .X1 = .X3 and .X2 = .X1 and .X3 = .X2) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_cycle_between_interfaces.carbon:[[@LINE+4]]:24: error: found cycle in facet type constraint for `.(J.X3)` [FacetTypeConstraintCycle] +// CHECK:STDERR: fn G(unused generic T: I & J where .X1 = .X3 and .X2 = .X1 and .X3 = .X2) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn G(unused T:! I & J where .X1 = .X3 and .X2 = .X1 and .X3 = .X2) {} +fn G(unused generic T: I & J where .X1 = .X3 and .X2 = .X1 and .X3 = .X2) {} // --- fail_indirect_cycle.carbon library "[[@TEST_NAME]]"; interface I { - let X1:! type; - let X2:! type; + let X1: type; + let X2: type; } // This fails because it resolves to `.X1 = .X1**` which is cyclical. // -// CHECK:STDERR: fail_indirect_cycle.carbon:[[@LINE+4]]:10: error: found cycle in facet type constraint for `.(I.X2)` [FacetTypeConstraintCycle] -// CHECK:STDERR: fn F(T:! I where .X1 = .X2* and .X2 = .X1*); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_indirect_cycle.carbon:[[@LINE+4]]:17: error: found cycle in facet type constraint for `.(I.X2)` [FacetTypeConstraintCycle] +// CHECK:STDERR: fn F(generic T: I where .X1 = .X2* and .X2 = .X1*); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(T:! I where .X1 = .X2* and .X2 = .X1*); +fn F(generic T: I where .X1 = .X2* and .X2 = .X1*); -class C(T:! type); +class C(T: type); // This fails because it resolves to `.X1 = C(C(.X1))` which is cyclical. // -// CHECK:STDERR: fail_indirect_cycle.carbon:[[@LINE+4]]:10: error: found cycle in facet type constraint for `.(I.X2)` [FacetTypeConstraintCycle] -// CHECK:STDERR: fn G(T:! I where .X1 = C(.X2) and .X2 = C(.X1)); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_indirect_cycle.carbon:[[@LINE+4]]:17: error: found cycle in facet type constraint for `.(I.X2)` [FacetTypeConstraintCycle] +// CHECK:STDERR: fn G(generic T: I where .X1 = C(.X2) and .X2 = C(.X1)); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn G(T:! I where .X1 = C(.X2) and .X2 = C(.X1)); +fn G(generic T: I where .X1 = C(.X2) and .X2 = C(.X1)); // --- fail_complex_indirect_cycle.carbon library "[[@TEST_NAME]]"; interface I { - let X1:! type; - let X2:! type; - let X3:! type; + let X1: type; + let X2: type; + let X3: type; } -class C(T:! type, U:! type); +class C(T: type, U: type); // This fails because it resolves to `.X1 = C(C(.X3, .X1), .X3)` which is // cyclical. // -// CHECK:STDERR: fail_complex_indirect_cycle.carbon:[[@LINE+4]]:10: error: found cycle in facet type constraint for `.(I.X2)` [FacetTypeConstraintCycle] -// CHECK:STDERR: fn F(T:! I where .X1 = C(.X2, .X3) and .X2 = C(.X3, .X1)); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_complex_indirect_cycle.carbon:[[@LINE+4]]:17: error: found cycle in facet type constraint for `.(I.X2)` [FacetTypeConstraintCycle] +// CHECK:STDERR: fn F(generic T: I where .X1 = C(.X2, .X3) and .X2 = C(.X3, .X1)); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(T:! I where .X1 = C(.X2, .X3) and .X2 = C(.X3, .X1)); +fn F(generic T: I where .X1 = C(.X2, .X3) and .X2 = C(.X3, .X1)); // --- exponential_large.carbon library "[[@TEST_NAME]]"; interface Z { - let T0:! type; - let T1:! type; - let T2:! type; - let T3:! type; - let T4:! type; - let T5:! type; - let T6:! type; - let T7:! type; - let T8:! type; - let T9:! type; + let T0: type; + let T1: type; + let T2: type; + let T3: type; + let T4: type; + let T5: type; + let T6: type; + let T7: type; + let T8: type; + let T9: type; } // A naive attempt to resolve the rewrite rules will run take minutes to @@ -369,7 +369,7 @@ interface Z { // approach can recursively rebuild the RHS values from the ground up // repeatedly. fn F( - T:! Z where + generic T: Z where .T0 = (.T1, .T1, .T1, .T1, .T1, .T1, .T1, .T1, .T1, .T1, .T1, .T1) and .T1 = (.T2, .T2, .T2, .T2, .T2, .T2, .T2, .T2, .T2, .T2, .T2, .T2) and .T2 = (.T3, .T3, .T3, .T3, .T3, .T3, .T3, .T3, .T3, .T3, .T3, .T3) and @@ -386,16 +386,16 @@ fn F( library "[[@TEST_NAME]]"; interface Z { - let T0:! type; - let T1:! type; - let T2:! type; - let T3:! type; - let T4:! type; - let T5:! type; - let T6:! type; - let T7:! type; - let T8:! type; - let T9:! type; + let T0: type; + let T1: type; + let T2: type; + let T3: type; + let T4: type; + let T5: type; + let T6: type; + let T7: type; + let T8: type; + let T9: type; } // A naive attempt to resolve the rewrite rules will run take minutes to @@ -403,11 +403,11 @@ interface Z { // approach can recursively rebuild the RHS values from the ground up // repeatedly. fn F( - // CHECK:STDERR: fail_exponential_large_cycle.carbon:[[@LINE+4]]:9: error: found cycle in facet type constraint for `.(Z.T0)` [FacetTypeConstraintCycle] - // CHECK:STDERR: T:! Z where - // CHECK:STDERR: ^~~~~~~ + // CHECK:STDERR: fail_exponential_large_cycle.carbon:[[@LINE+4]]:16: error: found cycle in facet type constraint for `.(Z.T0)` [FacetTypeConstraintCycle] + // CHECK:STDERR: generic T: Z where + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - T:! Z where + generic T: Z where .T9 = .T0 and .T8 = (.T9, .T9, .T9, .T9, .T9, .T9, .T9, .T9, .T9, .T9, .T9, .T9) and .T7 = (.T8, .T8, .T8, .T8, .T8, .T8, .T8, .T8, .T8, .T8, .T8, .T8) and @@ -424,87 +424,87 @@ fn F( library "[[@TEST_NAME]]"; interface N { - let Y:! {.a: {}}; + let Y: {.a: {}}; } -fn F(unused T:! N where .Y = {.a = {}}) { } +fn F(unused generic T: N where .Y = {.a = {}}) { } // --- non-type_repeated.carbon library "[[@TEST_NAME]]"; interface N { - let Y:! {.a: {}}; + let Y: {.a: {}}; } -fn F(unused T:! N where .Y = {.a = {}} and .Y = {.a = {}}) { } +fn F(unused generic T: N where .Y = {.a = {}} and .Y = {.a = {}}) { } // --- fail_non-type_different.carbon library "[[@TEST_NAME]]"; interface N { - let Y:! {.a: type}; + let Y: {.a: type}; } -// CHECK:STDERR: fail_non-type_different.carbon:[[@LINE+4]]:17: error: associated constant `.(N.Y)` given two different values `{.a = {}}` and `{.a = ()}` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused T:! N where .Y = {.a = {}} and .Y = {.a = ()}) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_non-type_different.carbon:[[@LINE+4]]:24: error: associated constant `.(N.Y)` given two different values `{.a = {}}` and `{.a = ()}` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic T: N where .Y = {.a = {}} and .Y = {.a = ()}) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! N where .Y = {.a = {}} and .Y = {.a = ()}) {} +fn F(unused generic T: N where .Y = {.a = {}} and .Y = {.a = ()}) {} // --- self_repeated_explicitly.carbon library "[[@TEST_NAME]]"; interface N { - let Y1:! type; - let Y2:! type; + let Y1: type; + let Y2: type; } -fn F(unused T:! N where .Y2 = .Y1 and .Y2 = .Self.Y1) { } +fn F(unused generic T: N where .Y2 = .Y1 and .Y2 = .Self.Y1) { } // --- self_repeated_explicitly_with_value.carbon library "[[@TEST_NAME]]"; interface N { - let Y1:! type; - let Y2:! type; + let Y1: type; + let Y2: type; } -fn F(unused T:! N where .Y1 = () and .Y2 = .Y1 and .Y2 = .Self.Y1) { } +fn F(unused generic T: N where .Y1 = () and .Y2 = .Y1 and .Y2 = .Self.Y1) { } // --- fail_cycle_through_self_reference.carbon library "[[@TEST_NAME]]"; interface Z { - let T:! type; - let U:! Z; + let T: type; + let U: Z; } -// CHECK:STDERR: fail_cycle_through_self_reference.carbon:[[@LINE+4]]:17: error: found cycle in facet type constraint for `.(Z.T)` [FacetTypeConstraintCycle] -// CHECK:STDERR: fn F(unused A:! Z where .T = .U.T and .U = .Self) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_cycle_through_self_reference.carbon:[[@LINE+4]]:24: error: found cycle in facet type constraint for `.(Z.T)` [FacetTypeConstraintCycle] +// CHECK:STDERR: fn F(unused generic A: Z where .T = .U.T and .U = .Self) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused A:! Z where .T = .U.T and .U = .Self) {} +fn F(unused generic A: Z where .T = .U.T and .U = .Self) {} // --- reference_same_constant_in_different_self.carbon library "[[@TEST_NAME]]"; interface Z { - let T:! type; - let U:! Z; + let T: type; + let U: Z; } -fn F(A:! Z where .T = (), unused B:! Z where .T = .U.T and .U = A) {} +fn F(generic A: Z where .T = (), unused generic B: Z where .T = .U.T and .U = A) {} // --- non_cycle_with_self_reference.carbon library "[[@TEST_NAME]]"; interface Z { - let T:! type; - let U:! type; - let V:! Z; + let T: type; + let U: type; + let V: Z; } -fn F(A:! Z where .T = .V.U and .V = .Self and .U = ()) -> A.T { +fn F(generic A: Z where .T = .V.U and .V = .Self and .U = ()) -> A.T { return (); } @@ -512,53 +512,53 @@ fn F(A:! Z where .T = .V.U and .V = .Self and .U = ()) -> A.T { library "[[@TEST_NAME]]"; interface Z { - let T0:! type; - let T1:! type; - let T2:! type; - let T3:! type; + let T0: type; + let T1: type; + let T2: type; + let T3: type; } -// CHECK:STDERR: fail_cycle_with_unrelated_associated_constant.carbon:[[@LINE+4]]:17: error: found cycle in facet type constraint for `.(Z.T1)` [FacetTypeConstraintCycle] -// CHECK:STDERR: fn F(unused T:! Z where .T0 = .T1 and .T1 = .T0 and .T2 = .T3) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_cycle_with_unrelated_associated_constant.carbon:[[@LINE+4]]:24: error: found cycle in facet type constraint for `.(Z.T1)` [FacetTypeConstraintCycle] +// CHECK:STDERR: fn F(unused generic T: Z where .T0 = .T1 and .T1 = .T0 and .T2 = .T3) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! Z where .T0 = .T1 and .T1 = .T0 and .T2 = .T3) {} +fn F(unused generic T: Z where .T0 = .T1 and .T1 = .T0 and .T2 = .T3) {} // --- fail_cycle_with_branching_in_rhs.carbon library "[[@TEST_NAME]]"; interface Z { - let T0:! type; - let T1:! type; - let T2:! type; - let T3:! type; - let T4:! type; + let T0: type; + let T1: type; + let T2: type; + let T3: type; + let T4: type; } // TODO: There should only be one diagnostic here. // -// CHECK:STDERR: fail_cycle_with_branching_in_rhs.carbon:[[@LINE+4]]:17: error: found cycle in facet type constraint for `.(Z.T3)` [FacetTypeConstraintCycle] -// CHECK:STDERR: fn F(unused T:! Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T3 = .T1) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_cycle_with_branching_in_rhs.carbon:[[@LINE+4]]:24: error: found cycle in facet type constraint for `.(Z.T3)` [FacetTypeConstraintCycle] +// CHECK:STDERR: fn F(unused generic T: Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T3 = .T1) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T3 = .T1) {} +fn F(unused generic T: Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T3 = .T1) {} -// CHECK:STDERR: fail_cycle_with_branching_in_rhs.carbon:[[@LINE+4]]:17: error: found cycle in facet type constraint for `.(Z.T1)` [FacetTypeConstraintCycle] -// CHECK:STDERR: fn G(unused T:! Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T3 = .T0) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_cycle_with_branching_in_rhs.carbon:[[@LINE+4]]:24: error: found cycle in facet type constraint for `.(Z.T1)` [FacetTypeConstraintCycle] +// CHECK:STDERR: fn G(unused generic T: Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T3 = .T0) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn G(unused T:! Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T3 = .T0) {} +fn G(unused generic T: Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T3 = .T0) {} // --- no_cycle_with_branching_in_rhs.carbon library "[[@TEST_NAME]]"; interface Z { - let T0:! type; - let T1:! type; - let T2:! type; - let T3:! type; - let T4:! type; - let T5:! type; + let T0: type; + let T1: type; + let T2: type; + let T3: type; + let T4: type; + let T5: type; } // These create misdiagnostics if the resolving algorithms messes up tracking @@ -566,23 +566,23 @@ interface Z { // (from the RHS of .T1) while resolving the other. Or it can fail to apply the // () up the chain correctly. -fn F(T:! Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T4 = () and .T3 = .T2) -> T.T0 { +fn F(generic T: Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T4 = () and .T3 = .T2) -> T.T0 { return ((), ()); } -fn G(T:! Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T4 = .T5 and .T5 = () and .T3 = .T2) -> T.T0 { +fn G(generic T: Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T4 = .T5 and .T5 = () and .T3 = .T2) -> T.T0 { return ((), ()); } -fn H(T:! Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = (.T4, ()) and .T3 = .T2 and .T4 = {}) -> T.T0 { +fn H(generic T: Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = (.T4, ()) and .T3 = .T2 and .T4 = {}) -> T.T0 { return (({}, ()), ({}, ())); } -fn I(T:! Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T3 = .T2 and .T4 = ()) -> T.T0 { +fn I(generic T: Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T3 = .T2 and .T4 = ()) -> T.T0 { return ((), ()); } -fn J(T:! Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T4 = .T5 and .T3 = .T2 and .T5 = ()) -> T.T0 { +fn J(generic T: Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T4 = .T5 and .T3 = .T2 and .T5 = ()) -> T.T0 { return ((), ()); } @@ -590,17 +590,17 @@ fn J(T:! Z where .T0 = .T1 and .T1 = (.T2, .T3) and .T2 = .T4 and .T4 = .T5 and library "[[@TEST_NAME]]"; interface I { - let I1:! type; - let I2:! type; + let I1: type; + let I2: type; } interface J { - let J1:! I; + let J1: I; } // The value of .I1 is (), but to know that requires resolving .J1 first then // .J1.I2. -fn F(T:! I & J where .J1 = .Self and .I1 = .J1.I2 and .I2 = ()) -> T.I1 { +fn F(generic T: I & J where .J1 = .Self and .I1 = .J1.I2 and .I2 = ()) -> T.I1 { return (); } @@ -608,17 +608,17 @@ fn F(T:! I & J where .J1 = .Self and .I1 = .J1.I2 and .I2 = ()) -> T.I1 { library "[[@TEST_NAME]]"; interface I { - let I1:! type; - let I2:! type; + let I1: type; + let I2: type; } interface J { - let J1:! I; + let J1: I; } // The value of .I1 is (), but to know that requires resolving .J1 first then // .J1.I2. -fn F(U:! I where .I2 = (), T:! I & J where .J1 = U and .I1 = .J1.I2) -> T.I1 { +fn F(generic U: I where .I2 = (), generic T: I & J where .J1 = U and .I1 = .J1.I2) -> T.I1 { return (); } @@ -626,18 +626,18 @@ fn F(U:! I where .I2 = (), T:! I & J where .J1 = U and .I1 = .J1.I2) -> T.I1 { library "[[@TEST_NAME]]"; interface I { - let I1:! type; - let I2:! type; + let I1: type; + let I2: type; } interface J { - let J1:! I; + let J1: I; } // If we assume the nested `.J1` access will resolve to a facet value, we may // loop forever trying to resolve the `.I2` access. We should gracefully accept // that it does not resolve further. -fn F(unused T:! I & J where .I1 = .J1.I2) {} +fn F(unused generic T: I & J where .I1 = .J1.I2) {} // CHECK:STDOUT: --- fail_cycle.carbon // CHECK:STDOUT: @@ -670,57 +670,57 @@ fn F(unused T:! I & J where .I1 = .J1.I2) {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: = symbolic_binding_pattern T, 0 [concrete = ] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_19.1: type = splice_block %.loc13_19.2 [concrete = ] { -// CHECK:STDOUT: %.Self.frozen.loc13_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc13_26.1: type = splice_block %.loc13_26.2 [concrete = ] { +// CHECK:STDOUT: %.Self.frozen.loc13_22: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %.Self.frozen.loc13_19: %M.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.1cb] +// CHECK:STDOUT: %.Self.frozen.loc13_26: %M.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.1cb] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %M.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc13_25: %M.type = name_ref .Self, %.Self.frozen.loc13_19 [symbolic_self = constants.%.Self.frozen.1cb] -// CHECK:STDOUT: %.Self.as_type.loc13_25: type = facet_access_type %.Self.ref.loc13_25 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc13_25: type = converted %.Self.ref.loc13_25, %.Self.as_type.loc13_25 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %X.ref.loc13_25: %M.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc13_25.1: type = impl_witness_access constants.%M.lookup_impl_witness.beb, element0 [symbolic_self = constants.%impl.elem0.352] -// CHECK:STDOUT: %.Self.ref.loc13_30: %M.type = name_ref .Self, %.Self.frozen.loc13_19 [symbolic_self = constants.%.Self.frozen.1cb] -// CHECK:STDOUT: %.Self.as_type.loc13_30: type = facet_access_type %.Self.ref.loc13_30 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc13_30: type = converted %.Self.ref.loc13_30, %.Self.as_type.loc13_30 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %Y.ref.loc13_30: %M.assoc_type = name_ref Y, @Y.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc13_30.1: type = impl_witness_access constants.%M.lookup_impl_witness.beb, element1 [symbolic_self = constants.%impl.elem1.66c] -// CHECK:STDOUT: %rewrite.loc13_28.1 = requirement_rewrite %impl.elem0.loc13_25.1, %impl.elem1.loc13_30.1 [concrete] -// CHECK:STDOUT: %.Self.ref.loc13_37: %M.type = name_ref .Self, %.Self.frozen.loc13_19 [symbolic_self = constants.%.Self.frozen.1cb] +// CHECK:STDOUT: %.Self.ref.loc13_32: %M.type = name_ref .Self, %.Self.frozen.loc13_26 [symbolic_self = constants.%.Self.frozen.1cb] +// CHECK:STDOUT: %.Self.as_type.loc13_32: type = facet_access_type %.Self.ref.loc13_32 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc13_32: type = converted %.Self.ref.loc13_32, %.Self.as_type.loc13_32 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %X.ref.loc13_32: %M.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc13_32.1: type = impl_witness_access constants.%M.lookup_impl_witness.beb, element0 [symbolic_self = constants.%impl.elem0.352] +// CHECK:STDOUT: %.Self.ref.loc13_37: %M.type = name_ref .Self, %.Self.frozen.loc13_26 [symbolic_self = constants.%.Self.frozen.1cb] // CHECK:STDOUT: %.Self.as_type.loc13_37: type = facet_access_type %.Self.ref.loc13_37 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %.loc13_37: type = converted %.Self.ref.loc13_37, %.Self.as_type.loc13_37 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %Y.ref.loc13_37: %M.assoc_type = name_ref Y, @Y.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %impl.elem1.loc13_37.1: type = impl_witness_access constants.%M.lookup_impl_witness.beb, element1 [symbolic_self = constants.%impl.elem1.66c] -// CHECK:STDOUT: %.Self.ref.loc13_42: %M.type = name_ref .Self, %.Self.frozen.loc13_19 [symbolic_self = constants.%.Self.frozen.1cb] -// CHECK:STDOUT: %.Self.as_type.loc13_42: type = facet_access_type %.Self.ref.loc13_42 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc13_42: type = converted %.Self.ref.loc13_42, %.Self.as_type.loc13_42 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %X.ref.loc13_42: %M.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc13_42.1: type = impl_witness_access constants.%M.lookup_impl_witness.beb, element0 [symbolic_self = constants.%impl.elem0.352] -// CHECK:STDOUT: %impl.elem0.subst.loc13_42.1: type = impl_witness_access_substituted %impl.elem0.loc13_42.1, %impl.elem1.loc13_30.1 [symbolic_self = constants.%impl.elem1.66c] -// CHECK:STDOUT: %rewrite.loc13_40.1 = requirement_rewrite %impl.elem1.loc13_37.1, %impl.elem0.subst.loc13_42.1 [concrete] -// CHECK:STDOUT: %.Self.ref.loc13_49: %M.type = name_ref .Self, %.Self.frozen.loc13_19 [symbolic_self = constants.%.Self.frozen.1cb] +// CHECK:STDOUT: %rewrite.loc13_35.1 = requirement_rewrite %impl.elem0.loc13_32.1, %impl.elem1.loc13_37.1 [concrete] +// CHECK:STDOUT: %.Self.ref.loc13_44: %M.type = name_ref .Self, %.Self.frozen.loc13_26 [symbolic_self = constants.%.Self.frozen.1cb] +// CHECK:STDOUT: %.Self.as_type.loc13_44: type = facet_access_type %.Self.ref.loc13_44 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc13_44: type = converted %.Self.ref.loc13_44, %.Self.as_type.loc13_44 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %Y.ref.loc13_44: %M.assoc_type = name_ref Y, @Y.%assoc1 [concrete = constants.%assoc1] +// CHECK:STDOUT: %impl.elem1.loc13_44.1: type = impl_witness_access constants.%M.lookup_impl_witness.beb, element1 [symbolic_self = constants.%impl.elem1.66c] +// CHECK:STDOUT: %.Self.ref.loc13_49: %M.type = name_ref .Self, %.Self.frozen.loc13_26 [symbolic_self = constants.%.Self.frozen.1cb] // CHECK:STDOUT: %.Self.as_type.loc13_49: type = facet_access_type %.Self.ref.loc13_49 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %.loc13_49: type = converted %.Self.ref.loc13_49, %.Self.as_type.loc13_49 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %X.ref.loc13_49: %M.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc13_49.1: type = impl_witness_access constants.%M.lookup_impl_witness.beb, element0 [symbolic_self = constants.%impl.elem0.352] +// CHECK:STDOUT: %impl.elem0.subst.loc13_49.1: type = impl_witness_access_substituted %impl.elem0.loc13_49.1, %impl.elem1.loc13_37.1 [symbolic_self = constants.%impl.elem1.66c] +// CHECK:STDOUT: %rewrite.loc13_47.1 = requirement_rewrite %impl.elem1.loc13_44.1, %impl.elem0.subst.loc13_49.1 [concrete] +// CHECK:STDOUT: %.Self.ref.loc13_56: %M.type = name_ref .Self, %.Self.frozen.loc13_26 [symbolic_self = constants.%.Self.frozen.1cb] +// CHECK:STDOUT: %.Self.as_type.loc13_56: type = facet_access_type %.Self.ref.loc13_56 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc13_56: type = converted %.Self.ref.loc13_56, %.Self.as_type.loc13_56 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc2 [concrete = constants.%assoc2] -// CHECK:STDOUT: %impl.elem2.loc13_49.1: type = impl_witness_access constants.%M.lookup_impl_witness.beb, element2 [symbolic_self = constants.%impl.elem2.c22] -// CHECK:STDOUT: %.loc13_55.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_55.2: type = converted %.loc13_55.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %rewrite.loc13_52.1 = requirement_rewrite %impl.elem2.loc13_49.1, %.loc13_55.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc13_25.2: type = impl_witness_access constants.%M.lookup_impl_witness.e09, element0 [symbolic_self = constants.%impl.elem0.c24] -// CHECK:STDOUT: %impl.elem1.loc13_30.2: type = impl_witness_access constants.%M.lookup_impl_witness.e09, element1 [symbolic_self = constants.%impl.elem1.e3e] -// CHECK:STDOUT: %rewrite.loc13_28.2 = requirement_rewrite %impl.elem0.loc13_25.2, %impl.elem1.loc13_30.2 [concrete] +// CHECK:STDOUT: %impl.elem2.loc13_56.1: type = impl_witness_access constants.%M.lookup_impl_witness.beb, element2 [symbolic_self = constants.%impl.elem2.c22] +// CHECK:STDOUT: %.loc13_62.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc13_62.2: type = converted %.loc13_62.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %rewrite.loc13_59.1 = requirement_rewrite %impl.elem2.loc13_56.1, %.loc13_62.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc13_32.2: type = impl_witness_access constants.%M.lookup_impl_witness.e09, element0 [symbolic_self = constants.%impl.elem0.c24] // CHECK:STDOUT: %impl.elem1.loc13_37.2: type = impl_witness_access constants.%M.lookup_impl_witness.e09, element1 [symbolic_self = constants.%impl.elem1.e3e] -// CHECK:STDOUT: %impl.elem0.loc13_42.2: type = impl_witness_access constants.%M.lookup_impl_witness.e09, element0 [symbolic_self = constants.%impl.elem0.c24] -// CHECK:STDOUT: %impl.elem1.loc13_30.3: type = impl_witness_access constants.%M.lookup_impl_witness.e09, element1 [symbolic_self = constants.%impl.elem1.e3e] -// CHECK:STDOUT: %impl.elem0.subst.loc13_42.2: type = impl_witness_access_substituted %impl.elem0.loc13_42.2, %impl.elem1.loc13_30.3 [symbolic_self = constants.%impl.elem1.e3e] -// CHECK:STDOUT: %rewrite.loc13_40.2 = requirement_rewrite %impl.elem1.loc13_37.2, %impl.elem0.subst.loc13_42.2 [concrete] -// CHECK:STDOUT: %impl.elem2.loc13_49.2: type = impl_witness_access constants.%M.lookup_impl_witness.e09, element2 [symbolic_self = constants.%impl.elem2.017] -// CHECK:STDOUT: %rewrite.loc13_52.2 = requirement_rewrite %impl.elem2.loc13_49.2, %.loc13_55.2 [concrete] -// CHECK:STDOUT: %.loc13_19.2: type = where_expr [concrete = ] { +// CHECK:STDOUT: %rewrite.loc13_35.2 = requirement_rewrite %impl.elem0.loc13_32.2, %impl.elem1.loc13_37.2 [concrete] +// CHECK:STDOUT: %impl.elem1.loc13_44.2: type = impl_witness_access constants.%M.lookup_impl_witness.e09, element1 [symbolic_self = constants.%impl.elem1.e3e] +// CHECK:STDOUT: %impl.elem0.loc13_49.2: type = impl_witness_access constants.%M.lookup_impl_witness.e09, element0 [symbolic_self = constants.%impl.elem0.c24] +// CHECK:STDOUT: %impl.elem1.loc13_37.3: type = impl_witness_access constants.%M.lookup_impl_witness.e09, element1 [symbolic_self = constants.%impl.elem1.e3e] +// CHECK:STDOUT: %impl.elem0.subst.loc13_49.2: type = impl_witness_access_substituted %impl.elem0.loc13_49.2, %impl.elem1.loc13_37.3 [symbolic_self = constants.%impl.elem1.e3e] +// CHECK:STDOUT: %rewrite.loc13_47.2 = requirement_rewrite %impl.elem1.loc13_44.2, %impl.elem0.subst.loc13_49.2 [concrete] +// CHECK:STDOUT: %impl.elem2.loc13_56.2: type = impl_witness_access constants.%M.lookup_impl_witness.e09, element2 [symbolic_self = constants.%impl.elem2.017] +// CHECK:STDOUT: %rewrite.loc13_59.2 = requirement_rewrite %impl.elem2.loc13_56.2, %.loc13_62.2 [concrete] +// CHECK:STDOUT: %.loc13_26.2: type = where_expr [concrete = ] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %M.ref [concrete] -// CHECK:STDOUT: %rewrite.loc13_28.2 = requirement_rewrite %impl.elem0.loc13_25.2, %impl.elem1.loc13_30.2 [concrete] -// CHECK:STDOUT: %rewrite.loc13_40.2 = requirement_rewrite %impl.elem1.loc13_37.2, %impl.elem0.subst.loc13_42.2 [concrete] -// CHECK:STDOUT: %rewrite.loc13_52.2 = requirement_rewrite %impl.elem2.loc13_49.2, %.loc13_55.2 [concrete] +// CHECK:STDOUT: %rewrite.loc13_35.2 = requirement_rewrite %impl.elem0.loc13_32.2, %impl.elem1.loc13_37.2 [concrete] +// CHECK:STDOUT: %rewrite.loc13_47.2 = requirement_rewrite %impl.elem1.loc13_44.2, %impl.elem0.subst.loc13_49.2 [concrete] +// CHECK:STDOUT: %rewrite.loc13_59.2 = requirement_rewrite %impl.elem2.loc13_56.2, %.loc13_62.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %T: = symbolic_binding T, 0 [concrete = ] diff --git a/toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon b/toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon index ad7ea2403bde..e6c89108cc44 100644 --- a/toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon +++ b/toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon @@ -12,7 +12,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon -interface Generic(Scalar:! type) { +interface Generic(Scalar: type) { fn F(); } @@ -24,15 +24,15 @@ impl ImplsGeneric as Generic(GenericParam) { fn F() {} } -fn CallGenericMethod(T:! type, unused U:! Generic(T)) {} +fn CallGenericMethod(generic T: type, unused generic U: Generic(T)) {} fn G() { // CHECK:STDERR: fail_convert_class_type_to_generic_facet_value.carbon:[[@LINE+7]]:3: error: cannot convert type `ImplsGeneric` into type implementing `Generic(WrongGenericParam)` [ConversionFailureTypeToFacet] // CHECK:STDERR: CallGenericMethod(WrongGenericParam, ImplsGeneric); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_convert_class_type_to_generic_facet_value.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn CallGenericMethod(T:! type, unused U:! Generic(T)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn CallGenericMethod(generic T: type, unused generic U: Generic(T)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: CallGenericMethod(WrongGenericParam, ImplsGeneric); } @@ -103,9 +103,9 @@ fn G() { // CHECK:STDOUT: %Generic.decl: %Generic.type.30d = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %Scalar.patt.loc15_25.1: %pattern_type.98f = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc15_25.2 (constants.%Scalar.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_28.1: type = splice_block %.loc15_28.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_27.1: type = splice_block %.loc15_27.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_28.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_27.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %Scalar.loc15_25.2: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc15_25.1 (constants.%Scalar)] // CHECK:STDOUT: } @@ -119,21 +119,21 @@ fn G() { // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%GenericParam)> [concrete = constants.%Generic.type.b40] // CHECK:STDOUT: } // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { -// CHECK:STDOUT: %T.patt.loc27_23.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_23.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc27_40.1: @CallGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc27_40.2 (constants.%U.patt)] +// CHECK:STDOUT: %T.patt.loc27_31.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_31.2 (constants.%T.patt)] +// CHECK:STDOUT: %U.patt.loc27_55.1: @CallGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc27_55.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc27_26.1: type = splice_block %.loc27_26.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc27_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc27_26.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc27_33.1: type = splice_block %.loc27_33.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc27_31: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc27_33.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc27_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc27_23.1 (constants.%T)] -// CHECK:STDOUT: %.loc27_52: type = splice_block %Generic.type.loc27_52.2 [symbolic = %Generic.type.loc27_52.1 (constants.%Generic.type.ee14e9.2)] { -// CHECK:STDOUT: %.Self.frozen.loc27_40: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %T.loc27_31.2: type = symbolic_binding T, 0 [symbolic = %T.loc27_31.1 (constants.%T)] +// CHECK:STDOUT: %.loc27_66: type = splice_block %Generic.type.loc27_66.2 [symbolic = %Generic.type.loc27_66.1 (constants.%Generic.type.ee14e9.2)] { +// CHECK:STDOUT: %.Self.frozen.loc27_55: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Generic.ref: %Generic.type.30d = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc27_23.2 [symbolic = %T.loc27_23.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc27_52.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc27_52.1 (constants.%Generic.type.ee14e9.2)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc27_31.2 [symbolic = %T.loc27_31.1 (constants.%T)] +// CHECK:STDOUT: %Generic.type.loc27_66.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc27_66.1 (constants.%Generic.type.ee14e9.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc27_40.2: @CallGenericMethod.%Generic.type.loc27_52.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc27_40.1 (constants.%U)] +// CHECK:STDOUT: %U.loc27_55.2: @CallGenericMethod.%Generic.type.loc27_66.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc27_55.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } @@ -144,10 +144,10 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc15_25.1)> [symbolic = %Generic.type (constants.%Generic.type.ee14e9.1)] -// CHECK:STDOUT: %Self.loc15_34.2: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.8ea)] +// CHECK:STDOUT: %Self.loc15_33.2: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_33.2 (constants.%Self.8ea)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc15_34.1: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.8ea)] +// CHECK:STDOUT: %Self.loc15_33.1: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_33.2 (constants.%Self.8ea)] // CHECK:STDOUT: %Generic.WithSelf.decl = interface_with_self_decl @Generic [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -155,7 +155,7 @@ fn G() { // CHECK:STDOUT: %assoc0.loc16_9.1: @Generic.WithSelf.%Generic.assoc_type (%Generic.assoc_type.d70) = assoc_entity element0, %Generic.WithSelf.F.decl [symbolic = %assoc0.loc16_9.2 (constants.%assoc0.310)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc15_34.1 +// CHECK:STDOUT: .Self = %Self.loc15_33.1 // CHECK:STDOUT: .F = @Generic.WithSelf.%assoc0.loc16_9.1 // CHECK:STDOUT: witness = (@Generic.WithSelf.%Generic.WithSelf.F.decl) // CHECK:STDOUT: @@ -200,7 +200,7 @@ fn G() { // CHECK:STDOUT: .Self = constants.%ImplsGeneric // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc15_25.2: type, @Generic.%Self.loc15_34.1: @Generic.%Generic.type (%Generic.type.ee14e9.1)) { +// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc15_25.2: type, @Generic.%Self.loc15_33.1: @Generic.%Generic.type (%Generic.type.ee14e9.1)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -211,13 +211,13 @@ fn G() { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc27_23.2: type, %U.loc27_40.2: @CallGenericMethod.%Generic.type.loc27_52.1 (%Generic.type.ee14e9.2)) { -// CHECK:STDOUT: %T.patt.loc27_23.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_23.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc27_23.1: type = symbolic_binding T, 0 [symbolic = %T.loc27_23.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc27_52.1: type = facet_type <@Generic, @Generic(%T.loc27_23.1)> [symbolic = %Generic.type.loc27_52.1 (constants.%Generic.type.ee14e9.2)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Generic.type.loc27_52.1 [symbolic = %pattern_type (constants.%pattern_type.4e0)] -// CHECK:STDOUT: %U.patt.loc27_40.2: @CallGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc27_40.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc27_40.1: @CallGenericMethod.%Generic.type.loc27_52.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc27_40.1 (constants.%U)] +// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc27_31.2: type, %U.loc27_55.2: @CallGenericMethod.%Generic.type.loc27_66.1 (%Generic.type.ee14e9.2)) { +// CHECK:STDOUT: %T.patt.loc27_31.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_31.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc27_31.1: type = symbolic_binding T, 0 [symbolic = %T.loc27_31.1 (constants.%T)] +// CHECK:STDOUT: %Generic.type.loc27_66.1: type = facet_type <@Generic, @Generic(%T.loc27_31.1)> [symbolic = %Generic.type.loc27_66.1 (constants.%Generic.type.ee14e9.2)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Generic.type.loc27_66.1 [symbolic = %pattern_type (constants.%pattern_type.4e0)] +// CHECK:STDOUT: %U.patt.loc27_55.2: @CallGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc27_55.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc27_55.1: @CallGenericMethod.%Generic.type.loc27_66.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc27_55.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -254,7 +254,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type => constants.%Generic.type.b40 -// CHECK:STDOUT: %Self.loc15_34.2 => constants.%Self.685 +// CHECK:STDOUT: %Self.loc15_33.2 => constants.%Self.685 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.WithSelf(constants.%GenericParam, constants.%Self.8ea) { @@ -287,12 +287,12 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U) { -// CHECK:STDOUT: %T.patt.loc27_23.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc27_23.1 => constants.%T -// CHECK:STDOUT: %Generic.type.loc27_52.1 => constants.%Generic.type.ee14e9.2 +// CHECK:STDOUT: %T.patt.loc27_31.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc27_31.1 => constants.%T +// CHECK:STDOUT: %Generic.type.loc27_66.1 => constants.%Generic.type.ee14e9.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4e0 -// CHECK:STDOUT: %U.patt.loc27_40.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc27_40.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc27_55.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc27_55.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%WrongGenericParam) { diff --git a/toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon b/toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon index d2978acc049e..eb83627ca748 100644 --- a/toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon +++ b/toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon @@ -15,16 +15,16 @@ interface Eats {} interface Animal {} -fn Feed[T:! Eats](unused e: T) {} +fn Feed[T: Eats](unused e: T) {} -// CHECK:STDERR: fail_convert_facet_value_to_missing_impl.carbon:[[@LINE+7]]:37: error: cannot convert type `T` that implements `Animal` into type implementing `Eats` [ConversionFailureFacetToFacet] -// CHECK:STDERR: fn HandleAnimal[T:! Animal](a: T) { Feed(a); } -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: fail_convert_facet_value_to_missing_impl.carbon:[[@LINE+7]]:36: error: cannot convert type `T` that implements `Animal` into type implementing `Eats` [ConversionFailureFacetToFacet] +// CHECK:STDERR: fn HandleAnimal[T: Animal](a: T) { Feed(a); } +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_convert_facet_value_to_missing_impl.carbon:[[@LINE-5]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: fn Feed[T:! Eats](unused e: T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn Feed[T: Eats](unused e: T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn HandleAnimal[T:! Animal](a: T) { Feed(a); } +fn HandleAnimal[T: Animal](a: T) { Feed(a); } // CHECK:STDOUT: --- fail_convert_facet_value_to_missing_impl.carbon // CHECK:STDOUT: @@ -77,39 +77,39 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %Animal.decl: type = interface_decl @Animal [concrete = constants.%Animal.type] {} {} // CHECK:STDOUT: %Feed.decl: %Feed.type = fn_decl @Feed [concrete = constants.%Feed] { // CHECK:STDOUT: %T.patt.loc18_10.1: %pattern_type.880 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_10.2 (constants.%T.patt.9e8)] -// CHECK:STDOUT: %e.param_patt.loc18_27.1: @Feed.%pattern_type (%pattern_type.aed) = value_param_pattern [symbolic = %e.param_patt.loc18_27.2 (constants.%e.param_patt)] -// CHECK:STDOUT: %e.patt.loc18_27.1: @Feed.%pattern_type (%pattern_type.aed) = at_binding_pattern e, %e.param_patt.loc18_27.1 [symbolic = %e.patt.loc18_27.2 (constants.%e.patt)] +// CHECK:STDOUT: %e.param_patt.loc18_26.1: @Feed.%pattern_type (%pattern_type.aed) = value_param_pattern [symbolic = %e.param_patt.loc18_26.2 (constants.%e.param_patt)] +// CHECK:STDOUT: %e.patt.loc18_26.1: @Feed.%pattern_type (%pattern_type.aed) = at_binding_pattern e, %e.param_patt.loc18_26.1 [symbolic = %e.patt.loc18_26.2 (constants.%e.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_13: type = splice_block %Eats.ref [concrete = constants.%Eats.type] { +// CHECK:STDOUT: %.loc18_12: type = splice_block %Eats.ref [concrete = constants.%Eats.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc18_10.2: %Eats.type = symbolic_binding T, 0 [symbolic = %T.loc18_10.1 (constants.%T.672)] -// CHECK:STDOUT: %e.param: @Feed.%T.as_type.loc18_29.1 (%T.as_type.422) = value_param call_param0 -// CHECK:STDOUT: %.loc18_29.1: type = splice_block %.loc18_29.2 [symbolic = %T.as_type.loc18_29.1 (constants.%T.as_type.422)] { +// CHECK:STDOUT: %e.param: @Feed.%T.as_type.loc18_28.1 (%T.as_type.422) = value_param call_param0 +// CHECK:STDOUT: %.loc18_28.1: type = splice_block %.loc18_28.2 [symbolic = %T.as_type.loc18_28.1 (constants.%T.as_type.422)] { // CHECK:STDOUT: %T.ref: %Eats.type = name_ref T, %T.loc18_10.2 [symbolic = %T.loc18_10.1 (constants.%T.672)] -// CHECK:STDOUT: %T.as_type.loc18_29.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc18_29.1 (constants.%T.as_type.422)] -// CHECK:STDOUT: %.loc18_29.2: type = converted %T.ref, %T.as_type.loc18_29.2 [symbolic = %T.as_type.loc18_29.1 (constants.%T.as_type.422)] +// CHECK:STDOUT: %T.as_type.loc18_28.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc18_28.1 (constants.%T.as_type.422)] +// CHECK:STDOUT: %.loc18_28.2: type = converted %T.ref, %T.as_type.loc18_28.2 [symbolic = %T.as_type.loc18_28.1 (constants.%T.as_type.422)] // CHECK:STDOUT: } -// CHECK:STDOUT: %e: @Feed.%T.as_type.loc18_29.1 (%T.as_type.422) = wrapper_binding e, %e.param +// CHECK:STDOUT: %e: @Feed.%T.as_type.loc18_28.1 (%T.as_type.422) = wrapper_binding e, %e.param // CHECK:STDOUT: } // CHECK:STDOUT: %HandleAnimal.decl: %HandleAnimal.type = fn_decl @HandleAnimal [concrete = constants.%HandleAnimal] { // CHECK:STDOUT: %T.patt.loc27_18.1: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_18.2 (constants.%T.patt.e44)] -// CHECK:STDOUT: %a.param_patt.loc27_30.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc27_30.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc27_30.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc27_30.1 [symbolic = %a.patt.loc27_30.2 (constants.%a.patt)] +// CHECK:STDOUT: %a.param_patt.loc27_29.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc27_29.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc27_29.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc27_29.1 [symbolic = %a.patt.loc27_29.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc27_21: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { +// CHECK:STDOUT: %.loc27_20: type = splice_block %Animal.ref [concrete = constants.%Animal.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc27_18.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc27_18.1 (constants.%T.443)] -// CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc27_32.1 (%T.as_type.01d) = value_param call_param0 -// CHECK:STDOUT: %.loc27_32.1: type = splice_block %.loc27_32.2 [symbolic = %T.as_type.loc27_32.1 (constants.%T.as_type.01d)] { +// CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc27_31.1 (%T.as_type.01d) = value_param call_param0 +// CHECK:STDOUT: %.loc27_31.1: type = splice_block %.loc27_31.2 [symbolic = %T.as_type.loc27_31.1 (constants.%T.as_type.01d)] { // CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc27_18.2 [symbolic = %T.loc27_18.1 (constants.%T.443)] -// CHECK:STDOUT: %T.as_type.loc27_32.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc27_32.1 (constants.%T.as_type.01d)] -// CHECK:STDOUT: %.loc27_32.2: type = converted %T.ref, %T.as_type.loc27_32.2 [symbolic = %T.as_type.loc27_32.1 (constants.%T.as_type.01d)] +// CHECK:STDOUT: %T.as_type.loc27_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc27_31.1 (constants.%T.as_type.01d)] +// CHECK:STDOUT: %.loc27_31.2: type = converted %T.ref, %T.as_type.loc27_31.2 [symbolic = %T.as_type.loc27_31.1 (constants.%T.as_type.01d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @HandleAnimal.%T.as_type.loc27_32.1 (%T.as_type.01d) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @HandleAnimal.%T.as_type.loc27_31.1 (%T.as_type.01d) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -142,15 +142,15 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: generic fn @Feed(%T.loc18_10.2: %Eats.type) { // CHECK:STDOUT: %T.patt.loc18_10.2: %pattern_type.880 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_10.2 (constants.%T.patt.9e8)] // CHECK:STDOUT: %T.loc18_10.1: %Eats.type = symbolic_binding T, 0 [symbolic = %T.loc18_10.1 (constants.%T.672)] -// CHECK:STDOUT: %T.as_type.loc18_29.1: type = facet_access_type %T.loc18_10.1 [symbolic = %T.as_type.loc18_29.1 (constants.%T.as_type.422)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc18_29.1 [symbolic = %pattern_type (constants.%pattern_type.aed)] -// CHECK:STDOUT: %e.param_patt.loc18_27.2: @Feed.%pattern_type (%pattern_type.aed) = value_param_pattern [symbolic = %e.param_patt.loc18_27.2 (constants.%e.param_patt)] -// CHECK:STDOUT: %e.patt.loc18_27.2: @Feed.%pattern_type (%pattern_type.aed) = at_binding_pattern e, %e.param_patt.loc18_27.2 [symbolic = %e.patt.loc18_27.2 (constants.%e.patt)] +// CHECK:STDOUT: %T.as_type.loc18_28.1: type = facet_access_type %T.loc18_10.1 [symbolic = %T.as_type.loc18_28.1 (constants.%T.as_type.422)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc18_28.1 [symbolic = %pattern_type (constants.%pattern_type.aed)] +// CHECK:STDOUT: %e.param_patt.loc18_26.2: @Feed.%pattern_type (%pattern_type.aed) = value_param_pattern [symbolic = %e.param_patt.loc18_26.2 (constants.%e.param_patt)] +// CHECK:STDOUT: %e.patt.loc18_26.2: @Feed.%pattern_type (%pattern_type.aed) = at_binding_pattern e, %e.param_patt.loc18_26.2 [symbolic = %e.patt.loc18_26.2 (constants.%e.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc18_29.1 [symbolic = %require_complete (constants.%require_complete.c4d)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc18_28.1 [symbolic = %require_complete (constants.%require_complete.c4d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%e.param: @Feed.%T.as_type.loc18_29.1 (%T.as_type.422)) { +// CHECK:STDOUT: fn(%e.param: @Feed.%T.as_type.loc18_28.1 (%T.as_type.422)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -161,18 +161,18 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: generic fn @HandleAnimal(%T.loc27_18.2: %Animal.type) { // CHECK:STDOUT: %T.patt.loc27_18.2: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_18.2 (constants.%T.patt.e44)] // CHECK:STDOUT: %T.loc27_18.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc27_18.1 (constants.%T.443)] -// CHECK:STDOUT: %T.as_type.loc27_32.1: type = facet_access_type %T.loc27_18.1 [symbolic = %T.as_type.loc27_32.1 (constants.%T.as_type.01d)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc27_32.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] -// CHECK:STDOUT: %a.param_patt.loc27_30.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc27_30.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc27_30.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc27_30.2 [symbolic = %a.patt.loc27_30.2 (constants.%a.patt)] +// CHECK:STDOUT: %T.as_type.loc27_31.1: type = facet_access_type %T.loc27_18.1 [symbolic = %T.as_type.loc27_31.1 (constants.%T.as_type.01d)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc27_31.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] +// CHECK:STDOUT: %a.param_patt.loc27_29.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc27_29.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc27_29.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = at_binding_pattern a, %a.param_patt.loc27_29.2 [symbolic = %a.patt.loc27_29.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc27_32.1 [symbolic = %require_complete (constants.%require_complete.db4)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc27_31.1 [symbolic = %require_complete (constants.%require_complete.db4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @HandleAnimal.%T.as_type.loc27_32.1 (%T.as_type.01d)) { +// CHECK:STDOUT: fn(%a.param: @HandleAnimal.%T.as_type.loc27_31.1 (%T.as_type.01d)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Feed.ref: %Feed.type = name_ref Feed, file.%Feed.decl [concrete = constants.%Feed] -// CHECK:STDOUT: %a.ref: @HandleAnimal.%T.as_type.loc27_32.1 (%T.as_type.01d) = name_ref a, %a +// CHECK:STDOUT: %a.ref: @HandleAnimal.%T.as_type.loc27_31.1 (%T.as_type.01d) = name_ref a, %a // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -190,18 +190,18 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: specific @Feed(constants.%T.672) { // CHECK:STDOUT: %T.patt.loc18_10.2 => constants.%T.patt.9e8 // CHECK:STDOUT: %T.loc18_10.1 => constants.%T.672 -// CHECK:STDOUT: %T.as_type.loc18_29.1 => constants.%T.as_type.422 +// CHECK:STDOUT: %T.as_type.loc18_28.1 => constants.%T.as_type.422 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.aed -// CHECK:STDOUT: %e.param_patt.loc18_27.2 => constants.%e.param_patt -// CHECK:STDOUT: %e.patt.loc18_27.2 => constants.%e.patt +// CHECK:STDOUT: %e.param_patt.loc18_26.2 => constants.%e.param_patt +// CHECK:STDOUT: %e.patt.loc18_26.2 => constants.%e.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%T.443) { // CHECK:STDOUT: %T.patt.loc27_18.2 => constants.%T.patt.e44 // CHECK:STDOUT: %T.loc27_18.1 => constants.%T.443 -// CHECK:STDOUT: %T.as_type.loc27_32.1 => constants.%T.as_type.01d +// CHECK:STDOUT: %T.as_type.loc27_31.1 => constants.%T.as_type.01d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e90 -// CHECK:STDOUT: %a.param_patt.loc27_30.2 => constants.%a.param_patt -// CHECK:STDOUT: %a.patt.loc27_30.2 => constants.%a.patt +// CHECK:STDOUT: %a.param_patt.loc27_29.2 => constants.%a.param_patt +// CHECK:STDOUT: %a.patt.loc27_29.2 => constants.%a.patt // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/fail_convert_type_erased_type_to_facet.carbon b/toolchain/check/testdata/facet/fail_convert_type_erased_type_to_facet.carbon index 91cc6b085bba..f04f6a004ff1 100644 --- a/toolchain/check/testdata/facet/fail_convert_type_erased_type_to_facet.carbon +++ b/toolchain/check/testdata/facet/fail_convert_type_erased_type_to_facet.carbon @@ -17,14 +17,14 @@ interface Animal {} class Goat {} impl Goat as Animal {} -fn WalkAnimal(unused a:! Animal) {} +fn WalkAnimal(unused generic a: Animal) {} fn F() { - // CHECK:STDERR: fail_convert_type_erased_type_to_facet.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let x:! type = Goat; - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_convert_type_erased_type_to_facet.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic x: type = Goat; + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - let x:! type = Goat; + let generic x: type = Goat; WalkAnimal(x); } @@ -73,8 +73,8 @@ fn F() { // CHECK:STDOUT: .Self = constants.%Goat // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @WalkAnimal(.inst{{[0-9A-F]+}}.loc20_23: %Animal.type) { -// CHECK:STDOUT: %a.patt.loc20_23.2: %pattern_type = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc20_23.2 (constants.%a.patt)] +// CHECK:STDOUT: generic fn @WalkAnimal(.inst{{[0-9A-F]+}}.loc20_31: %Animal.type) { +// CHECK:STDOUT: %a.patt.loc20_31.2: %pattern_type = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc20_31.2 (constants.%a.patt)] // CHECK:STDOUT: %a: %Animal.type = symbolic_binding a, 0 [symbolic = %a (constants.%a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -98,7 +98,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WalkAnimal(constants.%a) { -// CHECK:STDOUT: %a.patt.loc20_23.2 => constants.%a.patt +// CHECK:STDOUT: %a.patt.loc20_31.2 => constants.%a.patt // CHECK:STDOUT: %a => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon b/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon index 0bc1b06e0824..ca70b9a50d2a 100644 --- a/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon +++ b/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon @@ -14,7 +14,7 @@ // Uses a tuple to allow using the inner type as a type that isn't directly // deducible, without deducing through HoldsType. -class HoldsType(T:! (type, )) {} +class HoldsType(T: (type, )) {} class RuntimeConvertFrom {} class RuntimeConvertTo {} @@ -24,18 +24,18 @@ impl RuntimeConvertFrom as Core.ImplicitAs(RuntimeConvertTo) { fn Convert(unused self) -> RuntimeConvertTo { return {}; } } -fn F[T:! (type, )](unused A:! T.0, unused x: HoldsType(T)) {} +fn F[T: (type, )](unused generic A: T.0, unused x: HoldsType(T)) {} -fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) { +fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom) { // CHECK:STDERR: fail_deduction_uses_runtime_type_conversion.carbon:[[@LINE+10]]:3: error: compile-time value requires runtime conversion, constructing value of type `RuntimeConvertTo` [RuntimeConversionDuringCompTimeDeduction] // CHECK:STDERR: F(from, holds_to); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduction_uses_runtime_type_conversion.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F[T:! (type, )](unused A:! T.0, unused x: HoldsType(T)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F[T: (type, )](unused generic A: T.0, unused x: HoldsType(T)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduction_uses_runtime_type_conversion.carbon:[[@LINE-9]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F[T:! (type, )](unused A:! T.0, unused x: HoldsType(T)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F[T: (type, )](unused generic A: T.0, unused x: HoldsType(T)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(from, holds_to); } @@ -131,11 +131,11 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) { // CHECK:STDOUT: %HoldsType.decl: %HoldsType.type = class_decl @HoldsType [concrete = constants.%HoldsType.generic] { // CHECK:STDOUT: %T.patt.loc17_18.1: %pattern_type.f1e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_18.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_28.1: type = splice_block %.loc17_28.3 [concrete = constants.%tuple.type] { +// CHECK:STDOUT: %.loc17_27.1: type = splice_block %.loc17_27.3 [concrete = constants.%tuple.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc17_22: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.loc17_28.2: %tuple.type = tuple_literal (%.loc17_22) [concrete = constants.%tuple.0d2] -// CHECK:STDOUT: %.loc17_28.3: type = converted %.loc17_28.2, constants.%tuple.type [concrete = constants.%tuple.type] +// CHECK:STDOUT: %.loc17_21: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc17_27.2: %tuple.type = tuple_literal (%.loc17_21) [concrete = constants.%tuple.0d2] +// CHECK:STDOUT: %.loc17_27.3: type = converted %.loc17_27.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc17_18.2: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc17_18.1 (constants.%T)] // CHECK:STDOUT: } @@ -150,36 +150,36 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) { // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc27_7.1: %pattern_type.f1e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %A.patt.loc27_28.1: @F.%pattern_type.loc27_28 (%pattern_type.e66) = symbolic_binding_pattern A, 1 [symbolic = %A.patt.loc27_28.2 (constants.%A.patt.aee)] -// CHECK:STDOUT: %x.param_patt.loc27_44.1: @F.%pattern_type.loc27_44 (%pattern_type.b2f) = value_param_pattern [symbolic = %x.param_patt.loc27_44.2 (constants.%x.param_patt.321)] -// CHECK:STDOUT: %x.patt.loc27_44.1: @F.%pattern_type.loc27_44 (%pattern_type.b2f) = at_binding_pattern x, %x.param_patt.loc27_44.1 [symbolic = %x.patt.loc27_44.2 (constants.%x.patt.a80)] +// CHECK:STDOUT: %A.patt.loc27_35.1: @F.%pattern_type.loc27_35 (%pattern_type.e66) = symbolic_binding_pattern A, 1 [symbolic = %A.patt.loc27_35.2 (constants.%A.patt.aee)] +// CHECK:STDOUT: %x.param_patt.loc27_50.1: @F.%pattern_type.loc27_50 (%pattern_type.b2f) = value_param_pattern [symbolic = %x.param_patt.loc27_50.2 (constants.%x.param_patt.321)] +// CHECK:STDOUT: %x.patt.loc27_50.1: @F.%pattern_type.loc27_50 (%pattern_type.b2f) = at_binding_pattern x, %x.param_patt.loc27_50.1 [symbolic = %x.patt.loc27_50.2 (constants.%x.patt.a80)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc27_17.1: type = splice_block %.loc27_17.3 [concrete = constants.%tuple.type] { +// CHECK:STDOUT: %.loc27_16.1: type = splice_block %.loc27_16.3 [concrete = constants.%tuple.type] { // CHECK:STDOUT: %.Self.frozen.loc27_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc27_11: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.loc27_17.2: %tuple.type = tuple_literal (%.loc27_11) [concrete = constants.%tuple.0d2] -// CHECK:STDOUT: %.loc27_17.3: type = converted %.loc27_17.2, constants.%tuple.type [concrete = constants.%tuple.type] +// CHECK:STDOUT: %.loc27_10: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc27_16.2: %tuple.type = tuple_literal (%.loc27_10) [concrete = constants.%tuple.0d2] +// CHECK:STDOUT: %.loc27_16.3: type = converted %.loc27_16.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc27_7.2: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc27_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc27_32: type = splice_block %tuple.elem0.loc27_32.2 [symbolic = %tuple.elem0.loc27_32.1 (constants.%tuple.elem0)] { -// CHECK:STDOUT: %.Self.frozen.loc27_28: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %T.ref.loc27_31: %tuple.type = name_ref T, %T.loc27_7.2 [symbolic = %T.loc27_7.1 (constants.%T)] +// CHECK:STDOUT: %.loc27_38: type = splice_block %tuple.elem0.loc27_38.2 [symbolic = %tuple.elem0.loc27_38.1 (constants.%tuple.elem0)] { +// CHECK:STDOUT: %.Self.frozen.loc27_35: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %T.ref.loc27_37: %tuple.type = name_ref T, %T.loc27_7.2 [symbolic = %T.loc27_7.1 (constants.%T)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %tuple.elem0.loc27_32.2: type = tuple_access %T.ref.loc27_31, element0 [symbolic = %tuple.elem0.loc27_32.1 (constants.%tuple.elem0)] +// CHECK:STDOUT: %tuple.elem0.loc27_38.2: type = tuple_access %T.ref.loc27_37, element0 [symbolic = %tuple.elem0.loc27_38.1 (constants.%tuple.elem0)] // CHECK:STDOUT: } -// CHECK:STDOUT: %A.loc27_28.2: @F.%tuple.elem0.loc27_32.1 (%tuple.elem0) = symbolic_binding A, 1 [symbolic = %A.loc27_28.1 (constants.%A)] -// CHECK:STDOUT: %x.param: @F.%HoldsType.loc27_57.1 (%HoldsType.a83) = value_param call_param0 -// CHECK:STDOUT: %.loc27_57: type = splice_block %HoldsType.loc27_57.2 [symbolic = %HoldsType.loc27_57.1 (constants.%HoldsType.a83)] { +// CHECK:STDOUT: %A.loc27_35.2: @F.%tuple.elem0.loc27_38.1 (%tuple.elem0) = symbolic_binding A, 1 [symbolic = %A.loc27_35.1 (constants.%A)] +// CHECK:STDOUT: %x.param: @F.%HoldsType.loc27_63.1 (%HoldsType.a83) = value_param call_param0 +// CHECK:STDOUT: %.loc27_63: type = splice_block %HoldsType.loc27_63.2 [symbolic = %HoldsType.loc27_63.1 (constants.%HoldsType.a83)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc27_56: %tuple.type = name_ref T, %T.loc27_7.2 [symbolic = %T.loc27_7.1 (constants.%T)] -// CHECK:STDOUT: %HoldsType.loc27_57.2: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc27_57.1 (constants.%HoldsType.a83)] +// CHECK:STDOUT: %T.ref.loc27_62: %tuple.type = name_ref T, %T.loc27_7.2 [symbolic = %T.loc27_7.1 (constants.%T)] +// CHECK:STDOUT: %HoldsType.loc27_63.2: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc27_63.1 (constants.%HoldsType.a83)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%HoldsType.loc27_57.1 (%HoldsType.a83) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @F.%HoldsType.loc27_63.1 (%HoldsType.a83) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %holds_to.param_patt: %pattern_type.905 = value_param_pattern [concrete = constants.%holds_to.param_patt] // CHECK:STDOUT: %holds_to.patt: %pattern_type.905 = at_binding_pattern holds_to, %holds_to.param_patt [concrete = constants.%holds_to.patt] -// CHECK:STDOUT: %from.patt.loc29_53.1: %pattern_type.598 = symbolic_binding_pattern from, 0 [symbolic = %from.patt.loc29_53.2 (constants.%from.patt)] +// CHECK:STDOUT: %from.patt.loc29_61.1: %pattern_type.598 = symbolic_binding_pattern from, 0 [symbolic = %from.patt.loc29_61.2 (constants.%from.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %holds_to.param: %HoldsType.9f2 = value_param call_param0 // CHECK:STDOUT: %.loc29_46.1: type = splice_block %HoldsType [concrete = constants.%HoldsType.9f2] { @@ -191,11 +191,11 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) { // CHECK:STDOUT: %HoldsType: type = class_type @HoldsType, @HoldsType(constants.%tuple.162) [concrete = constants.%HoldsType.9f2] // CHECK:STDOUT: } // CHECK:STDOUT: %holds_to: %HoldsType.9f2 = wrapper_binding holds_to, %holds_to.param -// CHECK:STDOUT: %.loc29_56: type = splice_block %RuntimeConvertFrom.ref [concrete = constants.%RuntimeConvertFrom] { +// CHECK:STDOUT: %.loc29_63: type = splice_block %RuntimeConvertFrom.ref [concrete = constants.%RuntimeConvertFrom] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %RuntimeConvertFrom.ref: type = name_ref RuntimeConvertFrom, file.%RuntimeConvertFrom.decl [concrete = constants.%RuntimeConvertFrom] // CHECK:STDOUT: } -// CHECK:STDOUT: %from.loc29_53.2: %RuntimeConvertFrom = symbolic_binding from, 0 [symbolic = %from.loc29_53.1 (constants.%from)] +// CHECK:STDOUT: %from.loc29_61.2: %RuntimeConvertFrom = symbolic_binding from, 0 [symbolic = %from.loc29_61.1 (constants.%from)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -265,22 +265,22 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc27_7.2: %tuple.type, %A.loc27_28.2: @F.%tuple.elem0.loc27_32.1 (%tuple.elem0)) { +// CHECK:STDOUT: generic fn @F(%T.loc27_7.2: %tuple.type, %A.loc27_35.2: @F.%tuple.elem0.loc27_38.1 (%tuple.elem0)) { // CHECK:STDOUT: %T.patt.loc27_7.2: %pattern_type.f1e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc27_7.1: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc27_7.1 (constants.%T)] -// CHECK:STDOUT: %tuple.elem0.loc27_32.1: type = tuple_access %T.loc27_7.1, element0 [symbolic = %tuple.elem0.loc27_32.1 (constants.%tuple.elem0)] -// CHECK:STDOUT: %pattern_type.loc27_28: type = pattern_type %tuple.elem0.loc27_32.1 [symbolic = %pattern_type.loc27_28 (constants.%pattern_type.e66)] -// CHECK:STDOUT: %A.patt.loc27_28.2: @F.%pattern_type.loc27_28 (%pattern_type.e66) = symbolic_binding_pattern A, 1 [symbolic = %A.patt.loc27_28.2 (constants.%A.patt.aee)] -// CHECK:STDOUT: %A.loc27_28.1: @F.%tuple.elem0.loc27_32.1 (%tuple.elem0) = symbolic_binding A, 1 [symbolic = %A.loc27_28.1 (constants.%A)] -// CHECK:STDOUT: %HoldsType.loc27_57.1: type = class_type @HoldsType, @HoldsType(%T.loc27_7.1) [symbolic = %HoldsType.loc27_57.1 (constants.%HoldsType.a83)] -// CHECK:STDOUT: %pattern_type.loc27_44: type = pattern_type %HoldsType.loc27_57.1 [symbolic = %pattern_type.loc27_44 (constants.%pattern_type.b2f)] -// CHECK:STDOUT: %x.param_patt.loc27_44.2: @F.%pattern_type.loc27_44 (%pattern_type.b2f) = value_param_pattern [symbolic = %x.param_patt.loc27_44.2 (constants.%x.param_patt.321)] -// CHECK:STDOUT: %x.patt.loc27_44.2: @F.%pattern_type.loc27_44 (%pattern_type.b2f) = at_binding_pattern x, %x.param_patt.loc27_44.2 [symbolic = %x.patt.loc27_44.2 (constants.%x.patt.a80)] +// CHECK:STDOUT: %tuple.elem0.loc27_38.1: type = tuple_access %T.loc27_7.1, element0 [symbolic = %tuple.elem0.loc27_38.1 (constants.%tuple.elem0)] +// CHECK:STDOUT: %pattern_type.loc27_35: type = pattern_type %tuple.elem0.loc27_38.1 [symbolic = %pattern_type.loc27_35 (constants.%pattern_type.e66)] +// CHECK:STDOUT: %A.patt.loc27_35.2: @F.%pattern_type.loc27_35 (%pattern_type.e66) = symbolic_binding_pattern A, 1 [symbolic = %A.patt.loc27_35.2 (constants.%A.patt.aee)] +// CHECK:STDOUT: %A.loc27_35.1: @F.%tuple.elem0.loc27_38.1 (%tuple.elem0) = symbolic_binding A, 1 [symbolic = %A.loc27_35.1 (constants.%A)] +// CHECK:STDOUT: %HoldsType.loc27_63.1: type = class_type @HoldsType, @HoldsType(%T.loc27_7.1) [symbolic = %HoldsType.loc27_63.1 (constants.%HoldsType.a83)] +// CHECK:STDOUT: %pattern_type.loc27_50: type = pattern_type %HoldsType.loc27_63.1 [symbolic = %pattern_type.loc27_50 (constants.%pattern_type.b2f)] +// CHECK:STDOUT: %x.param_patt.loc27_50.2: @F.%pattern_type.loc27_50 (%pattern_type.b2f) = value_param_pattern [symbolic = %x.param_patt.loc27_50.2 (constants.%x.param_patt.321)] +// CHECK:STDOUT: %x.patt.loc27_50.2: @F.%pattern_type.loc27_50 (%pattern_type.b2f) = at_binding_pattern x, %x.param_patt.loc27_50.2 [symbolic = %x.patt.loc27_50.2 (constants.%x.patt.a80)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %HoldsType.loc27_57.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %HoldsType.loc27_63.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%HoldsType.loc27_57.1 (%HoldsType.a83)) { +// CHECK:STDOUT: fn(%x.param: @F.%HoldsType.loc27_63.1 (%HoldsType.a83)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -288,17 +288,17 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%from.loc29_53.2: %RuntimeConvertFrom) { -// CHECK:STDOUT: %from.patt.loc29_53.2: %pattern_type.598 = symbolic_binding_pattern from, 0 [symbolic = %from.patt.loc29_53.2 (constants.%from.patt)] -// CHECK:STDOUT: %from.loc29_53.1: %RuntimeConvertFrom = symbolic_binding from, 0 [symbolic = %from.loc29_53.1 (constants.%from)] +// CHECK:STDOUT: generic fn @G(%from.loc29_61.2: %RuntimeConvertFrom) { +// CHECK:STDOUT: %from.patt.loc29_61.2: %pattern_type.598 = symbolic_binding_pattern from, 0 [symbolic = %from.patt.loc29_61.2 (constants.%from.patt)] +// CHECK:STDOUT: %from.loc29_61.1: %RuntimeConvertFrom = symbolic_binding from, 0 [symbolic = %from.loc29_61.1 (constants.%from)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %RuntimeConvertFrom.as.ImplicitAs.impl.Convert.bound: = bound_method %from.loc29_53.1, constants.%RuntimeConvertFrom.as.ImplicitAs.impl.Convert [symbolic = %RuntimeConvertFrom.as.ImplicitAs.impl.Convert.bound (constants.%RuntimeConvertFrom.as.ImplicitAs.impl.Convert.bound)] +// CHECK:STDOUT: %RuntimeConvertFrom.as.ImplicitAs.impl.Convert.bound: = bound_method %from.loc29_61.1, constants.%RuntimeConvertFrom.as.ImplicitAs.impl.Convert [symbolic = %RuntimeConvertFrom.as.ImplicitAs.impl.Convert.bound (constants.%RuntimeConvertFrom.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%holds_to.param: %HoldsType.9f2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %from.ref: %RuntimeConvertFrom = name_ref from, %from.loc29_53.2 [symbolic = %from.loc29_53.1 (constants.%from)] +// CHECK:STDOUT: %from.ref: %RuntimeConvertFrom = name_ref from, %from.loc29_61.2 [symbolic = %from.loc29_61.1 (constants.%from)] // CHECK:STDOUT: %holds_to.ref: %HoldsType.9f2 = name_ref holds_to, %holds_to // CHECK:STDOUT: %impl.elem0: %.820 = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%RuntimeConvertFrom.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method: = bound_method constants.%from, %impl.elem0 [symbolic = %RuntimeConvertFrom.as.ImplicitAs.impl.Convert.bound (constants.%RuntimeConvertFrom.as.ImplicitAs.impl.Convert.bound)] @@ -338,14 +338,14 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) { // CHECK:STDOUT: specific @F(constants.%T, constants.%A) { // CHECK:STDOUT: %T.patt.loc27_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc27_7.1 => constants.%T -// CHECK:STDOUT: %tuple.elem0.loc27_32.1 => constants.%tuple.elem0 -// CHECK:STDOUT: %pattern_type.loc27_28 => constants.%pattern_type.e66 -// CHECK:STDOUT: %A.patt.loc27_28.2 => constants.%A.patt.aee -// CHECK:STDOUT: %A.loc27_28.1 => constants.%A -// CHECK:STDOUT: %HoldsType.loc27_57.1 => constants.%HoldsType.a83 -// CHECK:STDOUT: %pattern_type.loc27_44 => constants.%pattern_type.b2f -// CHECK:STDOUT: %x.param_patt.loc27_44.2 => constants.%x.param_patt.321 -// CHECK:STDOUT: %x.patt.loc27_44.2 => constants.%x.patt.a80 +// CHECK:STDOUT: %tuple.elem0.loc27_38.1 => constants.%tuple.elem0 +// CHECK:STDOUT: %pattern_type.loc27_35 => constants.%pattern_type.e66 +// CHECK:STDOUT: %A.patt.loc27_35.2 => constants.%A.patt.aee +// CHECK:STDOUT: %A.loc27_35.1 => constants.%A +// CHECK:STDOUT: %HoldsType.loc27_63.1 => constants.%HoldsType.a83 +// CHECK:STDOUT: %pattern_type.loc27_50 => constants.%pattern_type.b2f +// CHECK:STDOUT: %x.param_patt.loc27_50.2 => constants.%x.param_patt.321 +// CHECK:STDOUT: %x.patt.loc27_50.2 => constants.%x.patt.a80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%tuple.162) { @@ -356,20 +356,20 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%from) { -// CHECK:STDOUT: %from.patt.loc29_53.2 => constants.%from.patt -// CHECK:STDOUT: %from.loc29_53.1 => constants.%from +// CHECK:STDOUT: %from.patt.loc29_61.2 => constants.%from.patt +// CHECK:STDOUT: %from.loc29_61.1 => constants.%from // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%tuple.162, ) { // CHECK:STDOUT: %T.patt.loc27_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc27_7.1 => constants.%tuple.162 -// CHECK:STDOUT: %tuple.elem0.loc27_32.1 => constants.%RuntimeConvertTo -// CHECK:STDOUT: %pattern_type.loc27_28 => constants.%pattern_type.c10 -// CHECK:STDOUT: %A.patt.loc27_28.2 => constants.%A.patt.797 -// CHECK:STDOUT: %A.loc27_28.1 => -// CHECK:STDOUT: %HoldsType.loc27_57.1 => constants.%HoldsType.9f2 -// CHECK:STDOUT: %pattern_type.loc27_44 => constants.%pattern_type.905 -// CHECK:STDOUT: %x.param_patt.loc27_44.2 => constants.%x.param_patt.fbd -// CHECK:STDOUT: %x.patt.loc27_44.2 => constants.%x.patt.32c +// CHECK:STDOUT: %tuple.elem0.loc27_38.1 => constants.%RuntimeConvertTo +// CHECK:STDOUT: %pattern_type.loc27_35 => constants.%pattern_type.c10 +// CHECK:STDOUT: %A.patt.loc27_35.2 => constants.%A.patt.797 +// CHECK:STDOUT: %A.loc27_35.1 => +// CHECK:STDOUT: %HoldsType.loc27_63.1 => constants.%HoldsType.9f2 +// CHECK:STDOUT: %pattern_type.loc27_50 => constants.%pattern_type.905 +// CHECK:STDOUT: %x.param_patt.loc27_50.2 => constants.%x.param_patt.fbd +// CHECK:STDOUT: %x.patt.loc27_50.2 => constants.%x.patt.32c // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/fail_namespace_type.carbon b/toolchain/check/testdata/facet/fail_namespace_type.carbon index 003cfb86c160..ec97de64d36b 100644 --- a/toolchain/check/testdata/facet/fail_namespace_type.carbon +++ b/toolchain/check/testdata/facet/fail_namespace_type.carbon @@ -17,7 +17,7 @@ namespace N; interface Z {} -impl forall [T:! type] T as Z {} +impl forall [T: type] T as Z {} fn F() { // CHECK:STDERR: fail_namespace_as.carbon:[[@LINE+4]]:3: error: expression cannot be used as a value [UseOfNonExprAsValue] @@ -34,17 +34,17 @@ namespace N; interface Z {} -impl forall [T:! type] T as Z {} +impl forall [T: type] T as Z {} -fn G[T:! Z](unused a: T) {} +fn G[T: Z](unused a: T) {} fn F() { // CHECK:STDERR: fail_namespace_argument.carbon:[[@LINE+7]]:5: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: G(N); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_namespace_argument.carbon:[[@LINE-6]]:20: note: initializing function parameter [InCallToFunctionParam] - // CHECK:STDERR: fn G[T:! Z](unused a: T) {} - // CHECK:STDERR: ^~~~ + // CHECK:STDERR: fail_namespace_argument.carbon:[[@LINE-6]]:19: note: initializing function parameter [InCallToFunctionParam] + // CHECK:STDERR: fn G[T: Z](unused a: T) {} + // CHECK:STDERR: ^~~~ // CHECK:STDERR: G(N); } diff --git a/toolchain/check/testdata/facet/identify_self_canonicalized.carbon b/toolchain/check/testdata/facet/identify_self_canonicalized.carbon index c0cca06a3602..6ab9728f89c2 100644 --- a/toolchain/check/testdata/facet/identify_self_canonicalized.carbon +++ b/toolchain/check/testdata/facet/identify_self_canonicalized.carbon @@ -28,4 +28,4 @@ interface Y {} // identified facet type. Instead we should only get a single interface with the // canonical `T` facet value as the self value. -impl forall [T:! Y] T as W & Z {} +impl forall [T: Y] T as W & Z {} diff --git a/toolchain/check/testdata/facet/named_constant.carbon b/toolchain/check/testdata/facet/named_constant.carbon index 7b60be9aa886..b6e68f8b7044 100644 --- a/toolchain/check/testdata/facet/named_constant.carbon +++ b/toolchain/check/testdata/facet/named_constant.carbon @@ -14,20 +14,20 @@ library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } fn Test() { - // CHECK:STDERR: fail_todo_named_constant_in_rewrite.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let Constant:! type = (); - // CHECK:STDERR: ^~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_named_constant_in_rewrite.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic Constant: type = (); + // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: - let Constant:! type = (); + let generic Constant: type = (); - fn F(T:! I where .X = Constant) {} + fn F(generic T: I where .X = Constant) {} - fn G(T:! I where .X = Constant) { + fn G(generic T: I where .X = Constant) { // TODO: The facet type T in G should match the facet type T in F. F(T); } @@ -37,21 +37,21 @@ fn Test() { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } fn Test() { - // CHECK:STDERR: fail_todo_named_constant_two_levels_in_rewrite.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let Constant2:! type = (); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_named_constant_two_levels_in_rewrite.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic Constant2: type = (); + // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: - let Constant2:! type = (); - let Constant:! type = (Constant2, ); + let generic Constant2: type = (); + let generic Constant: type = (Constant2, ); - fn F(T:! I where .X = Constant) {} + fn F(generic T: I where .X = Constant) {} - fn G(T:! I where .X = Constant) { + fn G(generic T: I where .X = Constant) { // TODO: The facet type T in G should match the facet type T in F. F(T); } @@ -61,20 +61,20 @@ fn Test() { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } fn Test() { - // CHECK:STDERR: fail_todo_named_constant_in_rewrite_callee.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let Constant:! type = (); - // CHECK:STDERR: ^~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_named_constant_in_rewrite_callee.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic Constant: type = (); + // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: - let Constant:! type = (); + let generic Constant: type = (); - fn F(T:! I where .X = Constant) {} + fn F(generic T: I where .X = Constant) {} - fn G(T:! I where .X = ()) { + fn G(generic T: I where .X = ()) { // TODO: The facet type T in G should match the facet type T in F. F(T); } @@ -84,20 +84,20 @@ fn Test() { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } fn Test() { - // CHECK:STDERR: fail_todo_named_constant_in_rewrite_caller.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let Constant:! type = (); - // CHECK:STDERR: ^~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_named_constant_in_rewrite_caller.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic Constant: type = (); + // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: - let Constant:! type = (); + let generic Constant: type = (); - fn F(T:! I where .X = ()) {} + fn F(generic T: I where .X = ()) {} - fn G(T:! I where .X = Constant) { + fn G(generic T: I where .X = Constant) { // TODO: The facet type T in G should match the facet type T in F. F(T); } @@ -107,22 +107,22 @@ fn Test() { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } fn Test() { - // CHECK:STDERR: fail_todo_named_constant_in_nested_facet_type.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let Constant:! type = (); - // CHECK:STDERR: ^~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_named_constant_in_nested_facet_type.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic Constant: type = (); + // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: - let Constant:! type = (); + let generic Constant: type = (); // TODO: The .Self reference in each .X should be different, there should be // no cycle here. - fn F(T:! I where .X = (I where .X = Constant)) {} + fn F(generic T: I where .X = (I where .X = Constant)) {} - fn G(T:! I where .X = (I where .X = Constant)) { + fn G(generic T: I where .X = (I where .X = Constant)) { // TODO: The facet type T in G should match the facet type T in F. F(T); } @@ -132,22 +132,22 @@ fn Test() { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } fn Test() { - // CHECK:STDERR: fail_todo_named_constant_in_nested_facet_type_caller.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let Constant:! type = (); - // CHECK:STDERR: ^~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_named_constant_in_nested_facet_type_caller.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic Constant: type = (); + // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: - let Constant:! type = (); + let generic Constant: type = (); - fn F(T:! I where .X = (I where .X = ())) {} + fn F(generic T: I where .X = (I where .X = ())) {} // TODO: The .Self reference in each .X should be different, there should be // no cycle here. - fn G(T:! I where .X = (I where .X = Constant)) { + fn G(generic T: I where .X = (I where .X = Constant)) { // TODO: The facet type T in G should match the facet type T in F. F(T); } @@ -157,22 +157,22 @@ fn Test() { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } fn Test() { - // CHECK:STDERR: fail_named_constant_in_nested_facet_type_callee.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let Constant:! type = (); - // CHECK:STDERR: ^~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_named_constant_in_nested_facet_type_callee.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic Constant: type = (); + // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: - let Constant:! type = (); + let generic Constant: type = (); // TODO: The .Self reference in each .X should be different, there should be // no cycle here. - fn F(T:! I where .X = (I where .X = Constant)) {} + fn F(generic T: I where .X = (I where .X = Constant)) {} - fn G(T:! I where .X = (I where .X = ())) { + fn G(generic T: I where .X = (I where .X = ())) { // TODO: The facet type T in G should match the facet type T in F. F(T); } diff --git a/toolchain/check/testdata/facet/nested_facet_types.carbon b/toolchain/check/testdata/facet/nested_facet_types.carbon index 5e0c15229ab7..cc120885f196 100644 --- a/toolchain/check/testdata/facet/nested_facet_types.carbon +++ b/toolchain/check/testdata/facet/nested_facet_types.carbon @@ -14,11 +14,11 @@ library "[[@TEST_NAME]]"; interface Z { - let T:! type; - let U:! type; + let T: type; + let U: type; } -fn F(FF:! (Z where .T = ()) where .U = .T) -> FF.U { +fn F(generic FF: (Z where .T = ()) where .U = .T) -> FF.U { return (); } @@ -26,10 +26,10 @@ fn F(FF:! (Z where .T = ()) where .U = .T) -> FF.U { library "[[@TEST_NAME]]"; interface Z { - let T:! type; + let T: type; } -fn F(FF:! ((Z where .T = ()) where .T = ()) where .T = ()) -> FF.T { +fn F(generic FF: ((Z where .T = ()) where .T = ()) where .T = ()) -> FF.T { return (); } @@ -37,205 +37,205 @@ fn F(FF:! ((Z where .T = ()) where .T = ()) where .T = ()) -> FF.T { library "[[@TEST_NAME]]"; interface Z { - let T:! type; - let U:! type; + let T: type; + let U: type; } -fn F(unused FF:! ((Z where .T = .U) where .T = .U) where .T = .U) {} +fn F(unused generic FF: ((Z where .T = .U) where .T = .U) where .T = .U) {} // --- nested_facet_types_same_two_associated.carbon library "[[@TEST_NAME]]"; interface Z { - let T:! type; - let U:! type; - let V:! type; + let T: type; + let U: type; + let V: type; } -fn F(unused FF:! ((Z where .T = .U and .U = .V) where .T = .U and .U = .V) where .T = .U and .U = .V) {} +fn F(unused generic FF: ((Z where .T = .U and .U = .V) where .T = .U and .U = .V) where .T = .U and .U = .V) {} // --- nested_facet_types_same_associated_in_generic_parameter.carbon library "[[@TEST_NAME]]"; interface Z { - let T:! type; - let U:! type; + let T: type; + let U: type; } -class C(T:! type) {} +class C(T: type) {} -fn F(unused FF:! ((Z where .T = C(.U)) where .T = C(.U)) where .T = C(.U)) {} +fn F(unused generic FF: ((Z where .T = C(.U)) where .T = C(.U)) where .T = C(.U)) {} // --- fail_nested_facet_types_different.carbon library "[[@TEST_NAME]]"; interface Z { - let T:! type; + let T: type; } -// CHECK:STDERR: fail_nested_facet_types_different.carbon:[[@LINE+4]]:18: error: associated constant `.(Z.T)` given two different values `()` and `{}` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused FF:! (Z where .T = ()) where .T = {}) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_nested_facet_types_different.carbon:[[@LINE+4]]:25: error: associated constant `.(Z.T)` given two different values `()` and `{}` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic FF: (Z where .T = ()) where .T = {}) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused FF:! (Z where .T = ()) where .T = {}) {} +fn F(unused generic FF: (Z where .T = ()) where .T = {}) {} // --- fail_nested_facet_types_different_with_associated.carbon library "[[@TEST_NAME]]"; interface Z { - let T:! type; - let U:! type; + let T: type; + let U: type; } -// CHECK:STDERR: fail_nested_facet_types_different_with_associated.carbon:[[@LINE+4]]:18: error: associated constant `.(Z.T)` given two different values `.(Z.U)` and `{}` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused FF:! (Z where .T = .U) where .T = {}) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_nested_facet_types_different_with_associated.carbon:[[@LINE+4]]:25: error: associated constant `.(Z.T)` given two different values `.(Z.U)` and `{}` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic FF: (Z where .T = .U) where .T = {}) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused FF:! (Z where .T = .U) where .T = {}) {} +fn F(unused generic FF: (Z where .T = .U) where .T = {}) {} // --- fail_nested_facet_types_different_with_associated_in_generic_parameter.carbon library "[[@TEST_NAME]]"; interface Z { - let T:! type; - let U:! type; + let T: type; + let U: type; } -class C(T:! type) {} +class C(T: type) {} -// CHECK:STDERR: fail_nested_facet_types_different_with_associated_in_generic_parameter.carbon:[[@LINE+4]]:18: error: associated constant `.(Z.T)` given two different values `C(.(Z.U))` and `{}` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused FF:! (Z where .T = C(.U)) where .T = {}) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_nested_facet_types_different_with_associated_in_generic_parameter.carbon:[[@LINE+4]]:25: error: associated constant `.(Z.T)` given two different values `C(.(Z.U))` and `{}` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic FF: (Z where .T = C(.U)) where .T = {}) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused FF:! (Z where .T = C(.U)) where .T = {}) {} +fn F(unused generic FF: (Z where .T = C(.U)) where .T = {}) {} // --- nested_facet_types_same_with_bitand.carbon library "[[@TEST_NAME]]"; interface Z { - let T:! type; - let U:! type; + let T: type; + let U: type; } -fn F(unused FF:! ((Z where .T = .U) where .T = .U) & (Z where .T = .U)) {} +fn F(unused generic FF: ((Z where .T = .U) where .T = .U) & (Z where .T = .U)) {} // --- fail_nested_facet_types_different_with_bitand.carbon library "[[@TEST_NAME]]"; interface Z { - let T:! type; - let U:! type; + let T: type; + let U: type; } -// CHECK:STDERR: fail_nested_facet_types_different_with_bitand.carbon:[[@LINE+4]]:18: error: associated constant `.(Z.T)` given two different values `.(Z.U)` and `{}` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused FF:! ((Z where .T = .U) where .T = .U) & (Z where .T = {})) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_nested_facet_types_different_with_bitand.carbon:[[@LINE+4]]:25: error: associated constant `.(Z.T)` given two different values `.(Z.U)` and `{}` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic FF: ((Z where .T = .U) where .T = .U) & (Z where .T = {})) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused FF:! ((Z where .T = .U) where .T = .U) & (Z where .T = {})) {} +fn F(unused generic FF: ((Z where .T = .U) where .T = .U) & (Z where .T = {})) {} // --- fail_nested_facet_type_cycle.carbon library "[[@TEST_NAME]]"; interface Z { - let T:! type; - let U:! type; + let T: type; + let U: type; } -// CHECK:STDERR: fail_nested_facet_type_cycle.carbon:[[@LINE+4]]:18: error: found cycle in facet type constraint for `.(Z.U)` [FacetTypeConstraintCycle] -// CHECK:STDERR: fn F(unused FF:! (Z where .T = .U) where .U = .T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_nested_facet_type_cycle.carbon:[[@LINE+4]]:25: error: found cycle in facet type constraint for `.(Z.U)` [FacetTypeConstraintCycle] +// CHECK:STDERR: fn F(unused generic FF: (Z where .T = .U) where .U = .T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused FF:! (Z where .T = .U) where .U = .T) {} +fn F(unused generic FF: (Z where .T = .U) where .U = .T) {} // --- fail_nested_facet_types_different_separated_order_one.carbon library "[[@TEST_NAME]]"; interface Z { - let S:! type; - let T:! type; - let U:! type; - let V:! type; + let S: type; + let T: type; + let U: type; + let V: type; } // The ordering here is meant to find a way to insert a LHS between the two `.S` // ids, by producing different orderings to get an id between them. -// CHECK:STDERR: fail_nested_facet_types_different_separated_order_one.carbon:[[@LINE+4]]:18: error: associated constant `.(Z.S)` given two different values `.(Z.U)` and `{}` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused FF:! (((Z where .S = .U) where .V = {}) where .T = .U) & (Z where .S = {})) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_nested_facet_types_different_separated_order_one.carbon:[[@LINE+4]]:25: error: associated constant `.(Z.S)` given two different values `.(Z.U)` and `{}` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic FF: (((Z where .S = .U) where .V = {}) where .T = .U) & (Z where .S = {})) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused FF:! (((Z where .S = .U) where .V = {}) where .T = .U) & (Z where .S = {})) {} +fn F(unused generic FF: (((Z where .S = .U) where .V = {}) where .T = .U) & (Z where .S = {})) {} // --- fail_nested_facet_types_different_separated_order_two.carbon library "[[@TEST_NAME]]"; interface Z { - let S:! type; - let T:! type; - let U:! type; - let V:! type; + let S: type; + let T: type; + let U: type; + let V: type; } // The ordering here is meant to find a way to insert a LHS between the two `.S` // ids, by producing different orderings to get an id between them. As of today, // this is the case where `.T` is sorted between the two `.S` rewrite rules. -// CHECK:STDERR: fail_nested_facet_types_different_separated_order_two.carbon:[[@LINE+4]]:18: error: associated constant `.(Z.S)` given two different values `{}` and `.(Z.U)` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused FF:! (((Z where .V = {}) where .S = .U) where .T = .U) & (Z where .S = {})) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_nested_facet_types_different_separated_order_two.carbon:[[@LINE+4]]:25: error: associated constant `.(Z.S)` given two different values `{}` and `.(Z.U)` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic FF: (((Z where .V = {}) where .S = .U) where .T = .U) & (Z where .S = {})) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused FF:! (((Z where .V = {}) where .S = .U) where .T = .U) & (Z where .S = {})) {} +fn F(unused generic FF: (((Z where .V = {}) where .S = .U) where .T = .U) & (Z where .S = {})) {} // --- fail_nested_facet_types_different_separated_order_three.carbon library "[[@TEST_NAME]]"; interface Z { - let S:! type; - let T:! type; - let U:! type; - let V:! type; + let S: type; + let T: type; + let U: type; + let V: type; } // The ordering here is meant to find a way to insert a LHS between the two `.S` // ids, by producing different orderings to get an id between them. -// CHECK:STDERR: fail_nested_facet_types_different_separated_order_three.carbon:[[@LINE+4]]:18: error: associated constant `.(Z.S)` given two different values `{}` and `.(Z.U)` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: fn F(unused FF:! (((Z where .V = {}) where .T = .U) where .S = .U) & (Z where .S = {})) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_nested_facet_types_different_separated_order_three.carbon:[[@LINE+4]]:25: error: associated constant `.(Z.S)` given two different values `{}` and `.(Z.U)` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: fn F(unused generic FF: (((Z where .V = {}) where .T = .U) where .S = .U) & (Z where .S = {})) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused FF:! (((Z where .V = {}) where .T = .U) where .S = .U) & (Z where .S = {})) {} +fn F(unused generic FF: (((Z where .V = {}) where .T = .U) where .S = .U) & (Z where .S = {})) {} // --- repeated_with_value_available.carbon library "[[@TEST_NAME]]"; -interface Z { let X:! type; let Y:! type; } +interface Z { let X: type; let Y: type; } -fn F(T:! ((Z where .Y = ()) where .X = .Y) where .X = .Y) -> T.X { +fn F(generic T: ((Z where .Y = ()) where .X = .Y) where .X = .Y) -> T.X { return (); } -class C(T:! type) { adapt (); } +class C(T: type) { adapt (); } -fn F1(T:! (Z where .Y = C(()) and .X = C(.Y)) where .X = C(C(()))) -> T.X { +fn F1(generic T: (Z where .Y = C(()) and .X = C(.Y)) where .X = C(C(()))) -> T.X { return () as C(C(())); } -fn F2(T:! ((Z where .Y = C(())) where .X = C(.Y)) where .X = C(C(()))) -> T.X { +fn F2(generic T: ((Z where .Y = C(())) where .X = C(.Y)) where .X = C(C(()))) -> T.X { return () as C(C(())); } -fn F3(T:! Z where .Y = C(()) and .X = C(.Y) and .X = C(C(()))) -> T.X { +fn F3(generic T: Z where .Y = C(()) and .X = C(.Y) and .X = C(C(()))) -> T.X { return () as C(C(())); } // --- conflicting_syntax_same_value.carbon library "[[@TEST_NAME]]"; -interface Z { let X:! type; let Y:! type; } +interface Z { let X: type; let Y: type; } -fn F1(T:! ((Z where .Y = ()) where .X = .Y) where .X = ()) -> T.X { +fn F1(generic T: ((Z where .Y = ()) where .X = .Y) where .X = ()) -> T.X { return (); } -fn F2(T:! ((Z where .Y = ()) where .X = ()) where .X = .Y) -> T.X { +fn F2(generic T: ((Z where .Y = ()) where .X = ()) where .X = .Y) -> T.X { return (); } @@ -244,16 +244,16 @@ library "[[@TEST_NAME]]"; interface Y {} interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } -class C(T:! type) {} +class C(T: type) {} constraint NZ { extend require impls Z where .Z1 = C(.Z2); } -fn F(unused FF:! ((Y where .Self impls NZ) +fn F(unused generic FF: ((Y where .Self impls NZ) where .Self impls NZ) where .Self impls NZ) {} @@ -261,13 +261,13 @@ fn F(unused FF:! ((Y where .Self impls NZ) library "[[@TEST_NAME]]"; interface Y { - let Y1:! type; + let Y1: type; } interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } -class C(T:! type) { adapt (); } +class C(T: type) { adapt (); } constraint NZ1 { // This uses the rewrite from NZ2. @@ -277,7 +277,7 @@ constraint NZ2 { extend require impls Z where .Z2 = (); } -fn F(FF:! ((Y where .Y1 = ()) where .Self impls NZ1) where .Self impls NZ2) -> FF.(Z.Z1) { +fn F(generic FF: ((Y where .Y1 = ()) where .Self impls NZ1) where .Self impls NZ2) -> FF.(Z.Z1) { // CHECK:STDERR: fail_todo_nested_impl_combine_rewrites_from_named_constraints.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `C(())` to `FF.(Z.Z1)` [ConversionFailure] // CHECK:STDERR: return () as C(()); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ @@ -291,30 +291,30 @@ fn F(FF:! ((Y where .Y1 = ()) where .Self impls NZ1) where .Self impls NZ2) -> F // --- fail_where_nested_inside_where_impls.carbon library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_where_nested_inside_where_impls.carbon:[[@LINE+7]]:34: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! type where .Self impls (type where .Self impls type)) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_where_nested_inside_where_impls.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! type where .Self impls (type where .Self impls type)) {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_impls.carbon:[[@LINE+7]]:41: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: type where .Self impls (type where .Self impls type)) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_impls.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: type where .Self impls (type where .Self impls type)) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -fn F(_:! type where .Self impls (type where .Self impls type)) {} +fn F(generic _: type where .Self impls (type where .Self impls type)) {} // --- fail_where_nested_inside_where_rewrite.carbon library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } -// CHECK:STDERR: fail_where_nested_inside_where_rewrite.carbon:[[@LINE+7]]:25: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! Z where .Z1 = (type where .Self impls type)) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_where_nested_inside_where_rewrite.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! Z where .Z1 = (type where .Self impls type)) {} -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_rewrite.carbon:[[@LINE+7]]:32: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: Z where .Z1 = (type where .Self impls type)) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_rewrite.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: Z where .Z1 = (type where .Self impls type)) {} +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -fn F(_:! Z where .Z1 = (type where .Self impls type)) {} +fn F(generic _: Z where .Z1 = (type where .Self impls type)) {} // --- fail_where_nested_inside_where_same_type.carbon library "[[@TEST_NAME]]"; @@ -322,11 +322,11 @@ library "[[@TEST_NAME]]"; interface Z {} class C; -// CHECK:STDERR: fail_where_nested_inside_where_same_type.carbon:[[@LINE+7]]:24: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! Z where C == (type where .Self impls type)) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_where_nested_inside_where_same_type.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! Z where C == (type where .Self impls type)) {} -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_same_type.carbon:[[@LINE+7]]:31: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: Z where C == (type where .Self impls type)) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_same_type.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: Z where C == (type where .Self impls type)) {} +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -fn F(_:! Z where C == (type where .Self impls type)) {} +fn F(generic _: Z where C == (type where .Self impls type)) {} diff --git a/toolchain/check/testdata/facet/nested_facet_types_from_eval.carbon b/toolchain/check/testdata/facet/nested_facet_types_from_eval.carbon index 1b61930b0b02..c23bb8a80417 100644 --- a/toolchain/check/testdata/facet/nested_facet_types_from_eval.carbon +++ b/toolchain/check/testdata/facet/nested_facet_types_from_eval.carbon @@ -14,21 +14,21 @@ library "[[@TEST_NAME]]"; interface I {} -class C(T:! type); +class C(T: type); alias A = I where .Self == C; // The use of `A` introduces a `where` expression inside the `where` written // here, which is an error. // -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_lhs.carbon:[[@LINE+7]]:21: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! type where C(A) impls type) {} -// CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_lhs.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! type where C(A) impls type) {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_lhs.carbon:[[@LINE+7]]:28: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: type where C(A) impls type) {} +// CHECK:STDERR: ^~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_lhs.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: type where C(A) impls type) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -fn F(_:! type where C(A) impls type) {} +fn F(generic _: type where C(A) impls type) {} // --- fail_where_nested_inside_where_through_alias_impls_rhs_with_self_impls_interface.carbon library "[[@TEST_NAME]]"; @@ -40,14 +40,14 @@ alias A = type where .Self impls I; // The use of `A` introduces a `where` expression inside the `where` written // here, which is an error. // -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_self_impls_interface.carbon:[[@LINE+7]]:33: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! type where .Self impls A) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_self_impls_interface.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! type where .Self impls A) {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_self_impls_interface.carbon:[[@LINE+7]]:40: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: type where .Self impls A) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_self_impls_interface.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: type where .Self impls A) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -fn F(_:! type where .Self impls A) {} +fn F(generic _: type where .Self impls A) {} // --- fail_where_nested_inside_where_through_alias_impls_rhs_with_self_impls_named_constraint.carbon library "[[@TEST_NAME]]"; @@ -59,19 +59,19 @@ alias A = type where .Self impls N; // The use of `A` introduces a `where` expression inside the `where` written // here, which is an error. // -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_self_impls_named_constraint.carbon:[[@LINE+7]]:33: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! type where .Self impls A) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_self_impls_named_constraint.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! type where .Self impls A) {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_self_impls_named_constraint.carbon:[[@LINE+7]]:40: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: type where .Self impls A) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_self_impls_named_constraint.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: type where .Self impls A) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -fn F(_:! type where .Self impls A) {} +fn F(generic _: type where .Self impls A) {} // --- fail_where_nested_inside_where_through_alias_impls_rhs_with_type_impls_interface.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) {} +interface I(T: type) {} class C; alias A = type where C impls I(.Self); @@ -79,19 +79,19 @@ alias A = type where C impls I(.Self); // The use of `A` introduces a `where` expression inside the `where` written // here, which is an error. // -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_type_impls_interface.carbon:[[@LINE+7]]:33: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! type where .Self impls A) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_type_impls_interface.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! type where .Self impls A) {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_type_impls_interface.carbon:[[@LINE+7]]:40: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: type where .Self impls A) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_type_impls_interface.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: type where .Self impls A) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -fn F(_:! type where .Self impls A) {} +fn F(generic _: type where .Self impls A) {} // --- fail_where_nested_inside_where_through_alias_impls_rhs_with_type_impls_named_constraint.carbon library "[[@TEST_NAME]]"; -constraint N(T:! type) {} +constraint N(T: type) {} class C; alias A = type where C impls N(.Self); @@ -99,19 +99,19 @@ alias A = type where C impls N(.Self); // The use of `A` introduces a `where` expression inside the `where` written // here, which is an error. // -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_type_impls_named_constraint.carbon:[[@LINE+7]]:33: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! type where .Self impls A) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_type_impls_named_constraint.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! type where .Self impls A) {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_type_impls_named_constraint.carbon:[[@LINE+7]]:40: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: type where .Self impls A) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_type_impls_named_constraint.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: type where .Self impls A) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -fn F(_:! type where .Self impls A) {} +fn F(generic _: type where .Self impls A) {} // --- fail_where_nested_inside_where_through_alias_impls_rhs_with_rewrite.carbon library "[[@TEST_NAME]]"; -interface I { let I1:! type; } +interface I { let I1: type; } class C; alias A = I where .I1 = C; @@ -119,14 +119,14 @@ alias A = I where .I1 = C; // The use of `A` introduces a `where` expression inside the `where` written // here, which is an error. // -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_rewrite.carbon:[[@LINE+7]]:33: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! type where .Self impls A) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_rewrite.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! type where .Self impls A) {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_rewrite.carbon:[[@LINE+7]]:40: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: type where .Self impls A) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_rewrite.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: type where .Self impls A) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -fn F(_:! type where .Self impls A) {} +fn F(generic _: type where .Self impls A) {} // --- fail_where_nested_inside_where_through_alias_impls_rhs_with_equiv.carbon library "[[@TEST_NAME]]"; @@ -138,19 +138,19 @@ alias A = type where .Self == C; // The use of `A` introduces a `where` expression inside the `where` written // here, which is an error. // -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_equiv.carbon:[[@LINE+7]]:33: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! type where .Self impls A) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_equiv.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! type where .Self impls A) {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_equiv.carbon:[[@LINE+7]]:40: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: type where .Self impls A) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_impls_rhs_with_equiv.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: type where .Self impls A) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -fn F(_:! type where .Self impls A) {} +fn F(generic _: type where .Self impls A) {} // --- fail_where_nested_inside_where_through_alias_rewrite_rhs.carbon library "[[@TEST_NAME]]"; -interface I { let I1:! type; } +interface I { let I1: type; } class C; alias A = I where .Self == C; @@ -158,14 +158,14 @@ alias A = I where .Self == C; // The use of `A` introduces a `where` expression inside the `where` written // here, which is an error. // -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_rewrite_rhs.carbon:[[@LINE+7]]:24: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! I where .I1 = A) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_rewrite_rhs.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! I where .I1 = A) {} -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_rewrite_rhs.carbon:[[@LINE+7]]:31: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: I where .I1 = A) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_rewrite_rhs.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: I where .I1 = A) {} +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -fn F(_:! I where .I1 = A) {} +fn F(generic _: I where .I1 = A) {} // --- fail_where_nested_inside_where_through_alias_equiv_lhs.carbon library "[[@TEST_NAME]]"; @@ -178,14 +178,14 @@ alias A = I where .Self == C; // The use of `A` introduces a `where` expression inside the `where` written // here, which is an error. // -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_equiv_lhs.carbon:[[@LINE+7]]:21: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! type where A == .Self) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_equiv_lhs.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! type where A == .Self) {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_equiv_lhs.carbon:[[@LINE+7]]:28: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: type where A == .Self) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_equiv_lhs.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: type where A == .Self) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -fn F(_:! type where A == .Self) {} +fn F(generic _: type where A == .Self) {} // --- fail_where_nested_inside_where_through_alias_equiv_rhs.carbon library "[[@TEST_NAME]]"; @@ -198,14 +198,14 @@ alias A = I where .Self == C; // The use of `A` introduces a `where` expression inside the `where` written // here, which is an error. // -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_equiv_rhs.carbon:[[@LINE+7]]:30: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! type where .Self == A) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_where_nested_inside_where_through_alias_equiv_rhs.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! type where .Self == A) {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_equiv_rhs.carbon:[[@LINE+7]]:37: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: type where .Self == A) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_where_nested_inside_where_through_alias_equiv_rhs.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: type where .Self == A) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -fn F(_:! type where .Self == A) {} +fn F(generic _: type where .Self == A) {} // --- fail_where_nested_inside_where_through_fn_eval.carbon library "[[@TEST_NAME]]"; @@ -220,14 +220,14 @@ eval fn E() -> type { // The use of `E()` introduces a `where` expression inside the `where` // written here, which is an error. // -// CHECK:STDERR: fail_where_nested_inside_where_through_fn_eval.carbon:[[@LINE+7]]:33: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! type where .Self impls E()) {} -// CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_where_nested_inside_where_through_fn_eval.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! type where .Self impls E()) {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_fn_eval.carbon:[[@LINE+7]]:40: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: type where .Self impls E()) {} +// CHECK:STDERR: ^~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_fn_eval.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: type where .Self impls E()) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -fn F(_:! type where .Self impls E()) {} +fn F(generic _: type where .Self impls E()) {} // --- fail_where_nested_inside_where_through_operator_eval.carbon library "[[@TEST_NAME]]"; @@ -247,11 +247,11 @@ alias X = {} as X1; // The use of `type * X` introduces a `where` expression inside the `where` // written here, which is an error. // -// CHECK:STDERR: fail_where_nested_inside_where_through_operator_eval.carbon:[[@LINE+7]]:33: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] -// CHECK:STDERR: fn F(_:! type where .Self impls type * X) {} -// CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_where_nested_inside_where_through_operator_eval.carbon:[[@LINE+4]]:10: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] -// CHECK:STDERR: fn F(_:! type where .Self impls type * X) {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_operator_eval.carbon:[[@LINE+7]]:40: error: found `where` expression nested on the right-hand side of `where` [NestedWhereInsideWhere] +// CHECK:STDERR: fn F(generic _: type where .Self impls type * X) {} +// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_where_nested_inside_where_through_operator_eval.carbon:[[@LINE+4]]:17: note: on right-hand side of `where` here [NestedWhereInsideWhereOuterNote] +// CHECK:STDERR: fn F(generic _: type where .Self impls type * X) {} +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -fn F(_:! type where .Self impls type * X) {} +fn F(generic _: type where .Self impls type * X) {} diff --git a/toolchain/check/testdata/facet/partially_identified.carbon b/toolchain/check/testdata/facet/partially_identified.carbon index 97005e924293..69d33cdf4a93 100644 --- a/toolchain/check/testdata/facet/partially_identified.carbon +++ b/toolchain/check/testdata/facet/partially_identified.carbon @@ -14,14 +14,14 @@ library "[[@TEST_NAME]]"; interface Y {} -interface NeedsY(T:! Y) {} +interface NeedsY(T: Y) {} constraint W { // CHECK:STDERR: fail_self_doesnt_meet_constraint.carbon:[[@LINE+7]]:24: error: cannot convert type `Self` that implements `W` into type implementing `Y` [ConversionFailureFacetToFacet] // CHECK:STDERR: extend require impls NeedsY(Self); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fail_self_doesnt_meet_constraint.carbon:[[@LINE-5]]:18: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: interface NeedsY(T:! Y) {} - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: interface NeedsY(T: Y) {} + // CHECK:STDERR: ^~~~ // CHECK:STDERR: extend require impls NeedsY(Self); } @@ -30,13 +30,13 @@ constraint W { library "[[@TEST_NAME]]"; interface Y {} -interface NeedsY(T:! Y) {} +interface NeedsY(T: Y) {} constraint W { require impls Y; extend require impls NeedsY(Self); } -fn F(w:! W) { +fn F(generic w: W) { w as Y; w as NeedsY(w); } @@ -45,7 +45,7 @@ fn F(w:! W) { library "[[@TEST_NAME]]"; interface Y {} -interface NeedsY(T:! Y) {} +interface NeedsY(T: Y) {} constraint GivesY { require impls Y; } @@ -54,7 +54,7 @@ constraint W { extend require impls NeedsY(Self); } -fn F(w:! W) { +fn F(generic w: W) { w as Y; w as NeedsY(w); } @@ -63,11 +63,11 @@ fn F(w:! W) { library "[[@TEST_NAME]]"; interface Y {} -interface NeedsY(T:! Y) {} +interface NeedsY(T: Y) {} // All types impl Y. This requires an impl lookup to find a witness, and it will // be a symbolic witness for a symbolic self type. -impl forall [T:! type] T as Y {} +impl forall [T: type] T as Y {} constraint W { // Constructs a FacetValue of `Self as Y`, containing the impl lookup @@ -79,7 +79,7 @@ constraint W { class C {} impl C as NeedsY(C) {} -fn G(w:! W) { +fn G(generic w: W) { // The witness of NeedsY(Self) monomorphized by `w` must be the same as the // witness of `NeedsY(w)` constructed directly here in order for this to find // `NeedsY(w)` in the facet type `W`. @@ -94,17 +94,17 @@ fn F() { // --- facet_access_type_of_self_meets_constraint.carbon library "[[@TEST_NAME]]"; -class C(T:! type) {} +class C(T: type) {} class D {} interface Y {} -interface NeedsY(T:! Y) {} +interface NeedsY(T: Y) {} constraint W { require C(Self) impls Y; require D impls NeedsY(C(Self)); } -fn F(w:! W) { +fn F(generic w: W) { C(w) as Y; D as NeedsY(C(w)); } @@ -113,8 +113,8 @@ fn F(w:! W) { library "[[@TEST_NAME]]"; interface Y {} -interface NeedsY(T:! Y) {} -interface NeedsNeedsY(T:! Y, U:! NeedsY(T)) {} +interface NeedsY(T: Y) {} +interface NeedsNeedsY(T: Y, U: NeedsY(T)) {} constraint W { require impls Y; // The identified facet type of Self is {Y}. @@ -124,7 +124,7 @@ constraint W { extend require impls NeedsNeedsY(Self, Self); } -fn F(w:! W) { +fn F(generic w: W) { w as Y; w as NeedsY(w); } @@ -132,14 +132,14 @@ fn F(w:! W) { // --- access_through_previous_require.carbon library "[[@TEST_NAME]]"; -interface Z { let Z0:! type; } +interface Z { let Z0: type; } interface Y {} interface X { - let X0:! type; + let X0: type; fn XF() -> X0; } -class P(T:! type) { adapt (); } +class P(T: type) { adapt (); } constraint M { require impls Z where .Z0 = {}; @@ -151,7 +151,7 @@ constraint N { require impls X where .X0 = P(Self.(Z.Z0)); } -fn F(T:! N) -> T.(X.X0) { return T.(X.XF)(); } +fn F(generic T: N) -> T.(X.X0) { return T.(X.XF)(); } fn G() -> P({}) { class C {} @@ -168,7 +168,7 @@ library "[[@TEST_NAME]]"; interface Z {} -interface X { let XZ:! Z; } +interface X { let XZ: Z; } constraint W { require impls Z; // Target of impl lookup can not be partially identified. @@ -191,6 +191,6 @@ interface Z {} // identified, not fully identified. constraint W; -fn F(T:! W & Z) { +fn F(generic T: W & Z) { T as Z; } diff --git a/toolchain/check/testdata/facet/period_self.carbon b/toolchain/check/testdata/facet/period_self.carbon index 16d7abc9cd31..ad878db95878 100644 --- a/toolchain/check/testdata/facet/period_self.carbon +++ b/toolchain/check/testdata/facet/period_self.carbon @@ -14,15 +14,15 @@ library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -interface I(T:! type) { - let I1:! type; +interface I(T: type) { + let I1: type; } -fn F(T:! I(.Self) where .I1 = ()) -> T.I1 { +fn F(generic T: I(.Self) where .I1 = ()) -> T.I1 { return (); } -fn G(T:! I(.Self as type) where .I1 = ()) -> T.I1 { +fn G(generic T: I(.Self as type) where .I1 = ()) -> T.I1 { return (); } //@dump-sem-ir-end @@ -30,31 +30,31 @@ fn G(T:! I(.Self as type) where .I1 = ()) -> T.I1 { // --- underscore_identifier_name.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { - let I1:! type; +interface I(T: type) { + let I1: type; } // Underscore as the identifier name produces a different parse tree for the // binding pattern. -fn G(_:! I(.Self) where .I1 = ()) {} +fn G(generic _: I(.Self) where .I1 = ()) {} // --- fail_period_self_as_type.carbon library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_period_self_as_type.carbon:[[@LINE+4]]:17: error: `.Self` used in a type that is not a facet type [PeriodSelfInNonFacetType] -// CHECK:STDERR: interface I(T:! .Self) { -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fail_period_self_as_type.carbon:[[@LINE+4]]:16: error: `.Self` used in a type that is not a facet type [PeriodSelfInNonFacetType] +// CHECK:STDERR: interface I(T: .Self) { +// CHECK:STDERR: ^~~~~ // CHECK:STDERR: -interface I(T:! .Self) { +interface I(T: .Self) { fn G() -> T; } // --- convert_period_self_to_full_facet_value.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) {} +interface I(T: type) {} -fn F(U:! I(.Self)) { +fn F(generic U: I(.Self)) { U as I(U); (U as type) as I(U); } @@ -62,11 +62,11 @@ fn F(U:! I(.Self)) { // --- convert_period_self_to_full_facet_value_with_assoc_constant.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { - let X:! type; +interface I(T: type) { + let X: type; } -fn F(U:! I(.Self) where .X = .Self) { +fn F(generic U: I(.Self) where .X = .Self) { U as (I(U) where .X = U); (U as type) as (I(U) where .X = U); } @@ -74,17 +74,17 @@ fn F(U:! I(.Self) where .X = .Self) { // --- fail_todo_return_of_type_period_self.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { +interface I(T: type) { fn G() -> T*; } -interface J(T:! type) { +interface J(T: type) { fn J1() -> T*; } -fn F2[U:! I(.Self)](unused T: U*) {} +fn F2[U: I(.Self)](unused T: U*) {} -fn F(U:! I(.Self)) { +fn F(generic U: I(.Self)) { // Caller sees the returned `.Self` type from `F()` as the full `U`. // CHECK:STDERR: fail_todo_return_of_type_period_self.carbon:[[@LINE+4]]:3: error: member name `G` not found [MemberNameNotFound] // CHECK:STDERR: U.G()->G()->G(); @@ -110,17 +110,17 @@ fn F(U:! I(.Self)) { // --- fail_todo_return_of_type_period_self_extends_interface.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { +interface I(T: type) { fn I1() -> T*; } -interface J(T:! type) { +interface J(T: type) { fn J1() -> T*; } -fn F2[U:! I(.Self) & J(.Self)](unused T: U*) {} +fn F2[U: I(.Self) & J(.Self)](unused T: U*) {} -fn F(U:! I(.Self) & J(.Self)) { +fn F(generic U: I(.Self) & J(.Self)) { // TODO: The returned value of `I1` and `J1` has type `U` which has access to // the methods of `I` and `J`. // CHECK:STDERR: fail_todo_return_of_type_period_self_extends_interface.carbon:[[@LINE+4]]:3: error: member name `J1` not found [MemberNameNotFound] @@ -145,15 +145,15 @@ fn F(U:! I(.Self) & J(.Self)) { // --- fail_todo_return_of_period_self_impls_interface.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { +interface I(T: type) { fn I1() -> T; } -interface J(T:! type) { +interface J(T: type) { fn J1() -> T; } -fn G(U:! I(.Self) where .Self impls J(.Self)) { +fn G(generic U: I(.Self) where .Self impls J(.Self)) { // Compound member lookup through a non-type value is possible for methods // which take a `self` parameter. But it's not possible for methods without // `self`. For those you need to go directly throug the type. @@ -192,11 +192,11 @@ fn G(U:! I(.Self) where .Self impls J(.Self)) { // --- fail_todo_return_of_type_period_self_has_type_u.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { +interface I(T: type) { fn G() -> T; } -fn F(U:! I(.Self)) { +fn F(generic U: I(.Self)) { // CHECK:STDERR: fail_todo_return_of_type_period_self_has_type_u.carbon:[[@LINE+7]]:21: error: cannot implicitly convert expression of type `.Self` to `U` [ConversionFailure] // CHECK:STDERR: let unused a: U = U.G(); // CHECK:STDERR: ^~~~~ @@ -211,47 +211,47 @@ fn F(U:! I(.Self)) { library "[[@TEST_NAME]]"; interface I { - let X:! type; + let X: type; fn G() -> X; } -fn F(U:! Core.Destroy & I where .X = .Self) { +fn F(generic U: Core.Destroy & I where .X = .Self) { let unused a: U = U.G(); } // --- period_self_parameter_sees_lhs_of_where_expr.carbon library "[[@TEST_NAME]]"; -interface I(T:! Core.Destroy) {} +interface I(T: Core.Destroy) {} // The `.Self` can see the LHS of the `where` to know `U` impls Core.Destroy. -fn F(unused U:! Core.Destroy where .Self impls I(.Self)) {} +fn F(unused generic U: Core.Destroy where .Self impls I(.Self)) {} // --- fail_todo_period_self_parameter_constraint_satisfied_with_type_and.carbon library "[[@TEST_NAME]]"; -interface I(T:! Core.Destroy) {} +interface I(T: Core.Destroy) {} // TODO: Implied constraints that `.Self` impls `Core.Destroy` are satisfied by // the `&` expression. // -// CHECK:STDERR: fail_todo_period_self_parameter_constraint_satisfied_with_type_and.carbon:[[@LINE+7]]:32: error: cannot convert type `.Self` that implements `type` into type implementing `Core.Destroy` [ConversionFailureFacetToFacet] -// CHECK:STDERR: fn F(unused U:! Core.Destroy & I(.Self)) {} -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_todo_period_self_parameter_constraint_satisfied_with_type_and.carbon:[[@LINE+7]]:39: error: cannot convert type `.Self` that implements `type` into type implementing `Core.Destroy` [ConversionFailureFacetToFacet] +// CHECK:STDERR: fn F(unused generic U: Core.Destroy & I(.Self)) {} +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_period_self_parameter_constraint_satisfied_with_type_and.carbon:[[@LINE-8]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] -// CHECK:STDERR: interface I(T:! Core.Destroy) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~ +// CHECK:STDERR: interface I(T: Core.Destroy) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused U:! Core.Destroy & I(.Self)) {} +fn F(unused generic U: Core.Destroy & I(.Self)) {} // --- compound_lookup_on_returned_period_self_parameter.carbon library "[[@TEST_NAME]]"; -interface I(T:! Core.Destroy) { +interface I(T: Core.Destroy) { fn G(self) -> T; } -fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) { +fn F[U: Core.Destroy where .Self impls I(.Self)](u: U) { // This tests that both `I.G` is accessible and that `Destroy` is preserved; // we'd get an error for missing Destroy otherwise since G() returns an // initializing expression. @@ -262,7 +262,7 @@ fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } class C; @@ -276,7 +276,7 @@ fn F() { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } interface Y {} @@ -291,32 +291,32 @@ fn F() { // --- fail_infinite_cycle_identifying_associated_constant_as_impls_type_missing_impls_m.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } interface M {} -final impl forall [T:! M] T as L where .W = {} {} +final impl forall [T: M] T as L where .W = {} {} interface Z {} // This is missing `.Self impls M` so the `final impl` is not used, through // deduction is attempted. // -// CHECK:STDERR: fail_infinite_cycle_identifying_associated_constant_as_impls_type_missing_impls_m.carbon:[[@LINE+7]]:46: error: cannot implicitly convert expression of type `T.(L.W)` to `{}` [ConversionFailure] -// CHECK:STDERR: fn F(T:! L where .W impls Z, a: T.W) -> {} { return a; } -// CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_infinite_cycle_identifying_associated_constant_as_impls_type_missing_impls_m.carbon:[[@LINE+4]]:46: note: type `T.(L.W)` does not implement interface `Core.ImplicitAs({})` [MissingImplInMemberAccessInContext] -// CHECK:STDERR: fn F(T:! L where .W impls Z, a: T.W) -> {} { return a; } -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_infinite_cycle_identifying_associated_constant_as_impls_type_missing_impls_m.carbon:[[@LINE+7]]:53: error: cannot implicitly convert expression of type `T.(L.W)` to `{}` [ConversionFailure] +// CHECK:STDERR: fn F(generic T: L where .W impls Z, a: T.W) -> {} { return a; } +// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_infinite_cycle_identifying_associated_constant_as_impls_type_missing_impls_m.carbon:[[@LINE+4]]:53: note: type `T.(L.W)` does not implement interface `Core.ImplicitAs({})` [MissingImplInMemberAccessInContext] +// CHECK:STDERR: fn F(generic T: L where .W impls Z, a: T.W) -> {} { return a; } +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -fn F(T:! L where .W impls Z, a: T.W) -> {} { return a; } +fn F(generic T: L where .W impls Z, a: T.W) -> {} { return a; } // --- infinite_cycle_identifying_associated_constant_as_impls_type.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } interface M {} -final impl forall [T:! M] T as L where .W = {} {} +final impl forall [T: M] T as L where .W = {} {} interface Z {} @@ -324,135 +324,135 @@ interface Z {} // 0. `T.W` looks for a witness for `L` in the facet type of `T` // 1. We identify the facet type of `T` and replace `.Self` with `T` throughout. // 2. The `.W` becomes `T.W` which is evaluated and does an impl lookup `T as L`. -// 3. We find the final impl for `T:! M` and try to convert `T as M`. +// 3. We find the final impl for `T: M` and try to convert `T as M`. // 4. We look for a witness for `M` in the facet type of `T`. // 5. Go to step 1. // // Because the `.W` is part of an `impls` constraint, it is substituted as part // of identifying. -fn F(T:! L where .W impls Z and .Self impls M, a: T.W) -> {} { return a; } +fn F(generic T: L where .W impls Z and .Self impls M, a: T.W) -> {} { return a; } // --- fail_infinite_cycle_identifying_associated_constant_in_impls_interface_as_type_missing_m.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } interface M {} -final impl forall [T:! M] T as L where .W = () {} +final impl forall [T: M] T as L where .W = () {} -interface Z(T:! type) {} +interface Z(T: type) {} // This is missing `.Self impls M` so the `final impl` is not used, through // deduction is attempted. // -// CHECK:STDERR: fail_infinite_cycle_identifying_associated_constant_in_impls_interface_as_type_missing_m.carbon:[[@LINE+7]]:53: error: cannot implicitly convert expression of type `T.(L.W)` to `()` [ConversionFailure] -// CHECK:STDERR: fn F(T:! L where .Self impls Z(.W), a: T.W) -> () { return a; } -// CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_infinite_cycle_identifying_associated_constant_in_impls_interface_as_type_missing_m.carbon:[[@LINE+4]]:53: note: type `T.(L.W)` does not implement interface `Core.ImplicitAs(())` [MissingImplInMemberAccessInContext] -// CHECK:STDERR: fn F(T:! L where .Self impls Z(.W), a: T.W) -> () { return a; } -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_infinite_cycle_identifying_associated_constant_in_impls_interface_as_type_missing_m.carbon:[[@LINE+7]]:60: error: cannot implicitly convert expression of type `T.(L.W)` to `()` [ConversionFailure] +// CHECK:STDERR: fn F(generic T: L where .Self impls Z(.W), a: T.W) -> () { return a; } +// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_infinite_cycle_identifying_associated_constant_in_impls_interface_as_type_missing_m.carbon:[[@LINE+4]]:60: note: type `T.(L.W)` does not implement interface `Core.ImplicitAs(())` [MissingImplInMemberAccessInContext] +// CHECK:STDERR: fn F(generic T: L where .Self impls Z(.W), a: T.W) -> () { return a; } +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -fn F(T:! L where .Self impls Z(.W), a: T.W) -> () { return a; } +fn F(generic T: L where .Self impls Z(.W), a: T.W) -> () { return a; } // --- infinite_cycle_identifying_associated_constant_in_impls_interface_as_type.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } interface M {} -final impl forall [T:! M] T as L where .W = () {} +final impl forall [T: M] T as L where .W = () {} -interface Z(T:! type) {} +interface Z(T: type) {} // This can make an infinite cycle in the toolchain: // 0. `T.W` looks for a witness for `L` in the facet type of `T` // 1. We identify the facet type of `T` and replace `.Self` with `T` throughout. // 2. The `.W` becomes `T.W` which is evaluated and does an impl lookup `T as L`. -// 3. We find the final impl for `T:! M` and try to convert `T as M`. +// 3. We find the final impl for `T: M` and try to convert `T as M`. // 4. We look for a witness for `M` in the facet type of `T`. // 5. Go to step 1. // // Because the `.W` is part of an `impls` constraint, it is substituted as part // of identifying. In this case it is inside a FacetAccessType instruction. -fn F(T:! L where .Self impls Z(.W) and .Self impls M, a: T.W) -> () { return a; } +fn F(generic T: L where .Self impls Z(.W) and .Self impls M, a: T.W) -> () { return a; } // --- fail_infinite_cycle_identifying_associated_constant_in_impls_interface_as_facet_type_missing_m.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } interface M {} -final impl forall [T:! M] T as L where .W = () {} +final impl forall [T: M] T as L where .W = () {} interface Y {} -interface Z(T:! Y) {} +interface Z(T: Y) {} // This is missing `.Self impls M` so the `final impl` is not used, through // deduction is attempted. // -// CHECK:STDERR: fail_infinite_cycle_identifying_associated_constant_in_impls_interface_as_facet_type_missing_m.carbon:[[@LINE+7]]:68: error: cannot implicitly convert expression of type `T.(L.W)` to `()` [ConversionFailure] -// CHECK:STDERR: fn F(T:! L where .W impls Y and .Self impls Z(.W), a: T.W) -> () { return a; } -// CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_infinite_cycle_identifying_associated_constant_in_impls_interface_as_facet_type_missing_m.carbon:[[@LINE+4]]:68: note: type `T.(L.W)` does not implement interface `Core.ImplicitAs(())` [MissingImplInMemberAccessInContext] -// CHECK:STDERR: fn F(T:! L where .W impls Y and .Self impls Z(.W), a: T.W) -> () { return a; } -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_infinite_cycle_identifying_associated_constant_in_impls_interface_as_facet_type_missing_m.carbon:[[@LINE+7]]:75: error: cannot implicitly convert expression of type `T.(L.W)` to `()` [ConversionFailure] +// CHECK:STDERR: fn F(generic T: L where .W impls Y and .Self impls Z(.W), a: T.W) -> () { return a; } +// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_infinite_cycle_identifying_associated_constant_in_impls_interface_as_facet_type_missing_m.carbon:[[@LINE+4]]:75: note: type `T.(L.W)` does not implement interface `Core.ImplicitAs(())` [MissingImplInMemberAccessInContext] +// CHECK:STDERR: fn F(generic T: L where .W impls Y and .Self impls Z(.W), a: T.W) -> () { return a; } +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -fn F(T:! L where .W impls Y and .Self impls Z(.W), a: T.W) -> () { return a; } +fn F(generic T: L where .W impls Y and .Self impls Z(.W), a: T.W) -> () { return a; } // --- infinite_cycle_identifying_associated_constant_in_impls_interface_as_facet_type.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } interface M {} -final impl forall [T:! M] T as L where .W = () {} +final impl forall [T: M] T as L where .W = () {} interface Y {} -interface Z(T:! Y) {} +interface Z(T: Y) {} // This can make an infinite cycle in the toolchain: // 0. `T.W` looks for a witness for `L` in the facet type of `T` // 1. We identify the facet type of `T` and replace `.Self` with `T` throughout. // 2. The `.W` becomes `T.W` which is evaluated and does an impl lookup `T as L`. -// 3. We find the final impl for `T:! M` and try to convert `T as M`. +// 3. We find the final impl for `T: M` and try to convert `T as M`. // 4. We look for a witness for `M` in the facet type of `T`. // 5. Go to step 1. // // Because the `.W` is part of an `impls` constraint, it is substituted as part // of identifying. In this case it is inside a FacetValue instruction, which is // converting it to `Y`. -fn F(T:! L where .W impls Y and .Self impls Z(.W) and .Self impls M, a: T.W) -> () { return a; } +fn F(generic T: L where .W impls Y and .Self impls Z(.W) and .Self impls M, a: T.W) -> () { return a; } // --- concrete_access_witness_m_in_extend_constraint.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } interface M {} -final impl forall [T:! M] T as L where .W = () {} +final impl forall [T: M] T as L where .W = () {} -interface Z(Z1:! type) {} +interface Z(Z1: type) {} -class C(C1:! type); +class C(C1: type); // Should pass. `.W` can resolve to `()` immediately through the type of `.Self` // (since the type of `.Self` contains `M`) and the `final impl`. So we can get // a witness for `C(())` from `T`. -fn I(T:! (L & M) where C(.W) impls Z(.Self)) { +fn I(generic T: (L & M) where C(.W) impls Z(.Self)) { C(()) as Z(T); } // --- fail_todo_concrete_access_witness_m_in_impls_constraint.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } interface M {} -final impl forall [T:! M] T as L where .W = () {} +final impl forall [T: M] T as L where .W = () {} -interface Z(Z1:! type) {} +interface Z(Z1: type) {} -class C(C1:! type); +class C(C1: type); // Should pass. `.W` can resolve to `()` immediately through the type of `.Self` // (since the type of `.Self` contains `M`) and the `final impl`. So we can get @@ -460,7 +460,7 @@ class C(C1:! type); // // TODO: How come we don't get `.W` evaluating to `()` when `M` comes from a // non-extend constraint? -fn H(T:! (L where .Self impls M) where C(.W) impls Z(.Self)) { +fn H(generic T: (L where .Self impls M) where C(.W) impls Z(.Self)) { // CHECK:STDERR: fail_todo_concrete_access_witness_m_in_impls_constraint.carbon:[[@LINE+4]]:3: error: cannot convert type `C(())` into type implementing `Z(T)` [ConversionFailureTypeToFacet] // CHECK:STDERR: C(()) as Z(T); // CHECK:STDERR: ^~~~~~~~~~~~~ @@ -471,34 +471,34 @@ fn H(T:! (L where .Self impls M) where C(.W) impls Z(.Self)) { // --- concrete_access_witness_m_in_earlier_constraint.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } interface M {} -final impl forall [T:! M] T as L where .W = () {} +final impl forall [T: M] T as L where .W = () {} -interface Z(Z1:! type) {} +interface Z(Z1: type) {} -class C(C1:! type); +class C(C1: type); // Should pass. `.W` can resolve to `()` immediately through the type of `.Self` // (since the type of `.Self` contains `M`) and the `final impl`. So we can get // a witness for `C(())` from `T`. -fn G(T:! L where .Self impls M and C(.W) impls Z(.Self)) { +fn G(generic T: L where .Self impls M and C(.W) impls Z(.Self)) { C(()) as Z(T); } // --- fail_todo_concrete_access_witness.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } interface M {} -final impl forall [T:! M] T as L where .W = () {} +final impl forall [T: M] T as L where .W = () {} -interface Z(Z1:! type) {} +interface Z(Z1: type) {} -class C(C1:! type); +class C(C1: type); // This does not pass because `.W` can't resolve to `()` where it is written. // The fact that `T impls M` comes later in the facet type. And we don't allow @@ -506,9 +506,9 @@ class C(C1:! type); // witness for `C(()) as Z(T)` in order to avoid cycles. // // TODO: We would like this to pass though, without introducing an infinite -// cycle that identifies `T`, which deduces `T:! M` for the `impl`, which +// cycle that identifies `T`, which deduces `T: M` for the `impl`, which // identifies `T`. See TODO in CollectFacetWitnessSources for ideas. -fn F(T:! L where C(.W) impls Z(.Self) and .Self impls M) { +fn F(generic T: L where C(.W) impls Z(.Self) and .Self impls M) { // CHECK:STDERR: fail_todo_concrete_access_witness.carbon:[[@LINE+4]]:3: error: cannot convert type `C(())` into type implementing `Z(T)` [ConversionFailureTypeToFacet] // CHECK:STDERR: C(()) as Z(T); // CHECK:STDERR: ^~~~~~~~~~~~~ @@ -519,40 +519,40 @@ fn F(T:! L where C(.W) impls Z(.Self) and .Self impls M) { // --- fail_period_self_in_class_argument.carbon library "[[@TEST_NAME]]"; -class C(T:! type); +class C(T: type); -// CHECK:STDERR: fail_period_self_in_class_argument.carbon:[[@LINE+4]]:10: error: `.Self` used in a type that is not a facet type [PeriodSelfInNonFacetType] -// CHECK:STDERR: fn F(_:! C(.Self)) {} -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_period_self_in_class_argument.carbon:[[@LINE+4]]:17: error: `.Self` used in a type that is not a facet type [PeriodSelfInNonFacetType] +// CHECK:STDERR: fn F(generic _: C(.Self)) {} +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -fn F(_:! C(.Self)) {} +fn F(generic _: C(.Self)) {} // --- fail_period_self_in_class_argument_in_where.carbon library "[[@TEST_NAME]]"; -class C(T:! type); +class C(T: type); -// CHECK:STDERR: fail_period_self_in_class_argument_in_where.carbon:[[@LINE+8]]:10: error: left argument of `where` operator must be a facet type [WhereOnNonFacetType] -// CHECK:STDERR: fn F(_:! C(.Self) where type == type) {} -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_period_self_in_class_argument_in_where.carbon:[[@LINE+8]]:17: error: left argument of `where` operator must be a facet type [WhereOnNonFacetType] +// CHECK:STDERR: fn F(generic _: C(.Self) where type == type) {} +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_period_self_in_class_argument_in_where.carbon:[[@LINE+4]]:25: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] -// CHECK:STDERR: fn F(_:! C(.Self) where type == type) {} -// CHECK:STDERR: ^~~~~~~~~~~~ +// CHECK:STDERR: fail_period_self_in_class_argument_in_where.carbon:[[@LINE+4]]:32: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] +// CHECK:STDERR: fn F(generic _: C(.Self) where type == type) {} +// CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: -fn F(_:! C(.Self) where type == type) {} +fn F(generic _: C(.Self) where type == type) {} // --- fail_period_self_in_interface_argument_in_class_argument.carbon library "[[@TEST_NAME]]"; -class C(T:! type); -interface Z(T:! type); +class C(T: type); +interface Z(T: type); -// CHECK:STDERR: fail_period_self_in_interface_argument_in_class_argument.carbon:[[@LINE+4]]:10: error: `.Self` used in a type that is not a facet type [PeriodSelfInNonFacetType] -// CHECK:STDERR: fn F(_:! C(Z(.Self))) {} -// CHECK:STDERR: ^~~~~~~~~~~ +// CHECK:STDERR: fail_period_self_in_interface_argument_in_class_argument.carbon:[[@LINE+4]]:17: error: `.Self` used in a type that is not a facet type [PeriodSelfInNonFacetType] +// CHECK:STDERR: fn F(generic _: C(Z(.Self))) {} +// CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: -fn F(_:! C(Z(.Self))) {} +fn F(generic _: C(Z(.Self))) {} // CHECK:STDOUT: --- period_self_param.carbon // CHECK:STDOUT: @@ -616,121 +616,121 @@ fn F(_:! C(Z(.Self))) {} // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc8_7.1: %pattern_type.4af = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt.bfa)] +// CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type.4af = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt.bfa)] // CHECK:STDOUT: %return.param_patt: %pattern_type.cb1 = out_param_pattern [concrete = constants.%return.param_patt] -// CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern %return.param_patt, %impl.elem0.loc8_39 [concrete = constants.%return.patt] +// CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern %return.param_patt, %impl.elem0.loc8_46 [concrete = constants.%return.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: %I_where.type.6d9 = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T.fb1)] -// CHECK:STDOUT: %T.as_type.loc8_39.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_39.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_39.1: type = converted %T.ref, %T.as_type.loc8_39.2 [symbolic = %T.as_type.loc8_39.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_39.2: %I.assoc_type.901 = specific_constant @I1.%assoc0, @I.WithSelf(constants.%.Self.as_type, constants.%T.fb1) [symbolic_self = constants.%assoc0.267] -// CHECK:STDOUT: %I1.ref.loc8_39: %I.assoc_type.901 = name_ref I1, %.loc8_39.2 [symbolic_self = constants.%assoc0.267] -// CHECK:STDOUT: %facet_value.loc8_39.2: %type = facet_value constants.%T.as_type, () [symbolic = %facet_value.loc8_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %.loc8_39.3: %type = converted constants.%T.as_type, %facet_value.loc8_39.2 [symbolic = %facet_value.loc8_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %I.type.loc8_39.2: type = facet_type <@I, @I(constants.%T.as_type)> [symbolic = %I.type.loc8_39.1 (constants.%I.type.1d2)] -// CHECK:STDOUT: %T.as_type.loc8_39.3: type = facet_access_type constants.%T.fb1 [symbolic = %T.as_type.loc8_39.1 (constants.%T.as_type)] -// CHECK:STDOUT: %facet_value.loc8_39.3: %type = facet_value %T.as_type.loc8_39.3, () [symbolic = %facet_value.loc8_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %.loc8_39.4: %type = converted constants.%T.fb1, %facet_value.loc8_39.3 [symbolic = %facet_value.loc8_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %I_where.type.loc8_39.2: type = facet_type <@I, @I(constants.%T.as_type) where constants.%impl.elem0.21c = constants.%empty_tuple.type> [symbolic = %I_where.type.loc8_39.1 (constants.%I_where.type.3f6)] -// CHECK:STDOUT: %T.as_type.loc8_39.4: type = facet_access_type constants.%T.fb1 [symbolic = %T.as_type.loc8_39.1 (constants.%T.as_type)] -// CHECK:STDOUT: %facet_value.loc8_39.4: %type = facet_value %T.as_type.loc8_39.4, () [symbolic = %facet_value.loc8_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %.loc8_39.5: %type = converted constants.%T.fb1, %facet_value.loc8_39.4 [symbolic = %facet_value.loc8_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %impl.elem0.loc8_39: type = impl_witness_access constants.%I.lookup_impl_witness.962, element0 [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc8_39.6: Core.Form = init_form %impl.elem0.loc8_39 [concrete = constants.%.262] -// CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.3 [symbolic_self = constants.%I_where.type.6d9] { -// CHECK:STDOUT: %.Self.frozen.loc8_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %T.ref: %I_where.type.6d9 = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T.fb1)] +// CHECK:STDOUT: %T.as_type.loc8_46.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_46.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc8_46.1: type = converted %T.ref, %T.as_type.loc8_46.2 [symbolic = %T.as_type.loc8_46.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc8_46.2: %I.assoc_type.901 = specific_constant @I1.%assoc0, @I.WithSelf(constants.%.Self.as_type, constants.%T.fb1) [symbolic_self = constants.%assoc0.267] +// CHECK:STDOUT: %I1.ref.loc8_46: %I.assoc_type.901 = name_ref I1, %.loc8_46.2 [symbolic_self = constants.%assoc0.267] +// CHECK:STDOUT: %facet_value.loc8_46.2: %type = facet_value constants.%T.as_type, () [symbolic = %facet_value.loc8_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %.loc8_46.3: %type = converted constants.%T.as_type, %facet_value.loc8_46.2 [symbolic = %facet_value.loc8_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %I.type.loc8_46.2: type = facet_type <@I, @I(constants.%T.as_type)> [symbolic = %I.type.loc8_46.1 (constants.%I.type.1d2)] +// CHECK:STDOUT: %T.as_type.loc8_46.3: type = facet_access_type constants.%T.fb1 [symbolic = %T.as_type.loc8_46.1 (constants.%T.as_type)] +// CHECK:STDOUT: %facet_value.loc8_46.3: %type = facet_value %T.as_type.loc8_46.3, () [symbolic = %facet_value.loc8_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %.loc8_46.4: %type = converted constants.%T.fb1, %facet_value.loc8_46.3 [symbolic = %facet_value.loc8_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %I_where.type.loc8_46.2: type = facet_type <@I, @I(constants.%T.as_type) where constants.%impl.elem0.21c = constants.%empty_tuple.type> [symbolic = %I_where.type.loc8_46.1 (constants.%I_where.type.3f6)] +// CHECK:STDOUT: %T.as_type.loc8_46.4: type = facet_access_type constants.%T.fb1 [symbolic = %T.as_type.loc8_46.1 (constants.%T.as_type)] +// CHECK:STDOUT: %facet_value.loc8_46.4: %type = facet_value %T.as_type.loc8_46.4, () [symbolic = %facet_value.loc8_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %.loc8_46.5: %type = converted constants.%T.fb1, %facet_value.loc8_46.4 [symbolic = %facet_value.loc8_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %impl.elem0.loc8_46: type = impl_witness_access constants.%I.lookup_impl_witness.962, element0 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc8_46.6: Core.Form = init_form %impl.elem0.loc8_46 [concrete = constants.%.262] +// CHECK:STDOUT: %.loc8_26.1: type = splice_block %.loc8_26.3 [symbolic_self = constants.%I_where.type.6d9] { +// CHECK:STDOUT: %.Self.frozen.loc8_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] -// CHECK:STDOUT: %.Self.ref.loc8_12: %type = name_ref .Self, %.Self.frozen.loc8_7 [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.Self.as_type.loc8_17: type = facet_access_type %.Self.ref.loc8_12 [symbolic_self = constants.%.Self.frozen.as_type.bce] -// CHECK:STDOUT: %.loc8_17: type = converted %.Self.ref.loc8_12, %.Self.as_type.loc8_17 [symbolic_self = constants.%.Self.frozen.as_type.bce] -// CHECK:STDOUT: %I.type.loc8_17.1: type = facet_type <@I, @I(constants.%.Self.frozen.as_type.bce)> [symbolic_self = constants.%I.type.0e8] -// CHECK:STDOUT: %.Self.frozen.loc8_19: %I.type.0e8 = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.edc] -// CHECK:STDOUT: %base_facet_type.loc8_19.1 = requirement_base_facet_type %I.type.loc8_17.1 [concrete] -// CHECK:STDOUT: %.Self.ref.loc8_25: %I.type.0e8 = name_ref .Self, %.Self.frozen.loc8_19 [symbolic_self = constants.%.Self.frozen.edc] -// CHECK:STDOUT: %.Self.as_type.loc8_25: type = facet_access_type %.Self.ref.loc8_25 [symbolic_self = constants.%.Self.frozen.as_type.7bb] -// CHECK:STDOUT: %.loc8_25.1: type = converted %.Self.ref.loc8_25, %.Self.as_type.loc8_25 [symbolic_self = constants.%.Self.frozen.as_type.7bb] -// CHECK:STDOUT: %.loc8_25.2: %I.assoc_type.96e = specific_constant @I1.%assoc0, @I.WithSelf(constants.%.Self.frozen.as_type.bce, constants.%.Self.frozen.edc) [symbolic_self = constants.%assoc0.cab] -// CHECK:STDOUT: %I1.ref.loc8_25: %I.assoc_type.96e = name_ref I1, %.loc8_25.2 [symbolic_self = constants.%assoc0.cab] -// CHECK:STDOUT: %impl.elem0.loc8_25.1: type = impl_witness_access constants.%I.lookup_impl_witness.d6e, element0 [symbolic_self = constants.%impl.elem0.14f] -// CHECK:STDOUT: %.loc8_32.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_32.2: type = converted %.loc8_32.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %rewrite.loc8_29.1 = requirement_rewrite %impl.elem0.loc8_25.1, %.loc8_32.2 [concrete] -// CHECK:STDOUT: %I.type.loc8_17.2: type = facet_type <@I, @I(constants.%.Self.as_type)> [symbolic_self = constants.%I.type.a4e] -// CHECK:STDOUT: %base_facet_type.loc8_19.2 = requirement_base_facet_type %I.type.loc8_17.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc8_25.2: type = impl_witness_access constants.%I.lookup_impl_witness.eea, element0 [symbolic_self = constants.%impl.elem0.439] -// CHECK:STDOUT: %rewrite.loc8_29.2 = requirement_rewrite %impl.elem0.loc8_25.2, %.loc8_32.2 [concrete] -// CHECK:STDOUT: %.loc8_19.2: type = where_expr [symbolic_self = constants.%I_where.type.760] { -// CHECK:STDOUT: %base_facet_type.loc8_19.2 = requirement_base_facet_type %I.type.loc8_17.2 [concrete] -// CHECK:STDOUT: %rewrite.loc8_29.2 = requirement_rewrite %impl.elem0.loc8_25.2, %.loc8_32.2 [concrete] +// CHECK:STDOUT: %.Self.ref.loc8_19: %type = name_ref .Self, %.Self.frozen.loc8_15 [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.Self.as_type.loc8_24: type = facet_access_type %.Self.ref.loc8_19 [symbolic_self = constants.%.Self.frozen.as_type.bce] +// CHECK:STDOUT: %.loc8_24: type = converted %.Self.ref.loc8_19, %.Self.as_type.loc8_24 [symbolic_self = constants.%.Self.frozen.as_type.bce] +// CHECK:STDOUT: %I.type.loc8_24.1: type = facet_type <@I, @I(constants.%.Self.frozen.as_type.bce)> [symbolic_self = constants.%I.type.0e8] +// CHECK:STDOUT: %.Self.frozen.loc8_26: %I.type.0e8 = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.edc] +// CHECK:STDOUT: %base_facet_type.loc8_26.1 = requirement_base_facet_type %I.type.loc8_24.1 [concrete] +// CHECK:STDOUT: %.Self.ref.loc8_32: %I.type.0e8 = name_ref .Self, %.Self.frozen.loc8_26 [symbolic_self = constants.%.Self.frozen.edc] +// CHECK:STDOUT: %.Self.as_type.loc8_32: type = facet_access_type %.Self.ref.loc8_32 [symbolic_self = constants.%.Self.frozen.as_type.7bb] +// CHECK:STDOUT: %.loc8_32.1: type = converted %.Self.ref.loc8_32, %.Self.as_type.loc8_32 [symbolic_self = constants.%.Self.frozen.as_type.7bb] +// CHECK:STDOUT: %.loc8_32.2: %I.assoc_type.96e = specific_constant @I1.%assoc0, @I.WithSelf(constants.%.Self.frozen.as_type.bce, constants.%.Self.frozen.edc) [symbolic_self = constants.%assoc0.cab] +// CHECK:STDOUT: %I1.ref.loc8_32: %I.assoc_type.96e = name_ref I1, %.loc8_32.2 [symbolic_self = constants.%assoc0.cab] +// CHECK:STDOUT: %impl.elem0.loc8_32.1: type = impl_witness_access constants.%I.lookup_impl_witness.d6e, element0 [symbolic_self = constants.%impl.elem0.14f] +// CHECK:STDOUT: %.loc8_39.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc8_39.2: type = converted %.loc8_39.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %rewrite.loc8_36.1 = requirement_rewrite %impl.elem0.loc8_32.1, %.loc8_39.2 [concrete] +// CHECK:STDOUT: %I.type.loc8_24.2: type = facet_type <@I, @I(constants.%.Self.as_type)> [symbolic_self = constants.%I.type.a4e] +// CHECK:STDOUT: %base_facet_type.loc8_26.2 = requirement_base_facet_type %I.type.loc8_24.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc8_32.2: type = impl_witness_access constants.%I.lookup_impl_witness.eea, element0 [symbolic_self = constants.%impl.elem0.439] +// CHECK:STDOUT: %rewrite.loc8_36.2 = requirement_rewrite %impl.elem0.loc8_32.2, %.loc8_39.2 [concrete] +// CHECK:STDOUT: %.loc8_26.2: type = where_expr [symbolic_self = constants.%I_where.type.760] { +// CHECK:STDOUT: %base_facet_type.loc8_26.2 = requirement_base_facet_type %I.type.loc8_24.2 [concrete] +// CHECK:STDOUT: %rewrite.loc8_36.2 = requirement_rewrite %impl.elem0.loc8_32.2, %.loc8_39.2 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc8_25.3: type = impl_witness_access constants.%I.lookup_impl_witness.0d5, element0 [symbolic_self = constants.%impl.elem0.21c] -// CHECK:STDOUT: %rewrite.loc8_29.3 = requirement_rewrite %impl.elem0.loc8_25.3, %.loc8_32.2 [concrete] -// CHECK:STDOUT: %.loc8_19.3: type = where_expr [symbolic_self = constants.%I_where.type.6d9] { -// CHECK:STDOUT: %base_facet_type.loc8_19.2 = requirement_base_facet_type %I.type.loc8_17.2 [concrete] -// CHECK:STDOUT: %rewrite.loc8_29.3 = requirement_rewrite %impl.elem0.loc8_25.3, %.loc8_32.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc8_32.3: type = impl_witness_access constants.%I.lookup_impl_witness.0d5, element0 [symbolic_self = constants.%impl.elem0.21c] +// CHECK:STDOUT: %rewrite.loc8_36.3 = requirement_rewrite %impl.elem0.loc8_32.3, %.loc8_39.2 [concrete] +// CHECK:STDOUT: %.loc8_26.3: type = where_expr [symbolic_self = constants.%I_where.type.6d9] { +// CHECK:STDOUT: %base_facet_type.loc8_26.2 = requirement_base_facet_type %I.type.loc8_24.2 [concrete] +// CHECK:STDOUT: %rewrite.loc8_36.3 = requirement_rewrite %impl.elem0.loc8_32.3, %.loc8_39.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_7.2: %I_where.type.6d9 = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T.fb1)] +// CHECK:STDOUT: %T.loc8_15.2: %I_where.type.6d9 = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T.fb1)] // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc12_7.1: %pattern_type.4af = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_7.2 (constants.%T.patt.bfa)] +// CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type.4af = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt.bfa)] // CHECK:STDOUT: %return.param_patt: %pattern_type.cb1 = out_param_pattern [concrete = constants.%return.param_patt] -// CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern %return.param_patt, %impl.elem0.loc12_47 [concrete = constants.%return.patt] +// CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern %return.param_patt, %impl.elem0.loc12_54 [concrete = constants.%return.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: %I_where.type.6d9 = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T.fb1)] -// CHECK:STDOUT: %T.as_type.loc12_47.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_47.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc12_47.1: type = converted %T.ref, %T.as_type.loc12_47.2 [symbolic = %T.as_type.loc12_47.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc12_47.2: %I.assoc_type.901 = specific_constant @I1.%assoc0, @I.WithSelf(constants.%.Self.as_type, constants.%T.fb1) [symbolic_self = constants.%assoc0.267] -// CHECK:STDOUT: %I1.ref.loc12_47: %I.assoc_type.901 = name_ref I1, %.loc12_47.2 [symbolic_self = constants.%assoc0.267] -// CHECK:STDOUT: %T.as_type.loc12_47.3: type = facet_access_type constants.%T.fb1 [symbolic = %T.as_type.loc12_47.1 (constants.%T.as_type)] -// CHECK:STDOUT: %facet_value.loc12_47.2: %type = facet_value %T.as_type.loc12_47.3, () [symbolic = %facet_value.loc12_47.1 (constants.%facet_value)] -// CHECK:STDOUT: %.loc12_47.3: %type = converted constants.%T.fb1, %facet_value.loc12_47.2 [symbolic = %facet_value.loc12_47.1 (constants.%facet_value)] -// CHECK:STDOUT: %impl.elem0.loc12_47: type = impl_witness_access constants.%I.lookup_impl_witness.962, element0 [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc12_47.4: Core.Form = init_form %impl.elem0.loc12_47 [concrete = constants.%.262] -// CHECK:STDOUT: %.loc12_27.1: type = splice_block %.loc12_27.3 [symbolic_self = constants.%I_where.type.6d9] { -// CHECK:STDOUT: %.Self.frozen.loc12_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %T.ref: %I_where.type.6d9 = name_ref T, %T.loc12_15.2 [symbolic = %T.loc12_15.1 (constants.%T.fb1)] +// CHECK:STDOUT: %T.as_type.loc12_54.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_54.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc12_54.1: type = converted %T.ref, %T.as_type.loc12_54.2 [symbolic = %T.as_type.loc12_54.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc12_54.2: %I.assoc_type.901 = specific_constant @I1.%assoc0, @I.WithSelf(constants.%.Self.as_type, constants.%T.fb1) [symbolic_self = constants.%assoc0.267] +// CHECK:STDOUT: %I1.ref.loc12_54: %I.assoc_type.901 = name_ref I1, %.loc12_54.2 [symbolic_self = constants.%assoc0.267] +// CHECK:STDOUT: %T.as_type.loc12_54.3: type = facet_access_type constants.%T.fb1 [symbolic = %T.as_type.loc12_54.1 (constants.%T.as_type)] +// CHECK:STDOUT: %facet_value.loc12_54.2: %type = facet_value %T.as_type.loc12_54.3, () [symbolic = %facet_value.loc12_54.1 (constants.%facet_value)] +// CHECK:STDOUT: %.loc12_54.3: %type = converted constants.%T.fb1, %facet_value.loc12_54.2 [symbolic = %facet_value.loc12_54.1 (constants.%facet_value)] +// CHECK:STDOUT: %impl.elem0.loc12_54: type = impl_witness_access constants.%I.lookup_impl_witness.962, element0 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc12_54.4: Core.Form = init_form %impl.elem0.loc12_54 [concrete = constants.%.262] +// CHECK:STDOUT: %.loc12_34.1: type = splice_block %.loc12_34.3 [symbolic_self = constants.%I_where.type.6d9] { +// CHECK:STDOUT: %.Self.frozen.loc12_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] -// CHECK:STDOUT: %.Self.ref.loc12_12: %type = name_ref .Self, %.Self.frozen.loc12_7 [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc12_21: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.Self.as_type.loc12_18: type = facet_access_type %.Self.ref.loc12_12 [symbolic_self = constants.%.Self.frozen.as_type.bce] -// CHECK:STDOUT: %.loc12_18: type = converted %.Self.ref.loc12_12, %.Self.as_type.loc12_18 [symbolic_self = constants.%.Self.frozen.as_type.bce] -// CHECK:STDOUT: %I.type.loc12_25.1: type = facet_type <@I, @I(constants.%.Self.frozen.as_type.bce)> [symbolic_self = constants.%I.type.0e8] -// CHECK:STDOUT: %.Self.frozen.loc12_27: %I.type.0e8 = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.edc] -// CHECK:STDOUT: %base_facet_type.loc12_27.1 = requirement_base_facet_type %I.type.loc12_25.1 [concrete] -// CHECK:STDOUT: %.Self.ref.loc12_33: %I.type.0e8 = name_ref .Self, %.Self.frozen.loc12_27 [symbolic_self = constants.%.Self.frozen.edc] -// CHECK:STDOUT: %.Self.as_type.loc12_33: type = facet_access_type %.Self.ref.loc12_33 [symbolic_self = constants.%.Self.frozen.as_type.7bb] -// CHECK:STDOUT: %.loc12_33.1: type = converted %.Self.ref.loc12_33, %.Self.as_type.loc12_33 [symbolic_self = constants.%.Self.frozen.as_type.7bb] -// CHECK:STDOUT: %.loc12_33.2: %I.assoc_type.96e = specific_constant @I1.%assoc0, @I.WithSelf(constants.%.Self.frozen.as_type.bce, constants.%.Self.frozen.edc) [symbolic_self = constants.%assoc0.cab] -// CHECK:STDOUT: %I1.ref.loc12_33: %I.assoc_type.96e = name_ref I1, %.loc12_33.2 [symbolic_self = constants.%assoc0.cab] -// CHECK:STDOUT: %impl.elem0.loc12_33.1: type = impl_witness_access constants.%I.lookup_impl_witness.d6e, element0 [symbolic_self = constants.%impl.elem0.14f] -// CHECK:STDOUT: %.loc12_40.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc12_40.2: type = converted %.loc12_40.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %rewrite.loc12_37.1 = requirement_rewrite %impl.elem0.loc12_33.1, %.loc12_40.2 [concrete] -// CHECK:STDOUT: %I.type.loc12_25.2: type = facet_type <@I, @I(constants.%.Self.as_type)> [symbolic_self = constants.%I.type.a4e] -// CHECK:STDOUT: %base_facet_type.loc12_27.2 = requirement_base_facet_type %I.type.loc12_25.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc12_33.2: type = impl_witness_access constants.%I.lookup_impl_witness.eea, element0 [symbolic_self = constants.%impl.elem0.439] -// CHECK:STDOUT: %rewrite.loc12_37.2 = requirement_rewrite %impl.elem0.loc12_33.2, %.loc12_40.2 [concrete] -// CHECK:STDOUT: %.loc12_27.2: type = where_expr [symbolic_self = constants.%I_where.type.760] { -// CHECK:STDOUT: %base_facet_type.loc12_27.2 = requirement_base_facet_type %I.type.loc12_25.2 [concrete] -// CHECK:STDOUT: %rewrite.loc12_37.2 = requirement_rewrite %impl.elem0.loc12_33.2, %.loc12_40.2 [concrete] +// CHECK:STDOUT: %.Self.ref.loc12_19: %type = name_ref .Self, %.Self.frozen.loc12_15 [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc12_28: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.as_type.loc12_25: type = facet_access_type %.Self.ref.loc12_19 [symbolic_self = constants.%.Self.frozen.as_type.bce] +// CHECK:STDOUT: %.loc12_25: type = converted %.Self.ref.loc12_19, %.Self.as_type.loc12_25 [symbolic_self = constants.%.Self.frozen.as_type.bce] +// CHECK:STDOUT: %I.type.loc12_32.1: type = facet_type <@I, @I(constants.%.Self.frozen.as_type.bce)> [symbolic_self = constants.%I.type.0e8] +// CHECK:STDOUT: %.Self.frozen.loc12_34: %I.type.0e8 = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.edc] +// CHECK:STDOUT: %base_facet_type.loc12_34.1 = requirement_base_facet_type %I.type.loc12_32.1 [concrete] +// CHECK:STDOUT: %.Self.ref.loc12_40: %I.type.0e8 = name_ref .Self, %.Self.frozen.loc12_34 [symbolic_self = constants.%.Self.frozen.edc] +// CHECK:STDOUT: %.Self.as_type.loc12_40: type = facet_access_type %.Self.ref.loc12_40 [symbolic_self = constants.%.Self.frozen.as_type.7bb] +// CHECK:STDOUT: %.loc12_40.1: type = converted %.Self.ref.loc12_40, %.Self.as_type.loc12_40 [symbolic_self = constants.%.Self.frozen.as_type.7bb] +// CHECK:STDOUT: %.loc12_40.2: %I.assoc_type.96e = specific_constant @I1.%assoc0, @I.WithSelf(constants.%.Self.frozen.as_type.bce, constants.%.Self.frozen.edc) [symbolic_self = constants.%assoc0.cab] +// CHECK:STDOUT: %I1.ref.loc12_40: %I.assoc_type.96e = name_ref I1, %.loc12_40.2 [symbolic_self = constants.%assoc0.cab] +// CHECK:STDOUT: %impl.elem0.loc12_40.1: type = impl_witness_access constants.%I.lookup_impl_witness.d6e, element0 [symbolic_self = constants.%impl.elem0.14f] +// CHECK:STDOUT: %.loc12_47.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc12_47.2: type = converted %.loc12_47.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %rewrite.loc12_44.1 = requirement_rewrite %impl.elem0.loc12_40.1, %.loc12_47.2 [concrete] +// CHECK:STDOUT: %I.type.loc12_32.2: type = facet_type <@I, @I(constants.%.Self.as_type)> [symbolic_self = constants.%I.type.a4e] +// CHECK:STDOUT: %base_facet_type.loc12_34.2 = requirement_base_facet_type %I.type.loc12_32.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc12_40.2: type = impl_witness_access constants.%I.lookup_impl_witness.eea, element0 [symbolic_self = constants.%impl.elem0.439] +// CHECK:STDOUT: %rewrite.loc12_44.2 = requirement_rewrite %impl.elem0.loc12_40.2, %.loc12_47.2 [concrete] +// CHECK:STDOUT: %.loc12_34.2: type = where_expr [symbolic_self = constants.%I_where.type.760] { +// CHECK:STDOUT: %base_facet_type.loc12_34.2 = requirement_base_facet_type %I.type.loc12_32.2 [concrete] +// CHECK:STDOUT: %rewrite.loc12_44.2 = requirement_rewrite %impl.elem0.loc12_40.2, %.loc12_47.2 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc12_33.3: type = impl_witness_access constants.%I.lookup_impl_witness.0d5, element0 [symbolic_self = constants.%impl.elem0.21c] -// CHECK:STDOUT: %rewrite.loc12_37.3 = requirement_rewrite %impl.elem0.loc12_33.3, %.loc12_40.2 [concrete] -// CHECK:STDOUT: %.loc12_27.3: type = where_expr [symbolic_self = constants.%I_where.type.6d9] { -// CHECK:STDOUT: %base_facet_type.loc12_27.2 = requirement_base_facet_type %I.type.loc12_25.2 [concrete] -// CHECK:STDOUT: %rewrite.loc12_37.3 = requirement_rewrite %impl.elem0.loc12_33.3, %.loc12_40.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc12_40.3: type = impl_witness_access constants.%I.lookup_impl_witness.0d5, element0 [symbolic_self = constants.%impl.elem0.21c] +// CHECK:STDOUT: %rewrite.loc12_44.3 = requirement_rewrite %impl.elem0.loc12_40.3, %.loc12_47.2 [concrete] +// CHECK:STDOUT: %.loc12_34.3: type = where_expr [symbolic_self = constants.%I_where.type.6d9] { +// CHECK:STDOUT: %base_facet_type.loc12_34.2 = requirement_base_facet_type %I.type.loc12_32.2 [concrete] +// CHECK:STDOUT: %rewrite.loc12_44.3 = requirement_rewrite %impl.elem0.loc12_40.3, %.loc12_47.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc12_7.2: %I_where.type.6d9 = symbolic_binding T, 0 [symbolic = %T.loc12_7.1 (constants.%T.fb1)] +// CHECK:STDOUT: %T.loc12_15.2: %I_where.type.6d9 = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T.fb1)] // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } @@ -742,10 +742,10 @@ fn F(_:! C(Z(.Self))) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc4_14.1)> [symbolic = %I.type (constants.%I.type.3fe)] -// CHECK:STDOUT: %Self.loc4_23.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc4_22.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self.191)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_23.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc4_22.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self.191)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -754,7 +754,7 @@ fn F(_:! C(Z(.Self))) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_23.1 +// CHECK:STDOUT: .Self = %Self.loc4_22.1 // CHECK:STDOUT: .I1 = @I1.%assoc0 // CHECK:STDOUT: witness = (@I.WithSelf.%I1) // CHECK:STDOUT: @@ -764,13 +764,13 @@ fn F(_:! C(Z(.Self))) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc8_7.2: %I_where.type.6d9) { -// CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.4af = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt.bfa)] -// CHECK:STDOUT: %T.loc8_7.1: %I_where.type.6d9 = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T.fb1)] -// CHECK:STDOUT: %T.as_type.loc8_39.1: type = facet_access_type %T.loc8_7.1 [symbolic = %T.as_type.loc8_39.1 (constants.%T.as_type)] -// CHECK:STDOUT: %facet_value.loc8_39.1: %type = facet_value %T.as_type.loc8_39.1, () [symbolic = %facet_value.loc8_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %I.type.loc8_39.1: type = facet_type <@I, @I(%T.as_type.loc8_39.1)> [symbolic = %I.type.loc8_39.1 (constants.%I.type.1d2)] -// CHECK:STDOUT: %I_where.type.loc8_39.1: type = facet_type <@I, @I(%T.as_type.loc8_39.1) where constants.%impl.elem0.21c = constants.%empty_tuple.type> [symbolic = %I_where.type.loc8_39.1 (constants.%I_where.type.3f6)] +// CHECK:STDOUT: generic fn @F(%T.loc8_15.2: %I_where.type.6d9) { +// CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.4af = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt.bfa)] +// CHECK:STDOUT: %T.loc8_15.1: %I_where.type.6d9 = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T.fb1)] +// CHECK:STDOUT: %T.as_type.loc8_46.1: type = facet_access_type %T.loc8_15.1 [symbolic = %T.as_type.loc8_46.1 (constants.%T.as_type)] +// CHECK:STDOUT: %facet_value.loc8_46.1: %type = facet_value %T.as_type.loc8_46.1, () [symbolic = %facet_value.loc8_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %I.type.loc8_46.1: type = facet_type <@I, @I(%T.as_type.loc8_46.1)> [symbolic = %I.type.loc8_46.1 (constants.%I.type.1d2)] +// CHECK:STDOUT: %I_where.type.loc8_46.1: type = facet_type <@I, @I(%T.as_type.loc8_46.1) where constants.%impl.elem0.21c = constants.%empty_tuple.type> [symbolic = %I_where.type.loc8_46.1 (constants.%I_where.type.3f6)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -785,11 +785,11 @@ fn F(_:! C(Z(.Self))) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc12_7.2: %I_where.type.6d9) { -// CHECK:STDOUT: %T.patt.loc12_7.2: %pattern_type.4af = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_7.2 (constants.%T.patt.bfa)] -// CHECK:STDOUT: %T.loc12_7.1: %I_where.type.6d9 = symbolic_binding T, 0 [symbolic = %T.loc12_7.1 (constants.%T.fb1)] -// CHECK:STDOUT: %T.as_type.loc12_47.1: type = facet_access_type %T.loc12_7.1 [symbolic = %T.as_type.loc12_47.1 (constants.%T.as_type)] -// CHECK:STDOUT: %facet_value.loc12_47.1: %type = facet_value %T.as_type.loc12_47.1, () [symbolic = %facet_value.loc12_47.1 (constants.%facet_value)] +// CHECK:STDOUT: generic fn @G(%T.loc12_15.2: %I_where.type.6d9) { +// CHECK:STDOUT: %T.patt.loc12_15.2: %pattern_type.4af = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt.bfa)] +// CHECK:STDOUT: %T.loc12_15.1: %I_where.type.6d9 = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T.fb1)] +// CHECK:STDOUT: %T.as_type.loc12_54.1: type = facet_access_type %T.loc12_15.1 [symbolic = %T.as_type.loc12_54.1 (constants.%T.as_type)] +// CHECK:STDOUT: %facet_value.loc12_54.1: %type = facet_value %T.as_type.loc12_54.1, () [symbolic = %facet_value.loc12_54.1 (constants.%facet_value)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -817,7 +817,7 @@ fn F(_:! C(Z(.Self))) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.0e8 -// CHECK:STDOUT: %Self.loc4_23.2 => constants.%Self.a53 +// CHECK:STDOUT: %Self.loc4_22.2 => constants.%Self.a53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%.Self.frozen.as_type.bce, constants.%Self.191) { @@ -840,7 +840,7 @@ fn F(_:! C(Z(.Self))) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.a4e -// CHECK:STDOUT: %Self.loc4_23.2 => constants.%Self.6fd +// CHECK:STDOUT: %Self.loc4_22.2 => constants.%Self.6fd // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%.Self.as_type, constants.%Self.191) { @@ -870,18 +870,18 @@ fn F(_:! C(Z(.Self))) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.fb1) { -// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt.bfa -// CHECK:STDOUT: %T.loc8_7.1 => constants.%T.fb1 -// CHECK:STDOUT: %T.as_type.loc8_39.1 => constants.%T.as_type -// CHECK:STDOUT: %facet_value.loc8_39.1 => constants.%facet_value -// CHECK:STDOUT: %I.type.loc8_39.1 => constants.%I.type.1d2 -// CHECK:STDOUT: %I_where.type.loc8_39.1 => constants.%I_where.type.3f6 +// CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt.bfa +// CHECK:STDOUT: %T.loc8_15.1 => constants.%T.fb1 +// CHECK:STDOUT: %T.as_type.loc8_46.1 => constants.%T.as_type +// CHECK:STDOUT: %facet_value.loc8_46.1 => constants.%facet_value +// CHECK:STDOUT: %I.type.loc8_46.1 => constants.%I.type.1d2 +// CHECK:STDOUT: %I_where.type.loc8_46.1 => constants.%I_where.type.3f6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T.fb1) { -// CHECK:STDOUT: %T.patt.loc12_7.2 => constants.%T.patt.bfa -// CHECK:STDOUT: %T.loc12_7.1 => constants.%T.fb1 -// CHECK:STDOUT: %T.as_type.loc12_47.1 => constants.%T.as_type -// CHECK:STDOUT: %facet_value.loc12_47.1 => constants.%facet_value +// CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt.bfa +// CHECK:STDOUT: %T.loc12_15.1 => constants.%T.fb1 +// CHECK:STDOUT: %T.as_type.loc12_54.1 => constants.%T.as_type +// CHECK:STDOUT: %facet_value.loc12_54.1 => constants.%facet_value // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/require_import.carbon b/toolchain/check/testdata/facet/require_import.carbon index 24a4bf1e2a68..80b5d12ae01b 100644 --- a/toolchain/check/testdata/facet/require_import.carbon +++ b/toolchain/check/testdata/facet/require_import.carbon @@ -13,7 +13,7 @@ // --- a.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { +interface Z(T: type) { fn F(); } @@ -29,7 +29,7 @@ constraint X { //@include-in-dumps impl library "[[@TEST_NAME]]"; -fn F(A:! X, unused B:! Y) { +fn F(generic A: X, unused generic B: Y) { A.F(); } @@ -38,8 +38,8 @@ library "[[@TEST_NAME]]"; import library "a"; -fn F(B:! Y) { - // TODO: We find the name F, but then fail to do impl lookup for `F` in `B:! +fn F(generic B: Y) { + // TODO: We find the name F, but then fail to do impl lookup for `F` in `B: // Y` since the identified facet type doesn't include Z. We need to be able to // find a symbolic facet from the require decl in Y during impl lookup. // @@ -109,8 +109,8 @@ fn F(B:! Y) { // CHECK:STDOUT: %Main.F = import_ref Main//a, F, unloaded // CHECK:STDOUT: %Main.import_ref.dfd: @Z.WithSelf.%Z.WithSelf.F.type (%Z.WithSelf.F.type.bc1) = import_ref Main//a, loc4_9, loaded [symbolic = @Z.WithSelf.%Z.WithSelf.F (constants.%Z.WithSelf.F.7b9)] // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//a, loc3_14, loaded [symbolic = @Z.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.a7a2ca.2: @Z.%Z.type (%Z.type.924) = import_ref Main//a, loc3_23, loaded [symbolic = @Z.%Self (constants.%Self.d5d)] -// CHECK:STDOUT: %Main.import_ref.fd7 = import_ref Main//a, loc3_23, unloaded +// CHECK:STDOUT: %Main.import_ref.a7a2ca.2: @Z.%Z.type (%Z.type.924) = import_ref Main//a, loc3_22, loaded [symbolic = @Z.%Self (constants.%Self.d5d)] +// CHECK:STDOUT: %Main.import_ref.fd7 = import_ref Main//a, loc3_22, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//a, loc3_14, loaded [symbolic = @Z.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.5f6: type = import_ref Main//a, loc12_18, loaded [symbolic = @X.WithSelf.Self.as_type.impls.Z.type.require.%Self.as_type (constants.%Self.as_type.190)] // CHECK:STDOUT: %Main.import_ref.06c: type = import_ref Main//a, loc12_30, loaded [symbolic = @X.WithSelf.Self.as_type.impls.Z.type.require.%Z.type (constants.%Z.type.ecd906.1)] @@ -134,19 +134,19 @@ fn F(B:! Y) { // CHECK:STDOUT: %default.import.loc2_17.1 = import // CHECK:STDOUT: %default.import.loc2_17.2 = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %A.patt.loc4_7.1: %pattern_type.9a5 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc4_7.2 (constants.%A.patt)] -// CHECK:STDOUT: %B.patt.loc4_21.1: %pattern_type.cfb = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc4_21.2 (constants.%B.patt)] +// CHECK:STDOUT: %A.patt.loc4_15.1: %pattern_type.9a5 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc4_15.2 (constants.%A.patt)] +// CHECK:STDOUT: %B.patt.loc4_36.1: %pattern_type.cfb = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc4_36.2 (constants.%B.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_10: type = splice_block %X.ref [concrete = constants.%X.type] { -// CHECK:STDOUT: %.Self.frozen.loc4_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_17: type = splice_block %X.ref [concrete = constants.%X.type] { +// CHECK:STDOUT: %.Self.frozen.loc4_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %X.ref: type = name_ref X, imports.%Main.X [concrete = constants.%X.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %A.loc4_7.2: %X.type = symbolic_binding A, 0 [symbolic = %A.loc4_7.1 (constants.%A)] -// CHECK:STDOUT: %.loc4_24: type = splice_block %Y.ref [concrete = constants.%Y.type] { -// CHECK:STDOUT: %.Self.frozen.loc4_21: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %A.loc4_15.2: %X.type = symbolic_binding A, 0 [symbolic = %A.loc4_15.1 (constants.%A)] +// CHECK:STDOUT: %.loc4_38: type = splice_block %Y.ref [concrete = constants.%Y.type] { +// CHECK:STDOUT: %.Self.frozen.loc4_36: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%Main.Y [concrete = constants.%Y.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %B.loc4_21.2: %Y.type = symbolic_binding B, 1 [symbolic = %B.loc4_21.1 (constants.%B)] +// CHECK:STDOUT: %B.loc4_36.2: %Y.type = symbolic_binding B, 1 [symbolic = %B.loc4_36.1 (constants.%B)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -212,18 +212,18 @@ fn F(B:! Y) { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%A.loc4_7.2: %X.type, %B.loc4_21.2: %Y.type) { -// CHECK:STDOUT: %A.patt.loc4_7.2: %pattern_type.9a5 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc4_7.2 (constants.%A.patt)] -// CHECK:STDOUT: %A.loc4_7.1: %X.type = symbolic_binding A, 0 [symbolic = %A.loc4_7.1 (constants.%A)] -// CHECK:STDOUT: %B.patt.loc4_21.2: %pattern_type.cfb = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc4_21.2 (constants.%B.patt)] -// CHECK:STDOUT: %B.loc4_21.1: %Y.type = symbolic_binding B, 1 [symbolic = %B.loc4_21.1 (constants.%B)] +// CHECK:STDOUT: generic fn @F(%A.loc4_15.2: %X.type, %B.loc4_36.2: %Y.type) { +// CHECK:STDOUT: %A.patt.loc4_15.2: %pattern_type.9a5 = symbolic_binding_pattern A, 0 [symbolic = %A.patt.loc4_15.2 (constants.%A.patt)] +// CHECK:STDOUT: %A.loc4_15.1: %X.type = symbolic_binding A, 0 [symbolic = %A.loc4_15.1 (constants.%A)] +// CHECK:STDOUT: %B.patt.loc4_36.2: %pattern_type.cfb = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc4_36.2 (constants.%B.patt)] +// CHECK:STDOUT: %B.loc4_36.1: %Y.type = symbolic_binding B, 1 [symbolic = %B.loc4_36.1 (constants.%B)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %A.as_type.loc5_4.2: type = facet_access_type %A.loc4_7.1 [symbolic = %A.as_type.loc5_4.2 (constants.%A.as_type)] +// CHECK:STDOUT: %A.as_type.loc5_4.2: type = facet_access_type %A.loc4_15.1 [symbolic = %A.as_type.loc5_4.2 (constants.%A.as_type)] // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%A.as_type.loc5_4.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.48d)] // CHECK:STDOUT: %assoc0: @F.%Z.assoc_type (%Z.assoc_type.48d) = assoc_entity element0, imports.%Main.import_ref.dfd [symbolic = %assoc0 (constants.%assoc0.f32)] // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%A.as_type.loc5_4.2)> [symbolic = %Z.type (constants.%Z.type.ecd906.2)] -// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %A.loc4_7.1, @Z, @Z(%A.as_type.loc5_4.2) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %A.loc4_15.1, @Z, @Z(%A.as_type.loc5_4.2) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] // CHECK:STDOUT: %Z.facet: @F.%Z.type (%Z.type.ecd906.2) = facet_value %A.as_type.loc5_4.2, (%Z.lookup_impl_witness) [symbolic = %Z.facet (constants.%Z.facet)] // CHECK:STDOUT: %Z.WithSelf.F.type: type = fn_type @Z.WithSelf.F, @Z.WithSelf(%A.as_type.loc5_4.2, %Z.facet) [symbolic = %Z.WithSelf.F.type (constants.%Z.WithSelf.F.type.9e6)] // CHECK:STDOUT: %.loc5_4.3: type = fn_type_with_self_type %Z.WithSelf.F.type, %Z.facet [symbolic = %.loc5_4.3 (constants.%.2d5)] @@ -232,7 +232,7 @@ fn F(B:! Y) { // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: %X.type = name_ref A, %A.loc4_7.2 [symbolic = %A.loc4_7.1 (constants.%A)] +// CHECK:STDOUT: %A.ref: %X.type = name_ref A, %A.loc4_15.2 [symbolic = %A.loc4_15.1 (constants.%A)] // CHECK:STDOUT: %A.as_type.loc5_4.1: type = facet_access_type %A.ref [symbolic = %A.as_type.loc5_4.2 (constants.%A.as_type)] // CHECK:STDOUT: %.loc5_4.1: type = converted %A.ref, %A.as_type.loc5_4.1 [symbolic = %A.as_type.loc5_4.2 (constants.%A.as_type)] // CHECK:STDOUT: %.loc5_4.2: @F.%Z.assoc_type (%Z.assoc_type.48d) = specific_constant imports.%Main.import_ref.4ba, @Z.WithSelf(constants.%A.as_type, constants.%A) [symbolic = %assoc0 (constants.%assoc0.f32)] @@ -296,10 +296,10 @@ fn F(B:! Y) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%A, constants.%B) { -// CHECK:STDOUT: %A.patt.loc4_7.2 => constants.%A.patt -// CHECK:STDOUT: %A.loc4_7.1 => constants.%A -// CHECK:STDOUT: %B.patt.loc4_21.2 => constants.%B.patt -// CHECK:STDOUT: %B.loc4_21.1 => constants.%B +// CHECK:STDOUT: %A.patt.loc4_15.2 => constants.%A.patt +// CHECK:STDOUT: %A.loc4_15.1 => constants.%A +// CHECK:STDOUT: %B.patt.loc4_36.2 => constants.%B.patt +// CHECK:STDOUT: %B.loc4_36.1 => constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X.WithSelf(constants.%A) { diff --git a/toolchain/check/testdata/facet/require_invalid.carbon b/toolchain/check/testdata/facet/require_invalid.carbon index 88e138b7f931..6401f0706b29 100644 --- a/toolchain/check/testdata/facet/require_invalid.carbon +++ b/toolchain/check/testdata/facet/require_invalid.carbon @@ -196,7 +196,7 @@ interface Z { // --- todo_fail_impl_mismatch_named_constraint_rewrites.carbon library "[[@TEST_NAME]]"; -interface Z { let Z0:! type; } +interface Z { let Z0: type; } constraint M { require impls Z where .Z0 = {}; diff --git a/toolchain/check/testdata/facet/runtime_value.carbon b/toolchain/check/testdata/facet/runtime_value.carbon index 5f5170a90bf0..77feac638962 100644 --- a/toolchain/check/testdata/facet/runtime_value.carbon +++ b/toolchain/check/testdata/facet/runtime_value.carbon @@ -56,7 +56,7 @@ fn F(c: C) { library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } // CHECK:STDERR: fail_compound_member_lookup_in_runtime_facet_without_value.carbon:[[@LINE+4]]:15: error: semantics TODO: `associated value lookup on runtime facet value` [SemanticsTodo] @@ -69,7 +69,7 @@ fn F(T: Z, v: T.(Z.X)); library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } // TODO: Improve this diagnostic. The problem is that T is a runtime facet @@ -86,7 +86,7 @@ fn F(T: Z, v: T.X); library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } // TODO: We should be able to get the value of `.X` from the `FacetType` of @@ -102,7 +102,7 @@ fn F(T: Z where .X = (), v: T.(Z.X)); library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } // TODO: We should be able to get the value of `.X` from the `FacetType` of diff --git a/toolchain/check/testdata/facet/self_in_interface_param.carbon b/toolchain/check/testdata/facet/self_in_interface_param.carbon index 5e2748bc4c17..763bdd7d0c1b 100644 --- a/toolchain/check/testdata/facet/self_in_interface_param.carbon +++ b/toolchain/check/testdata/facet/self_in_interface_param.carbon @@ -10,17 +10,17 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/facet/self_in_interface_param.carbon -interface I(T:! type) { - let I1:! type; +interface I(T: type) { + let I1: type; } //@dump-sem-ir-begin -fn F(T:! I(.Self) where .I1 = ()) -> T.I1 { +fn F(generic T: I(.Self) where .I1 = ()) -> T.I1 { return (); } //@dump-sem-ir-end -fn G(_:! I(.Self) where .I1 = ()) {} +fn G(generic _: I(.Self) where .I1 = ()) {} // CHECK:STDOUT: --- self_in_interface_param.carbon // CHECK:STDOUT: @@ -70,73 +70,73 @@ fn G(_:! I(.Self) where .I1 = ()) {} // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc18_7.1: %pattern_type.4af = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_7.2 (constants.%T.patt.bfa)] +// CHECK:STDOUT: %T.patt.loc18_15.1: %pattern_type.4af = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_15.2 (constants.%T.patt.bfa)] // CHECK:STDOUT: %return.param_patt: %pattern_type.cb1 = out_param_pattern [concrete = constants.%return.param_patt] -// CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern %return.param_patt, %impl.elem0.loc18_39 [concrete = constants.%return.patt] +// CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern %return.param_patt, %impl.elem0.loc18_46 [concrete = constants.%return.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: %I_where.type.6d9 = name_ref T, %T.loc18_7.2 [symbolic = %T.loc18_7.1 (constants.%T.fb1)] -// CHECK:STDOUT: %T.as_type.loc18_39.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc18_39.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc18_39.1: type = converted %T.ref, %T.as_type.loc18_39.2 [symbolic = %T.as_type.loc18_39.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc18_39.2: %I.assoc_type.901 = specific_constant @I1.%assoc0, @I.WithSelf(constants.%.Self.as_type, constants.%T.fb1) [symbolic_self = constants.%assoc0.267] -// CHECK:STDOUT: %I1.ref.loc18_39: %I.assoc_type.901 = name_ref I1, %.loc18_39.2 [symbolic_self = constants.%assoc0.267] -// CHECK:STDOUT: %facet_value.loc18_39.2: %type = facet_value constants.%T.as_type, () [symbolic = %facet_value.loc18_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %.loc18_39.3: %type = converted constants.%T.as_type, %facet_value.loc18_39.2 [symbolic = %facet_value.loc18_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %I.type.loc18_39.2: type = facet_type <@I, @I(constants.%T.as_type)> [symbolic = %I.type.loc18_39.1 (constants.%I.type.1d2)] -// CHECK:STDOUT: %T.as_type.loc18_39.3: type = facet_access_type constants.%T.fb1 [symbolic = %T.as_type.loc18_39.1 (constants.%T.as_type)] -// CHECK:STDOUT: %facet_value.loc18_39.3: %type = facet_value %T.as_type.loc18_39.3, () [symbolic = %facet_value.loc18_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %.loc18_39.4: %type = converted constants.%T.fb1, %facet_value.loc18_39.3 [symbolic = %facet_value.loc18_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %I_where.type.loc18_39.2: type = facet_type <@I, @I(constants.%T.as_type) where constants.%impl.elem0.21c = constants.%empty_tuple.type> [symbolic = %I_where.type.loc18_39.1 (constants.%I_where.type.3f6)] -// CHECK:STDOUT: %T.as_type.loc18_39.4: type = facet_access_type constants.%T.fb1 [symbolic = %T.as_type.loc18_39.1 (constants.%T.as_type)] -// CHECK:STDOUT: %facet_value.loc18_39.4: %type = facet_value %T.as_type.loc18_39.4, () [symbolic = %facet_value.loc18_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %.loc18_39.5: %type = converted constants.%T.fb1, %facet_value.loc18_39.4 [symbolic = %facet_value.loc18_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %impl.elem0.loc18_39: type = impl_witness_access constants.%I.lookup_impl_witness.962, element0 [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc18_39.6: Core.Form = init_form %impl.elem0.loc18_39 [concrete = constants.%.262] -// CHECK:STDOUT: %.loc18_19.1: type = splice_block %.loc18_19.3 [symbolic_self = constants.%I_where.type.6d9] { -// CHECK:STDOUT: %.Self.frozen.loc18_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %T.ref: %I_where.type.6d9 = name_ref T, %T.loc18_15.2 [symbolic = %T.loc18_15.1 (constants.%T.fb1)] +// CHECK:STDOUT: %T.as_type.loc18_46.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc18_46.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc18_46.1: type = converted %T.ref, %T.as_type.loc18_46.2 [symbolic = %T.as_type.loc18_46.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc18_46.2: %I.assoc_type.901 = specific_constant @I1.%assoc0, @I.WithSelf(constants.%.Self.as_type, constants.%T.fb1) [symbolic_self = constants.%assoc0.267] +// CHECK:STDOUT: %I1.ref.loc18_46: %I.assoc_type.901 = name_ref I1, %.loc18_46.2 [symbolic_self = constants.%assoc0.267] +// CHECK:STDOUT: %facet_value.loc18_46.2: %type = facet_value constants.%T.as_type, () [symbolic = %facet_value.loc18_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %.loc18_46.3: %type = converted constants.%T.as_type, %facet_value.loc18_46.2 [symbolic = %facet_value.loc18_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %I.type.loc18_46.2: type = facet_type <@I, @I(constants.%T.as_type)> [symbolic = %I.type.loc18_46.1 (constants.%I.type.1d2)] +// CHECK:STDOUT: %T.as_type.loc18_46.3: type = facet_access_type constants.%T.fb1 [symbolic = %T.as_type.loc18_46.1 (constants.%T.as_type)] +// CHECK:STDOUT: %facet_value.loc18_46.3: %type = facet_value %T.as_type.loc18_46.3, () [symbolic = %facet_value.loc18_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %.loc18_46.4: %type = converted constants.%T.fb1, %facet_value.loc18_46.3 [symbolic = %facet_value.loc18_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %I_where.type.loc18_46.2: type = facet_type <@I, @I(constants.%T.as_type) where constants.%impl.elem0.21c = constants.%empty_tuple.type> [symbolic = %I_where.type.loc18_46.1 (constants.%I_where.type.3f6)] +// CHECK:STDOUT: %T.as_type.loc18_46.4: type = facet_access_type constants.%T.fb1 [symbolic = %T.as_type.loc18_46.1 (constants.%T.as_type)] +// CHECK:STDOUT: %facet_value.loc18_46.4: %type = facet_value %T.as_type.loc18_46.4, () [symbolic = %facet_value.loc18_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %.loc18_46.5: %type = converted constants.%T.fb1, %facet_value.loc18_46.4 [symbolic = %facet_value.loc18_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %impl.elem0.loc18_46: type = impl_witness_access constants.%I.lookup_impl_witness.962, element0 [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc18_46.6: Core.Form = init_form %impl.elem0.loc18_46 [concrete = constants.%.262] +// CHECK:STDOUT: %.loc18_26.1: type = splice_block %.loc18_26.3 [symbolic_self = constants.%I_where.type.6d9] { +// CHECK:STDOUT: %.Self.frozen.loc18_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] -// CHECK:STDOUT: %.Self.ref.loc18_12: %type = name_ref .Self, %.Self.frozen.loc18_7 [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.Self.as_type.loc18_17: type = facet_access_type %.Self.ref.loc18_12 [symbolic_self = constants.%.Self.frozen.as_type.bce] -// CHECK:STDOUT: %.loc18_17: type = converted %.Self.ref.loc18_12, %.Self.as_type.loc18_17 [symbolic_self = constants.%.Self.frozen.as_type.bce] -// CHECK:STDOUT: %I.type.loc18_17.1: type = facet_type <@I, @I(constants.%.Self.frozen.as_type.bce)> [symbolic_self = constants.%I.type.0e8] -// CHECK:STDOUT: %.Self.frozen.loc18_19: %I.type.0e8 = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.edc] -// CHECK:STDOUT: %base_facet_type.loc18_19.1 = requirement_base_facet_type %I.type.loc18_17.1 [concrete] -// CHECK:STDOUT: %.Self.ref.loc18_25: %I.type.0e8 = name_ref .Self, %.Self.frozen.loc18_19 [symbolic_self = constants.%.Self.frozen.edc] -// CHECK:STDOUT: %.Self.as_type.loc18_25: type = facet_access_type %.Self.ref.loc18_25 [symbolic_self = constants.%.Self.frozen.as_type.7bb] -// CHECK:STDOUT: %.loc18_25.1: type = converted %.Self.ref.loc18_25, %.Self.as_type.loc18_25 [symbolic_self = constants.%.Self.frozen.as_type.7bb] -// CHECK:STDOUT: %.loc18_25.2: %I.assoc_type.96e = specific_constant @I1.%assoc0, @I.WithSelf(constants.%.Self.frozen.as_type.bce, constants.%.Self.frozen.edc) [symbolic_self = constants.%assoc0.cab] -// CHECK:STDOUT: %I1.ref.loc18_25: %I.assoc_type.96e = name_ref I1, %.loc18_25.2 [symbolic_self = constants.%assoc0.cab] -// CHECK:STDOUT: %impl.elem0.loc18_25.1: type = impl_witness_access constants.%I.lookup_impl_witness.d6e, element0 [symbolic_self = constants.%impl.elem0.14f] -// CHECK:STDOUT: %.loc18_32.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc18_32.2: type = converted %.loc18_32.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %rewrite.loc18_29.1 = requirement_rewrite %impl.elem0.loc18_25.1, %.loc18_32.2 [concrete] -// CHECK:STDOUT: %I.type.loc18_17.2: type = facet_type <@I, @I(constants.%.Self.as_type)> [symbolic_self = constants.%I.type.a4e] -// CHECK:STDOUT: %base_facet_type.loc18_19.2 = requirement_base_facet_type %I.type.loc18_17.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc18_25.2: type = impl_witness_access constants.%I.lookup_impl_witness.eea, element0 [symbolic_self = constants.%impl.elem0.439] -// CHECK:STDOUT: %rewrite.loc18_29.2 = requirement_rewrite %impl.elem0.loc18_25.2, %.loc18_32.2 [concrete] -// CHECK:STDOUT: %.loc18_19.2: type = where_expr [symbolic_self = constants.%I_where.type.760] { -// CHECK:STDOUT: %base_facet_type.loc18_19.2 = requirement_base_facet_type %I.type.loc18_17.2 [concrete] -// CHECK:STDOUT: %rewrite.loc18_29.2 = requirement_rewrite %impl.elem0.loc18_25.2, %.loc18_32.2 [concrete] +// CHECK:STDOUT: %.Self.ref.loc18_19: %type = name_ref .Self, %.Self.frozen.loc18_15 [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.Self.as_type.loc18_24: type = facet_access_type %.Self.ref.loc18_19 [symbolic_self = constants.%.Self.frozen.as_type.bce] +// CHECK:STDOUT: %.loc18_24: type = converted %.Self.ref.loc18_19, %.Self.as_type.loc18_24 [symbolic_self = constants.%.Self.frozen.as_type.bce] +// CHECK:STDOUT: %I.type.loc18_24.1: type = facet_type <@I, @I(constants.%.Self.frozen.as_type.bce)> [symbolic_self = constants.%I.type.0e8] +// CHECK:STDOUT: %.Self.frozen.loc18_26: %I.type.0e8 = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.edc] +// CHECK:STDOUT: %base_facet_type.loc18_26.1 = requirement_base_facet_type %I.type.loc18_24.1 [concrete] +// CHECK:STDOUT: %.Self.ref.loc18_32: %I.type.0e8 = name_ref .Self, %.Self.frozen.loc18_26 [symbolic_self = constants.%.Self.frozen.edc] +// CHECK:STDOUT: %.Self.as_type.loc18_32: type = facet_access_type %.Self.ref.loc18_32 [symbolic_self = constants.%.Self.frozen.as_type.7bb] +// CHECK:STDOUT: %.loc18_32.1: type = converted %.Self.ref.loc18_32, %.Self.as_type.loc18_32 [symbolic_self = constants.%.Self.frozen.as_type.7bb] +// CHECK:STDOUT: %.loc18_32.2: %I.assoc_type.96e = specific_constant @I1.%assoc0, @I.WithSelf(constants.%.Self.frozen.as_type.bce, constants.%.Self.frozen.edc) [symbolic_self = constants.%assoc0.cab] +// CHECK:STDOUT: %I1.ref.loc18_32: %I.assoc_type.96e = name_ref I1, %.loc18_32.2 [symbolic_self = constants.%assoc0.cab] +// CHECK:STDOUT: %impl.elem0.loc18_32.1: type = impl_witness_access constants.%I.lookup_impl_witness.d6e, element0 [symbolic_self = constants.%impl.elem0.14f] +// CHECK:STDOUT: %.loc18_39.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc18_39.2: type = converted %.loc18_39.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %rewrite.loc18_36.1 = requirement_rewrite %impl.elem0.loc18_32.1, %.loc18_39.2 [concrete] +// CHECK:STDOUT: %I.type.loc18_24.2: type = facet_type <@I, @I(constants.%.Self.as_type)> [symbolic_self = constants.%I.type.a4e] +// CHECK:STDOUT: %base_facet_type.loc18_26.2 = requirement_base_facet_type %I.type.loc18_24.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc18_32.2: type = impl_witness_access constants.%I.lookup_impl_witness.eea, element0 [symbolic_self = constants.%impl.elem0.439] +// CHECK:STDOUT: %rewrite.loc18_36.2 = requirement_rewrite %impl.elem0.loc18_32.2, %.loc18_39.2 [concrete] +// CHECK:STDOUT: %.loc18_26.2: type = where_expr [symbolic_self = constants.%I_where.type.760] { +// CHECK:STDOUT: %base_facet_type.loc18_26.2 = requirement_base_facet_type %I.type.loc18_24.2 [concrete] +// CHECK:STDOUT: %rewrite.loc18_36.2 = requirement_rewrite %impl.elem0.loc18_32.2, %.loc18_39.2 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc18_25.3: type = impl_witness_access constants.%I.lookup_impl_witness.0d5, element0 [symbolic_self = constants.%impl.elem0.21c] -// CHECK:STDOUT: %rewrite.loc18_29.3 = requirement_rewrite %impl.elem0.loc18_25.3, %.loc18_32.2 [concrete] -// CHECK:STDOUT: %.loc18_19.3: type = where_expr [symbolic_self = constants.%I_where.type.6d9] { -// CHECK:STDOUT: %base_facet_type.loc18_19.2 = requirement_base_facet_type %I.type.loc18_17.2 [concrete] -// CHECK:STDOUT: %rewrite.loc18_29.3 = requirement_rewrite %impl.elem0.loc18_25.3, %.loc18_32.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc18_32.3: type = impl_witness_access constants.%I.lookup_impl_witness.0d5, element0 [symbolic_self = constants.%impl.elem0.21c] +// CHECK:STDOUT: %rewrite.loc18_36.3 = requirement_rewrite %impl.elem0.loc18_32.3, %.loc18_39.2 [concrete] +// CHECK:STDOUT: %.loc18_26.3: type = where_expr [symbolic_self = constants.%I_where.type.6d9] { +// CHECK:STDOUT: %base_facet_type.loc18_26.2 = requirement_base_facet_type %I.type.loc18_24.2 [concrete] +// CHECK:STDOUT: %rewrite.loc18_36.3 = requirement_rewrite %impl.elem0.loc18_32.3, %.loc18_39.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc18_7.2: %I_where.type.6d9 = symbolic_binding T, 0 [symbolic = %T.loc18_7.1 (constants.%T.fb1)] +// CHECK:STDOUT: %T.loc18_15.2: %I_where.type.6d9 = symbolic_binding T, 0 [symbolic = %T.loc18_15.1 (constants.%T.fb1)] // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc18_7.2: %I_where.type.6d9) { -// CHECK:STDOUT: %T.patt.loc18_7.2: %pattern_type.4af = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_7.2 (constants.%T.patt.bfa)] -// CHECK:STDOUT: %T.loc18_7.1: %I_where.type.6d9 = symbolic_binding T, 0 [symbolic = %T.loc18_7.1 (constants.%T.fb1)] -// CHECK:STDOUT: %T.as_type.loc18_39.1: type = facet_access_type %T.loc18_7.1 [symbolic = %T.as_type.loc18_39.1 (constants.%T.as_type)] -// CHECK:STDOUT: %facet_value.loc18_39.1: %type = facet_value %T.as_type.loc18_39.1, () [symbolic = %facet_value.loc18_39.1 (constants.%facet_value)] -// CHECK:STDOUT: %I.type.loc18_39.1: type = facet_type <@I, @I(%T.as_type.loc18_39.1)> [symbolic = %I.type.loc18_39.1 (constants.%I.type.1d2)] -// CHECK:STDOUT: %I_where.type.loc18_39.1: type = facet_type <@I, @I(%T.as_type.loc18_39.1) where constants.%impl.elem0.21c = constants.%empty_tuple.type> [symbolic = %I_where.type.loc18_39.1 (constants.%I_where.type.3f6)] +// CHECK:STDOUT: generic fn @F(%T.loc18_15.2: %I_where.type.6d9) { +// CHECK:STDOUT: %T.patt.loc18_15.2: %pattern_type.4af = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_15.2 (constants.%T.patt.bfa)] +// CHECK:STDOUT: %T.loc18_15.1: %I_where.type.6d9 = symbolic_binding T, 0 [symbolic = %T.loc18_15.1 (constants.%T.fb1)] +// CHECK:STDOUT: %T.as_type.loc18_46.1: type = facet_access_type %T.loc18_15.1 [symbolic = %T.as_type.loc18_46.1 (constants.%T.as_type)] +// CHECK:STDOUT: %facet_value.loc18_46.1: %type = facet_value %T.as_type.loc18_46.1, () [symbolic = %facet_value.loc18_46.1 (constants.%facet_value)] +// CHECK:STDOUT: %I.type.loc18_46.1: type = facet_type <@I, @I(%T.as_type.loc18_46.1)> [symbolic = %I.type.loc18_46.1 (constants.%I.type.1d2)] +// CHECK:STDOUT: %I_where.type.loc18_46.1: type = facet_type <@I, @I(%T.as_type.loc18_46.1) where constants.%impl.elem0.21c = constants.%empty_tuple.type> [symbolic = %I_where.type.loc18_46.1 (constants.%I_where.type.3f6)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -152,11 +152,11 @@ fn G(_:! I(.Self) where .I1 = ()) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.fb1) { -// CHECK:STDOUT: %T.patt.loc18_7.2 => constants.%T.patt.bfa -// CHECK:STDOUT: %T.loc18_7.1 => constants.%T.fb1 -// CHECK:STDOUT: %T.as_type.loc18_39.1 => constants.%T.as_type -// CHECK:STDOUT: %facet_value.loc18_39.1 => constants.%facet_value -// CHECK:STDOUT: %I.type.loc18_39.1 => constants.%I.type.1d2 -// CHECK:STDOUT: %I_where.type.loc18_39.1 => constants.%I_where.type.3f6 +// CHECK:STDOUT: %T.patt.loc18_15.2 => constants.%T.patt.bfa +// CHECK:STDOUT: %T.loc18_15.1 => constants.%T.fb1 +// CHECK:STDOUT: %T.as_type.loc18_46.1 => constants.%T.as_type +// CHECK:STDOUT: %facet_value.loc18_46.1 => constants.%facet_value +// CHECK:STDOUT: %I.type.loc18_46.1 => constants.%I.type.1d2 +// CHECK:STDOUT: %I_where.type.loc18_46.1 => constants.%I_where.type.3f6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/tuple_and_struct_type_literal.carbon b/toolchain/check/testdata/facet/tuple_and_struct_type_literal.carbon index f15935e5e0b0..f9e5828bf8ca 100644 --- a/toolchain/check/testdata/facet/tuple_and_struct_type_literal.carbon +++ b/toolchain/check/testdata/facet/tuple_and_struct_type_literal.carbon @@ -15,99 +15,99 @@ library "[[@TEST_NAME]]"; interface Y {} interface Z { - let X:! Y; + let X: Y; } impl () as Y {} // The tuple literal converts implicitly to a type, and then to a facet value // satisfying `Y`. -impl forall [T:! type] T as Z where .X = () {} +impl forall [T: type] T as Z where .X = () {} // --- complex_tuple_literal_to_facet_value.carbon library "[[@TEST_NAME]]"; interface Y {} interface Z { - let X:! Y; + let X: Y; } impl ((), {}) as Y {} // The tuple literal converts implicitly to a type, and then to a facet value // satisfying `Y`. -impl forall [T:! type] T as Z where .X = ((), {}) {} +impl forall [T: type] T as Z where .X = ((), {}) {} // --- fail_mismatch_tuple_literal_to_facet_value.carbon library "[[@TEST_NAME]]"; interface Y {} interface Z { - let X:! Y; + let X: Y; } impl ((), {}) as Y {} -// CHECK:STDERR: fail_mismatch_tuple_literal_to_facet_value.carbon:[[@LINE+4]]:42: error: cannot convert type `({}, {})` into type implementing `Y` [ConversionFailureTypeToFacet] -// CHECK:STDERR: impl forall [T:! type] T as Z where .X = ({}, {}) {} -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_mismatch_tuple_literal_to_facet_value.carbon:[[@LINE+4]]:41: error: cannot convert type `({}, {})` into type implementing `Y` [ConversionFailureTypeToFacet] +// CHECK:STDERR: impl forall [T: type] T as Z where .X = ({}, {}) {} +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] T as Z where .X = ({}, {}) {} +impl forall [T: type] T as Z where .X = ({}, {}) {} // --- struct_literal_to_facet_value.carbon library "[[@TEST_NAME]]"; interface Y {} interface Z { - let X:! Y; + let X: Y; } impl {} as Y {} // The struct literal converts implicitly to a type, and then to a facet value // satisfying `Y`. -impl forall [T:! type] T as Z where .X = {} {} +impl forall [T: type] T as Z where .X = {} {} // --- complex_struct_literal_to_facet_value.carbon library "[[@TEST_NAME]]"; interface Y {} interface Z { - let X:! Y; + let X: Y; } impl {.a: (), .b: {}} as Y {} // The struct literal converts implicitly to a type, and then to a facet value // satisfying `Y`. -impl forall [T:! type] T as Z where .X = {.a: (), .b: {}} {} +impl forall [T: type] T as Z where .X = {.a: (), .b: {}} {} // --- fail_mismatch_struct_literal_to_facet_value.carbon library "[[@TEST_NAME]]"; interface Y {} interface Z { - let X:! Y; + let X: Y; } impl {.a: (), .b: {}} as Y {} -// CHECK:STDERR: fail_mismatch_struct_literal_to_facet_value.carbon:[[@LINE+4]]:42: error: cannot convert type `{.a: {}, .b: {}}` into type implementing `Y` [ConversionFailureTypeToFacet] -// CHECK:STDERR: impl forall [T:! type] T as Z where .X = {.a: {}, .b: {}} {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_mismatch_struct_literal_to_facet_value.carbon:[[@LINE+4]]:41: error: cannot convert type `{.a: {}, .b: {}}` into type implementing `Y` [ConversionFailureTypeToFacet] +// CHECK:STDERR: impl forall [T: type] T as Z where .X = {.a: {}, .b: {}} {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] T as Z where .X = {.a: {}, .b: {}} {} +impl forall [T: type] T as Z where .X = {.a: {}, .b: {}} {} // --- struct_literal_to_facet_type_parameter.carbon library "[[@TEST_NAME]]"; interface Z {} -impl forall [U:! type] U as Z {} +impl forall [U: type] U as Z {} constraint N {} -fn InterfaceParam(unused U:! Z) {} -fn ConstraintParam(unused U:! N) {} +fn InterfaceParam(unused generic U: Z) {} +fn ConstraintParam(unused generic U: N) {} fn F() { InterfaceParam({}); @@ -118,12 +118,12 @@ fn F() { library "[[@TEST_NAME]]"; interface Z {} -impl forall [U:! type] U as Z {} +impl forall [U: type] U as Z {} constraint N {} -fn InterfaceParam(unused U:! Z) {} -fn ConstraintParam(unused U:! N) {} +fn InterfaceParam(unused generic U: Z) {} +fn ConstraintParam(unused generic U: N) {} fn F() { // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE+10]]:3: error: cannot implicitly convert non-type value of type `{.a: ()}` into type implementing `Z` [ConversionFailureNonTypeToFacet] @@ -132,9 +132,9 @@ fn F() { // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE+7]]:3: note: type `{.a: ()}` does not implement interface `Core.ImplicitAs(Z)` [MissingImplInMemberAccessInContext] // CHECK:STDERR: InterfaceParam({.a = ()}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE-10]]:26: note: initializing generic parameter `U` declared here [InitializingGenericParam] - // CHECK:STDERR: fn InterfaceParam(unused U:! Z) {} - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE-10]]:34: note: initializing generic parameter `U` declared here [InitializingGenericParam] + // CHECK:STDERR: fn InterfaceParam(unused generic U: Z) {} + // CHECK:STDERR: ^~~~ // CHECK:STDERR: InterfaceParam({.a = ()}); // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE+10]]:3: error: cannot implicitly convert non-type value of type `{.a: ()}` into type implementing `N` [ConversionFailureNonTypeToFacet] @@ -143,9 +143,9 @@ fn F() { // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE+7]]:3: note: type `{.a: ()}` does not implement interface `Core.ImplicitAs(N)` [MissingImplInMemberAccessInContext] // CHECK:STDERR: ConstraintParam({.a = ()}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE-20]]:27: note: initializing generic parameter `U` declared here [InitializingGenericParam] - // CHECK:STDERR: fn ConstraintParam(unused U:! N) {} - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE-20]]:35: note: initializing generic parameter `U` declared here [InitializingGenericParam] + // CHECK:STDERR: fn ConstraintParam(unused generic U: N) {} + // CHECK:STDERR: ^~~~ // CHECK:STDERR: ConstraintParam({.a = ()}); } @@ -154,12 +154,12 @@ fn F() { library "[[@TEST_NAME]]"; interface Z {} -impl forall [U:! type] U as Z {} +impl forall [U: type] U as Z {} constraint N {} -fn InterfaceParam(unused U:! Z) {} -fn ConstraintParam(unused U:! N) {} +fn InterfaceParam(unused generic U: Z) {} +fn ConstraintParam(unused generic U: N) {} fn F() { InterfaceParam(()); @@ -176,14 +176,14 @@ fn F() { // --- struct_literal_to_generic_facet_type_parameter_with_concrete_specific.carbon library "[[@TEST_NAME]]"; -interface Z(U:! type) {} -impl forall [T:! type, U:! type] U as Z(T) {} +interface Z(U: type) {} +impl forall [T: type, U: type] U as Z(T) {} -constraint N(U:! type) {} +constraint N(U: type) {} class C; -fn InterfaceParam(unused U:! Z(C)) {} -fn ConstraintParam(unused U:! N(C)) {} +fn InterfaceParam(unused generic U: Z(C)) {} +fn ConstraintParam(unused generic U: N(C)) {} fn F() { InterfaceParam({}); @@ -193,14 +193,14 @@ fn F() { // --- tuple_literal_to_generic_facet_type_parameter_with_concrete_specific.carbon library "[[@TEST_NAME]]"; -interface Z(U:! type) {} -impl forall [T:! type, U:! type] U as Z(T) {} +interface Z(U: type) {} +impl forall [T: type, U: type] U as Z(T) {} -constraint N(U:! type) {} +constraint N(U: type) {} class C; -fn InterfaceParam(unused U:! Z(C)) {} -fn ConstraintParam(unused U:! N(C)) {} +fn InterfaceParam(unused generic U: Z(C)) {} +fn ConstraintParam(unused generic U: N(C)) {} fn F() { InterfaceParam(()); @@ -217,15 +217,15 @@ fn F() { // --- struct_literal_to_generic_facet_type_parameter_with_symbolic_specific.carbon library "[[@TEST_NAME]]"; -interface Z(U:! type) {} -impl forall [T:! type, U:! type] U as Z(T) {} +interface Z(U: type) {} +impl forall [T: type, U: type] U as Z(T) {} -constraint N(U:! type) {} +constraint N(U: type) {} -fn InterfaceParam(T:! type, unused U:! Z(T)) {} -fn ConstraintParam(T:! type, unused U:! N(T)) {} +fn InterfaceParam(generic T: type, unused generic U: Z(T)) {} +fn ConstraintParam(generic T: type, unused generic U: N(T)) {} -fn F(T:! type) { +fn F(generic T: type) { InterfaceParam((), {}); ConstraintParam((), {}); @@ -236,15 +236,15 @@ fn F(T:! type) { // --- tuple_literal_to_generic_facet_type_parameter_with_symbolic_specific.carbon library "[[@TEST_NAME]]"; -interface Z(U:! type) {} -impl forall [T:! type, U:! type] U as Z(T) {} +interface Z(U: type) {} +impl forall [T: type, U: type] U as Z(T) {} -constraint N(U:! type) {} +constraint N(U: type) {} -fn InterfaceParam(T:! type, unused U:! Z(T)) {} -fn ConstraintParam(T:! type, unused U:! N(T)) {} +fn InterfaceParam(generic T: type, unused generic U: Z(T)) {} +fn ConstraintParam(generic T: type, unused generic U: N(T)) {} -fn F(T:! type) { +fn F(generic T: type) { InterfaceParam({}, ()); ConstraintParam({}, ()); diff --git a/toolchain/check/testdata/facet/tuple_and_struct_type_value.carbon b/toolchain/check/testdata/facet/tuple_and_struct_type_value.carbon index 122c84859d81..e455e78154f4 100644 --- a/toolchain/check/testdata/facet/tuple_and_struct_type_value.carbon +++ b/toolchain/check/testdata/facet/tuple_and_struct_type_value.carbon @@ -14,14 +14,14 @@ library "[[@TEST_NAME]]"; interface Z {} -impl forall [U:! type] U as Z {} +impl forall [U: type] U as Z {} constraint N {} -fn InterfaceParam(unused U:! Z) {} -fn ConstraintParam(unused U:! N) {} +fn InterfaceParam(unused generic U: Z) {} +fn ConstraintParam(unused generic U: N) {} -fn F(T:! (type, ), U:! type, Empty:! ()) { +fn F(generic T: (type, ), generic U: type, generic Empty: ()) { // Passes a symbolic binding of type TupleType. InterfaceParam(T); ConstraintParam(T); @@ -34,7 +34,7 @@ fn F(T:! (type, ), U:! type, Empty:! ()) { ConstraintParam(Empty); } -fn G(T:! (type, )) { +fn G(generic T: (type, )) { F(T, (T.0, ), ()); } @@ -46,14 +46,14 @@ fn H() { library "[[@TEST_NAME]]"; interface Z {} -impl forall [U:! type] U as Z {} +impl forall [U: type] U as Z {} constraint N {} -fn InterfaceParam(unused U:! Z) {} -fn ConstraintParam(unused U:! N) {} +fn InterfaceParam(unused generic U: Z) {} +fn ConstraintParam(unused generic U: N) {} -fn F(T:! {}) { +fn F(generic T: {}) { // Passes a symbolic binding of type StructType. InterfaceParam(T); ConstraintParam(T); @@ -67,23 +67,23 @@ fn G() { library "[[@TEST_NAME]]"; interface Z {} -impl forall [U:! type] U as Z {} +impl forall [U: type] U as Z {} constraint N {} -fn InterfaceParam(unused U:! Z) {} -fn ConstraintParam(unused U:! N) {} +fn InterfaceParam(unused generic U: Z) {} +fn ConstraintParam(unused generic U: N) {} -fn F(T:! {.a: type}) { +fn F(generic T: {.a: type}) { // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE+10]]:3: error: cannot implicitly convert non-type value of type `{.a: type}` into type implementing `Z` [ConversionFailureNonTypeToFacet] // CHECK:STDERR: InterfaceParam(T); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE+7]]:3: note: type `{.a: type}` does not implement interface `Core.ImplicitAs(Z)` [MissingImplInMemberAccessInContext] // CHECK:STDERR: InterfaceParam(T); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE-10]]:26: note: initializing generic parameter `U` declared here [InitializingGenericParam] - // CHECK:STDERR: fn InterfaceParam(unused U:! Z) {} - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE-10]]:34: note: initializing generic parameter `U` declared here [InitializingGenericParam] + // CHECK:STDERR: fn InterfaceParam(unused generic U: Z) {} + // CHECK:STDERR: ^~~~ // CHECK:STDERR: InterfaceParam(T); // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE+10]]:3: error: cannot implicitly convert non-type value of type `{.a: type}` into type implementing `N` [ConversionFailureNonTypeToFacet] @@ -92,9 +92,9 @@ fn F(T:! {.a: type}) { // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE+7]]:3: note: type `{.a: type}` does not implement interface `Core.ImplicitAs(N)` [MissingImplInMemberAccessInContext] // CHECK:STDERR: ConstraintParam(T); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE-20]]:27: note: initializing generic parameter `U` declared here [InitializingGenericParam] - // CHECK:STDERR: fn ConstraintParam(unused U:! N) {} - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE-20]]:35: note: initializing generic parameter `U` declared here [InitializingGenericParam] + // CHECK:STDERR: fn ConstraintParam(unused generic U: N) {} + // CHECK:STDERR: ^~~~ // CHECK:STDERR: ConstraintParam(T); } diff --git a/toolchain/check/testdata/facet/validate_impl_constraints.carbon b/toolchain/check/testdata/facet/validate_impl_constraints.carbon index 875cd87598d1..1ca222b69f98 100644 --- a/toolchain/check/testdata/facet/validate_impl_constraints.carbon +++ b/toolchain/check/testdata/facet/validate_impl_constraints.carbon @@ -13,21 +13,21 @@ // --- fail_todo_self_impls_modifies_assoc_constant.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } -fn F(unused T:! I where .X = ()) {} +fn F(unused generic T: I where .X = ()) {} constraint N { extend require impls I where .X = (); } -fn G(T:! I where .Self impls N) { +fn G(generic T: I where .Self impls N) { // CHECK:STDERR: fail_todo_self_impls_modifies_assoc_constant.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `I where .Self impls N` into type implementing `I where .(I.X) = ()` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_todo_self_impls_modifies_assoc_constant.carbon:[[@LINE-10]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I where .X = ()) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_self_impls_modifies_assoc_constant.carbon:[[@LINE-10]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I where .X = ()) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -35,21 +35,21 @@ fn G(T:! I where .Self impls N) { // --- fail_self_impls_modifies_assoc_constant_type_differs.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } -fn F(unused T:! I where .X = ()) {} +fn F(unused generic T: I where .X = ()) {} constraint N { extend require impls I where .X = {}; } -fn G(T:! I where .Self impls N) { +fn G(generic T: I where .Self impls N) { // CHECK:STDERR: fail_self_impls_modifies_assoc_constant_type_differs.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `I where .Self impls N` into type implementing `I where .(I.X) = ()` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_self_impls_modifies_assoc_constant_type_differs.carbon:[[@LINE-10]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I where .X = ()) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_self_impls_modifies_assoc_constant_type_differs.carbon:[[@LINE-10]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I where .X = ()) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -57,12 +57,12 @@ fn G(T:! I where .Self impls N) { // --- todo_fail_where_impls_tests_associated_constant_of_generic_type_non_final_impl.carbon library "[[@TEST_NAME]]"; -class C(U:! type) {} +class C(U: type) {} // C(U) impls M if U impls L. interface L {} -interface M { let M0:! type; } -impl forall [U:! L] C(U) as M where .M0 = {} {} +interface M { let M0: type; } +impl forall [U: L] C(U) as M where .M0 = {} {} constraint M0IsStruct { extend require impls M where .M0 = {}; @@ -71,9 +71,9 @@ constraint M0IsStruct { // U requires that C(.Self) impls M. // - C(.Self) impls M can be rewritten as C(U) impls M. // - C(U) impls M if U impls L => Requires U impls L. -fn F(unused U:! type where C(.Self) impls M0IsStruct) {} +fn F(unused generic U: type where C(.Self) impls M0IsStruct) {} -fn G(T:! L) { +fn G(generic T: L) { // We have no final impl for `C(T) as M`, so we don't know the value of // `(C(T) as M).M0` concretely, so we don't know that it is `{}` and we can't // convert assuming it is. @@ -86,12 +86,12 @@ fn G(T:! L) { // --- where_impls_tests_associated_constant_of_generic_type.carbon library "[[@TEST_NAME]]"; -class C(U:! type) {} +class C(U: type) {} // C(U) impls M if U impls L. interface L {} -interface M { let M0:! type; } -final impl forall [U:! L] C(U) as M where .M0 = {} {} +interface M { let M0: type; } +final impl forall [U: L] C(U) as M where .M0 = {} {} constraint M0IsStruct { extend require impls M where .M0 = {}; @@ -100,21 +100,21 @@ constraint M0IsStruct { // U requires that C(.Self) impls M. // - C(.Self) impls M can be rewritten as C(U) impls M. // - C(U) impls M if U impls L => Requires U impls L. -fn F(unused U:! type where C(.Self) impls M0IsStruct) {} +fn F(unused generic U: type where C(.Self) impls M0IsStruct) {} -fn G(T:! L) { +fn G(generic T: L) { F(T); } // --- todo_fail_where_impls_tests_associated_constant_of_generic_type_type_differs.carbon library "[[@TEST_NAME]]"; -class C(U:! type) {} +class C(U: type) {} // C(U) impls M if U impls L. interface L {} -interface M { let M0:! type; } -final impl forall [U:! L] C(U) as M where .M0 = () {} +interface M { let M0: type; } +final impl forall [U: L] C(U) as M where .M0 = () {} constraint M0IsStruct { extend require impls M where .M0 = {}; @@ -123,9 +123,9 @@ constraint M0IsStruct { // U requires that C(.Self) impls M. // - C(.Self) impls M can be rewritten as C(U) impls M. // - C(U) impls M if U impls L => Requires U impls L. -fn F(unused U:! type where C(.Self) impls M0IsStruct) {} +fn F(unused generic U: type where C(.Self) impls M0IsStruct) {} -fn G(T:! L) { +fn G(generic T: L) { // F requires .M0 = {}, but the final impl provides .M0 = (). // // TODO: This should fail. @@ -139,19 +139,19 @@ class C {} // C impls M(U) if U impls L. interface L {} -interface M(U:! type) { let M0:! type; } -impl forall [U:! L] C as M(U) where .M0 = {} {} +interface M(U: type) { let M0: type; } +impl forall [U: L] C as M(U) where .M0 = {} {} -constraint M0IsStruct(PeriodSelf:! type) { +constraint M0IsStruct(PeriodSelf: type) { extend require impls M(PeriodSelf) where .M0 = {}; } // U requires that C impls M(.Self). // - C impls M(.Self) can be rewritten as C impls M(U). // - C impls M(U) if U impls L => Requires U impls L. -fn F(unused U:! type where C impls M0IsStruct(.Self)) {} +fn F(unused generic U: type where C impls M0IsStruct(.Self)) {} -fn G(T:! L) { +fn G(generic T: L) { // We have no final impl for `C as M(T)`, so we don't know the value of // `(C as M(T)).M0` concretely, so we don't know that it is `{}` and we can't // convert assuming it is. @@ -167,19 +167,19 @@ class C {} // C impls M(U) if U impls L. interface L {} -interface M(U:! type) { let M0:! type; } -final impl forall [U:! L] C as M(U) where .M0 = {} {} +interface M(U: type) { let M0: type; } +final impl forall [U: L] C as M(U) where .M0 = {} {} -constraint M0IsStruct(PeriodSelf:! type) { +constraint M0IsStruct(PeriodSelf: type) { extend require impls M(PeriodSelf) where .M0 = {}; } // U requires that C impls M(.Self). // - C impls M(.Self) can be rewritten as C impls M(U). // - C impls M(U) if U impls L => Requires U impls L. -fn F(unused U:! type where C impls M0IsStruct(.Self)) {} +fn F(unused generic U: type where C impls M0IsStruct(.Self)) {} -fn G(T:! L) { +fn G(generic T: L) { F(T); } @@ -190,19 +190,19 @@ class C {} // C impls M(U) if U impls L. interface L {} -interface M(U:! type) { let M0:! type; } -final impl forall [U:! L] C as M(U) where .M0 = () {} +interface M(U: type) { let M0: type; } +final impl forall [U: L] C as M(U) where .M0 = () {} -constraint M0IsStruct(PeriodSelf:! type) { +constraint M0IsStruct(PeriodSelf: type) { extend require impls M(PeriodSelf) where .M0 = {}; } // U requires that C impls M(.Self). // - C impls M(.Self) can be rewritten as C impls M(U). // - C impls M(U) if U impls L => Requires U impls L. -fn F(unused U:! type where C impls M0IsStruct(.Self)) {} +fn F(unused generic U: type where C impls M0IsStruct(.Self)) {} -fn G(T:! L) { +fn G(generic T: L) { // F requires that .M0 = {} but the final impl provides that .M0 = (). // // TODO: This should fail. @@ -213,11 +213,11 @@ fn G(T:! L) { library "[[@TEST_NAME]]"; interface Z {} -interface I(T:! type) {} +interface I(T: type) {} -fn F(unused T:! I(.Self) where .Self impls Z) {} +fn F(unused generic T: I(.Self) where .Self impls Z) {} -fn G(T:! Z & I(.Self)) { +fn G(generic T: Z & I(.Self)) { F(T); } @@ -225,28 +225,28 @@ fn G(T:! Z & I(.Self)) { library "[[@TEST_NAME]]"; interface Z {} -interface I(T:! Z) {} +interface I(T: Z) {} // TODO: I(.Self) introduces an implied constraint `.Self impls Z`, which is // satisfied and checked at the end of the fn signature. // -// CHECK:STDERR: fail_todo_self_in_interface_generic_param_constrained.carbon:[[@LINE+7]]:17: error: cannot convert type `.Self` that implements `type` into type implementing `Z` [ConversionFailureFacetToFacet] -// CHECK:STDERR: fn F(unused T:! I(.Self) where .Self impls Z) {} -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_todo_self_in_interface_generic_param_constrained.carbon:[[@LINE+7]]:24: error: cannot convert type `.Self` that implements `type` into type implementing `Z` [ConversionFailureFacetToFacet] +// CHECK:STDERR: fn F(unused generic T: I(.Self) where .Self impls Z) {} +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_self_in_interface_generic_param_constrained.carbon:[[@LINE-8]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] -// CHECK:STDERR: interface I(T:! Z) {} -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: interface I(T: Z) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -fn F(unused T:! I(.Self) where .Self impls Z) {} +fn F(unused generic T: I(.Self) where .Self impls Z) {} -// CHECK:STDERR: fail_todo_self_in_interface_generic_param_constrained.carbon:[[@LINE+7]]:14: error: cannot convert type `.Self` that implements `type` into type implementing `Z` [ConversionFailureFacetToFacet] -// CHECK:STDERR: fn G(T:! Z & I(.Self)) { -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_todo_self_in_interface_generic_param_constrained.carbon:[[@LINE+7]]:21: error: cannot convert type `.Self` that implements `type` into type implementing `Z` [ConversionFailureFacetToFacet] +// CHECK:STDERR: fn G(generic T: Z & I(.Self)) { +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_self_in_interface_generic_param_constrained.carbon:[[@LINE-17]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] -// CHECK:STDERR: interface I(T:! Z) {} -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: interface I(T: Z) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -fn G(T:! Z & I(.Self)) { +fn G(generic T: Z & I(.Self)) { F(T); } @@ -255,14 +255,14 @@ library "[[@TEST_NAME]]"; interface Z {} interface Y {} -interface X(T:! Z & Y) {} +interface X(T: Z & Y) {} constraint N { require impls Y; } // The RHS of `where` can see the extend constraints on the LHS of `where`. -fn F(_:! Z & N where .Self impls X(.Self)) {} +fn F(generic _: Z & N where .Self impls X(.Self)) {} fn G() { class C; @@ -277,16 +277,16 @@ library "[[@TEST_NAME]]"; interface Z {} interface Y {} -interface X(T:! Z & Y) {} +interface X(T: Z & Y) {} constraint N { require impls Y; } -class R(T:! Z & Y); +class R(T: Z & Y); // The RHS of `where` can see the extend constraints on the LHS of `where`. -fn F(_:! Z & N where R(.Self) impls X(.Self)) {} +fn F(generic _: Z & N where R(.Self) impls X(.Self)) {} fn G() { class C; @@ -300,14 +300,14 @@ fn G() { library "[[@TEST_NAME]]"; interface I { - let I1:! type; + let I1: type; } -interface J(T:! I) {} +interface J(T: I) {} // There is a .Self reference on the LHS and RHS of the `impls` constraint, // which must be replaced, each with `C as I` -fn F(_:! I where .I1 impls J(.Self)) {} +fn F(generic _: I where .I1 impls J(.Self)) {} fn G() { class C; @@ -323,11 +323,11 @@ fn G() { library "[[@TEST_NAME]]"; interface I { - let I1:! type; + let I1: type; } interface J {} -fn F(_:! I where .I1 impls J) {} +fn F(generic _: I where .I1 impls J) {} fn G() { class C; @@ -343,9 +343,9 @@ fn G() { // CHECK:STDERR: fail_concrete_witness_without_impl.carbon:[[@LINE+7]]:3: error: cannot convert type `C` into type implementing `I where .(I.I1) impls J` [ConversionFailureTypeToFacet] // CHECK:STDERR: F(C); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_concrete_witness_without_impl.carbon:[[@LINE-16]]:6: note: initializing generic parameter `_` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(_:! I where .I1 impls J) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_concrete_witness_without_impl.carbon:[[@LINE-16]]:14: note: initializing generic parameter `_` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(generic _: I where .I1 impls J) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(C); } @@ -356,14 +356,14 @@ library "[[@TEST_NAME]]"; interface K {} interface J {} interface I { - let I1:! type; + let I1: type; } -fn F(unused U:! I & J where .I1 impls K) {} +fn F(unused generic U: I & J where .I1 impls K) {} -impl forall [T:! type] T as J {} +impl forall [T: type] T as J {} -fn G(T:! I where .I1 impls K) { +fn G(generic T: I where .I1 impls K) { // Replaces `.Self` with `T`, which converts `T` to `I & J`. Doing so has to // invent a witness for `J`, and this tests we do so without losing the // information that `.I1 impls K`. @@ -373,16 +373,16 @@ fn G(T:! I where .I1 impls K) { // --- find_witness_from_facet_in_lookup_target_facet_type.carbon library "[[@TEST_NAME]]"; -class D(T:! type) {} +class D(T: type) {} class E {} -interface X(T:! type) {} -interface V(T:! type) {} +interface X(T: type) {} +interface V(T: type) {} -constraint W(T:! type) { +constraint W(T: type) { require Self impls X(T); } -fn F(B:! W(E), C:! type where E impls V(.Self)) { +fn F(generic B: W(E), generic C: type where E impls V(.Self)) { // Find a witness for `E as X(E)` from the facet `B`. E as (V(C) where B impls X(.Self)); } @@ -390,16 +390,16 @@ fn F(B:! W(E), C:! type where E impls V(.Self)) { // --- find_witness_from_facet_in_specific_in_lookup_target_facet_type.carbon library "[[@TEST_NAME]]"; -class D(T:! type) {} +class D(T: type) {} class E {} -interface X(T:! type) {} -interface V(T:! type) {} +interface X(T: type) {} +interface V(T: type) {} -constraint W(T:! type) { +constraint W(T: type) { require D(Self) impls X(T); } -fn F(B:! W(E), C:! type where E impls V(.Self)) { +fn F(generic B: W(E), generic C: type where E impls V(.Self)) { // Find a witness for `E as X(E)` from the facet `B`. E as (V(C) where D(B) impls X(.Self)); } @@ -411,11 +411,11 @@ interface X {} interface Y {} interface Z { // A type type, which has no witnesses. - let Z1:! type; + let Z1: type; // A facet type, but not one that provides a witness for `.Z2 as Y`. - let Z2:! type where .Self impls X; + let Z2: type where .Self impls X; } -fn F(T:! Z where .Z1 impls Y and .Z2 impls Y) { +fn F(generic T: Z where .Z1 impls Y and .Z2 impls Y) { // `T.Z1` is a `type` so this query self is ImplWitnessAccess(Z1). T.Z1 as Y; // `T.Z2` has a facet type so this query self is FacetAccessType(ImplWitnessAccess(Z2)). @@ -425,15 +425,15 @@ fn F(T:! Z where .Z1 impls Y and .Z2 impls Y) { // --- impl_witness_access_has_access.carbon library "[[@TEST_NAME]]"; -class C(T:! type) {} +class C(T: type) {} interface Y {} interface Z { // Note that the facet type is not an exact type match for `Y` so that we // cause an actual impl lookup to happen when we convert `.Z1` to `Y`. - let Z1:! type where .Self impls Y and C(.Self) impls Y; + let Z1: type where .Self impls Y and C(.Self) impls Y; } -fn F(T:! Z) { +fn F(generic T: Z) { T.Z1 as Y; C(T.Z1) as Y; } @@ -442,7 +442,7 @@ fn F(T:! Z) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } interface Y {} @@ -450,9 +450,9 @@ constraint GivesY { require impls Y; } -class C(T:! type); +class C(T: type); -fn F(T:! Z where C(.Self) impls GivesY) { +fn F(generic T: Z where C(.Self) impls GivesY) { C(T) as Y; } @@ -460,7 +460,7 @@ fn F(T:! Z where C(.Self) impls GivesY) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } interface Y {} @@ -472,6 +472,6 @@ constraint GivesY { // `.Self impls Y` through the named constraint. It ensures that the `.Self` is // correctly replaced by `T` in order to compare equal with `T.Z1` in impl // lookup. -fn F(T:! Z where .Z1 impls GivesY) { +fn F(generic T: Z where .Z1 impls GivesY) { T.Z1 as Y; } diff --git a/toolchain/check/testdata/facet/validate_rewrite_constraints.carbon b/toolchain/check/testdata/facet/validate_rewrite_constraints.carbon index 00bc65779d2e..0aa076d2af9e 100644 --- a/toolchain/check/testdata/facet/validate_rewrite_constraints.carbon +++ b/toolchain/check/testdata/facet/validate_rewrite_constraints.carbon @@ -13,24 +13,24 @@ // --- facet_value.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } -fn F(unused T:! I where .X = ()) {} +fn F(unused generic T: I where .X = ()) {} -fn G(T:! I where .X = ()) { +fn G(generic T: I where .X = ()) { F(T); } // --- generic_interface_facet_value.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { let X:! type; } +interface I(T: type) { let X: type; } class C; -final impl forall [T:! type] T as I(()) where .X = () {} -final impl forall [T:! type] T as I({}) where .X = {} {} +final impl forall [T: type] T as I(()) where .X = () {} +final impl forall [T: type] T as I({}) where .X = {} {} -fn F(U:! type, unused T:! I(U) where .X = ()) {} +fn F(generic U: type, unused generic T: I(U) where .X = ()) {} fn G() { F((), C); } @@ -38,13 +38,13 @@ fn G() { // --- fail_generic_interface_facet_value_wrong_specific_impl.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { let X:! type; } +interface I(T: type) { let X: type; } class C; -final impl forall [T:! type] T as I(()) where .X = () {} -final impl forall [T:! type] T as I({}) where .X = {} {} +final impl forall [T: type] T as I(()) where .X = () {} +final impl forall [T: type] T as I({}) where .X = {} {} -fn F(U:! type, unused T:! I(U) where .X = ()) {} +fn F(generic U: type, unused generic T: I(U) where .X = ()) {} fn G() { // This finds the impl where `.X = {}`, but F requires that `.X = ()`. // @@ -52,8 +52,8 @@ fn G() { // CHECK:STDERR: F({}, C); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_generic_interface_facet_value_wrong_specific_impl.carbon:[[@LINE-7]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F(U:! type, unused T:! I(U) where .X = ()) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F(generic U: type, unused generic T: I(U) where .X = ()) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F({}, C); } @@ -61,10 +61,10 @@ fn G() { // --- dependent_rules.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } -interface J { let Y:! type; } +interface I { let X: type; } +interface J { let Y: type; } -fn F(T:! I & J where .X = .Y) { +fn F(generic T: I & J where .X = .Y) { // Allowed since `T impls I`, `T impls J`, and has constraint providing // T.(I.X) = T.(J.Y)`. F(T); @@ -73,9 +73,9 @@ fn F(T:! I & J where .X = .Y) { // --- fail_convert.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } -fn F(unused T:! I where .X = {.a: (), .b: {}}) {} +fn F(unused generic T: I where .X = {.a: (), .b: {}}) {} fn H() { class C; @@ -83,20 +83,20 @@ fn H() { // CHECK:STDERR: fail_convert.carbon:[[@LINE+7]]:3: error: cannot convert type `C` into type implementing `I where .(I.X) = {.a: (), .b: {}}` [ConversionFailureTypeToFacet] // CHECK:STDERR: F(C); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_convert.carbon:[[@LINE-8]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I where .X = {.a: (), .b: {}}) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_convert.carbon:[[@LINE-8]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I where .X = {.a: (), .b: {}}) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(C); } -fn G(T:! I where .X = {.b: {}, .a: ()}) { +fn G(generic T: I where .X = {.b: {}, .a: ()}) { // CHECK:STDERR: fail_convert.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `I where .(I.X) = {.b: {}, .a: ()}` into type implementing `I where .(I.X) = {.a: (), .b: {}}` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_convert.carbon:[[@LINE-19]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I where .X = {.a: (), .b: {}}) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_convert.carbon:[[@LINE-19]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I where .X = {.a: (), .b: {}}) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -104,18 +104,18 @@ fn G(T:! I where .X = {.b: {}, .a: ()}) { // --- fail_todo_dependent_rules_compound.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } -interface J { let Y:! type; } +interface I { let X: type; } +interface J { let Y: type; } -// CHECK:STDERR: fail_todo_dependent_rules_compound.carbon:[[@LINE+8]]:23: error: expected identifier or `Self` after `.` [ExpectedIdentifierOrSelfAfterPeriod] -// CHECK:STDERR: fn F(T:! I & J where .(I.X) = .(J.Y)) { -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_todo_dependent_rules_compound.carbon:[[@LINE+8]]:30: error: expected identifier or `Self` after `.` [ExpectedIdentifierOrSelfAfterPeriod] +// CHECK:STDERR: fn F(generic T: I & J where .(I.X) = .(J.Y)) { +// CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_dependent_rules_compound.carbon:[[@LINE+4]]:23: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] -// CHECK:STDERR: fn F(T:! I & J where .(I.X) = .(J.Y)) { -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_todo_dependent_rules_compound.carbon:[[@LINE+4]]:30: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] +// CHECK:STDERR: fn F(generic T: I & J where .(I.X) = .(J.Y)) { +// CHECK:STDERR: ^ // CHECK:STDERR: -fn F(T:! I & J where .(I.X) = .(J.Y)) { +fn F(generic T: I & J where .(I.X) = .(J.Y)) { // Allowed since `T impls I`, `T impls J`, and has constraint providing // T.(I.X) = T.(J.Y)`. F(T); @@ -124,53 +124,53 @@ fn F(T:! I & J where .(I.X) = .(J.Y)) { // --- parameterized_interface.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { let X:! type; } +interface I(T: type) { let X: type; } -final impl forall [J:! I(()) where .X = ()] J as I({}) where .X = {} {} +final impl forall [J: I(()) where .X = ()] J as I({}) where .X = {} {} -fn F(unused T:! I({}) where .X = {}) {} +fn F(unused generic T: I({}) where .X = {}) {} -fn G(T:! I(()) where .X = ()) { +fn G(generic T: I(()) where .X = ()) { F(T); } // --- fail_todo_parameterized_interface_compound.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { let X:! type; } +interface I(T: type) { let X: type; } -final impl forall [J:! I(())] J as I({}) where .X = {} {} +final impl forall [J: I(())] J as I({}) where .X = {} {} -// CHECK:STDERR: fail_todo_parameterized_interface_compound.carbon:[[@LINE+8]]:31: error: expected identifier or `Self` after `.` [ExpectedIdentifierOrSelfAfterPeriod] -// CHECK:STDERR: fn F(T:! I(()) & I({}) where .(I(()).X) = () and .(I({}).X) = {}) {} -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_todo_parameterized_interface_compound.carbon:[[@LINE+8]]:38: error: expected identifier or `Self` after `.` [ExpectedIdentifierOrSelfAfterPeriod] +// CHECK:STDERR: fn F(generic T: I(()) & I({}) where .(I(()).X) = () and .(I({}).X) = {}) {} +// CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_parameterized_interface_compound.carbon:[[@LINE+4]]:31: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] -// CHECK:STDERR: fn F(T:! I(()) & I({}) where .(I(()).X) = () and .(I({}).X) = {}) {} -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_todo_parameterized_interface_compound.carbon:[[@LINE+4]]:38: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] +// CHECK:STDERR: fn F(generic T: I(()) & I({}) where .(I(()).X) = () and .(I({}).X) = {}) {} +// CHECK:STDERR: ^ // CHECK:STDERR: -fn F(T:! I(()) & I({}) where .(I(()).X) = () and .(I({}).X) = {}) {} +fn F(generic T: I(()) & I({}) where .(I(()).X) = () and .(I({}).X) = {}) {} -fn G(T:! I(()) where .X = ()) { +fn G(generic T: I(()) where .X = ()) { F(T); } // --- fail_parameterized_interface_with_wrong_where_in_impl_deduction.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { let X:! type; } +interface I(T: type) { let X: type; } -final impl forall [J:! I(()) where .X = {}] J as I({}) where .X = {} {} +final impl forall [J: I(()) where .X = {}] J as I({}) where .X = {} {} -fn F(unused T:! I({}) where .X = {}) {} +fn F(unused generic T: I({}) where .X = {}) {} -fn G(T:! I(()) where .X = ()) { +fn G(generic T: I(()) where .X = ()) { // CHECK:STDERR: fail_parameterized_interface_with_wrong_where_in_impl_deduction.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `I(()) where .(I(()).X) = ()` into type implementing `I({}) where .(I({}).X) = {}` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_parameterized_interface_with_wrong_where_in_impl_deduction.carbon:[[@LINE-6]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I({}) where .X = {}) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_parameterized_interface_with_wrong_where_in_impl_deduction.carbon:[[@LINE-6]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I({}) where .X = {}) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -179,11 +179,11 @@ fn G(T:! I(()) where .X = ()) { library "[[@TEST_NAME]]"; interface I { - let X1:! type; - let X2:! type; + let X1: type; + let X2: type; } -fn F(unused T:! I where .X1 = () and .X2 = ()) {} +fn F(unused generic T: I where .X1 = () and .X2 = ()) {} fn G() { class C; @@ -191,7 +191,7 @@ fn G() { F(C); } -fn H(T:! I where .X1 = .X2 and .X2 = ()) { +fn H(generic T: I where .X1 = .X2 and .X2 = ()) { F(T); } @@ -199,11 +199,11 @@ fn H(T:! I where .X1 = .X2 and .X2 = ()) { library "[[@TEST_NAME]]"; interface I { - let X1:! type; - let X2:! type; + let X1: type; + let X2: type; } -fn F(unused T:! I where .X1 = .X2 and .X2 = ()) {} +fn F(unused generic T: I where .X1 = .X2 and .X2 = ()) {} fn G() { class C; @@ -211,7 +211,7 @@ fn G() { F(C); } -fn H(T:! I where .X1 = () and .X2 = ()) { +fn H(generic T: I where .X1 = () and .X2 = ()) { F(T); } @@ -219,11 +219,11 @@ fn H(T:! I where .X1 = () and .X2 = ()) { library "[[@TEST_NAME]]"; interface I { - let X1:! type; - let X2:! type; + let X1: type; + let X2: type; } -fn F(unused T:! I where .X1 = .X2 and .X2 = ()) {} +fn F(unused generic T: I where .X1 = .X2 and .X2 = ()) {} fn G() { class C1; @@ -235,11 +235,11 @@ fn G() { F(C2); } -fn H1(T:! I where .X1 = .X2 and .X2 = ()) { +fn H1(generic T: I where .X1 = .X2 and .X2 = ()) { F(T); } -fn H2(T:! I where .X1 = () and .X2 = .X1) { +fn H2(generic T: I where .X1 = () and .X2 = .X1) { F(T); } @@ -247,11 +247,11 @@ fn H2(T:! I where .X1 = () and .X2 = .X1) { library "[[@TEST_NAME]]"; interface I { - let X1:! type; - let X2:! type; + let X1: type; + let X2: type; } -fn F(unused T:! I where .X1 = .X2) {} +fn F(unused generic T: I where .X1 = .X2) {} class C; // .X2 is not set in the impl definition, so its value is an ErrorInst @@ -261,8 +261,8 @@ class C; // CHECK:STDERR: impl C as I where .X1 = () {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_error_in_witness_table.carbon:[[@LINE-12]]:7: note: associated constant declared here [AssociatedConstantHere] -// CHECK:STDERR: let X2:! type; -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: let X2: type; +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: impl C as I where .X1 = () {} @@ -270,9 +270,9 @@ fn G() { // CHECK:STDERR: fail_error_in_witness_table.carbon:[[@LINE+7]]:3: error: cannot convert type `C` into type implementing `I where .(I.X1) = .(I.X2)` [ConversionFailureTypeToFacet] // CHECK:STDERR: F(C); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_error_in_witness_table.carbon:[[@LINE-19]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I where .X1 = .X2) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_error_in_witness_table.carbon:[[@LINE-19]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I where .X1 = .X2) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(C); } @@ -281,14 +281,14 @@ fn G() { library "[[@TEST_NAME]]"; interface I {} -interface J { let Y:! type; } +interface J { let Y: type; } class C; -final impl forall [T:! I] T as J where .Y = C {} +final impl forall [T: I] T as J where .Y = C {} -fn F(unused T:! I & J where .Y = C) {} -fn G(T:! I) { +fn F(unused generic T: I & J where .Y = C) {} +fn G(generic T: I) { F(T); } @@ -296,38 +296,38 @@ fn G(T:! I) { library "[[@TEST_NAME]]"; interface I {} -interface J { let Y:! type; } +interface J { let Y: type; } class C; -final impl forall [T:! J] T as I {} +final impl forall [T: J] T as I {} -fn F(unused T:! I & J where .Y = C) {} -fn G(T:! J where .Y = C) { +fn F(unused generic T: I & J where .Y = C) {} +fn G(generic T: J where .Y = C) { F(T); } // --- fail_non_final_impl_deduce.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } -impl forall [U:! type] U as I where .X = () {} +impl forall [U: type] U as I where .X = () {} -fn F(unused T:! I where .X = ()) {} +fn F(unused generic T: I where .X = ()) {} -class C(T:! type); +class C(T: type); -fn G(T:! type) { +fn G(generic T: type) { // The type `C(T)` is generic so that the resulting impl witness will not be // effectively final. // // CHECK:STDERR: fail_non_final_impl_deduce.carbon:[[@LINE+7]]:3: error: cannot convert type `C(T)` into type implementing `I where .(I.X) = ()` [ConversionFailureTypeToFacet] // CHECK:STDERR: F(C(T)); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_non_final_impl_deduce.carbon:[[@LINE-11]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I where .X = ()) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_non_final_impl_deduce.carbon:[[@LINE-11]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I where .X = ()) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(C(T)); } @@ -335,13 +335,13 @@ fn G(T:! type) { // --- fail_non_final_impl_explicit.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } -impl forall [U:! type] U as I where .X = () {} +impl forall [U: type] U as I where .X = () {} -class C(T:! type); +class C(T: type); -fn F(T:! type) { +fn F(generic T: type) { // The type `C(T)` is generic so that the resulting impl witness will not be // effectively final. // @@ -355,11 +355,11 @@ fn F(T:! type) { // --- concrete_query_non_final_impl_deduce.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } -impl forall [U:! type] U as I where .X = () {} +impl forall [U: type] U as I where .X = () {} -fn F(unused T:! I where .X = ()) {} +fn F(unused generic T: I where .X = ()) {} fn G() { class C; @@ -369,9 +369,9 @@ fn G() { // --- concrete_query_non_final_impl_explicit_as.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } -impl forall [U:! type] U as I where .X = () {} +impl forall [U: type] U as I where .X = () {} fn F() { class C; @@ -381,11 +381,11 @@ class C; // --- final_impl_deduce.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } -final impl forall [U:! type] U as I where .X = () {} +final impl forall [U: type] U as I where .X = () {} -fn F(unused T:! I where .X = ()) {} +fn F(unused generic T: I where .X = ()) {} fn G() { class C; @@ -395,9 +395,9 @@ fn G() { // --- final_impl_explicit_as.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } -final impl forall [U:! type] U as I where .X = () {} +final impl forall [U: type] U as I where .X = () {} fn F() { class C; @@ -407,12 +407,12 @@ fn F() { // --- concrete_specialization_impl_deduce.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } class C; impl C as I where .X = () {} -fn F(unused T:! I where .X = ()) {} +fn F(unused generic T: I where .X = ()) {} fn G() { F(C); } @@ -420,7 +420,7 @@ fn G() { // --- concrete_specialization_impl_explicit_as.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } class C; impl C as I where .X = () {} @@ -433,15 +433,15 @@ fn F() { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } -class C(T:! type); +class C(T: type); -fn F(unused T:! I where .X = C(.Y)) {} +fn F(unused generic T: I where .X = C(.Y)) {} -fn G(T:! I where .X = C(()) and .Y = ()) { +fn G(generic T: I where .X = C(()) and .Y = ()) { F(T); } @@ -449,21 +449,21 @@ fn G(T:! I where .X = C(()) and .Y = ()) { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } -class C(T:! type); +class C(T: type); -fn F(unused T:! I where .X = C(.Y)) {} +fn F(unused generic T: I where .X = C(.Y)) {} -fn G(T:! I where .X = C(()) and .Y = {}) { +fn G(generic T: I where .X = C(()) and .Y = {}) { // CHECK:STDERR: fail_wrong_rewrite_value_in_class_param.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `I where .(I.X) = C(()) and .(I.Y) = {}` into type implementing `I where .(I.X) = C(.(I.Y))` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_wrong_rewrite_value_in_class_param.carbon:[[@LINE-6]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I where .X = C(.Y)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_wrong_rewrite_value_in_class_param.carbon:[[@LINE-6]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I where .X = C(.Y)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -472,13 +472,13 @@ fn G(T:! I where .X = C(()) and .Y = {}) { library "[[@TEST_NAME]]"; interface I { - let X:! type; + let X: type; fn F(); } -fn F(unused T:! I where .X = ()) {} +fn F(unused generic T: I where .X = ()) {} -fn G(T:! I where .X = ()) { +fn G(generic T: I where .X = ()) { F(T); } @@ -486,14 +486,14 @@ fn G(T:! I where .X = ()) { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! X; + let X: type; + let Y: X; fn A(); } -fn F(unused T:! I where .Y = .A) {} +fn F(unused generic T: I where .Y = .A) {} -fn G(T:! I where .Y = .A) { +fn G(generic T: I where .Y = .A) { F(T); } @@ -501,21 +501,21 @@ fn G(T:! I where .Y = .A) { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! X; + let X: type; + let Y: X; fn A(); fn B(); } -fn F(unused T:! I where .Y = .A) {} +fn F(unused generic T: I where .Y = .A) {} -fn G(T:! I where .Y = .B) { +fn G(generic T: I where .Y = .B) { // CHECK:STDERR: fail_wrong_function_as_rewrite_value.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `I where .(I.Y) = .(I.B)` into type implementing `I where .(I.Y) = .(I.A)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_wrong_function_as_rewrite_value.carbon:[[@LINE-6]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I where .Y = .A) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_wrong_function_as_rewrite_value.carbon:[[@LINE-6]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I where .Y = .A) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -524,28 +524,28 @@ fn G(T:! I where .Y = .B) { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! X; + let X: type; + let Y: X; fn A(); } interface J { - let J1:! type; - let J2:! type; + let J1: type; + let J2: type; // B has the same index in J as A does in I, ensuring the index is not enough // for comparing them. fn B(); } -fn F(unused T:! I & J where .Y = .A) {} +fn F(unused generic T: I & J where .Y = .A) {} -fn G(T:! I & J where .Y = .B) { +fn G(generic T: I & J where .Y = .B) { // CHECK:STDERR: fail_wrong_function_as_rewrite_value_in_other_interface.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `I & J where .(I.Y) = .(J.B)` into type implementing `I & J where .(I.Y) = .(I.A)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_wrong_function_as_rewrite_value_in_other_interface.carbon:[[@LINE-6]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I & J where .Y = .A) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_wrong_function_as_rewrite_value_in_other_interface.carbon:[[@LINE-6]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I & J where .Y = .A) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -553,26 +553,26 @@ fn G(T:! I & J where .Y = .B) { // --- recursive_facet.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } -interface K(Y:! type) { } +interface I { let X: type; } +interface K(Y: type) { } -fn F(unused T:! I where .X = {.k: K(I)}) {} +fn F(unused generic T: I where .X = {.k: K(I)}) {} -fn G(T:! I where .X = {.k: K(I)}) { +fn G(generic T: I where .X = {.k: K(I)}) { F(T); } // --- fail_facet_type_concrete_types_match_blanket_impl_concrete_types.carbon library "[[@TEST_NAME]]"; -interface A { let X:! type; } -interface B { let Y:! type; } +interface A { let X: type; } +interface B { let Y: type; } -interface C(BB:! B) { let AX:! type; let BY:! type; } +interface C(BB: B) { let AX: type; let BY: type; } -impl forall [AA:! A, BB:! B] AA as C(BB) where .AX = () and .BY = {} {} +impl forall [AA: A, BB: B] AA as C(BB) where .AX = () and .BY = {} {} -fn F(AA:! A where .X = (), BB:! B where .Y = {}) { +fn F(generic AA: A where .X = (), generic BB: B where .Y = {}) { // The types match but there may be a specialization that specifies different // types and would be prefered for a specific `AA` or `BB`. // @@ -586,14 +586,14 @@ fn F(AA:! A where .X = (), BB:! B where .Y = {}) { // --- fail_facet_type_concrete_types_become_blank_impl_types.carbon library "[[@TEST_NAME]]"; -interface A { let X:! type; } -interface B { let Y:! type; } +interface A { let X: type; } +interface B { let Y: type; } -interface C(BB:! B) { let AX:! type; let BY:! type; } +interface C(BB: B) { let AX: type; let BY: type; } -impl forall [AA:! A, BB:! B] AA as C(BB) where .AX = AA.X and .BY = BB.Y {} +impl forall [AA: A, BB: B] AA as C(BB) where .AX = AA.X and .BY = BB.Y {} -fn F(AA:! A where .X = (), BB:! B where .Y = {}) { +fn F(generic AA: A where .X = (), generic BB: B where .Y = {}) { // The types match but there may be a specialization that specifies different // types and would be prefered for a specific `AA` or `BB`. // @@ -607,42 +607,42 @@ fn F(AA:! A where .X = (), BB:! B where .Y = {}) { // --- facet_type_concrete_types_match_final_blanket_impl_concrete_types.carbon library "[[@TEST_NAME]]"; -interface A { let X:! type; } -interface B { let Y:! type; } +interface A { let X: type; } +interface B { let Y: type; } -interface C(BB:! B) { let AX:! type; let BY:! type; } +interface C(BB: B) { let AX: type; let BY: type; } -final impl forall [AA:! A, BB:! B] AA as C(BB) where .AX = () and .BY = {} {} +final impl forall [AA: A, BB: B] AA as C(BB) where .AX = () and .BY = {} {} -fn F(AA:! A where .X = (), BB:! B where .Y = {}) { +fn F(generic AA: A where .X = (), generic BB: B where .Y = {}) { AA as (C(BB) where .AX = () and .BY = {}); } // --- facet_type_concrete_types_become_final_blanket_impl_types.carbon library "[[@TEST_NAME]]"; -interface A { let X:! type; } -interface B { let Y:! type; } +interface A { let X: type; } +interface B { let Y: type; } -interface C(BB:! B) { let AX:! type; let BY:! type; } +interface C(BB: B) { let AX: type; let BY: type; } -final impl forall [AA:! A, BB:! B] AA as C(BB) where .AX = AA.X and .BY = BB.Y {} +final impl forall [AA: A, BB: B] AA as C(BB) where .AX = AA.X and .BY = BB.Y {} -fn F(AA:! A where .X = (), BB:! B where .Y = {}) { +fn F(generic AA: A where .X = (), generic BB: B where .Y = {}) { AA as (C(BB) where .AX = () and .BY = {}); } // --- fail_facet_type_concrete_types_become_final_blanket_impl_types_wrong_types.carbon library "[[@TEST_NAME]]"; -interface A { let X:! type; } -interface B { let Y:! type; } +interface A { let X: type; } +interface B { let Y: type; } -interface C(BB:! B) { let AX:! type; let BY:! type; } +interface C(BB: B) { let AX: type; let BY: type; } -final impl forall [AA:! A, BB:! B] AA as C(BB) where .AX = AA.X and .BY = BB.Y {} +final impl forall [AA: A, BB: B] AA as C(BB) where .AX = AA.X and .BY = BB.Y {} -fn F(AA:! A where .X = (), BB:! B where .Y = {}) { +fn F(generic AA: A where .X = (), generic BB: B where .Y = {}) { // CHECK:STDERR: fail_facet_type_concrete_types_become_final_blanket_impl_types_wrong_types.carbon:[[@LINE+4]]:3: error: cannot convert type `AA` that implements `A where .(A.X) = ()` into type implementing `C(BB as B) where .(C(BB as B).AX) = {} and .(C(BB as B).BY) = ()` [ConversionFailureFacetToFacet] // CHECK:STDERR: AA as (C(BB) where .AX = {} and .BY = ()); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -654,16 +654,16 @@ fn F(AA:! A where .X = (), BB:! B where .Y = {}) { library "[[@TEST_NAME]]"; interface I { - let X1:! type; - let X2:! type; - let X3:! type; + let X1: type; + let X2: type; + let X3: type; } -class C(T:! type); +class C(T: type); -fn F(unused T:! I where .X1 = .X3 and .X2 = C(.X3) and .X3 = ()) {} +fn F(unused generic T: I where .X1 = .X3 and .X2 = C(.X3) and .X3 = ()) {} -fn G(T:! I where .X1 = () and .X2 = C(()) and .X3 = ()) { +fn G(generic T: I where .X1 = () and .X2 = C(()) and .X3 = ()) { F(T); } @@ -671,16 +671,16 @@ fn G(T:! I where .X1 = () and .X2 = C(()) and .X3 = ()) { library "[[@TEST_NAME]]"; interface I { - let X1:! type; - let X2:! type; - let X3:! type; + let X1: type; + let X2: type; + let X3: type; } -class C(T:! type); +class C(T: type); -fn F(unused T:! I where .X1 = () and .X2 = C(()) and .X3 = .X1) {} +fn F(unused generic T: I where .X1 = () and .X2 = C(()) and .X3 = .X1) {} -fn G(T:! I where .X1 = .X3 and .X2 = C(.X1) and .X3 = ()) { +fn G(generic T: I where .X1 = .X3 and .X2 = C(.X1) and .X3 = ()) { F(T); } @@ -688,13 +688,13 @@ fn G(T:! I where .X1 = .X3 and .X2 = C(.X1) and .X3 = ()) { library "[[@TEST_NAME]]"; interface I { - let X1:! type; - let X2:! type; + let X1: type; + let X2: type; } -fn F(U:! I where .X1 = {}, unused T:! I where .X1 = () and .X2 = U.X1) {} +fn F(generic U: I where .X1 = {}, unused generic T: I where .X1 = () and .X2 = U.X1) {} -fn G(U:! I where .X1 = {} and .X2 = (), T:! I where .X1 = U.X2 and .X2 = {}) { +fn G(generic U: I where .X1 = {} and .X2 = (), generic T: I where .X1 = U.X2 and .X2 = {}) { F(U, T); } @@ -702,18 +702,18 @@ fn G(U:! I where .X1 = {} and .X2 = (), T:! I where .X1 = U.X2 and .X2 = {}) { library "[[@TEST_NAME]]"; interface I { - let X1:! I; - let X2:! type; - let X3:! type; + let X1: I; + let X2: type; + let X3: type; } -fn F(unused T:! I where .X1 = .Self and .X2 = .X1.X3 and .X3 = ()) {} +fn F(unused generic T: I where .X1 = .Self and .X2 = .X1.X3 and .X3 = ()) {} -fn G(T:! I where .X1 = .Self and .X2 = () and .X3 = ()) { +fn G(generic T: I where .X1 = .Self and .X2 = () and .X3 = ()) { F(T); } -fn H(T:! I where .X1 = .Self and .X2 = .X1.X3 and .X3 = ()) { +fn H(generic T: I where .X1 = .Self and .X2 = .X1.X3 and .X3 = ()) { G(T); } @@ -721,15 +721,15 @@ fn H(T:! I where .X1 = .Self and .X2 = .X1.X3 and .X3 = ()) { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } -class C(T:! type); +class C(T: type); -fn F(unused T:! I where .X = C(.Y)) {} +fn F(unused generic T: I where .X = C(.Y)) {} -fn G(T:! I where .X = C({}) and .Y = {}) { +fn G(generic T: I where .X = C({}) and .Y = {}) { F(T); } @@ -737,14 +737,14 @@ fn G(T:! I where .X = C({}) and .Y = {}) { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } -interface J(T:! type) {} +interface J(T: type) {} -fn F(unused T:! I where .X = J(())) {} +fn F(unused generic T: I where .X = J(())) {} -fn G(T:! I where .X = J(()) and .Y = ()) { +fn G(generic T: I where .X = J(()) and .Y = ()) { F(T); } @@ -752,21 +752,21 @@ fn G(T:! I where .X = J(()) and .Y = ()) { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; - let Z:! type; + let X: type; + let Y: type; + let Z: type; } -interface J(T:! type) {} +interface J(T: type) {} -fn F(unused T:! I where .X = J(())) {} +fn F(unused generic T: I where .X = J(())) {} -fn G(T:! I where .X = J({}) and .Y = ()) { +fn G(generic T: I where .X = J({}) and .Y = ()) { // CHECK:STDERR: fail_facet_type_in_assoc_constant_differs.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `I where .(I.X) = J({}) and .(I.Y) = ()` into type implementing `I where .(I.X) = J(())` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_facet_type_in_assoc_constant_differs.carbon:[[@LINE-6]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I where .X = J(())) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_facet_type_in_assoc_constant_differs.carbon:[[@LINE-6]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I where .X = J(())) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -774,9 +774,9 @@ fn G(T:! I where .X = J({}) and .Y = ()) { // --- rewrite_rhs_satisfies_lhs_requirement.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) {} -interface J(T:! type) { - let J1:! I(T); +interface I(T: type) {} +interface J(T: type) { + let J1: I(T); } class C; @@ -789,18 +789,18 @@ constraint L { require C impls I(Self); } -fn F(unused T:! L & J(.Self) where .J1 = C) {} +fn F(unused generic T: L & J(.Self) where .J1 = C) {} -fn G(T:! L & J(.Self) where .J1 = C) { +fn G(generic T: L & J(.Self) where .J1 = C) { F(T); } // --- todo_fail_rewrite_rhs_does_not_satisfy_lhs_requirement.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) {} -interface J(T:! type) { - let J1:! I(T); +interface I(T: type) {} +interface J(T: type) { + let J1: I(T); } class C; @@ -811,9 +811,9 @@ constraint L { // TODO: This should be an error that C does not impl I(.Self). We don't yet try // convert the RHS of a rewrite to the type of the LHS when the LHS is symbolic. -fn F(unused T:! L & J(.Self) where .J1 = C) {} +fn F(unused generic T: L & J(.Self) where .J1 = C) {} -fn G(T:! L & J(.Self) where .J1 = C) { +fn G(generic T: L & J(.Self) where .J1 = C) { F(T); } @@ -821,21 +821,21 @@ fn G(T:! L & J(.Self) where .J1 = C) { library "[[@TEST_NAME]]"; interface I { - let I1:! type; - let I2:! type; + let I1: type; + let I2: type; } interface J { - let J1:! I; + let J1: I; } interface K { - let K1:! J; + let K1: J; } -fn F(unused T:! I & J & K where .K1 = .Self and .J1 = .Self and .I1 = (.K1.J1).I2) {} +fn F(unused generic T: I & J & K where .K1 = .Self and .J1 = .Self and .I1 = (.K1.J1).I2) {} -fn G(T:! I & J & K where .K1 = .Self and .J1 = .Self and .I1 = .I2) { +fn G(generic T: I & J & K where .K1 = .Self and .J1 = .Self and .I1 = .I2) { F(T); } @@ -843,52 +843,52 @@ fn G(T:! I & J & K where .K1 = .Self and .J1 = .Self and .I1 = .I2) { library "[[@TEST_NAME]]"; interface I { - let I1:! type; - let I2:! type; + let I1: type; + let I2: type; } interface J { - let J1:! I; + let J1: I; } interface K { - let K1:! J; + let K1: J; } -fn F(unused T:! I & J & K where .K1 = .Self and .J1 = .Self and .I1 = (.K1.J1).I2) {} +fn F(unused generic T: I & J & K where .K1 = .Self and .J1 = .Self and .I1 = (.K1.J1).I2) {} // F's requirement I1 = I2 is not met, as I1 = () and I2 = {} -fn G(T:! I & J & K where .K1 = .Self and .J1 = .Self and .I1 = () and .I2 = {}) { +fn G(generic T: I & J & K where .K1 = .Self and .J1 = .Self and .I1 = () and .I2 = {}) { // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_self_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `I & J & K where .(K.K1) = .Self as J and .(J.J1) = .Self as I and .(I.I1) = () and .(I.I2) = {}` into type implementing `I & J & K where .(K.K1) = .Self as J and .(J.J1) = .Self as I and .(I.I1) = .(I.I2)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_self_wrong_type.carbon:[[@LINE-7]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I & J & K where .K1 = .Self and .J1 = .Self and .I1 = (.K1.J1).I2) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_self_wrong_type.carbon:[[@LINE-7]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I & J & K where .K1 = .Self and .J1 = .Self and .I1 = (.K1.J1).I2) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } // F's requirement I1 = I2 is not met, as I1 = {} and I2 is unspecified -fn G2(T:! I & J & K where .K1 = .Self and .J1 = .Self and .I1 = {}) { +fn G2(generic T: I & J & K where .K1 = .Self and .J1 = .Self and .I1 = {}) { // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_self_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `I & J & K where .(K.K1) = .Self as J and .(J.J1) = .Self as I and .(I.I1) = {}` into type implementing `I & J & K where .(K.K1) = .Self as J and .(J.J1) = .Self as I and .(I.I1) = .(I.I2)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_self_wrong_type.carbon:[[@LINE-19]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I & J & K where .K1 = .Self and .J1 = .Self and .I1 = (.K1.J1).I2) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_self_wrong_type.carbon:[[@LINE-19]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I & J & K where .K1 = .Self and .J1 = .Self and .I1 = (.K1.J1).I2) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } // F's requirement I1 = I2 is not met, as I2 = {} and I1 is unspecified -fn G3(T:! I & J & K where .K1 = .Self and .J1 = .Self and .I2 = {}) { +fn G3(generic T: I & J & K where .K1 = .Self and .J1 = .Self and .I2 = {}) { // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_self_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `I & J & K where .(K.K1) = .Self as J and .(J.J1) = .Self as I and .(I.I2) = {}` into type implementing `I & J & K where .(K.K1) = .Self as J and .(J.J1) = .Self as I and .(I.I1) = .(I.I2)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_self_wrong_type.carbon:[[@LINE-31]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I & J & K where .K1 = .Self and .J1 = .Self and .I1 = (.K1.J1).I2) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_self_wrong_type.carbon:[[@LINE-31]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I & J & K where .K1 = .Self and .J1 = .Self and .I1 = (.K1.J1).I2) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -897,24 +897,24 @@ fn G3(T:! I & J & K where .K1 = .Self and .J1 = .Self and .I2 = {}) { library "[[@TEST_NAME]]"; interface I { - let I1:! type; + let I1: type; } interface J { - let J1:! I; - let J2:! type; + let J1: I; + let J2: type; } interface K { - let K1:! J; + let K1: J; } // .K1.J1 is an ImplWitnessAccess into Self. The Self witness will be subst'd in // for `U` and it will eval to the ImplWitnessAccess inside of `U.I1`. Then that // will need to be subst'd to find the value of I1 in U's witness. -fn F(unused U:! I, unused T:! J & K where .J2 = (.K1.J1).I1) {} +fn F(unused generic U: I, unused generic T: J & K where .J2 = (.K1.J1).I1) {} -fn G(U:! I where .I1 = (), T:! J & K where .K1 = .Self and .J1 = U and .J2 = ()) { +fn G(generic U: I where .I1 = (), generic T: J & K where .K1 = .Self and .J1 = U and .J2 = ()) { F(U, T); } @@ -922,52 +922,52 @@ fn G(U:! I where .I1 = (), T:! J & K where .K1 = .Self and .J1 = U and .J2 = ()) library "[[@TEST_NAME]]"; interface I { - let I1:! type; + let I1: type; } interface J { - let J1:! I; - let J2:! type; + let J1: I; + let J2: type; } interface K { - let K1:! J; + let K1: J; } -fn F(unused U:! I, unused T:! J & K where .J2 = (.K1.J1).I1) {} +fn F(unused generic U: I, unused generic T: J & K where .J2 = (.K1.J1).I1) {} // F's requirement J2 = I1 is not met as J2 = () and I1 = {} -fn G(U:! I where .I1 = {}, T:! J & K where .K1 = .Self and .J1 = U and .J2 = ()) { +fn G(generic U: I where .I1 = {}, generic T: J & K where .K1 = .Self and .J1 = U and .J2 = ()) { // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `J & K where .(J.J2) = () and .(K.K1) = .Self as J and .(J.J1) = U as I` into type implementing `J & K where .(J.J2) = .(K.K1).(J.J1).(I.I1)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(U, T); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_wrong_type.carbon:[[@LINE-7]]:27: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused U:! I, unused T:! J & K where .J2 = (.K1.J1).I1) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_wrong_type.carbon:[[@LINE-7]]:42: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic U: I, unused generic T: J & K where .J2 = (.K1.J1).I1) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(U, T); } // F's requirement J2 = I1 is not met as J2 = () and I1 is unspecified -fn G2(U:! I, T:! J & K where .K1 = .Self and .J1 = U and .J2 = ()) { +fn G2(generic U: I, generic T: J & K where .K1 = .Self and .J1 = U and .J2 = ()) { // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `J & K where .(J.J2) = () and .(K.K1) = .Self as J and .(J.J1) = U` into type implementing `J & K where .(J.J2) = .(K.K1).(J.J1).(I.I1)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(U, T); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_wrong_type.carbon:[[@LINE-19]]:27: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused U:! I, unused T:! J & K where .J2 = (.K1.J1).I1) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_wrong_type.carbon:[[@LINE-19]]:42: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic U: I, unused generic T: J & K where .J2 = (.K1.J1).I1) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(U, T); } // F's requirement J2 = I1 is not met as I1 = {} and J2 is unspecified -fn G3(U:! I where .I1 = {}, T:! J & K where .K1 = .Self and .J1 = U) { +fn G3(generic U: I where .I1 = {}, generic T: J & K where .K1 = .Self and .J1 = U) { // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `J & K where .(K.K1) = .Self as J and .(J.J1) = U as I` into type implementing `J & K where .(J.J2) = .(K.K1).(J.J1).(I.I1)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(U, T); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_wrong_type.carbon:[[@LINE-31]]:27: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused U:! I, unused T:! J & K where .J2 = (.K1.J1).I1) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_wrong_type.carbon:[[@LINE-31]]:42: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic U: I, unused generic T: J & K where .J2 = (.K1.J1).I1) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(U, T); } @@ -976,22 +976,22 @@ fn G3(U:! I where .I1 = {}, T:! J & K where .K1 = .Self and .J1 = U) { library "[[@TEST_NAME]]"; interface I { - let I1:! type; + let I1: type; } interface J { - let J1:! type; + let J1: type; } interface K { - let K1:! J & I; - let K2:! type; - let K3:! type; + let K1: J & I; + let K2: type; + let K3: type; } -fn F(unused U:! I & J, unused T:! K where .K2 = .K1.I1 and .K3 = .K1.J1) {} +fn F(unused generic U: I & J, unused generic T: K where .K2 = .K1.I1 and .K3 = .K1.J1) {} -fn G(U:! I & J where .I1 = () and .J1 = {}, T:! K where .K1 = U and .K2 = () and .K3 = {}) { +fn G(generic U: I & J where .I1 = () and .J1 = {}, generic T: K where .K1 = U and .K2 = () and .K3 = {}) { F(U, T); } @@ -999,77 +999,77 @@ fn G(U:! I & J where .I1 = () and .J1 = {}, T:! K where .K1 = U and .K2 = () and library "[[@TEST_NAME]]"; interface I { - let I1:! type; + let I1: type; } interface J { - let J1:! type; + let J1: type; } interface K { - let K1:! J & I; - let K2:! type; - let K3:! type; + let K1: J & I; + let K2: type; + let K3: type; } -fn F(unused U:! I & J, unused T:! K where .K2 = .K1.I1 and .K3 = .K1.J1) {} +fn F(unused generic U: I & J, unused generic T: K where .K2 = .K1.I1 and .K3 = .K1.J1) {} // K2 = I1 fails since K2 = {} and I1 = () -fn G(U:! I & J where .I1 = () and .J1 = {}, T:! K where .K1 = U and .K2 = {} and .K3 = {}) { +fn G(generic U: I & J where .I1 = () and .J1 = {}, generic T: K where .K1 = U and .K2 = {} and .K3 = {}) { // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `K where .(K.K2) = {} and .(K.K1) = U as I & J and .(K.K3) = {}` into type implementing `K where .(K.K2) = .(K.K1).(I.I1) and .(K.K3) = .(K.K1).(J.J1)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(U, T); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE-7]]:31: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused U:! I & J, unused T:! K where .K2 = .K1.I1 and .K3 = .K1.J1) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE-7]]:46: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic U: I & J, unused generic T: K where .K2 = .K1.I1 and .K3 = .K1.J1) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(U, T); } // K2 = I1 fails since I1 = () and K2 is unspecified. -fn G2(U:! I & J where .I1 = () and .J1 = {}, T:! K where .K1 = U and .K3 = {}) { +fn G2(generic U: I & J where .I1 = () and .J1 = {}, generic T: K where .K1 = U and .K3 = {}) { // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `K where .(K.K1) = U as I & J and .(K.K3) = {}` into type implementing `K where .(K.K2) = .(K.K1).(I.I1) and .(K.K3) = .(K.K1).(J.J1)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(U, T); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE-19]]:31: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused U:! I & J, unused T:! K where .K2 = .K1.I1 and .K3 = .K1.J1) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE-19]]:46: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic U: I & J, unused generic T: K where .K2 = .K1.I1 and .K3 = .K1.J1) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(U, T); } // K2 = I1 fails since K2 = () and I1 is unspecified. -fn G3(U:! I & J where .J1 = {}, T:! K where .K1 = U and .K2 = () and .K3 = {}) { +fn G3(generic U: I & J where .J1 = {}, generic T: K where .K1 = U and .K2 = () and .K3 = {}) { // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `K where .(K.K2) = () and .(K.K1) = U as I & J and .(K.K3) = {}` into type implementing `K where .(K.K2) = .(K.K1).(I.I1) and .(K.K3) = .(K.K1).(J.J1)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(U, T); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE-31]]:31: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused U:! I & J, unused T:! K where .K2 = .K1.I1 and .K3 = .K1.J1) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE-31]]:46: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic U: I & J, unused generic T: K where .K2 = .K1.I1 and .K3 = .K1.J1) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(U, T); } // K3 = J1 fails since J1 = {} and K3 is unspecified. -fn G4(U:! I & J where .I1 = () and .J1 = {}, T:! K where .K1 = U and .K2 = ()) { +fn G4(generic U: I & J where .I1 = () and .J1 = {}, generic T: K where .K1 = U and .K2 = ()) { // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `K where .(K.K2) = () and .(K.K1) = U as I & J` into type implementing `K where .(K.K2) = .(K.K1).(I.I1) and .(K.K3) = .(K.K1).(J.J1)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(U, T); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE-43]]:31: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused U:! I & J, unused T:! K where .K2 = .K1.I1 and .K3 = .K1.J1) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE-43]]:46: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic U: I & J, unused generic T: K where .K2 = .K1.I1 and .K3 = .K1.J1) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(U, T); } // K3 = J1 fails since K3 = {} and J1 is unspecified. -fn G5(U:! I & J where .I1 = (), T:! K where .K1 = U and .K2 = () and .K3 = {}) { +fn G5(generic U: I & J where .I1 = (), generic T: K where .K1 = U and .K2 = () and .K3 = {}) { // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `K where .(K.K2) = () and .(K.K1) = U as I & J and .(K.K3) = {}` into type implementing `K where .(K.K2) = .(K.K1).(I.I1) and .(K.K3) = .(K.K1).(J.J1)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(U, T); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE-55]]:31: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused U:! I & J, unused T:! K where .K2 = .K1.I1 and .K3 = .K1.J1) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrite_requires_subst_in_nested_access_of_other_with_two_witnesses_wrong_type.carbon:[[@LINE-55]]:46: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic U: I & J, unused generic T: K where .K2 = .K1.I1 and .K3 = .K1.J1) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(U, T); } @@ -1078,21 +1078,21 @@ fn G5(U:! I & J where .I1 = (), T:! K where .K1 = U and .K2 = () and .K3 = {}) { library "[[@TEST_NAME]]"; interface I { - let I1:! type; - let I2:! type; - let I3:! type; - let I4:! type; + let I1: type; + let I2: type; + let I3: type; + let I4: type; } -fn F(unused T:! I where .I1 = () and .I2 = ()) {} +fn F(unused generic T: I where .I1 = () and .I2 = ()) {} -fn G(T:! I where .I1 = .I2) { +fn G(generic T: I where .I1 = .I2) { // CHECK:STDERR: fail_target_rewrites_dont_apply_to_source.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `I where .(I.I1) = .(I.I2)` into type implementing `I where .(I.I1) = () and .(I.I2) = ()` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_target_rewrites_dont_apply_to_source.carbon:[[@LINE-6]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I where .I1 = () and .I2 = ()) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_target_rewrites_dont_apply_to_source.carbon:[[@LINE-6]]:21: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I where .I1 = () and .I2 = ()) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -1101,17 +1101,17 @@ fn G(T:! I where .I1 = .I2) { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } -constraint NI(V:! type) { +constraint NI(V: type) { extend require impls I where .Y = V; } -fn F(T:! I where .X = NI({}), unused U:! T.X) {} +fn F(generic T: I where .X = NI({}), unused generic U: T.X) {} -fn G(T:! I where .X = NI({}), U:! I where .Y = {}) { +fn G(generic T: I where .X = NI({}), generic U: I where .Y = {}) { F(T, U); } @@ -1119,24 +1119,24 @@ fn G(T:! I where .X = NI({}), U:! I where .Y = {}) { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } -constraint NI(V:! type) { +constraint NI(V: type) { extend require impls I where .Y = V; } -fn F(unused T:! I where .X = NI({}), unused U:! I where .Y = {}) {} +fn F(unused generic T: I where .X = NI({}), unused generic U: I where .Y = {}) {} -fn G(T:! I where .X = NI({}), U:! T.X) { +fn G(generic T: I where .X = NI({}), generic U: T.X) { // TODO: This should pass, the rewrite in the constraint `NI` should be visible. // CHECK:STDERR: fail_todo_nested_facet_type_used_as_root_facet_type_in_caller.carbon:[[@LINE+7]]:3: error: cannot convert type `U` that implements `NI({})` into type implementing `I where .(I.Y) = {}` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T, U); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_todo_nested_facet_type_used_as_root_facet_type_in_caller.carbon:[[@LINE-7]]:45: note: initializing generic parameter `U` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I where .X = NI({}), unused U:! I where .Y = {}) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_nested_facet_type_used_as_root_facet_type_in_caller.carbon:[[@LINE-7]]:60: note: initializing generic parameter `U` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I where .X = NI({}), unused generic U: I where .Y = {}) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T, U); } @@ -1145,27 +1145,27 @@ fn G(T:! I where .X = NI({}), U:! T.X) { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } interface J { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } -constraint NI(V:! type) { +constraint NI(V: type) { extend require impls I where .Y = V; } -fn F(T:! I where .X = NI({}), unused U:! T.X) {} +fn F(generic T: I where .X = NI({}), unused generic U: T.X) {} -fn G(T:! I where .X = NI({}), U:! J where .Y = ()) { +fn G(generic T: I where .X = NI({}), generic U: J where .Y = ()) { // CHECK:STDERR: fail_nested_facet_type_used_as_root_facet_type_differs_in_interface.carbon:[[@LINE+7]]:3: error: cannot convert type `U` that implements `J where .(J.Y) = ()` into type implementing `NI({})` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T, U); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_nested_facet_type_used_as_root_facet_type_differs_in_interface.carbon:[[@LINE-6]]:38: note: initializing generic parameter `U` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(T:! I where .X = NI({}), unused U:! T.X) {} - // CHECK:STDERR: ^~~~~~~ + // CHECK:STDERR: fail_nested_facet_type_used_as_root_facet_type_differs_in_interface.carbon:[[@LINE-6]]:53: note: initializing generic parameter `U` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(generic T: I where .X = NI({}), unused generic U: T.X) {} + // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: F(T, U); } @@ -1174,17 +1174,17 @@ fn G(T:! I where .X = NI({}), U:! J where .Y = ()) { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } -constraint NI(V:! type) { +constraint NI(V: type) { extend require impls I where .Y = V; } -fn F(T:! I where .X = NI({}), unused U:! T.X) {} +fn F(generic T: I where .X = NI({}), unused generic U: T.X) {} -fn G(T:! I where .X = NI({}), U:! I where .Y = ()) { +fn G(generic T: I where .X = NI({}), generic U: I where .Y = ()) { // The caller's `U` has type `I where .Y = ()` but the callee wants something // of type `I where .Y = {}`. // @@ -1196,26 +1196,26 @@ fn G(T:! I where .X = NI({}), U:! I where .Y = ()) { library "[[@TEST_NAME]]"; interface I { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } -constraint NI(V:! type) { +constraint NI(V: type) { extend require impls I where .Y = V; } -fn F(unused T:! I where .X = NI({}), unused U:! I where .Y = ()) {} +fn F(unused generic T: I where .X = NI({}), unused generic U: I where .Y = ()) {} -fn G(T:! I where .X = NI({}), U:! T.X) { +fn G(generic T: I where .X = NI({}), generic U: T.X) { // The caller's `U` has type `I where .Y = {}` but the callee wants something // of type `I where .Y = ()`. // // CHECK:STDERR: fail_nested_facet_type_used_as_root_facet_type_differs_in_rewrite_caller_access.carbon:[[@LINE+7]]:3: error: cannot convert type `U` that implements `NI({})` into type implementing `I where .(I.Y) = ()` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T, U); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_nested_facet_type_used_as_root_facet_type_differs_in_rewrite_caller_access.carbon:[[@LINE-9]]:45: note: initializing generic parameter `U` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(unused T:! I where .X = NI({}), unused U:! I where .Y = ()) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_nested_facet_type_used_as_root_facet_type_differs_in_rewrite_caller_access.carbon:[[@LINE-9]]:60: note: initializing generic parameter `U` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(unused generic T: I where .X = NI({}), unused generic U: I where .Y = ()) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T, U); } @@ -1224,37 +1224,37 @@ fn G(T:! I where .X = NI({}), U:! T.X) { library "[[@TEST_NAME]]"; interface I { - let I1:! type; - let I2:! type; - let I3:! type; - let I4:! type; + let I1: type; + let I2: type; + let I3: type; + let I4: type; } -class E(T:! type) {} +class E(T: type) {} // * The LHS of `.I1` contains a `.Self` which is replaced by `C` to form // `C.(I.I1)` and resolves to `()`. // * The RHS of `.I1` is `()` which then compares equal. -fn F1(_:! I where .I1 = ()) {} +fn F1(generic _: I where .I1 = ()) {} // * The LHS of `.I2` contains a `.Self` which is replaced by `C` to form // `C.(I.I1)` and resolves to `C`. // * The RHS of `.I2` is `.Self` which is replaced by `C` and then compares // equal. -fn F2(_:! I where .I2 = .Self) {} +fn F2(generic _: I where .I2 = .Self) {} // * The LHS of `.I3` contains a `.Self` which is replaced by `C` to form // `C.(I.I1)` and resolves to `E(C)`. // * The RHS of `.I3` contains a `.Self` which is replaced by `C` to form // `E(C)`, and then compares equal. -fn F3(_:! I where .I3 = E(.Self)) {} +fn F3(generic _: I where .I3 = E(.Self)) {} // * The LHS of `.I4` contains a `.Self` which is replaced by `C` to form // `C.(I.I4)` and resolves to `.Self`. That `.Self` then is replaced by `C` so // the LHS untimately resolves to `C`. // * The RHS of `.I4` is `.Self` which is replaced by `C` and then compares // equal. -fn F4(_:! I where .I4 = .Self) {} +fn F4(generic _: I where .I4 = .Self) {} fn G() { class C; @@ -1271,14 +1271,14 @@ library "[[@TEST_NAME]]"; interface J {} interface I { - let I1:! type; + let I1: type; } -fn F(unused U:! I & J where .I1 = {}) {} +fn F(unused generic U: I & J where .I1 = {}) {} -impl forall [T:! type] T as J {} +impl forall [T: type] T as J {} -fn G(T:! I where .I1 = {}) { +fn G(generic T: I where .I1 = {}) { // Replaces `.Self` with `T`, which converts `T` to `I & J`. Doing so has to // invent a witness for `J`, and this tests we do so without losing the // information that `.I1 = {}`. @@ -1289,17 +1289,17 @@ fn G(T:! I where .I1 = {}) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } -fn G(_:! Z where .Z2 = ()) {} +fn G(generic _: Z where .Z2 = ()) {} // Split the assignment of .Z1 and the use of it into separate facet types so // that the early rewrite application doesn't get to see the value of .Z1 where // it's used. Then rewrite constraint resolution has to do the replacement of // .Z1 so that we know .Z2 = () as required by G. -fn F(T:! (Z where .Z1 = ()) & (Z where .Z2 = .Z1)) { +fn F(generic T: (Z where .Z1 = ()) & (Z where .Z2 = .Z1)) { G(T); } @@ -1307,13 +1307,13 @@ fn F(T:! (Z where .Z1 = ()) & (Z where .Z2 = .Z1)) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } -fn F(_:! Z where .Z1 = {}) {} +fn F(generic _: Z where .Z1 = {}) {} -fn G(T:! Z where .Z1 = {} and .Z2 = {}) { +fn G(generic T: Z where .Z1 = {} and .Z2 = {}) { //@dump-sem-ir-begin // We should see a conversion happen so we know the rewrite constraint is // being validated. @@ -1325,10 +1325,10 @@ fn G(T:! Z where .Z1 = {} and .Z2 = {}) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } -fn F(_:! Z where .Z1 = {}) {} +fn F(generic _: Z where .Z1 = {}) {} constraint N { // The extend means that the rewrite constraint is propagated out of `N`, so @@ -1336,14 +1336,14 @@ constraint N { extend require impls Z where .Z1 = {}; } -fn G(T:! N) { +fn G(generic T: N) { // TODO: This should pass. // CHECK:STDERR: fail_todo_rewrite_provided_by_named_constraint.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `N` into type implementing `Z where .(Z.Z1) = {}` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_todo_rewrite_provided_by_named_constraint.carbon:[[@LINE-13]]:6: note: initializing generic parameter `_` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(_:! Z where .Z1 = {}) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_rewrite_provided_by_named_constraint.carbon:[[@LINE-13]]:14: note: initializing generic parameter `_` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(generic _: Z where .Z1 = {}) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -1352,10 +1352,10 @@ fn G(T:! N) { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; + let Z1: type; } -fn F(_:! Z where .Z1 = {}) {} +fn F(generic _: Z where .Z1 = {}) {} constraint N { // Without extend, this does not actually rewrite `.Z1 = {}`, it provides the @@ -1365,13 +1365,13 @@ constraint N { require impls Z where .Z1 = {}; } -fn G(T:! N) { +fn G(generic T: N) { // CHECK:STDERR: fail_rewrite_not_provided_by_named_constraint_without_extend.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `N` into type implementing `Z where .(Z.Z1) = {}` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_rewrite_not_provided_by_named_constraint_without_extend.carbon:[[@LINE-14]]:6: note: initializing generic parameter `_` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(_:! Z where .Z1 = {}) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrite_not_provided_by_named_constraint_without_extend.carbon:[[@LINE-14]]:14: note: initializing generic parameter `_` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(generic _: Z where .Z1 = {}) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -1399,19 +1399,19 @@ fn G(T:! N) { // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%facet_value) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc10_7.2: %Z_where.type.c91) { +// CHECK:STDOUT: generic fn @G(%T.loc10_15.2: %Z_where.type.c91) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc14_6.2: type = facet_access_type %T.loc10_7.1 [symbolic = %T.as_type.loc14_6.2 (constants.%T.as_type)] -// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc10_7.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.9fe)] +// CHECK:STDOUT: %T.as_type.loc14_6.2: type = facet_access_type %T.loc10_15.1 [symbolic = %T.as_type.loc14_6.2 (constants.%T.as_type)] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc10_15.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.9fe)] // CHECK:STDOUT: %facet_value.loc14_6.2: %Z_where.type.7b9 = facet_value %T.as_type.loc14_6.2, (%Z.lookup_impl_witness) [symbolic = %facet_value.loc14_6.2 (constants.%facet_value)] // CHECK:STDOUT: %F.specific_fn.loc14_3.2: = specific_function constants.%F, @F(%facet_value.loc14_6.2) [symbolic = %F.specific_fn.loc14_3.2 (constants.%F.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref: %Z_where.type.c91 = name_ref T, %T.loc10_7.2 [symbolic = %T.loc10_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: %Z_where.type.c91 = name_ref T, %T.loc10_15.2 [symbolic = %T.loc10_15.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc14_6.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc14_6.2 (constants.%T.as_type)] // CHECK:STDOUT: %facet_value.loc14_6.1: %Z_where.type.7b9 = facet_value %T.as_type.loc14_6.1, (constants.%Z.lookup_impl_witness.9fe) [symbolic = %facet_value.loc14_6.2 (constants.%facet_value)] // CHECK:STDOUT: %.loc14: %Z_where.type.7b9 = converted %T.ref, %facet_value.loc14_6.1 [symbolic = %facet_value.loc14_6.2 (constants.%facet_value)] @@ -1424,7 +1424,7 @@ fn G(T:! N) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { -// CHECK:STDOUT: %T.patt.loc10_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc10_7.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc10_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/for/actual.carbon b/toolchain/check/testdata/for/actual.carbon index 3ff0f85e15dc..165d9ccdd37f 100644 --- a/toolchain/check/testdata/for/actual.carbon +++ b/toolchain/check/testdata/for/actual.carbon @@ -15,7 +15,7 @@ library "lib"; -class IntRange(N:! Core.IntLiteral) { +class IntRange(N: Core.IntLiteral) { fn Make(start: Core.Int(N), end: Core.Int(N)) -> Self { return {.start = start, .end = end}; } @@ -45,7 +45,7 @@ fn Range(end: i32) -> IntRange(32) { import library "lib"; -fn Read(y:! Core.IntLiteral) { +fn Read(generic y: Core.IntLiteral) { var unused x: IntRange(32) = Range(y); } @@ -1080,14 +1080,14 @@ fn Read(y:! Core.IntLiteral) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Read.decl: %Read.type = fn_decl @Read [concrete = constants.%Read] { -// CHECK:STDOUT: %y.patt.loc4_10.1: %pattern_type.dc0 = symbolic_binding_pattern y, 0 [symbolic = %y.patt.loc4_10.2 (constants.%y.patt)] +// CHECK:STDOUT: %y.patt.loc4_18.1: %pattern_type.dc0 = symbolic_binding_pattern y, 0 [symbolic = %y.patt.loc4_18.2 (constants.%y.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core.048aa3.1 [concrete = imports.%Core.048aa3.1] // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: } -// CHECK:STDOUT: %y.loc4_10.2: Core.IntLiteral = symbolic_binding y, 0 [symbolic = %y.loc4_10.1 (constants.%y)] +// CHECK:STDOUT: %y.loc4_18.2: Core.IntLiteral = symbolic_binding y, 0 [symbolic = %y.loc4_18.1 (constants.%y)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1119,20 +1119,20 @@ fn Read(y:! Core.IntLiteral) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Read(%y.loc4_10.2: Core.IntLiteral) { -// CHECK:STDOUT: %y.patt.loc4_10.2: %pattern_type.dc0 = symbolic_binding_pattern y, 0 [symbolic = %y.patt.loc4_10.2 (constants.%y.patt)] -// CHECK:STDOUT: %y.loc4_10.1: Core.IntLiteral = symbolic_binding y, 0 [symbolic = %y.loc4_10.1 (constants.%y)] +// CHECK:STDOUT: generic fn @Read(%y.loc4_18.2: Core.IntLiteral) { +// CHECK:STDOUT: %y.patt.loc4_18.2: %pattern_type.dc0 = symbolic_binding_pattern y, 0 [symbolic = %y.patt.loc4_18.2 (constants.%y.patt)] +// CHECK:STDOUT: %y.loc4_18.1: Core.IntLiteral = symbolic_binding y, 0 [symbolic = %y.loc4_18.1 (constants.%y)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %y.loc4_10.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound)] -// CHECK:STDOUT: %bound_method.loc5_38.3: = bound_method %y.loc4_10.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc5_38.3 (constants.%bound_method)] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5_38.2: init %i32 = call %bound_method.loc5_38.3(%y.loc4_10.1) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5_38.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %y.loc4_18.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound)] +// CHECK:STDOUT: %bound_method.loc5_38.3: = bound_method %y.loc4_18.1, constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc5_38.3 (constants.%bound_method)] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5_38.2: init %i32 = call %bound_method.loc5_38.3(%y.loc4_18.1) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5_38.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.var: ref %IntRange.bbd = var_storage %x.var_patt // CHECK:STDOUT: %Range.ref: %Range.type = name_ref Range, imports.%Main.Range [concrete = constants.%Range] -// CHECK:STDOUT: %y.ref: Core.IntLiteral = name_ref y, %y.loc4_10.2 [symbolic = %y.loc4_10.1 (constants.%y)] +// CHECK:STDOUT: %y.ref: Core.IntLiteral = name_ref y, %y.loc4_18.2 [symbolic = %y.loc4_18.1 (constants.%y)] // CHECK:STDOUT: %.loc5_3: ref %IntRange.bbd = splice_block %x.var {} // CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc5_38.1: = bound_method %y.ref, %impl.elem0 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound)] @@ -1216,8 +1216,8 @@ fn Read(y:! Core.IntLiteral) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Read(constants.%y) { -// CHECK:STDOUT: %y.patt.loc4_10.2 => constants.%y.patt -// CHECK:STDOUT: %y.loc4_10.1 => constants.%y +// CHECK:STDOUT: %y.patt.loc4_18.2 => constants.%y.patt +// CHECK:STDOUT: %y.loc4_18.1 => constants.%y // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @IntRange(constants.%N) { diff --git a/toolchain/check/testdata/for/pattern.carbon b/toolchain/check/testdata/for/pattern.carbon index a12d130ca07c..b58eae8f251e 100644 --- a/toolchain/check/testdata/for/pattern.carbon +++ b/toolchain/check/testdata/for/pattern.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; -class EmptyRange(T:! Core.Copy) { +class EmptyRange(T: Core.Copy) { fn Make() -> Self { return {}; } impl as Core.Iterate where .CursorType = {} and .ElementType = T { diff --git a/toolchain/check/testdata/function/builtin/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/call_from_operator.carbon index f84079c1fd1e..d93198dd4370 100644 --- a/toolchain/check/testdata/function/builtin/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/call_from_operator.carbon @@ -20,15 +20,15 @@ fn MakeIntLiteral() -> type = "int_literal.make_type"; alias IntLiteral = MakeIntLiteral(); fn Int(N: IntLiteral) -> type = "int.make_type_signed"; -interface AddWith(T:! type) { +interface AddWith(T: type) { fn Op(self, other: Self) -> Self; } -interface As(T:! type) { +interface As(T: type) { fn Convert(self) -> T; } -interface ImplicitAs(T:! type) { +interface ImplicitAs(T: type) { fn Convert(self) -> T; } @@ -223,27 +223,27 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %AddWith.decl: %AddWith.type.2ef = interface_decl @AddWith [concrete = constants.%AddWith.generic] { // CHECK:STDOUT: %T.patt.loc8_20.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_20.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_23.1: type = splice_block %.loc8_23.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_22.1: type = splice_block %.loc8_22.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_23.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_22.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_20.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %As.decl: %As.type.116 = interface_decl @As [concrete = constants.%As.generic] { // CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_18.1: type = splice_block %.loc12_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc12_17.1: type = splice_block %.loc12_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc12_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.0ff = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] { // CHECK:STDOUT: %T.patt.loc16_23.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_23.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_26.1: type = splice_block %.loc16_26.2 [concrete = type] { +// CHECK:STDOUT: %.loc16_25.1: type = splice_block %.loc16_25.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc16_26.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc16_25.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc16_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc16_23.1 (constants.%T)] // CHECK:STDOUT: } @@ -279,10 +279,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T.loc8_20.1)> [symbolic = %AddWith.type (constants.%AddWith.type.7e9)] -// CHECK:STDOUT: %Self.loc8_29.2: @AddWith.%AddWith.type (%AddWith.type.7e9) = symbolic_binding Self, 1 [symbolic = %Self.loc8_29.2 (constants.%Self.8d5)] +// CHECK:STDOUT: %Self.loc8_28.2: @AddWith.%AddWith.type (%AddWith.type.7e9) = symbolic_binding Self, 1 [symbolic = %Self.loc8_28.2 (constants.%Self.8d5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc8_29.1: @AddWith.%AddWith.type (%AddWith.type.7e9) = symbolic_binding Self, 1 [symbolic = %Self.loc8_29.2 (constants.%Self.8d5)] +// CHECK:STDOUT: %Self.loc8_28.1: @AddWith.%AddWith.type (%AddWith.type.7e9) = symbolic_binding Self, 1 [symbolic = %Self.loc8_28.2 (constants.%Self.8d5)] // CHECK:STDOUT: %AddWith.WithSelf.decl = interface_with_self_decl @AddWith [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -294,14 +294,14 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param_patt.loc9_31.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = out_param_pattern [symbolic = %return.param_patt.loc9_31.2 (constants.%return.param_patt.8c6)] // CHECK:STDOUT: %return.patt.loc9_28.1: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.131) = return_slot_pattern %return.param_patt.loc9_31.1, %.loc9_31.3 [symbolic = %return.patt.loc9_28.2 (constants.%return.patt.169)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_31.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = specific_constant @AddWith.%Self.loc8_29.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.8d5)] +// CHECK:STDOUT: %.loc9_31.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = specific_constant @AddWith.%Self.loc8_28.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.8d5)] // CHECK:STDOUT: %Self.ref.loc9_31: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = name_ref Self, %.loc9_31.2 [symbolic = %Self (constants.%Self.8d5)] // CHECK:STDOUT: %Self.as_type.loc9_31: type = facet_access_type %Self.ref.loc9_31 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] // CHECK:STDOUT: %.loc9_31.3: type = converted %Self.ref.loc9_31, %Self.as_type.loc9_31 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] // CHECK:STDOUT: %.loc9_31.4: Core.Form = init_form %.loc9_31.3 [symbolic = %.loc9_31.1 (constants.%.e80)] // CHECK:STDOUT: %self.param: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c) = value_param call_param0 // CHECK:STDOUT: %.loc9_9.1: type = splice_block %.loc9_9.3 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] { -// CHECK:STDOUT: %.loc9_9.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = specific_constant @AddWith.%Self.loc8_29.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.8d5)] +// CHECK:STDOUT: %.loc9_9.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = specific_constant @AddWith.%Self.loc8_28.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.8d5)] // CHECK:STDOUT: %Self.ref.loc9_9: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = name_ref Self, %.loc9_9.2 [symbolic = %Self (constants.%Self.8d5)] // CHECK:STDOUT: %Self.as_type.loc9_9.2: type = facet_access_type %Self.ref.loc9_9 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] // CHECK:STDOUT: %.loc9_9.3: type = converted %Self.ref.loc9_9, %Self.as_type.loc9_9.2 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] @@ -309,7 +309,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %self: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c) = wrapper_binding self, %self.param // CHECK:STDOUT: %other.param: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c) = value_param call_param1 // CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.3 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] { -// CHECK:STDOUT: %.loc9_22.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = specific_constant @AddWith.%Self.loc8_29.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.8d5)] +// CHECK:STDOUT: %.loc9_22.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = specific_constant @AddWith.%Self.loc8_28.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.8d5)] // CHECK:STDOUT: %Self.ref.loc9_22: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = name_ref Self, %.loc9_22.2 [symbolic = %Self (constants.%Self.8d5)] // CHECK:STDOUT: %Self.as_type.loc9_22: type = facet_access_type %Self.ref.loc9_22 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] // CHECK:STDOUT: %.loc9_22.3: type = converted %Self.ref.loc9_22, %Self.as_type.loc9_22 [symbolic = %Self.as_type.loc9_9.1 (constants.%Self.as_type.48c)] @@ -321,7 +321,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0.loc9_35.1: @AddWith.WithSelf.%AddWith.assoc_type (%AddWith.assoc_type.588) = assoc_entity element0, %AddWith.WithSelf.Op.decl [symbolic = %assoc0.loc9_35.2 (constants.%assoc0.aed)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc8_29.1 +// CHECK:STDOUT: .Self = %Self.loc8_28.1 // CHECK:STDOUT: .Op = @AddWith.WithSelf.%assoc0.loc9_35.1 // CHECK:STDOUT: witness = (@AddWith.WithSelf.%AddWith.WithSelf.Op.decl) // CHECK:STDOUT: @@ -337,10 +337,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T.loc12_15.1)> [symbolic = %As.type (constants.%As.type.c5f)] -// CHECK:STDOUT: %Self.loc12_24.2: @As.%As.type (%As.type.c5f) = symbolic_binding Self, 1 [symbolic = %Self.loc12_24.2 (constants.%Self.f80)] +// CHECK:STDOUT: %Self.loc12_23.2: @As.%As.type (%As.type.c5f) = symbolic_binding Self, 1 [symbolic = %Self.loc12_23.2 (constants.%Self.f80)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc12_24.1: @As.%As.type (%As.type.c5f) = symbolic_binding Self, 1 [symbolic = %Self.loc12_24.2 (constants.%Self.f80)] +// CHECK:STDOUT: %Self.loc12_23.1: @As.%As.type (%As.type.c5f) = symbolic_binding Self, 1 [symbolic = %Self.loc12_23.2 (constants.%Self.f80)] // CHECK:STDOUT: %As.WithSelf.decl = interface_with_self_decl @As [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -354,7 +354,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %.loc13_23.2: Core.Form = init_form %T.ref [symbolic = %.loc13_23.1 (constants.%.184)] // CHECK:STDOUT: %self.param: @As.WithSelf.Convert.%Self.as_type.loc13_14.1 (%Self.as_type.1ce) = value_param call_param0 // CHECK:STDOUT: %.loc13_14.1: type = splice_block %.loc13_14.3 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1ce)] { -// CHECK:STDOUT: %.loc13_14.2: @As.WithSelf.Convert.%As.type (%As.type.c5f) = specific_constant @As.%Self.loc12_24.1, @As(constants.%T) [symbolic = %Self (constants.%Self.f80)] +// CHECK:STDOUT: %.loc13_14.2: @As.WithSelf.Convert.%As.type (%As.type.c5f) = specific_constant @As.%Self.loc12_23.1, @As(constants.%T) [symbolic = %Self (constants.%Self.f80)] // CHECK:STDOUT: %Self.ref: @As.WithSelf.Convert.%As.type (%As.type.c5f) = name_ref Self, %.loc13_14.2 [symbolic = %Self (constants.%Self.f80)] // CHECK:STDOUT: %Self.as_type.loc13_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1ce)] // CHECK:STDOUT: %.loc13_14.3: type = converted %Self.ref, %Self.as_type.loc13_14.2 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1ce)] @@ -366,7 +366,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0.loc13_24.1: @As.WithSelf.%As.assoc_type (%As.assoc_type.b40) = assoc_entity element0, %As.WithSelf.Convert.decl [symbolic = %assoc0.loc13_24.2 (constants.%assoc0.a44)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc12_24.1 +// CHECK:STDOUT: .Self = %Self.loc12_23.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .Convert = @As.WithSelf.%assoc0.loc13_24.1 @@ -384,10 +384,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc16_23.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)] -// CHECK:STDOUT: %Self.loc16_32.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc16_32.2 (constants.%Self.bb1)] +// CHECK:STDOUT: %Self.loc16_31.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc16_31.2 (constants.%Self.bb1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc16_32.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc16_32.2 (constants.%Self.bb1)] +// CHECK:STDOUT: %Self.loc16_31.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc16_31.2 (constants.%Self.bb1)] // CHECK:STDOUT: %ImplicitAs.WithSelf.decl = interface_with_self_decl @ImplicitAs [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -401,7 +401,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %.loc17_23.2: Core.Form = init_form %T.ref [symbolic = %.loc17_23.1 (constants.%.184)] // CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc17_14.1 (%Self.as_type.5b8) = value_param call_param0 // CHECK:STDOUT: %.loc17_14.1: type = splice_block %.loc17_14.3 [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type.5b8)] { -// CHECK:STDOUT: %.loc17_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc16_32.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.bb1)] +// CHECK:STDOUT: %.loc17_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc16_31.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.bb1)] // CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = name_ref Self, %.loc17_14.2 [symbolic = %Self (constants.%Self.bb1)] // CHECK:STDOUT: %Self.as_type.loc17_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type.5b8)] // CHECK:STDOUT: %.loc17_14.3: type = converted %Self.ref, %Self.as_type.loc17_14.2 [symbolic = %Self.as_type.loc17_14.1 (constants.%Self.as_type.5b8)] @@ -413,7 +413,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0.loc17_24.1: @ImplicitAs.WithSelf.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.fcc) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc17_24.2 (constants.%assoc0.313)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc16_32.1 +// CHECK:STDOUT: .Self = %Self.loc16_31.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .Convert = @ImplicitAs.WithSelf.%assoc0.loc17_24.1 @@ -532,7 +532,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%N.param: Core.IntLiteral) -> out %return.param: type = "int.make_type_signed"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AddWith.WithSelf.Op(@AddWith.%T.loc8_20.2: type, @AddWith.%Self.loc8_29.1: @AddWith.%AddWith.type (%AddWith.type.7e9)) { +// CHECK:STDOUT: generic fn @AddWith.WithSelf.Op(@AddWith.%T.loc8_20.2: type, @AddWith.%Self.loc8_28.1: @AddWith.%AddWith.type (%AddWith.type.7e9)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.7e9)] // CHECK:STDOUT: %Self: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.7e9) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.8d5)] @@ -549,7 +549,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: fn(%self.param: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c), %other.param: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c)) -> out %return.param: @AddWith.WithSelf.Op.%Self.as_type.loc9_9.1 (%Self.as_type.48c); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @As.WithSelf.Convert(@As.%T.loc12_15.2: type, @As.%Self.loc12_24.1: @As.%As.type (%As.type.c5f)) { +// CHECK:STDOUT: generic fn @As.WithSelf.Convert(@As.%T.loc12_15.2: type, @As.%Self.loc12_23.1: @As.%As.type (%As.type.c5f)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.c5f)] // CHECK:STDOUT: %Self: @As.WithSelf.Convert.%As.type (%As.type.c5f) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.f80)] @@ -565,7 +565,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: fn(%self.param: @As.WithSelf.Convert.%Self.as_type.loc13_14.1 (%Self.as_type.1ce)) -> out %return.param: @As.WithSelf.Convert.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%T.loc16_23.2: type, @ImplicitAs.%Self.loc16_32.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) { +// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%T.loc16_23.2: type, @ImplicitAs.%Self.loc16_31.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)] // CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.bb1)] @@ -659,7 +659,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.7c6 -// CHECK:STDOUT: %Self.loc8_29.2 => constants.%Self.9ab +// CHECK:STDOUT: %Self.loc8_28.2 => constants.%Self.9ab // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith.WithSelf(constants.%i32.builtin, constants.%Self.8d5) { @@ -705,7 +705,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %As.type => constants.%As.type.dfb -// CHECK:STDOUT: %Self.loc12_24.2 => constants.%Self.2c0 +// CHECK:STDOUT: %Self.loc12_23.2 => constants.%Self.2c0 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As.WithSelf(constants.%i32.builtin, constants.%Self.f80) { @@ -750,7 +750,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9df -// CHECK:STDOUT: %Self.loc16_32.2 => constants.%Self.19a +// CHECK:STDOUT: %Self.loc16_31.2 => constants.%Self.19a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs.WithSelf(constants.%i32.builtin, constants.%Self.bb1) { @@ -795,7 +795,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.7cb -// CHECK:STDOUT: %Self.loc16_32.2 => constants.%Self.c40 +// CHECK:STDOUT: %Self.loc16_31.2 => constants.%Self.c40 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs.WithSelf(Core.IntLiteral, constants.%Self.bb1) { diff --git a/toolchain/check/testdata/function/call/fail_runtime_implicit_param.carbon b/toolchain/check/testdata/function/call/fail_runtime_implicit_param.carbon index 540c859488d6..5226894cd400 100644 --- a/toolchain/check/testdata/function/call/fail_runtime_implicit_param.carbon +++ b/toolchain/check/testdata/function/call/fail_runtime_implicit_param.carbon @@ -13,10 +13,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/call/fail_runtime_implicit_param.carbon // CHECK:STDERR: fail_runtime_implicit_param.carbon:[[@LINE+4]]:6: error: implicit parameters of functions must be constant [ImplictParamMustBeConstant] -// CHECK:STDERR: fn F[s: ()](); -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fn F[runtime s: ()](); +// CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: -fn F[s: ()](); +fn F[runtime s: ()](); fn Run() { F(); diff --git a/toolchain/check/testdata/function/call/form.carbon b/toolchain/check/testdata/function/call/form.carbon index 5196712d91a4..4d80a7fa4838 100644 --- a/toolchain/check/testdata/function/call/form.carbon +++ b/toolchain/check/testdata/function/call/form.carbon @@ -78,14 +78,14 @@ library "[[@TEST_NAME]]"; // CHECK:STDERR: ^~~ // CHECK:STDERR: fn F(x:? i32); -// CHECK:STDERR: fail_form_param_not_form.carbon:[[@LINE+8]]:6: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] -// CHECK:STDERR: fn G(ref x:? i32); -// CHECK:STDERR: ^~~~~ -// CHECK:STDERR: -// CHECK:STDERR: fail_form_param_not_form.carbon:[[@LINE+4]]:6: error: expected `:` binding after `ref` [ExpectedRuntimeBindingPatternAfterRef] +// CHECK:STDERR: fail_form_param_not_form.carbon:[[@LINE+8]]:6: error: `ref` is only allowed on a runtime binding [ExpectedRuntimeBindingPatternAfterRef] // CHECK:STDERR: fn G(ref x:? i32); // CHECK:STDERR: ^~~ // CHECK:STDERR: +// CHECK:STDERR: fail_form_param_not_form.carbon:[[@LINE+4]]:10: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] +// CHECK:STDERR: fn G(ref x:? i32); +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: fn G(ref x:? i32); // --- fail_missing_ref_tag.carbon @@ -108,7 +108,7 @@ fn G() { // --- form_generic_param.carbon library "[[@TEST_NAME]]"; -fn F(Fm:! Core.Form, unused x:? Fm) {} +fn F(generic Fm: Core.Form, unused x:? Fm) {} fn G() { var x: i32; @@ -118,7 +118,7 @@ fn G() { // --- fail_todo_composite_generic_form.carbon library "[[@TEST_NAME]]"; -fn F(Fm:! Core.Form, unused x:? Fm) {} +fn F(generic Fm: Core.Form, unused x:? Fm) {} fn G() { var x: i32; @@ -128,9 +128,9 @@ fn G() { // CHECK:STDERR: fail_todo_composite_generic_form.carbon:[[@LINE+7]]:3: note: type `(Core.Form, Core.Form)` does not implement interface `Core.ImplicitAs(Core.Form)` [MissingImplInMemberAccessInContext] // CHECK:STDERR: F((form(var i32), form(ref i32)), (x, ref x)); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_composite_generic_form.carbon:[[@LINE-10]]:6: note: initializing generic parameter `Fm` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(Fm:! Core.Form, unused x:? Fm) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_composite_generic_form.carbon:[[@LINE-10]]:14: note: initializing generic parameter `Fm` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(generic Fm: Core.Form, unused x:? Fm) {} + // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: F((form(var i32), form(ref i32)), (x, ref x)); } @@ -138,7 +138,7 @@ fn G() { // --- fail_todo_deduce_generic_form.carbon library "[[@TEST_NAME]]"; -fn F[Fm:! Core.Form](v:? Fm); +fn F[Fm: Core.Form](v:? Fm); fn G() { var v: i32 = 0; @@ -146,8 +146,8 @@ fn G() { // CHECK:STDERR: F(ref v); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_deduce_generic_form.carbon:[[@LINE-7]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F[Fm:! Core.Form](v:? Fm); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F[Fm: Core.Form](v:? Fm); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(ref v); } @@ -155,7 +155,7 @@ fn G() { // --- fail_form_generic_arg_not_form.carbon library "[[@TEST_NAME]]"; -fn F(Fm:! Core.Form, unused x:? Fm) {} +fn F(generic Fm: Core.Form, unused x:? Fm) {} fn G() { var x: i32; @@ -165,9 +165,9 @@ fn G() { // CHECK:STDERR: fail_form_generic_arg_not_form.carbon:[[@LINE+7]]:3: note: type `type` does not implement interface `Core.ImplicitAs(Core.Form)` [MissingImplInMemberAccessInContext] // CHECK:STDERR: F(i32, x); // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_form_generic_arg_not_form.carbon:[[@LINE-10]]:6: note: initializing generic parameter `Fm` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(Fm:! Core.Form, unused x:? Fm) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~ + // CHECK:STDERR: fail_form_generic_arg_not_form.carbon:[[@LINE-10]]:14: note: initializing generic parameter `Fm` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(generic Fm: Core.Form, unused x:? Fm) {} + // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: F(i32, x); } @@ -175,7 +175,7 @@ fn G() { // --- fail_form_generic_missing_ref_tag.carbon library "[[@TEST_NAME]]"; -fn F(Fm:! Core.Form, unused x:? Fm) {} +fn F(generic Fm: Core.Form, unused x:? Fm) {} fn G() { var x: i32; @@ -183,9 +183,9 @@ fn G() { // CHECK:STDERR: F(form(ref i32), x); // CHECK:STDERR: ^ // CHECK:STDERR: fail_form_generic_missing_ref_tag.carbon: note: initializing function parameter [InCallToFunctionParam] - // CHECK:STDERR: fail_form_generic_missing_ref_tag.carbon:[[@LINE-8]]:29: note: initializing function parameter [InCallToFunctionParam] - // CHECK:STDERR: fn F(Fm:! Core.Form, unused x:? Fm) {} - // CHECK:STDERR: ^~~~~~ + // CHECK:STDERR: fail_form_generic_missing_ref_tag.carbon:[[@LINE-8]]:36: note: initializing function parameter [InCallToFunctionParam] + // CHECK:STDERR: fn F(generic Fm: Core.Form, unused x:? Fm) {} + // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: F(form(ref i32), x); } @@ -206,7 +206,7 @@ library "[[@TEST_NAME]]"; // TODO: this code should fail for a different reason, but right now we don't // have a way to write correct code that reaches the TODO we're exercising here. -fn F(Form:! Core.Form) { +fn F(generic Form: Core.Form) { // CHECK:STDERR: fail_todo_local_symbolic_form_binding.carbon:[[@LINE+4]]:7: error: semantics TODO: `support local form bindings` [SemanticsTodo] // CHECK:STDERR: let y:? Form = 0; // CHECK:STDERR: ^~~~~~~~ @@ -274,7 +274,7 @@ fn F() ->? ref i32; library "[[@TEST_NAME]]"; //@include-in-dumps -fn F(Fm:! Core.Form, v:? Fm) ->? Fm { +fn F(generic Fm: Core.Form, v:? Fm) ->? Fm { // TODO: This should fail because `Fm` might be `form(var T)` for a // non-copyable `T`. return v; @@ -673,9 +673,9 @@ fn G() { // CHECK:STDOUT: %Fm: Core.Form = symbolic_binding Fm, 0 [symbolic] // CHECK:STDOUT: %.42f: type = type_component_of %Fm [symbolic] // CHECK:STDOUT: %pattern_type.177: type = pattern_type %.42f [symbolic] -// CHECK:STDOUT: %.f15: %pattern_type.177 = splice_inst @F.%.loc4_23.3 [template] +// CHECK:STDOUT: %.f15: %pattern_type.177 = splice_inst @F.%.loc4_30.3 [template] // CHECK:STDOUT: %v.patt.0b3: %pattern_type.177 = at_binding_pattern v, %.f15 [template] -// CHECK:STDOUT: %.677: %pattern_type.177 = splice_inst @F.%.loc4_30.3 [template] +// CHECK:STDOUT: %.677: %pattern_type.177 = splice_inst @F.%.loc4_37.3 [template] // CHECK:STDOUT: %return.patt.113: %pattern_type.177 = return_slot_pattern %.677, %.42f [template] // CHECK:STDOUT: %.cfa: = form_param_pattern_action %Fm, v [template] // CHECK:STDOUT: %.26b: %pattern_type.177 = splice_inst %.cfa [template] @@ -816,52 +816,52 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %Fm.patt.loc4_8.1: %pattern_type.13f = symbolic_binding_pattern Fm, 0 [symbolic = %Fm.patt.loc4_8.2 (constants.%Fm.patt)] -// CHECK:STDOUT: %.loc4_23.2: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_23.3 [template = %.loc4_23.4 (constants.%.f15)] -// CHECK:STDOUT: %v.patt.loc4_23.1: @F.%pattern_type (%pattern_type.177) = at_binding_pattern v, %.loc4_23.2 [template = %v.patt.loc4_23.2 (constants.%v.patt.0b3)] -// CHECK:STDOUT: %.loc4_30.2: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_30.3 [template = %.loc4_30.4 (constants.%.677)] -// CHECK:STDOUT: %return.patt.loc4_30.1: @F.%pattern_type (%pattern_type.177) = return_slot_pattern %.loc4_30.2, %.loc4_34 [template = %return.patt.loc4_30.2 (constants.%return.patt.113)] +// CHECK:STDOUT: %Fm.patt.loc4_16.1: %pattern_type.13f = symbolic_binding_pattern Fm, 0 [symbolic = %Fm.patt.loc4_16.2 (constants.%Fm.patt)] +// CHECK:STDOUT: %.loc4_30.2: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_30.3 [template = %.loc4_30.4 (constants.%.f15)] +// CHECK:STDOUT: %v.patt.loc4_30.1: @F.%pattern_type (%pattern_type.177) = at_binding_pattern v, %.loc4_30.2 [template = %v.patt.loc4_30.2 (constants.%v.patt.0b3)] +// CHECK:STDOUT: %.loc4_37.2: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_37.3 [template = %.loc4_37.4 (constants.%.677)] +// CHECK:STDOUT: %return.patt.loc4_37.1: @F.%pattern_type (%pattern_type.177) = return_slot_pattern %.loc4_37.2, %.loc4_41 [template = %return.patt.loc4_37.2 (constants.%return.patt.113)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Fm.ref.loc4_34: Core.Form = name_ref Fm, %Fm.loc4_8.2 [symbolic = %Fm.loc4_8.1 (constants.%Fm)] -// CHECK:STDOUT: %.loc4_34: type = type_component_of %Fm.ref.loc4_34 [symbolic = %.loc4_26.1 (constants.%.42f)] -// CHECK:STDOUT: %.loc4_15: type = splice_block %Form.ref [concrete = Core.Form] { +// CHECK:STDOUT: %Fm.ref.loc4_41: Core.Form = name_ref Fm, %Fm.loc4_16.2 [symbolic = %Fm.loc4_16.1 (constants.%Fm)] +// CHECK:STDOUT: %.loc4_41: type = type_component_of %Fm.ref.loc4_41 [symbolic = %.loc4_33.1 (constants.%.42f)] +// CHECK:STDOUT: %.loc4_22: type = splice_block %Form.ref [concrete = Core.Form] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Form.ref: type = name_ref Form, imports.%Core.Form [concrete = Core.Form] // CHECK:STDOUT: } -// CHECK:STDOUT: %Fm.loc4_8.2: Core.Form = symbolic_binding Fm, 0 [symbolic = %Fm.loc4_8.1 (constants.%Fm)] -// CHECK:STDOUT: %.loc4_23.1: @F.%.loc4_26.1 (%.42f) = splice_inst %.loc4_23.5 -// CHECK:STDOUT: %.loc4_26.2: Core.Form = splice_block %Fm.ref.loc4_26 [symbolic = %Fm.loc4_8.1 (constants.%Fm)] { -// CHECK:STDOUT: %Fm.ref.loc4_26: Core.Form = name_ref Fm, %Fm.loc4_8.2 [symbolic = %Fm.loc4_8.1 (constants.%Fm)] -// CHECK:STDOUT: %.loc4_26.3: type = type_component_of %Fm.ref.loc4_26 [symbolic = %.loc4_26.1 (constants.%.42f)] +// CHECK:STDOUT: %Fm.loc4_16.2: Core.Form = symbolic_binding Fm, 0 [symbolic = %Fm.loc4_16.1 (constants.%Fm)] +// CHECK:STDOUT: %.loc4_30.1: @F.%.loc4_33.1 (%.42f) = splice_inst %.loc4_30.5 +// CHECK:STDOUT: %.loc4_33.2: Core.Form = splice_block %Fm.ref.loc4_33 [symbolic = %Fm.loc4_16.1 (constants.%Fm)] { +// CHECK:STDOUT: %Fm.ref.loc4_33: Core.Form = name_ref Fm, %Fm.loc4_16.2 [symbolic = %Fm.loc4_16.1 (constants.%Fm)] +// CHECK:STDOUT: %.loc4_33.3: type = type_component_of %Fm.ref.loc4_33 [symbolic = %.loc4_33.1 (constants.%.42f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: @F.%.loc4_26.1 (%.42f) = wrapper_binding v, %.loc4_23.1 -// CHECK:STDOUT: %.loc4_30.1: @F.%.loc4_26.1 (%.42f) = splice_inst %.loc4_30.5 -// CHECK:STDOUT: %return: @F.%.loc4_26.1 (%.42f) = return_slot %.loc4_30.1 +// CHECK:STDOUT: %v: @F.%.loc4_33.1 (%.42f) = wrapper_binding v, %.loc4_30.1 +// CHECK:STDOUT: %.loc4_37.1: @F.%.loc4_33.1 (%.42f) = splice_inst %.loc4_37.5 +// CHECK:STDOUT: %return: @F.%.loc4_33.1 (%.42f) = return_slot %.loc4_37.1 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%Fm.loc4_8.2: Core.Form) { -// CHECK:STDOUT: %Fm.patt.loc4_8.2: %pattern_type.13f = symbolic_binding_pattern Fm, 0 [symbolic = %Fm.patt.loc4_8.2 (constants.%Fm.patt)] -// CHECK:STDOUT: %Fm.loc4_8.1: Core.Form = symbolic_binding Fm, 0 [symbolic = %Fm.loc4_8.1 (constants.%Fm)] -// CHECK:STDOUT: %.loc4_26.1: type = type_component_of %Fm.loc4_8.1 [symbolic = %.loc4_26.1 (constants.%.42f)] -// CHECK:STDOUT: %.loc4_23.3: = form_param_pattern_action %Fm.ref.loc4_26, v [template] -// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc4_26.1 [symbolic = %pattern_type (constants.%pattern_type.177)] -// CHECK:STDOUT: %.loc4_23.4: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_23.3 [template = %.loc4_23.4 (constants.%.f15)] -// CHECK:STDOUT: %v.patt.loc4_23.2: @F.%pattern_type (%pattern_type.177) = at_binding_pattern v, %.loc4_23.4 [template = %v.patt.loc4_23.2 (constants.%v.patt.0b3)] -// CHECK:STDOUT: %.loc4_30.3: = out_form_param_pattern_action %Fm.ref.loc4_34 [template] -// CHECK:STDOUT: %.loc4_30.4: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_30.3 [template = %.loc4_30.4 (constants.%.677)] -// CHECK:STDOUT: %return.patt.loc4_30.2: @F.%pattern_type (%pattern_type.177) = return_slot_pattern %.loc4_30.4, %.loc4_26.1 [template = %return.patt.loc4_30.2 (constants.%return.patt.113)] -// CHECK:STDOUT: %.loc4_23.5: = callee_pattern_match_action constants.%.f15, call_param0 [template] -// CHECK:STDOUT: %.loc4_30.5: = callee_pattern_match_action constants.%.677, call_param1 [template] +// CHECK:STDOUT: generic fn @F(%Fm.loc4_16.2: Core.Form) { +// CHECK:STDOUT: %Fm.patt.loc4_16.2: %pattern_type.13f = symbolic_binding_pattern Fm, 0 [symbolic = %Fm.patt.loc4_16.2 (constants.%Fm.patt)] +// CHECK:STDOUT: %Fm.loc4_16.1: Core.Form = symbolic_binding Fm, 0 [symbolic = %Fm.loc4_16.1 (constants.%Fm)] +// CHECK:STDOUT: %.loc4_33.1: type = type_component_of %Fm.loc4_16.1 [symbolic = %.loc4_33.1 (constants.%.42f)] +// CHECK:STDOUT: %.loc4_30.3: = form_param_pattern_action %Fm.ref.loc4_33, v [template] +// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc4_33.1 [symbolic = %pattern_type (constants.%pattern_type.177)] +// CHECK:STDOUT: %.loc4_30.4: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_30.3 [template = %.loc4_30.4 (constants.%.f15)] +// CHECK:STDOUT: %v.patt.loc4_30.2: @F.%pattern_type (%pattern_type.177) = at_binding_pattern v, %.loc4_30.4 [template = %v.patt.loc4_30.2 (constants.%v.patt.0b3)] +// CHECK:STDOUT: %.loc4_37.3: = out_form_param_pattern_action %Fm.ref.loc4_41 [template] +// CHECK:STDOUT: %.loc4_37.4: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_37.3 [template = %.loc4_37.4 (constants.%.677)] +// CHECK:STDOUT: %return.patt.loc4_37.2: @F.%pattern_type (%pattern_type.177) = return_slot_pattern %.loc4_37.4, %.loc4_33.1 [template = %return.patt.loc4_37.2 (constants.%return.patt.113)] +// CHECK:STDOUT: %.loc4_30.5: = callee_pattern_match_action constants.%.f15, call_param0 [template] +// CHECK:STDOUT: %.loc4_37.5: = callee_pattern_match_action constants.%.677, call_param1 [template] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %.loc4_26.1 [symbolic = %require_complete (constants.%require_complete.c9b)] +// CHECK:STDOUT: %require_complete: = require_complete_type %.loc4_33.1 [symbolic = %require_complete (constants.%require_complete.c9b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%.loc4_23.1: @F.%.loc4_26.1 (%.42f)) -> out %.loc4_30.1:? %Fm { +// CHECK:STDOUT: fn(%.loc4_30.1: @F.%.loc4_33.1 (%.42f)) -> out %.loc4_37.1:? %Fm { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.ref: @F.%.loc4_26.1 (%.42f) = name_ref v, %v +// CHECK:STDOUT: %v.ref: @F.%.loc4_33.1 (%.42f) = name_ref v, %v // CHECK:STDOUT: return %v.ref // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -954,69 +954,69 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Fm) { -// CHECK:STDOUT: %Fm.patt.loc4_8.2 => constants.%Fm.patt -// CHECK:STDOUT: %Fm.loc4_8.1 => constants.%Fm -// CHECK:STDOUT: %.loc4_26.1 => constants.%.42f -// CHECK:STDOUT: %.loc4_23.3 => constants.%.cfa +// CHECK:STDOUT: %Fm.patt.loc4_16.2 => constants.%Fm.patt +// CHECK:STDOUT: %Fm.loc4_16.1 => constants.%Fm +// CHECK:STDOUT: %.loc4_33.1 => constants.%.42f +// CHECK:STDOUT: %.loc4_30.3 => constants.%.cfa // CHECK:STDOUT: %pattern_type => constants.%pattern_type.177 -// CHECK:STDOUT: %.loc4_23.4 => constants.%.26b -// CHECK:STDOUT: %v.patt.loc4_23.2 => constants.%v.patt.cda -// CHECK:STDOUT: %.loc4_30.3 => constants.%.94f -// CHECK:STDOUT: %.loc4_30.4 => constants.%.1ac -// CHECK:STDOUT: %return.patt.loc4_30.2 => constants.%return.patt.333 -// CHECK:STDOUT: %.loc4_23.5 => constants.%.095 -// CHECK:STDOUT: %.loc4_30.5 => constants.%.efc +// CHECK:STDOUT: %.loc4_30.4 => constants.%.26b +// CHECK:STDOUT: %v.patt.loc4_30.2 => constants.%v.patt.cda +// CHECK:STDOUT: %.loc4_37.3 => constants.%.94f +// CHECK:STDOUT: %.loc4_37.4 => constants.%.1ac +// CHECK:STDOUT: %return.patt.loc4_37.2 => constants.%return.patt.333 +// CHECK:STDOUT: %.loc4_30.5 => constants.%.095 +// CHECK:STDOUT: %.loc4_37.5 => constants.%.efc // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%.795) { -// CHECK:STDOUT: %Fm.patt.loc4_8.2 => constants.%Fm.patt -// CHECK:STDOUT: %Fm.loc4_8.1 => constants.%.795 -// CHECK:STDOUT: %.loc4_26.1 => constants.%i32 -// CHECK:STDOUT: %.loc4_23.3 => constants.%inst.splice_block +// CHECK:STDOUT: %Fm.patt.loc4_16.2 => constants.%Fm.patt +// CHECK:STDOUT: %Fm.loc4_16.1 => constants.%.795 +// CHECK:STDOUT: %.loc4_33.1 => constants.%i32 +// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.splice_block // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6 -// CHECK:STDOUT: %.loc4_23.4 => constants.%v.var_patt.13561f.1 -// CHECK:STDOUT: %v.patt.loc4_23.2 => constants.%v.patt.b2b -// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.out_param_pattern -// CHECK:STDOUT: %.loc4_30.4 => constants.%return.param_patt.a9a4c7.1 -// CHECK:STDOUT: %return.patt.loc4_30.2 => constants.%return.patt.e1b -// CHECK:STDOUT: %.loc4_23.5 => constants.%.095 -// CHECK:STDOUT: %.loc4_30.5 => constants.%.efc +// CHECK:STDOUT: %.loc4_30.4 => constants.%v.var_patt.13561f.1 +// CHECK:STDOUT: %v.patt.loc4_30.2 => constants.%v.patt.b2b +// CHECK:STDOUT: %.loc4_37.3 => constants.%inst.out_param_pattern +// CHECK:STDOUT: %.loc4_37.4 => constants.%return.param_patt.a9a4c7.1 +// CHECK:STDOUT: %return.patt.loc4_37.2 => constants.%return.patt.e1b +// CHECK:STDOUT: %.loc4_30.5 => constants.%.095 +// CHECK:STDOUT: %.loc4_37.5 => constants.%.efc // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%.512) { -// CHECK:STDOUT: %Fm.patt.loc4_8.2 => constants.%Fm.patt -// CHECK:STDOUT: %Fm.loc4_8.1 => constants.%.512 -// CHECK:STDOUT: %.loc4_26.1 => constants.%i32 -// CHECK:STDOUT: %.loc4_23.3 => constants.%inst.ref_param_pattern +// CHECK:STDOUT: %Fm.patt.loc4_16.2 => constants.%Fm.patt +// CHECK:STDOUT: %Fm.loc4_16.1 => constants.%.512 +// CHECK:STDOUT: %.loc4_33.1 => constants.%i32 +// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.ref_param_pattern // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6 -// CHECK:STDOUT: %.loc4_23.4 => constants.%v.param_patt.e9ad17.1 -// CHECK:STDOUT: %v.patt.loc4_23.2 => constants.%v.patt.5c0 -// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.ref_return_pattern -// CHECK:STDOUT: %.loc4_30.4 => constants.%.ae0167.1 -// CHECK:STDOUT: %return.patt.loc4_30.2 => constants.%return.patt.c62 -// CHECK:STDOUT: %.loc4_23.5 => constants.%.095 -// CHECK:STDOUT: %.loc4_30.5 => constants.%.efc +// CHECK:STDOUT: %.loc4_30.4 => constants.%v.param_patt.e9ad17.1 +// CHECK:STDOUT: %v.patt.loc4_30.2 => constants.%v.patt.5c0 +// CHECK:STDOUT: %.loc4_37.3 => constants.%inst.ref_return_pattern +// CHECK:STDOUT: %.loc4_37.4 => constants.%.ae0167.1 +// CHECK:STDOUT: %return.patt.loc4_37.2 => constants.%return.patt.c62 +// CHECK:STDOUT: %.loc4_30.5 => constants.%.095 +// CHECK:STDOUT: %.loc4_37.5 => constants.%.efc // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%.c2a) { -// CHECK:STDOUT: %Fm.patt.loc4_8.2 => constants.%Fm.patt -// CHECK:STDOUT: %Fm.loc4_8.1 => constants.%.c2a -// CHECK:STDOUT: %.loc4_26.1 => constants.%i32 -// CHECK:STDOUT: %.loc4_23.3 => constants.%inst.value_param_pattern +// CHECK:STDOUT: %Fm.patt.loc4_16.2 => constants.%Fm.patt +// CHECK:STDOUT: %Fm.loc4_16.1 => constants.%.c2a +// CHECK:STDOUT: %.loc4_33.1 => constants.%i32 +// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.value_param_pattern // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6 -// CHECK:STDOUT: %.loc4_23.4 => constants.%v.param_patt.733534.1 -// CHECK:STDOUT: %v.patt.loc4_23.2 => constants.%v.patt.971 -// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.value_return_pattern -// CHECK:STDOUT: %.loc4_30.4 => constants.%.1a588f.1 -// CHECK:STDOUT: %return.patt.loc4_30.2 => constants.%return.patt.45a -// CHECK:STDOUT: %.loc4_23.5 => constants.%.095 -// CHECK:STDOUT: %.loc4_30.5 => constants.%.efc +// CHECK:STDOUT: %.loc4_30.4 => constants.%v.param_patt.733534.1 +// CHECK:STDOUT: %v.patt.loc4_30.2 => constants.%v.patt.971 +// CHECK:STDOUT: %.loc4_37.3 => constants.%inst.value_return_pattern +// CHECK:STDOUT: %.loc4_37.4 => constants.%.1a588f.1 +// CHECK:STDOUT: %return.patt.loc4_37.2 => constants.%return.patt.45a +// CHECK:STDOUT: %.loc4_30.5 => constants.%.095 +// CHECK:STDOUT: %.loc4_37.5 => constants.%.efc // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a diff --git a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon index 07e3d2f759d2..298104ac0fbf 100644 --- a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon +++ b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon @@ -17,7 +17,7 @@ library "[[@TEST_NAME]]"; // F in the lexical scope. -class Class(F:! type) { +class Class(F: type) { class Inner { // F in a non-lexical scope. fn F() -> i32 { return 0; } @@ -25,7 +25,7 @@ class Class(F:! type) { } } -fn Class(F:! type).Inner.G() -> i32 { return F(); } +fn Class(F: type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: --- prefer_unqualified_lookup.carbon // CHECK:STDOUT: @@ -95,9 +95,9 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { // CHECK:STDOUT: %F.patt.loc5_14.1: %pattern_type.98f = symbolic_binding_pattern F, 0 [symbolic = %F.patt.loc5_14.2 (constants.%F.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_16.1: type = splice_block %.loc5_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %F.loc5_14.2: type = symbolic_binding F, 0 [symbolic = %F.loc5_14.1 (constants.%F)] // CHECK:STDOUT: } @@ -105,13 +105,13 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc13 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_14.1: type = splice_block %.loc13_14.2 [concrete = type] { +// CHECK:STDOUT: %.loc13_13.1: type = splice_block %.loc13_13.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_14.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc13_13.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %F.loc13_11: type = symbolic_binding F, 0 [symbolic = @Class.%F.loc5_14.1 (constants.%F)] // CHECK:STDOUT: %i32.loc13: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc13_33: Core.Form = init_form %i32.loc13 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc13_32: Core.Form = init_form %i32.loc13 [concrete = constants.%.795] // CHECK:STDOUT: %return.param.loc13: ref %i32 = out_param call_param0 // CHECK:STDOUT: %return.loc13: ref %i32 = return_slot %return.param.loc13 // CHECK:STDOUT: } @@ -192,17 +192,17 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Inner.G(@Class.%F.loc5_14.2: type) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %F.loc13_46: type = symbolic_binding F, 0 [symbolic = %F.loc13_46 (constants.%F)] -// CHECK:STDOUT: %Inner.F.type: type = fn_type @Inner.F, @Inner(%F.loc13_46) [symbolic = %Inner.F.type (constants.%Inner.F.type)] +// CHECK:STDOUT: %F.loc13_45: type = symbolic_binding F, 0 [symbolic = %F.loc13_45 (constants.%F)] +// CHECK:STDOUT: %Inner.F.type: type = fn_type @Inner.F, @Inner(%F.loc13_45) [symbolic = %Inner.F.type (constants.%Inner.F.type)] // CHECK:STDOUT: %Inner.F: @Inner.G.%Inner.F.type (%Inner.F.type) = struct_value () [symbolic = %Inner.F (constants.%Inner.F)] -// CHECK:STDOUT: %Inner.F.specific_fn.loc13_46.2: = specific_function %Inner.F, @Inner.F(%F.loc13_46) [symbolic = %Inner.F.specific_fn.loc13_46.2 (constants.%Inner.F.specific_fn)] +// CHECK:STDOUT: %Inner.F.specific_fn.loc13_45.2: = specific_function %Inner.F, @Inner.F(%F.loc13_45) [symbolic = %Inner.F.specific_fn.loc13_45.2 (constants.%Inner.F.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param.loc13: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_46: @Inner.G.%Inner.F.type (%Inner.F.type) = specific_constant @Inner.%Inner.F.decl, @Inner(constants.%F) [symbolic = %Inner.F (constants.%Inner.F)] -// CHECK:STDOUT: %F.ref: @Inner.G.%Inner.F.type (%Inner.F.type) = name_ref F, %.loc13_46 [symbolic = %Inner.F (constants.%Inner.F)] -// CHECK:STDOUT: %Inner.F.specific_fn.loc13_46.1: = specific_function %F.ref, @Inner.F(constants.%F) [symbolic = %Inner.F.specific_fn.loc13_46.2 (constants.%Inner.F.specific_fn)] -// CHECK:STDOUT: %Inner.F.call: init %i32 = call %Inner.F.specific_fn.loc13_46.1() +// CHECK:STDOUT: %.loc13_45: @Inner.G.%Inner.F.type (%Inner.F.type) = specific_constant @Inner.%Inner.F.decl, @Inner(constants.%F) [symbolic = %Inner.F (constants.%Inner.F)] +// CHECK:STDOUT: %F.ref: @Inner.G.%Inner.F.type (%Inner.F.type) = name_ref F, %.loc13_45 [symbolic = %Inner.F (constants.%Inner.F)] +// CHECK:STDOUT: %Inner.F.specific_fn.loc13_45.1: = specific_function %F.ref, @Inner.F(constants.%F) [symbolic = %Inner.F.specific_fn.loc13_45.2 (constants.%Inner.F.specific_fn)] +// CHECK:STDOUT: %Inner.F.call: init %i32 = call %Inner.F.specific_fn.loc13_45.1() // CHECK:STDOUT: return %Inner.F.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: diff --git a/toolchain/check/testdata/function/declaration/fail_todo_no_params.carbon b/toolchain/check/testdata/function/declaration/fail_todo_no_params.carbon index ef649f917e1d..dfb3e0fbe78d 100644 --- a/toolchain/check/testdata/function/declaration/fail_todo_no_params.carbon +++ b/toolchain/check/testdata/function/declaration/fail_todo_no_params.carbon @@ -67,15 +67,15 @@ fn A => 0; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_invalid_file_generic_regression_test.carbon:[[@LINE+8]]:5: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] -// CHECK:STDERR: var x:! () = (); -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: fail_invalid_file_generic_regression_test.carbon:[[@LINE+8]]:13: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] +// CHECK:STDERR: var generic x: () = (); +// CHECK:STDERR: ^~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_invalid_file_generic_regression_test.carbon:[[@LINE+4]]:12: error: found `:!` pattern inside `var` pattern [NonRegularBindingInVarDecl] -// CHECK:STDERR: var x:! () = (); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_invalid_file_generic_regression_test.carbon:[[@LINE+4]]:19: error: found generic binding inside `var` pattern [NonRegularBindingInVarDecl] +// CHECK:STDERR: var generic x: () = (); +// CHECK:STDERR: ^ // CHECK:STDERR: -var x:! () = (); +var generic x: () = (); fn A { A(); diff --git a/toolchain/check/testdata/function/definition/syntactic_merge.carbon b/toolchain/check/testdata/function/definition/syntactic_merge.carbon index 22155130ff53..ce7484966937 100644 --- a/toolchain/check/testdata/function/definition/syntactic_merge.carbon +++ b/toolchain/check/testdata/function/definition/syntactic_merge.carbon @@ -57,23 +57,23 @@ library "[[@TEST_NAME]]"; class C {} // CHECK:STDERR: fail_only_implicit_params.carbon:[[@LINE+8]]:8: error: implicit parameters of functions must be constant [ImplictParamMustBeConstant] -// CHECK:STDERR: fn Foo[a: C]; -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: fn Foo[runtime a: C]; +// CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_only_implicit_params.carbon:[[@LINE+4]]:1: error: semantics TODO: `function with positional parameters` [SemanticsTodo] -// CHECK:STDERR: fn Foo[a: C]; -// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: fn Foo[runtime a: C]; +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn Foo[a: C]; +fn Foo[runtime a: C]; // CHECK:STDERR: fail_only_implicit_params.carbon:[[@LINE+8]]:8: error: implicit parameters of functions must be constant [ImplictParamMustBeConstant] -// CHECK:STDERR: fn Foo[a: (C)] {} -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: fn Foo[runtime a: (C)] {} +// CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_only_implicit_params.carbon:[[@LINE+4]]:1: error: semantics TODO: `function with positional parameters` [SemanticsTodo] -// CHECK:STDERR: fn Foo[a: (C)] {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn Foo[runtime a: (C)] {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn Foo[a: (C)] {} +fn Foo[runtime a: (C)] {} // --- fail_raw_identifier.carbon @@ -149,15 +149,15 @@ library "[[@TEST_NAME]]"; class C {} alias D = C; -fn Foo[a:! C](); -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] -// CHECK:STDERR: fn Foo[unused a:! D]() {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:12: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] -// CHECK:STDERR: fn Foo[a:! C](); -// CHECK:STDERR: ^ +fn Foo[a: C](); +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:18: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] +// CHECK:STDERR: fn Foo[unused a: D]() {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:11: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] +// CHECK:STDERR: fn Foo[a: C](); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn Foo[unused a:! D]() {} +fn Foo[unused a: D]() {} // --- todo_fail_alias_in_return.carbon diff --git a/toolchain/check/testdata/function/generic/call.carbon b/toolchain/check/testdata/function/generic/call.carbon index 73b7dbeaebc2..0aeb04c89f14 100644 --- a/toolchain/check/testdata/function/generic/call.carbon +++ b/toolchain/check/testdata/function/generic/call.carbon @@ -15,18 +15,18 @@ library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -fn Function(T:! Core.Copy, x: T) -> T { +fn Function(generic T: Core.Copy, x: T) -> T { return x; } //@dump-sem-ir-end -fn CallGeneric(T:! Core.Copy, x: T) -> T { +fn CallGeneric(generic T: Core.Copy, x: T) -> T { //@dump-sem-ir-begin return Function(T, x); //@dump-sem-ir-end } -fn CallGenericPtr(T:! type, x: T*) -> T* { +fn CallGenericPtr(generic T: type, x: T*) -> T* { //@dump-sem-ir-begin return Function(T*, x); //@dump-sem-ir-end @@ -45,18 +45,18 @@ fn CallSpecific(x: C*) -> C* { library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -fn Function[T:! Core.Copy](x: T) -> T { +fn Function[T: Core.Copy](x: T) -> T { return x; } //@dump-sem-ir-end -fn CallGeneric(T:! Core.Copy, x: T) -> T { +fn CallGeneric(generic T: Core.Copy, x: T) -> T { //@dump-sem-ir-begin return Function(x); //@dump-sem-ir-end } -fn CallGenericPtr(T:! type, x: T*) -> T* { +fn CallGenericPtr(generic T: type, x: T*) -> T* { //@dump-sem-ir-begin return Function(x); //@dump-sem-ir-end @@ -149,109 +149,109 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %Function.decl: %Function.type = fn_decl @Function [concrete = constants.%Function] { -// CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.fe6)] -// CHECK:STDOUT: %x.param_patt.loc5_29.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc5_29.2 (constants.%x.param_patt.1f4)] -// CHECK:STDOUT: %x.patt.loc5_29.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc5_29.1 [symbolic = %x.patt.loc5_29.2 (constants.%x.patt.f93)] -// CHECK:STDOUT: %return.param_patt.loc5_37.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc5_37.2 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc5_34.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc5_37.1, %.loc5_37.3 [symbolic = %return.patt.loc5_34.2 (constants.%return.patt.f44)] +// CHECK:STDOUT: %T.patt.loc5_22.1: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_22.2 (constants.%T.patt.fe6)] +// CHECK:STDOUT: %x.param_patt.loc5_36.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc5_36.2 (constants.%x.param_patt.1f4)] +// CHECK:STDOUT: %x.patt.loc5_36.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc5_36.1 [symbolic = %x.patt.loc5_36.2 (constants.%x.patt.f93)] +// CHECK:STDOUT: %return.param_patt.loc5_44.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc5_44.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc5_41.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc5_44.1, %.loc5_44.3 [symbolic = %return.patt.loc5_41.2 (constants.%return.patt.f44)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc5_37: %Copy.type = name_ref T, %T.loc5_14.2 [symbolic = %T.loc5_14.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc5_37: type = facet_access_type %T.ref.loc5_37 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc5_37.3: type = converted %T.ref.loc5_37, %T.as_type.loc5_37 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc5_37.4: Core.Form = init_form %.loc5_37.3 [symbolic = %.loc5_37.2 (constants.%.1ce700.2)] -// CHECK:STDOUT: %.loc5_21: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { +// CHECK:STDOUT: %T.ref.loc5_44: %Copy.type = name_ref T, %T.loc5_22.2 [symbolic = %T.loc5_22.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc5_44: type = facet_access_type %T.ref.loc5_44 [symbolic = %T.as_type.loc5_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc5_44.3: type = converted %T.ref.loc5_44, %T.as_type.loc5_44 [symbolic = %T.as_type.loc5_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc5_44.4: Core.Form = init_form %.loc5_44.3 [symbolic = %.loc5_44.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %.loc5_28: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc5_14.2: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.f84)] -// CHECK:STDOUT: %x.param: @Function.%T.as_type.loc5_31.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc5_31.1: type = splice_block %.loc5_31.2 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc5_31: %Copy.type = name_ref T, %T.loc5_14.2 [symbolic = %T.loc5_14.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc5_31.2: type = facet_access_type %T.ref.loc5_31 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc5_31.2: type = converted %T.ref.loc5_31, %T.as_type.loc5_31.2 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc5_22.2: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc5_22.1 (constants.%T.f84)] +// CHECK:STDOUT: %x.param: @Function.%T.as_type.loc5_38.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc5_38.1: type = splice_block %.loc5_38.2 [symbolic = %T.as_type.loc5_38.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref.loc5_38: %Copy.type = name_ref T, %T.loc5_22.2 [symbolic = %T.loc5_22.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc5_38.2: type = facet_access_type %T.ref.loc5_38 [symbolic = %T.as_type.loc5_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc5_38.2: type = converted %T.ref.loc5_38, %T.as_type.loc5_38.2 [symbolic = %T.as_type.loc5_38.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @Function.%T.as_type.loc5_31.1 (%T.as_type) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @Function.%T.as_type.loc5_31.1 (%T.as_type) = out_param call_param1 -// CHECK:STDOUT: %return: ref @Function.%T.as_type.loc5_31.1 (%T.as_type) = return_slot %return.param +// CHECK:STDOUT: %x: @Function.%T.as_type.loc5_38.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %return.param: ref @Function.%T.as_type.loc5_38.1 (%T.as_type) = out_param call_param1 +// CHECK:STDOUT: %return: ref @Function.%T.as_type.loc5_38.1 (%T.as_type) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Function(%T.loc5_14.2: %Copy.type) { -// CHECK:STDOUT: %T.patt.loc5_14.2: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.fe6)] -// CHECK:STDOUT: %T.loc5_14.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc5_31.1: type = facet_access_type %T.loc5_14.1 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc5_31.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)] -// CHECK:STDOUT: %x.param_patt.loc5_29.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc5_29.2 (constants.%x.param_patt.1f4)] -// CHECK:STDOUT: %x.patt.loc5_29.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc5_29.2 [symbolic = %x.patt.loc5_29.2 (constants.%x.patt.f93)] -// CHECK:STDOUT: %.loc5_37.2: Core.Form = init_form %T.as_type.loc5_31.1 [symbolic = %.loc5_37.2 (constants.%.1ce700.2)] -// CHECK:STDOUT: %return.param_patt.loc5_37.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc5_37.2 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc5_34.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc5_37.2, %T.as_type.loc5_31.1 [symbolic = %return.patt.loc5_34.2 (constants.%return.patt.f44)] +// CHECK:STDOUT: generic fn @Function(%T.loc5_22.2: %Copy.type) { +// CHECK:STDOUT: %T.patt.loc5_22.2: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_22.2 (constants.%T.patt.fe6)] +// CHECK:STDOUT: %T.loc5_22.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc5_22.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc5_38.1: type = facet_access_type %T.loc5_22.1 [symbolic = %T.as_type.loc5_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc5_38.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)] +// CHECK:STDOUT: %x.param_patt.loc5_36.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc5_36.2 (constants.%x.param_patt.1f4)] +// CHECK:STDOUT: %x.patt.loc5_36.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc5_36.2 [symbolic = %x.patt.loc5_36.2 (constants.%x.patt.f93)] +// CHECK:STDOUT: %.loc5_44.2: Core.Form = init_form %T.as_type.loc5_38.1 [symbolic = %.loc5_44.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %return.param_patt.loc5_44.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc5_44.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc5_41.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc5_44.2, %T.as_type.loc5_38.1 [symbolic = %return.patt.loc5_41.2 (constants.%return.patt.f44)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc5_31.1 [symbolic = %require_complete (constants.%require_complete.d83)] -// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%T.loc5_14.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.2)] -// CHECK:STDOUT: %.loc6_10.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc5_14.1 [symbolic = %.loc6_10.3 (constants.%.c29)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc5_14.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc5_38.1 [symbolic = %require_complete (constants.%require_complete.d83)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%T.loc5_22.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.2)] +// CHECK:STDOUT: %.loc6_10.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc5_22.1 [symbolic = %.loc6_10.3 (constants.%.c29)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc5_22.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c)] // CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6_10.3 (%.c29) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.bd2)] -// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%T.loc5_14.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.e2a)] +// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%T.loc5_22.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.e2a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @Function.%T.as_type.loc5_31.1 (%T.as_type)) -> out %return.param: @Function.%T.as_type.loc5_31.1 (%T.as_type) { +// CHECK:STDOUT: fn(%x.param: @Function.%T.as_type.loc5_38.1 (%T.as_type)) -> out %return.param: @Function.%T.as_type.loc5_38.1 (%T.as_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @Function.%T.as_type.loc5_31.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @Function.%T.as_type.loc5_38.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6_10.3 (%.c29) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.bd2)] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %x.ref, %impl.elem0.loc6_10.1 -// CHECK:STDOUT: %.loc6_10.1: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc5_14.1 (constants.%T.f84)] -// CHECK:STDOUT: %.loc6_10.2: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc5_14.1 (constants.%T.f84)] +// CHECK:STDOUT: %.loc6_10.1: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc5_22.1 (constants.%T.f84)] +// CHECK:STDOUT: %.loc6_10.2: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc5_22.1 (constants.%T.f84)] // CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.WithSelf.Op(constants.%T.f84) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.e2a)] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %x.ref, %specific_impl_fn.loc6_10.1 -// CHECK:STDOUT: %.loc5_37.1: ref @Function.%T.as_type.loc5_31.1 (%T.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Function.%T.as_type.loc5_31.1 (%T.as_type) to %.loc5_37.1 = call %bound_method.loc6_10.2(%x.ref) +// CHECK:STDOUT: %.loc5_44.1: ref @Function.%T.as_type.loc5_38.1 (%T.as_type) = splice_block %return.param {} +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Function.%T.as_type.loc5_38.1 (%T.as_type) to %.loc5_44.1 = call %bound_method.loc6_10.2(%x.ref) // CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGeneric(%T.loc10_17.2: %Copy.type) { +// CHECK:STDOUT: generic fn @CallGeneric(%T.loc10_25.2: %Copy.type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Function.specific_fn.loc12_10.2: = specific_function constants.%Function, @Function(%T.loc10_17.1) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.4db)] +// CHECK:STDOUT: %Function.specific_fn.loc12_10.2: = specific_function constants.%Function, @Function(%T.loc10_25.1) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.4db)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type)) -> out %return.param: @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type) { +// CHECK:STDOUT: fn(%x.param: @CallGeneric.%T.as_type.loc10_41.1 (%T.as_type)) -> out %return.param: @CallGeneric.%T.as_type.loc10_41.1 (%T.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [concrete = constants.%Function] -// CHECK:STDOUT: %T.ref.loc12: %Copy.type = name_ref T, %T.loc10_17.2 [symbolic = %T.loc10_17.1 (constants.%T.f84)] -// CHECK:STDOUT: %x.ref: @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type) = name_ref x, %x -// CHECK:STDOUT: %.loc12_23.1: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc10_17.1 (constants.%T.f84)] -// CHECK:STDOUT: %.loc12_23.2: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc10_17.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.ref.loc12: %Copy.type = name_ref T, %T.loc10_25.2 [symbolic = %T.loc10_25.1 (constants.%T.f84)] +// CHECK:STDOUT: %x.ref: @CallGeneric.%T.as_type.loc10_41.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %.loc12_23.1: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc10_25.1 (constants.%T.f84)] +// CHECK:STDOUT: %.loc12_23.2: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc10_25.1 (constants.%T.f84)] // CHECK:STDOUT: %Function.specific_fn.loc12_10.1: = specific_function %Function.ref, @Function(constants.%T.f84) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.4db)] // CHECK:STDOUT: -// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type) to %.loc10_40.1 = call %Function.specific_fn.loc12_10.1(%x.ref) +// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.as_type.loc10_41.1 (%T.as_type) to %.loc10_47.1 = call %Function.specific_fn.loc12_10.1(%x.ref) // CHECK:STDOUT: return %Function.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGenericPtr(%T.loc16_20.2: type) { +// CHECK:STDOUT: generic fn @CallGenericPtr(%T.loc16_28.2: type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %.loc18_24.4: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc16_20.1) [symbolic = %.loc18_24.4 (constants.%.0e9)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_33.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] -// CHECK:STDOUT: %Copy.facet.loc18_24.4: %Copy.type = facet_value %ptr.loc16_33.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc18_24.4 (constants.%Copy.facet.302)] +// CHECK:STDOUT: %.loc18_24.4: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc16_28.1) [symbolic = %.loc18_24.4 (constants.%.0e9)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_40.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] +// CHECK:STDOUT: %Copy.facet.loc18_24.4: %Copy.type = facet_value %ptr.loc16_40.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc18_24.4 (constants.%Copy.facet.302)] // CHECK:STDOUT: %Function.specific_fn.loc18_10.2: = specific_function constants.%Function, @Function(%Copy.facet.loc18_24.4) [symbolic = %Function.specific_fn.loc18_10.2 (constants.%Function.specific_fn.162)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f)) -> out %return.param: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f) { +// CHECK:STDOUT: fn(%x.param: @CallGenericPtr.%ptr.loc16_40.1 (%ptr.e8f)) -> out %return.param: @CallGenericPtr.%ptr.loc16_40.1 (%ptr.e8f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [concrete = constants.%Function] -// CHECK:STDOUT: %T.ref.loc18: type = name_ref T, %T.loc16_20.2 [symbolic = %T.loc16_20.1 (constants.%T.67d)] -// CHECK:STDOUT: %ptr.loc18: type = ptr_type %T.ref.loc18 [symbolic = %ptr.loc16_33.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %x.ref: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f) = name_ref x, %x +// CHECK:STDOUT: %T.ref.loc18: type = name_ref T, %T.loc16_28.2 [symbolic = %T.loc16_28.1 (constants.%T.67d)] +// CHECK:STDOUT: %ptr.loc18: type = ptr_type %T.ref.loc18 [symbolic = %ptr.loc16_40.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %x.ref: @CallGenericPtr.%ptr.loc16_40.1 (%ptr.e8f) = name_ref x, %x // CHECK:STDOUT: %Copy.facet.loc18_24.1: %Copy.type = facet_value %ptr.loc18, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc18_24.4 (constants.%Copy.facet.302)] // CHECK:STDOUT: %.loc18_24.1: %Copy.type = converted %ptr.loc18, %Copy.facet.loc18_24.1 [symbolic = %Copy.facet.loc18_24.4 (constants.%Copy.facet.302)] // CHECK:STDOUT: %Copy.facet.loc18_24.2: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc18_24.4 (constants.%Copy.facet.302)] @@ -259,7 +259,7 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: %Copy.facet.loc18_24.3: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc18_24.4 (constants.%Copy.facet.302)] // CHECK:STDOUT: %.loc18_24.3: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc18_24.3 [symbolic = %Copy.facet.loc18_24.4 (constants.%Copy.facet.302)] // CHECK:STDOUT: %Function.specific_fn.loc18_10.1: = specific_function %Function.ref, @Function(constants.%Copy.facet.302) [symbolic = %Function.specific_fn.loc18_10.2 (constants.%Function.specific_fn.162)] -// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f) = call %Function.specific_fn.loc18_10.1(%x.ref) +// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%ptr.loc16_40.1 (%ptr.e8f) = call %Function.specific_fn.loc18_10.1(%x.ref) // CHECK:STDOUT: return %Function.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -286,15 +286,15 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Function(constants.%T.f84) { -// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.fe6 -// CHECK:STDOUT: %T.loc5_14.1 => constants.%T.f84 -// CHECK:STDOUT: %T.as_type.loc5_31.1 => constants.%T.as_type +// CHECK:STDOUT: %T.patt.loc5_22.2 => constants.%T.patt.fe6 +// CHECK:STDOUT: %T.loc5_22.1 => constants.%T.f84 +// CHECK:STDOUT: %T.as_type.loc5_38.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2c66b4.2 -// CHECK:STDOUT: %x.param_patt.loc5_29.2 => constants.%x.param_patt.1f4 -// CHECK:STDOUT: %x.patt.loc5_29.2 => constants.%x.patt.f93 -// CHECK:STDOUT: %.loc5_37.2 => constants.%.1ce700.2 -// CHECK:STDOUT: %return.param_patt.loc5_37.2 => constants.%return.param_patt.bf4475.2 -// CHECK:STDOUT: %return.patt.loc5_34.2 => constants.%return.patt.f44 +// CHECK:STDOUT: %x.param_patt.loc5_36.2 => constants.%x.param_patt.1f4 +// CHECK:STDOUT: %x.patt.loc5_36.2 => constants.%x.patt.f93 +// CHECK:STDOUT: %.loc5_44.2 => constants.%.1ce700.2 +// CHECK:STDOUT: %return.param_patt.loc5_44.2 => constants.%return.param_patt.bf4475.2 +// CHECK:STDOUT: %return.patt.loc5_41.2 => constants.%return.patt.f44 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.d83 @@ -306,39 +306,39 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%T.f84) { -// CHECK:STDOUT: %T.patt.loc10_17.2 => constants.%T.patt.fe6 -// CHECK:STDOUT: %T.loc10_17.1 => constants.%T.f84 -// CHECK:STDOUT: %T.as_type.loc10_34.1 => constants.%T.as_type +// CHECK:STDOUT: %T.patt.loc10_25.2 => constants.%T.patt.fe6 +// CHECK:STDOUT: %T.loc10_25.1 => constants.%T.f84 +// CHECK:STDOUT: %T.as_type.loc10_41.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2c66b4.2 -// CHECK:STDOUT: %x.param_patt.loc10_32.2 => constants.%x.param_patt.1f4 -// CHECK:STDOUT: %x.patt.loc10_32.2 => constants.%x.patt.f93 -// CHECK:STDOUT: %.loc10_40.2 => constants.%.1ce700.2 -// CHECK:STDOUT: %return.param_patt.loc10_40.2 => constants.%return.param_patt.bf4475.2 -// CHECK:STDOUT: %return.patt.loc10_37.2 => constants.%return.patt.f44 +// CHECK:STDOUT: %x.param_patt.loc10_39.2 => constants.%x.param_patt.1f4 +// CHECK:STDOUT: %x.patt.loc10_39.2 => constants.%x.patt.f93 +// CHECK:STDOUT: %.loc10_47.2 => constants.%.1ce700.2 +// CHECK:STDOUT: %return.param_patt.loc10_47.2 => constants.%return.param_patt.bf4475.2 +// CHECK:STDOUT: %return.patt.loc10_44.2 => constants.%return.patt.f44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericPtr(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc16_20.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc16_20.1 => constants.%T.67d -// CHECK:STDOUT: %ptr.loc16_33.1 => constants.%ptr.e8f +// CHECK:STDOUT: %T.patt.loc16_28.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc16_28.1 => constants.%T.67d +// CHECK:STDOUT: %ptr.loc16_40.1 => constants.%ptr.e8f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 -// CHECK:STDOUT: %x.param_patt.loc16_30.2 => constants.%x.param_patt.b5c -// CHECK:STDOUT: %x.patt.loc16_30.2 => constants.%x.patt.b28 -// CHECK:STDOUT: %.loc16_40.1 => constants.%.cb6 -// CHECK:STDOUT: %return.param_patt.loc16_40.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc16_36.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %x.param_patt.loc16_37.2 => constants.%x.param_patt.b5c +// CHECK:STDOUT: %x.patt.loc16_37.2 => constants.%x.patt.b28 +// CHECK:STDOUT: %.loc16_47.1 => constants.%.cb6 +// CHECK:STDOUT: %return.param_patt.loc16_47.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc16_43.2 => constants.%return.patt.d67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Function(constants.%Copy.facet.302) { -// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.fe6 -// CHECK:STDOUT: %T.loc5_14.1 => constants.%Copy.facet.302 -// CHECK:STDOUT: %T.as_type.loc5_31.1 => constants.%ptr.e8f +// CHECK:STDOUT: %T.patt.loc5_22.2 => constants.%T.patt.fe6 +// CHECK:STDOUT: %T.loc5_22.1 => constants.%Copy.facet.302 +// CHECK:STDOUT: %T.as_type.loc5_38.1 => constants.%ptr.e8f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 -// CHECK:STDOUT: %x.param_patt.loc5_29.2 => constants.%x.param_patt.b5c -// CHECK:STDOUT: %x.patt.loc5_29.2 => constants.%x.patt.b28 -// CHECK:STDOUT: %.loc5_37.2 => constants.%.cb6 -// CHECK:STDOUT: %return.param_patt.loc5_37.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc5_34.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %x.param_patt.loc5_36.2 => constants.%x.param_patt.b5c +// CHECK:STDOUT: %x.patt.loc5_36.2 => constants.%x.patt.b28 +// CHECK:STDOUT: %.loc5_44.2 => constants.%.cb6 +// CHECK:STDOUT: %return.param_patt.loc5_44.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc5_41.2 => constants.%return.patt.d67 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 @@ -350,15 +350,15 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Function(constants.%Copy.facet.3f0) { -// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.fe6 -// CHECK:STDOUT: %T.loc5_14.1 => constants.%Copy.facet.3f0 -// CHECK:STDOUT: %T.as_type.loc5_31.1 => constants.%ptr.6b6 +// CHECK:STDOUT: %T.patt.loc5_22.2 => constants.%T.patt.fe6 +// CHECK:STDOUT: %T.loc5_22.1 => constants.%Copy.facet.3f0 +// CHECK:STDOUT: %T.as_type.loc5_38.1 => constants.%ptr.6b6 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fcb -// CHECK:STDOUT: %x.param_patt.loc5_29.2 => constants.%x.param_patt.503 -// CHECK:STDOUT: %x.patt.loc5_29.2 => constants.%x.patt.eca -// CHECK:STDOUT: %.loc5_37.2 => constants.%.8fa -// CHECK:STDOUT: %return.param_patt.loc5_37.2 => constants.%return.param_patt.ada -// CHECK:STDOUT: %return.patt.loc5_34.2 => constants.%return.patt.783 +// CHECK:STDOUT: %x.param_patt.loc5_36.2 => constants.%x.param_patt.503 +// CHECK:STDOUT: %x.patt.loc5_36.2 => constants.%x.patt.eca +// CHECK:STDOUT: %.loc5_44.2 => constants.%.8fa +// CHECK:STDOUT: %return.param_patt.loc5_44.2 => constants.%return.param_patt.ada +// CHECK:STDOUT: %return.patt.loc5_41.2 => constants.%return.patt.783 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.bf9 @@ -448,111 +448,111 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: file { // CHECK:STDOUT: %Function.decl: %Function.type = fn_decl @Function [concrete = constants.%Function] { // CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.fe6)] -// CHECK:STDOUT: %x.param_patt.loc5_29.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc5_29.2 (constants.%x.param_patt.1f4)] -// CHECK:STDOUT: %x.patt.loc5_29.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc5_29.1 [symbolic = %x.patt.loc5_29.2 (constants.%x.patt.f93)] -// CHECK:STDOUT: %return.param_patt.loc5_37.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc5_37.2 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc5_34.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc5_37.1, %.loc5_37.3 [symbolic = %return.patt.loc5_34.2 (constants.%return.patt.f44)] +// CHECK:STDOUT: %x.param_patt.loc5_28.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc5_28.2 (constants.%x.param_patt.1f4)] +// CHECK:STDOUT: %x.patt.loc5_28.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc5_28.1 [symbolic = %x.patt.loc5_28.2 (constants.%x.patt.f93)] +// CHECK:STDOUT: %return.param_patt.loc5_36.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc5_36.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc5_33.1: @Function.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc5_36.1, %.loc5_36.3 [symbolic = %return.patt.loc5_33.2 (constants.%return.patt.f44)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc5_37: %Copy.type = name_ref T, %T.loc5_14.2 [symbolic = %T.loc5_14.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc5_37: type = facet_access_type %T.ref.loc5_37 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc5_37.3: type = converted %T.ref.loc5_37, %T.as_type.loc5_37 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc5_37.4: Core.Form = init_form %.loc5_37.3 [symbolic = %.loc5_37.2 (constants.%.1ce700.2)] -// CHECK:STDOUT: %.loc5_21: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { +// CHECK:STDOUT: %T.ref.loc5_36: %Copy.type = name_ref T, %T.loc5_14.2 [symbolic = %T.loc5_14.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc5_36: type = facet_access_type %T.ref.loc5_36 [symbolic = %T.as_type.loc5_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc5_36.3: type = converted %T.ref.loc5_36, %T.as_type.loc5_36 [symbolic = %T.as_type.loc5_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc5_36.4: Core.Form = init_form %.loc5_36.3 [symbolic = %.loc5_36.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %.loc5_20: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_14.2: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.f84)] -// CHECK:STDOUT: %x.param: @Function.%T.as_type.loc5_31.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc5_31.1: type = splice_block %.loc5_31.2 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc5_31: %Copy.type = name_ref T, %T.loc5_14.2 [symbolic = %T.loc5_14.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc5_31.2: type = facet_access_type %T.ref.loc5_31 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc5_31.2: type = converted %T.ref.loc5_31, %T.as_type.loc5_31.2 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %x.param: @Function.%T.as_type.loc5_30.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc5_30.1: type = splice_block %.loc5_30.2 [symbolic = %T.as_type.loc5_30.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref.loc5_30: %Copy.type = name_ref T, %T.loc5_14.2 [symbolic = %T.loc5_14.1 (constants.%T.f84)] +// CHECK:STDOUT: %T.as_type.loc5_30.2: type = facet_access_type %T.ref.loc5_30 [symbolic = %T.as_type.loc5_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc5_30.2: type = converted %T.ref.loc5_30, %T.as_type.loc5_30.2 [symbolic = %T.as_type.loc5_30.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @Function.%T.as_type.loc5_31.1 (%T.as_type) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @Function.%T.as_type.loc5_31.1 (%T.as_type) = out_param call_param1 -// CHECK:STDOUT: %return: ref @Function.%T.as_type.loc5_31.1 (%T.as_type) = return_slot %return.param +// CHECK:STDOUT: %x: @Function.%T.as_type.loc5_30.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %return.param: ref @Function.%T.as_type.loc5_30.1 (%T.as_type) = out_param call_param1 +// CHECK:STDOUT: %return: ref @Function.%T.as_type.loc5_30.1 (%T.as_type) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Function(%T.loc5_14.2: %Copy.type) { // CHECK:STDOUT: %T.patt.loc5_14.2: %pattern_type.e81 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.fe6)] // CHECK:STDOUT: %T.loc5_14.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc5_31.1: type = facet_access_type %T.loc5_14.1 [symbolic = %T.as_type.loc5_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc5_31.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)] -// CHECK:STDOUT: %x.param_patt.loc5_29.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc5_29.2 (constants.%x.param_patt.1f4)] -// CHECK:STDOUT: %x.patt.loc5_29.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc5_29.2 [symbolic = %x.patt.loc5_29.2 (constants.%x.patt.f93)] -// CHECK:STDOUT: %.loc5_37.2: Core.Form = init_form %T.as_type.loc5_31.1 [symbolic = %.loc5_37.2 (constants.%.1ce700.2)] -// CHECK:STDOUT: %return.param_patt.loc5_37.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc5_37.2 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc5_34.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc5_37.2, %T.as_type.loc5_31.1 [symbolic = %return.patt.loc5_34.2 (constants.%return.patt.f44)] +// CHECK:STDOUT: %T.as_type.loc5_30.1: type = facet_access_type %T.loc5_14.1 [symbolic = %T.as_type.loc5_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc5_30.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)] +// CHECK:STDOUT: %x.param_patt.loc5_28.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc5_28.2 (constants.%x.param_patt.1f4)] +// CHECK:STDOUT: %x.patt.loc5_28.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc5_28.2 [symbolic = %x.patt.loc5_28.2 (constants.%x.patt.f93)] +// CHECK:STDOUT: %.loc5_36.2: Core.Form = init_form %T.as_type.loc5_30.1 [symbolic = %.loc5_36.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %return.param_patt.loc5_36.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc5_36.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc5_33.2: @Function.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc5_36.2, %T.as_type.loc5_30.1 [symbolic = %return.patt.loc5_33.2 (constants.%return.patt.f44)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc5_31.1 [symbolic = %require_complete (constants.%require_complete.d83)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc5_30.1 [symbolic = %require_complete (constants.%require_complete.d83)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%T.loc5_14.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.2)] // CHECK:STDOUT: %.loc6_10.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc5_14.1 [symbolic = %.loc6_10.3 (constants.%.c29)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc5_14.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c)] // CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6_10.3 (%.c29) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.bd2)] // CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%T.loc5_14.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.e2a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @Function.%T.as_type.loc5_31.1 (%T.as_type)) -> out %return.param: @Function.%T.as_type.loc5_31.1 (%T.as_type) { +// CHECK:STDOUT: fn(%x.param: @Function.%T.as_type.loc5_30.1 (%T.as_type)) -> out %return.param: @Function.%T.as_type.loc5_30.1 (%T.as_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @Function.%T.as_type.loc5_31.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @Function.%T.as_type.loc5_30.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6_10.3 (%.c29) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.bd2)] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %x.ref, %impl.elem0.loc6_10.1 // CHECK:STDOUT: %.loc6_10.1: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc5_14.1 (constants.%T.f84)] // CHECK:STDOUT: %.loc6_10.2: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc5_14.1 (constants.%T.f84)] // CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.WithSelf.Op(constants.%T.f84) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.e2a)] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %x.ref, %specific_impl_fn.loc6_10.1 -// CHECK:STDOUT: %.loc5_37.1: ref @Function.%T.as_type.loc5_31.1 (%T.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Function.%T.as_type.loc5_31.1 (%T.as_type) to %.loc5_37.1 = call %bound_method.loc6_10.2(%x.ref) +// CHECK:STDOUT: %.loc5_36.1: ref @Function.%T.as_type.loc5_30.1 (%T.as_type) = splice_block %return.param {} +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Function.%T.as_type.loc5_30.1 (%T.as_type) to %.loc5_36.1 = call %bound_method.loc6_10.2(%x.ref) // CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGeneric(%T.loc10_17.2: %Copy.type) { +// CHECK:STDOUT: generic fn @CallGeneric(%T.loc10_25.2: %Copy.type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Function.specific_fn.loc12_10.2: = specific_function constants.%Function, @Function(%T.loc10_17.1) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.4db)] +// CHECK:STDOUT: %Function.specific_fn.loc12_10.2: = specific_function constants.%Function, @Function(%T.loc10_25.1) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.4db)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type)) -> out %return.param: @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type) { +// CHECK:STDOUT: fn(%x.param: @CallGeneric.%T.as_type.loc10_41.1 (%T.as_type)) -> out %return.param: @CallGeneric.%T.as_type.loc10_41.1 (%T.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [concrete = constants.%Function] -// CHECK:STDOUT: %x.ref: @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type) = name_ref x, %x -// CHECK:STDOUT: %.loc12_20.1: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc10_17.1 (constants.%T.f84)] -// CHECK:STDOUT: %.loc12_20.2: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc10_17.1 (constants.%T.f84)] +// CHECK:STDOUT: %x.ref: @CallGeneric.%T.as_type.loc10_41.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %.loc12_20.1: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc10_25.1 (constants.%T.f84)] +// CHECK:STDOUT: %.loc12_20.2: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T.loc10_25.1 (constants.%T.f84)] // CHECK:STDOUT: %Function.specific_fn.loc12_10.1: = specific_function %Function.ref, @Function(constants.%T.f84) [symbolic = %Function.specific_fn.loc12_10.2 (constants.%Function.specific_fn.4db)] // CHECK:STDOUT: -// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.as_type.loc10_34.1 (%T.as_type) to %.loc10_40.1 = call %Function.specific_fn.loc12_10.1(%x.ref) +// CHECK:STDOUT: %Function.call: init @CallGeneric.%T.as_type.loc10_41.1 (%T.as_type) to %.loc10_47.1 = call %Function.specific_fn.loc12_10.1(%x.ref) // CHECK:STDOUT: return %Function.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGenericPtr(%T.loc16_20.2: type) { +// CHECK:STDOUT: generic fn @CallGenericPtr(%T.loc16_28.2: type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %.loc18_20.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc16_20.1) [symbolic = %.loc18_20.3 (constants.%.0e9)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_33.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] -// CHECK:STDOUT: %Copy.facet.loc18_20.3: %Copy.type = facet_value %ptr.loc16_33.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc18_20.3 (constants.%Copy.facet.302)] +// CHECK:STDOUT: %.loc18_20.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc16_28.1) [symbolic = %.loc18_20.3 (constants.%.0e9)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_40.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] +// CHECK:STDOUT: %Copy.facet.loc18_20.3: %Copy.type = facet_value %ptr.loc16_40.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc18_20.3 (constants.%Copy.facet.302)] // CHECK:STDOUT: %Function.specific_fn.loc18_10.2: = specific_function constants.%Function, @Function(%Copy.facet.loc18_20.3) [symbolic = %Function.specific_fn.loc18_10.2 (constants.%Function.specific_fn.162)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f)) -> out %return.param: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f) { +// CHECK:STDOUT: fn(%x.param: @CallGenericPtr.%ptr.loc16_40.1 (%ptr.e8f)) -> out %return.param: @CallGenericPtr.%ptr.loc16_40.1 (%ptr.e8f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Function.ref: %Function.type = name_ref Function, file.%Function.decl [concrete = constants.%Function] -// CHECK:STDOUT: %x.ref: @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @CallGenericPtr.%ptr.loc16_40.1 (%ptr.e8f) = name_ref x, %x // CHECK:STDOUT: %Copy.facet.loc18_20.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc18_20.3 (constants.%Copy.facet.302)] // CHECK:STDOUT: %.loc18_20.1: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc18_20.1 [symbolic = %Copy.facet.loc18_20.3 (constants.%Copy.facet.302)] // CHECK:STDOUT: %Copy.facet.loc18_20.2: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc18_20.3 (constants.%Copy.facet.302)] // CHECK:STDOUT: %.loc18_20.2: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc18_20.2 [symbolic = %Copy.facet.loc18_20.3 (constants.%Copy.facet.302)] // CHECK:STDOUT: %Function.specific_fn.loc18_10.1: = specific_function %Function.ref, @Function(constants.%Copy.facet.302) [symbolic = %Function.specific_fn.loc18_10.2 (constants.%Function.specific_fn.162)] -// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%ptr.loc16_33.1 (%ptr.e8f) = call %Function.specific_fn.loc18_10.1(%x.ref) +// CHECK:STDOUT: %Function.call: init @CallGenericPtr.%ptr.loc16_40.1 (%ptr.e8f) = call %Function.specific_fn.loc18_10.1(%x.ref) // CHECK:STDOUT: return %Function.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -577,13 +577,13 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: specific @Function(constants.%T.f84) { // CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.fe6 // CHECK:STDOUT: %T.loc5_14.1 => constants.%T.f84 -// CHECK:STDOUT: %T.as_type.loc5_31.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc5_30.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2c66b4.2 -// CHECK:STDOUT: %x.param_patt.loc5_29.2 => constants.%x.param_patt.1f4 -// CHECK:STDOUT: %x.patt.loc5_29.2 => constants.%x.patt.f93 -// CHECK:STDOUT: %.loc5_37.2 => constants.%.1ce700.2 -// CHECK:STDOUT: %return.param_patt.loc5_37.2 => constants.%return.param_patt.bf4475.2 -// CHECK:STDOUT: %return.patt.loc5_34.2 => constants.%return.patt.f44 +// CHECK:STDOUT: %x.param_patt.loc5_28.2 => constants.%x.param_patt.1f4 +// CHECK:STDOUT: %x.patt.loc5_28.2 => constants.%x.patt.f93 +// CHECK:STDOUT: %.loc5_36.2 => constants.%.1ce700.2 +// CHECK:STDOUT: %return.param_patt.loc5_36.2 => constants.%return.param_patt.bf4475.2 +// CHECK:STDOUT: %return.patt.loc5_33.2 => constants.%return.patt.f44 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.d83 @@ -595,39 +595,39 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%T.f84) { -// CHECK:STDOUT: %T.patt.loc10_17.2 => constants.%T.patt.fe6 -// CHECK:STDOUT: %T.loc10_17.1 => constants.%T.f84 -// CHECK:STDOUT: %T.as_type.loc10_34.1 => constants.%T.as_type +// CHECK:STDOUT: %T.patt.loc10_25.2 => constants.%T.patt.fe6 +// CHECK:STDOUT: %T.loc10_25.1 => constants.%T.f84 +// CHECK:STDOUT: %T.as_type.loc10_41.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2c66b4.2 -// CHECK:STDOUT: %x.param_patt.loc10_32.2 => constants.%x.param_patt.1f4 -// CHECK:STDOUT: %x.patt.loc10_32.2 => constants.%x.patt.f93 -// CHECK:STDOUT: %.loc10_40.2 => constants.%.1ce700.2 -// CHECK:STDOUT: %return.param_patt.loc10_40.2 => constants.%return.param_patt.bf4475.2 -// CHECK:STDOUT: %return.patt.loc10_37.2 => constants.%return.patt.f44 +// CHECK:STDOUT: %x.param_patt.loc10_39.2 => constants.%x.param_patt.1f4 +// CHECK:STDOUT: %x.patt.loc10_39.2 => constants.%x.patt.f93 +// CHECK:STDOUT: %.loc10_47.2 => constants.%.1ce700.2 +// CHECK:STDOUT: %return.param_patt.loc10_47.2 => constants.%return.param_patt.bf4475.2 +// CHECK:STDOUT: %return.patt.loc10_44.2 => constants.%return.patt.f44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericPtr(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc16_20.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc16_20.1 => constants.%T.67d -// CHECK:STDOUT: %ptr.loc16_33.1 => constants.%ptr.e8f +// CHECK:STDOUT: %T.patt.loc16_28.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc16_28.1 => constants.%T.67d +// CHECK:STDOUT: %ptr.loc16_40.1 => constants.%ptr.e8f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 -// CHECK:STDOUT: %x.param_patt.loc16_30.2 => constants.%x.param_patt.b5c -// CHECK:STDOUT: %x.patt.loc16_30.2 => constants.%x.patt.b28 -// CHECK:STDOUT: %.loc16_40.1 => constants.%.cb6 -// CHECK:STDOUT: %return.param_patt.loc16_40.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc16_36.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %x.param_patt.loc16_37.2 => constants.%x.param_patt.b5c +// CHECK:STDOUT: %x.patt.loc16_37.2 => constants.%x.patt.b28 +// CHECK:STDOUT: %.loc16_47.1 => constants.%.cb6 +// CHECK:STDOUT: %return.param_patt.loc16_47.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc16_43.2 => constants.%return.patt.d67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Function(constants.%Copy.facet.302) { // CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.fe6 // CHECK:STDOUT: %T.loc5_14.1 => constants.%Copy.facet.302 -// CHECK:STDOUT: %T.as_type.loc5_31.1 => constants.%ptr.e8f +// CHECK:STDOUT: %T.as_type.loc5_30.1 => constants.%ptr.e8f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 -// CHECK:STDOUT: %x.param_patt.loc5_29.2 => constants.%x.param_patt.b5c -// CHECK:STDOUT: %x.patt.loc5_29.2 => constants.%x.patt.b28 -// CHECK:STDOUT: %.loc5_37.2 => constants.%.cb6 -// CHECK:STDOUT: %return.param_patt.loc5_37.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc5_34.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %x.param_patt.loc5_28.2 => constants.%x.param_patt.b5c +// CHECK:STDOUT: %x.patt.loc5_28.2 => constants.%x.patt.b28 +// CHECK:STDOUT: %.loc5_36.2 => constants.%.cb6 +// CHECK:STDOUT: %return.param_patt.loc5_36.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc5_33.2 => constants.%return.patt.d67 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 @@ -641,13 +641,13 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: specific @Function(constants.%Copy.facet.3f0) { // CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.fe6 // CHECK:STDOUT: %T.loc5_14.1 => constants.%Copy.facet.3f0 -// CHECK:STDOUT: %T.as_type.loc5_31.1 => constants.%ptr.6b6 +// CHECK:STDOUT: %T.as_type.loc5_30.1 => constants.%ptr.6b6 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fcb -// CHECK:STDOUT: %x.param_patt.loc5_29.2 => constants.%x.param_patt.503 -// CHECK:STDOUT: %x.patt.loc5_29.2 => constants.%x.patt.eca -// CHECK:STDOUT: %.loc5_37.2 => constants.%.8fa -// CHECK:STDOUT: %return.param_patt.loc5_37.2 => constants.%return.param_patt.ada -// CHECK:STDOUT: %return.patt.loc5_34.2 => constants.%return.patt.783 +// CHECK:STDOUT: %x.param_patt.loc5_28.2 => constants.%x.param_patt.503 +// CHECK:STDOUT: %x.patt.loc5_28.2 => constants.%x.patt.eca +// CHECK:STDOUT: %.loc5_36.2 => constants.%.8fa +// CHECK:STDOUT: %return.param_patt.loc5_36.2 => constants.%return.param_patt.ada +// CHECK:STDOUT: %return.patt.loc5_33.2 => constants.%return.patt.783 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.bf9 diff --git a/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon b/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon index 2851bd70d828..6ddd77983bfc 100644 --- a/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon +++ b/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon @@ -12,7 +12,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon -interface Generic(Scalar:! type) { +interface Generic(Scalar: type) { fn F(); } @@ -30,7 +30,7 @@ impl ImplsGeneric as Other { fn G(); } -fn CallGenericMethod(T:! type, U:! Generic(T)) { +fn CallGenericMethod(generic T: type, generic U: Generic(T)) { U.F(); } @@ -134,9 +134,9 @@ fn G() { // CHECK:STDOUT: %Generic.decl: %Generic.type.30d = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %Scalar.patt.loc15_25.1: %pattern_type.98f = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc15_25.2 (constants.%Scalar.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_28.1: type = splice_block %.loc15_28.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_27.1: type = splice_block %.loc15_27.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_28.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_27.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %Scalar.loc15_25.2: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc15_25.1 (constants.%Scalar)] // CHECK:STDOUT: } @@ -154,21 +154,21 @@ fn G() { // CHECK:STDOUT: %Other.ref: type = name_ref Other, file.%Other.decl [concrete = constants.%Other.type] // CHECK:STDOUT: } // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { -// CHECK:STDOUT: %T.patt.loc33_23.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc33_23.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc33_33.1: @CallGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc33_33.2 (constants.%U.patt.8a6)] +// CHECK:STDOUT: %T.patt.loc33_31.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc33_31.2 (constants.%T.patt)] +// CHECK:STDOUT: %U.patt.loc33_48.1: @CallGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc33_48.2 (constants.%U.patt.8a6)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc33_26.1: type = splice_block %.loc33_26.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc33_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc33_26.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc33_33.1: type = splice_block %.loc33_33.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc33_31: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc33_33.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc33_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc33_23.1 (constants.%T)] -// CHECK:STDOUT: %.loc33_45: type = splice_block %Generic.type.loc33_45.2 [symbolic = %Generic.type.loc33_45.1 (constants.%Generic.type.ee14e9.2)] { -// CHECK:STDOUT: %.Self.frozen.loc33_33: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %T.loc33_31.2: type = symbolic_binding T, 0 [symbolic = %T.loc33_31.1 (constants.%T)] +// CHECK:STDOUT: %.loc33_59: type = splice_block %Generic.type.loc33_59.2 [symbolic = %Generic.type.loc33_59.1 (constants.%Generic.type.ee14e9.2)] { +// CHECK:STDOUT: %.Self.frozen.loc33_48: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Generic.ref: %Generic.type.30d = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc33_23.2 [symbolic = %T.loc33_23.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc33_45.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc33_45.1 (constants.%Generic.type.ee14e9.2)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc33_31.2 [symbolic = %T.loc33_31.1 (constants.%T)] +// CHECK:STDOUT: %Generic.type.loc33_59.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc33_59.1 (constants.%Generic.type.ee14e9.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc33_33.2: @CallGenericMethod.%Generic.type.loc33_45.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc33_33.1 (constants.%U)] +// CHECK:STDOUT: %U.loc33_48.2: @CallGenericMethod.%Generic.type.loc33_59.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc33_48.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } @@ -179,10 +179,10 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc15_25.1)> [symbolic = %Generic.type (constants.%Generic.type.ee14e9.1)] -// CHECK:STDOUT: %Self.loc15_34.2: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.8ea1ea.1)] +// CHECK:STDOUT: %Self.loc15_33.2: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_33.2 (constants.%Self.8ea1ea.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc15_34.1: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.8ea1ea.1)] +// CHECK:STDOUT: %Self.loc15_33.1: @Generic.%Generic.type (%Generic.type.ee14e9.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_33.2 (constants.%Self.8ea1ea.1)] // CHECK:STDOUT: %Generic.WithSelf.decl = interface_with_self_decl @Generic [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -190,7 +190,7 @@ fn G() { // CHECK:STDOUT: %assoc0.loc16_9.1: @Generic.WithSelf.%Generic.assoc_type (%Generic.assoc_type.d7021d.1) = assoc_entity element0, %Generic.WithSelf.F.decl [symbolic = %assoc0.loc16_9.2 (constants.%assoc0.31052a.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc15_34.1 +// CHECK:STDOUT: .Self = %Self.loc15_33.1 // CHECK:STDOUT: .F = @Generic.WithSelf.%assoc0.loc16_9.1 // CHECK:STDOUT: witness = (@Generic.WithSelf.%Generic.WithSelf.F.decl) // CHECK:STDOUT: @@ -256,7 +256,7 @@ fn G() { // CHECK:STDOUT: .Self = constants.%ImplsGeneric // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc15_25.2: type, @Generic.%Self.loc15_34.1: @Generic.%Generic.type (%Generic.type.ee14e9.1)) { +// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc15_25.2: type, @Generic.%Self.loc15_33.1: @Generic.%Generic.type (%Generic.type.ee14e9.1)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -273,28 +273,28 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @ImplsGeneric.as.Other.impl.G(); // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc33_23.2: type, %U.loc33_33.2: @CallGenericMethod.%Generic.type.loc33_45.1 (%Generic.type.ee14e9.2)) { -// CHECK:STDOUT: %T.patt.loc33_23.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc33_23.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc33_23.1: type = symbolic_binding T, 0 [symbolic = %T.loc33_23.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc33_45.1: type = facet_type <@Generic, @Generic(%T.loc33_23.1)> [symbolic = %Generic.type.loc33_45.1 (constants.%Generic.type.ee14e9.2)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Generic.type.loc33_45.1 [symbolic = %pattern_type (constants.%pattern_type.4e0)] -// CHECK:STDOUT: %U.patt.loc33_33.2: @CallGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc33_33.2 (constants.%U.patt.8a6)] -// CHECK:STDOUT: %U.loc33_33.1: @CallGenericMethod.%Generic.type.loc33_45.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc33_33.1 (constants.%U)] +// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc33_31.2: type, %U.loc33_48.2: @CallGenericMethod.%Generic.type.loc33_59.1 (%Generic.type.ee14e9.2)) { +// CHECK:STDOUT: %T.patt.loc33_31.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc33_31.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc33_31.1: type = symbolic_binding T, 0 [symbolic = %T.loc33_31.1 (constants.%T)] +// CHECK:STDOUT: %Generic.type.loc33_59.1: type = facet_type <@Generic, @Generic(%T.loc33_31.1)> [symbolic = %Generic.type.loc33_59.1 (constants.%Generic.type.ee14e9.2)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Generic.type.loc33_59.1 [symbolic = %pattern_type (constants.%pattern_type.4e0)] +// CHECK:STDOUT: %U.patt.loc33_48.2: @CallGenericMethod.%pattern_type (%pattern_type.4e0) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc33_48.2 (constants.%U.patt.8a6)] +// CHECK:STDOUT: %U.loc33_48.1: @CallGenericMethod.%Generic.type.loc33_59.1 (%Generic.type.ee14e9.2) = symbolic_binding U, 1 [symbolic = %U.loc33_48.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %Generic.type.loc33_45.1 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %U.as_type.loc34_4.2: type = facet_access_type %U.loc33_33.1 [symbolic = %U.as_type.loc34_4.2 (constants.%U.as_type)] -// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%T.loc33_23.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.d7021d.2)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Generic.type.loc33_59.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %U.as_type.loc34_4.2: type = facet_access_type %U.loc33_48.1 [symbolic = %U.as_type.loc34_4.2 (constants.%U.as_type)] +// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%T.loc33_31.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.d7021d.2)] // CHECK:STDOUT: %assoc0: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.d7021d.2) = assoc_entity element0, @Generic.WithSelf.%Generic.WithSelf.F.decl [symbolic = %assoc0 (constants.%assoc0.31052a.2)] -// CHECK:STDOUT: %Generic.WithSelf.F.type: type = fn_type @Generic.WithSelf.F, @Generic.WithSelf(%T.loc33_23.1, %U.loc33_33.1) [symbolic = %Generic.WithSelf.F.type (constants.%Generic.WithSelf.F.type.a70)] -// CHECK:STDOUT: %.loc34_4.3: type = fn_type_with_self_type %Generic.WithSelf.F.type, %U.loc33_33.1 [symbolic = %.loc34_4.3 (constants.%.aca)] -// CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U.loc33_33.1, @Generic, @Generic(%T.loc33_23.1) [symbolic = %Generic.lookup_impl_witness (constants.%Generic.lookup_impl_witness)] +// CHECK:STDOUT: %Generic.WithSelf.F.type: type = fn_type @Generic.WithSelf.F, @Generic.WithSelf(%T.loc33_31.1, %U.loc33_48.1) [symbolic = %Generic.WithSelf.F.type (constants.%Generic.WithSelf.F.type.a70)] +// CHECK:STDOUT: %.loc34_4.3: type = fn_type_with_self_type %Generic.WithSelf.F.type, %U.loc33_48.1 [symbolic = %.loc34_4.3 (constants.%.aca)] +// CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U.loc33_48.1, @Generic, @Generic(%T.loc33_31.1) [symbolic = %Generic.lookup_impl_witness (constants.%Generic.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc34_4.2: @CallGenericMethod.%.loc34_4.3 (%.aca) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc34_4.2: = specific_impl_function %impl.elem0.loc34_4.2, @Generic.WithSelf.F(%T.loc33_23.1, %U.loc33_33.1) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc34_4.2: = specific_impl_function %impl.elem0.loc34_4.2, @Generic.WithSelf.F(%T.loc33_31.1, %U.loc33_48.1) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %U.ref: @CallGenericMethod.%Generic.type.loc33_45.1 (%Generic.type.ee14e9.2) = name_ref U, %U.loc33_33.2 [symbolic = %U.loc33_33.1 (constants.%U)] +// CHECK:STDOUT: %U.ref: @CallGenericMethod.%Generic.type.loc33_59.1 (%Generic.type.ee14e9.2) = name_ref U, %U.loc33_48.2 [symbolic = %U.loc33_48.1 (constants.%U)] // CHECK:STDOUT: %U.as_type.loc34_4.1: type = facet_access_type %U.ref [symbolic = %U.as_type.loc34_4.2 (constants.%U.as_type)] // CHECK:STDOUT: %.loc34_4.1: type = converted %U.ref, %U.as_type.loc34_4.1 [symbolic = %U.as_type.loc34_4.2 (constants.%U.as_type)] // CHECK:STDOUT: %.loc34_4.2: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.d7021d.2) = specific_constant @Generic.WithSelf.%assoc0.loc16_9.1, @Generic.WithSelf(constants.%T, constants.%U) [symbolic = %assoc0 (constants.%assoc0.31052a.2)] @@ -337,7 +337,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type => constants.%Generic.type.b40 -// CHECK:STDOUT: %Self.loc15_34.2 => constants.%Self.685 +// CHECK:STDOUT: %Self.loc15_33.2 => constants.%Self.685 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.WithSelf(constants.%GenericParam, constants.%Self.8ea1ea.1) { @@ -388,16 +388,16 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type => constants.%Generic.type.ee14e9.2 -// CHECK:STDOUT: %Self.loc15_34.2 => constants.%Self.8ea1ea.2 +// CHECK:STDOUT: %Self.loc15_33.2 => constants.%Self.8ea1ea.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U) { -// CHECK:STDOUT: %T.patt.loc33_23.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc33_23.1 => constants.%T -// CHECK:STDOUT: %Generic.type.loc33_45.1 => constants.%Generic.type.ee14e9.2 +// CHECK:STDOUT: %T.patt.loc33_31.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc33_31.1 => constants.%T +// CHECK:STDOUT: %Generic.type.loc33_59.1 => constants.%Generic.type.ee14e9.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4e0 -// CHECK:STDOUT: %U.patt.loc33_33.2 => constants.%U.patt.8a6 -// CHECK:STDOUT: %U.loc33_33.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc33_48.2 => constants.%U.patt.8a6 +// CHECK:STDOUT: %U.loc33_48.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.WithSelf(constants.%T, constants.%Self.8ea1ea.1) { @@ -425,12 +425,12 @@ fn G() { // CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%T, constants.%U) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) { -// CHECK:STDOUT: %T.patt.loc33_23.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc33_23.1 => constants.%GenericParam -// CHECK:STDOUT: %Generic.type.loc33_45.1 => constants.%Generic.type.b40 +// CHECK:STDOUT: %T.patt.loc33_31.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc33_31.1 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc33_59.1 => constants.%Generic.type.b40 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.de1 -// CHECK:STDOUT: %U.patt.loc33_33.2 => constants.%U.patt.e09 -// CHECK:STDOUT: %U.loc33_33.1 => constants.%Generic.facet +// CHECK:STDOUT: %U.patt.loc33_48.2 => constants.%U.patt.e09 +// CHECK:STDOUT: %U.loc33_48.1 => constants.%Generic.facet // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.35b diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index b370b5fd21bb..fb08efd5edad 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -16,13 +16,13 @@ library "[[@TEST_NAME]]"; -fn ExplicitGenericParam(T:! type) -> T* { return ExplicitGenericParam(T); } +fn ExplicitGenericParam(generic T: type) -> T* { return ExplicitGenericParam(T); } fn CallExplicitGenericParam() -> i32* { return ExplicitGenericParam(i32); } -fn CallExplicitGenericParamWithGenericArg(T:! type) -> {.a: T}* { +fn CallExplicitGenericParamWithGenericArg(generic T: type) -> {.a: T}* { return ExplicitGenericParam({.a: T}); } @@ -30,9 +30,9 @@ fn CallExplicitGenericParamWithGenericArg(T:! type) -> {.a: T}* { library "[[@TEST_NAME]]"; -fn ExplicitGenericParam(T:! type) -> T* { return ExplicitGenericParam(T); } +fn ExplicitGenericParam(generic T: type) -> T* { return ExplicitGenericParam(T); } -fn CallExplicitGenericParamConst(T:! type) { +fn CallExplicitGenericParamConst(generic T: type) { ExplicitGenericParam(T); } @@ -40,9 +40,9 @@ fn CallExplicitGenericParamNonConst(T: type) { // CHECK:STDERR: fail_deduce_explicit_non_constant.carbon:[[@LINE+7]]:3: error: argument for generic parameter is not a compile-time constant [CompTimeArgumentNotConstant] // CHECK:STDERR: ExplicitGenericParam(T); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_deduce_explicit_non_constant.carbon:[[@LINE-10]]:25: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn ExplicitGenericParam(T:! type) -> T* { return ExplicitGenericParam(T); } - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_deduce_explicit_non_constant.carbon:[[@LINE-10]]:33: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn ExplicitGenericParam(generic T: type) -> T* { return ExplicitGenericParam(T); } + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: ExplicitGenericParam(T); } @@ -53,7 +53,7 @@ library "[[@TEST_NAME]]"; class A {} -fn ExplicitAndAlsoDeduced(T:! type, x: T) -> T* { +fn ExplicitAndAlsoDeduced(generic T: type, x: T) -> T* { return ExplicitAndAlsoDeduced(T, x); } @@ -65,7 +65,7 @@ fn CallExplicitAndAlsoDeduced() -> A* { library "[[@TEST_NAME]]"; -fn ImplicitGenericParam[T:! type](x: T) -> T* { return ImplicitGenericParam(x); } +fn ImplicitGenericParam[T: type](x: T) -> T* { return ImplicitGenericParam(x); } fn CallImplicitGenericParam(n: i32) -> i32* { return ImplicitGenericParam(n); @@ -75,7 +75,7 @@ fn CallImplicitGenericParam(n: i32) -> i32* { library "[[@TEST_NAME]]"; -fn TupleParam[T:! type](unused x: (T, i32)) {} +fn TupleParam[T: type](unused x: (T, i32)) {} fn CallTupleParam() { TupleParam((1, 2)); @@ -85,7 +85,7 @@ fn CallTupleParam() { library "[[@TEST_NAME]]"; -fn StructParam[T:! type](unused x: {.a: T, .b: i32}) {} +fn StructParam[T: type](unused x: {.a: T, .b: i32}) {} fn CallStructParam() { StructParam({.a = 1, .b = 2}); @@ -95,15 +95,15 @@ fn CallStructParam() { library "[[@TEST_NAME]]"; -fn BigStructParam[T:! type](unused x: {.c: T, .d: i32, .e: i32}) {} +fn BigStructParam[T: type](unused x: {.c: T, .d: i32, .e: i32}) {} fn CallBigStructParam() { // CHECK:STDERR: fail_deduce_bigger_struct.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: BigStructParam({.c = 3, .d = 4}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_bigger_struct.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn BigStructParam[T:! type](unused x: {.c: T, .d: i32, .e: i32}) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn BigStructParam[T: type](unused x: {.c: T, .d: i32, .e: i32}) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: BigStructParam({.c = 3, .d = 4}); } @@ -112,15 +112,15 @@ fn CallBigStructParam() { library "[[@TEST_NAME]]"; -fn SmallStructParam[T:! type](unused x: {.f: T, .g: i32}) {} +fn SmallStructParam[T: type](unused x: {.f: T, .g: i32}) {} fn CallSmallStructParam() { // CHECK:STDERR: fail_deduce_smaller_struct.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: SmallStructParam({.f = 5, .g = 6, .h = 7}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_smaller_struct.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn SmallStructParam[T:! type](unused x: {.f: T, .g: i32}) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn SmallStructParam[T: type](unused x: {.f: T, .g: i32}) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: SmallStructParam({.f = 5, .g = 6, .h = 7}); } @@ -129,15 +129,15 @@ fn CallSmallStructParam() { library "[[@TEST_NAME]]"; -fn WrongNameStructParam[T:! type](unused x: {.i: T, .different: i32}) {} +fn WrongNameStructParam[T: type](unused x: {.i: T, .different: i32}) {} fn CallWrongNameStructParam() { // CHECK:STDERR: fail_deduce_struct_wrong_name.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: WrongNameStructParam({.i = 8, .j = 9}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_struct_wrong_name.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn WrongNameStructParam[T:! type](unused x: {.i: T, .different: i32}) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn WrongNameStructParam[T: type](unused x: {.i: T, .different: i32}) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: WrongNameStructParam({.i = 8, .j = 9}); } @@ -146,15 +146,15 @@ fn CallWrongNameStructParam() { library "[[@TEST_NAME]]"; -fn WrongOrderStructParam[T:! type](unused x: {.first: T, .second: i32}) {} +fn WrongOrderStructParam[T: type](unused x: {.first: T, .second: i32}) {} fn CallWrongOrderStructParam() { // CHECK:STDERR: fail_todo_deduce_struct_wrong_order.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: WrongOrderStructParam({.second = 11, .first = 10}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_deduce_struct_wrong_order.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn WrongOrderStructParam[T:! type](unused x: {.first: T, .second: i32}) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn WrongOrderStructParam[T: type](unused x: {.first: T, .second: i32}) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: WrongOrderStructParam({.second = 11, .first = 10}); } @@ -165,15 +165,15 @@ library "[[@TEST_NAME]]"; // TODO: It would be nice to diagnose this at its point of declaration, because // U is not deducible. -fn ImplicitNotDeducible[T:! type, U:! type](x: T) -> U; +fn ImplicitNotDeducible[T: type, U: type](x: T) -> U; fn CallImplicitNotDeducible() { // CHECK:STDERR: fail_deduce_incomplete.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `U` [DeductionIncomplete] // CHECK:STDERR: ImplicitNotDeducible(42); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_incomplete.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn ImplicitNotDeducible[T:! type, U:! type](x: T) -> U; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn ImplicitNotDeducible[T: type, U: type](x: T) -> U; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: ImplicitNotDeducible(42); } @@ -182,15 +182,15 @@ fn CallImplicitNotDeducible() { library "[[@TEST_NAME]]"; -fn ImplicitNotDeducible[T:! type](x: T, y: T) -> T; +fn ImplicitNotDeducible[T: type](x: T, y: T) -> T; fn CallImplicitNotDeducible() { // CHECK:STDERR: fail_deduce_inconsistent.carbon:[[@LINE+7]]:3: error: inconsistent deductions for value of generic parameter `T` [DeductionInconsistent] // CHECK:STDERR: ImplicitNotDeducible(42, {.x = 12}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_inconsistent.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn ImplicitNotDeducible[T:! type](x: T, y: T) -> T; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn ImplicitNotDeducible[T: type](x: T, y: T) -> T; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: ImplicitNotDeducible(42, {.x = 12}); } @@ -203,11 +203,11 @@ interface Z {} class EE {} impl EE as Z {} -class DD(E:! type) {} -impl forall [E:! type] DD(E) as Z {} +class DD(E: type) {} +impl forall [E: type] DD(E) as Z {} -class CC(D:! Z) {} -impl forall [E:! type] CC(DD(E)) as Z {} +class CC(D: Z) {} +impl forall [E: type] CC(DD(E)) as Z {} fn F() { CC(DD(EE)) as Z; @@ -273,20 +273,20 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ExplicitGenericParam.decl: %ExplicitGenericParam.type = fn_decl @ExplicitGenericParam [concrete = constants.%ExplicitGenericParam] { -// CHECK:STDOUT: %T.patt.loc4_26.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] -// CHECK:STDOUT: %return.param_patt.loc4_39.1: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_39.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc4_35.1: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_39.1, %ptr.loc4_39.2 [symbolic = %return.patt.loc4_35.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: %T.patt.loc4_34.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_34.2 (constants.%T.patt)] +// CHECK:STDOUT: %return.param_patt.loc4_46.1: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_46.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc4_42.1: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_46.1, %ptr.loc4_46.2 [symbolic = %return.patt.loc4_42.2 (constants.%return.patt.d67)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc4_39.2: type = ptr_type %T.ref.loc4_38 [symbolic = %ptr.loc4_39.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.loc4_39.2: Core.Form = init_form %ptr.loc4_39.2 [symbolic = %.loc4_39.1 (constants.%.cb6)] -// CHECK:STDOUT: %.loc4_29.1: type = splice_block %.loc4_29.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc4_45: type = name_ref T, %T.loc4_34.2 [symbolic = %T.loc4_34.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc4_46.2: type = ptr_type %T.ref.loc4_45 [symbolic = %ptr.loc4_46.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.loc4_46.2: Core.Form = init_form %ptr.loc4_46.2 [symbolic = %.loc4_46.1 (constants.%.cb6)] +// CHECK:STDOUT: %.loc4_36.1: type = splice_block %.loc4_36.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_29.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_36.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_26.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %return.param: ref @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr.e8f) = out_param call_param0 -// CHECK:STDOUT: %return: ref @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr.e8f) = return_slot %return.param +// CHECK:STDOUT: %T.loc4_34.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_34.1 (constants.%T)] +// CHECK:STDOUT: %return.param: ref @ExplicitGenericParam.%ptr.loc4_46.1 (%ptr.e8f) = out_param call_param0 +// CHECK:STDOUT: %return: ref @ExplicitGenericParam.%ptr.loc4_46.1 (%ptr.e8f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitGenericParam.decl: %CallExplicitGenericParam.type = fn_decl @CallExplicitGenericParam [concrete = constants.%CallExplicitGenericParam] { // CHECK:STDOUT: %return.param_patt: %pattern_type.f00 = out_param_pattern [concrete = constants.%return.param_patt.7dd] @@ -299,43 +299,43 @@ fn F() { // CHECK:STDOUT: %return: ref %ptr.d08 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitGenericParamWithGenericArg.decl: %CallExplicitGenericParamWithGenericArg.type = fn_decl @CallExplicitGenericParamWithGenericArg [concrete = constants.%CallExplicitGenericParamWithGenericArg] { -// CHECK:STDOUT: %T.patt.loc10_44.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_44.2 (constants.%T.patt)] -// CHECK:STDOUT: %return.param_patt.loc10_63.1: @CallExplicitGenericParamWithGenericArg.%pattern_type (%pattern_type.1cb) = out_param_pattern [symbolic = %return.param_patt.loc10_63.2 (constants.%return.param_patt.83b)] -// CHECK:STDOUT: %return.patt.loc10_53.1: @CallExplicitGenericParamWithGenericArg.%pattern_type (%pattern_type.1cb) = return_slot_pattern %return.param_patt.loc10_63.1, %ptr.loc10_63.2 [symbolic = %return.patt.loc10_53.2 (constants.%return.patt.4ff)] +// CHECK:STDOUT: %T.patt.loc10_52.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_52.2 (constants.%T.patt)] +// CHECK:STDOUT: %return.param_patt.loc10_70.1: @CallExplicitGenericParamWithGenericArg.%pattern_type (%pattern_type.1cb) = out_param_pattern [symbolic = %return.param_patt.loc10_70.2 (constants.%return.param_patt.83b)] +// CHECK:STDOUT: %return.patt.loc10_60.1: @CallExplicitGenericParamWithGenericArg.%pattern_type (%pattern_type.1cb) = return_slot_pattern %return.param_patt.loc10_70.1, %ptr.loc10_70.2 [symbolic = %return.patt.loc10_60.2 (constants.%return.patt.4ff)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc10: type = name_ref T, %T.loc10_44.2 [symbolic = %T.loc10_44.1 (constants.%T)] -// CHECK:STDOUT: %struct_type.a.loc10_62.2: type = struct_type {.a: @CallExplicitGenericParamWithGenericArg.%T.loc10_44.1 (%T)} [symbolic = %struct_type.a.loc10_62.1 (constants.%struct_type.a)] -// CHECK:STDOUT: %ptr.loc10_63.2: type = ptr_type %struct_type.a.loc10_62.2 [symbolic = %ptr.loc10_63.1 (constants.%ptr.88d)] -// CHECK:STDOUT: %.loc10_63.2: Core.Form = init_form %ptr.loc10_63.2 [symbolic = %.loc10_63.1 (constants.%.edd)] -// CHECK:STDOUT: %.loc10_47.1: type = splice_block %.loc10_47.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc10: type = name_ref T, %T.loc10_52.2 [symbolic = %T.loc10_52.1 (constants.%T)] +// CHECK:STDOUT: %struct_type.a.loc10_69.2: type = struct_type {.a: @CallExplicitGenericParamWithGenericArg.%T.loc10_52.1 (%T)} [symbolic = %struct_type.a.loc10_69.1 (constants.%struct_type.a)] +// CHECK:STDOUT: %ptr.loc10_70.2: type = ptr_type %struct_type.a.loc10_69.2 [symbolic = %ptr.loc10_70.1 (constants.%ptr.88d)] +// CHECK:STDOUT: %.loc10_70.2: Core.Form = init_form %ptr.loc10_70.2 [symbolic = %.loc10_70.1 (constants.%.edd)] +// CHECK:STDOUT: %.loc10_54.1: type = splice_block %.loc10_54.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc10_47.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc10_54.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc10_44.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_44.1 (constants.%T)] -// CHECK:STDOUT: %return.param: ref @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.1 (%ptr.88d) = out_param call_param0 -// CHECK:STDOUT: %return: ref @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.1 (%ptr.88d) = return_slot %return.param +// CHECK:STDOUT: %T.loc10_52.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_52.1 (constants.%T)] +// CHECK:STDOUT: %return.param: ref @CallExplicitGenericParamWithGenericArg.%ptr.loc10_70.1 (%ptr.88d) = out_param call_param0 +// CHECK:STDOUT: %return: ref @CallExplicitGenericParamWithGenericArg.%ptr.loc10_70.1 (%ptr.88d) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ExplicitGenericParam(%T.loc4_26.2: type) { -// CHECK:STDOUT: %T.patt.loc4_26.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc4_26.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc4_39.1: type = ptr_type %T.loc4_26.1 [symbolic = %ptr.loc4_39.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.loc4_39.1: Core.Form = init_form %ptr.loc4_39.1 [symbolic = %.loc4_39.1 (constants.%.cb6)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_39.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)] -// CHECK:STDOUT: %return.param_patt.loc4_39.2: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_39.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc4_35.2: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_39.2, %ptr.loc4_39.1 [symbolic = %return.patt.loc4_35.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: generic fn @ExplicitGenericParam(%T.loc4_34.2: type) { +// CHECK:STDOUT: %T.patt.loc4_34.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_34.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc4_34.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_34.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc4_46.1: type = ptr_type %T.loc4_34.1 [symbolic = %ptr.loc4_46.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.loc4_46.1: Core.Form = init_form %ptr.loc4_46.1 [symbolic = %.loc4_46.1 (constants.%.cb6)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_46.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %return.param_patt.loc4_46.2: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_46.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc4_42.2: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_46.2, %ptr.loc4_46.1 [symbolic = %return.patt.loc4_42.2 (constants.%return.patt.d67)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc4_39.1 [symbolic = %require_complete (constants.%require_complete.ef1)] -// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_26.1) [symbolic = %ExplicitGenericParam.specific_fn.loc4_50.2 (constants.%ExplicitGenericParam.specific_fn.2da)] +// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc4_46.1 [symbolic = %require_complete (constants.%require_complete.ef1)] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_57.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_34.1) [symbolic = %ExplicitGenericParam.specific_fn.loc4_57.2 (constants.%ExplicitGenericParam.specific_fn.2da)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr.e8f) { +// CHECK:STDOUT: fn() -> out %return.param: @ExplicitGenericParam.%ptr.loc4_46.1 (%ptr.e8f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [concrete = constants.%ExplicitGenericParam] -// CHECK:STDOUT: %T.ref.loc4_71: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %ExplicitGenericParam.specific_fn.loc4_50.2 (constants.%ExplicitGenericParam.specific_fn.2da)] -// CHECK:STDOUT: %ExplicitGenericParam.call: init @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr.e8f) = call %ExplicitGenericParam.specific_fn.loc4_50.1() +// CHECK:STDOUT: %T.ref.loc4_78: type = name_ref T, %T.loc4_34.2 [symbolic = %T.loc4_34.1 (constants.%T)] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_57.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %ExplicitGenericParam.specific_fn.loc4_57.2 (constants.%ExplicitGenericParam.specific_fn.2da)] +// CHECK:STDOUT: %ExplicitGenericParam.call: init @ExplicitGenericParam.%ptr.loc4_46.1 (%ptr.e8f) = call %ExplicitGenericParam.specific_fn.loc4_57.1() // CHECK:STDOUT: return %ExplicitGenericParam.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -353,27 +353,27 @@ fn F() { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallExplicitGenericParamWithGenericArg(%T.loc10_44.2: type) { -// CHECK:STDOUT: %T.patt.loc10_44.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_44.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc10_44.1: type = symbolic_binding T, 0 [symbolic = %T.loc10_44.1 (constants.%T)] -// CHECK:STDOUT: %struct_type.a.loc10_62.1: type = struct_type {.a: @CallExplicitGenericParamWithGenericArg.%T.loc10_44.1 (%T)} [symbolic = %struct_type.a.loc10_62.1 (constants.%struct_type.a)] -// CHECK:STDOUT: %ptr.loc10_63.1: type = ptr_type %struct_type.a.loc10_62.1 [symbolic = %ptr.loc10_63.1 (constants.%ptr.88d)] -// CHECK:STDOUT: %.loc10_63.1: Core.Form = init_form %ptr.loc10_63.1 [symbolic = %.loc10_63.1 (constants.%.edd)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc10_63.1 [symbolic = %pattern_type (constants.%pattern_type.1cb)] -// CHECK:STDOUT: %return.param_patt.loc10_63.2: @CallExplicitGenericParamWithGenericArg.%pattern_type (%pattern_type.1cb) = out_param_pattern [symbolic = %return.param_patt.loc10_63.2 (constants.%return.param_patt.83b)] -// CHECK:STDOUT: %return.patt.loc10_53.2: @CallExplicitGenericParamWithGenericArg.%pattern_type (%pattern_type.1cb) = return_slot_pattern %return.param_patt.loc10_63.2, %ptr.loc10_63.1 [symbolic = %return.patt.loc10_53.2 (constants.%return.patt.4ff)] +// CHECK:STDOUT: generic fn @CallExplicitGenericParamWithGenericArg(%T.loc10_52.2: type) { +// CHECK:STDOUT: %T.patt.loc10_52.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_52.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc10_52.1: type = symbolic_binding T, 0 [symbolic = %T.loc10_52.1 (constants.%T)] +// CHECK:STDOUT: %struct_type.a.loc10_69.1: type = struct_type {.a: @CallExplicitGenericParamWithGenericArg.%T.loc10_52.1 (%T)} [symbolic = %struct_type.a.loc10_69.1 (constants.%struct_type.a)] +// CHECK:STDOUT: %ptr.loc10_70.1: type = ptr_type %struct_type.a.loc10_69.1 [symbolic = %ptr.loc10_70.1 (constants.%ptr.88d)] +// CHECK:STDOUT: %.loc10_70.1: Core.Form = init_form %ptr.loc10_70.1 [symbolic = %.loc10_70.1 (constants.%.edd)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc10_70.1 [symbolic = %pattern_type (constants.%pattern_type.1cb)] +// CHECK:STDOUT: %return.param_patt.loc10_70.2: @CallExplicitGenericParamWithGenericArg.%pattern_type (%pattern_type.1cb) = out_param_pattern [symbolic = %return.param_patt.loc10_70.2 (constants.%return.param_patt.83b)] +// CHECK:STDOUT: %return.patt.loc10_60.2: @CallExplicitGenericParamWithGenericArg.%pattern_type (%pattern_type.1cb) = return_slot_pattern %return.param_patt.loc10_70.2, %ptr.loc10_70.1 [symbolic = %return.patt.loc10_60.2 (constants.%return.patt.4ff)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc10_63.1 [symbolic = %require_complete (constants.%require_complete.61f)] -// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc11_10.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%struct_type.a.loc10_62.1) [symbolic = %ExplicitGenericParam.specific_fn.loc11_10.2 (constants.%ExplicitGenericParam.specific_fn.f5a)] +// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc10_70.1 [symbolic = %require_complete (constants.%require_complete.61f)] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc11_10.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%struct_type.a.loc10_69.1) [symbolic = %ExplicitGenericParam.specific_fn.loc11_10.2 (constants.%ExplicitGenericParam.specific_fn.f5a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.1 (%ptr.88d) { +// CHECK:STDOUT: fn() -> out %return.param: @CallExplicitGenericParamWithGenericArg.%ptr.loc10_70.1 (%ptr.88d) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [concrete = constants.%ExplicitGenericParam] -// CHECK:STDOUT: %T.ref.loc11: type = name_ref T, %T.loc10_44.2 [symbolic = %T.loc10_44.1 (constants.%T)] -// CHECK:STDOUT: %struct_type.a.loc11: type = struct_type {.a: @CallExplicitGenericParamWithGenericArg.%T.loc10_44.1 (%T)} [symbolic = %struct_type.a.loc10_62.1 (constants.%struct_type.a)] +// CHECK:STDOUT: %T.ref.loc11: type = name_ref T, %T.loc10_52.2 [symbolic = %T.loc10_52.1 (constants.%T)] +// CHECK:STDOUT: %struct_type.a.loc11: type = struct_type {.a: @CallExplicitGenericParamWithGenericArg.%T.loc10_52.1 (%T)} [symbolic = %struct_type.a.loc10_69.1 (constants.%struct_type.a)] // CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc11_10.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%struct_type.a) [symbolic = %ExplicitGenericParam.specific_fn.loc11_10.2 (constants.%ExplicitGenericParam.specific_fn.f5a)] -// CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.1 (%ptr.88d) = call %ExplicitGenericParam.specific_fn.loc11_10.1() +// CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamWithGenericArg.%ptr.loc10_70.1 (%ptr.88d) = call %ExplicitGenericParam.specific_fn.loc11_10.1() // CHECK:STDOUT: return %ExplicitGenericParam.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -381,56 +381,56 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitGenericParam(constants.%T) { -// CHECK:STDOUT: %T.patt.loc4_26.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc4_26.1 => constants.%T -// CHECK:STDOUT: %ptr.loc4_39.1 => constants.%ptr.e8f -// CHECK:STDOUT: %.loc4_39.1 => constants.%.cb6 +// CHECK:STDOUT: %T.patt.loc4_34.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc4_34.1 => constants.%T +// CHECK:STDOUT: %ptr.loc4_46.1 => constants.%ptr.e8f +// CHECK:STDOUT: %.loc4_46.1 => constants.%.cb6 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 -// CHECK:STDOUT: %return.param_patt.loc4_39.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc4_35.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %return.param_patt.loc4_46.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc4_42.2 => constants.%return.patt.d67 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 -// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn.2da +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_57.2 => constants.%ExplicitGenericParam.specific_fn.2da // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitGenericParam(constants.%i32) { -// CHECK:STDOUT: %T.patt.loc4_26.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc4_26.1 => constants.%i32 -// CHECK:STDOUT: %ptr.loc4_39.1 => constants.%ptr.d08 -// CHECK:STDOUT: %.loc4_39.1 => constants.%.952 +// CHECK:STDOUT: %T.patt.loc4_34.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc4_34.1 => constants.%i32 +// CHECK:STDOUT: %ptr.loc4_46.1 => constants.%ptr.d08 +// CHECK:STDOUT: %.loc4_46.1 => constants.%.952 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f00 -// CHECK:STDOUT: %return.param_patt.loc4_39.2 => constants.%return.param_patt.7dd -// CHECK:STDOUT: %return.patt.loc4_35.2 => constants.%return.patt.dbe +// CHECK:STDOUT: %return.param_patt.loc4_46.2 => constants.%return.param_patt.7dd +// CHECK:STDOUT: %return.patt.loc4_42.2 => constants.%return.patt.dbe // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.07f -// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn.330 +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_57.2 => constants.%ExplicitGenericParam.specific_fn.330 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallExplicitGenericParamWithGenericArg(constants.%T) { -// CHECK:STDOUT: %T.patt.loc10_44.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc10_44.1 => constants.%T -// CHECK:STDOUT: %struct_type.a.loc10_62.1 => constants.%struct_type.a -// CHECK:STDOUT: %ptr.loc10_63.1 => constants.%ptr.88d -// CHECK:STDOUT: %.loc10_63.1 => constants.%.edd +// CHECK:STDOUT: %T.patt.loc10_52.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc10_52.1 => constants.%T +// CHECK:STDOUT: %struct_type.a.loc10_69.1 => constants.%struct_type.a +// CHECK:STDOUT: %ptr.loc10_70.1 => constants.%ptr.88d +// CHECK:STDOUT: %.loc10_70.1 => constants.%.edd // CHECK:STDOUT: %pattern_type => constants.%pattern_type.1cb -// CHECK:STDOUT: %return.param_patt.loc10_63.2 => constants.%return.param_patt.83b -// CHECK:STDOUT: %return.patt.loc10_53.2 => constants.%return.patt.4ff +// CHECK:STDOUT: %return.param_patt.loc10_70.2 => constants.%return.param_patt.83b +// CHECK:STDOUT: %return.patt.loc10_60.2 => constants.%return.patt.4ff // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitGenericParam(constants.%struct_type.a) { -// CHECK:STDOUT: %T.patt.loc4_26.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc4_26.1 => constants.%struct_type.a -// CHECK:STDOUT: %ptr.loc4_39.1 => constants.%ptr.88d -// CHECK:STDOUT: %.loc4_39.1 => constants.%.edd +// CHECK:STDOUT: %T.patt.loc4_34.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc4_34.1 => constants.%struct_type.a +// CHECK:STDOUT: %ptr.loc4_46.1 => constants.%ptr.88d +// CHECK:STDOUT: %.loc4_46.1 => constants.%.edd // CHECK:STDOUT: %pattern_type => constants.%pattern_type.1cb -// CHECK:STDOUT: %return.param_patt.loc4_39.2 => constants.%return.param_patt.83b -// CHECK:STDOUT: %return.patt.loc4_35.2 => constants.%return.patt.4ff +// CHECK:STDOUT: %return.param_patt.loc4_46.2 => constants.%return.param_patt.83b +// CHECK:STDOUT: %return.patt.loc4_42.2 => constants.%return.patt.4ff // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.61f -// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn.f5a +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_57.2 => constants.%ExplicitGenericParam.specific_fn.f5a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_explicit_non_constant.carbon @@ -474,29 +474,29 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ExplicitGenericParam.decl: %ExplicitGenericParam.type = fn_decl @ExplicitGenericParam [concrete = constants.%ExplicitGenericParam] { -// CHECK:STDOUT: %T.patt.loc4_26.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %return.param_patt.loc4_39.1: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_39.2 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc4_35.1: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_39.1, %ptr.loc4_39.2 [symbolic = %return.patt.loc4_35.2 (constants.%return.patt)] +// CHECK:STDOUT: %T.patt.loc4_34.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_34.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %return.param_patt.loc4_46.1: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_46.2 (constants.%return.param_patt)] +// CHECK:STDOUT: %return.patt.loc4_42.1: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_46.1, %ptr.loc4_46.2 [symbolic = %return.patt.loc4_42.2 (constants.%return.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc4_39.2: type = ptr_type %T.ref.loc4_38 [symbolic = %ptr.loc4_39.1 (constants.%ptr)] -// CHECK:STDOUT: %.loc4_39.2: Core.Form = init_form %ptr.loc4_39.2 [symbolic = %.loc4_39.1 (constants.%.cb6)] -// CHECK:STDOUT: %.loc4_29.1: type = splice_block %.loc4_29.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc4_45: type = name_ref T, %T.loc4_34.2 [symbolic = %T.loc4_34.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc4_46.2: type = ptr_type %T.ref.loc4_45 [symbolic = %ptr.loc4_46.1 (constants.%ptr)] +// CHECK:STDOUT: %.loc4_46.2: Core.Form = init_form %ptr.loc4_46.2 [symbolic = %.loc4_46.1 (constants.%.cb6)] +// CHECK:STDOUT: %.loc4_36.1: type = splice_block %.loc4_36.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_29.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_36.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_26.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %return.param: ref @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr) = out_param call_param0 -// CHECK:STDOUT: %return: ref @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr) = return_slot %return.param +// CHECK:STDOUT: %T.loc4_34.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_34.1 (constants.%T)] +// CHECK:STDOUT: %return.param: ref @ExplicitGenericParam.%ptr.loc4_46.1 (%ptr) = out_param call_param0 +// CHECK:STDOUT: %return: ref @ExplicitGenericParam.%ptr.loc4_46.1 (%ptr) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitGenericParamConst.decl: %CallExplicitGenericParamConst.type = fn_decl @CallExplicitGenericParamConst [concrete = constants.%CallExplicitGenericParamConst] { -// CHECK:STDOUT: %T.patt.loc6_35.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_35.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %T.patt.loc6_43.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_43.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_38.1: type = splice_block %.loc6_38.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_45.1: type = splice_block %.loc6_45.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_38.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_45.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc6_35.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_35.1 (constants.%T)] +// CHECK:STDOUT: %T.loc6_43.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_43.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitGenericParamNonConst.decl: %CallExplicitGenericParamNonConst.type = fn_decl @CallExplicitGenericParamNonConst [concrete = constants.%CallExplicitGenericParamNonConst] { // CHECK:STDOUT: %T.param_patt: %pattern_type.98f = value_param_pattern [concrete = constants.%T.param_patt] @@ -508,43 +508,43 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ExplicitGenericParam(%T.loc4_26.2: type) { -// CHECK:STDOUT: %T.patt.loc4_26.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %T.loc4_26.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc4_39.1: type = ptr_type %T.loc4_26.1 [symbolic = %ptr.loc4_39.1 (constants.%ptr)] -// CHECK:STDOUT: %.loc4_39.1: Core.Form = init_form %ptr.loc4_39.1 [symbolic = %.loc4_39.1 (constants.%.cb6)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_39.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)] -// CHECK:STDOUT: %return.param_patt.loc4_39.2: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_39.2 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc4_35.2: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_39.2, %ptr.loc4_39.1 [symbolic = %return.patt.loc4_35.2 (constants.%return.patt)] +// CHECK:STDOUT: generic fn @ExplicitGenericParam(%T.loc4_34.2: type) { +// CHECK:STDOUT: %T.patt.loc4_34.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_34.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %T.loc4_34.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_34.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc4_46.1: type = ptr_type %T.loc4_34.1 [symbolic = %ptr.loc4_46.1 (constants.%ptr)] +// CHECK:STDOUT: %.loc4_46.1: Core.Form = init_form %ptr.loc4_46.1 [symbolic = %.loc4_46.1 (constants.%.cb6)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_46.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %return.param_patt.loc4_46.2: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_46.2 (constants.%return.param_patt)] +// CHECK:STDOUT: %return.patt.loc4_42.2: @ExplicitGenericParam.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_46.2, %ptr.loc4_46.1 [symbolic = %return.patt.loc4_42.2 (constants.%return.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc4_39.1 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_26.1) [symbolic = %ExplicitGenericParam.specific_fn.loc4_50.2 (constants.%ExplicitGenericParam.specific_fn)] +// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc4_46.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_57.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc4_34.1) [symbolic = %ExplicitGenericParam.specific_fn.loc4_57.2 (constants.%ExplicitGenericParam.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr) { +// CHECK:STDOUT: fn() -> out %return.param: @ExplicitGenericParam.%ptr.loc4_46.1 (%ptr) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [concrete = constants.%ExplicitGenericParam] -// CHECK:STDOUT: %T.ref.loc4_71: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %ExplicitGenericParam.specific_fn.loc4_50.2 (constants.%ExplicitGenericParam.specific_fn)] -// CHECK:STDOUT: %ExplicitGenericParam.call: init @ExplicitGenericParam.%ptr.loc4_39.1 (%ptr) = call %ExplicitGenericParam.specific_fn.loc4_50.1() +// CHECK:STDOUT: %T.ref.loc4_78: type = name_ref T, %T.loc4_34.2 [symbolic = %T.loc4_34.1 (constants.%T)] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_57.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %ExplicitGenericParam.specific_fn.loc4_57.2 (constants.%ExplicitGenericParam.specific_fn)] +// CHECK:STDOUT: %ExplicitGenericParam.call: init @ExplicitGenericParam.%ptr.loc4_46.1 (%ptr) = call %ExplicitGenericParam.specific_fn.loc4_57.1() // CHECK:STDOUT: return %ExplicitGenericParam.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallExplicitGenericParamConst(%T.loc6_35.2: type) { -// CHECK:STDOUT: %T.patt.loc6_35.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_35.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %T.loc6_35.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_35.1 (constants.%T)] +// CHECK:STDOUT: generic fn @CallExplicitGenericParamConst(%T.loc6_43.2: type) { +// CHECK:STDOUT: %T.patt.loc6_43.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_43.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %T.loc6_43.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_43.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc7_3.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc6_35.1) [symbolic = %ExplicitGenericParam.specific_fn.loc7_3.2 (constants.%ExplicitGenericParam.specific_fn)] -// CHECK:STDOUT: %ptr: type = ptr_type %T.loc6_35.1 [symbolic = %ptr (constants.%ptr)] +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc7_3.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc6_43.1) [symbolic = %ExplicitGenericParam.specific_fn.loc7_3.2 (constants.%ExplicitGenericParam.specific_fn)] +// CHECK:STDOUT: %ptr: type = ptr_type %T.loc6_43.1 [symbolic = %ptr (constants.%ptr)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [concrete = constants.%ExplicitGenericParam] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_35.2 [symbolic = %T.loc6_35.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_43.2 [symbolic = %T.loc6_43.1 (constants.%T)] // CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc7_3.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %ExplicitGenericParam.specific_fn.loc7_3.2 (constants.%ExplicitGenericParam.specific_fn)] // CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamConst.%ptr (%ptr) = call %ExplicitGenericParam.specific_fn.loc7_3.1() // CHECK:STDOUT: return @@ -563,22 +563,22 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitGenericParam(constants.%T) { -// CHECK:STDOUT: %T.patt.loc4_26.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc4_26.1 => constants.%T -// CHECK:STDOUT: %ptr.loc4_39.1 => constants.%ptr -// CHECK:STDOUT: %.loc4_39.1 => constants.%.cb6 +// CHECK:STDOUT: %T.patt.loc4_34.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc4_34.1 => constants.%T +// CHECK:STDOUT: %ptr.loc4_46.1 => constants.%ptr +// CHECK:STDOUT: %.loc4_46.1 => constants.%.cb6 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 -// CHECK:STDOUT: %return.param_patt.loc4_39.2 => constants.%return.param_patt -// CHECK:STDOUT: %return.patt.loc4_35.2 => constants.%return.patt +// CHECK:STDOUT: %return.param_patt.loc4_46.2 => constants.%return.param_patt +// CHECK:STDOUT: %return.patt.loc4_42.2 => constants.%return.patt // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete -// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn +// CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_57.2 => constants.%ExplicitGenericParam.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallExplicitGenericParamConst(constants.%T) { -// CHECK:STDOUT: %T.patt.loc6_35.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc6_35.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc6_43.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc6_43.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- explicit_vs_deduced.carbon @@ -646,25 +646,25 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {} // CHECK:STDOUT: %ExplicitAndAlsoDeduced.decl: %ExplicitAndAlsoDeduced.type = fn_decl @ExplicitAndAlsoDeduced [concrete = constants.%ExplicitAndAlsoDeduced] { -// CHECK:STDOUT: %T.patt.loc6_28.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_28.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc6_38.1: @ExplicitAndAlsoDeduced.%pattern_type.loc6_38 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc6_38.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc6_38.1: @ExplicitAndAlsoDeduced.%pattern_type.loc6_38 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc6_38.1 [symbolic = %x.patt.loc6_38.2 (constants.%x.patt.800)] -// CHECK:STDOUT: %return.param_patt.loc6_47.1: @ExplicitAndAlsoDeduced.%pattern_type.loc6_47 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc6_47.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc6_43.1: @ExplicitAndAlsoDeduced.%pattern_type.loc6_47 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc6_47.1, %ptr.loc6_47.2 [symbolic = %return.patt.loc6_43.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: %T.patt.loc6_36.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_36.2 (constants.%T.patt)] +// CHECK:STDOUT: %x.param_patt.loc6_45.1: @ExplicitAndAlsoDeduced.%pattern_type.loc6_45 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc6_45.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc6_45.1: @ExplicitAndAlsoDeduced.%pattern_type.loc6_45 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc6_45.1 [symbolic = %x.patt.loc6_45.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %return.param_patt.loc6_54.1: @ExplicitAndAlsoDeduced.%pattern_type.loc6_54 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc6_54.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc6_50.1: @ExplicitAndAlsoDeduced.%pattern_type.loc6_54 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc6_54.1, %ptr.loc6_54.2 [symbolic = %return.patt.loc6_50.2 (constants.%return.patt.d67)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_46: type = name_ref T, %T.loc6_28.2 [symbolic = %T.loc6_28.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_47.2: type = ptr_type %T.ref.loc6_46 [symbolic = %ptr.loc6_47.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.loc6_47.2: Core.Form = init_form %ptr.loc6_47.2 [symbolic = %.loc6_47.1 (constants.%.cb6)] -// CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc6_53: type = name_ref T, %T.loc6_36.2 [symbolic = %T.loc6_36.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc6_54.2: type = ptr_type %T.ref.loc6_53 [symbolic = %ptr.loc6_54.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.loc6_54.2: Core.Form = init_form %ptr.loc6_54.2 [symbolic = %.loc6_54.1 (constants.%.cb6)] +// CHECK:STDOUT: %.loc6_38.1: type = splice_block %.loc6_38.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_31.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_38.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc6_28.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_28.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @ExplicitAndAlsoDeduced.%T.loc6_28.1 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc6_40: type = name_ref T, %T.loc6_28.2 [symbolic = %T.loc6_28.1 (constants.%T)] -// CHECK:STDOUT: %x: @ExplicitAndAlsoDeduced.%T.loc6_28.1 (%T) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.e8f) = out_param call_param1 -// CHECK:STDOUT: %return: ref @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.e8f) = return_slot %return.param +// CHECK:STDOUT: %T.loc6_36.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_36.1 (constants.%T)] +// CHECK:STDOUT: %x.param: @ExplicitAndAlsoDeduced.%T.loc6_36.1 (%T) = value_param call_param0 +// CHECK:STDOUT: %T.ref.loc6_47: type = name_ref T, %T.loc6_36.2 [symbolic = %T.loc6_36.1 (constants.%T)] +// CHECK:STDOUT: %x: @ExplicitAndAlsoDeduced.%T.loc6_36.1 (%T) = wrapper_binding x, %x.param +// CHECK:STDOUT: %return.param: ref @ExplicitAndAlsoDeduced.%ptr.loc6_54.1 (%ptr.e8f) = out_param call_param1 +// CHECK:STDOUT: %return: ref @ExplicitAndAlsoDeduced.%ptr.loc6_54.1 (%ptr.e8f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallExplicitAndAlsoDeduced.decl: %CallExplicitAndAlsoDeduced.type = fn_decl @CallExplicitAndAlsoDeduced [concrete = constants.%CallExplicitAndAlsoDeduced] { // CHECK:STDOUT: %return.param_patt: %pattern_type.8a5 = out_param_pattern [concrete = constants.%return.param_patt.7a0] @@ -686,30 +686,30 @@ fn F() { // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ExplicitAndAlsoDeduced(%T.loc6_28.2: type) { -// CHECK:STDOUT: %T.patt.loc6_28.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_28.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc6_28.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_28.1 (constants.%T)] -// CHECK:STDOUT: %pattern_type.loc6_38: type = pattern_type %T.loc6_28.1 [symbolic = %pattern_type.loc6_38 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %x.param_patt.loc6_38.2: @ExplicitAndAlsoDeduced.%pattern_type.loc6_38 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc6_38.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc6_38.2: @ExplicitAndAlsoDeduced.%pattern_type.loc6_38 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc6_38.2 [symbolic = %x.patt.loc6_38.2 (constants.%x.patt.800)] -// CHECK:STDOUT: %ptr.loc6_47.1: type = ptr_type %T.loc6_28.1 [symbolic = %ptr.loc6_47.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.loc6_47.1: Core.Form = init_form %ptr.loc6_47.1 [symbolic = %.loc6_47.1 (constants.%.cb6)] -// CHECK:STDOUT: %pattern_type.loc6_47: type = pattern_type %ptr.loc6_47.1 [symbolic = %pattern_type.loc6_47 (constants.%pattern_type.4f4)] -// CHECK:STDOUT: %return.param_patt.loc6_47.2: @ExplicitAndAlsoDeduced.%pattern_type.loc6_47 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc6_47.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc6_43.2: @ExplicitAndAlsoDeduced.%pattern_type.loc6_47 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc6_47.2, %ptr.loc6_47.1 [symbolic = %return.patt.loc6_43.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: generic fn @ExplicitAndAlsoDeduced(%T.loc6_36.2: type) { +// CHECK:STDOUT: %T.patt.loc6_36.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_36.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc6_36.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_36.1 (constants.%T)] +// CHECK:STDOUT: %pattern_type.loc6_45: type = pattern_type %T.loc6_36.1 [symbolic = %pattern_type.loc6_45 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %x.param_patt.loc6_45.2: @ExplicitAndAlsoDeduced.%pattern_type.loc6_45 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc6_45.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc6_45.2: @ExplicitAndAlsoDeduced.%pattern_type.loc6_45 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc6_45.2 [symbolic = %x.patt.loc6_45.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %ptr.loc6_54.1: type = ptr_type %T.loc6_36.1 [symbolic = %ptr.loc6_54.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.loc6_54.1: Core.Form = init_form %ptr.loc6_54.1 [symbolic = %.loc6_54.1 (constants.%.cb6)] +// CHECK:STDOUT: %pattern_type.loc6_54: type = pattern_type %ptr.loc6_54.1 [symbolic = %pattern_type.loc6_54 (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %return.param_patt.loc6_54.2: @ExplicitAndAlsoDeduced.%pattern_type.loc6_54 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc6_54.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc6_50.2: @ExplicitAndAlsoDeduced.%pattern_type.loc6_54 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc6_54.2, %ptr.loc6_54.1 [symbolic = %return.patt.loc6_50.2 (constants.%return.patt.d67)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_38: = require_complete_type %T.loc6_28.1 [symbolic = %require_complete.loc6_38 (constants.%require_complete.944)] -// CHECK:STDOUT: %require_complete.loc6_43: = require_complete_type %ptr.loc6_47.1 [symbolic = %require_complete.loc6_43 (constants.%require_complete.ef1)] -// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2: = specific_function constants.%ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T.loc6_28.1) [symbolic = %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 (constants.%ExplicitAndAlsoDeduced.specific_fn.c99)] +// CHECK:STDOUT: %require_complete.loc6_45: = require_complete_type %T.loc6_36.1 [symbolic = %require_complete.loc6_45 (constants.%require_complete.944)] +// CHECK:STDOUT: %require_complete.loc6_50: = require_complete_type %ptr.loc6_54.1 [symbolic = %require_complete.loc6_50 (constants.%require_complete.ef1)] +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2: = specific_function constants.%ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T.loc6_36.1) [symbolic = %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 (constants.%ExplicitAndAlsoDeduced.specific_fn.c99)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @ExplicitAndAlsoDeduced.%T.loc6_28.1 (%T)) -> out %return.param: @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.e8f) { +// CHECK:STDOUT: fn(%x.param: @ExplicitAndAlsoDeduced.%T.loc6_36.1 (%T)) -> out %return.param: @ExplicitAndAlsoDeduced.%ptr.loc6_54.1 (%ptr.e8f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitAndAlsoDeduced.ref: %ExplicitAndAlsoDeduced.type = name_ref ExplicitAndAlsoDeduced, file.%ExplicitAndAlsoDeduced.decl [concrete = constants.%ExplicitAndAlsoDeduced] -// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6_28.2 [symbolic = %T.loc6_28.1 (constants.%T)] -// CHECK:STDOUT: %x.ref: @ExplicitAndAlsoDeduced.%T.loc6_28.1 (%T) = name_ref x, %x +// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6_36.2 [symbolic = %T.loc6_36.1 (constants.%T)] +// CHECK:STDOUT: %x.ref: @ExplicitAndAlsoDeduced.%T.loc6_36.1 (%T) = name_ref x, %x // CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.1: = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%T) [symbolic = %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 (constants.%ExplicitAndAlsoDeduced.specific_fn.c99)] -// CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init @ExplicitAndAlsoDeduced.%ptr.loc6_47.1 (%ptr.e8f) = call %ExplicitAndAlsoDeduced.specific_fn.loc7_10.1(%x.ref) +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init @ExplicitAndAlsoDeduced.%ptr.loc6_54.1 (%ptr.e8f) = call %ExplicitAndAlsoDeduced.specific_fn.loc7_10.1(%x.ref) // CHECK:STDOUT: return %ExplicitAndAlsoDeduced.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -744,38 +744,38 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(constants.%T) { -// CHECK:STDOUT: %T.patt.loc6_28.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_28.1 => constants.%T -// CHECK:STDOUT: %pattern_type.loc6_38 => constants.%pattern_type.51d -// CHECK:STDOUT: %x.param_patt.loc6_38.2 => constants.%x.param_patt.91d -// CHECK:STDOUT: %x.patt.loc6_38.2 => constants.%x.patt.800 -// CHECK:STDOUT: %ptr.loc6_47.1 => constants.%ptr.e8f -// CHECK:STDOUT: %.loc6_47.1 => constants.%.cb6 -// CHECK:STDOUT: %pattern_type.loc6_47 => constants.%pattern_type.4f4 -// CHECK:STDOUT: %return.param_patt.loc6_47.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc6_43.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %T.patt.loc6_36.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc6_36.1 => constants.%T +// CHECK:STDOUT: %pattern_type.loc6_45 => constants.%pattern_type.51d +// CHECK:STDOUT: %x.param_patt.loc6_45.2 => constants.%x.param_patt.91d +// CHECK:STDOUT: %x.patt.loc6_45.2 => constants.%x.patt.800 +// CHECK:STDOUT: %ptr.loc6_54.1 => constants.%ptr.e8f +// CHECK:STDOUT: %.loc6_54.1 => constants.%.cb6 +// CHECK:STDOUT: %pattern_type.loc6_54 => constants.%pattern_type.4f4 +// CHECK:STDOUT: %return.param_patt.loc6_54.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc6_50.2 => constants.%return.patt.d67 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_38 => constants.%require_complete.944 -// CHECK:STDOUT: %require_complete.loc6_43 => constants.%require_complete.ef1 +// CHECK:STDOUT: %require_complete.loc6_45 => constants.%require_complete.944 +// CHECK:STDOUT: %require_complete.loc6_50 => constants.%require_complete.ef1 // CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 => constants.%ExplicitAndAlsoDeduced.specific_fn.c99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(constants.%A) { -// CHECK:STDOUT: %T.patt.loc6_28.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_28.1 => constants.%A -// CHECK:STDOUT: %pattern_type.loc6_38 => constants.%pattern_type.9ef -// CHECK:STDOUT: %x.param_patt.loc6_38.2 => constants.%x.param_patt.4c3 -// CHECK:STDOUT: %x.patt.loc6_38.2 => constants.%x.patt.313 -// CHECK:STDOUT: %ptr.loc6_47.1 => constants.%ptr.d43 -// CHECK:STDOUT: %.loc6_47.1 => constants.%.1a4 -// CHECK:STDOUT: %pattern_type.loc6_47 => constants.%pattern_type.8a5 -// CHECK:STDOUT: %return.param_patt.loc6_47.2 => constants.%return.param_patt.7a0 -// CHECK:STDOUT: %return.patt.loc6_43.2 => constants.%return.patt.264 +// CHECK:STDOUT: %T.patt.loc6_36.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc6_36.1 => constants.%A +// CHECK:STDOUT: %pattern_type.loc6_45 => constants.%pattern_type.9ef +// CHECK:STDOUT: %x.param_patt.loc6_45.2 => constants.%x.param_patt.4c3 +// CHECK:STDOUT: %x.patt.loc6_45.2 => constants.%x.patt.313 +// CHECK:STDOUT: %ptr.loc6_54.1 => constants.%ptr.d43 +// CHECK:STDOUT: %.loc6_54.1 => constants.%.1a4 +// CHECK:STDOUT: %pattern_type.loc6_54 => constants.%pattern_type.8a5 +// CHECK:STDOUT: %return.param_patt.loc6_54.2 => constants.%return.param_patt.7a0 +// CHECK:STDOUT: %return.patt.loc6_50.2 => constants.%return.patt.264 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6_38 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc6_43 => constants.%complete_type.a75 +// CHECK:STDOUT: %require_complete.loc6_45 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc6_50 => constants.%complete_type.a75 // CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 => constants.%ExplicitAndAlsoDeduced.specific_fn.d5b // CHECK:STDOUT: } // CHECK:STDOUT: @@ -840,24 +840,24 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ImplicitGenericParam.decl: %ImplicitGenericParam.type = fn_decl @ImplicitGenericParam [concrete = constants.%ImplicitGenericParam] { // CHECK:STDOUT: %T.patt.loc4_26.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc4_36.1: @ImplicitGenericParam.%pattern_type.loc4_36 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc4_36.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc4_36.1: @ImplicitGenericParam.%pattern_type.loc4_36 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_36.1 [symbolic = %x.patt.loc4_36.2 (constants.%x.patt.800)] -// CHECK:STDOUT: %return.param_patt.loc4_45.1: @ImplicitGenericParam.%pattern_type.loc4_45 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_45.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc4_41.1: @ImplicitGenericParam.%pattern_type.loc4_45 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_45.1, %ptr.loc4_45.2 [symbolic = %return.patt.loc4_41.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: %x.param_patt.loc4_35.1: @ImplicitGenericParam.%pattern_type.loc4_35 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc4_35.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc4_35.1: @ImplicitGenericParam.%pattern_type.loc4_35 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_35.1 [symbolic = %x.patt.loc4_35.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %return.param_patt.loc4_44.1: @ImplicitGenericParam.%pattern_type.loc4_44 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_44.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc4_40.1: @ImplicitGenericParam.%pattern_type.loc4_44 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_44.1, %ptr.loc4_44.2 [symbolic = %return.patt.loc4_40.2 (constants.%return.patt.d67)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_44: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc4_45.2: type = ptr_type %T.ref.loc4_44 [symbolic = %ptr.loc4_45.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.loc4_45.2: Core.Form = init_form %ptr.loc4_45.2 [symbolic = %.loc4_45.1 (constants.%.cb6)] -// CHECK:STDOUT: %.loc4_29.1: type = splice_block %.loc4_29.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc4_43: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc4_44.2: type = ptr_type %T.ref.loc4_43 [symbolic = %ptr.loc4_44.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.loc4_44.2: Core.Form = init_form %ptr.loc4_44.2 [symbolic = %.loc4_44.1 (constants.%.cb6)] +// CHECK:STDOUT: %.loc4_28.1: type = splice_block %.loc4_28.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_29.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_28.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_26.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_26.1 (constants.%T)] // CHECK:STDOUT: %x.param: @ImplicitGenericParam.%T.loc4_26.1 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc4_37: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] // CHECK:STDOUT: %x: @ImplicitGenericParam.%T.loc4_26.1 (%T) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @ImplicitGenericParam.%ptr.loc4_45.1 (%ptr.e8f) = out_param call_param1 -// CHECK:STDOUT: %return: ref @ImplicitGenericParam.%ptr.loc4_45.1 (%ptr.e8f) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @ImplicitGenericParam.%ptr.loc4_44.1 (%ptr.e8f) = out_param call_param1 +// CHECK:STDOUT: %return: ref @ImplicitGenericParam.%ptr.loc4_44.1 (%ptr.e8f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallImplicitGenericParam.decl: %CallImplicitGenericParam.type = fn_decl @CallImplicitGenericParam [concrete = constants.%CallImplicitGenericParam] { // CHECK:STDOUT: %n.param_patt: %pattern_type.6b6 = value_param_pattern [concrete = constants.%n.param_patt] @@ -879,26 +879,26 @@ fn F() { // CHECK:STDOUT: generic fn @ImplicitGenericParam(%T.loc4_26.2: type) { // CHECK:STDOUT: %T.patt.loc4_26.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_26.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %pattern_type.loc4_36: type = pattern_type %T.loc4_26.1 [symbolic = %pattern_type.loc4_36 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %x.param_patt.loc4_36.2: @ImplicitGenericParam.%pattern_type.loc4_36 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc4_36.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc4_36.2: @ImplicitGenericParam.%pattern_type.loc4_36 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_36.2 [symbolic = %x.patt.loc4_36.2 (constants.%x.patt.800)] -// CHECK:STDOUT: %ptr.loc4_45.1: type = ptr_type %T.loc4_26.1 [symbolic = %ptr.loc4_45.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.loc4_45.1: Core.Form = init_form %ptr.loc4_45.1 [symbolic = %.loc4_45.1 (constants.%.cb6)] -// CHECK:STDOUT: %pattern_type.loc4_45: type = pattern_type %ptr.loc4_45.1 [symbolic = %pattern_type.loc4_45 (constants.%pattern_type.4f4)] -// CHECK:STDOUT: %return.param_patt.loc4_45.2: @ImplicitGenericParam.%pattern_type.loc4_45 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_45.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc4_41.2: @ImplicitGenericParam.%pattern_type.loc4_45 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_45.2, %ptr.loc4_45.1 [symbolic = %return.patt.loc4_41.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: %pattern_type.loc4_35: type = pattern_type %T.loc4_26.1 [symbolic = %pattern_type.loc4_35 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %x.param_patt.loc4_35.2: @ImplicitGenericParam.%pattern_type.loc4_35 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc4_35.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc4_35.2: @ImplicitGenericParam.%pattern_type.loc4_35 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_35.2 [symbolic = %x.patt.loc4_35.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %ptr.loc4_44.1: type = ptr_type %T.loc4_26.1 [symbolic = %ptr.loc4_44.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.loc4_44.1: Core.Form = init_form %ptr.loc4_44.1 [symbolic = %.loc4_44.1 (constants.%.cb6)] +// CHECK:STDOUT: %pattern_type.loc4_44: type = pattern_type %ptr.loc4_44.1 [symbolic = %pattern_type.loc4_44 (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %return.param_patt.loc4_44.2: @ImplicitGenericParam.%pattern_type.loc4_44 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_44.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc4_40.2: @ImplicitGenericParam.%pattern_type.loc4_44 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_44.2, %ptr.loc4_44.1 [symbolic = %return.patt.loc4_40.2 (constants.%return.patt.d67)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc4_36: = require_complete_type %T.loc4_26.1 [symbolic = %require_complete.loc4_36 (constants.%require_complete.944)] -// CHECK:STDOUT: %require_complete.loc4_41: = require_complete_type %ptr.loc4_45.1 [symbolic = %require_complete.loc4_41 (constants.%require_complete.ef1)] -// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_56.2: = specific_function constants.%ImplicitGenericParam, @ImplicitGenericParam(%T.loc4_26.1) [symbolic = %ImplicitGenericParam.specific_fn.loc4_56.2 (constants.%ImplicitGenericParam.specific_fn.0d7)] +// CHECK:STDOUT: %require_complete.loc4_35: = require_complete_type %T.loc4_26.1 [symbolic = %require_complete.loc4_35 (constants.%require_complete.944)] +// CHECK:STDOUT: %require_complete.loc4_40: = require_complete_type %ptr.loc4_44.1 [symbolic = %require_complete.loc4_40 (constants.%require_complete.ef1)] +// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_55.2: = specific_function constants.%ImplicitGenericParam, @ImplicitGenericParam(%T.loc4_26.1) [symbolic = %ImplicitGenericParam.specific_fn.loc4_55.2 (constants.%ImplicitGenericParam.specific_fn.0d7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @ImplicitGenericParam.%T.loc4_26.1 (%T)) -> out %return.param: @ImplicitGenericParam.%ptr.loc4_45.1 (%ptr.e8f) { +// CHECK:STDOUT: fn(%x.param: @ImplicitGenericParam.%T.loc4_26.1 (%T)) -> out %return.param: @ImplicitGenericParam.%ptr.loc4_44.1 (%ptr.e8f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ImplicitGenericParam.ref: %ImplicitGenericParam.type = name_ref ImplicitGenericParam, file.%ImplicitGenericParam.decl [concrete = constants.%ImplicitGenericParam] // CHECK:STDOUT: %x.ref: @ImplicitGenericParam.%T.loc4_26.1 (%T) = name_ref x, %x -// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_56.1: = specific_function %ImplicitGenericParam.ref, @ImplicitGenericParam(constants.%T) [symbolic = %ImplicitGenericParam.specific_fn.loc4_56.2 (constants.%ImplicitGenericParam.specific_fn.0d7)] -// CHECK:STDOUT: %ImplicitGenericParam.call: init @ImplicitGenericParam.%ptr.loc4_45.1 (%ptr.e8f) = call %ImplicitGenericParam.specific_fn.loc4_56.1(%x.ref) +// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_55.1: = specific_function %ImplicitGenericParam.ref, @ImplicitGenericParam(constants.%T) [symbolic = %ImplicitGenericParam.specific_fn.loc4_55.2 (constants.%ImplicitGenericParam.specific_fn.0d7)] +// CHECK:STDOUT: %ImplicitGenericParam.call: init @ImplicitGenericParam.%ptr.loc4_44.1 (%ptr.e8f) = call %ImplicitGenericParam.specific_fn.loc4_55.1(%x.ref) // CHECK:STDOUT: return %ImplicitGenericParam.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -919,37 +919,37 @@ fn F() { // CHECK:STDOUT: specific @ImplicitGenericParam(constants.%T) { // CHECK:STDOUT: %T.patt.loc4_26.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_26.1 => constants.%T -// CHECK:STDOUT: %pattern_type.loc4_36 => constants.%pattern_type.51d -// CHECK:STDOUT: %x.param_patt.loc4_36.2 => constants.%x.param_patt.91d -// CHECK:STDOUT: %x.patt.loc4_36.2 => constants.%x.patt.800 -// CHECK:STDOUT: %ptr.loc4_45.1 => constants.%ptr.e8f -// CHECK:STDOUT: %.loc4_45.1 => constants.%.cb6 -// CHECK:STDOUT: %pattern_type.loc4_45 => constants.%pattern_type.4f4 -// CHECK:STDOUT: %return.param_patt.loc4_45.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc4_41.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %pattern_type.loc4_35 => constants.%pattern_type.51d +// CHECK:STDOUT: %x.param_patt.loc4_35.2 => constants.%x.param_patt.91d +// CHECK:STDOUT: %x.patt.loc4_35.2 => constants.%x.patt.800 +// CHECK:STDOUT: %ptr.loc4_44.1 => constants.%ptr.e8f +// CHECK:STDOUT: %.loc4_44.1 => constants.%.cb6 +// CHECK:STDOUT: %pattern_type.loc4_44 => constants.%pattern_type.4f4 +// CHECK:STDOUT: %return.param_patt.loc4_44.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc4_40.2 => constants.%return.patt.d67 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc4_36 => constants.%require_complete.944 -// CHECK:STDOUT: %require_complete.loc4_41 => constants.%require_complete.ef1 -// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_56.2 => constants.%ImplicitGenericParam.specific_fn.0d7 +// CHECK:STDOUT: %require_complete.loc4_35 => constants.%require_complete.944 +// CHECK:STDOUT: %require_complete.loc4_40 => constants.%require_complete.ef1 +// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_55.2 => constants.%ImplicitGenericParam.specific_fn.0d7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitGenericParam(constants.%i32) { // CHECK:STDOUT: %T.patt.loc4_26.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_26.1 => constants.%i32 -// CHECK:STDOUT: %pattern_type.loc4_36 => constants.%pattern_type.6b6 -// CHECK:STDOUT: %x.param_patt.loc4_36.2 => constants.%x.param_patt.cee -// CHECK:STDOUT: %x.patt.loc4_36.2 => constants.%x.patt.fbe -// CHECK:STDOUT: %ptr.loc4_45.1 => constants.%ptr.d08 -// CHECK:STDOUT: %.loc4_45.1 => constants.%.952 -// CHECK:STDOUT: %pattern_type.loc4_45 => constants.%pattern_type.f00 -// CHECK:STDOUT: %return.param_patt.loc4_45.2 => constants.%return.param_patt.7dd -// CHECK:STDOUT: %return.patt.loc4_41.2 => constants.%return.patt.dbe +// CHECK:STDOUT: %pattern_type.loc4_35 => constants.%pattern_type.6b6 +// CHECK:STDOUT: %x.param_patt.loc4_35.2 => constants.%x.param_patt.cee +// CHECK:STDOUT: %x.patt.loc4_35.2 => constants.%x.patt.fbe +// CHECK:STDOUT: %ptr.loc4_44.1 => constants.%ptr.d08 +// CHECK:STDOUT: %.loc4_44.1 => constants.%.952 +// CHECK:STDOUT: %pattern_type.loc4_44 => constants.%pattern_type.f00 +// CHECK:STDOUT: %return.param_patt.loc4_44.2 => constants.%return.param_patt.7dd +// CHECK:STDOUT: %return.patt.loc4_40.2 => constants.%return.patt.dbe // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc4_36 => constants.%complete_type.f8a -// CHECK:STDOUT: %require_complete.loc4_41 => constants.%complete_type.07f -// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_56.2 => constants.%ImplicitGenericParam.specific_fn.ae4 +// CHECK:STDOUT: %require_complete.loc4_35 => constants.%complete_type.f8a +// CHECK:STDOUT: %require_complete.loc4_40 => constants.%complete_type.07f +// CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_55.2 => constants.%ImplicitGenericParam.specific_fn.ae4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- deduce_nested_tuple.carbon @@ -1028,20 +1028,20 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %TupleParam.decl: %TupleParam.type = fn_decl @TupleParam [concrete = constants.%TupleParam] { // CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc4_33.1: @TupleParam.%pattern_type (%pattern_type.1d4) = value_param_pattern [symbolic = %x.param_patt.loc4_33.2 (constants.%x.param_patt.442)] -// CHECK:STDOUT: %x.patt.loc4_33.1: @TupleParam.%pattern_type (%pattern_type.1d4) = at_binding_pattern x, %x.param_patt.loc4_33.1 [symbolic = %x.patt.loc4_33.2 (constants.%x.patt.253)] +// CHECK:STDOUT: %x.param_patt.loc4_32.1: @TupleParam.%pattern_type (%pattern_type.1d4) = value_param_pattern [symbolic = %x.param_patt.loc4_32.2 (constants.%x.param_patt.442)] +// CHECK:STDOUT: %x.patt.loc4_32.1: @TupleParam.%pattern_type (%pattern_type.1d4) = at_binding_pattern x, %x.param_patt.loc4_32.1 [symbolic = %x.patt.loc4_32.2 (constants.%x.patt.253)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)] // CHECK:STDOUT: %x.param: @TupleParam.%tuple.type (%tuple.type.2d8) = value_param call_param0 -// CHECK:STDOUT: %.loc4_42.1: type = splice_block %.loc4_42.3 [symbolic = %tuple.type (constants.%tuple.type.2d8)] { +// CHECK:STDOUT: %.loc4_41.1: type = splice_block %.loc4_41.3 [symbolic = %tuple.type (constants.%tuple.type.2d8)] { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.2 [symbolic = %T.loc4_16.1 (constants.%T)] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc4_42.2: %tuple.type.24b = tuple_literal (%T.ref, %i32) [symbolic = %tuple (constants.%tuple.43e)] -// CHECK:STDOUT: %.loc4_42.3: type = converted %.loc4_42.2, constants.%tuple.type.2d8 [symbolic = %tuple.type (constants.%tuple.type.2d8)] +// CHECK:STDOUT: %.loc4_41.2: %tuple.type.24b = tuple_literal (%T.ref, %i32) [symbolic = %tuple (constants.%tuple.43e)] +// CHECK:STDOUT: %.loc4_41.3: type = converted %.loc4_41.2, constants.%tuple.type.2d8 [symbolic = %tuple.type (constants.%tuple.type.2d8)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @TupleParam.%tuple.type (%tuple.type.2d8) = wrapper_binding x, %x.param // CHECK:STDOUT: } @@ -1054,8 +1054,8 @@ fn F() { // CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T.loc4_16.1, constants.%i32) [symbolic = %tuple (constants.%tuple.43e)] // CHECK:STDOUT: %tuple.type: type = tuple_type (%T.loc4_16.1, constants.%i32) [symbolic = %tuple.type (constants.%tuple.type.2d8)] // CHECK:STDOUT: %pattern_type: type = pattern_type %tuple.type [symbolic = %pattern_type (constants.%pattern_type.1d4)] -// CHECK:STDOUT: %x.param_patt.loc4_33.2: @TupleParam.%pattern_type (%pattern_type.1d4) = value_param_pattern [symbolic = %x.param_patt.loc4_33.2 (constants.%x.param_patt.442)] -// CHECK:STDOUT: %x.patt.loc4_33.2: @TupleParam.%pattern_type (%pattern_type.1d4) = at_binding_pattern x, %x.param_patt.loc4_33.2 [symbolic = %x.patt.loc4_33.2 (constants.%x.patt.253)] +// CHECK:STDOUT: %x.param_patt.loc4_32.2: @TupleParam.%pattern_type (%pattern_type.1d4) = value_param_pattern [symbolic = %x.param_patt.loc4_32.2 (constants.%x.param_patt.442)] +// CHECK:STDOUT: %x.patt.loc4_32.2: @TupleParam.%pattern_type (%pattern_type.1d4) = at_binding_pattern x, %x.param_patt.loc4_32.2 [symbolic = %x.patt.loc4_32.2 (constants.%x.patt.253)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.738)] @@ -1096,8 +1096,8 @@ fn F() { // CHECK:STDOUT: %tuple => constants.%tuple.43e // CHECK:STDOUT: %tuple.type => constants.%tuple.type.2d8 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.1d4 -// CHECK:STDOUT: %x.param_patt.loc4_33.2 => constants.%x.param_patt.442 -// CHECK:STDOUT: %x.patt.loc4_33.2 => constants.%x.patt.253 +// CHECK:STDOUT: %x.param_patt.loc4_32.2 => constants.%x.param_patt.442 +// CHECK:STDOUT: %x.patt.loc4_32.2 => constants.%x.patt.253 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TupleParam(Core.IntLiteral) { @@ -1106,8 +1106,8 @@ fn F() { // CHECK:STDOUT: %tuple => constants.%tuple.55f // CHECK:STDOUT: %tuple.type => constants.%tuple.type.94b // CHECK:STDOUT: %pattern_type => constants.%pattern_type.106 -// CHECK:STDOUT: %x.param_patt.loc4_33.2 => constants.%x.param_patt.d6e -// CHECK:STDOUT: %x.patt.loc4_33.2 => constants.%x.patt.e11 +// CHECK:STDOUT: %x.param_patt.loc4_32.2 => constants.%x.param_patt.d6e +// CHECK:STDOUT: %x.patt.loc4_32.2 => constants.%x.patt.e11 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.fc7 @@ -1186,21 +1186,21 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %StructParam.decl: %StructParam.type = fn_decl @StructParam [concrete = constants.%StructParam] { // CHECK:STDOUT: %T.patt.loc4_17.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc4_34.1: @StructParam.%pattern_type (%pattern_type.538) = value_param_pattern [symbolic = %x.param_patt.loc4_34.2 (constants.%x.param_patt.196)] -// CHECK:STDOUT: %x.patt.loc4_34.1: @StructParam.%pattern_type (%pattern_type.538) = at_binding_pattern x, %x.param_patt.loc4_34.1 [symbolic = %x.patt.loc4_34.2 (constants.%x.patt.a9e)] +// CHECK:STDOUT: %x.param_patt.loc4_33.1: @StructParam.%pattern_type (%pattern_type.538) = value_param_pattern [symbolic = %x.param_patt.loc4_33.2 (constants.%x.param_patt.196)] +// CHECK:STDOUT: %x.patt.loc4_33.1: @StructParam.%pattern_type (%pattern_type.538) = at_binding_pattern x, %x.param_patt.loc4_33.1 [symbolic = %x.patt.loc4_33.2 (constants.%x.patt.a9e)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_17.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @StructParam.%struct_type.a.b.loc4_51.1 (%struct_type.a.b.3aa) = value_param call_param0 -// CHECK:STDOUT: %.loc4_51: type = splice_block %struct_type.a.b.loc4_51.2 [symbolic = %struct_type.a.b.loc4_51.1 (constants.%struct_type.a.b.3aa)] { +// CHECK:STDOUT: %x.param: @StructParam.%struct_type.a.b.loc4_50.1 (%struct_type.a.b.3aa) = value_param call_param0 +// CHECK:STDOUT: %.loc4_50: type = splice_block %struct_type.a.b.loc4_50.2 [symbolic = %struct_type.a.b.loc4_50.1 (constants.%struct_type.a.b.3aa)] { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_17.2 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b.loc4_51.2: type = struct_type {.a: @StructParam.%T.loc4_17.1 (%T), .b: %i32} [symbolic = %struct_type.a.b.loc4_51.1 (constants.%struct_type.a.b.3aa)] +// CHECK:STDOUT: %struct_type.a.b.loc4_50.2: type = struct_type {.a: @StructParam.%T.loc4_17.1 (%T), .b: %i32} [symbolic = %struct_type.a.b.loc4_50.1 (constants.%struct_type.a.b.3aa)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @StructParam.%struct_type.a.b.loc4_51.1 (%struct_type.a.b.3aa) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @StructParam.%struct_type.a.b.loc4_50.1 (%struct_type.a.b.3aa) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallStructParam.decl: %CallStructParam.type = fn_decl @CallStructParam [concrete = constants.%CallStructParam] {} {} // CHECK:STDOUT: } @@ -1208,15 +1208,15 @@ fn F() { // CHECK:STDOUT: generic fn @StructParam(%T.loc4_17.2: type) { // CHECK:STDOUT: %T.patt.loc4_17.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_17.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] -// CHECK:STDOUT: %struct_type.a.b.loc4_51.1: type = struct_type {.a: @StructParam.%T.loc4_17.1 (%T), .b: %i32} [symbolic = %struct_type.a.b.loc4_51.1 (constants.%struct_type.a.b.3aa)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a.b.loc4_51.1 [symbolic = %pattern_type (constants.%pattern_type.538)] -// CHECK:STDOUT: %x.param_patt.loc4_34.2: @StructParam.%pattern_type (%pattern_type.538) = value_param_pattern [symbolic = %x.param_patt.loc4_34.2 (constants.%x.param_patt.196)] -// CHECK:STDOUT: %x.patt.loc4_34.2: @StructParam.%pattern_type (%pattern_type.538) = at_binding_pattern x, %x.param_patt.loc4_34.2 [symbolic = %x.patt.loc4_34.2 (constants.%x.patt.a9e)] +// CHECK:STDOUT: %struct_type.a.b.loc4_50.1: type = struct_type {.a: @StructParam.%T.loc4_17.1 (%T), .b: %i32} [symbolic = %struct_type.a.b.loc4_50.1 (constants.%struct_type.a.b.3aa)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a.b.loc4_50.1 [symbolic = %pattern_type (constants.%pattern_type.538)] +// CHECK:STDOUT: %x.param_patt.loc4_33.2: @StructParam.%pattern_type (%pattern_type.538) = value_param_pattern [symbolic = %x.param_patt.loc4_33.2 (constants.%x.param_patt.196)] +// CHECK:STDOUT: %x.patt.loc4_33.2: @StructParam.%pattern_type (%pattern_type.538) = at_binding_pattern x, %x.param_patt.loc4_33.2 [symbolic = %x.patt.loc4_33.2 (constants.%x.patt.a9e)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.a.b.loc4_51.1 [symbolic = %require_complete (constants.%require_complete.5e1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.a.b.loc4_50.1 [symbolic = %require_complete (constants.%require_complete.5e1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @StructParam.%struct_type.a.b.loc4_51.1 (%struct_type.a.b.3aa)) { +// CHECK:STDOUT: fn(%x.param: @StructParam.%struct_type.a.b.loc4_50.1 (%struct_type.a.b.3aa)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -1249,19 +1249,19 @@ fn F() { // CHECK:STDOUT: specific @StructParam(constants.%T) { // CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_17.1 => constants.%T -// CHECK:STDOUT: %struct_type.a.b.loc4_51.1 => constants.%struct_type.a.b.3aa +// CHECK:STDOUT: %struct_type.a.b.loc4_50.1 => constants.%struct_type.a.b.3aa // CHECK:STDOUT: %pattern_type => constants.%pattern_type.538 -// CHECK:STDOUT: %x.param_patt.loc4_34.2 => constants.%x.param_patt.196 -// CHECK:STDOUT: %x.patt.loc4_34.2 => constants.%x.patt.a9e +// CHECK:STDOUT: %x.param_patt.loc4_33.2 => constants.%x.param_patt.196 +// CHECK:STDOUT: %x.patt.loc4_33.2 => constants.%x.patt.a9e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @StructParam(Core.IntLiteral) { // CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_17.1 => Core.IntLiteral -// CHECK:STDOUT: %struct_type.a.b.loc4_51.1 => constants.%struct_type.a.b.f91 +// CHECK:STDOUT: %struct_type.a.b.loc4_50.1 => constants.%struct_type.a.b.f91 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.8a1 -// CHECK:STDOUT: %x.param_patt.loc4_34.2 => constants.%x.param_patt.7a8 -// CHECK:STDOUT: %x.patt.loc4_34.2 => constants.%x.patt.a81 +// CHECK:STDOUT: %x.param_patt.loc4_33.2 => constants.%x.param_patt.7a8 +// CHECK:STDOUT: %x.patt.loc4_33.2 => constants.%x.patt.a81 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.aa8 @@ -1312,22 +1312,22 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %BigStructParam.decl: %BigStructParam.type = fn_decl @BigStructParam [concrete = constants.%BigStructParam] { // CHECK:STDOUT: %T.patt.loc4_20.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_20.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc4_37.1: @BigStructParam.%pattern_type (%pattern_type.3dc) = value_param_pattern [symbolic = %x.param_patt.loc4_37.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_37.1: @BigStructParam.%pattern_type (%pattern_type.3dc) = at_binding_pattern x, %x.param_patt.loc4_37.1 [symbolic = %x.patt.loc4_37.2 (constants.%x.patt)] +// CHECK:STDOUT: %x.param_patt.loc4_36.1: @BigStructParam.%pattern_type (%pattern_type.3dc) = value_param_pattern [symbolic = %x.param_patt.loc4_36.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_36.1: @BigStructParam.%pattern_type (%pattern_type.3dc) = at_binding_pattern x, %x.param_patt.loc4_36.1 [symbolic = %x.patt.loc4_36.2 (constants.%x.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_23.1: type = splice_block %.loc4_23.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_22.1: type = splice_block %.loc4_22.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_23.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_22.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_20.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @BigStructParam.%struct_type.c.d.e.loc4_63.1 (%struct_type.c.d.e) = value_param call_param0 -// CHECK:STDOUT: %.loc4_63: type = splice_block %struct_type.c.d.e.loc4_63.2 [symbolic = %struct_type.c.d.e.loc4_63.1 (constants.%struct_type.c.d.e)] { +// CHECK:STDOUT: %x.param: @BigStructParam.%struct_type.c.d.e.loc4_62.1 (%struct_type.c.d.e) = value_param call_param0 +// CHECK:STDOUT: %.loc4_62: type = splice_block %struct_type.c.d.e.loc4_62.2 [symbolic = %struct_type.c.d.e.loc4_62.1 (constants.%struct_type.c.d.e)] { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_20.2 [symbolic = %T.loc4_20.1 (constants.%T)] -// CHECK:STDOUT: %i32.loc4_51: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %i32.loc4_60: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %struct_type.c.d.e.loc4_63.2: type = struct_type {.c: @BigStructParam.%T.loc4_20.1 (%T), .d: %i32, .e: %i32} [symbolic = %struct_type.c.d.e.loc4_63.1 (constants.%struct_type.c.d.e)] +// CHECK:STDOUT: %i32.loc4_50: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %i32.loc4_59: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %struct_type.c.d.e.loc4_62.2: type = struct_type {.c: @BigStructParam.%T.loc4_20.1 (%T), .d: %i32, .e: %i32} [symbolic = %struct_type.c.d.e.loc4_62.1 (constants.%struct_type.c.d.e)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @BigStructParam.%struct_type.c.d.e.loc4_63.1 (%struct_type.c.d.e) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @BigStructParam.%struct_type.c.d.e.loc4_62.1 (%struct_type.c.d.e) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallBigStructParam.decl: %CallBigStructParam.type = fn_decl @CallBigStructParam [concrete = constants.%CallBigStructParam] {} {} // CHECK:STDOUT: } @@ -1335,15 +1335,15 @@ fn F() { // CHECK:STDOUT: generic fn @BigStructParam(%T.loc4_20.2: type) { // CHECK:STDOUT: %T.patt.loc4_20.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_20.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_20.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_20.1 (constants.%T)] -// CHECK:STDOUT: %struct_type.c.d.e.loc4_63.1: type = struct_type {.c: @BigStructParam.%T.loc4_20.1 (%T), .d: %i32, .e: %i32} [symbolic = %struct_type.c.d.e.loc4_63.1 (constants.%struct_type.c.d.e)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.c.d.e.loc4_63.1 [symbolic = %pattern_type (constants.%pattern_type.3dc)] -// CHECK:STDOUT: %x.param_patt.loc4_37.2: @BigStructParam.%pattern_type (%pattern_type.3dc) = value_param_pattern [symbolic = %x.param_patt.loc4_37.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_37.2: @BigStructParam.%pattern_type (%pattern_type.3dc) = at_binding_pattern x, %x.param_patt.loc4_37.2 [symbolic = %x.patt.loc4_37.2 (constants.%x.patt)] +// CHECK:STDOUT: %struct_type.c.d.e.loc4_62.1: type = struct_type {.c: @BigStructParam.%T.loc4_20.1 (%T), .d: %i32, .e: %i32} [symbolic = %struct_type.c.d.e.loc4_62.1 (constants.%struct_type.c.d.e)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.c.d.e.loc4_62.1 [symbolic = %pattern_type (constants.%pattern_type.3dc)] +// CHECK:STDOUT: %x.param_patt.loc4_36.2: @BigStructParam.%pattern_type (%pattern_type.3dc) = value_param_pattern [symbolic = %x.param_patt.loc4_36.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_36.2: @BigStructParam.%pattern_type (%pattern_type.3dc) = at_binding_pattern x, %x.param_patt.loc4_36.2 [symbolic = %x.patt.loc4_36.2 (constants.%x.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.c.d.e.loc4_63.1 [symbolic = %require_complete (constants.%require_complete.11c)] +// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.c.d.e.loc4_62.1 [symbolic = %require_complete (constants.%require_complete.11c)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @BigStructParam.%struct_type.c.d.e.loc4_63.1 (%struct_type.c.d.e)) { +// CHECK:STDOUT: fn(%x.param: @BigStructParam.%struct_type.c.d.e.loc4_62.1 (%struct_type.c.d.e)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -1365,10 +1365,10 @@ fn F() { // CHECK:STDOUT: specific @BigStructParam(constants.%T) { // CHECK:STDOUT: %T.patt.loc4_20.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_20.1 => constants.%T -// CHECK:STDOUT: %struct_type.c.d.e.loc4_63.1 => constants.%struct_type.c.d.e +// CHECK:STDOUT: %struct_type.c.d.e.loc4_62.1 => constants.%struct_type.c.d.e // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3dc -// CHECK:STDOUT: %x.param_patt.loc4_37.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc4_37.2 => constants.%x.patt +// CHECK:STDOUT: %x.param_patt.loc4_36.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc4_36.2 => constants.%x.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_smaller_struct.carbon @@ -1417,21 +1417,21 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %SmallStructParam.decl: %SmallStructParam.type = fn_decl @SmallStructParam [concrete = constants.%SmallStructParam] { // CHECK:STDOUT: %T.patt.loc4_22.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_22.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc4_39.1: @SmallStructParam.%pattern_type (%pattern_type.128) = value_param_pattern [symbolic = %x.param_patt.loc4_39.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_39.1: @SmallStructParam.%pattern_type (%pattern_type.128) = at_binding_pattern x, %x.param_patt.loc4_39.1 [symbolic = %x.patt.loc4_39.2 (constants.%x.patt)] +// CHECK:STDOUT: %x.param_patt.loc4_38.1: @SmallStructParam.%pattern_type (%pattern_type.128) = value_param_pattern [symbolic = %x.param_patt.loc4_38.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_38.1: @SmallStructParam.%pattern_type (%pattern_type.128) = at_binding_pattern x, %x.param_patt.loc4_38.1 [symbolic = %x.patt.loc4_38.2 (constants.%x.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_25.1: type = splice_block %.loc4_25.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_24.1: type = splice_block %.loc4_24.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_25.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_24.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_22.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_22.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @SmallStructParam.%struct_type.f.g.loc4_56.1 (%struct_type.f.g) = value_param call_param0 -// CHECK:STDOUT: %.loc4_56: type = splice_block %struct_type.f.g.loc4_56.2 [symbolic = %struct_type.f.g.loc4_56.1 (constants.%struct_type.f.g)] { +// CHECK:STDOUT: %x.param: @SmallStructParam.%struct_type.f.g.loc4_55.1 (%struct_type.f.g) = value_param call_param0 +// CHECK:STDOUT: %.loc4_55: type = splice_block %struct_type.f.g.loc4_55.2 [symbolic = %struct_type.f.g.loc4_55.1 (constants.%struct_type.f.g)] { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_22.2 [symbolic = %T.loc4_22.1 (constants.%T)] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %struct_type.f.g.loc4_56.2: type = struct_type {.f: @SmallStructParam.%T.loc4_22.1 (%T), .g: %i32} [symbolic = %struct_type.f.g.loc4_56.1 (constants.%struct_type.f.g)] +// CHECK:STDOUT: %struct_type.f.g.loc4_55.2: type = struct_type {.f: @SmallStructParam.%T.loc4_22.1 (%T), .g: %i32} [symbolic = %struct_type.f.g.loc4_55.1 (constants.%struct_type.f.g)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @SmallStructParam.%struct_type.f.g.loc4_56.1 (%struct_type.f.g) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @SmallStructParam.%struct_type.f.g.loc4_55.1 (%struct_type.f.g) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallSmallStructParam.decl: %CallSmallStructParam.type = fn_decl @CallSmallStructParam [concrete = constants.%CallSmallStructParam] {} {} // CHECK:STDOUT: } @@ -1439,15 +1439,15 @@ fn F() { // CHECK:STDOUT: generic fn @SmallStructParam(%T.loc4_22.2: type) { // CHECK:STDOUT: %T.patt.loc4_22.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_22.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_22.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_22.1 (constants.%T)] -// CHECK:STDOUT: %struct_type.f.g.loc4_56.1: type = struct_type {.f: @SmallStructParam.%T.loc4_22.1 (%T), .g: %i32} [symbolic = %struct_type.f.g.loc4_56.1 (constants.%struct_type.f.g)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.f.g.loc4_56.1 [symbolic = %pattern_type (constants.%pattern_type.128)] -// CHECK:STDOUT: %x.param_patt.loc4_39.2: @SmallStructParam.%pattern_type (%pattern_type.128) = value_param_pattern [symbolic = %x.param_patt.loc4_39.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_39.2: @SmallStructParam.%pattern_type (%pattern_type.128) = at_binding_pattern x, %x.param_patt.loc4_39.2 [symbolic = %x.patt.loc4_39.2 (constants.%x.patt)] +// CHECK:STDOUT: %struct_type.f.g.loc4_55.1: type = struct_type {.f: @SmallStructParam.%T.loc4_22.1 (%T), .g: %i32} [symbolic = %struct_type.f.g.loc4_55.1 (constants.%struct_type.f.g)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.f.g.loc4_55.1 [symbolic = %pattern_type (constants.%pattern_type.128)] +// CHECK:STDOUT: %x.param_patt.loc4_38.2: @SmallStructParam.%pattern_type (%pattern_type.128) = value_param_pattern [symbolic = %x.param_patt.loc4_38.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_38.2: @SmallStructParam.%pattern_type (%pattern_type.128) = at_binding_pattern x, %x.param_patt.loc4_38.2 [symbolic = %x.patt.loc4_38.2 (constants.%x.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.f.g.loc4_56.1 [symbolic = %require_complete (constants.%require_complete.e94)] +// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.f.g.loc4_55.1 [symbolic = %require_complete (constants.%require_complete.e94)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @SmallStructParam.%struct_type.f.g.loc4_56.1 (%struct_type.f.g)) { +// CHECK:STDOUT: fn(%x.param: @SmallStructParam.%struct_type.f.g.loc4_55.1 (%struct_type.f.g)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -1470,10 +1470,10 @@ fn F() { // CHECK:STDOUT: specific @SmallStructParam(constants.%T) { // CHECK:STDOUT: %T.patt.loc4_22.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_22.1 => constants.%T -// CHECK:STDOUT: %struct_type.f.g.loc4_56.1 => constants.%struct_type.f.g +// CHECK:STDOUT: %struct_type.f.g.loc4_55.1 => constants.%struct_type.f.g // CHECK:STDOUT: %pattern_type => constants.%pattern_type.128 -// CHECK:STDOUT: %x.param_patt.loc4_39.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc4_39.2 => constants.%x.patt +// CHECK:STDOUT: %x.param_patt.loc4_38.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc4_38.2 => constants.%x.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_struct_wrong_name.carbon @@ -1521,21 +1521,21 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %WrongNameStructParam.decl: %WrongNameStructParam.type = fn_decl @WrongNameStructParam [concrete = constants.%WrongNameStructParam] { // CHECK:STDOUT: %T.patt.loc4_26.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc4_43.1: @WrongNameStructParam.%pattern_type (%pattern_type.1b7) = value_param_pattern [symbolic = %x.param_patt.loc4_43.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_43.1: @WrongNameStructParam.%pattern_type (%pattern_type.1b7) = at_binding_pattern x, %x.param_patt.loc4_43.1 [symbolic = %x.patt.loc4_43.2 (constants.%x.patt)] +// CHECK:STDOUT: %x.param_patt.loc4_42.1: @WrongNameStructParam.%pattern_type (%pattern_type.1b7) = value_param_pattern [symbolic = %x.param_patt.loc4_42.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_42.1: @WrongNameStructParam.%pattern_type (%pattern_type.1b7) = at_binding_pattern x, %x.param_patt.loc4_42.1 [symbolic = %x.patt.loc4_42.2 (constants.%x.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_29.1: type = splice_block %.loc4_29.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_28.1: type = splice_block %.loc4_28.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_29.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_28.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_26.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @WrongNameStructParam.%struct_type.i.different.loc4_68.1 (%struct_type.i.different) = value_param call_param0 -// CHECK:STDOUT: %.loc4_68: type = splice_block %struct_type.i.different.loc4_68.2 [symbolic = %struct_type.i.different.loc4_68.1 (constants.%struct_type.i.different)] { +// CHECK:STDOUT: %x.param: @WrongNameStructParam.%struct_type.i.different.loc4_67.1 (%struct_type.i.different) = value_param call_param0 +// CHECK:STDOUT: %.loc4_67: type = splice_block %struct_type.i.different.loc4_67.2 [symbolic = %struct_type.i.different.loc4_67.1 (constants.%struct_type.i.different)] { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %struct_type.i.different.loc4_68.2: type = struct_type {.i: @WrongNameStructParam.%T.loc4_26.1 (%T), .different: %i32} [symbolic = %struct_type.i.different.loc4_68.1 (constants.%struct_type.i.different)] +// CHECK:STDOUT: %struct_type.i.different.loc4_67.2: type = struct_type {.i: @WrongNameStructParam.%T.loc4_26.1 (%T), .different: %i32} [symbolic = %struct_type.i.different.loc4_67.1 (constants.%struct_type.i.different)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @WrongNameStructParam.%struct_type.i.different.loc4_68.1 (%struct_type.i.different) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @WrongNameStructParam.%struct_type.i.different.loc4_67.1 (%struct_type.i.different) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallWrongNameStructParam.decl: %CallWrongNameStructParam.type = fn_decl @CallWrongNameStructParam [concrete = constants.%CallWrongNameStructParam] {} {} // CHECK:STDOUT: } @@ -1543,15 +1543,15 @@ fn F() { // CHECK:STDOUT: generic fn @WrongNameStructParam(%T.loc4_26.2: type) { // CHECK:STDOUT: %T.patt.loc4_26.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_26.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %struct_type.i.different.loc4_68.1: type = struct_type {.i: @WrongNameStructParam.%T.loc4_26.1 (%T), .different: %i32} [symbolic = %struct_type.i.different.loc4_68.1 (constants.%struct_type.i.different)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.i.different.loc4_68.1 [symbolic = %pattern_type (constants.%pattern_type.1b7)] -// CHECK:STDOUT: %x.param_patt.loc4_43.2: @WrongNameStructParam.%pattern_type (%pattern_type.1b7) = value_param_pattern [symbolic = %x.param_patt.loc4_43.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_43.2: @WrongNameStructParam.%pattern_type (%pattern_type.1b7) = at_binding_pattern x, %x.param_patt.loc4_43.2 [symbolic = %x.patt.loc4_43.2 (constants.%x.patt)] +// CHECK:STDOUT: %struct_type.i.different.loc4_67.1: type = struct_type {.i: @WrongNameStructParam.%T.loc4_26.1 (%T), .different: %i32} [symbolic = %struct_type.i.different.loc4_67.1 (constants.%struct_type.i.different)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.i.different.loc4_67.1 [symbolic = %pattern_type (constants.%pattern_type.1b7)] +// CHECK:STDOUT: %x.param_patt.loc4_42.2: @WrongNameStructParam.%pattern_type (%pattern_type.1b7) = value_param_pattern [symbolic = %x.param_patt.loc4_42.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_42.2: @WrongNameStructParam.%pattern_type (%pattern_type.1b7) = at_binding_pattern x, %x.param_patt.loc4_42.2 [symbolic = %x.patt.loc4_42.2 (constants.%x.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.i.different.loc4_68.1 [symbolic = %require_complete (constants.%require_complete.59f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.i.different.loc4_67.1 [symbolic = %require_complete (constants.%require_complete.59f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @WrongNameStructParam.%struct_type.i.different.loc4_68.1 (%struct_type.i.different)) { +// CHECK:STDOUT: fn(%x.param: @WrongNameStructParam.%struct_type.i.different.loc4_67.1 (%struct_type.i.different)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -1573,10 +1573,10 @@ fn F() { // CHECK:STDOUT: specific @WrongNameStructParam(constants.%T) { // CHECK:STDOUT: %T.patt.loc4_26.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_26.1 => constants.%T -// CHECK:STDOUT: %struct_type.i.different.loc4_68.1 => constants.%struct_type.i.different +// CHECK:STDOUT: %struct_type.i.different.loc4_67.1 => constants.%struct_type.i.different // CHECK:STDOUT: %pattern_type => constants.%pattern_type.1b7 -// CHECK:STDOUT: %x.param_patt.loc4_43.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc4_43.2 => constants.%x.patt +// CHECK:STDOUT: %x.param_patt.loc4_42.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc4_42.2 => constants.%x.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_deduce_struct_wrong_order.carbon @@ -1624,21 +1624,21 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %WrongOrderStructParam.decl: %WrongOrderStructParam.type = fn_decl @WrongOrderStructParam [concrete = constants.%WrongOrderStructParam] { // CHECK:STDOUT: %T.patt.loc4_27.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_27.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc4_44.1: @WrongOrderStructParam.%pattern_type (%pattern_type.f83) = value_param_pattern [symbolic = %x.param_patt.loc4_44.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_44.1: @WrongOrderStructParam.%pattern_type (%pattern_type.f83) = at_binding_pattern x, %x.param_patt.loc4_44.1 [symbolic = %x.patt.loc4_44.2 (constants.%x.patt)] +// CHECK:STDOUT: %x.param_patt.loc4_43.1: @WrongOrderStructParam.%pattern_type (%pattern_type.f83) = value_param_pattern [symbolic = %x.param_patt.loc4_43.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_43.1: @WrongOrderStructParam.%pattern_type (%pattern_type.f83) = at_binding_pattern x, %x.param_patt.loc4_43.1 [symbolic = %x.patt.loc4_43.2 (constants.%x.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_30.1: type = splice_block %.loc4_30.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_29.1: type = splice_block %.loc4_29.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_30.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_29.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_27.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_27.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @WrongOrderStructParam.%struct_type.first.second.loc4_70.1 (%struct_type.first.second) = value_param call_param0 -// CHECK:STDOUT: %.loc4_70: type = splice_block %struct_type.first.second.loc4_70.2 [symbolic = %struct_type.first.second.loc4_70.1 (constants.%struct_type.first.second)] { +// CHECK:STDOUT: %x.param: @WrongOrderStructParam.%struct_type.first.second.loc4_69.1 (%struct_type.first.second) = value_param call_param0 +// CHECK:STDOUT: %.loc4_69: type = splice_block %struct_type.first.second.loc4_69.2 [symbolic = %struct_type.first.second.loc4_69.1 (constants.%struct_type.first.second)] { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_27.2 [symbolic = %T.loc4_27.1 (constants.%T)] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %struct_type.first.second.loc4_70.2: type = struct_type {.first: @WrongOrderStructParam.%T.loc4_27.1 (%T), .second: %i32} [symbolic = %struct_type.first.second.loc4_70.1 (constants.%struct_type.first.second)] +// CHECK:STDOUT: %struct_type.first.second.loc4_69.2: type = struct_type {.first: @WrongOrderStructParam.%T.loc4_27.1 (%T), .second: %i32} [symbolic = %struct_type.first.second.loc4_69.1 (constants.%struct_type.first.second)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @WrongOrderStructParam.%struct_type.first.second.loc4_70.1 (%struct_type.first.second) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @WrongOrderStructParam.%struct_type.first.second.loc4_69.1 (%struct_type.first.second) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallWrongOrderStructParam.decl: %CallWrongOrderStructParam.type = fn_decl @CallWrongOrderStructParam [concrete = constants.%CallWrongOrderStructParam] {} {} // CHECK:STDOUT: } @@ -1646,15 +1646,15 @@ fn F() { // CHECK:STDOUT: generic fn @WrongOrderStructParam(%T.loc4_27.2: type) { // CHECK:STDOUT: %T.patt.loc4_27.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_27.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_27.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_27.1 (constants.%T)] -// CHECK:STDOUT: %struct_type.first.second.loc4_70.1: type = struct_type {.first: @WrongOrderStructParam.%T.loc4_27.1 (%T), .second: %i32} [symbolic = %struct_type.first.second.loc4_70.1 (constants.%struct_type.first.second)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.first.second.loc4_70.1 [symbolic = %pattern_type (constants.%pattern_type.f83)] -// CHECK:STDOUT: %x.param_patt.loc4_44.2: @WrongOrderStructParam.%pattern_type (%pattern_type.f83) = value_param_pattern [symbolic = %x.param_patt.loc4_44.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_44.2: @WrongOrderStructParam.%pattern_type (%pattern_type.f83) = at_binding_pattern x, %x.param_patt.loc4_44.2 [symbolic = %x.patt.loc4_44.2 (constants.%x.patt)] +// CHECK:STDOUT: %struct_type.first.second.loc4_69.1: type = struct_type {.first: @WrongOrderStructParam.%T.loc4_27.1 (%T), .second: %i32} [symbolic = %struct_type.first.second.loc4_69.1 (constants.%struct_type.first.second)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.first.second.loc4_69.1 [symbolic = %pattern_type (constants.%pattern_type.f83)] +// CHECK:STDOUT: %x.param_patt.loc4_43.2: @WrongOrderStructParam.%pattern_type (%pattern_type.f83) = value_param_pattern [symbolic = %x.param_patt.loc4_43.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_43.2: @WrongOrderStructParam.%pattern_type (%pattern_type.f83) = at_binding_pattern x, %x.param_patt.loc4_43.2 [symbolic = %x.patt.loc4_43.2 (constants.%x.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.first.second.loc4_70.1 [symbolic = %require_complete (constants.%require_complete.ff4)] +// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.first.second.loc4_69.1 [symbolic = %require_complete (constants.%require_complete.ff4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @WrongOrderStructParam.%struct_type.first.second.loc4_70.1 (%struct_type.first.second)) { +// CHECK:STDOUT: fn(%x.param: @WrongOrderStructParam.%struct_type.first.second.loc4_69.1 (%struct_type.first.second)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -1676,10 +1676,10 @@ fn F() { // CHECK:STDOUT: specific @WrongOrderStructParam(constants.%T) { // CHECK:STDOUT: %T.patt.loc4_27.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_27.1 => constants.%T -// CHECK:STDOUT: %struct_type.first.second.loc4_70.1 => constants.%struct_type.first.second +// CHECK:STDOUT: %struct_type.first.second.loc4_69.1 => constants.%struct_type.first.second // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f83 -// CHECK:STDOUT: %x.param_patt.loc4_44.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc4_44.2 => constants.%x.patt +// CHECK:STDOUT: %x.param_patt.loc4_43.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc4_43.2 => constants.%x.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_incomplete.carbon @@ -1722,47 +1722,47 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ImplicitNotDeducible.decl: %ImplicitNotDeducible.type = fn_decl @ImplicitNotDeducible [concrete = constants.%ImplicitNotDeducible] { // CHECK:STDOUT: %T.patt.loc6_26.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_26.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc6_36.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc6_36.2 (constants.%U.patt)] -// CHECK:STDOUT: %x.param_patt.loc6_46.1: @ImplicitNotDeducible.%pattern_type.loc6_46 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc6_46.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc6_46.1: @ImplicitNotDeducible.%pattern_type.loc6_46 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc6_46.1 [symbolic = %x.patt.loc6_46.2 (constants.%x.patt)] -// CHECK:STDOUT: %return.param_patt.loc6_54.1: @ImplicitNotDeducible.%pattern_type.loc6_54 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc6_54.2 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc6_51.1: @ImplicitNotDeducible.%pattern_type.loc6_54 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc6_54.1, %U.ref [symbolic = %return.patt.loc6_51.2 (constants.%return.patt)] +// CHECK:STDOUT: %U.patt.loc6_35.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc6_35.2 (constants.%U.patt)] +// CHECK:STDOUT: %x.param_patt.loc6_44.1: @ImplicitNotDeducible.%pattern_type.loc6_44 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc6_44.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc6_44.1: @ImplicitNotDeducible.%pattern_type.loc6_44 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc6_44.1 [symbolic = %x.patt.loc6_44.2 (constants.%x.patt)] +// CHECK:STDOUT: %return.param_patt.loc6_52.1: @ImplicitNotDeducible.%pattern_type.loc6_52 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc6_52.2 (constants.%return.param_patt)] +// CHECK:STDOUT: %return.patt.loc6_49.1: @ImplicitNotDeducible.%pattern_type.loc6_52 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc6_52.1, %U.ref [symbolic = %return.patt.loc6_49.2 (constants.%return.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc6_36.2 [symbolic = %U.loc6_36.1 (constants.%U)] -// CHECK:STDOUT: %.loc6_54.2: Core.Form = init_form %U.ref [symbolic = %.loc6_54.1 (constants.%.822)] -// CHECK:STDOUT: %.loc6_29.1: type = splice_block %.loc6_29.2 [concrete = type] { +// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc6_35.2 [symbolic = %U.loc6_35.1 (constants.%U)] +// CHECK:STDOUT: %.loc6_52.2: Core.Form = init_form %U.ref [symbolic = %.loc6_52.1 (constants.%.822)] +// CHECK:STDOUT: %.loc6_28.1: type = splice_block %.loc6_28.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc6_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_29.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_28.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_26.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_26.1 (constants.%T)] -// CHECK:STDOUT: %.loc6_39.1: type = splice_block %.loc6_39.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc6_36: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_39.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_37.1: type = splice_block %.loc6_37.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc6_35: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc6_37.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc6_36.2: type = symbolic_binding U, 1 [symbolic = %U.loc6_36.1 (constants.%U)] +// CHECK:STDOUT: %U.loc6_35.2: type = symbolic_binding U, 1 [symbolic = %U.loc6_35.1 (constants.%U)] // CHECK:STDOUT: %x.param: @ImplicitNotDeducible.%T.loc6_26.1 (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_26.2 [symbolic = %T.loc6_26.1 (constants.%T)] // CHECK:STDOUT: %x: @ImplicitNotDeducible.%T.loc6_26.1 (%T) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @ImplicitNotDeducible.%U.loc6_36.1 (%U) = out_param call_param1 -// CHECK:STDOUT: %return: ref @ImplicitNotDeducible.%U.loc6_36.1 (%U) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @ImplicitNotDeducible.%U.loc6_35.1 (%U) = out_param call_param1 +// CHECK:STDOUT: %return: ref @ImplicitNotDeducible.%U.loc6_35.1 (%U) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallImplicitNotDeducible.decl: %CallImplicitNotDeducible.type = fn_decl @CallImplicitNotDeducible [concrete = constants.%CallImplicitNotDeducible] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitNotDeducible(%T.loc6_26.2: type, %U.loc6_36.2: type) { +// CHECK:STDOUT: generic fn @ImplicitNotDeducible(%T.loc6_26.2: type, %U.loc6_35.2: type) { // CHECK:STDOUT: %T.patt.loc6_26.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_26.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_26.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_26.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc6_36.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc6_36.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc6_36.1: type = symbolic_binding U, 1 [symbolic = %U.loc6_36.1 (constants.%U)] -// CHECK:STDOUT: %pattern_type.loc6_46: type = pattern_type %T.loc6_26.1 [symbolic = %pattern_type.loc6_46 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %x.param_patt.loc6_46.2: @ImplicitNotDeducible.%pattern_type.loc6_46 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc6_46.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc6_46.2: @ImplicitNotDeducible.%pattern_type.loc6_46 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc6_46.2 [symbolic = %x.patt.loc6_46.2 (constants.%x.patt)] -// CHECK:STDOUT: %.loc6_54.1: Core.Form = init_form %U.loc6_36.1 [symbolic = %.loc6_54.1 (constants.%.822)] -// CHECK:STDOUT: %pattern_type.loc6_54: type = pattern_type %U.loc6_36.1 [symbolic = %pattern_type.loc6_54 (constants.%pattern_type.946)] -// CHECK:STDOUT: %return.param_patt.loc6_54.2: @ImplicitNotDeducible.%pattern_type.loc6_54 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc6_54.2 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc6_51.2: @ImplicitNotDeducible.%pattern_type.loc6_54 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc6_54.2, %U.loc6_36.1 [symbolic = %return.patt.loc6_51.2 (constants.%return.patt)] +// CHECK:STDOUT: %U.patt.loc6_35.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc6_35.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc6_35.1: type = symbolic_binding U, 1 [symbolic = %U.loc6_35.1 (constants.%U)] +// CHECK:STDOUT: %pattern_type.loc6_44: type = pattern_type %T.loc6_26.1 [symbolic = %pattern_type.loc6_44 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %x.param_patt.loc6_44.2: @ImplicitNotDeducible.%pattern_type.loc6_44 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc6_44.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc6_44.2: @ImplicitNotDeducible.%pattern_type.loc6_44 (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc6_44.2 [symbolic = %x.patt.loc6_44.2 (constants.%x.patt)] +// CHECK:STDOUT: %.loc6_52.1: Core.Form = init_form %U.loc6_35.1 [symbolic = %.loc6_52.1 (constants.%.822)] +// CHECK:STDOUT: %pattern_type.loc6_52: type = pattern_type %U.loc6_35.1 [symbolic = %pattern_type.loc6_52 (constants.%pattern_type.946)] +// CHECK:STDOUT: %return.param_patt.loc6_52.2: @ImplicitNotDeducible.%pattern_type.loc6_52 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc6_52.2 (constants.%return.param_patt)] +// CHECK:STDOUT: %return.patt.loc6_49.2: @ImplicitNotDeducible.%pattern_type.loc6_52 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc6_52.2, %U.loc6_35.1 [symbolic = %return.patt.loc6_49.2 (constants.%return.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @ImplicitNotDeducible.%T.loc6_26.1 (%T)) -> out %return.param: @ImplicitNotDeducible.%U.loc6_36.1 (%U); +// CHECK:STDOUT: fn(%x.param: @ImplicitNotDeducible.%T.loc6_26.1 (%T)) -> out %return.param: @ImplicitNotDeducible.%U.loc6_35.1 (%U); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CallImplicitNotDeducible() { @@ -1777,15 +1777,15 @@ fn F() { // CHECK:STDOUT: specific @ImplicitNotDeducible(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc6_26.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_26.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc6_36.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc6_36.1 => constants.%U -// CHECK:STDOUT: %pattern_type.loc6_46 => constants.%pattern_type.51d -// CHECK:STDOUT: %x.param_patt.loc6_46.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc6_46.2 => constants.%x.patt -// CHECK:STDOUT: %.loc6_54.1 => constants.%.822 -// CHECK:STDOUT: %pattern_type.loc6_54 => constants.%pattern_type.946 -// CHECK:STDOUT: %return.param_patt.loc6_54.2 => constants.%return.param_patt -// CHECK:STDOUT: %return.patt.loc6_51.2 => constants.%return.patt +// CHECK:STDOUT: %U.patt.loc6_35.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc6_35.1 => constants.%U +// CHECK:STDOUT: %pattern_type.loc6_44 => constants.%pattern_type.51d +// CHECK:STDOUT: %x.param_patt.loc6_44.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc6_44.2 => constants.%x.patt +// CHECK:STDOUT: %.loc6_52.1 => constants.%.822 +// CHECK:STDOUT: %pattern_type.loc6_52 => constants.%pattern_type.946 +// CHECK:STDOUT: %return.param_patt.loc6_52.2 => constants.%return.param_patt +// CHECK:STDOUT: %return.patt.loc6_49.2 => constants.%return.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_inconsistent.carbon @@ -1830,25 +1830,25 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ImplicitNotDeducible.decl: %ImplicitNotDeducible.type = fn_decl @ImplicitNotDeducible [concrete = constants.%ImplicitNotDeducible] { // CHECK:STDOUT: %T.patt.loc4_26.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc4_36.1: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc4_36.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_36.1: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_36.1 [symbolic = %x.patt.loc4_36.2 (constants.%x.patt)] -// CHECK:STDOUT: %y.param_patt.loc4_42.1: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %y.param_patt.loc4_42.2 (constants.%y.param_patt)] -// CHECK:STDOUT: %y.patt.loc4_42.1: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = at_binding_pattern y, %y.param_patt.loc4_42.1 [symbolic = %y.patt.loc4_42.2 (constants.%y.patt)] -// CHECK:STDOUT: %return.param_patt.loc4_50.1: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc4_50.2 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc4_47.1: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc4_50.1, %T.ref.loc4_50 [symbolic = %return.patt.loc4_47.2 (constants.%return.patt)] +// CHECK:STDOUT: %x.param_patt.loc4_35.1: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc4_35.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_35.1: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_35.1 [symbolic = %x.patt.loc4_35.2 (constants.%x.patt)] +// CHECK:STDOUT: %y.param_patt.loc4_41.1: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %y.param_patt.loc4_41.2 (constants.%y.param_patt)] +// CHECK:STDOUT: %y.patt.loc4_41.1: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = at_binding_pattern y, %y.param_patt.loc4_41.1 [symbolic = %y.patt.loc4_41.2 (constants.%y.patt)] +// CHECK:STDOUT: %return.param_patt.loc4_49.1: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc4_49.2 (constants.%return.param_patt)] +// CHECK:STDOUT: %return.patt.loc4_46.1: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc4_49.1, %T.ref.loc4_49 [symbolic = %return.patt.loc4_46.2 (constants.%return.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_50: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] -// CHECK:STDOUT: %.loc4_50.2: Core.Form = init_form %T.ref.loc4_50 [symbolic = %.loc4_50.1 (constants.%.184)] -// CHECK:STDOUT: %.loc4_29.1: type = splice_block %.loc4_29.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc4_49: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] +// CHECK:STDOUT: %.loc4_49.2: Core.Form = init_form %T.ref.loc4_49 [symbolic = %.loc4_49.1 (constants.%.184)] +// CHECK:STDOUT: %.loc4_28.1: type = splice_block %.loc4_28.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_29.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_28.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_26.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_26.1 (constants.%T)] // CHECK:STDOUT: %x.param: @ImplicitNotDeducible.%T.loc4_26.1 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc4_37: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] // CHECK:STDOUT: %x: @ImplicitNotDeducible.%T.loc4_26.1 (%T) = wrapper_binding x, %x.param // CHECK:STDOUT: %y.param: @ImplicitNotDeducible.%T.loc4_26.1 (%T) = value_param call_param1 -// CHECK:STDOUT: %T.ref.loc4_44: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc4_43: type = name_ref T, %T.loc4_26.2 [symbolic = %T.loc4_26.1 (constants.%T)] // CHECK:STDOUT: %y: @ImplicitNotDeducible.%T.loc4_26.1 (%T) = wrapper_binding y, %y.param // CHECK:STDOUT: %return.param: ref @ImplicitNotDeducible.%T.loc4_26.1 (%T) = out_param call_param2 // CHECK:STDOUT: %return: ref @ImplicitNotDeducible.%T.loc4_26.1 (%T) = return_slot %return.param @@ -1860,13 +1860,13 @@ fn F() { // CHECK:STDOUT: %T.patt.loc4_26.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_26.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_26.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_26.1 (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_26.1 [symbolic = %pattern_type (constants.%pattern_type.51d)] -// CHECK:STDOUT: %x.param_patt.loc4_36.2: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc4_36.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_36.2: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_36.2 [symbolic = %x.patt.loc4_36.2 (constants.%x.patt)] -// CHECK:STDOUT: %y.param_patt.loc4_42.2: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %y.param_patt.loc4_42.2 (constants.%y.param_patt)] -// CHECK:STDOUT: %y.patt.loc4_42.2: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = at_binding_pattern y, %y.param_patt.loc4_42.2 [symbolic = %y.patt.loc4_42.2 (constants.%y.patt)] -// CHECK:STDOUT: %.loc4_50.1: Core.Form = init_form %T.loc4_26.1 [symbolic = %.loc4_50.1 (constants.%.184)] -// CHECK:STDOUT: %return.param_patt.loc4_50.2: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc4_50.2 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc4_47.2: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc4_50.2, %T.loc4_26.1 [symbolic = %return.patt.loc4_47.2 (constants.%return.patt)] +// CHECK:STDOUT: %x.param_patt.loc4_35.2: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc4_35.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_35.2: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_35.2 [symbolic = %x.patt.loc4_35.2 (constants.%x.patt)] +// CHECK:STDOUT: %y.param_patt.loc4_41.2: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %y.param_patt.loc4_41.2 (constants.%y.param_patt)] +// CHECK:STDOUT: %y.patt.loc4_41.2: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = at_binding_pattern y, %y.param_patt.loc4_41.2 [symbolic = %y.patt.loc4_41.2 (constants.%y.patt)] +// CHECK:STDOUT: %.loc4_49.1: Core.Form = init_form %T.loc4_26.1 [symbolic = %.loc4_49.1 (constants.%.184)] +// CHECK:STDOUT: %return.param_patt.loc4_49.2: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc4_49.2 (constants.%return.param_patt)] +// CHECK:STDOUT: %return.patt.loc4_46.2: @ImplicitNotDeducible.%pattern_type (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc4_49.2, %T.loc4_26.1 [symbolic = %return.patt.loc4_46.2 (constants.%return.patt)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @ImplicitNotDeducible.%T.loc4_26.1 (%T), %y.param: @ImplicitNotDeducible.%T.loc4_26.1 (%T)) -> out %return.param: @ImplicitNotDeducible.%T.loc4_26.1 (%T); // CHECK:STDOUT: } @@ -1886,13 +1886,13 @@ fn F() { // CHECK:STDOUT: %T.patt.loc4_26.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_26.1 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %x.param_patt.loc4_36.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc4_36.2 => constants.%x.patt -// CHECK:STDOUT: %y.param_patt.loc4_42.2 => constants.%y.param_patt -// CHECK:STDOUT: %y.patt.loc4_42.2 => constants.%y.patt -// CHECK:STDOUT: %.loc4_50.1 => constants.%.184 -// CHECK:STDOUT: %return.param_patt.loc4_50.2 => constants.%return.param_patt -// CHECK:STDOUT: %return.patt.loc4_47.2 => constants.%return.patt +// CHECK:STDOUT: %x.param_patt.loc4_35.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc4_35.2 => constants.%x.patt +// CHECK:STDOUT: %y.param_patt.loc4_41.2 => constants.%y.param_patt +// CHECK:STDOUT: %y.patt.loc4_41.2 => constants.%y.patt +// CHECK:STDOUT: %.loc4_49.1 => constants.%.184 +// CHECK:STDOUT: %return.param_patt.loc4_49.2 => constants.%return.param_patt +// CHECK:STDOUT: %return.patt.loc4_46.2 => constants.%return.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- deduce_nested_generic_class.carbon @@ -1964,9 +1964,9 @@ fn F() { // CHECK:STDOUT: %DD.decl: %DD.type = class_decl @DD [concrete = constants.%DD.generic] { // CHECK:STDOUT: %E.patt.loc8_11.1: %pattern_type.98f = symbolic_binding_pattern E, 0 [symbolic = %E.patt.loc8_11.2 (constants.%E.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_14.1: type = splice_block %.loc8_14.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_14.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_13.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %E.loc8_11.2: type = symbolic_binding E, 0 [symbolic = %E.loc8_11.1 (constants.%E)] // CHECK:STDOUT: } @@ -1975,11 +1975,11 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: %DD.ref: %DD.type = name_ref DD, file.%DD.decl [concrete = constants.%DD.generic] // CHECK:STDOUT: %E.ref: type = name_ref E, %E.loc9_15.1 [symbolic = %E.loc9_15.2 (constants.%E)] -// CHECK:STDOUT: %DD.loc9_28.1: type = class_type @DD, @DD(constants.%E) [symbolic = %DD.loc9_28.2 (constants.%DD.699)] +// CHECK:STDOUT: %DD.loc9_27.1: type = class_type @DD, @DD(constants.%E) [symbolic = %DD.loc9_27.2 (constants.%DD.699)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] -// CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc9_17.1: type = splice_block %.loc9_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %E.loc9_15.1: type = symbolic_binding E, 0 [symbolic = %E.loc9_15.2 (constants.%E)] // CHECK:STDOUT: } @@ -1998,14 +1998,14 @@ fn F() { // CHECK:STDOUT: %CC.ref: %CC.type = name_ref CC, file.%CC.decl [concrete = constants.%CC.generic] // CHECK:STDOUT: %DD.ref: %DD.type = name_ref DD, file.%DD.decl [concrete = constants.%DD.generic] // CHECK:STDOUT: %E.ref: type = name_ref E, %E.loc12_15.1 [symbolic = %E.loc12_15.2 (constants.%E)] -// CHECK:STDOUT: %DD.loc12_31.1: type = class_type @DD, @DD(constants.%E) [symbolic = %DD.loc12_31.2 (constants.%DD.699)] -// CHECK:STDOUT: %Z.facet.loc12_32.1: %Z.type = facet_value %DD.loc12_31.1, (constants.%Z.lookup_impl_witness) [symbolic = %Z.facet.loc12_32.2 (constants.%Z.facet.0b6)] -// CHECK:STDOUT: %.loc12_32.1: %Z.type = converted %DD.loc12_31.1, %Z.facet.loc12_32.1 [symbolic = %Z.facet.loc12_32.2 (constants.%Z.facet.0b6)] -// CHECK:STDOUT: %CC.loc12_32.1: type = class_type @CC, @CC(constants.%Z.facet.0b6) [symbolic = %CC.loc12_32.2 (constants.%CC.2a8)] +// CHECK:STDOUT: %DD.loc12_30.1: type = class_type @DD, @DD(constants.%E) [symbolic = %DD.loc12_30.2 (constants.%DD.699)] +// CHECK:STDOUT: %Z.facet.loc12_31.1: %Z.type = facet_value %DD.loc12_30.1, (constants.%Z.lookup_impl_witness) [symbolic = %Z.facet.loc12_31.2 (constants.%Z.facet.0b6)] +// CHECK:STDOUT: %.loc12_31.1: %Z.type = converted %DD.loc12_30.1, %Z.facet.loc12_31.1 [symbolic = %Z.facet.loc12_31.2 (constants.%Z.facet.0b6)] +// CHECK:STDOUT: %CC.loc12_31.1: type = class_type @CC, @CC(constants.%Z.facet.0b6) [symbolic = %CC.loc12_31.2 (constants.%CC.2a8)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] -// CHECK:STDOUT: %.loc12_18.1: type = splice_block %.loc12_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc12_17.1: type = splice_block %.loc12_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %E.loc12_15.1: type = symbolic_binding E, 0 [symbolic = %E.loc12_15.2 (constants.%E)] // CHECK:STDOUT: } @@ -2037,40 +2037,40 @@ fn F() { // CHECK:STDOUT: generic impl @DD.as.Z.impl(%E.loc9_15.1: type) { // CHECK:STDOUT: %E.patt.loc9_15.2: %pattern_type.98f = symbolic_binding_pattern E, 0 [symbolic = %E.patt.loc9_15.2 (constants.%E.patt)] // CHECK:STDOUT: %E.loc9_15.2: type = symbolic_binding E, 0 [symbolic = %E.loc9_15.2 (constants.%E)] -// CHECK:STDOUT: %DD.loc9_28.2: type = class_type @DD, @DD(%E.loc9_15.2) [symbolic = %DD.loc9_28.2 (constants.%DD.699)] -// CHECK:STDOUT: %Z.impl_witness.loc9_35.2: = impl_witness %Z.impl_witness_table, @DD.as.Z.impl(%E.loc9_15.2) [symbolic = %Z.impl_witness.loc9_35.2 (constants.%Z.impl_witness.7fb)] +// CHECK:STDOUT: %DD.loc9_27.2: type = class_type @DD, @DD(%E.loc9_15.2) [symbolic = %DD.loc9_27.2 (constants.%DD.699)] +// CHECK:STDOUT: %Z.impl_witness.loc9_34.2: = impl_witness %Z.impl_witness_table, @DD.as.Z.impl(%E.loc9_15.2) [symbolic = %Z.impl_witness.loc9_34.2 (constants.%Z.impl_witness.7fb)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %DD.loc9_28.1 as %Z.ref { +// CHECK:STDOUT: impl: %DD.loc9_27.1 as %Z.ref { // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (), @DD.as.Z.impl [concrete] -// CHECK:STDOUT: %Z.impl_witness.loc9_35.1: = impl_witness %Z.impl_witness_table, @DD.as.Z.impl(constants.%E) [symbolic = %Z.impl_witness.loc9_35.2 (constants.%Z.impl_witness.7fb)] +// CHECK:STDOUT: %Z.impl_witness.loc9_34.1: = impl_witness %Z.impl_witness_table, @DD.as.Z.impl(constants.%E) [symbolic = %Z.impl_witness.loc9_34.2 (constants.%Z.impl_witness.7fb)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %Z.ref -// CHECK:STDOUT: witness = %Z.impl_witness.loc9_35.1 +// CHECK:STDOUT: witness = %Z.impl_witness.loc9_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @CC.as.Z.impl(%E.loc12_15.1: type) { // CHECK:STDOUT: %E.patt.loc12_15.2: %pattern_type.98f = symbolic_binding_pattern E, 0 [symbolic = %E.patt.loc12_15.2 (constants.%E.patt)] // CHECK:STDOUT: %E.loc12_15.2: type = symbolic_binding E, 0 [symbolic = %E.loc12_15.2 (constants.%E)] -// CHECK:STDOUT: %DD.loc12_31.2: type = class_type @DD, @DD(%E.loc12_15.2) [symbolic = %DD.loc12_31.2 (constants.%DD.699)] -// CHECK:STDOUT: %.loc12_32.2: require_specific_def_type = require_specific_def @DD.as.Z.impl(%E.loc12_15.2) [symbolic = %.loc12_32.2 (constants.%.8d3)] -// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %DD.loc12_31.2, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] -// CHECK:STDOUT: %Z.facet.loc12_32.2: %Z.type = facet_value %DD.loc12_31.2, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc12_32.2 (constants.%Z.facet.0b6)] -// CHECK:STDOUT: %CC.loc12_32.2: type = class_type @CC, @CC(%Z.facet.loc12_32.2) [symbolic = %CC.loc12_32.2 (constants.%CC.2a8)] -// CHECK:STDOUT: %Z.impl_witness.loc12_39.2: = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(%E.loc12_15.2) [symbolic = %Z.impl_witness.loc12_39.2 (constants.%Z.impl_witness.458)] +// CHECK:STDOUT: %DD.loc12_30.2: type = class_type @DD, @DD(%E.loc12_15.2) [symbolic = %DD.loc12_30.2 (constants.%DD.699)] +// CHECK:STDOUT: %.loc12_31.2: require_specific_def_type = require_specific_def @DD.as.Z.impl(%E.loc12_15.2) [symbolic = %.loc12_31.2 (constants.%.8d3)] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %DD.loc12_30.2, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] +// CHECK:STDOUT: %Z.facet.loc12_31.2: %Z.type = facet_value %DD.loc12_30.2, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc12_31.2 (constants.%Z.facet.0b6)] +// CHECK:STDOUT: %CC.loc12_31.2: type = class_type @CC, @CC(%Z.facet.loc12_31.2) [symbolic = %CC.loc12_31.2 (constants.%CC.2a8)] +// CHECK:STDOUT: %Z.impl_witness.loc12_38.2: = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(%E.loc12_15.2) [symbolic = %Z.impl_witness.loc12_38.2 (constants.%Z.impl_witness.458)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %CC.loc12_32.1 as %Z.ref { +// CHECK:STDOUT: impl: %CC.loc12_31.1 as %Z.ref { // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (), @CC.as.Z.impl [concrete] -// CHECK:STDOUT: %Z.impl_witness.loc12_39.1: = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(constants.%E) [symbolic = %Z.impl_witness.loc12_39.2 (constants.%Z.impl_witness.458)] +// CHECK:STDOUT: %Z.impl_witness.loc12_38.1: = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(constants.%E) [symbolic = %Z.impl_witness.loc12_38.2 (constants.%Z.impl_witness.458)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %Z.ref -// CHECK:STDOUT: witness = %Z.impl_witness.loc12_39.1 +// CHECK:STDOUT: witness = %Z.impl_witness.loc12_38.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2145,8 +2145,8 @@ fn F() { // CHECK:STDOUT: specific @DD.as.Z.impl(constants.%E) { // CHECK:STDOUT: %E.patt.loc9_15.2 => constants.%E.patt // CHECK:STDOUT: %E.loc9_15.2 => constants.%E -// CHECK:STDOUT: %DD.loc9_28.2 => constants.%DD.699 -// CHECK:STDOUT: %Z.impl_witness.loc9_35.2 => constants.%Z.impl_witness.7fb +// CHECK:STDOUT: %DD.loc9_27.2 => constants.%DD.699 +// CHECK:STDOUT: %Z.impl_witness.loc9_34.2 => constants.%Z.impl_witness.7fb // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -2168,12 +2168,12 @@ fn F() { // CHECK:STDOUT: specific @CC.as.Z.impl(constants.%E) { // CHECK:STDOUT: %E.patt.loc12_15.2 => constants.%E.patt // CHECK:STDOUT: %E.loc12_15.2 => constants.%E -// CHECK:STDOUT: %DD.loc12_31.2 => constants.%DD.699 -// CHECK:STDOUT: %.loc12_32.2 => constants.%.8d3 +// CHECK:STDOUT: %DD.loc12_30.2 => constants.%DD.699 +// CHECK:STDOUT: %.loc12_31.2 => constants.%.8d3 // CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.lookup_impl_witness -// CHECK:STDOUT: %Z.facet.loc12_32.2 => constants.%Z.facet.0b6 -// CHECK:STDOUT: %CC.loc12_32.2 => constants.%CC.2a8 -// CHECK:STDOUT: %Z.impl_witness.loc12_39.2 => constants.%Z.impl_witness.458 +// CHECK:STDOUT: %Z.facet.loc12_31.2 => constants.%Z.facet.0b6 +// CHECK:STDOUT: %CC.loc12_31.2 => constants.%CC.2a8 +// CHECK:STDOUT: %Z.impl_witness.loc12_38.2 => constants.%Z.impl_witness.458 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%Z.facet.2d1) { @@ -2188,8 +2188,8 @@ fn F() { // CHECK:STDOUT: specific @DD.as.Z.impl(constants.%EE) { // CHECK:STDOUT: %E.patt.loc9_15.2 => constants.%E.patt // CHECK:STDOUT: %E.loc9_15.2 => constants.%EE -// CHECK:STDOUT: %DD.loc9_28.2 => constants.%DD.cfc -// CHECK:STDOUT: %Z.impl_witness.loc9_35.2 => constants.%Z.impl_witness.7dd +// CHECK:STDOUT: %DD.loc9_27.2 => constants.%DD.cfc +// CHECK:STDOUT: %Z.impl_witness.loc9_34.2 => constants.%Z.impl_witness.7dd // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -2202,12 +2202,12 @@ fn F() { // CHECK:STDOUT: specific @CC.as.Z.impl(constants.%EE) { // CHECK:STDOUT: %E.patt.loc12_15.2 => constants.%E.patt // CHECK:STDOUT: %E.loc12_15.2 => constants.%EE -// CHECK:STDOUT: %DD.loc12_31.2 => constants.%DD.cfc -// CHECK:STDOUT: %.loc12_32.2 => constants.%.061 +// CHECK:STDOUT: %DD.loc12_30.2 => constants.%DD.cfc +// CHECK:STDOUT: %.loc12_31.2 => constants.%.061 // CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.impl_witness.7dd -// CHECK:STDOUT: %Z.facet.loc12_32.2 => constants.%Z.facet.da0 -// CHECK:STDOUT: %CC.loc12_32.2 => constants.%CC.a5a -// CHECK:STDOUT: %Z.impl_witness.loc12_39.2 => constants.%Z.impl_witness.df9 +// CHECK:STDOUT: %Z.facet.loc12_31.2 => constants.%Z.facet.da0 +// CHECK:STDOUT: %CC.loc12_31.2 => constants.%CC.a5a +// CHECK:STDOUT: %Z.impl_witness.loc12_38.2 => constants.%Z.impl_witness.df9 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon b/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon index 4e42dbbb4cc8..36c3f289b8d2 100644 --- a/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon +++ b/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon @@ -24,14 +24,14 @@ impl DD as Y {} impl DD as W {} // CC requires D to implement Y. -class CC(D:! Y) {} +class CC(D: Y) {} interface Z {} // The `D` interface provides `Y` but not `W`, so we need to see that the // parameter to `CC` is `DD` which provides `Y & W`, not just a FacetValue // abstractly providing `Y. -impl forall [E:! Y & W] CC(E) as Z {} +impl forall [E: Y & W] CC(E) as Z {} fn F() { (CC(DD)) as Z; @@ -137,20 +137,20 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: %CC.ref: %CC.type = name_ref CC, file.%CC.decl [concrete = constants.%CC.generic] // CHECK:STDOUT: %E.ref: %facet_type = name_ref E, %E.loc19_15.1 [symbolic = %E.loc19_15.2 (constants.%E)] -// CHECK:STDOUT: %E.as_type.loc19_29.1: type = facet_access_type %E.ref [symbolic = %E.as_type.loc19_29.2 (constants.%E.as_type)] -// CHECK:STDOUT: %Y.facet.loc19_29.1: %Y.type = facet_value %E.as_type.loc19_29.1, (constants.%Y.lookup_impl_witness) [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.18f)] -// CHECK:STDOUT: %.loc19_29: %Y.type = converted %E.ref, %Y.facet.loc19_29.1 [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.18f)] -// CHECK:STDOUT: %CC.loc19_29.1: type = class_type @CC, @CC(constants.%Y.facet.18f) [symbolic = %CC.loc19_29.2 (constants.%CC.db5)] +// CHECK:STDOUT: %E.as_type.loc19_28.1: type = facet_access_type %E.ref [symbolic = %E.as_type.loc19_28.2 (constants.%E.as_type)] +// CHECK:STDOUT: %Y.facet.loc19_28.1: %Y.type = facet_value %E.as_type.loc19_28.1, (constants.%Y.lookup_impl_witness) [symbolic = %Y.facet.loc19_28.2 (constants.%Y.facet.18f)] +// CHECK:STDOUT: %.loc19_28: %Y.type = converted %E.ref, %Y.facet.loc19_28.1 [symbolic = %Y.facet.loc19_28.2 (constants.%Y.facet.18f)] +// CHECK:STDOUT: %CC.loc19_28.1: type = class_type @CC, @CC(constants.%Y.facet.18f) [symbolic = %CC.loc19_28.2 (constants.%CC.db5)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] -// CHECK:STDOUT: %.loc19_20.1: type = splice_block %.loc19_20.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %.loc19_19.1: type = splice_block %.loc19_19.3 [concrete = constants.%facet_type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] // CHECK:STDOUT: %W.ref: type = name_ref W, file.%W.decl [concrete = constants.%W.type] // CHECK:STDOUT: %impl.elem0: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %Y.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%Y.ref, %W.ref) [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc19_20.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc19_20.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc19_20.2 [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc19_19.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc19_19.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc19_19.2 [concrete = constants.%facet_type] // CHECK:STDOUT: } // CHECK:STDOUT: %E.loc19_15.1: %facet_type = symbolic_binding E, 0 [symbolic = %E.loc19_15.2 (constants.%E)] // CHECK:STDOUT: } @@ -217,21 +217,21 @@ fn F() { // CHECK:STDOUT: generic impl @CC.as.Z.impl(%E.loc19_15.1: %facet_type) { // CHECK:STDOUT: %E.patt.loc19_15.2: %pattern_type.bd4 = symbolic_binding_pattern E, 0 [symbolic = %E.patt.loc19_15.2 (constants.%E.patt)] // CHECK:STDOUT: %E.loc19_15.2: %facet_type = symbolic_binding E, 0 [symbolic = %E.loc19_15.2 (constants.%E)] -// CHECK:STDOUT: %E.as_type.loc19_29.2: type = facet_access_type %E.loc19_15.2 [symbolic = %E.as_type.loc19_29.2 (constants.%E.as_type)] +// CHECK:STDOUT: %E.as_type.loc19_28.2: type = facet_access_type %E.loc19_15.2 [symbolic = %E.as_type.loc19_28.2 (constants.%E.as_type)] // CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %E.loc19_15.2, @Y [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)] -// CHECK:STDOUT: %Y.facet.loc19_29.2: %Y.type = facet_value %E.as_type.loc19_29.2, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc19_29.2 (constants.%Y.facet.18f)] -// CHECK:STDOUT: %CC.loc19_29.2: type = class_type @CC, @CC(%Y.facet.loc19_29.2) [symbolic = %CC.loc19_29.2 (constants.%CC.db5)] -// CHECK:STDOUT: %Z.impl_witness.loc19_36.2: = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(%E.loc19_15.2) [symbolic = %Z.impl_witness.loc19_36.2 (constants.%Z.impl_witness.6a9)] +// CHECK:STDOUT: %Y.facet.loc19_28.2: %Y.type = facet_value %E.as_type.loc19_28.2, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc19_28.2 (constants.%Y.facet.18f)] +// CHECK:STDOUT: %CC.loc19_28.2: type = class_type @CC, @CC(%Y.facet.loc19_28.2) [symbolic = %CC.loc19_28.2 (constants.%CC.db5)] +// CHECK:STDOUT: %Z.impl_witness.loc19_35.2: = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(%E.loc19_15.2) [symbolic = %Z.impl_witness.loc19_35.2 (constants.%Z.impl_witness.6a9)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %CC.loc19_29.1 as %Z.ref { +// CHECK:STDOUT: impl: %CC.loc19_28.1 as %Z.ref { // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (), @CC.as.Z.impl [concrete] -// CHECK:STDOUT: %Z.impl_witness.loc19_36.1: = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(constants.%E) [symbolic = %Z.impl_witness.loc19_36.2 (constants.%Z.impl_witness.6a9)] +// CHECK:STDOUT: %Z.impl_witness.loc19_35.1: = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(constants.%E) [symbolic = %Z.impl_witness.loc19_35.2 (constants.%Z.impl_witness.6a9)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %Z.ref -// CHECK:STDOUT: witness = %Z.impl_witness.loc19_36.1 +// CHECK:STDOUT: witness = %Z.impl_witness.loc19_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -306,11 +306,11 @@ fn F() { // CHECK:STDOUT: specific @CC.as.Z.impl(constants.%E) { // CHECK:STDOUT: %E.patt.loc19_15.2 => constants.%E.patt // CHECK:STDOUT: %E.loc19_15.2 => constants.%E -// CHECK:STDOUT: %E.as_type.loc19_29.2 => constants.%E.as_type +// CHECK:STDOUT: %E.as_type.loc19_28.2 => constants.%E.as_type // CHECK:STDOUT: %Y.lookup_impl_witness => constants.%Y.lookup_impl_witness -// CHECK:STDOUT: %Y.facet.loc19_29.2 => constants.%Y.facet.18f -// CHECK:STDOUT: %CC.loc19_29.2 => constants.%CC.db5 -// CHECK:STDOUT: %Z.impl_witness.loc19_36.2 => constants.%Z.impl_witness.6a9 +// CHECK:STDOUT: %Y.facet.loc19_28.2 => constants.%Y.facet.18f +// CHECK:STDOUT: %CC.loc19_28.2 => constants.%CC.db5 +// CHECK:STDOUT: %Z.impl_witness.loc19_35.2 => constants.%Z.impl_witness.6a9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%Z.facet.674) { @@ -325,11 +325,11 @@ fn F() { // CHECK:STDOUT: specific @CC.as.Z.impl(constants.%facet_value) { // CHECK:STDOUT: %E.patt.loc19_15.2 => constants.%E.patt // CHECK:STDOUT: %E.loc19_15.2 => constants.%facet_value -// CHECK:STDOUT: %E.as_type.loc19_29.2 => constants.%DD +// CHECK:STDOUT: %E.as_type.loc19_28.2 => constants.%DD // CHECK:STDOUT: %Y.lookup_impl_witness => constants.%Y.impl_witness -// CHECK:STDOUT: %Y.facet.loc19_29.2 => constants.%Y.facet.2a4 -// CHECK:STDOUT: %CC.loc19_29.2 => constants.%CC.d62 -// CHECK:STDOUT: %Z.impl_witness.loc19_36.2 => constants.%Z.impl_witness.b3a +// CHECK:STDOUT: %Y.facet.loc19_28.2 => constants.%Y.facet.2a4 +// CHECK:STDOUT: %CC.loc19_28.2 => constants.%CC.d62 +// CHECK:STDOUT: %Z.impl_witness.loc19_35.2 => constants.%Z.impl_witness.b3a // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon b/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon index 070fe01b9ac5..9d6423e92748 100644 --- a/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon +++ b/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon @@ -16,21 +16,21 @@ package Lib; interface Z {} -fn A[T:! Z](unused x: {.a: T}) {} +fn A[T: Z](unused x: {.a: T}) {} // --- fail_deduce_imported_function.carbon import Lib; -fn A[T:! Lib.Z](unused x: {.a: T}) {} +fn A[T: Lib.Z](unused x: {.a: T}) {} fn B() { // CHECK:STDERR: fail_deduce_imported_function.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: A({.b = {}}); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_imported_function.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn A[T:! Lib.Z](unused x: {.a: T}) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn A[T: Lib.Z](unused x: {.a: T}) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: A({.b = {}}); @@ -39,8 +39,8 @@ fn B() { // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_imported_function.carbon:[[@LINE-17]]:1: in import [InImport] // CHECK:STDERR: lib.carbon:4:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn A[T:! Z](unused x: {.a: T}) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn A[T: Z](unused x: {.a: T}) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Lib.A({.b = {}}); } @@ -73,22 +73,22 @@ fn B() { // CHECK:STDOUT: %Z.decl: type = interface_decl @Z [concrete = constants.%Z.type] {} {} // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] { // CHECK:STDOUT: %T.patt.loc4_7.1: %pattern_type.1d1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc4_21.1: @A.%pattern_type (%pattern_type.662) = value_param_pattern [symbolic = %x.param_patt.loc4_21.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_21.1: @A.%pattern_type (%pattern_type.662) = at_binding_pattern x, %x.param_patt.loc4_21.1 [symbolic = %x.patt.loc4_21.2 (constants.%x.patt)] +// CHECK:STDOUT: %x.param_patt.loc4_20.1: @A.%pattern_type (%pattern_type.662) = value_param_pattern [symbolic = %x.param_patt.loc4_20.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_20.1: @A.%pattern_type (%pattern_type.662) = at_binding_pattern x, %x.param_patt.loc4_20.1 [symbolic = %x.patt.loc4_20.2 (constants.%x.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_10: type = splice_block %Z.ref [concrete = constants.%Z.type] { +// CHECK:STDOUT: %.loc4_9: type = splice_block %Z.ref [concrete = constants.%Z.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_7.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @A.%struct_type.a.loc4_29.1 (%struct_type.a) = value_param call_param0 -// CHECK:STDOUT: %.loc4_29: type = splice_block %struct_type.a.loc4_29.2 [symbolic = %struct_type.a.loc4_29.1 (constants.%struct_type.a)] { +// CHECK:STDOUT: %x.param: @A.%struct_type.a.loc4_28.1 (%struct_type.a) = value_param call_param0 +// CHECK:STDOUT: %.loc4_28: type = splice_block %struct_type.a.loc4_28.2 [symbolic = %struct_type.a.loc4_28.1 (constants.%struct_type.a)] { // CHECK:STDOUT: %T.ref: %Z.type = name_ref T, %T.loc4_7.2 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc4_28.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc4_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc4_28: type = converted %T.ref, %T.as_type.loc4_28.2 [symbolic = %T.as_type.loc4_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %struct_type.a.loc4_29.2: type = struct_type {.a: @A.%T.as_type.loc4_28.1 (%T.as_type)} [symbolic = %struct_type.a.loc4_29.1 (constants.%struct_type.a)] +// CHECK:STDOUT: %T.as_type.loc4_27.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc4_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc4_27: type = converted %T.ref, %T.as_type.loc4_27.2 [symbolic = %T.as_type.loc4_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %struct_type.a.loc4_28.2: type = struct_type {.a: @A.%T.as_type.loc4_27.1 (%T.as_type)} [symbolic = %struct_type.a.loc4_28.1 (constants.%struct_type.a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @A.%struct_type.a.loc4_29.1 (%struct_type.a) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @A.%struct_type.a.loc4_28.1 (%struct_type.a) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -108,16 +108,16 @@ fn B() { // CHECK:STDOUT: generic fn @A(%T.loc4_7.2: %Z.type) { // CHECK:STDOUT: %T.patt.loc4_7.2: %pattern_type.1d1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_7.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc4_28.1: type = facet_access_type %T.loc4_7.1 [symbolic = %T.as_type.loc4_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %struct_type.a.loc4_29.1: type = struct_type {.a: @A.%T.as_type.loc4_28.1 (%T.as_type)} [symbolic = %struct_type.a.loc4_29.1 (constants.%struct_type.a)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a.loc4_29.1 [symbolic = %pattern_type (constants.%pattern_type.662)] -// CHECK:STDOUT: %x.param_patt.loc4_21.2: @A.%pattern_type (%pattern_type.662) = value_param_pattern [symbolic = %x.param_patt.loc4_21.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_21.2: @A.%pattern_type (%pattern_type.662) = at_binding_pattern x, %x.param_patt.loc4_21.2 [symbolic = %x.patt.loc4_21.2 (constants.%x.patt)] +// CHECK:STDOUT: %T.as_type.loc4_27.1: type = facet_access_type %T.loc4_7.1 [symbolic = %T.as_type.loc4_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %struct_type.a.loc4_28.1: type = struct_type {.a: @A.%T.as_type.loc4_27.1 (%T.as_type)} [symbolic = %struct_type.a.loc4_28.1 (constants.%struct_type.a)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a.loc4_28.1 [symbolic = %pattern_type (constants.%pattern_type.662)] +// CHECK:STDOUT: %x.param_patt.loc4_20.2: @A.%pattern_type (%pattern_type.662) = value_param_pattern [symbolic = %x.param_patt.loc4_20.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_20.2: @A.%pattern_type (%pattern_type.662) = at_binding_pattern x, %x.param_patt.loc4_20.2 [symbolic = %x.patt.loc4_20.2 (constants.%x.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.a.loc4_29.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.a.loc4_28.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @A.%struct_type.a.loc4_29.1 (%struct_type.a)) { +// CHECK:STDOUT: fn(%x.param: @A.%struct_type.a.loc4_28.1 (%struct_type.a)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -132,11 +132,11 @@ fn B() { // CHECK:STDOUT: specific @A(constants.%T) { // CHECK:STDOUT: %T.patt.loc4_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_7.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc4_28.1 => constants.%T.as_type -// CHECK:STDOUT: %struct_type.a.loc4_29.1 => constants.%struct_type.a +// CHECK:STDOUT: %T.as_type.loc4_27.1 => constants.%T.as_type +// CHECK:STDOUT: %struct_type.a.loc4_28.1 => constants.%struct_type.a // CHECK:STDOUT: %pattern_type => constants.%pattern_type.662 -// CHECK:STDOUT: %x.param_patt.loc4_21.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc4_21.2 => constants.%x.patt +// CHECK:STDOUT: %x.param_patt.loc4_20.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc4_20.2 => constants.%x.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_imported_function.carbon @@ -189,23 +189,23 @@ fn B() { // CHECK:STDOUT: %Lib.import = import Lib // CHECK:STDOUT: %A.decl: %A.type.9f4 = fn_decl @A.loc4 [concrete = constants.%A.921] { // CHECK:STDOUT: %T.patt.loc4_7.1: %pattern_type.1d1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc4_25.1: @A.loc4.%pattern_type (%pattern_type.662) = value_param_pattern [symbolic = %x.param_patt.loc4_25.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_25.1: @A.loc4.%pattern_type (%pattern_type.662) = at_binding_pattern x, %x.param_patt.loc4_25.1 [symbolic = %x.patt.loc4_25.2 (constants.%x.patt.fcf7db.1)] +// CHECK:STDOUT: %x.param_patt.loc4_24.1: @A.loc4.%pattern_type (%pattern_type.662) = value_param_pattern [symbolic = %x.param_patt.loc4_24.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_24.1: @A.loc4.%pattern_type (%pattern_type.662) = at_binding_pattern x, %x.param_patt.loc4_24.1 [symbolic = %x.patt.loc4_24.2 (constants.%x.patt.fcf7db.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_13: type = splice_block %Z.ref [concrete = constants.%Z.type] { +// CHECK:STDOUT: %.loc4_12: type = splice_block %Z.ref [concrete = constants.%Z.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Lib.ref: = name_ref Lib, imports.%Lib [concrete = imports.%Lib] // CHECK:STDOUT: %Z.ref: type = name_ref Z, imports.%Lib.Z [concrete = constants.%Z.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_7.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @A.loc4.%struct_type.a.loc4_33.1 (%struct_type.a) = value_param call_param0 -// CHECK:STDOUT: %.loc4_33: type = splice_block %struct_type.a.loc4_33.2 [symbolic = %struct_type.a.loc4_33.1 (constants.%struct_type.a)] { +// CHECK:STDOUT: %x.param: @A.loc4.%struct_type.a.loc4_32.1 (%struct_type.a) = value_param call_param0 +// CHECK:STDOUT: %.loc4_32: type = splice_block %struct_type.a.loc4_32.2 [symbolic = %struct_type.a.loc4_32.1 (constants.%struct_type.a)] { // CHECK:STDOUT: %T.ref: %Z.type = name_ref T, %T.loc4_7.2 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc4_32.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc4_32.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc4_32: type = converted %T.ref, %T.as_type.loc4_32.2 [symbolic = %T.as_type.loc4_32.1 (constants.%T.as_type)] -// CHECK:STDOUT: %struct_type.a.loc4_33.2: type = struct_type {.a: @A.loc4.%T.as_type.loc4_32.1 (%T.as_type)} [symbolic = %struct_type.a.loc4_33.1 (constants.%struct_type.a)] +// CHECK:STDOUT: %T.as_type.loc4_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc4_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc4_31: type = converted %T.ref, %T.as_type.loc4_31.2 [symbolic = %T.as_type.loc4_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %struct_type.a.loc4_32.2: type = struct_type {.a: @A.loc4.%T.as_type.loc4_31.1 (%T.as_type)} [symbolic = %struct_type.a.loc4_32.1 (constants.%struct_type.a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @A.loc4.%struct_type.a.loc4_33.1 (%struct_type.a) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @A.loc4.%struct_type.a.loc4_32.1 (%struct_type.a) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: } @@ -223,16 +223,16 @@ fn B() { // CHECK:STDOUT: generic fn @A.loc4(%T.loc4_7.2: %Z.type) { // CHECK:STDOUT: %T.patt.loc4_7.2: %pattern_type.1d1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_7.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc4_32.1: type = facet_access_type %T.loc4_7.1 [symbolic = %T.as_type.loc4_32.1 (constants.%T.as_type)] -// CHECK:STDOUT: %struct_type.a.loc4_33.1: type = struct_type {.a: @A.loc4.%T.as_type.loc4_32.1 (%T.as_type)} [symbolic = %struct_type.a.loc4_33.1 (constants.%struct_type.a)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a.loc4_33.1 [symbolic = %pattern_type (constants.%pattern_type.662)] -// CHECK:STDOUT: %x.param_patt.loc4_25.2: @A.loc4.%pattern_type (%pattern_type.662) = value_param_pattern [symbolic = %x.param_patt.loc4_25.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_25.2: @A.loc4.%pattern_type (%pattern_type.662) = at_binding_pattern x, %x.param_patt.loc4_25.2 [symbolic = %x.patt.loc4_25.2 (constants.%x.patt.fcf7db.1)] +// CHECK:STDOUT: %T.as_type.loc4_31.1: type = facet_access_type %T.loc4_7.1 [symbolic = %T.as_type.loc4_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %struct_type.a.loc4_32.1: type = struct_type {.a: @A.loc4.%T.as_type.loc4_31.1 (%T.as_type)} [symbolic = %struct_type.a.loc4_32.1 (constants.%struct_type.a)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.a.loc4_32.1 [symbolic = %pattern_type (constants.%pattern_type.662)] +// CHECK:STDOUT: %x.param_patt.loc4_24.2: @A.loc4.%pattern_type (%pattern_type.662) = value_param_pattern [symbolic = %x.param_patt.loc4_24.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_24.2: @A.loc4.%pattern_type (%pattern_type.662) = at_binding_pattern x, %x.param_patt.loc4_24.2 [symbolic = %x.patt.loc4_24.2 (constants.%x.patt.fcf7db.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.a.loc4_33.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.a.loc4_32.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @A.loc4.%struct_type.a.loc4_33.1 (%struct_type.a)) { +// CHECK:STDOUT: fn(%x.param: @A.loc4.%struct_type.a.loc4_32.1 (%struct_type.a)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -276,11 +276,11 @@ fn B() { // CHECK:STDOUT: specific @A.loc4(constants.%T) { // CHECK:STDOUT: %T.patt.loc4_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_7.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc4_32.1 => constants.%T.as_type -// CHECK:STDOUT: %struct_type.a.loc4_33.1 => constants.%struct_type.a +// CHECK:STDOUT: %T.as_type.loc4_31.1 => constants.%T.as_type +// CHECK:STDOUT: %struct_type.a.loc4_32.1 => constants.%struct_type.a // CHECK:STDOUT: %pattern_type => constants.%pattern_type.662 -// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.fcf7db.1 +// CHECK:STDOUT: %x.param_patt.loc4_24.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc4_24.2 => constants.%x.patt.fcf7db.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.1(constants.%T) { diff --git a/toolchain/check/testdata/function/generic/fail_type_param_mismatch.carbon b/toolchain/check/testdata/function/generic/fail_type_param_mismatch.carbon index 82306bffddc6..60c7774f9dee 100644 --- a/toolchain/check/testdata/function/generic/fail_type_param_mismatch.carbon +++ b/toolchain/check/testdata/function/generic/fail_type_param_mismatch.carbon @@ -10,7 +10,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/generic/fail_type_param_mismatch.carbon -fn F(T:! type, U:! type) { +fn F(generic T: type, generic U: type) { var p: T*; // CHECK:STDERR: fail_type_param_mismatch.carbon:[[@LINE+7]]:21: error: cannot implicitly convert expression of type `T` to `U` [ConversionFailure] // CHECK:STDERR: let unused n: U = *p; diff --git a/toolchain/check/testdata/function/generic/forward_decl.carbon b/toolchain/check/testdata/function/generic/forward_decl.carbon index 044996526ea4..fb72a35e7fd3 100644 --- a/toolchain/check/testdata/function/generic/forward_decl.carbon +++ b/toolchain/check/testdata/function/generic/forward_decl.carbon @@ -12,7 +12,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/generic/forward_decl.carbon -fn F(T:! type); +fn F(generic T: type); // CHECK:STDOUT: --- forward_decl.carbon // CHECK:STDOUT: @@ -31,25 +31,25 @@ fn F(T:! type); // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc15_7.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc15_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_10.1: type = splice_block %.loc15_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_17.1: type = splice_block %.loc15_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc15_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc15_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc15_7.2: type) { -// CHECK:STDOUT: %T.patt.loc15_7.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc15_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_7.1 (constants.%T)] +// CHECK:STDOUT: generic fn @F(%T.loc15_15.2: type) { +// CHECK:STDOUT: %T.patt.loc15_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc15_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_15.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc15_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc15_7.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc15_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc15_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/import_specific.carbon b/toolchain/check/testdata/function/generic/import_specific.carbon index d356820621ed..eae99a18871f 100644 --- a/toolchain/check/testdata/function/generic/import_specific.carbon +++ b/toolchain/check/testdata/function/generic/import_specific.carbon @@ -16,10 +16,10 @@ library "[[@TEST_NAME]]"; -fn F(unused T:! type) { +fn F(unused generic T: type) { } -fn G(T:! type) { +fn G(generic T: type) { F(T); } @@ -62,28 +62,28 @@ fn H() { // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt.d47011.1)] +// CHECK:STDOUT: %T.patt.loc4_22.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_22.2 (constants.%T.patt.d47011.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_24.1: type = splice_block %.loc4_24.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_24.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T.67db0b.1)] +// CHECK:STDOUT: %T.loc4_22.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_22.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc7_7.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt.d47011.2)] +// CHECK:STDOUT: %T.patt.loc7_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt.d47011.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_10.1: type = splice_block %.loc7_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc7_17.1: type = splice_block %.loc7_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc7_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T.67db0b.2)] +// CHECK:STDOUT: %T.loc7_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_15.1 (constants.%T.67db0b.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc4_14.2: type) { -// CHECK:STDOUT: %T.patt.loc4_14.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt.d47011.1)] -// CHECK:STDOUT: %T.loc4_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T.67db0b.1)] +// CHECK:STDOUT: generic fn @F(%T.loc4_22.2: type) { +// CHECK:STDOUT: %T.patt.loc4_22.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_22.2 (constants.%T.patt.d47011.1)] +// CHECK:STDOUT: %T.loc4_22.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_22.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -95,17 +95,17 @@ fn H() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc7_7.2: type) { -// CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt.d47011.2)] -// CHECK:STDOUT: %T.loc7_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T.67db0b.2)] +// CHECK:STDOUT: generic fn @G(%T.loc7_15.2: type) { +// CHECK:STDOUT: %T.patt.loc7_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt.d47011.2)] +// CHECK:STDOUT: %T.loc7_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_15.1 (constants.%T.67db0b.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %F.specific_fn.loc8_3.2: = specific_function constants.%F, @F(%T.loc7_7.1) [symbolic = %F.specific_fn.loc8_3.2 (constants.%F.specific_fn)] +// CHECK:STDOUT: %F.specific_fn.loc8_3.2: = specific_function constants.%F, @F(%T.loc7_15.1) [symbolic = %F.specific_fn.loc8_3.2 (constants.%F.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T.67db0b.2)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_15.2 [symbolic = %T.loc7_15.1 (constants.%T.67db0b.2)] // CHECK:STDOUT: %F.specific_fn.loc8_3.1: = specific_function %F.ref, @F(constants.%T.67db0b.2) [symbolic = %F.specific_fn.loc8_3.2 (constants.%F.specific_fn)] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn.loc8_3.1() // CHECK:STDOUT: return @@ -115,18 +115,18 @@ fn H() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.67db0b.1) { -// CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt.d47011.1 -// CHECK:STDOUT: %T.loc4_14.1 => constants.%T.67db0b.1 +// CHECK:STDOUT: %T.patt.loc4_22.2 => constants.%T.patt.d47011.1 +// CHECK:STDOUT: %T.loc4_22.1 => constants.%T.67db0b.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T.67db0b.2) { -// CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt.d47011.2 -// CHECK:STDOUT: %T.loc7_7.1 => constants.%T.67db0b.2 +// CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt.d47011.2 +// CHECK:STDOUT: %T.loc7_15.1 => constants.%T.67db0b.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.67db0b.2) { -// CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt.d47011.1 -// CHECK:STDOUT: %T.loc4_14.1 => constants.%T.67db0b.2 +// CHECK:STDOUT: %T.patt.loc4_22.2 => constants.%T.patt.d47011.1 +// CHECK:STDOUT: %T.loc4_22.1 => constants.%T.67db0b.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -156,8 +156,8 @@ fn H() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.F: %F.type = import_ref Main//library, F, loaded [concrete = constants.%F] // CHECK:STDOUT: %Main.G: %G.type = import_ref Main//library, G, loaded [concrete = constants.%G] -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//library, loc4_14, loaded [symbolic = @F.%T (constants.%T.67db0b.1)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//library, loc7_7, loaded [symbolic = @G.%T (constants.%T.67db0b.2)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//library, loc4_22, loaded [symbolic = @F.%T (constants.%T.67db0b.1)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//library, loc7_15, loaded [symbolic = @G.%T (constants.%T.67db0b.2)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/function/generic/indirect_generic_type.carbon b/toolchain/check/testdata/function/generic/indirect_generic_type.carbon index 98c5b11e62bf..9858c13339e0 100644 --- a/toolchain/check/testdata/function/generic/indirect_generic_type.carbon +++ b/toolchain/check/testdata/function/generic/indirect_generic_type.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; -fn F(T:! type, p: T**) -> T* { +fn F(generic T: type, p: T**) -> T* { //@dump-sem-ir-begin return *p; //@dump-sem-ir-end @@ -46,24 +46,24 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: %specific_impl_fn.a76: = specific_impl_function %impl.elem0.484, @Copy.WithSelf.Op(%Copy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc4_7.2: type) { +// CHECK:STDOUT: generic fn @F(%T.loc4_15.2: type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %.loc6_10.5: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc4_7.1) [symbolic = %.loc6_10.5 (constants.%.0e9)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc4_20.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] -// CHECK:STDOUT: %Copy.facet.loc6_10.3: %Copy.type = facet_value %ptr.loc4_20.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc6_10.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %.loc6_10.5: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc4_15.1) [symbolic = %.loc6_10.5 (constants.%.0e9)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc4_27.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] +// CHECK:STDOUT: %Copy.facet.loc6_10.3: %Copy.type = facet_value %ptr.loc4_27.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc6_10.3 (constants.%Copy.facet)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc6_10.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.884)] // CHECK:STDOUT: %.loc6_10.6: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc6_10.3 [symbolic = %.loc6_10.6 (constants.%.be5)] // CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.6 (%.be5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.484)] // CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%Copy.facet.loc6_10.3) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.a76)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc4_21.1 (%ptr.125)) -> out %return.param: @F.%ptr.loc4_20.1 (%ptr.e8f) { +// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc4_28.1 (%ptr.125)) -> out %return.param: @F.%ptr.loc4_27.1 (%ptr.e8f) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: @F.%ptr.loc4_21.1 (%ptr.125) = name_ref p, %p -// CHECK:STDOUT: %.loc6_10.1: ref @F.%ptr.loc4_20.1 (%ptr.e8f) = deref %p.ref -// CHECK:STDOUT: %.loc6_10.2: @F.%ptr.loc4_20.1 (%ptr.e8f) = acquire_value %.loc6_10.1 +// CHECK:STDOUT: %p.ref: @F.%ptr.loc4_28.1 (%ptr.125) = name_ref p, %p +// CHECK:STDOUT: %.loc6_10.1: ref @F.%ptr.loc4_27.1 (%ptr.e8f) = deref %p.ref +// CHECK:STDOUT: %.loc6_10.2: @F.%ptr.loc4_27.1 (%ptr.e8f) = acquire_value %.loc6_10.1 // CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.6 (%.be5) = impl_witness_access constants.%Copy.lookup_impl_witness.1da, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.484)] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %.loc6_10.2, %impl.elem0.loc6_10.1 // CHECK:STDOUT: %Copy.facet.loc6_10.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc6_10.3 (constants.%Copy.facet)] @@ -72,7 +72,7 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: %.loc6_10.4: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc6_10.2 [symbolic = %Copy.facet.loc6_10.3 (constants.%Copy.facet)] // CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.a76)] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %.loc6_10.2, %specific_impl_fn.loc6_10.1 -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc4_20.1 (%ptr.e8f) = call %bound_method.loc6_10.2(%.loc6_10.2) +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc4_27.1 (%ptr.e8f) = call %bound_method.loc6_10.2(%.loc6_10.2) // CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -80,16 +80,16 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc4_7.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc4_7.1 => constants.%T.67d -// CHECK:STDOUT: %ptr.loc4_20.1 => constants.%ptr.e8f -// CHECK:STDOUT: %ptr.loc4_21.1 => constants.%ptr.125 -// CHECK:STDOUT: %pattern_type.loc4_17 => constants.%pattern_type.8bb -// CHECK:STDOUT: %p.param_patt.loc4_17.2 => constants.%p.param_patt -// CHECK:STDOUT: %p.patt.loc4_17.2 => constants.%p.patt -// CHECK:STDOUT: %.loc4_28.1 => constants.%.cb6 -// CHECK:STDOUT: %pattern_type.loc4_28 => constants.%pattern_type.4f4 -// CHECK:STDOUT: %return.param_patt.loc4_28.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc4_24.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc4_15.1 => constants.%T.67d +// CHECK:STDOUT: %ptr.loc4_27.1 => constants.%ptr.e8f +// CHECK:STDOUT: %ptr.loc4_28.1 => constants.%ptr.125 +// CHECK:STDOUT: %pattern_type.loc4_24 => constants.%pattern_type.8bb +// CHECK:STDOUT: %p.param_patt.loc4_24.2 => constants.%p.param_patt +// CHECK:STDOUT: %p.patt.loc4_24.2 => constants.%p.patt +// CHECK:STDOUT: %.loc4_35.1 => constants.%.cb6 +// CHECK:STDOUT: %pattern_type.loc4_35 => constants.%pattern_type.4f4 +// CHECK:STDOUT: %return.param_patt.loc4_35.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc4_31.2 => constants.%return.patt.d67 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/param_in_type.carbon b/toolchain/check/testdata/function/generic/param_in_type.carbon index 9db97fc1e7b2..dd3bab8b6f9b 100644 --- a/toolchain/check/testdata/function/generic/param_in_type.carbon +++ b/toolchain/check/testdata/function/generic/param_in_type.carbon @@ -12,7 +12,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/generic/param_in_type.carbon -fn F(N:! i32, a: array(i32, N)*); +fn F(generic N: i32, a: array(i32, N)*); // CHECK:STDOUT: --- param_in_type.carbon // CHECK:STDOUT: @@ -71,58 +71,58 @@ fn F(N:! i32, a: array(i32, N)*); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %N.patt.loc15_7.1: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc15_7.2 (constants.%N.patt.38a)] -// CHECK:STDOUT: %a.param_patt.loc15_16.1: @F.%pattern_type (%pattern_type.5a4) = value_param_pattern [symbolic = %a.param_patt.loc15_16.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc15_16.1: @F.%pattern_type (%pattern_type.5a4) = at_binding_pattern a, %a.param_patt.loc15_16.1 [symbolic = %a.patt.loc15_16.2 (constants.%a.patt)] +// CHECK:STDOUT: %N.patt.loc15_15.1: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc15_15.2 (constants.%N.patt.38a)] +// CHECK:STDOUT: %a.param_patt.loc15_23.1: @F.%pattern_type (%pattern_type.5a4) = value_param_pattern [symbolic = %a.param_patt.loc15_23.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc15_23.1: @F.%pattern_type (%pattern_type.5a4) = at_binding_pattern a, %a.param_patt.loc15_23.1 [symbolic = %a.patt.loc15_23.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_10: type = splice_block %i32.loc15_10 [concrete = constants.%i32] { +// CHECK:STDOUT: %.loc15_17: type = splice_block %i32.loc15_17 [concrete = constants.%i32] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %i32.loc15_10: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %i32.loc15_17: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc15_7.2: %i32 = symbolic_binding N, 0 [symbolic = %N.loc15_7.1 (constants.%N.37f)] -// CHECK:STDOUT: %a.param: @F.%ptr.loc15_31.1 (%ptr) = value_param call_param0 -// CHECK:STDOUT: %.loc15_31: type = splice_block %ptr.loc15_31.2 [symbolic = %ptr.loc15_31.1 (constants.%ptr)] { -// CHECK:STDOUT: %i32.loc15_24: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc15_7.2 [symbolic = %N.loc15_7.1 (constants.%N.37f)] +// CHECK:STDOUT: %N.loc15_15.2: %i32 = symbolic_binding N, 0 [symbolic = %N.loc15_15.1 (constants.%N.37f)] +// CHECK:STDOUT: %a.param: @F.%ptr.loc15_38.1 (%ptr) = value_param call_param0 +// CHECK:STDOUT: %.loc15_38: type = splice_block %ptr.loc15_38.2 [symbolic = %ptr.loc15_38.1 (constants.%ptr)] { +// CHECK:STDOUT: %i32.loc15_31: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc15_15.2 [symbolic = %N.loc15_15.1 (constants.%N.37f)] // CHECK:STDOUT: %impl.elem0: %.b08 = impl_witness_access constants.%ImplicitAs.impl_witness.416, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.69e] -// CHECK:STDOUT: %bound_method.loc15_29.2: = bound_method %N.ref, %impl.elem0 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] +// CHECK:STDOUT: %bound_method.loc15_36.2: = bound_method %N.ref, %impl.elem0 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_29.3: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc15_29.1 (constants.%bound_method)] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc15_29.2: init Core.IntLiteral = call %bound_method.loc15_29.3(%N.ref) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc15_29.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %.loc15_29.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc15_29.2 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc15_29.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %.loc15_29.2: Core.IntLiteral = converted %N.ref, %.loc15_29.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc15_29.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc15_30.2: type = array_type %.loc15_29.2, %i32.loc15_24 [symbolic = %array_type.loc15_30.1 (constants.%array_type)] -// CHECK:STDOUT: %ptr.loc15_31.2: type = ptr_type %array_type.loc15_30.2 [symbolic = %ptr.loc15_31.1 (constants.%ptr)] +// CHECK:STDOUT: %bound_method.loc15_36.3: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc15_36.1 (constants.%bound_method)] +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc15_36.2: init Core.IntLiteral = call %bound_method.loc15_36.3(%N.ref) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %.loc15_36.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc15_36.2 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %.loc15_36.2: Core.IntLiteral = converted %N.ref, %.loc15_36.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %array_type.loc15_37.2: type = array_type %.loc15_36.2, %i32.loc15_31 [symbolic = %array_type.loc15_37.1 (constants.%array_type)] +// CHECK:STDOUT: %ptr.loc15_38.2: type = ptr_type %array_type.loc15_37.2 [symbolic = %ptr.loc15_38.1 (constants.%ptr)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%ptr.loc15_31.1 (%ptr) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%ptr.loc15_38.1 (%ptr) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%N.loc15_7.2: %i32) { -// CHECK:STDOUT: %N.patt.loc15_7.2: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc15_7.2 (constants.%N.patt.38a)] -// CHECK:STDOUT: %N.loc15_7.1: %i32 = symbolic_binding N, 0 [symbolic = %N.loc15_7.1 (constants.%N.37f)] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc15_7.1, constants.%Int.as.ImplicitAs.impl.Convert.69e [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] -// CHECK:STDOUT: %bound_method.loc15_29.1: = bound_method %N.loc15_7.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc15_29.1 (constants.%bound_method)] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc15_29.1: init Core.IntLiteral = call %bound_method.loc15_29.1(%N.loc15_7.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc15_29.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %array_type.loc15_30.1: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc15_29.1, constants.%i32 [symbolic = %array_type.loc15_30.1 (constants.%array_type)] -// CHECK:STDOUT: %ptr.loc15_31.1: type = ptr_type %array_type.loc15_30.1 [symbolic = %ptr.loc15_31.1 (constants.%ptr)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc15_31.1 [symbolic = %pattern_type (constants.%pattern_type.5a4)] -// CHECK:STDOUT: %a.param_patt.loc15_16.2: @F.%pattern_type (%pattern_type.5a4) = value_param_pattern [symbolic = %a.param_patt.loc15_16.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc15_16.2: @F.%pattern_type (%pattern_type.5a4) = at_binding_pattern a, %a.param_patt.loc15_16.2 [symbolic = %a.patt.loc15_16.2 (constants.%a.patt)] +// CHECK:STDOUT: generic fn @F(%N.loc15_15.2: %i32) { +// CHECK:STDOUT: %N.patt.loc15_15.2: %pattern_type.6b6 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc15_15.2 (constants.%N.patt.38a)] +// CHECK:STDOUT: %N.loc15_15.1: %i32 = symbolic_binding N, 0 [symbolic = %N.loc15_15.1 (constants.%N.37f)] +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.loc15_15.1, constants.%Int.as.ImplicitAs.impl.Convert.69e [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] +// CHECK:STDOUT: %bound_method.loc15_36.1: = bound_method %N.loc15_15.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc15_36.1 (constants.%bound_method)] +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1: init Core.IntLiteral = call %bound_method.loc15_36.1(%N.loc15_15.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1 (constants.%Int.as.ImplicitAs.impl.Convert.call)] +// CHECK:STDOUT: %array_type.loc15_37.1: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1, constants.%i32 [symbolic = %array_type.loc15_37.1 (constants.%array_type)] +// CHECK:STDOUT: %ptr.loc15_38.1: type = ptr_type %array_type.loc15_37.1 [symbolic = %ptr.loc15_38.1 (constants.%ptr)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc15_38.1 [symbolic = %pattern_type (constants.%pattern_type.5a4)] +// CHECK:STDOUT: %a.param_patt.loc15_23.2: @F.%pattern_type (%pattern_type.5a4) = value_param_pattern [symbolic = %a.param_patt.loc15_23.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc15_23.2: @F.%pattern_type (%pattern_type.5a4) = at_binding_pattern a, %a.param_patt.loc15_23.2 [symbolic = %a.patt.loc15_23.2 (constants.%a.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%ptr.loc15_31.1 (%ptr)); +// CHECK:STDOUT: fn(%a.param: @F.%ptr.loc15_38.1 (%ptr)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%N.37f) { -// CHECK:STDOUT: %N.patt.loc15_7.2 => constants.%N.patt.38a -// CHECK:STDOUT: %N.loc15_7.1 => constants.%N.37f +// CHECK:STDOUT: %N.patt.loc15_15.2 => constants.%N.patt.38a +// CHECK:STDOUT: %N.loc15_15.1 => constants.%N.37f // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound => constants.%Int.as.ImplicitAs.impl.Convert.bound -// CHECK:STDOUT: %bound_method.loc15_29.1 => constants.%bound_method -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc15_29.1 => constants.%Int.as.ImplicitAs.impl.Convert.call -// CHECK:STDOUT: %array_type.loc15_30.1 => constants.%array_type -// CHECK:STDOUT: %ptr.loc15_31.1 => constants.%ptr +// CHECK:STDOUT: %bound_method.loc15_36.1 => constants.%bound_method +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc15_36.1 => constants.%Int.as.ImplicitAs.impl.Convert.call +// CHECK:STDOUT: %array_type.loc15_37.1 => constants.%array_type +// CHECK:STDOUT: %ptr.loc15_38.1 => constants.%ptr // CHECK:STDOUT: %pattern_type => constants.%pattern_type.5a4 -// CHECK:STDOUT: %a.param_patt.loc15_16.2 => constants.%a.param_patt -// CHECK:STDOUT: %a.patt.loc15_16.2 => constants.%a.patt +// CHECK:STDOUT: %a.param_patt.loc15_23.2 => constants.%a.param_patt +// CHECK:STDOUT: %a.patt.loc15_23.2 => constants.%a.patt // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/redeclare.carbon b/toolchain/check/testdata/function/generic/redeclare.carbon index ccc1a283fba0..e87f086fa22d 100644 --- a/toolchain/check/testdata/function/generic/redeclare.carbon +++ b/toolchain/check/testdata/function/generic/redeclare.carbon @@ -16,9 +16,9 @@ library "[[@TEST_NAME]]"; -fn F(T:! type) -> T*; +fn F(generic T: type) -> T*; -fn F(T:! type) -> T* { +fn F(generic T: type) -> T* { return F(T); } @@ -26,22 +26,22 @@ fn F(T:! type) -> T* { library "[[@TEST_NAME]]"; -fn F(T:! type, U:! type) -> T*; +fn F(generic T: type, generic U: type) -> T*; // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE+7]]:1: error: function redeclaration differs because return type is `U*` [FunctionRedeclReturnTypeDiffers] -// CHECK:STDERR: fn F(T:! type, U:! type) -> U* { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn F(generic T: type, generic U: type) -> U* { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-5]]:1: note: previously declared with return type `T*` [FunctionRedeclReturnTypePrevious] -// CHECK:STDERR: fn F(T:! type, U:! type) -> T*; -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn F(generic T: type, generic U: type) -> T*; +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(T:! type, U:! type) -> U* { +fn F(generic T: type, generic U: type) -> U* { // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return F(T); // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-13]]:1: note: calling function declared here [InCallToEntity] - // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F(generic T: type, generic U: type) -> T*; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: return F(T); } @@ -50,22 +50,22 @@ fn F(T:! type, U:! type) -> U* { library "[[@TEST_NAME]]"; -fn F(T:! type, U:! type) -> T*; +fn F(generic T: type, generic U: type) -> T*; -// CHECK:STDERR: fail_reorder.carbon:[[@LINE+7]]:13: error: redeclaration differs at parameter 1 [RedeclParamDiffers] -// CHECK:STDERR: fn F(unused U:! type, T:! type) -> T* { -// CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_reorder.carbon:[[@LINE-5]]:6: note: previous declaration's corresponding parameter here [RedeclParamPrevious] -// CHECK:STDERR: fn F(T:! type, U:! type) -> T*; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_reorder.carbon:[[@LINE+7]]:21: error: redeclaration differs at parameter 1 [RedeclParamDiffers] +// CHECK:STDERR: fn F(unused generic U: type, generic T: type) -> T* { +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: fail_reorder.carbon:[[@LINE-5]]:14: note: previous declaration's corresponding parameter here [RedeclParamPrevious] +// CHECK:STDERR: fn F(generic T: type, generic U: type) -> T*; +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -fn F(unused U:! type, T:! type) -> T* { +fn F(unused generic U: type, generic T: type) -> T* { // CHECK:STDERR: fail_reorder.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return F(T); // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_reorder.carbon:[[@LINE-13]]:1: note: calling function declared here [InCallToEntity] - // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F(generic T: type, generic U: type) -> T*; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: return F(T); } @@ -74,22 +74,22 @@ fn F(unused U:! type, T:! type) -> T* { library "[[@TEST_NAME]]"; -fn F(T:! type, U:! type) -> T*; +fn F(generic T: type, generic U: type) -> T*; -// CHECK:STDERR: fail_rename.carbon:[[@LINE+7]]:6: error: redeclaration differs at parameter 1 [RedeclParamDiffers] -// CHECK:STDERR: fn F(U:! type, T:! type) -> U* { -// CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_rename.carbon:[[@LINE-5]]:6: note: previous declaration's corresponding parameter here [RedeclParamPrevious] -// CHECK:STDERR: fn F(T:! type, U:! type) -> T*; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_rename.carbon:[[@LINE+7]]:14: error: redeclaration differs at parameter 1 [RedeclParamDiffers] +// CHECK:STDERR: fn F(generic U: type, generic T: type) -> U* { +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: fail_rename.carbon:[[@LINE-5]]:14: note: previous declaration's corresponding parameter here [RedeclParamPrevious] +// CHECK:STDERR: fn F(generic T: type, generic U: type) -> T*; +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -fn F(U:! type, T:! type) -> U* { +fn F(generic U: type, generic T: type) -> U* { // CHECK:STDERR: fail_rename.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return F(T); // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_rename.carbon:[[@LINE-13]]:1: note: calling function declared here [InCallToEntity] - // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F(generic T: type, generic U: type) -> T*; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: return F(T); } @@ -131,54 +131,54 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: %return.param_patt.loc6: @F.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4 (constants.%return.param_patt)] // CHECK:STDOUT: %return.patt.loc6: @F.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc6, %ptr.loc6 [symbolic = %return.patt.loc4 (constants.%return.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %T.loc4_7.2 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc4_20.2: type = ptr_type %T.ref.loc4 [symbolic = %ptr.loc4_20.1 (constants.%ptr)] -// CHECK:STDOUT: %.loc4_20.2: Core.Form = init_form %ptr.loc4_20.2 [symbolic = %.loc4_20.1 (constants.%.cb6)] -// CHECK:STDOUT: %.loc4_10.1: type = splice_block %.loc4_10.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc4_27.2: type = ptr_type %T.ref.loc4 [symbolic = %ptr.loc4_27.1 (constants.%ptr)] +// CHECK:STDOUT: %.loc4_27.2: Core.Form = init_form %ptr.loc4_27.2 [symbolic = %.loc4_27.1 (constants.%.cb6)] +// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc4: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %return.param.loc4: ref @F.%ptr.loc4_20.1 (%ptr) = out_param call_param0 -// CHECK:STDOUT: %return.loc4: ref @F.%ptr.loc4_20.1 (%ptr) = return_slot %return.param.loc4 +// CHECK:STDOUT: %T.loc4_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] +// CHECK:STDOUT: %return.param.loc4: ref @F.%ptr.loc4_27.1 (%ptr) = out_param call_param0 +// CHECK:STDOUT: %return.loc4: ref @F.%ptr.loc4_27.1 (%ptr) = return_slot %return.param.loc4 // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl.loc6: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4 (constants.%T.patt)] // CHECK:STDOUT: %return.param_patt.loc6: @F.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4 (constants.%return.param_patt)] // CHECK:STDOUT: %return.patt.loc6: @F.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc6, %ptr.loc6 [symbolic = %return.patt.loc4 (constants.%return.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, %T.loc6 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6: type = ptr_type %T.ref.loc6 [symbolic = %ptr.loc4_20.1 (constants.%ptr)] -// CHECK:STDOUT: %.loc6_20: Core.Form = init_form %ptr.loc6 [symbolic = %.loc4_20.1 (constants.%.cb6)] -// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, %T.loc6 [symbolic = %T.loc4_15.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc6: type = ptr_type %T.ref.loc6 [symbolic = %ptr.loc4_27.1 (constants.%ptr)] +// CHECK:STDOUT: %.loc6_27: Core.Form = init_form %ptr.loc6 [symbolic = %.loc4_27.1 (constants.%.cb6)] +// CHECK:STDOUT: %.loc6_17.1: type = splice_block %.loc6_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc6: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc6: type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %return.param.loc6: ref @F.%ptr.loc4_20.1 (%ptr) = out_param call_param0 -// CHECK:STDOUT: %return.loc6: ref @F.%ptr.loc4_20.1 (%ptr) = return_slot %return.param.loc6 +// CHECK:STDOUT: %T.loc6: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] +// CHECK:STDOUT: %return.param.loc6: ref @F.%ptr.loc4_27.1 (%ptr) = out_param call_param0 +// CHECK:STDOUT: %return.loc6: ref @F.%ptr.loc4_27.1 (%ptr) = return_slot %return.param.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc4_7.2: type) { +// CHECK:STDOUT: generic fn @F(%T.loc4_15.2: type) { // CHECK:STDOUT: %T.patt.loc4: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc4_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc4_20.1: type = ptr_type %T.loc4_7.1 [symbolic = %ptr.loc4_20.1 (constants.%ptr)] -// CHECK:STDOUT: %.loc4_20.1: Core.Form = init_form %ptr.loc4_20.1 [symbolic = %.loc4_20.1 (constants.%.cb6)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_20.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %T.loc4_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc4_27.1: type = ptr_type %T.loc4_15.1 [symbolic = %ptr.loc4_27.1 (constants.%ptr)] +// CHECK:STDOUT: %.loc4_27.1: Core.Form = init_form %ptr.loc4_27.1 [symbolic = %.loc4_27.1 (constants.%.cb6)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_27.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)] // CHECK:STDOUT: %return.param_patt.loc4: @F.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc4: @F.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4, %ptr.loc4_20.1 [symbolic = %return.patt.loc4 (constants.%return.patt)] +// CHECK:STDOUT: %return.patt.loc4: @F.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4, %ptr.loc4_27.1 [symbolic = %return.patt.loc4 (constants.%return.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc4_20.1 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %F.specific_fn.loc7_10.2: = specific_function constants.%F, @F(%T.loc4_7.1) [symbolic = %F.specific_fn.loc7_10.2 (constants.%F.specific_fn)] +// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc4_27.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %F.specific_fn.loc7_10.2: = specific_function constants.%F, @F(%T.loc4_15.1) [symbolic = %F.specific_fn.loc7_10.2 (constants.%F.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param.loc6: @F.%ptr.loc4_20.1 (%ptr) { +// CHECK:STDOUT: fn() -> out %return.param.loc6: @F.%ptr.loc4_27.1 (%ptr) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl.loc4 [concrete = constants.%F] -// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6 [symbolic = %T.loc4_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: %F.specific_fn.loc7_10.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc7_10.2 (constants.%F.specific_fn)] -// CHECK:STDOUT: %F.call: init @F.%ptr.loc4_20.1 (%ptr) = call %F.specific_fn.loc7_10.1() +// CHECK:STDOUT: %F.call: init @F.%ptr.loc4_27.1 (%ptr) = call %F.specific_fn.loc7_10.1() // CHECK:STDOUT: return %F.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -187,9 +187,9 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc4 => constants.%T.patt -// CHECK:STDOUT: %T.loc4_7.1 => constants.%T -// CHECK:STDOUT: %ptr.loc4_20.1 => constants.%ptr -// CHECK:STDOUT: %.loc4_20.1 => constants.%.cb6 +// CHECK:STDOUT: %T.loc4_15.1 => constants.%T +// CHECK:STDOUT: %ptr.loc4_27.1 => constants.%ptr +// CHECK:STDOUT: %.loc4_27.1 => constants.%.cb6 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 // CHECK:STDOUT: %return.param_patt.loc4 => constants.%return.param_patt // CHECK:STDOUT: %return.patt.loc4 => constants.%return.patt @@ -240,83 +240,83 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl.loc4: %F.type.eb3ec9.1 = fn_decl @F.loc4 [concrete = constants.%F.7088cc.1] { -// CHECK:STDOUT: %T.patt.loc4_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc4_17.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_17.2 (constants.%U.patt)] -// CHECK:STDOUT: %return.param_patt.loc4_30.1: @F.loc4.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_30.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc4_26.1: @F.loc4.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_30.1, %ptr.loc4_30.2 [symbolic = %return.patt.loc4_26.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: %T.patt.loc4_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %U.patt.loc4_32.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_32.2 (constants.%U.patt)] +// CHECK:STDOUT: %return.param_patt.loc4_44.1: @F.loc4.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_44.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc4_40.1: @F.loc4.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_44.1, %ptr.loc4_44.2 [symbolic = %return.patt.loc4_40.2 (constants.%return.patt.d67)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_7.2 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc4_30.2: type = ptr_type %T.ref [symbolic = %ptr.loc4_30.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.loc4_30.2: Core.Form = init_form %ptr.loc4_30.2 [symbolic = %.loc4_30.1 (constants.%.cb6)] -// CHECK:STDOUT: %.loc4_10.1: type = splice_block %.loc4_10.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc4_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc4_44.2: type = ptr_type %T.ref [symbolic = %ptr.loc4_44.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.loc4_44.2: Core.Form = init_form %ptr.loc4_44.2 [symbolic = %.loc4_44.1 (constants.%.cb6)] +// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc4_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc4_17: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %T.loc4_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] +// CHECK:STDOUT: %.loc4_34.1: type = splice_block %.loc4_34.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc4_32: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_34.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc4_17.2: type = symbolic_binding U, 1 [symbolic = %U.loc4_17.1 (constants.%U)] -// CHECK:STDOUT: %return.param: ref @F.loc4.%ptr.loc4_30.1 (%ptr.e8f) = out_param call_param0 -// CHECK:STDOUT: %return: ref @F.loc4.%ptr.loc4_30.1 (%ptr.e8f) = return_slot %return.param +// CHECK:STDOUT: %U.loc4_32.2: type = symbolic_binding U, 1 [symbolic = %U.loc4_32.1 (constants.%U)] +// CHECK:STDOUT: %return.param: ref @F.loc4.%ptr.loc4_44.1 (%ptr.e8f) = out_param call_param0 +// CHECK:STDOUT: %return: ref @F.loc4.%ptr.loc4_44.1 (%ptr.e8f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl.loc13: %F.type.eb3ec9.2 = fn_decl @F.loc13 [concrete = constants.%F.7088cc.2] { -// CHECK:STDOUT: %T.patt.loc13_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc13_17.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_17.2 (constants.%U.patt)] -// CHECK:STDOUT: %return.param_patt.loc13_30.1: @F.loc13.%pattern_type (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc13_30.2 (constants.%return.param_patt.534)] -// CHECK:STDOUT: %return.patt.loc13_26.1: @F.loc13.%pattern_type (%pattern_type.423) = return_slot_pattern %return.param_patt.loc13_30.1, %ptr.loc13_30.2 [symbolic = %return.patt.loc13_26.2 (constants.%return.patt.669)] +// CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %U.patt.loc13_32.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_32.2 (constants.%U.patt)] +// CHECK:STDOUT: %return.param_patt.loc13_44.1: @F.loc13.%pattern_type (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc13_44.2 (constants.%return.param_patt.534)] +// CHECK:STDOUT: %return.patt.loc13_40.1: @F.loc13.%pattern_type (%pattern_type.423) = return_slot_pattern %return.param_patt.loc13_44.1, %ptr.loc13_44.2 [symbolic = %return.patt.loc13_40.2 (constants.%return.patt.669)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc13_17.2 [symbolic = %U.loc13_17.1 (constants.%U)] -// CHECK:STDOUT: %ptr.loc13_30.2: type = ptr_type %U.ref [symbolic = %ptr.loc13_30.1 (constants.%ptr.18e)] -// CHECK:STDOUT: %.loc13_30.2: Core.Form = init_form %ptr.loc13_30.2 [symbolic = %.loc13_30.1 (constants.%.6d8)] -// CHECK:STDOUT: %.loc13_10.1: type = splice_block %.loc13_10.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc13_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc13_32.2 [symbolic = %U.loc13_32.1 (constants.%U)] +// CHECK:STDOUT: %ptr.loc13_44.2: type = ptr_type %U.ref [symbolic = %ptr.loc13_44.1 (constants.%ptr.18e)] +// CHECK:STDOUT: %.loc13_44.2: Core.Form = init_form %ptr.loc13_44.2 [symbolic = %.loc13_44.1 (constants.%.6d8)] +// CHECK:STDOUT: %.loc13_17.1: type = splice_block %.loc13_17.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc13_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc13_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc13_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc13_20.1: type = splice_block %.loc13_20.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc13_17: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %T.loc13_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)] +// CHECK:STDOUT: %.loc13_34.1: type = splice_block %.loc13_34.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc13_32: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc13_34.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc13_17.2: type = symbolic_binding U, 1 [symbolic = %U.loc13_17.1 (constants.%U)] -// CHECK:STDOUT: %return.param: ref @F.loc13.%ptr.loc13_30.1 (%ptr.18e) = out_param call_param0 -// CHECK:STDOUT: %return: ref @F.loc13.%ptr.loc13_30.1 (%ptr.18e) = return_slot %return.param +// CHECK:STDOUT: %U.loc13_32.2: type = symbolic_binding U, 1 [symbolic = %U.loc13_32.1 (constants.%U)] +// CHECK:STDOUT: %return.param: ref @F.loc13.%ptr.loc13_44.1 (%ptr.18e) = out_param call_param0 +// CHECK:STDOUT: %return: ref @F.loc13.%ptr.loc13_44.1 (%ptr.18e) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.loc4(%T.loc4_7.2: type, %U.loc4_17.2: type) { -// CHECK:STDOUT: %T.patt.loc4_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc4_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc4_17.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_17.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc4_17.1: type = symbolic_binding U, 1 [symbolic = %U.loc4_17.1 (constants.%U)] -// CHECK:STDOUT: %ptr.loc4_30.1: type = ptr_type %T.loc4_7.1 [symbolic = %ptr.loc4_30.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.loc4_30.1: Core.Form = init_form %ptr.loc4_30.1 [symbolic = %.loc4_30.1 (constants.%.cb6)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_30.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)] -// CHECK:STDOUT: %return.param_patt.loc4_30.2: @F.loc4.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_30.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc4_26.2: @F.loc4.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_30.2, %ptr.loc4_30.1 [symbolic = %return.patt.loc4_26.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: generic fn @F.loc4(%T.loc4_15.2: type, %U.loc4_32.2: type) { +// CHECK:STDOUT: %T.patt.loc4_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc4_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] +// CHECK:STDOUT: %U.patt.loc4_32.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_32.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc4_32.1: type = symbolic_binding U, 1 [symbolic = %U.loc4_32.1 (constants.%U)] +// CHECK:STDOUT: %ptr.loc4_44.1: type = ptr_type %T.loc4_15.1 [symbolic = %ptr.loc4_44.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.loc4_44.1: Core.Form = init_form %ptr.loc4_44.1 [symbolic = %.loc4_44.1 (constants.%.cb6)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_44.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %return.param_patt.loc4_44.2: @F.loc4.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_44.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc4_40.2: @F.loc4.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_44.2, %ptr.loc4_44.1 [symbolic = %return.patt.loc4_40.2 (constants.%return.patt.d67)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @F.loc4.%ptr.loc4_30.1 (%ptr.e8f); +// CHECK:STDOUT: fn() -> out %return.param: @F.loc4.%ptr.loc4_44.1 (%ptr.e8f); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.loc13(%T.loc13_7.2: type, %U.loc13_17.2: type) { -// CHECK:STDOUT: %T.patt.loc13_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc13_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc13_17.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_17.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc13_17.1: type = symbolic_binding U, 1 [symbolic = %U.loc13_17.1 (constants.%U)] -// CHECK:STDOUT: %ptr.loc13_30.1: type = ptr_type %U.loc13_17.1 [symbolic = %ptr.loc13_30.1 (constants.%ptr.18e)] -// CHECK:STDOUT: %.loc13_30.1: Core.Form = init_form %ptr.loc13_30.1 [symbolic = %.loc13_30.1 (constants.%.6d8)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc13_30.1 [symbolic = %pattern_type (constants.%pattern_type.423)] -// CHECK:STDOUT: %return.param_patt.loc13_30.2: @F.loc13.%pattern_type (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc13_30.2 (constants.%return.param_patt.534)] -// CHECK:STDOUT: %return.patt.loc13_26.2: @F.loc13.%pattern_type (%pattern_type.423) = return_slot_pattern %return.param_patt.loc13_30.2, %ptr.loc13_30.1 [symbolic = %return.patt.loc13_26.2 (constants.%return.patt.669)] +// CHECK:STDOUT: generic fn @F.loc13(%T.loc13_15.2: type, %U.loc13_32.2: type) { +// CHECK:STDOUT: %T.patt.loc13_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc13_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)] +// CHECK:STDOUT: %U.patt.loc13_32.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_32.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc13_32.1: type = symbolic_binding U, 1 [symbolic = %U.loc13_32.1 (constants.%U)] +// CHECK:STDOUT: %ptr.loc13_44.1: type = ptr_type %U.loc13_32.1 [symbolic = %ptr.loc13_44.1 (constants.%ptr.18e)] +// CHECK:STDOUT: %.loc13_44.1: Core.Form = init_form %ptr.loc13_44.1 [symbolic = %.loc13_44.1 (constants.%.6d8)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc13_44.1 [symbolic = %pattern_type (constants.%pattern_type.423)] +// CHECK:STDOUT: %return.param_patt.loc13_44.2: @F.loc13.%pattern_type (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc13_44.2 (constants.%return.param_patt.534)] +// CHECK:STDOUT: %return.patt.loc13_40.2: @F.loc13.%pattern_type (%pattern_type.423) = return_slot_pattern %return.param_patt.loc13_44.2, %ptr.loc13_44.1 [symbolic = %return.patt.loc13_40.2 (constants.%return.patt.669)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc13_30.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc13_44.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @F.loc13.%ptr.loc13_30.1 (%ptr.18e) { +// CHECK:STDOUT: fn() -> out %return.param: @F.loc13.%ptr.loc13_44.1 (%ptr.18e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type.eb3ec9.1 = name_ref F, file.%F.decl.loc4 [concrete = constants.%F.7088cc.1] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T)] // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -324,27 +324,27 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.loc4(constants.%T, constants.%U) { -// CHECK:STDOUT: %T.patt.loc4_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc4_7.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc4_17.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc4_17.1 => constants.%U -// CHECK:STDOUT: %ptr.loc4_30.1 => constants.%ptr.e8f -// CHECK:STDOUT: %.loc4_30.1 => constants.%.cb6 +// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc4_15.1 => constants.%T +// CHECK:STDOUT: %U.patt.loc4_32.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc4_32.1 => constants.%U +// CHECK:STDOUT: %ptr.loc4_44.1 => constants.%ptr.e8f +// CHECK:STDOUT: %.loc4_44.1 => constants.%.cb6 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 -// CHECK:STDOUT: %return.param_patt.loc4_30.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc4_26.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %return.param_patt.loc4_44.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc4_40.2 => constants.%return.patt.d67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.loc13(constants.%T, constants.%U) { -// CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc13_7.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc13_17.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc13_17.1 => constants.%U -// CHECK:STDOUT: %ptr.loc13_30.1 => constants.%ptr.18e -// CHECK:STDOUT: %.loc13_30.1 => constants.%.6d8 +// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc13_15.1 => constants.%T +// CHECK:STDOUT: %U.patt.loc13_32.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc13_32.1 => constants.%U +// CHECK:STDOUT: %ptr.loc13_44.1 => constants.%ptr.18e +// CHECK:STDOUT: %.loc13_44.1 => constants.%.6d8 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.423 -// CHECK:STDOUT: %return.param_patt.loc13_30.2 => constants.%return.param_patt.534 -// CHECK:STDOUT: %return.patt.loc13_26.2 => constants.%return.patt.669 +// CHECK:STDOUT: %return.param_patt.loc13_44.2 => constants.%return.param_patt.534 +// CHECK:STDOUT: %return.patt.loc13_40.2 => constants.%return.patt.669 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_reorder.carbon @@ -392,83 +392,83 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl.loc4: %F.type.eb3ec9.1 = fn_decl @F.loc4 [concrete = constants.%F.7088cc.1] { -// CHECK:STDOUT: %T.patt.loc4_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_7.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %U.patt.loc4_17.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_17.2 (constants.%U.patt.014)] -// CHECK:STDOUT: %return.param_patt.loc4_30.1: @F.loc4.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_30.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc4_26.1: @F.loc4.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_30.1, %ptr.loc4_30.2 [symbolic = %return.patt.loc4_26.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: %T.patt.loc4_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %U.patt.loc4_32.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_32.2 (constants.%U.patt.014)] +// CHECK:STDOUT: %return.param_patt.loc4_44.1: @F.loc4.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_44.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc4_40.1: @F.loc4.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_44.1, %ptr.loc4_44.2 [symbolic = %return.patt.loc4_40.2 (constants.%return.patt.d67)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_7.2 [symbolic = %T.loc4_7.1 (constants.%T.67d)] -// CHECK:STDOUT: %ptr.loc4_30.2: type = ptr_type %T.ref [symbolic = %ptr.loc4_30.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.loc4_30.2: Core.Form = init_form %ptr.loc4_30.2 [symbolic = %.loc4_30.1 (constants.%.cb6)] -// CHECK:STDOUT: %.loc4_10.1: type = splice_block %.loc4_10.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc4_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.67d)] +// CHECK:STDOUT: %ptr.loc4_44.2: type = ptr_type %T.ref [symbolic = %ptr.loc4_44.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.loc4_44.2: Core.Form = init_form %ptr.loc4_44.2 [symbolic = %.loc4_44.1 (constants.%.cb6)] +// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc4_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T.67d)] -// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc4_17: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %T.loc4_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T.67d)] +// CHECK:STDOUT: %.loc4_34.1: type = splice_block %.loc4_34.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc4_32: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_34.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc4_17.2: type = symbolic_binding U, 1 [symbolic = %U.loc4_17.1 (constants.%U.091)] -// CHECK:STDOUT: %return.param: ref @F.loc4.%ptr.loc4_30.1 (%ptr.e8f) = out_param call_param0 -// CHECK:STDOUT: %return: ref @F.loc4.%ptr.loc4_30.1 (%ptr.e8f) = return_slot %return.param +// CHECK:STDOUT: %U.loc4_32.2: type = symbolic_binding U, 1 [symbolic = %U.loc4_32.1 (constants.%U.091)] +// CHECK:STDOUT: %return.param: ref @F.loc4.%ptr.loc4_44.1 (%ptr.e8f) = out_param call_param0 +// CHECK:STDOUT: %return: ref @F.loc4.%ptr.loc4_44.1 (%ptr.e8f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl.loc13: %F.type.eb3ec9.2 = fn_decl @F.loc13 [concrete = constants.%F.7088cc.2] { -// CHECK:STDOUT: %U.patt.loc13_14.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_14.2 (constants.%U.patt.d47)] -// CHECK:STDOUT: %T.patt.loc13_24.1: %pattern_type.98f = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_24.2 (constants.%T.patt.014)] -// CHECK:STDOUT: %return.param_patt.loc13_37.1: @F.loc13.%pattern_type (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc13_37.2 (constants.%return.param_patt.534)] -// CHECK:STDOUT: %return.patt.loc13_33.1: @F.loc13.%pattern_type (%pattern_type.423) = return_slot_pattern %return.param_patt.loc13_37.1, %ptr.loc13_37.2 [symbolic = %return.patt.loc13_33.2 (constants.%return.patt.669)] +// CHECK:STDOUT: %U.patt.loc13_22.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_22.2 (constants.%U.patt.d47)] +// CHECK:STDOUT: %T.patt.loc13_39.1: %pattern_type.98f = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_39.2 (constants.%T.patt.014)] +// CHECK:STDOUT: %return.param_patt.loc13_51.1: @F.loc13.%pattern_type (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc13_51.2 (constants.%return.param_patt.534)] +// CHECK:STDOUT: %return.patt.loc13_47.1: @F.loc13.%pattern_type (%pattern_type.423) = return_slot_pattern %return.param_patt.loc13_51.1, %ptr.loc13_51.2 [symbolic = %return.patt.loc13_47.2 (constants.%return.patt.669)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T.loc13_24.2 [symbolic = %T.loc13_24.1 (constants.%T.091)] -// CHECK:STDOUT: %ptr.loc13_37.2: type = ptr_type %T.ref.loc13 [symbolic = %ptr.loc13_37.1 (constants.%ptr.18e)] -// CHECK:STDOUT: %.loc13_37.2: Core.Form = init_form %ptr.loc13_37.2 [symbolic = %.loc13_37.1 (constants.%.6d8)] -// CHECK:STDOUT: %.loc13_17.1: type = splice_block %.loc13_17.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc13_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T.loc13_39.2 [symbolic = %T.loc13_39.1 (constants.%T.091)] +// CHECK:STDOUT: %ptr.loc13_51.2: type = ptr_type %T.ref.loc13 [symbolic = %ptr.loc13_51.1 (constants.%ptr.18e)] +// CHECK:STDOUT: %.loc13_51.2: Core.Form = init_form %ptr.loc13_51.2 [symbolic = %.loc13_51.1 (constants.%.6d8)] +// CHECK:STDOUT: %.loc13_24.1: type = splice_block %.loc13_24.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc13_22: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc13_24.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc13_14.2: type = symbolic_binding U, 0 [symbolic = %U.loc13_14.1 (constants.%U.67d)] -// CHECK:STDOUT: %.loc13_27.1: type = splice_block %.loc13_27.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc13_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_27.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %U.loc13_22.2: type = symbolic_binding U, 0 [symbolic = %U.loc13_22.1 (constants.%U.67d)] +// CHECK:STDOUT: %.loc13_41.1: type = splice_block %.loc13_41.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc13_39: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc13_41.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc13_24.2: type = symbolic_binding T, 1 [symbolic = %T.loc13_24.1 (constants.%T.091)] -// CHECK:STDOUT: %return.param: ref @F.loc13.%ptr.loc13_37.1 (%ptr.18e) = out_param call_param0 -// CHECK:STDOUT: %return: ref @F.loc13.%ptr.loc13_37.1 (%ptr.18e) = return_slot %return.param +// CHECK:STDOUT: %T.loc13_39.2: type = symbolic_binding T, 1 [symbolic = %T.loc13_39.1 (constants.%T.091)] +// CHECK:STDOUT: %return.param: ref @F.loc13.%ptr.loc13_51.1 (%ptr.18e) = out_param call_param0 +// CHECK:STDOUT: %return: ref @F.loc13.%ptr.loc13_51.1 (%ptr.18e) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.loc4(%T.loc4_7.2: type, %U.loc4_17.2: type) { -// CHECK:STDOUT: %T.patt.loc4_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_7.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %T.loc4_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T.67d)] -// CHECK:STDOUT: %U.patt.loc4_17.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_17.2 (constants.%U.patt.014)] -// CHECK:STDOUT: %U.loc4_17.1: type = symbolic_binding U, 1 [symbolic = %U.loc4_17.1 (constants.%U.091)] -// CHECK:STDOUT: %ptr.loc4_30.1: type = ptr_type %T.loc4_7.1 [symbolic = %ptr.loc4_30.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.loc4_30.1: Core.Form = init_form %ptr.loc4_30.1 [symbolic = %.loc4_30.1 (constants.%.cb6)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_30.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)] -// CHECK:STDOUT: %return.param_patt.loc4_30.2: @F.loc4.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_30.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc4_26.2: @F.loc4.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_30.2, %ptr.loc4_30.1 [symbolic = %return.patt.loc4_26.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: generic fn @F.loc4(%T.loc4_15.2: type, %U.loc4_32.2: type) { +// CHECK:STDOUT: %T.patt.loc4_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %T.loc4_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T.67d)] +// CHECK:STDOUT: %U.patt.loc4_32.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_32.2 (constants.%U.patt.014)] +// CHECK:STDOUT: %U.loc4_32.1: type = symbolic_binding U, 1 [symbolic = %U.loc4_32.1 (constants.%U.091)] +// CHECK:STDOUT: %ptr.loc4_44.1: type = ptr_type %T.loc4_15.1 [symbolic = %ptr.loc4_44.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.loc4_44.1: Core.Form = init_form %ptr.loc4_44.1 [symbolic = %.loc4_44.1 (constants.%.cb6)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_44.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %return.param_patt.loc4_44.2: @F.loc4.%pattern_type (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc4_44.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc4_40.2: @F.loc4.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc4_44.2, %ptr.loc4_44.1 [symbolic = %return.patt.loc4_40.2 (constants.%return.patt.d67)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @F.loc4.%ptr.loc4_30.1 (%ptr.e8f); +// CHECK:STDOUT: fn() -> out %return.param: @F.loc4.%ptr.loc4_44.1 (%ptr.e8f); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.loc13(%U.loc13_14.2: type, %T.loc13_24.2: type) { -// CHECK:STDOUT: %U.patt.loc13_14.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_14.2 (constants.%U.patt.d47)] -// CHECK:STDOUT: %U.loc13_14.1: type = symbolic_binding U, 0 [symbolic = %U.loc13_14.1 (constants.%U.67d)] -// CHECK:STDOUT: %T.patt.loc13_24.2: %pattern_type.98f = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_24.2 (constants.%T.patt.014)] -// CHECK:STDOUT: %T.loc13_24.1: type = symbolic_binding T, 1 [symbolic = %T.loc13_24.1 (constants.%T.091)] -// CHECK:STDOUT: %ptr.loc13_37.1: type = ptr_type %T.loc13_24.1 [symbolic = %ptr.loc13_37.1 (constants.%ptr.18e)] -// CHECK:STDOUT: %.loc13_37.1: Core.Form = init_form %ptr.loc13_37.1 [symbolic = %.loc13_37.1 (constants.%.6d8)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc13_37.1 [symbolic = %pattern_type (constants.%pattern_type.423)] -// CHECK:STDOUT: %return.param_patt.loc13_37.2: @F.loc13.%pattern_type (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc13_37.2 (constants.%return.param_patt.534)] -// CHECK:STDOUT: %return.patt.loc13_33.2: @F.loc13.%pattern_type (%pattern_type.423) = return_slot_pattern %return.param_patt.loc13_37.2, %ptr.loc13_37.1 [symbolic = %return.patt.loc13_33.2 (constants.%return.patt.669)] +// CHECK:STDOUT: generic fn @F.loc13(%U.loc13_22.2: type, %T.loc13_39.2: type) { +// CHECK:STDOUT: %U.patt.loc13_22.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_22.2 (constants.%U.patt.d47)] +// CHECK:STDOUT: %U.loc13_22.1: type = symbolic_binding U, 0 [symbolic = %U.loc13_22.1 (constants.%U.67d)] +// CHECK:STDOUT: %T.patt.loc13_39.2: %pattern_type.98f = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_39.2 (constants.%T.patt.014)] +// CHECK:STDOUT: %T.loc13_39.1: type = symbolic_binding T, 1 [symbolic = %T.loc13_39.1 (constants.%T.091)] +// CHECK:STDOUT: %ptr.loc13_51.1: type = ptr_type %T.loc13_39.1 [symbolic = %ptr.loc13_51.1 (constants.%ptr.18e)] +// CHECK:STDOUT: %.loc13_51.1: Core.Form = init_form %ptr.loc13_51.1 [symbolic = %.loc13_51.1 (constants.%.6d8)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc13_51.1 [symbolic = %pattern_type (constants.%pattern_type.423)] +// CHECK:STDOUT: %return.param_patt.loc13_51.2: @F.loc13.%pattern_type (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc13_51.2 (constants.%return.param_patt.534)] +// CHECK:STDOUT: %return.patt.loc13_47.2: @F.loc13.%pattern_type (%pattern_type.423) = return_slot_pattern %return.param_patt.loc13_51.2, %ptr.loc13_51.1 [symbolic = %return.patt.loc13_47.2 (constants.%return.patt.669)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc13_37.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc13_51.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @F.loc13.%ptr.loc13_37.1 (%ptr.18e) { +// CHECK:STDOUT: fn() -> out %return.param: @F.loc13.%ptr.loc13_51.1 (%ptr.18e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type.eb3ec9.1 = name_ref F, file.%F.decl.loc4 [concrete = constants.%F.7088cc.1] -// CHECK:STDOUT: %T.ref.loc21: type = name_ref T, %T.loc13_24.2 [symbolic = %T.loc13_24.1 (constants.%T.091)] +// CHECK:STDOUT: %T.ref.loc21: type = name_ref T, %T.loc13_39.2 [symbolic = %T.loc13_39.1 (constants.%T.091)] // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -476,27 +476,27 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.loc4(constants.%T.67d, constants.%U.091) { -// CHECK:STDOUT: %T.patt.loc4_7.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc4_7.1 => constants.%T.67d -// CHECK:STDOUT: %U.patt.loc4_17.2 => constants.%U.patt.014 -// CHECK:STDOUT: %U.loc4_17.1 => constants.%U.091 -// CHECK:STDOUT: %ptr.loc4_30.1 => constants.%ptr.e8f -// CHECK:STDOUT: %.loc4_30.1 => constants.%.cb6 +// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc4_15.1 => constants.%T.67d +// CHECK:STDOUT: %U.patt.loc4_32.2 => constants.%U.patt.014 +// CHECK:STDOUT: %U.loc4_32.1 => constants.%U.091 +// CHECK:STDOUT: %ptr.loc4_44.1 => constants.%ptr.e8f +// CHECK:STDOUT: %.loc4_44.1 => constants.%.cb6 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 -// CHECK:STDOUT: %return.param_patt.loc4_30.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc4_26.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %return.param_patt.loc4_44.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc4_40.2 => constants.%return.patt.d67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.loc13(constants.%U.67d, constants.%T.091) { -// CHECK:STDOUT: %U.patt.loc13_14.2 => constants.%U.patt.d47 -// CHECK:STDOUT: %U.loc13_14.1 => constants.%U.67d -// CHECK:STDOUT: %T.patt.loc13_24.2 => constants.%T.patt.014 -// CHECK:STDOUT: %T.loc13_24.1 => constants.%T.091 -// CHECK:STDOUT: %ptr.loc13_37.1 => constants.%ptr.18e -// CHECK:STDOUT: %.loc13_37.1 => constants.%.6d8 +// CHECK:STDOUT: %U.patt.loc13_22.2 => constants.%U.patt.d47 +// CHECK:STDOUT: %U.loc13_22.1 => constants.%U.67d +// CHECK:STDOUT: %T.patt.loc13_39.2 => constants.%T.patt.014 +// CHECK:STDOUT: %T.loc13_39.1 => constants.%T.091 +// CHECK:STDOUT: %ptr.loc13_51.1 => constants.%ptr.18e +// CHECK:STDOUT: %.loc13_51.1 => constants.%.6d8 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.423 -// CHECK:STDOUT: %return.param_patt.loc13_37.2 => constants.%return.param_patt.534 -// CHECK:STDOUT: %return.patt.loc13_33.2 => constants.%return.patt.669 +// CHECK:STDOUT: %return.param_patt.loc13_51.2 => constants.%return.param_patt.534 +// CHECK:STDOUT: %return.patt.loc13_47.2 => constants.%return.patt.669 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_rename.carbon @@ -544,83 +544,83 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl.loc4: %F.type.eb3ec9.1 = fn_decl @F.loc4 [concrete = constants.%F.7088cc.1] { -// CHECK:STDOUT: %T.patt.loc4_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_7.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %U.patt.loc4_17.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_17.2 (constants.%U.patt.014)] -// CHECK:STDOUT: %return.param_patt.loc4_30.1: @F.loc4.%pattern_type (%pattern_type.4f4b84.1) = out_param_pattern [symbolic = %return.param_patt.loc4_30.2 (constants.%return.param_patt.27f587.1)] -// CHECK:STDOUT: %return.patt.loc4_26.1: @F.loc4.%pattern_type (%pattern_type.4f4b84.1) = return_slot_pattern %return.param_patt.loc4_30.1, %ptr.loc4_30.2 [symbolic = %return.patt.loc4_26.2 (constants.%return.patt.d67681.1)] +// CHECK:STDOUT: %T.patt.loc4_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %U.patt.loc4_32.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_32.2 (constants.%U.patt.014)] +// CHECK:STDOUT: %return.param_patt.loc4_44.1: @F.loc4.%pattern_type (%pattern_type.4f4b84.1) = out_param_pattern [symbolic = %return.param_patt.loc4_44.2 (constants.%return.param_patt.27f587.1)] +// CHECK:STDOUT: %return.patt.loc4_40.1: @F.loc4.%pattern_type (%pattern_type.4f4b84.1) = return_slot_pattern %return.param_patt.loc4_44.1, %ptr.loc4_44.2 [symbolic = %return.patt.loc4_40.2 (constants.%return.patt.d67681.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_7.2 [symbolic = %T.loc4_7.1 (constants.%T.67d)] -// CHECK:STDOUT: %ptr.loc4_30.2: type = ptr_type %T.ref [symbolic = %ptr.loc4_30.1 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %.loc4_30.2: Core.Form = init_form %ptr.loc4_30.2 [symbolic = %.loc4_30.1 (constants.%.cb6cb9.1)] -// CHECK:STDOUT: %.loc4_10.1: type = splice_block %.loc4_10.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc4_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.67d)] +// CHECK:STDOUT: %ptr.loc4_44.2: type = ptr_type %T.ref [symbolic = %ptr.loc4_44.1 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %.loc4_44.2: Core.Form = init_form %ptr.loc4_44.2 [symbolic = %.loc4_44.1 (constants.%.cb6cb9.1)] +// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc4_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T.67d)] -// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc4_17: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %T.loc4_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T.67d)] +// CHECK:STDOUT: %.loc4_34.1: type = splice_block %.loc4_34.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc4_32: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_34.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc4_17.2: type = symbolic_binding U, 1 [symbolic = %U.loc4_17.1 (constants.%U.091)] -// CHECK:STDOUT: %return.param: ref @F.loc4.%ptr.loc4_30.1 (%ptr.e8f8f9.1) = out_param call_param0 -// CHECK:STDOUT: %return: ref @F.loc4.%ptr.loc4_30.1 (%ptr.e8f8f9.1) = return_slot %return.param +// CHECK:STDOUT: %U.loc4_32.2: type = symbolic_binding U, 1 [symbolic = %U.loc4_32.1 (constants.%U.091)] +// CHECK:STDOUT: %return.param: ref @F.loc4.%ptr.loc4_44.1 (%ptr.e8f8f9.1) = out_param call_param0 +// CHECK:STDOUT: %return: ref @F.loc4.%ptr.loc4_44.1 (%ptr.e8f8f9.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl.loc13: %F.type.eb3ec9.2 = fn_decl @F.loc13 [concrete = constants.%F.7088cc.2] { -// CHECK:STDOUT: %U.patt.loc13_7.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_7.2 (constants.%U.patt.d47)] -// CHECK:STDOUT: %T.patt.loc13_17.1: %pattern_type.98f = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_17.2 (constants.%T.patt.014)] -// CHECK:STDOUT: %return.param_patt.loc13_30.1: @F.loc13.%pattern_type (%pattern_type.4f4b84.2) = out_param_pattern [symbolic = %return.param_patt.loc13_30.2 (constants.%return.param_patt.27f587.2)] -// CHECK:STDOUT: %return.patt.loc13_26.1: @F.loc13.%pattern_type (%pattern_type.4f4b84.2) = return_slot_pattern %return.param_patt.loc13_30.1, %ptr.loc13_30.2 [symbolic = %return.patt.loc13_26.2 (constants.%return.patt.d67681.2)] +// CHECK:STDOUT: %U.patt.loc13_15.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_15.2 (constants.%U.patt.d47)] +// CHECK:STDOUT: %T.patt.loc13_32.1: %pattern_type.98f = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_32.2 (constants.%T.patt.014)] +// CHECK:STDOUT: %return.param_patt.loc13_44.1: @F.loc13.%pattern_type (%pattern_type.4f4b84.2) = out_param_pattern [symbolic = %return.param_patt.loc13_44.2 (constants.%return.param_patt.27f587.2)] +// CHECK:STDOUT: %return.patt.loc13_40.1: @F.loc13.%pattern_type (%pattern_type.4f4b84.2) = return_slot_pattern %return.param_patt.loc13_44.1, %ptr.loc13_44.2 [symbolic = %return.patt.loc13_40.2 (constants.%return.patt.d67681.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc13_7.2 [symbolic = %U.loc13_7.1 (constants.%U.67d)] -// CHECK:STDOUT: %ptr.loc13_30.2: type = ptr_type %U.ref [symbolic = %ptr.loc13_30.1 (constants.%ptr.e8f8f9.2)] -// CHECK:STDOUT: %.loc13_30.2: Core.Form = init_form %ptr.loc13_30.2 [symbolic = %.loc13_30.1 (constants.%.cb6cb9.2)] -// CHECK:STDOUT: %.loc13_10.1: type = splice_block %.loc13_10.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc13_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc13_15.2 [symbolic = %U.loc13_15.1 (constants.%U.67d)] +// CHECK:STDOUT: %ptr.loc13_44.2: type = ptr_type %U.ref [symbolic = %ptr.loc13_44.1 (constants.%ptr.e8f8f9.2)] +// CHECK:STDOUT: %.loc13_44.2: Core.Form = init_form %ptr.loc13_44.2 [symbolic = %.loc13_44.1 (constants.%.cb6cb9.2)] +// CHECK:STDOUT: %.loc13_17.1: type = splice_block %.loc13_17.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc13_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc13_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc13_7.2: type = symbolic_binding U, 0 [symbolic = %U.loc13_7.1 (constants.%U.67d)] -// CHECK:STDOUT: %.loc13_20.1: type = splice_block %.loc13_20.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc13_17: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %U.loc13_15.2: type = symbolic_binding U, 0 [symbolic = %U.loc13_15.1 (constants.%U.67d)] +// CHECK:STDOUT: %.loc13_34.1: type = splice_block %.loc13_34.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc13_32: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc13_34.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc13_17.2: type = symbolic_binding T, 1 [symbolic = %T.loc13_17.1 (constants.%T.091)] -// CHECK:STDOUT: %return.param: ref @F.loc13.%ptr.loc13_30.1 (%ptr.e8f8f9.2) = out_param call_param0 -// CHECK:STDOUT: %return: ref @F.loc13.%ptr.loc13_30.1 (%ptr.e8f8f9.2) = return_slot %return.param +// CHECK:STDOUT: %T.loc13_32.2: type = symbolic_binding T, 1 [symbolic = %T.loc13_32.1 (constants.%T.091)] +// CHECK:STDOUT: %return.param: ref @F.loc13.%ptr.loc13_44.1 (%ptr.e8f8f9.2) = out_param call_param0 +// CHECK:STDOUT: %return: ref @F.loc13.%ptr.loc13_44.1 (%ptr.e8f8f9.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.loc4(%T.loc4_7.2: type, %U.loc4_17.2: type) { -// CHECK:STDOUT: %T.patt.loc4_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_7.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %T.loc4_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_7.1 (constants.%T.67d)] -// CHECK:STDOUT: %U.patt.loc4_17.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_17.2 (constants.%U.patt.014)] -// CHECK:STDOUT: %U.loc4_17.1: type = symbolic_binding U, 1 [symbolic = %U.loc4_17.1 (constants.%U.091)] -// CHECK:STDOUT: %ptr.loc4_30.1: type = ptr_type %T.loc4_7.1 [symbolic = %ptr.loc4_30.1 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %.loc4_30.1: Core.Form = init_form %ptr.loc4_30.1 [symbolic = %.loc4_30.1 (constants.%.cb6cb9.1)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_30.1 [symbolic = %pattern_type (constants.%pattern_type.4f4b84.1)] -// CHECK:STDOUT: %return.param_patt.loc4_30.2: @F.loc4.%pattern_type (%pattern_type.4f4b84.1) = out_param_pattern [symbolic = %return.param_patt.loc4_30.2 (constants.%return.param_patt.27f587.1)] -// CHECK:STDOUT: %return.patt.loc4_26.2: @F.loc4.%pattern_type (%pattern_type.4f4b84.1) = return_slot_pattern %return.param_patt.loc4_30.2, %ptr.loc4_30.1 [symbolic = %return.patt.loc4_26.2 (constants.%return.patt.d67681.1)] +// CHECK:STDOUT: generic fn @F.loc4(%T.loc4_15.2: type, %U.loc4_32.2: type) { +// CHECK:STDOUT: %T.patt.loc4_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %T.loc4_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T.67d)] +// CHECK:STDOUT: %U.patt.loc4_32.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc4_32.2 (constants.%U.patt.014)] +// CHECK:STDOUT: %U.loc4_32.1: type = symbolic_binding U, 1 [symbolic = %U.loc4_32.1 (constants.%U.091)] +// CHECK:STDOUT: %ptr.loc4_44.1: type = ptr_type %T.loc4_15.1 [symbolic = %ptr.loc4_44.1 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %.loc4_44.1: Core.Form = init_form %ptr.loc4_44.1 [symbolic = %.loc4_44.1 (constants.%.cb6cb9.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc4_44.1 [symbolic = %pattern_type (constants.%pattern_type.4f4b84.1)] +// CHECK:STDOUT: %return.param_patt.loc4_44.2: @F.loc4.%pattern_type (%pattern_type.4f4b84.1) = out_param_pattern [symbolic = %return.param_patt.loc4_44.2 (constants.%return.param_patt.27f587.1)] +// CHECK:STDOUT: %return.patt.loc4_40.2: @F.loc4.%pattern_type (%pattern_type.4f4b84.1) = return_slot_pattern %return.param_patt.loc4_44.2, %ptr.loc4_44.1 [symbolic = %return.patt.loc4_40.2 (constants.%return.patt.d67681.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @F.loc4.%ptr.loc4_30.1 (%ptr.e8f8f9.1); +// CHECK:STDOUT: fn() -> out %return.param: @F.loc4.%ptr.loc4_44.1 (%ptr.e8f8f9.1); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.loc13(%U.loc13_7.2: type, %T.loc13_17.2: type) { -// CHECK:STDOUT: %U.patt.loc13_7.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_7.2 (constants.%U.patt.d47)] -// CHECK:STDOUT: %U.loc13_7.1: type = symbolic_binding U, 0 [symbolic = %U.loc13_7.1 (constants.%U.67d)] -// CHECK:STDOUT: %T.patt.loc13_17.2: %pattern_type.98f = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_17.2 (constants.%T.patt.014)] -// CHECK:STDOUT: %T.loc13_17.1: type = symbolic_binding T, 1 [symbolic = %T.loc13_17.1 (constants.%T.091)] -// CHECK:STDOUT: %ptr.loc13_30.1: type = ptr_type %U.loc13_7.1 [symbolic = %ptr.loc13_30.1 (constants.%ptr.e8f8f9.2)] -// CHECK:STDOUT: %.loc13_30.1: Core.Form = init_form %ptr.loc13_30.1 [symbolic = %.loc13_30.1 (constants.%.cb6cb9.2)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc13_30.1 [symbolic = %pattern_type (constants.%pattern_type.4f4b84.2)] -// CHECK:STDOUT: %return.param_patt.loc13_30.2: @F.loc13.%pattern_type (%pattern_type.4f4b84.2) = out_param_pattern [symbolic = %return.param_patt.loc13_30.2 (constants.%return.param_patt.27f587.2)] -// CHECK:STDOUT: %return.patt.loc13_26.2: @F.loc13.%pattern_type (%pattern_type.4f4b84.2) = return_slot_pattern %return.param_patt.loc13_30.2, %ptr.loc13_30.1 [symbolic = %return.patt.loc13_26.2 (constants.%return.patt.d67681.2)] +// CHECK:STDOUT: generic fn @F.loc13(%U.loc13_15.2: type, %T.loc13_32.2: type) { +// CHECK:STDOUT: %U.patt.loc13_15.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc13_15.2 (constants.%U.patt.d47)] +// CHECK:STDOUT: %U.loc13_15.1: type = symbolic_binding U, 0 [symbolic = %U.loc13_15.1 (constants.%U.67d)] +// CHECK:STDOUT: %T.patt.loc13_32.2: %pattern_type.98f = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc13_32.2 (constants.%T.patt.014)] +// CHECK:STDOUT: %T.loc13_32.1: type = symbolic_binding T, 1 [symbolic = %T.loc13_32.1 (constants.%T.091)] +// CHECK:STDOUT: %ptr.loc13_44.1: type = ptr_type %U.loc13_15.1 [symbolic = %ptr.loc13_44.1 (constants.%ptr.e8f8f9.2)] +// CHECK:STDOUT: %.loc13_44.1: Core.Form = init_form %ptr.loc13_44.1 [symbolic = %.loc13_44.1 (constants.%.cb6cb9.2)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc13_44.1 [symbolic = %pattern_type (constants.%pattern_type.4f4b84.2)] +// CHECK:STDOUT: %return.param_patt.loc13_44.2: @F.loc13.%pattern_type (%pattern_type.4f4b84.2) = out_param_pattern [symbolic = %return.param_patt.loc13_44.2 (constants.%return.param_patt.27f587.2)] +// CHECK:STDOUT: %return.patt.loc13_40.2: @F.loc13.%pattern_type (%pattern_type.4f4b84.2) = return_slot_pattern %return.param_patt.loc13_44.2, %ptr.loc13_44.1 [symbolic = %return.patt.loc13_40.2 (constants.%return.patt.d67681.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc13_30.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc13_44.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @F.loc13.%ptr.loc13_30.1 (%ptr.e8f8f9.2) { +// CHECK:STDOUT: fn() -> out %return.param: @F.loc13.%ptr.loc13_44.1 (%ptr.e8f8f9.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type.eb3ec9.1 = name_ref F, file.%F.decl.loc4 [concrete = constants.%F.7088cc.1] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_17.2 [symbolic = %T.loc13_17.1 (constants.%T.091)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_32.2 [symbolic = %T.loc13_32.1 (constants.%T.091)] // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -628,26 +628,26 @@ fn F(U:! type, T:! type) -> U* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.loc4(constants.%T.67d, constants.%U.091) { -// CHECK:STDOUT: %T.patt.loc4_7.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc4_7.1 => constants.%T.67d -// CHECK:STDOUT: %U.patt.loc4_17.2 => constants.%U.patt.014 -// CHECK:STDOUT: %U.loc4_17.1 => constants.%U.091 -// CHECK:STDOUT: %ptr.loc4_30.1 => constants.%ptr.e8f8f9.1 -// CHECK:STDOUT: %.loc4_30.1 => constants.%.cb6cb9.1 +// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc4_15.1 => constants.%T.67d +// CHECK:STDOUT: %U.patt.loc4_32.2 => constants.%U.patt.014 +// CHECK:STDOUT: %U.loc4_32.1 => constants.%U.091 +// CHECK:STDOUT: %ptr.loc4_44.1 => constants.%ptr.e8f8f9.1 +// CHECK:STDOUT: %.loc4_44.1 => constants.%.cb6cb9.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4b84.1 -// CHECK:STDOUT: %return.param_patt.loc4_30.2 => constants.%return.param_patt.27f587.1 -// CHECK:STDOUT: %return.patt.loc4_26.2 => constants.%return.patt.d67681.1 +// CHECK:STDOUT: %return.param_patt.loc4_44.2 => constants.%return.param_patt.27f587.1 +// CHECK:STDOUT: %return.patt.loc4_40.2 => constants.%return.patt.d67681.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.loc13(constants.%U.67d, constants.%T.091) { -// CHECK:STDOUT: %U.patt.loc13_7.2 => constants.%U.patt.d47 -// CHECK:STDOUT: %U.loc13_7.1 => constants.%U.67d -// CHECK:STDOUT: %T.patt.loc13_17.2 => constants.%T.patt.014 -// CHECK:STDOUT: %T.loc13_17.1 => constants.%T.091 -// CHECK:STDOUT: %ptr.loc13_30.1 => constants.%ptr.e8f8f9.2 -// CHECK:STDOUT: %.loc13_30.1 => constants.%.cb6cb9.2 +// CHECK:STDOUT: %U.patt.loc13_15.2 => constants.%U.patt.d47 +// CHECK:STDOUT: %U.loc13_15.1 => constants.%U.67d +// CHECK:STDOUT: %T.patt.loc13_32.2 => constants.%T.patt.014 +// CHECK:STDOUT: %T.loc13_32.1 => constants.%T.091 +// CHECK:STDOUT: %ptr.loc13_44.1 => constants.%ptr.e8f8f9.2 +// CHECK:STDOUT: %.loc13_44.1 => constants.%.cb6cb9.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4b84.2 -// CHECK:STDOUT: %return.param_patt.loc13_30.2 => constants.%return.param_patt.27f587.2 -// CHECK:STDOUT: %return.patt.loc13_26.2 => constants.%return.patt.d67681.2 +// CHECK:STDOUT: %return.param_patt.loc13_44.2 => constants.%return.param_patt.27f587.2 +// CHECK:STDOUT: %return.patt.loc13_40.2 => constants.%return.patt.d67681.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/resolve_used.carbon b/toolchain/check/testdata/function/generic/resolve_used.carbon index 5f9acef0879f..1bad4e6a6e2b 100644 --- a/toolchain/check/testdata/function/generic/resolve_used.carbon +++ b/toolchain/check/testdata/function/generic/resolve_used.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -fn ErrorIfNIsZero(N:! Core.IntLiteral) { +fn ErrorIfNIsZero(generic N: Core.IntLiteral) { // Check that we resolve the definition of a used specific function by // ensuring we produce an error when doing so. Notionally this error is // produced as a result of instantiating the `Core.Int` template, although @@ -124,24 +124,24 @@ fn CallNegative() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ErrorIfNIsZero.decl: %ErrorIfNIsZero.type = fn_decl @ErrorIfNIsZero [concrete = constants.%ErrorIfNIsZero] { -// CHECK:STDOUT: %N.patt.loc4_20.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_20.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.patt.loc4_28.1: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_28.2 (constants.%N.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref.loc4: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc4_20.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_20.1 (constants.%N)] +// CHECK:STDOUT: %N.loc4_28.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_28.1 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallNegative.decl: %CallNegative.type = fn_decl @CallNegative [concrete = constants.%CallNegative] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ErrorIfNIsZero(%N.loc4_20.2: Core.IntLiteral) { -// CHECK:STDOUT: %N.patt.loc4_20.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_20.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.loc4_20.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_20.1 (constants.%N)] +// CHECK:STDOUT: generic fn @ErrorIfNIsZero(%N.loc4_28.2: Core.IntLiteral) { +// CHECK:STDOUT: %N.patt.loc4_28.2: %pattern_type.dc0 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_28.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.loc4_28.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_28.1 (constants.%N)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Int.loc9_27.2: type = class_type @Int, @Int(%N.loc4_20.1) [symbolic = %Int.loc9_27.2 (constants.%Int)] +// CHECK:STDOUT: %Int.loc9_27.2: type = class_type @Int, @Int(%N.loc4_28.1) [symbolic = %Int.loc9_27.2 (constants.%Int)] // CHECK:STDOUT: %require_complete: = require_complete_type %Int.loc9_27.2 [symbolic = %require_complete (constants.%require_complete.4df)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Int.loc9_27.2 [symbolic = %pattern_type (constants.%pattern_type.142)] // CHECK:STDOUT: %v.patt.loc9_15.2: @ErrorIfNIsZero.%pattern_type (%pattern_type.142) = ref_binding_pattern v [symbolic = %v.patt.loc9_15.2 (constants.%v.patt.834)] @@ -174,7 +174,7 @@ fn CallNegative() { // CHECK:STDOUT: %.loc9_27: type = splice_block %Int.loc9_27.1 [symbolic = %Int.loc9_27.2 (constants.%Int)] { // CHECK:STDOUT: %Core.ref.loc9: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic] -// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc4_20.2 [symbolic = %N.loc4_20.1 (constants.%N)] +// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc4_28.2 [symbolic = %N.loc4_28.1 (constants.%N)] // CHECK:STDOUT: %Int.loc9_27.1: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc9_27.2 (constants.%Int)] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%Int.loc9_27.2 (%Int) = wrapper_binding v, %v.var @@ -216,13 +216,13 @@ fn CallNegative() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ErrorIfNIsZero(constants.%N) { -// CHECK:STDOUT: %N.patt.loc4_20.2 => constants.%N.patt -// CHECK:STDOUT: %N.loc4_20.1 => constants.%N +// CHECK:STDOUT: %N.patt.loc4_28.2 => constants.%N.patt +// CHECK:STDOUT: %N.loc4_28.1 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ErrorIfNIsZero(constants.%int_0) { -// CHECK:STDOUT: %N.patt.loc4_20.2 => constants.%N.patt -// CHECK:STDOUT: %N.loc4_20.1 => constants.%int_0 +// CHECK:STDOUT: %N.patt.loc4_28.2 => constants.%N.patt +// CHECK:STDOUT: %N.loc4_28.1 => constants.%int_0 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Int.loc9_27.2 => constants.%i0 diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index 1000c0d01e71..30ed8636ec6a 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -12,7 +12,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/generic/return_slot.carbon -class Wrap(T:! type) { +class Wrap(T: type) { fn Make() -> T { return Make(); } } @@ -123,9 +123,9 @@ fn G() { // CHECK:STDOUT: %Wrap.decl: %Wrap.type = class_decl @Wrap [concrete = constants.%Wrap.generic] { // CHECK:STDOUT: %T.patt.loc15_13.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_13.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_16.1: type = splice_block %.loc15_16.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_15.1: type = splice_block %.loc15_15.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_16.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_15.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_13.1 (constants.%T)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/template_param.carbon b/toolchain/check/testdata/function/generic/template_param.carbon index 441b073a07bc..991e4d572ac7 100644 --- a/toolchain/check/testdata/function/generic/template_param.carbon +++ b/toolchain/check/testdata/function/generic/template_param.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -fn F(unused template T:! type) { +fn F(unused template T: type) { } fn G() { @@ -49,9 +49,9 @@ fn G() { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc4_23.1: %pattern_type = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_23.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_26.1: type = splice_block %.loc4_26.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_25.1: type = splice_block %.loc4_25.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_26.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_25.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_23.2: type = symbolic_binding T, 0, template [template = %T.loc4_23.1 (constants.%T)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/type_param.carbon b/toolchain/check/testdata/function/generic/type_param.carbon index 03820692e304..c91e9a729617 100644 --- a/toolchain/check/testdata/function/generic/type_param.carbon +++ b/toolchain/check/testdata/function/generic/type_param.carbon @@ -12,7 +12,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/generic/type_param.carbon -fn F(T:! type) { +fn F(generic T: type) { var p: T*; let unused n: T = *p; } @@ -72,22 +72,22 @@ fn F(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc15_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_7.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %T.patt.loc15_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_10.1: type = splice_block %.loc15_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_17.1: type = splice_block %.loc15_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc15_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_7.1 (constants.%T.67d)] +// CHECK:STDOUT: %T.loc15_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_15.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc15_7.2: type) { -// CHECK:STDOUT: %T.patt.loc15_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_7.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %T.loc15_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_7.1 (constants.%T.67d)] +// CHECK:STDOUT: generic fn @F(%T.loc15_15.2: type) { +// CHECK:STDOUT: %T.patt.loc15_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %T.loc15_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_15.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ptr.loc16_11.2: type = ptr_type %T.loc15_7.1 [symbolic = %ptr.loc16_11.2 (constants.%ptr)] +// CHECK:STDOUT: %ptr.loc16_11.2: type = ptr_type %T.loc15_15.1 [symbolic = %ptr.loc16_11.2 (constants.%ptr)] // CHECK:STDOUT: %require_complete.loc16: = require_complete_type %ptr.loc16_11.2 [symbolic = %require_complete.loc16 (constants.%require_complete.ef1)] // CHECK:STDOUT: %pattern_type.loc16: type = pattern_type %ptr.loc16_11.2 [symbolic = %pattern_type.loc16 (constants.%pattern_type.4f4)] // CHECK:STDOUT: %p.patt.loc16_8.2: @F.%pattern_type.loc16 (%pattern_type.4f4) = ref_binding_pattern p [symbolic = %p.patt.loc16_8.2 (constants.%p.patt)] @@ -99,8 +99,8 @@ fn F(T:! type) { // CHECK:STDOUT: %.loc16_12.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type, %DefaultOrUnformed.facet.loc16_12.2 [symbolic = %.loc16_12.4 (constants.%.2e6)] // CHECK:STDOUT: %impl.elem0.loc16_12.2: @F.%.loc16_12.4 (%.2e6) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_12.2 (constants.%impl.elem0.66d)] // CHECK:STDOUT: %specific_impl_fn.loc16_12.2: = specific_impl_function %impl.elem0.loc16_12.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc16_12.2) [symbolic = %specific_impl_fn.loc16_12.2 (constants.%specific_impl_fn.53b)] -// CHECK:STDOUT: %require_complete.loc17: = require_complete_type %T.loc15_7.1 [symbolic = %require_complete.loc17 (constants.%require_complete.944)] -// CHECK:STDOUT: %pattern_type.loc17: type = pattern_type %T.loc15_7.1 [symbolic = %pattern_type.loc17 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %require_complete.loc17: = require_complete_type %T.loc15_15.1 [symbolic = %require_complete.loc17 (constants.%require_complete.944)] +// CHECK:STDOUT: %pattern_type.loc17: type = pattern_type %T.loc15_15.1 [symbolic = %pattern_type.loc17 (constants.%pattern_type.51d)] // CHECK:STDOUT: %n.patt.loc17_15.2: @F.%pattern_type.loc17 (%pattern_type.51d) = value_binding_pattern n [symbolic = %n.patt.loc17_15.2 (constants.%n.patt)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet.loc16_3.3: %Destroy.type = facet_value %ptr.loc16_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc16_3.3 (constants.%Destroy.facet)] @@ -121,7 +121,7 @@ fn F(T:! type) { // CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call: init @F.%ptr.loc16_11.2 (%ptr) = call %specific_impl_fn.loc16_12.1() // CHECK:STDOUT: assign %p.var, %DefaultOrUnformed.WithSelf.Op.call // CHECK:STDOUT: %.loc16_11: type = splice_block %ptr.loc16_11.1 [symbolic = %ptr.loc16_11.2 (constants.%ptr)] { -// CHECK:STDOUT: %T.ref.loc16: type = name_ref T, %T.loc15_7.2 [symbolic = %T.loc15_7.1 (constants.%T.67d)] +// CHECK:STDOUT: %T.ref.loc16: type = name_ref T, %T.loc15_15.2 [symbolic = %T.loc15_15.1 (constants.%T.67d)] // CHECK:STDOUT: %ptr.loc16_11.1: type = ptr_type %T.ref.loc16 [symbolic = %ptr.loc16_11.2 (constants.%ptr)] // CHECK:STDOUT: } // CHECK:STDOUT: %p: ref @F.%ptr.loc16_11.2 (%ptr) = wrapper_binding p, %p.var @@ -131,10 +131,10 @@ fn F(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %p.ref: ref @F.%ptr.loc16_11.2 (%ptr) = name_ref p, %p // CHECK:STDOUT: %.loc17_22: @F.%ptr.loc16_11.2 (%ptr) = acquire_value %p.ref -// CHECK:STDOUT: %.loc17_21.1: ref @F.%T.loc15_7.1 (%T.67d) = deref %.loc17_22 -// CHECK:STDOUT: %.loc17_21.2: @F.%T.loc15_7.1 (%T.67d) = acquire_value %.loc17_21.1 -// CHECK:STDOUT: %T.ref.loc17: type = name_ref T, %T.loc15_7.2 [symbolic = %T.loc15_7.1 (constants.%T.67d)] -// CHECK:STDOUT: %n: @F.%T.loc15_7.1 (%T.67d) = wrapper_binding n, %.loc17_21.2 +// CHECK:STDOUT: %.loc17_21.1: ref @F.%T.loc15_15.1 (%T.67d) = deref %.loc17_22 +// CHECK:STDOUT: %.loc17_21.2: @F.%T.loc15_15.1 (%T.67d) = acquire_value %.loc17_21.1 +// CHECK:STDOUT: %T.ref.loc17: type = name_ref T, %T.loc15_15.2 [symbolic = %T.loc15_15.1 (constants.%T.67d)] +// CHECK:STDOUT: %n: @F.%T.loc15_15.1 (%T.67d) = wrapper_binding n, %.loc17_21.2 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %n.patt.loc17_15.1: @F.%pattern_type.loc17 (%pattern_type.51d) = value_binding_pattern n [symbolic = %n.patt.loc17_15.2 (constants.%n.patt)] // CHECK:STDOUT: } @@ -154,7 +154,7 @@ fn F(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc15_7.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc15_7.1 => constants.%T.67d +// CHECK:STDOUT: %T.patt.loc15_15.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc15_15.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/type_param_scope.carbon b/toolchain/check/testdata/function/generic/type_param_scope.carbon index 29c1e7a2f56b..983a003dbd7d 100644 --- a/toolchain/check/testdata/function/generic/type_param_scope.carbon +++ b/toolchain/check/testdata/function/generic/type_param_scope.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; -fn F(T:! type, n: T*) -> T* { +fn F(generic T: type, n: T*) -> T* { //@dump-sem-ir-begin let m: T* = n; return m; @@ -46,32 +46,32 @@ fn F(T:! type, n: T*) -> T* { // CHECK:STDOUT: %specific_impl_fn.a76: = specific_impl_function %impl.elem0.484, @Copy.WithSelf.Op(%Copy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc4_7.2: type) { +// CHECK:STDOUT: generic fn @F(%T.loc4_15.2: type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %m.patt.loc6_8.2: @F.%pattern_type (%pattern_type.4f4) = value_binding_pattern m [symbolic = %m.patt.loc6_8.2 (constants.%m.patt)] -// CHECK:STDOUT: %.loc7_10.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc4_7.1) [symbolic = %.loc7_10.3 (constants.%.0e9)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc4_20.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] -// CHECK:STDOUT: %Copy.facet.loc7_10.3: %Copy.type = facet_value %ptr.loc4_20.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc7_10.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %.loc7_10.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc4_15.1) [symbolic = %.loc7_10.3 (constants.%.0e9)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc4_27.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] +// CHECK:STDOUT: %Copy.facet.loc7_10.3: %Copy.type = facet_value %ptr.loc4_27.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc7_10.3 (constants.%Copy.facet)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc7_10.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.884)] // CHECK:STDOUT: %.loc7_10.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc7_10.3 [symbolic = %.loc7_10.4 (constants.%.be5)] // CHECK:STDOUT: %impl.elem0.loc7_10.2: @F.%.loc7_10.4 (%.be5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.484)] // CHECK:STDOUT: %specific_impl_fn.loc7_10.2: = specific_impl_function %impl.elem0.loc7_10.2, @Copy.WithSelf.Op(%Copy.facet.loc7_10.3) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.a76)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%n.param: @F.%ptr.loc4_20.1 (%ptr)) -> out %return.param: @F.%ptr.loc4_20.1 (%ptr) { +// CHECK:STDOUT: fn(%n.param: @F.%ptr.loc4_27.1 (%ptr)) -> out %return.param: @F.%ptr.loc4_27.1 (%ptr) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: @F.%ptr.loc4_20.1 (%ptr) = name_ref n, %n -// CHECK:STDOUT: %.loc6: type = splice_block %ptr.loc6 [symbolic = %ptr.loc4_20.1 (constants.%ptr)] { -// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, %T.loc4_7.2 [symbolic = %T.loc4_7.1 (constants.%T.67d)] -// CHECK:STDOUT: %ptr.loc6: type = ptr_type %T.ref.loc6 [symbolic = %ptr.loc4_20.1 (constants.%ptr)] +// CHECK:STDOUT: %n.ref: @F.%ptr.loc4_27.1 (%ptr) = name_ref n, %n +// CHECK:STDOUT: %.loc6: type = splice_block %ptr.loc6 [symbolic = %ptr.loc4_27.1 (constants.%ptr)] { +// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.67d)] +// CHECK:STDOUT: %ptr.loc6: type = ptr_type %T.ref.loc6 [symbolic = %ptr.loc4_27.1 (constants.%ptr)] // CHECK:STDOUT: } -// CHECK:STDOUT: %m: @F.%ptr.loc4_20.1 (%ptr) = wrapper_binding m, %n.ref +// CHECK:STDOUT: %m: @F.%ptr.loc4_27.1 (%ptr) = wrapper_binding m, %n.ref // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %m.patt.loc6_8.1: @F.%pattern_type (%pattern_type.4f4) = value_binding_pattern m [symbolic = %m.patt.loc6_8.2 (constants.%m.patt)] // CHECK:STDOUT: } -// CHECK:STDOUT: %m.ref: @F.%ptr.loc4_20.1 (%ptr) = name_ref m, %m +// CHECK:STDOUT: %m.ref: @F.%ptr.loc4_27.1 (%ptr) = name_ref m, %m // CHECK:STDOUT: %impl.elem0.loc7_10.1: @F.%.loc7_10.4 (%.be5) = impl_witness_access constants.%Copy.lookup_impl_witness.1da, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.484)] // CHECK:STDOUT: %bound_method.loc7_10.1: = bound_method %m.ref, %impl.elem0.loc7_10.1 // CHECK:STDOUT: %Copy.facet.loc7_10.1: %Copy.type = facet_value constants.%ptr, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc7_10.3 (constants.%Copy.facet)] @@ -80,7 +80,7 @@ fn F(T:! type, n: T*) -> T* { // CHECK:STDOUT: %.loc7_10.2: %Copy.type = converted constants.%ptr, %Copy.facet.loc7_10.2 [symbolic = %Copy.facet.loc7_10.3 (constants.%Copy.facet)] // CHECK:STDOUT: %specific_impl_fn.loc7_10.1: = specific_impl_function %impl.elem0.loc7_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.a76)] // CHECK:STDOUT: %bound_method.loc7_10.2: = bound_method %m.ref, %specific_impl_fn.loc7_10.1 -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc4_20.1 (%ptr) = call %bound_method.loc7_10.2(%m.ref) +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc4_27.1 (%ptr) = call %bound_method.loc7_10.2(%m.ref) // CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -88,14 +88,14 @@ fn F(T:! type, n: T*) -> T* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc4_7.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc4_7.1 => constants.%T.67d -// CHECK:STDOUT: %ptr.loc4_20.1 => constants.%ptr +// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc4_15.1 => constants.%T.67d +// CHECK:STDOUT: %ptr.loc4_27.1 => constants.%ptr // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 -// CHECK:STDOUT: %n.param_patt.loc4_17.2 => constants.%n.param_patt -// CHECK:STDOUT: %n.patt.loc4_17.2 => constants.%n.patt -// CHECK:STDOUT: %.loc4_27.1 => constants.%.cb6 -// CHECK:STDOUT: %return.param_patt.loc4_27.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc4_23.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %n.param_patt.loc4_24.2 => constants.%n.param_patt +// CHECK:STDOUT: %n.patt.loc4_24.2 => constants.%n.patt +// CHECK:STDOUT: %.loc4_34.1 => constants.%.cb6 +// CHECK:STDOUT: %return.param_patt.loc4_34.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc4_30.2 => constants.%return.patt.d67 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/undefined.carbon b/toolchain/check/testdata/function/generic/undefined.carbon index 1e9127aade1b..38212e6a5c80 100644 --- a/toolchain/check/testdata/function/generic/undefined.carbon +++ b/toolchain/check/testdata/function/generic/undefined.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; -fn Defined[T:! type](unused x: T) {} +fn Defined[T: type](unused x: T) {} fn CallDefined() { Defined(0 as i32); @@ -24,27 +24,27 @@ fn CallDefined() { library "[[@TEST_NAME]]"; -fn Defined[T:! type](x: T); +fn Defined[T: type](x: T); fn CallDefined() { Defined(0 as i32); } -fn Defined[T:! type](unused x: T) {} +fn Defined[T: type](unused x: T) {} // --- fail_call_undefined.carbon library "[[@TEST_NAME]]"; -fn Undefined[T:! type](x: T); +fn Undefined[T: type](x: T); fn CallUndefined() { // CHECK:STDERR: fail_call_undefined.carbon:[[@LINE+7]]:3: error: use of undefined generic function [MissingGenericFunctionDefinition] // CHECK:STDERR: Undefined(0 as i32); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: fail_call_undefined.carbon:[[@LINE-6]]:1: note: generic function declared here [MissingGenericFunctionDefinitionHere] - // CHECK:STDERR: fn Undefined[T:! type](x: T); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Undefined[T: type](x: T); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Undefined(0 as i32); } diff --git a/toolchain/check/testdata/generic/call_basic_depth.carbon b/toolchain/check/testdata/generic/call_basic_depth.carbon index e4fd352eb6fd..a88968257dfd 100644 --- a/toolchain/check/testdata/generic/call_basic_depth.carbon +++ b/toolchain/check/testdata/generic/call_basic_depth.carbon @@ -11,22 +11,22 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/generic/call_basic_depth.carbon class C { - fn Cfn[T:! type](unused self, unused x: T) { + fn Cfn[T: type](unused self, unused x: T) { } } //@dump-sem-ir-begin -fn F[T:! type](unused x: T) { +fn F[T: type](unused x: T) { } //@dump-sem-ir-end -fn H[T:! type](x: T) { +fn H[T: type](x: T) { //@dump-sem-ir-begin F(x); //@dump-sem-ir-end } -fn G[T:! type](x: T) { +fn G[T: type](x: T) { //@dump-sem-ir-begin H(x); F(x); @@ -87,12 +87,12 @@ fn M() { // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc19_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc19_24.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc19_24.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc19_24.1: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc19_24.1 [symbolic = %x.patt.loc19_24.2 (constants.%x.patt.800c32.2)] +// CHECK:STDOUT: %x.param_patt.loc19_23.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc19_23.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc19_23.1: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc19_23.1 [symbolic = %x.patt.loc19_23.2 (constants.%x.patt.800c32.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_10.1: type = splice_block %.loc19_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc19_9.1: type = splice_block %.loc19_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc19_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc19_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc19_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc19_7.1 (constants.%T)] // CHECK:STDOUT: %x.param: @F.%T.loc19_7.1 (%T) = value_param call_param0 @@ -105,8 +105,8 @@ fn M() { // CHECK:STDOUT: %T.patt.loc19_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc19_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc19_7.1 (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc19_7.1 [symbolic = %pattern_type (constants.%pattern_type.51d)] -// CHECK:STDOUT: %x.param_patt.loc19_24.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc19_24.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc19_24.2: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc19_24.2 [symbolic = %x.patt.loc19_24.2 (constants.%x.patt.800c32.2)] +// CHECK:STDOUT: %x.param_patt.loc19_23.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc19_23.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc19_23.2: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc19_23.2 [symbolic = %x.patt.loc19_23.2 (constants.%x.patt.800c32.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc19_7.1 [symbolic = %require_complete (constants.%require_complete)] @@ -185,8 +185,8 @@ fn M() { // CHECK:STDOUT: %T.patt.loc19_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc19_7.1 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %x.param_patt.loc19_24.2 => constants.%x.param_patt.91d -// CHECK:STDOUT: %x.patt.loc19_24.2 => constants.%x.patt.800c32.1 +// CHECK:STDOUT: %x.param_patt.loc19_23.2 => constants.%x.param_patt.91d +// CHECK:STDOUT: %x.patt.loc19_23.2 => constants.%x.patt.800c32.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete @@ -196,8 +196,8 @@ fn M() { // CHECK:STDOUT: %T.patt.loc23_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc23_7.1 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %x.param_patt.loc23_17.2 => constants.%x.param_patt.91d -// CHECK:STDOUT: %x.patt.loc23_17.2 => constants.%x.patt.800c32.3 +// CHECK:STDOUT: %x.param_patt.loc23_16.2 => constants.%x.param_patt.91d +// CHECK:STDOUT: %x.patt.loc23_16.2 => constants.%x.patt.800c32.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete @@ -208,16 +208,16 @@ fn M() { // CHECK:STDOUT: %T.patt.loc29_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc29_7.1 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %x.param_patt.loc29_17.2 => constants.%x.param_patt.91d -// CHECK:STDOUT: %x.patt.loc29_17.2 => constants.%x.patt.800c32.3 +// CHECK:STDOUT: %x.param_patt.loc29_16.2 => constants.%x.param_patt.91d +// CHECK:STDOUT: %x.patt.loc29_16.2 => constants.%x.patt.800c32.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.patt.loc19_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc19_7.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b -// CHECK:STDOUT: %x.param_patt.loc19_24.2 => constants.%x.param_patt.0f9 -// CHECK:STDOUT: %x.patt.loc19_24.2 => constants.%x.patt.2ccf4d.1 +// CHECK:STDOUT: %x.param_patt.loc19_23.2 => constants.%x.param_patt.0f9 +// CHECK:STDOUT: %x.patt.loc19_23.2 => constants.%x.patt.2ccf4d.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type @@ -227,8 +227,8 @@ fn M() { // CHECK:STDOUT: %T.patt.loc29_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc29_7.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b -// CHECK:STDOUT: %x.param_patt.loc29_17.2 => constants.%x.param_patt.0f9 -// CHECK:STDOUT: %x.patt.loc29_17.2 => constants.%x.patt.2ccf4d.2 +// CHECK:STDOUT: %x.param_patt.loc29_16.2 => constants.%x.param_patt.0f9 +// CHECK:STDOUT: %x.patt.loc29_16.2 => constants.%x.patt.2ccf4d.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type @@ -241,8 +241,8 @@ fn M() { // CHECK:STDOUT: %T.patt.loc23_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc23_7.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b -// CHECK:STDOUT: %x.param_patt.loc23_17.2 => constants.%x.param_patt.0f9 -// CHECK:STDOUT: %x.patt.loc23_17.2 => constants.%x.patt.2ccf4d.2 +// CHECK:STDOUT: %x.param_patt.loc23_16.2 => constants.%x.param_patt.0f9 +// CHECK:STDOUT: %x.patt.loc23_16.2 => constants.%x.patt.2ccf4d.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type diff --git a/toolchain/check/testdata/generic/complete_type.carbon b/toolchain/check/testdata/generic/complete_type.carbon index 9c5b82dc6e23..0410b1a21d7e 100644 --- a/toolchain/check/testdata/generic/complete_type.carbon +++ b/toolchain/check/testdata/generic/complete_type.carbon @@ -18,7 +18,7 @@ library "[[@TEST_NAME]]"; class B; -class A(T:! type) { +class A(T: type) { var v: T; } @@ -49,7 +49,7 @@ library "[[@TEST_NAME]]"; class B; -fn F(T:! type, v: T*) { +fn F(generic T: type, v: T*) { *v; } @@ -64,7 +64,7 @@ library "[[@TEST_NAME]]"; class B; -fn F(T:! type, p: T*) { +fn F(generic T: type, p: T*) { let _: T = *p; } @@ -132,9 +132,9 @@ fn G(p: B*) { F(B, p); } // CHECK:STDOUT: %A.decl: %A.type = class_decl @A [concrete = constants.%A.generic] { // CHECK:STDOUT: %T.patt.loc6_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_13.1: type = splice_block %.loc6_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_10.1 (constants.%T)] // CHECK:STDOUT: } @@ -260,21 +260,21 @@ fn G(p: B*) { F(B, p); } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %B.decl.loc4: type = class_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %v.param_patt.loc6_17.1: @F.%pattern_type (%pattern_type.4f4) = value_param_pattern [symbolic = %v.param_patt.loc6_17.2 (constants.%v.param_patt.88d)] -// CHECK:STDOUT: %v.patt.loc6_17.1: @F.%pattern_type (%pattern_type.4f4) = at_binding_pattern v, %v.param_patt.loc6_17.1 [symbolic = %v.patt.loc6_17.2 (constants.%v.patt.ddf)] +// CHECK:STDOUT: %T.patt.loc6_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %v.param_patt.loc6_24.1: @F.%pattern_type (%pattern_type.4f4) = value_param_pattern [symbolic = %v.param_patt.loc6_24.2 (constants.%v.param_patt.88d)] +// CHECK:STDOUT: %v.patt.loc6_24.1: @F.%pattern_type (%pattern_type.4f4) = at_binding_pattern v, %v.param_patt.loc6_24.1 [symbolic = %v.patt.loc6_24.2 (constants.%v.patt.ddf)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_17.1: type = splice_block %.loc6_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %v.param: @F.%ptr.loc6_20.1 (%ptr.e8f) = value_param call_param0 -// CHECK:STDOUT: %.loc6_20: type = splice_block %ptr.loc6_20.2 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_20.2: type = ptr_type %T.ref [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %T.loc6_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] +// CHECK:STDOUT: %v.param: @F.%ptr.loc6_27.1 (%ptr.e8f) = value_param call_param0 +// CHECK:STDOUT: %.loc6_27: type = splice_block %ptr.loc6_27.2 [symbolic = %ptr.loc6_27.1 (constants.%ptr.e8f)] { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc6_27.2: type = ptr_type %T.ref [symbolic = %ptr.loc6_27.1 (constants.%ptr.e8f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: @F.%ptr.loc6_20.1 (%ptr.e8f) = wrapper_binding v, %v.param +// CHECK:STDOUT: %v: @F.%ptr.loc6_27.1 (%ptr.e8f) = wrapper_binding v, %v.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %p.param_patt: %pattern_type.3c8 = value_param_pattern [concrete = constants.%p.param_patt] @@ -298,21 +298,21 @@ fn G(p: B*) { F(B, p); } // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) { -// CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_20.1: type = ptr_type %T.loc6_7.1 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc6_20.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)] -// CHECK:STDOUT: %v.param_patt.loc6_17.2: @F.%pattern_type (%pattern_type.4f4) = value_param_pattern [symbolic = %v.param_patt.loc6_17.2 (constants.%v.param_patt.88d)] -// CHECK:STDOUT: %v.patt.loc6_17.2: @F.%pattern_type (%pattern_type.4f4) = at_binding_pattern v, %v.param_patt.loc6_17.2 [symbolic = %v.patt.loc6_17.2 (constants.%v.patt.ddf)] +// CHECK:STDOUT: generic fn @F(%T.loc6_15.2: type) { +// CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc6_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc6_27.1: type = ptr_type %T.loc6_15.1 [symbolic = %ptr.loc6_27.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc6_27.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %v.param_patt.loc6_24.2: @F.%pattern_type (%pattern_type.4f4) = value_param_pattern [symbolic = %v.param_patt.loc6_24.2 (constants.%v.param_patt.88d)] +// CHECK:STDOUT: %v.patt.loc6_24.2: @F.%pattern_type (%pattern_type.4f4) = at_binding_pattern v, %v.param_patt.loc6_24.2 [symbolic = %v.patt.loc6_24.2 (constants.%v.patt.ddf)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc6_20.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc6_27.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%v.param: @F.%ptr.loc6_20.1 (%ptr.e8f)) { +// CHECK:STDOUT: fn(%v.param: @F.%ptr.loc6_27.1 (%ptr.e8f)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.ref: @F.%ptr.loc6_20.1 (%ptr.e8f) = name_ref v, %v -// CHECK:STDOUT: %.loc7: ref @F.%T.loc6_7.1 (%T) = deref %v.ref +// CHECK:STDOUT: %v.ref: @F.%ptr.loc6_27.1 (%ptr.e8f) = name_ref v, %v +// CHECK:STDOUT: %.loc7: ref @F.%T.loc6_15.1 (%T) = deref %v.ref // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -332,21 +332,21 @@ fn G(p: B*) { F(B, p); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %ptr.loc6_20.1 => constants.%ptr.e8f +// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc6_15.1 => constants.%T +// CHECK:STDOUT: %ptr.loc6_27.1 => constants.%ptr.e8f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 -// CHECK:STDOUT: %v.param_patt.loc6_17.2 => constants.%v.param_patt.88d -// CHECK:STDOUT: %v.patt.loc6_17.2 => constants.%v.patt.ddf +// CHECK:STDOUT: %v.param_patt.loc6_24.2 => constants.%v.param_patt.88d +// CHECK:STDOUT: %v.patt.loc6_24.2 => constants.%v.patt.ddf // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%B) { -// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_7.1 => constants.%B -// CHECK:STDOUT: %ptr.loc6_20.1 => constants.%ptr.432 +// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc6_15.1 => constants.%B +// CHECK:STDOUT: %ptr.loc6_27.1 => constants.%ptr.432 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3c8 -// CHECK:STDOUT: %v.param_patt.loc6_17.2 => constants.%v.param_patt.8ec -// CHECK:STDOUT: %v.patt.loc6_17.2 => constants.%v.patt.24a +// CHECK:STDOUT: %v.param_patt.loc6_24.2 => constants.%v.param_patt.8ec +// CHECK:STDOUT: %v.patt.loc6_24.2 => constants.%v.patt.24a // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.85b @@ -401,21 +401,21 @@ fn G(p: B*) { F(B, p); } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %B.decl: type = class_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.param_patt.loc6_17.1: @F.%pattern_type.loc6 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_17.2 (constants.%p.param_patt.a12)] -// CHECK:STDOUT: %p.patt.loc6_17.1: @F.%pattern_type.loc6 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_17.1 [symbolic = %p.patt.loc6_17.2 (constants.%p.patt.14c)] +// CHECK:STDOUT: %T.patt.loc6_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %p.param_patt.loc6_24.1: @F.%pattern_type.loc6 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_24.2 (constants.%p.param_patt.a12)] +// CHECK:STDOUT: %p.patt.loc6_24.1: @F.%pattern_type.loc6 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_24.1 [symbolic = %p.patt.loc6_24.2 (constants.%p.patt.14c)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_17.1: type = splice_block %.loc6_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %p.param: @F.%ptr.loc6_20.1 (%ptr.e8f) = value_param call_param0 -// CHECK:STDOUT: %.loc6_20: type = splice_block %ptr.loc6_20.2 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] { -// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_20.2: type = ptr_type %T.ref.loc6 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %T.loc6_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] +// CHECK:STDOUT: %p.param: @F.%ptr.loc6_27.1 (%ptr.e8f) = value_param call_param0 +// CHECK:STDOUT: %.loc6_27: type = splice_block %ptr.loc6_27.2 [symbolic = %ptr.loc6_27.1 (constants.%ptr.e8f)] { +// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc6_27.2: type = ptr_type %T.ref.loc6 [symbolic = %ptr.loc6_27.1 (constants.%ptr.e8f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %p: @F.%ptr.loc6_20.1 (%ptr.e8f) = wrapper_binding p, %p.param +// CHECK:STDOUT: %p: @F.%ptr.loc6_27.1 (%ptr.e8f) = wrapper_binding p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %p.param_patt: %pattern_type.3c8 = value_param_pattern [concrete = constants.%p.param_patt.436] @@ -432,27 +432,27 @@ fn G(p: B*) { F(B, p); } // CHECK:STDOUT: // CHECK:STDOUT: class @B; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) { -// CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_20.1: type = ptr_type %T.loc6_7.1 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %ptr.loc6_20.1 [symbolic = %pattern_type.loc6 (constants.%pattern_type.4f4)] -// CHECK:STDOUT: %p.param_patt.loc6_17.2: @F.%pattern_type.loc6 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_17.2 (constants.%p.param_patt.a12)] -// CHECK:STDOUT: %p.patt.loc6_17.2: @F.%pattern_type.loc6 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_17.2 [symbolic = %p.patt.loc6_17.2 (constants.%p.patt.14c)] +// CHECK:STDOUT: generic fn @F(%T.loc6_15.2: type) { +// CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc6_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc6_27.1: type = ptr_type %T.loc6_15.1 [symbolic = %ptr.loc6_27.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %ptr.loc6_27.1 [symbolic = %pattern_type.loc6 (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %p.param_patt.loc6_24.2: @F.%pattern_type.loc6 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_24.2 (constants.%p.param_patt.a12)] +// CHECK:STDOUT: %p.patt.loc6_24.2: @F.%pattern_type.loc6 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_24.2 [symbolic = %p.patt.loc6_24.2 (constants.%p.patt.14c)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6: = require_complete_type %ptr.loc6_20.1 [symbolic = %require_complete.loc6 (constants.%require_complete.ef1)] -// CHECK:STDOUT: %require_complete.loc7: = require_complete_type %T.loc6_7.1 [symbolic = %require_complete.loc7 (constants.%require_complete.944)] -// CHECK:STDOUT: %pattern_type.loc7: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc7 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %require_complete.loc6: = require_complete_type %ptr.loc6_27.1 [symbolic = %require_complete.loc6 (constants.%require_complete.ef1)] +// CHECK:STDOUT: %require_complete.loc7: = require_complete_type %T.loc6_15.1 [symbolic = %require_complete.loc7 (constants.%require_complete.944)] +// CHECK:STDOUT: %pattern_type.loc7: type = pattern_type %T.loc6_15.1 [symbolic = %pattern_type.loc7 (constants.%pattern_type.51d)] // CHECK:STDOUT: %_.patt.loc7_8.2: @F.%pattern_type.loc7 (%pattern_type.51d) = value_binding_pattern _ [symbolic = %_.patt.loc7_8.2 (constants.%_.patt.ee9)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc6_20.1 (%ptr.e8f)) { +// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc6_27.1 (%ptr.e8f)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_20.1 (%ptr.e8f) = name_ref p, %p -// CHECK:STDOUT: %.loc7_14.1: ref @F.%T.loc6_7.1 (%T) = deref %p.ref -// CHECK:STDOUT: %.loc7_14.2: @F.%T.loc6_7.1 (%T) = acquire_value %.loc7_14.1 -// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %_: @F.%T.loc6_7.1 (%T) = wrapper_binding _, %.loc7_14.2 +// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_27.1 (%ptr.e8f) = name_ref p, %p +// CHECK:STDOUT: %.loc7_14.1: ref @F.%T.loc6_15.1 (%T) = deref %p.ref +// CHECK:STDOUT: %.loc7_14.2: @F.%T.loc6_15.1 (%T) = acquire_value %.loc7_14.1 +// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)] +// CHECK:STDOUT: %_: @F.%T.loc6_15.1 (%T) = wrapper_binding _, %.loc7_14.2 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt.loc7_8.1: @F.%pattern_type.loc7 (%pattern_type.51d) = value_binding_pattern _ [symbolic = %_.patt.loc7_8.2 (constants.%_.patt.ee9)] // CHECK:STDOUT: } @@ -475,21 +475,21 @@ fn G(p: B*) { F(B, p); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %ptr.loc6_20.1 => constants.%ptr.e8f +// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc6_15.1 => constants.%T +// CHECK:STDOUT: %ptr.loc6_27.1 => constants.%ptr.e8f // CHECK:STDOUT: %pattern_type.loc6 => constants.%pattern_type.4f4 -// CHECK:STDOUT: %p.param_patt.loc6_17.2 => constants.%p.param_patt.a12 -// CHECK:STDOUT: %p.patt.loc6_17.2 => constants.%p.patt.14c +// CHECK:STDOUT: %p.param_patt.loc6_24.2 => constants.%p.param_patt.a12 +// CHECK:STDOUT: %p.patt.loc6_24.2 => constants.%p.patt.14c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%B) { -// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_7.1 => constants.%B -// CHECK:STDOUT: %ptr.loc6_20.1 => constants.%ptr.432 +// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc6_15.1 => constants.%B +// CHECK:STDOUT: %ptr.loc6_27.1 => constants.%ptr.432 // CHECK:STDOUT: %pattern_type.loc6 => constants.%pattern_type.3c8 -// CHECK:STDOUT: %p.param_patt.loc6_17.2 => constants.%p.param_patt.436 -// CHECK:STDOUT: %p.patt.loc6_17.2 => constants.%p.patt.c38 +// CHECK:STDOUT: %p.param_patt.loc6_24.2 => constants.%p.param_patt.436 +// CHECK:STDOUT: %p.patt.loc6_24.2 => constants.%p.patt.c38 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc6 => constants.%complete_type diff --git a/toolchain/check/testdata/generic/dependent_param.carbon b/toolchain/check/testdata/generic/dependent_param.carbon index fdc2098acca5..1c399ad82173 100644 --- a/toolchain/check/testdata/generic/dependent_param.carbon +++ b/toolchain/check/testdata/generic/dependent_param.carbon @@ -14,8 +14,8 @@ library "[[@TEST_NAME]]"; -class Outer(T:! Core.Copy) { - class Inner(U:! T) { +class Outer(T: Core.Copy) { + class Inner(U: T) { //@dump-sem-ir-begin fn Get() -> T { return U; } //@dump-sem-ir-end @@ -142,7 +142,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @Inner(@Outer.%T.loc4_14.2: %Copy.type, %U.loc5_16.2: @Inner.%T.as_type.loc5_19.1 (%T.as_type)) { +// CHECK:STDOUT: generic class @Inner(@Outer.%T.loc4_14.2: %Copy.type, %U.loc5_16.2: @Inner.%T.as_type.loc5_18.1 (%T.as_type)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -172,7 +172,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Inner.Get(@Outer.%T.loc4_14.2: %Copy.type, @Inner.%U.loc5_16.2: @Inner.%T.as_type.loc5_19.1 (%T.as_type)) { +// CHECK:STDOUT: generic fn @Inner.Get(@Outer.%T.loc4_14.2: %Copy.type, @Inner.%U.loc5_16.2: @Inner.%T.as_type.loc5_18.1 (%T.as_type)) { // CHECK:STDOUT: %T: %Copy.type = symbolic_binding T, 0 [symbolic = %T (constants.%T.f84)] // CHECK:STDOUT: %T.as_type.loc7_17.1: type = facet_access_type %T [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc7_17.2: Core.Form = init_form %T.as_type.loc7_17.1 [symbolic = %.loc7_17.2 (constants.%.1ce700.2)] @@ -249,7 +249,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(constants.%T.f84, constants.%U.7e5) { // CHECK:STDOUT: %T => constants.%T.f84 -// CHECK:STDOUT: %T.as_type.loc5_19.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc5_18.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2c66b4.2 // CHECK:STDOUT: %U.patt.loc5_16.2 => constants.%U.patt.ed4 // CHECK:STDOUT: %U.loc5_16.1 => constants.%U.7e5 @@ -279,7 +279,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(constants.%Copy.facet.987, constants.%int_42.ac4) { // CHECK:STDOUT: %T => constants.%Copy.facet.987 -// CHECK:STDOUT: %T.as_type.loc5_19.1 => constants.%i32 +// CHECK:STDOUT: %T.as_type.loc5_18.1 => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6 // CHECK:STDOUT: %U.patt.loc5_16.2 => constants.%U.patt.a76 // CHECK:STDOUT: %U.loc5_16.1 => constants.%int_42.ac4 diff --git a/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon b/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon index 9a07f498fdd4..f12c8c943802 100644 --- a/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon +++ b/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon @@ -14,33 +14,33 @@ library "[[@TEST_NAME]]"; -interface A(AA:! type) { let X:! type; } +interface A(AA: type) { let X: type; } -class C(CC:! type) { +class C(CC: type) { //@dump-sem-ir-begin // The `.Self` bind_symbolic_name here should have a // symbolic constant value, not symbolic_self, because // its type depends on `CC`. - fn F(unused T:! A(CC) where .X = CC) {} + fn F(unused generic T: A(CC) where .X = CC) {} //@dump-sem-ir-end } -class D(DD:! type) { - fn G(T:! type) { +class D(DD: type) { + fn G(generic T: type) { //@dump-sem-ir-begin // CHECK:STDERR: fail_dot_self_symbolic_type.carbon:[[@LINE+7]]:5: error: cannot convert type `T` into type implementing `A(DD) where .(A(DD).X) = DD` [ConversionFailureTypeToFacet] // CHECK:STDERR: C(DD).F(T); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: fail_dot_self_symbolic_type.carbon:[[@LINE-10]]:3: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F(unused T:! A(CC) where .X = CC) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F(unused generic T: A(CC) where .X = CC) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: C(DD).F(T); //@dump-sem-ir-end } } -fn H(T:! type) { +fn H(generic T: type) { D({}).G(T); } @@ -48,18 +48,18 @@ fn H(T:! type) { library "[[@TEST_NAME]]"; -interface A(AA:! type) { let X:! type; } +interface A(AA: type) { let X: type; } -interface B(AA:! type) {} +interface B(AA: type) {} //@dump-sem-ir-begin -impl forall [AA:! type, BB:! A(AA) where .X = ()] BB as B(AA*) {} +impl forall [AA: type, BB: A(AA) where .X = ()] BB as B(AA*) {} //@dump-sem-ir-end -impl forall [AA:! type, BB:! type] BB as B(AA) {} +impl forall [AA: type, BB: type] BB as B(AA) {} -class D(DD:! type) { - fn G(T:! type) { +class D(DD: type) { + fn G(generic T: type) { // TODO: This produces a `lookup_impl_witness` instruction looking // for `.Self` as `A(DD)` in the generic eval block for `G`. That // is from an impl we ended up not using, so shouldn't be included @@ -70,7 +70,7 @@ class D(DD:! type) { } } -fn H(T:! type) { +fn H(generic T: type) { D({}).G(T); } @@ -134,31 +134,31 @@ fn H(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %C.F.decl: @C.%C.F.type (%C.F.type.55fb78.1) = fn_decl @C.F [symbolic = @C.%C.F (constants.%C.F.6da92d.1)] { -// CHECK:STDOUT: %T.patt.loc11_16.1: @C.F.%pattern_type (%pattern_type.b1a) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc11_16.2 (constants.%T.patt.0e4)] +// CHECK:STDOUT: %T.patt.loc11_24.1: @C.F.%pattern_type (%pattern_type.b1a) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc11_24.2 (constants.%T.patt.0e4)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_25.1: type = splice_block %.loc11_25.2 [symbolic = %A_where.type (constants.%A_where.type.da43f4.1)] { -// CHECK:STDOUT: %.Self.frozen.loc11_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc11_32.1: type = splice_block %.loc11_32.2 [symbolic = %A_where.type (constants.%A_where.type.da43f4.1)] { +// CHECK:STDOUT: %.Self.frozen.loc11_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: %A.type.55a = name_ref A, file.%A.decl [concrete = constants.%A.generic] -// CHECK:STDOUT: %CC.ref.loc11_21: type = name_ref CC, @C.%CC.loc6_11.2 [symbolic = %CC (constants.%CC)] -// CHECK:STDOUT: %A.type.loc11_23.2: type = facet_type <@A, @A(constants.%CC)> [symbolic = %A.type.loc11_23.1 (constants.%A.type.acd3aa.2)] -// CHECK:STDOUT: %.Self.frozen.loc11_25.2: @C.F.%A.type.loc11_23.1 (%A.type.acd3aa.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_25.1 (constants.%.Self.frozen.14f)] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc11_23.2 [concrete] -// CHECK:STDOUT: %.Self.ref: @C.F.%A.type.loc11_23.1 (%A.type.acd3aa.2) = name_ref .Self, %.Self.frozen.loc11_25.2 [symbolic = %.Self.frozen.loc11_25.1 (constants.%.Self.frozen.14f)] +// CHECK:STDOUT: %CC.ref.loc11_28: type = name_ref CC, @C.%CC.loc6_11.2 [symbolic = %CC (constants.%CC)] +// CHECK:STDOUT: %A.type.loc11_30.2: type = facet_type <@A, @A(constants.%CC)> [symbolic = %A.type.loc11_30.1 (constants.%A.type.acd3aa.2)] +// CHECK:STDOUT: %.Self.frozen.loc11_32.2: @C.F.%A.type.loc11_30.1 (%A.type.acd3aa.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_32.1 (constants.%.Self.frozen.14f)] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc11_30.2 [concrete] +// CHECK:STDOUT: %.Self.ref: @C.F.%A.type.loc11_30.1 (%A.type.acd3aa.2) = name_ref .Self, %.Self.frozen.loc11_32.2 [symbolic = %.Self.frozen.loc11_32.1 (constants.%.Self.frozen.14f)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)] -// CHECK:STDOUT: %.loc11_31.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)] -// CHECK:STDOUT: %.loc11_31.2: @C.F.%A.assoc_type (%A.assoc_type.447662.2) = specific_constant @X.%assoc0, @A.WithSelf(constants.%CC, constants.%.Self.frozen.14f) [symbolic = %assoc0 (constants.%assoc0.e0998a.2)] -// CHECK:STDOUT: %X.ref: @C.F.%A.assoc_type (%A.assoc_type.447662.2) = name_ref X, %.loc11_31.2 [symbolic = %assoc0 (constants.%assoc0.e0998a.2)] -// CHECK:STDOUT: %impl.elem0.loc11_31.3: type = impl_witness_access constants.%A.lookup_impl_witness.8d4, element0 [symbolic = %impl.elem0.loc11_31.1 (constants.%impl.elem0.796)] -// CHECK:STDOUT: %CC.ref.loc11_36: type = name_ref CC, @C.%CC.loc6_11.2 [symbolic = %CC (constants.%CC)] -// CHECK:STDOUT: %rewrite.loc11_34.1 = requirement_rewrite %impl.elem0.loc11_31.3, %CC.ref.loc11_36 [concrete] -// CHECK:STDOUT: %impl.elem0.loc11_31.4: type = impl_witness_access constants.%A.lookup_impl_witness.b03c54.1, element0 [symbolic = %impl.elem0.loc11_31.2 (constants.%impl.elem0.14e5d2.1)] -// CHECK:STDOUT: %rewrite.loc11_34.2 = requirement_rewrite %impl.elem0.loc11_31.4, %CC.ref.loc11_36 [concrete] -// CHECK:STDOUT: %.loc11_25.2: type = where_expr [symbolic = %A_where.type (constants.%A_where.type.da43f4.1)] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc11_23.2 [concrete] -// CHECK:STDOUT: %rewrite.loc11_34.2 = requirement_rewrite %impl.elem0.loc11_31.4, %CC.ref.loc11_36 [concrete] +// CHECK:STDOUT: %.loc11_38.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)] +// CHECK:STDOUT: %.loc11_38.2: @C.F.%A.assoc_type (%A.assoc_type.447662.2) = specific_constant @X.%assoc0, @A.WithSelf(constants.%CC, constants.%.Self.frozen.14f) [symbolic = %assoc0 (constants.%assoc0.e0998a.2)] +// CHECK:STDOUT: %X.ref: @C.F.%A.assoc_type (%A.assoc_type.447662.2) = name_ref X, %.loc11_38.2 [symbolic = %assoc0 (constants.%assoc0.e0998a.2)] +// CHECK:STDOUT: %impl.elem0.loc11_38.3: type = impl_witness_access constants.%A.lookup_impl_witness.8d4, element0 [symbolic = %impl.elem0.loc11_38.1 (constants.%impl.elem0.796)] +// CHECK:STDOUT: %CC.ref.loc11_43: type = name_ref CC, @C.%CC.loc6_11.2 [symbolic = %CC (constants.%CC)] +// CHECK:STDOUT: %rewrite.loc11_41.1 = requirement_rewrite %impl.elem0.loc11_38.3, %CC.ref.loc11_43 [concrete] +// CHECK:STDOUT: %impl.elem0.loc11_38.4: type = impl_witness_access constants.%A.lookup_impl_witness.b03c54.1, element0 [symbolic = %impl.elem0.loc11_38.2 (constants.%impl.elem0.14e5d2.1)] +// CHECK:STDOUT: %rewrite.loc11_41.2 = requirement_rewrite %impl.elem0.loc11_38.4, %CC.ref.loc11_43 [concrete] +// CHECK:STDOUT: %.loc11_32.2: type = where_expr [symbolic = %A_where.type (constants.%A_where.type.da43f4.1)] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc11_30.2 [concrete] +// CHECK:STDOUT: %rewrite.loc11_41.2 = requirement_rewrite %impl.elem0.loc11_38.4, %CC.ref.loc11_43 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc11_16.2: @C.F.%A_where.type (%A_where.type.da43f4.1) = symbolic_binding T, 1 [symbolic = %T.loc11_16.1 (constants.%T.422)] +// CHECK:STDOUT: %T.loc11_24.2: @C.F.%A_where.type (%A_where.type.da43f4.1) = symbolic_binding T, 1 [symbolic = %T.loc11_24.1 (constants.%T.422)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: complete_type_witness = %complete_type @@ -189,23 +189,23 @@ fn H(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @C.F(@C.%CC.loc6_11.2: type, %T.loc11_16.2: @C.F.%A_where.type (%A_where.type.da43f4.1)) { +// CHECK:STDOUT: generic fn @C.F(@C.%CC.loc6_11.2: type, %T.loc11_24.2: @C.F.%A_where.type (%A_where.type.da43f4.1)) { // CHECK:STDOUT: %CC: type = symbolic_binding CC, 0 [symbolic = %CC (constants.%CC)] -// CHECK:STDOUT: %A.type.loc11_23.1: type = facet_type <@A, @A(%CC)> [symbolic = %A.type.loc11_23.1 (constants.%A.type.acd3aa.2)] -// CHECK:STDOUT: %.Self.frozen.loc11_25.1: @C.F.%A.type.loc11_23.1 (%A.type.acd3aa.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_25.1 (constants.%.Self.frozen.14f)] -// CHECK:STDOUT: %require_complete: = require_complete_type %A.type.loc11_23.1 [symbolic = %require_complete (constants.%require_complete.21f)] -// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc11_25.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)] +// CHECK:STDOUT: %A.type.loc11_30.1: type = facet_type <@A, @A(%CC)> [symbolic = %A.type.loc11_30.1 (constants.%A.type.acd3aa.2)] +// CHECK:STDOUT: %.Self.frozen.loc11_32.1: @C.F.%A.type.loc11_30.1 (%A.type.acd3aa.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_32.1 (constants.%.Self.frozen.14f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %A.type.loc11_30.1 [symbolic = %require_complete (constants.%require_complete.21f)] +// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc11_32.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A, @A(%CC) [symbolic = %A.assoc_type (constants.%A.assoc_type.447662.2)] // CHECK:STDOUT: %assoc0: @C.F.%A.assoc_type (%A.assoc_type.447662.2) = assoc_entity element0, @A.WithSelf.%X [symbolic = %assoc0 (constants.%assoc0.e0998a.2)] -// CHECK:STDOUT: %A.lookup_impl_witness.loc11_31.1: = lookup_impl_witness %.Self.frozen.loc11_25.1, @A, @A(%CC) [symbolic = %A.lookup_impl_witness.loc11_31.1 (constants.%A.lookup_impl_witness.8d4)] -// CHECK:STDOUT: %impl.elem0.loc11_31.1: type = impl_witness_access %A.lookup_impl_witness.loc11_31.1, element0 [symbolic = %impl.elem0.loc11_31.1 (constants.%impl.elem0.796)] -// CHECK:STDOUT: %.Self: @C.F.%A.type.loc11_23.1 (%A.type.acd3aa.2) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.a16688.1)] -// CHECK:STDOUT: %A.lookup_impl_witness.loc11_31.2: = lookup_impl_witness %.Self, @A, @A(%CC) [symbolic = %A.lookup_impl_witness.loc11_31.2 (constants.%A.lookup_impl_witness.b03c54.1)] -// CHECK:STDOUT: %impl.elem0.loc11_31.2: type = impl_witness_access %A.lookup_impl_witness.loc11_31.2, element0 [symbolic = %impl.elem0.loc11_31.2 (constants.%impl.elem0.14e5d2.1)] -// CHECK:STDOUT: %A_where.type: type = facet_type <@A, @A(%CC) where %impl.elem0.loc11_31.2 = %CC> [symbolic = %A_where.type (constants.%A_where.type.da43f4.1)] +// CHECK:STDOUT: %A.lookup_impl_witness.loc11_38.1: = lookup_impl_witness %.Self.frozen.loc11_32.1, @A, @A(%CC) [symbolic = %A.lookup_impl_witness.loc11_38.1 (constants.%A.lookup_impl_witness.8d4)] +// CHECK:STDOUT: %impl.elem0.loc11_38.1: type = impl_witness_access %A.lookup_impl_witness.loc11_38.1, element0 [symbolic = %impl.elem0.loc11_38.1 (constants.%impl.elem0.796)] +// CHECK:STDOUT: %.Self: @C.F.%A.type.loc11_30.1 (%A.type.acd3aa.2) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.a16688.1)] +// CHECK:STDOUT: %A.lookup_impl_witness.loc11_38.2: = lookup_impl_witness %.Self, @A, @A(%CC) [symbolic = %A.lookup_impl_witness.loc11_38.2 (constants.%A.lookup_impl_witness.b03c54.1)] +// CHECK:STDOUT: %impl.elem0.loc11_38.2: type = impl_witness_access %A.lookup_impl_witness.loc11_38.2, element0 [symbolic = %impl.elem0.loc11_38.2 (constants.%impl.elem0.14e5d2.1)] +// CHECK:STDOUT: %A_where.type: type = facet_type <@A, @A(%CC) where %impl.elem0.loc11_38.2 = %CC> [symbolic = %A_where.type (constants.%A_where.type.da43f4.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %A_where.type [symbolic = %pattern_type (constants.%pattern_type.b1a)] -// CHECK:STDOUT: %T.patt.loc11_16.2: @C.F.%pattern_type (%pattern_type.b1a) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc11_16.2 (constants.%T.patt.0e4)] -// CHECK:STDOUT: %T.loc11_16.1: @C.F.%A_where.type (%A_where.type.da43f4.1) = symbolic_binding T, 1 [symbolic = %T.loc11_16.1 (constants.%T.422)] +// CHECK:STDOUT: %T.patt.loc11_24.2: @C.F.%pattern_type (%pattern_type.b1a) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc11_24.2 (constants.%T.patt.0e4)] +// CHECK:STDOUT: %T.loc11_24.1: @C.F.%A_where.type (%A_where.type.da43f4.1) = symbolic_binding T, 1 [symbolic = %T.loc11_24.1 (constants.%T.422)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -217,7 +217,7 @@ fn H(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @D.G(@D.%DD.loc15_11.2: type, %T.loc16_9.2: type) { +// CHECK:STDOUT: generic fn @D.G(@D.%DD.loc15_11.2: type, %T.loc16_17.2: type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -234,7 +234,7 @@ fn H(T:! type) { // CHECK:STDOUT: %C.loc25_9.1: type = class_type @C, @C(constants.%DD) [symbolic = %C.loc25_9.2 (constants.%C.1d0e8a.2)] // CHECK:STDOUT: %.loc25: @D.G.%C.F.type (%C.F.type.55fb78.2) = specific_constant @C.%C.F.decl, @C(constants.%DD) [symbolic = %C.F (constants.%C.F.6da92d.2)] // CHECK:STDOUT: %F.ref: @D.G.%C.F.type (%C.F.type.55fb78.2) = name_ref F, %.loc25 [symbolic = %C.F (constants.%C.F.6da92d.2)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc16_9.2 [symbolic = %T.loc16_9.1 (constants.%T.091)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc16_17.2 [symbolic = %T.loc16_17.1 (constants.%T.091)] // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -252,21 +252,21 @@ fn H(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @C.F(constants.%CC, constants.%T.422) { // CHECK:STDOUT: %CC => constants.%CC -// CHECK:STDOUT: %A.type.loc11_23.1 => constants.%A.type.acd3aa.2 -// CHECK:STDOUT: %.Self.frozen.loc11_25.1 => constants.%.Self.frozen.14f +// CHECK:STDOUT: %A.type.loc11_30.1 => constants.%A.type.acd3aa.2 +// CHECK:STDOUT: %.Self.frozen.loc11_32.1 => constants.%.Self.frozen.14f // CHECK:STDOUT: %require_complete => constants.%require_complete.21f // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.447662.2 // CHECK:STDOUT: %assoc0 => constants.%assoc0.e0998a.2 -// CHECK:STDOUT: %A.lookup_impl_witness.loc11_31.1 => constants.%A.lookup_impl_witness.8d4 -// CHECK:STDOUT: %impl.elem0.loc11_31.1 => constants.%impl.elem0.796 +// CHECK:STDOUT: %A.lookup_impl_witness.loc11_38.1 => constants.%A.lookup_impl_witness.8d4 +// CHECK:STDOUT: %impl.elem0.loc11_38.1 => constants.%impl.elem0.796 // CHECK:STDOUT: %.Self => constants.%.Self.a16688.1 -// CHECK:STDOUT: %A.lookup_impl_witness.loc11_31.2 => constants.%A.lookup_impl_witness.b03c54.1 -// CHECK:STDOUT: %impl.elem0.loc11_31.2 => constants.%impl.elem0.14e5d2.1 +// CHECK:STDOUT: %A.lookup_impl_witness.loc11_38.2 => constants.%A.lookup_impl_witness.b03c54.1 +// CHECK:STDOUT: %impl.elem0.loc11_38.2 => constants.%impl.elem0.14e5d2.1 // CHECK:STDOUT: %A_where.type => constants.%A_where.type.da43f4.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b1a -// CHECK:STDOUT: %T.patt.loc11_16.2 => constants.%T.patt.0e4 -// CHECK:STDOUT: %T.loc11_16.1 => constants.%T.422 +// CHECK:STDOUT: %T.patt.loc11_24.2 => constants.%T.patt.0e4 +// CHECK:STDOUT: %T.loc11_24.1 => constants.%T.422 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D(constants.%DD) { @@ -279,8 +279,8 @@ fn H(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D.G(constants.%DD, constants.%T.091) { -// CHECK:STDOUT: %T.patt.loc16_9.2 => constants.%T.patt.014 -// CHECK:STDOUT: %T.loc16_9.1 => constants.%T.091 +// CHECK:STDOUT: %T.patt.loc16_17.2 => constants.%T.patt.014 +// CHECK:STDOUT: %T.loc16_17.1 => constants.%T.091 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%DD) { @@ -302,8 +302,8 @@ fn H(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D.G(constants.%empty_struct_type, constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc16_9.2 => constants.%T.patt.014 -// CHECK:STDOUT: %T.loc16_9.1 => constants.%T.67d +// CHECK:STDOUT: %T.patt.loc16_17.2 => constants.%T.patt.014 +// CHECK:STDOUT: %T.loc16_17.1 => constants.%T.67d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %DD => constants.%empty_struct_type @@ -382,80 +382,80 @@ fn H(T:! type) { // CHECK:STDOUT: file { // CHECK:STDOUT: impl_decl @BB.as_type.as.B.impl [concrete] { // CHECK:STDOUT: %AA.patt.loc9_16.1: %pattern_type.98f = symbolic_binding_pattern AA, 0 [symbolic = %AA.patt.loc9_16.2 (constants.%AA.patt)] -// CHECK:STDOUT: %BB.patt.loc9_27.1: @BB.as_type.as.B.impl.%pattern_type (%pattern_type.98d) = symbolic_binding_pattern BB, 1 [symbolic = %BB.patt.loc9_27.2 (constants.%BB.patt.aea)] +// CHECK:STDOUT: %BB.patt.loc9_26.1: @BB.as_type.as.B.impl.%pattern_type (%pattern_type.98d) = symbolic_binding_pattern BB, 1 [symbolic = %BB.patt.loc9_26.2 (constants.%BB.patt.aea)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %BB.ref: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1) = name_ref BB, %BB.loc9_27.1 [symbolic = %BB.loc9_27.2 (constants.%BB.6ca)] -// CHECK:STDOUT: %BB.as_type.loc9_51.1: type = facet_access_type %BB.ref [symbolic = %BB.as_type.loc9_51.2 (constants.%BB.as_type)] -// CHECK:STDOUT: %.loc9_51: type = converted %BB.ref, %BB.as_type.loc9_51.1 [symbolic = %BB.as_type.loc9_51.2 (constants.%BB.as_type)] +// CHECK:STDOUT: %BB.ref: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1) = name_ref BB, %BB.loc9_26.1 [symbolic = %BB.loc9_26.2 (constants.%BB.6ca)] +// CHECK:STDOUT: %BB.as_type.loc9_49.1: type = facet_access_type %BB.ref [symbolic = %BB.as_type.loc9_49.2 (constants.%BB.as_type)] +// CHECK:STDOUT: %.loc9_49: type = converted %BB.ref, %BB.as_type.loc9_49.1 [symbolic = %BB.as_type.loc9_49.2 (constants.%BB.as_type)] // CHECK:STDOUT: %B.ref: %B.type.d1b = name_ref B, file.%B.decl [concrete = constants.%B.generic] -// CHECK:STDOUT: %AA.ref.loc9_59: type = name_ref AA, %AA.loc9_16.1 [symbolic = %AA.loc9_16.2 (constants.%AA)] -// CHECK:STDOUT: %ptr.loc9_61.1: type = ptr_type %AA.ref.loc9_59 [symbolic = %ptr.loc9_61.2 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %B.type.loc9_62.1: type = facet_type <@B, @B(constants.%ptr.e8f8f9.1)> [symbolic = %B.type.loc9_62.2 (constants.%B.type.4a0be4.1)] -// CHECK:STDOUT: %.loc9_19.1: type = splice_block %.loc9_19.2 [concrete = type] { +// CHECK:STDOUT: %AA.ref.loc9_57: type = name_ref AA, %AA.loc9_16.1 [symbolic = %AA.loc9_16.2 (constants.%AA)] +// CHECK:STDOUT: %ptr.loc9_59.1: type = ptr_type %AA.ref.loc9_57 [symbolic = %ptr.loc9_59.2 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %B.type.loc9_60.1: type = facet_type <@B, @B(constants.%ptr.e8f8f9.1)> [symbolic = %B.type.loc9_60.2 (constants.%B.type.4a0be4.1)] +// CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc9_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc9_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %AA.loc9_16.1: type = symbolic_binding AA, 0 [symbolic = %AA.loc9_16.2 (constants.%AA)] -// CHECK:STDOUT: %.loc9_36.1: type = splice_block %.loc9_36.2 [symbolic = %A_where.type (constants.%A_where.type.ce6fa0.1)] { -// CHECK:STDOUT: %.Self.frozen.loc9_27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc9_34.1: type = splice_block %.loc9_34.2 [symbolic = %A_where.type (constants.%A_where.type.ce6fa0.1)] { +// CHECK:STDOUT: %.Self.frozen.loc9_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: %A.type.55a = name_ref A, file.%A.decl [concrete = constants.%A.generic] -// CHECK:STDOUT: %AA.ref.loc9_32: type = name_ref AA, %AA.loc9_16.1 [symbolic = %AA.loc9_16.2 (constants.%AA)] -// CHECK:STDOUT: %A.type.loc9_34.1: type = facet_type <@A, @A(constants.%AA)> [symbolic = %A.type.loc9_34.2 (constants.%A.type.acd3aa.1)] -// CHECK:STDOUT: %.Self.frozen.loc9_36.1: @BB.as_type.as.B.impl.%A.type.loc9_34.2 (%A.type.acd3aa.1) = symbolic_binding .Self [symbolic = %.Self.frozen.loc9_36.2 (constants.%.Self.frozen.14f)] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc9_34.1 [concrete] -// CHECK:STDOUT: %.Self.ref: @BB.as_type.as.B.impl.%A.type.loc9_34.2 (%A.type.acd3aa.1) = name_ref .Self, %.Self.frozen.loc9_36.1 [symbolic = %.Self.frozen.loc9_36.2 (constants.%.Self.frozen.14f)] +// CHECK:STDOUT: %AA.ref.loc9_30: type = name_ref AA, %AA.loc9_16.1 [symbolic = %AA.loc9_16.2 (constants.%AA)] +// CHECK:STDOUT: %A.type.loc9_32.1: type = facet_type <@A, @A(constants.%AA)> [symbolic = %A.type.loc9_32.2 (constants.%A.type.acd3aa.1)] +// CHECK:STDOUT: %.Self.frozen.loc9_34.1: @BB.as_type.as.B.impl.%A.type.loc9_32.2 (%A.type.acd3aa.1) = symbolic_binding .Self [symbolic = %.Self.frozen.loc9_34.2 (constants.%.Self.frozen.14f)] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc9_32.1 [concrete] +// CHECK:STDOUT: %.Self.ref: @BB.as_type.as.B.impl.%A.type.loc9_32.2 (%A.type.acd3aa.1) = name_ref .Self, %.Self.frozen.loc9_34.1 [symbolic = %.Self.frozen.loc9_34.2 (constants.%.Self.frozen.14f)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)] -// CHECK:STDOUT: %.loc9_42.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)] -// CHECK:STDOUT: %.loc9_42.2: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = specific_constant @X.%assoc0, @A.WithSelf(constants.%AA, constants.%.Self.frozen.14f) [symbolic = %assoc0 (constants.%assoc0)] -// CHECK:STDOUT: %X.ref: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = name_ref X, %.loc9_42.2 [symbolic = %assoc0 (constants.%assoc0)] -// CHECK:STDOUT: %impl.elem0.loc9_42.1: type = impl_witness_access constants.%A.lookup_impl_witness.8d4, element0 [symbolic = %impl.elem0.loc9_42.3 (constants.%impl.elem0.796)] -// CHECK:STDOUT: %.loc9_48.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_48.2: type = converted %.loc9_48.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %rewrite.loc9_45.1 = requirement_rewrite %impl.elem0.loc9_42.1, %.loc9_48.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc9_42.2: type = impl_witness_access constants.%A.lookup_impl_witness.b03c54.1, element0 [symbolic = %impl.elem0.loc9_42.4 (constants.%impl.elem0.14e5d2.1)] -// CHECK:STDOUT: %rewrite.loc9_45.2 = requirement_rewrite %impl.elem0.loc9_42.2, %.loc9_48.2 [concrete] -// CHECK:STDOUT: %.loc9_36.2: type = where_expr [symbolic = %A_where.type (constants.%A_where.type.ce6fa0.1)] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc9_34.1 [concrete] -// CHECK:STDOUT: %rewrite.loc9_45.2 = requirement_rewrite %impl.elem0.loc9_42.2, %.loc9_48.2 [concrete] +// CHECK:STDOUT: %.loc9_40.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)] +// CHECK:STDOUT: %.loc9_40.2: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = specific_constant @X.%assoc0, @A.WithSelf(constants.%AA, constants.%.Self.frozen.14f) [symbolic = %assoc0 (constants.%assoc0)] +// CHECK:STDOUT: %X.ref: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = name_ref X, %.loc9_40.2 [symbolic = %assoc0 (constants.%assoc0)] +// CHECK:STDOUT: %impl.elem0.loc9_40.1: type = impl_witness_access constants.%A.lookup_impl_witness.8d4, element0 [symbolic = %impl.elem0.loc9_40.3 (constants.%impl.elem0.796)] +// CHECK:STDOUT: %.loc9_46.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_46.2: type = converted %.loc9_46.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %rewrite.loc9_43.1 = requirement_rewrite %impl.elem0.loc9_40.1, %.loc9_46.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc9_40.2: type = impl_witness_access constants.%A.lookup_impl_witness.b03c54.1, element0 [symbolic = %impl.elem0.loc9_40.4 (constants.%impl.elem0.14e5d2.1)] +// CHECK:STDOUT: %rewrite.loc9_43.2 = requirement_rewrite %impl.elem0.loc9_40.2, %.loc9_46.2 [concrete] +// CHECK:STDOUT: %.loc9_34.2: type = where_expr [symbolic = %A_where.type (constants.%A_where.type.ce6fa0.1)] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc9_32.1 [concrete] +// CHECK:STDOUT: %rewrite.loc9_43.2 = requirement_rewrite %impl.elem0.loc9_40.2, %.loc9_46.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %BB.loc9_27.1: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1) = symbolic_binding BB, 1 [symbolic = %BB.loc9_27.2 (constants.%BB.6ca)] +// CHECK:STDOUT: %BB.loc9_26.1: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1) = symbolic_binding BB, 1 [symbolic = %BB.loc9_26.2 (constants.%BB.6ca)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @BB.as_type.as.B.impl(%AA.loc9_16.1: type, %BB.loc9_27.1: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1)) { +// CHECK:STDOUT: generic impl @BB.as_type.as.B.impl(%AA.loc9_16.1: type, %BB.loc9_26.1: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1)) { // CHECK:STDOUT: %AA.patt.loc9_16.2: %pattern_type.98f = symbolic_binding_pattern AA, 0 [symbolic = %AA.patt.loc9_16.2 (constants.%AA.patt)] // CHECK:STDOUT: %AA.loc9_16.2: type = symbolic_binding AA, 0 [symbolic = %AA.loc9_16.2 (constants.%AA)] -// CHECK:STDOUT: %A.type.loc9_34.2: type = facet_type <@A, @A(%AA.loc9_16.2)> [symbolic = %A.type.loc9_34.2 (constants.%A.type.acd3aa.1)] -// CHECK:STDOUT: %.Self.frozen.loc9_36.2: @BB.as_type.as.B.impl.%A.type.loc9_34.2 (%A.type.acd3aa.1) = symbolic_binding .Self [symbolic = %.Self.frozen.loc9_36.2 (constants.%.Self.frozen.14f)] -// CHECK:STDOUT: %require_complete.loc9_42: = require_complete_type %A.type.loc9_34.2 [symbolic = %require_complete.loc9_42 (constants.%require_complete.21f)] -// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc9_36.2 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)] +// CHECK:STDOUT: %A.type.loc9_32.2: type = facet_type <@A, @A(%AA.loc9_16.2)> [symbolic = %A.type.loc9_32.2 (constants.%A.type.acd3aa.1)] +// CHECK:STDOUT: %.Self.frozen.loc9_34.2: @BB.as_type.as.B.impl.%A.type.loc9_32.2 (%A.type.acd3aa.1) = symbolic_binding .Self [symbolic = %.Self.frozen.loc9_34.2 (constants.%.Self.frozen.14f)] +// CHECK:STDOUT: %require_complete.loc9_40: = require_complete_type %A.type.loc9_32.2 [symbolic = %require_complete.loc9_40 (constants.%require_complete.21f)] +// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc9_34.2 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A, @A(%AA.loc9_16.2) [symbolic = %A.assoc_type (constants.%A.assoc_type)] // CHECK:STDOUT: %assoc0: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = assoc_entity element0, @A.WithSelf.%X [symbolic = %assoc0 (constants.%assoc0)] -// CHECK:STDOUT: %A.lookup_impl_witness.loc9_42.1: = lookup_impl_witness %.Self.frozen.loc9_36.2, @A, @A(%AA.loc9_16.2) [symbolic = %A.lookup_impl_witness.loc9_42.1 (constants.%A.lookup_impl_witness.8d4)] -// CHECK:STDOUT: %impl.elem0.loc9_42.3: type = impl_witness_access %A.lookup_impl_witness.loc9_42.1, element0 [symbolic = %impl.elem0.loc9_42.3 (constants.%impl.elem0.796)] -// CHECK:STDOUT: %.Self: @BB.as_type.as.B.impl.%A.type.loc9_34.2 (%A.type.acd3aa.1) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.a16688.1)] -// CHECK:STDOUT: %A.lookup_impl_witness.loc9_42.2: = lookup_impl_witness %.Self, @A, @A(%AA.loc9_16.2) [symbolic = %A.lookup_impl_witness.loc9_42.2 (constants.%A.lookup_impl_witness.b03c54.1)] -// CHECK:STDOUT: %impl.elem0.loc9_42.4: type = impl_witness_access %A.lookup_impl_witness.loc9_42.2, element0 [symbolic = %impl.elem0.loc9_42.4 (constants.%impl.elem0.14e5d2.1)] -// CHECK:STDOUT: %A_where.type: type = facet_type <@A, @A(%AA.loc9_16.2) where %impl.elem0.loc9_42.4 = constants.%empty_tuple.type> [symbolic = %A_where.type (constants.%A_where.type.ce6fa0.1)] +// CHECK:STDOUT: %A.lookup_impl_witness.loc9_40.1: = lookup_impl_witness %.Self.frozen.loc9_34.2, @A, @A(%AA.loc9_16.2) [symbolic = %A.lookup_impl_witness.loc9_40.1 (constants.%A.lookup_impl_witness.8d4)] +// CHECK:STDOUT: %impl.elem0.loc9_40.3: type = impl_witness_access %A.lookup_impl_witness.loc9_40.1, element0 [symbolic = %impl.elem0.loc9_40.3 (constants.%impl.elem0.796)] +// CHECK:STDOUT: %.Self: @BB.as_type.as.B.impl.%A.type.loc9_32.2 (%A.type.acd3aa.1) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.a16688.1)] +// CHECK:STDOUT: %A.lookup_impl_witness.loc9_40.2: = lookup_impl_witness %.Self, @A, @A(%AA.loc9_16.2) [symbolic = %A.lookup_impl_witness.loc9_40.2 (constants.%A.lookup_impl_witness.b03c54.1)] +// CHECK:STDOUT: %impl.elem0.loc9_40.4: type = impl_witness_access %A.lookup_impl_witness.loc9_40.2, element0 [symbolic = %impl.elem0.loc9_40.4 (constants.%impl.elem0.14e5d2.1)] +// CHECK:STDOUT: %A_where.type: type = facet_type <@A, @A(%AA.loc9_16.2) where %impl.elem0.loc9_40.4 = constants.%empty_tuple.type> [symbolic = %A_where.type (constants.%A_where.type.ce6fa0.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %A_where.type [symbolic = %pattern_type (constants.%pattern_type.98d)] -// CHECK:STDOUT: %BB.patt.loc9_27.2: @BB.as_type.as.B.impl.%pattern_type (%pattern_type.98d) = symbolic_binding_pattern BB, 1 [symbolic = %BB.patt.loc9_27.2 (constants.%BB.patt.aea)] -// CHECK:STDOUT: %BB.loc9_27.2: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1) = symbolic_binding BB, 1 [symbolic = %BB.loc9_27.2 (constants.%BB.6ca)] -// CHECK:STDOUT: %BB.as_type.loc9_51.2: type = facet_access_type %BB.loc9_27.2 [symbolic = %BB.as_type.loc9_51.2 (constants.%BB.as_type)] -// CHECK:STDOUT: %ptr.loc9_61.2: type = ptr_type %AA.loc9_16.2 [symbolic = %ptr.loc9_61.2 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %B.type.loc9_62.2: type = facet_type <@B, @B(%ptr.loc9_61.2)> [symbolic = %B.type.loc9_62.2 (constants.%B.type.4a0be4.1)] -// CHECK:STDOUT: %B.impl_witness.loc9_64.2: = impl_witness %B.impl_witness_table, @BB.as_type.as.B.impl(%AA.loc9_16.2, %BB.loc9_27.2) [symbolic = %B.impl_witness.loc9_64.2 (constants.%B.impl_witness.8cc)] +// CHECK:STDOUT: %BB.patt.loc9_26.2: @BB.as_type.as.B.impl.%pattern_type (%pattern_type.98d) = symbolic_binding_pattern BB, 1 [symbolic = %BB.patt.loc9_26.2 (constants.%BB.patt.aea)] +// CHECK:STDOUT: %BB.loc9_26.2: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1) = symbolic_binding BB, 1 [symbolic = %BB.loc9_26.2 (constants.%BB.6ca)] +// CHECK:STDOUT: %BB.as_type.loc9_49.2: type = facet_access_type %BB.loc9_26.2 [symbolic = %BB.as_type.loc9_49.2 (constants.%BB.as_type)] +// CHECK:STDOUT: %ptr.loc9_59.2: type = ptr_type %AA.loc9_16.2 [symbolic = %ptr.loc9_59.2 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %B.type.loc9_60.2: type = facet_type <@B, @B(%ptr.loc9_59.2)> [symbolic = %B.type.loc9_60.2 (constants.%B.type.4a0be4.1)] +// CHECK:STDOUT: %B.impl_witness.loc9_62.2: = impl_witness %B.impl_witness_table, @BB.as_type.as.B.impl(%AA.loc9_16.2, %BB.loc9_26.2) [symbolic = %B.impl_witness.loc9_62.2 (constants.%B.impl_witness.8cc)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc9_62: = require_complete_type %B.type.loc9_62.2 [symbolic = %require_complete.loc9_62 (constants.%require_complete.a5dc9d.1)] +// CHECK:STDOUT: %require_complete.loc9_60: = require_complete_type %B.type.loc9_60.2 [symbolic = %require_complete.loc9_60 (constants.%require_complete.a5dc9d.1)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc9_51 as %B.type.loc9_62.1 { +// CHECK:STDOUT: impl: %.loc9_49 as %B.type.loc9_60.1 { // CHECK:STDOUT: %B.impl_witness_table = impl_witness_table (), @BB.as_type.as.B.impl [concrete] -// CHECK:STDOUT: %B.impl_witness.loc9_64.1: = impl_witness %B.impl_witness_table, @BB.as_type.as.B.impl(constants.%AA, constants.%BB.6ca) [symbolic = %B.impl_witness.loc9_64.2 (constants.%B.impl_witness.8cc)] +// CHECK:STDOUT: %B.impl_witness.loc9_62.1: = impl_witness %B.impl_witness_table, @BB.as_type.as.B.impl(constants.%AA, constants.%BB.6ca) [symbolic = %B.impl_witness.loc9_62.2 (constants.%B.impl_witness.8cc)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %B.type.loc9_62.1 -// CHECK:STDOUT: witness = %B.impl_witness.loc9_64.1 +// CHECK:STDOUT: extend %B.type.loc9_60.1 +// CHECK:STDOUT: witness = %B.impl_witness.loc9_62.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -477,20 +477,20 @@ fn H(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @D.G(@D.%DD.loc14_11.2: type, %T.loc15_9.2: type) { +// CHECK:STDOUT: generic fn @D.G(@D.%DD.loc14_11.2: type, %T.loc15_17.2: type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %DD: type = symbolic_binding DD, 0 [symbolic = %DD (constants.%DD)] // CHECK:STDOUT: %ptr.loc21_14.2: type = ptr_type %DD [symbolic = %ptr.loc21_14.2 (constants.%ptr.e8f8f9.2)] // CHECK:STDOUT: %B.type.loc21_15.2: type = facet_type <@B, @B(%ptr.loc21_14.2)> [symbolic = %B.type.loc21_15.2 (constants.%B.type.4a0be4.2)] -// CHECK:STDOUT: %.loc21_7.2: require_specific_def_type = require_specific_def @BB.as.B.impl(%ptr.loc21_14.2, %T.loc15_9.1) [symbolic = %.loc21_7.2 (constants.%.800)] -// CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T.loc15_9.1, @B, @B(%ptr.loc21_14.2) [symbolic = %B.lookup_impl_witness (constants.%B.lookup_impl_witness.fc3)] -// CHECK:STDOUT: %B.facet.loc21_7.2: @D.G.%B.type.loc21_15.2 (%B.type.4a0be4.2) = facet_value %T.loc15_9.1, (%B.lookup_impl_witness) [symbolic = %B.facet.loc21_7.2 (constants.%B.facet.f68)] +// CHECK:STDOUT: %.loc21_7.2: require_specific_def_type = require_specific_def @BB.as.B.impl(%ptr.loc21_14.2, %T.loc15_17.1) [symbolic = %.loc21_7.2 (constants.%.800)] +// CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T.loc15_17.1, @B, @B(%ptr.loc21_14.2) [symbolic = %B.lookup_impl_witness (constants.%B.lookup_impl_witness.fc3)] +// CHECK:STDOUT: %B.facet.loc21_7.2: @D.G.%B.type.loc21_15.2 (%B.type.4a0be4.2) = facet_value %T.loc15_17.1, (%B.lookup_impl_witness) [symbolic = %B.facet.loc21_7.2 (constants.%B.facet.f68)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_9.2 [symbolic = %T.loc15_9.1 (constants.%T.091)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_17.2 [symbolic = %T.loc15_17.1 (constants.%T.091)] // CHECK:STDOUT: %B.ref: %B.type.d1b = name_ref B, file.%B.decl [concrete = constants.%B.generic] // CHECK:STDOUT: %DD.ref: type = name_ref DD, @D.%DD.loc14_11.2 [symbolic = %DD (constants.%DD)] // CHECK:STDOUT: %ptr.loc21_14.1: type = ptr_type %DD.ref [symbolic = %ptr.loc21_14.2 (constants.%ptr.e8f8f9.2)] @@ -506,25 +506,25 @@ fn H(T:! type) { // CHECK:STDOUT: specific @BB.as_type.as.B.impl(constants.%AA, constants.%BB.6ca) { // CHECK:STDOUT: %AA.patt.loc9_16.2 => constants.%AA.patt // CHECK:STDOUT: %AA.loc9_16.2 => constants.%AA -// CHECK:STDOUT: %A.type.loc9_34.2 => constants.%A.type.acd3aa.1 -// CHECK:STDOUT: %.Self.frozen.loc9_36.2 => constants.%.Self.frozen.14f -// CHECK:STDOUT: %require_complete.loc9_42 => constants.%require_complete.21f +// CHECK:STDOUT: %A.type.loc9_32.2 => constants.%A.type.acd3aa.1 +// CHECK:STDOUT: %.Self.frozen.loc9_34.2 => constants.%.Self.frozen.14f +// CHECK:STDOUT: %require_complete.loc9_40 => constants.%require_complete.21f // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type // CHECK:STDOUT: %assoc0 => constants.%assoc0 -// CHECK:STDOUT: %A.lookup_impl_witness.loc9_42.1 => constants.%A.lookup_impl_witness.8d4 -// CHECK:STDOUT: %impl.elem0.loc9_42.3 => constants.%impl.elem0.796 +// CHECK:STDOUT: %A.lookup_impl_witness.loc9_40.1 => constants.%A.lookup_impl_witness.8d4 +// CHECK:STDOUT: %impl.elem0.loc9_40.3 => constants.%impl.elem0.796 // CHECK:STDOUT: %.Self => constants.%.Self.a16688.1 -// CHECK:STDOUT: %A.lookup_impl_witness.loc9_42.2 => constants.%A.lookup_impl_witness.b03c54.1 -// CHECK:STDOUT: %impl.elem0.loc9_42.4 => constants.%impl.elem0.14e5d2.1 +// CHECK:STDOUT: %A.lookup_impl_witness.loc9_40.2 => constants.%A.lookup_impl_witness.b03c54.1 +// CHECK:STDOUT: %impl.elem0.loc9_40.4 => constants.%impl.elem0.14e5d2.1 // CHECK:STDOUT: %A_where.type => constants.%A_where.type.ce6fa0.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98d -// CHECK:STDOUT: %BB.patt.loc9_27.2 => constants.%BB.patt.aea -// CHECK:STDOUT: %BB.loc9_27.2 => constants.%BB.6ca -// CHECK:STDOUT: %BB.as_type.loc9_51.2 => constants.%BB.as_type -// CHECK:STDOUT: %ptr.loc9_61.2 => constants.%ptr.e8f8f9.1 -// CHECK:STDOUT: %B.type.loc9_62.2 => constants.%B.type.4a0be4.1 -// CHECK:STDOUT: %B.impl_witness.loc9_64.2 => constants.%B.impl_witness.8cc +// CHECK:STDOUT: %BB.patt.loc9_26.2 => constants.%BB.patt.aea +// CHECK:STDOUT: %BB.loc9_26.2 => constants.%BB.6ca +// CHECK:STDOUT: %BB.as_type.loc9_49.2 => constants.%BB.as_type +// CHECK:STDOUT: %ptr.loc9_59.2 => constants.%ptr.e8f8f9.1 +// CHECK:STDOUT: %B.type.loc9_60.2 => constants.%B.type.4a0be4.1 +// CHECK:STDOUT: %B.impl_witness.loc9_62.2 => constants.%B.impl_witness.8cc // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D(constants.%DD) { @@ -537,8 +537,8 @@ fn H(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D.G(constants.%DD, constants.%T.091) { -// CHECK:STDOUT: %T.patt.loc15_9.2 => constants.%T.patt.014 -// CHECK:STDOUT: %T.loc15_9.1 => constants.%T.091 +// CHECK:STDOUT: %T.patt.loc15_17.2 => constants.%T.patt.014 +// CHECK:STDOUT: %T.loc15_17.1 => constants.%T.091 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D(constants.%empty_struct_type) { @@ -551,8 +551,8 @@ fn H(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D.G(constants.%empty_struct_type, constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc15_9.2 => constants.%T.patt.014 -// CHECK:STDOUT: %T.loc15_9.1 => constants.%T.67d +// CHECK:STDOUT: %T.patt.loc15_17.2 => constants.%T.patt.014 +// CHECK:STDOUT: %T.loc15_17.1 => constants.%T.67d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %DD => constants.%empty_struct_type diff --git a/toolchain/check/testdata/generic/extend_type_completion.carbon b/toolchain/check/testdata/generic/extend_type_completion.carbon index 9daa70033d9a..f0661e9766a9 100644 --- a/toolchain/check/testdata/generic/extend_type_completion.carbon +++ b/toolchain/check/testdata/generic/extend_type_completion.carbon @@ -13,9 +13,9 @@ // --- class_impl_doesnt_need_complete_interface.carbon library "[[@TEST_NAME]]"; -interface K(T:! type) {} +interface K(T: type) {} -class C(N:! i32) { +class C(N: i32) { impl as K(array(i32, N)) {} } @@ -25,9 +25,9 @@ fn F(unused v: C(-1)) {} // --- fail_class_extend_impl_does_need_complete_interface.carbon library "[[@TEST_NAME]]"; -interface K(T:! type) {} +interface K(T: type) {} -class C(N:! i32) { +class C(N: i32) { extend impl as K(array(i32, N)) {} } @@ -44,8 +44,8 @@ fn F(unused v: C(-1)) {} // --- interface_require_impls_doesnt_need_complete_interface.carbon library "[[@TEST_NAME]]"; -interface K(T:! type) {} -interface J(N:! i32) { +interface K(T: type) {} +interface J(N: i32) { require impls K(array(i32, N)); } @@ -55,11 +55,11 @@ fn F(unused v: J(-1)) {} // --- fail_interface_extend_require_impls_does_need_complete_interface.carbon library "[[@TEST_NAME]]"; -interface K(T:! type) {} -interface J(N:! i32) { +interface K(T: type) {} +interface J(N: i32) { extend require impls K(array(i32, N)); } -interface I(N:! i32) { +interface I(N: i32) { extend require impls J(N); } @@ -84,8 +84,8 @@ fn F(unused v: I(-1)) {} // --- constraint_require_impls_doesnt_need_complete_interface.carbon library "[[@TEST_NAME]]"; -interface K(T:! type) {} -constraint J(N:! i32) { +interface K(T: type) {} +constraint J(N: i32) { require impls K(array(i32, N)); } @@ -95,11 +95,11 @@ fn F(unused v: J(-1)) {} // --- fail_constraint_extend_require_impls_does_need_complete_interface.carbon library "[[@TEST_NAME]]"; -interface K(T:! type) {} -constraint J(N:! i32) { +interface K(T: type) {} +constraint J(N: i32) { extend require impls K(array(i32, N)); } -constraint I(N:! i32) { +constraint I(N: i32) { extend require impls J(N); } @@ -120,7 +120,7 @@ fn F(unused v: I(-1)) {} library "[[@TEST_NAME]]"; interface K {} -interface J(N:! i32) { +interface J(N: i32) { require array(Self, N) impls K; } @@ -131,7 +131,7 @@ fn F(unused v: J(-1)) {} library "[[@TEST_NAME]]"; interface K {} -constraint J(N:! i32) { +constraint J(N: i32) { require array(Self, N) impls K; } diff --git a/toolchain/check/testdata/generic/fail_generic_copy.carbon b/toolchain/check/testdata/generic/fail_generic_copy.carbon index b4ccdacf74ad..c74cfd48a8fb 100644 --- a/toolchain/check/testdata/generic/fail_generic_copy.carbon +++ b/toolchain/check/testdata/generic/fail_generic_copy.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; -fn F[T:! type](x: T) -> T { +fn F[T: type](x: T) -> T { // CHECK:STDERR: fail_return.carbon:[[@LINE+7]]:10: error: cannot copy value of type `T` [CopyOfUncopyableType] // CHECK:STDERR: return x; // CHECK:STDERR: ^ @@ -29,7 +29,7 @@ fn F[T:! type](x: T) -> T { library "[[@TEST_NAME]]"; -fn F[T:! Core.Destroy](x: T) { +fn F[T: Core.Destroy](x: T) { // CHECK:STDERR: fail_var.carbon:[[@LINE+7]]:21: error: cannot copy value of type `T` [CopyOfUncopyableType] // CHECK:STDERR: var unused y: T = x; // CHECK:STDERR: ^ diff --git a/toolchain/check/testdata/generic/forward_decl.carbon b/toolchain/check/testdata/generic/forward_decl.carbon index 10435fa47c48..d6b396c1099a 100644 --- a/toolchain/check/testdata/generic/forward_decl.carbon +++ b/toolchain/check/testdata/generic/forward_decl.carbon @@ -15,10 +15,10 @@ interface Z {} class C {} impl C as Z {} -fn G[T:! Z](p: T); +fn G[T: Z](p: T); fn F() { G({} as C); } -fn G[T:! Z](unused p: T) {} +fn G[T: Z](unused p: T) {} diff --git a/toolchain/check/testdata/generic/identify_specific_facet_type.carbon b/toolchain/check/testdata/generic/identify_specific_facet_type.carbon index c0165bdbb633..bc13b14df701 100644 --- a/toolchain/check/testdata/generic/identify_specific_facet_type.carbon +++ b/toolchain/check/testdata/generic/identify_specific_facet_type.carbon @@ -16,11 +16,11 @@ library "[[@TEST_NAME]]"; // Identification tries to form the specific interface `K(array(i32, -1))` which // is invalid, so the impl as a whole is invalid. -interface K(T:! type) {} -constraint L(N:! i32) { +interface K(T: type) {} +constraint L(N: i32) { require impls K(array(i32, N)); } -constraint J(N:! i32) { +constraint J(N: i32) { require impls L(N); } @@ -39,8 +39,8 @@ library "[[@TEST_NAME]]"; // Identification tries to form the specific interface `K(array(i32, -1))` which // is invalid, so the impl as a whole is invalid. -interface K(T:! type) {} -constraint J(N:! i32) { +interface K(T: type) {} +constraint J(N: i32) { extend require impls K(array(i32, N)); } @@ -57,12 +57,12 @@ impl {} as J(-1) {} library "[[@TEST_NAME]]"; interface Y {} -interface CanFailToMonomorphize(N:! Core.IntLiteral) { - let Z1:! array((), N); - let Z2:! type; +interface CanFailToMonomorphize(N: Core.IntLiteral) { + let Z1: array((), N); + let Z2: type; } -constraint S(N:! Core.IntLiteral) { +constraint S(N: Core.IntLiteral) { extend require impls CanFailToMonomorphize(N); } @@ -75,21 +75,21 @@ constraint S(N:! Core.IntLiteral) { // gets to the `.Z2` and attempts `SubstPeriodSelf()` before failing. Without // the named constraint indirection, we'd just fail to build a specific for // `CanFailToMonomorphize(N)` and fail without attempting `SubstPeriodSelf()`. -fn F(N:! Core.IntLiteral, _:! S(N) where .Z2 impls Y) {} +fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z2 impls Y) {} -fn G(T:! Y) { +fn G(generic T: Y) { // CHECK:STDERR: fail_monomorphization_during_period_self_substitution.carbon:[[@LINE+13]]:3: error: facet type `S(-1) where .(CanFailToMonomorphize(-1).Z2) impls Y` can not be identified [ImplLookupInUnidentifiedFacetType] // CHECK:STDERR: F(-1, T); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_monomorphization_during_period_self_substitution.carbon:[[@LINE-18]]:24: note: `CanFailToMonomorphize(N)` evaluates to incomplete type `CanFailToMonomorphize(-1)` [IncompleteTypeInMonomorphization] // CHECK:STDERR: extend require impls CanFailToMonomorphize(N); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_monomorphization_during_period_self_substitution.carbon:[[@LINE-26]]:22: note: array bound of -1 is negative [ArrayBoundNegative] - // CHECK:STDERR: let Z1:! array((), N); - // CHECK:STDERR: ^ + // CHECK:STDERR: fail_monomorphization_during_period_self_substitution.carbon:[[@LINE-26]]:21: note: array bound of -1 is negative [ArrayBoundNegative] + // CHECK:STDERR: let Z1: array((), N); + // CHECK:STDERR: ^ // CHECK:STDERR: fail_monomorphization_during_period_self_substitution.carbon:[[@LINE-12]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F(N:! Core.IntLiteral, _:! S(N) where .Z2 impls Y) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z2 impls Y) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(-1, T); }; @@ -99,16 +99,16 @@ library "[[@TEST_NAME]]"; interface Y {} interface Z { - let Z1:! type; + let Z1: type; } -constraint S(N:! Core.IntLiteral) { +constraint S(N: Core.IntLiteral) { extend require impls Z where .Z1 = array((), N); } -fn F(N:! Core.IntLiteral, _:! S(N)) {} +fn F(generic N: Core.IntLiteral, generic _: S(N)) {} -fn G(T:! Z) { +fn G(generic T: Z) { // CHECK:STDERR: fail_monomorphization_identify_in_call.carbon:[[@LINE+10]]:3: error: facet type `S(-1)` can not be identified [ImplLookupInUnidentifiedFacetType] // CHECK:STDERR: F(-1, T); // CHECK:STDERR: ^~~~~~~~ @@ -116,8 +116,8 @@ fn G(T:! Z) { // CHECK:STDERR: extend require impls Z where .Z1 = array((), N); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_monomorphization_identify_in_call.carbon:[[@LINE-9]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F(N:! Core.IntLiteral, _:! S(N)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(-1, T); }; @@ -127,25 +127,25 @@ library "[[@TEST_NAME]]"; interface Y {} interface Z { - let Z1:! type; + let Z1: type; } -constraint S(N:! Core.IntLiteral) { +constraint S(N: Core.IntLiteral) { extend require impls Z; } -fn F(N:! Core.IntLiteral, _:! S(N) where .Z1 = array((), N)) {} +fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z1 = array((), N)) {} -fn G(T:! Z) { +fn G(generic T: Z) { // CHECK:STDERR: fail_monomorphization_during_deduction_in_call.carbon:[[@LINE+10]]:3: error: constructed invalid specific for `S(N) where .(Z.Z1) = array((), N)` from argument [SubstitutingGenericParamType] // CHECK:STDERR: F(-1, T); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_monomorphization_during_deduction_in_call.carbon:[[@LINE-6]]:27: note: array bound of -1 is negative [ArrayBoundNegative] - // CHECK:STDERR: fn F(N:! Core.IntLiteral, _:! S(N) where .Z1 = array((), N)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_monomorphization_during_deduction_in_call.carbon:[[@LINE-6]]:42: note: array bound of -1 is negative [ArrayBoundNegative] + // CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z1 = array((), N)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_monomorphization_during_deduction_in_call.carbon:[[@LINE-9]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn F(N:! Core.IntLiteral, _:! S(N) where .Z1 = array((), N)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z1 = array((), N)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F(-1, T); }; diff --git a/toolchain/check/testdata/generic/local.carbon b/toolchain/check/testdata/generic/local.carbon index 8dbb7b7ebed3..5093780f066d 100644 --- a/toolchain/check/testdata/generic/local.carbon +++ b/toolchain/check/testdata/generic/local.carbon @@ -17,7 +17,7 @@ library "[[@TEST_NAME]]"; fn F() { - class C(T:! type) { + class C(T: type) { var x: T; } var unused v: C(i32) = {.x = 1}; @@ -30,13 +30,13 @@ library "[[@TEST_NAME]]"; fn F() { // TODO: Decide on what behavior we want here. We don't reject the corresponding case outside of a function. // CHECK:STDERR: fail_param_shadows_class.carbon:[[@LINE+7]]:9: error: duplicate name `C` being declared in the same scope [NameDeclDuplicate] - // CHECK:STDERR: class C(C:! type) { + // CHECK:STDERR: class C(C: type) { // CHECK:STDERR: ^ // CHECK:STDERR: fail_param_shadows_class.carbon:[[@LINE+4]]:11: note: name is previously declared here [NameDeclPrevious] - // CHECK:STDERR: class C(C:! type) { - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: class C(C: type) { + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - class C(C:! type) { + class C(C: type) { } } @@ -44,7 +44,7 @@ fn F() { library "[[@TEST_NAME]]"; -class C(C:! type) { +class C(C: type) { } // CHECK:STDOUT: --- class.carbon @@ -161,9 +161,9 @@ class C(C:! type) { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc5_12.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_12.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_15.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_14.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_12.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_12.1 (constants.%T)] // CHECK:STDOUT: } @@ -293,9 +293,9 @@ class C(C:! type) { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %C.patt.loc13_12.1: %pattern_type = symbolic_binding_pattern C, 0 [symbolic = %C.patt.loc13_12.2 (constants.%C.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: type = splice_block %.loc13_15.2 [concrete = type] { +// CHECK:STDOUT: %.loc13_14.1: type = splice_block %.loc13_14.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_15.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc13_14.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %C.loc13_12.2: type = symbolic_binding C, 0 [symbolic = %C.loc13_12.1 (constants.%C.67d)] // CHECK:STDOUT: } @@ -340,9 +340,9 @@ class C(C:! type) { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %C.patt.loc4_10.1: %pattern_type = symbolic_binding_pattern C, 0 [symbolic = %C.patt.loc4_10.2 (constants.%C.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_13.1: type = splice_block %.loc4_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_12.1: type = splice_block %.loc4_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %C.loc4_10.2: type = symbolic_binding C, 0 [symbolic = %C.loc4_10.1 (constants.%C.67d)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/generic/local_function.carbon b/toolchain/check/testdata/generic/local_function.carbon index ffa7b1af57f5..11449fc3d3ca 100644 --- a/toolchain/check/testdata/generic/local_function.carbon +++ b/toolchain/check/testdata/generic/local_function.carbon @@ -12,7 +12,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/generic/local_function.carbon -fn Test[unused T:! type]() { +fn Test[unused T: type]() { fn Local() { } Local(); @@ -50,9 +50,9 @@ fn Test[unused T:! type]() { // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [concrete = constants.%Test] { // CHECK:STDOUT: %T.patt.loc15_17.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_17.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_20.1: type = splice_block %.loc15_20.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_19.1: type = splice_block %.loc15_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_17.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_17.1 (constants.%T)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/generic/template/convert.carbon b/toolchain/check/testdata/generic/template/convert.carbon index 0121ea7b2341..b705b25f11a2 100644 --- a/toolchain/check/testdata/generic/template/convert.carbon +++ b/toolchain/check/testdata/generic/template/convert.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -fn F[template T:! type](x: T) -> i32 { +fn F[template T: type](x: T) -> i32 { let n: i32 = x; return n; } @@ -40,7 +40,7 @@ fn Test2(c: C) -> i32 { library "[[@TEST_NAME]]"; -fn F[template T:! type](x: T) -> i32 { +fn F[template T: type](x: T) -> i32 { let n: i32 = x; return n; } @@ -174,16 +174,16 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)] -// CHECK:STDOUT: %x.param_patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_26.1 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %x.param_patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_25.1 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc4 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { // CHECK:STDOUT: %i32.loc4: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc4_34: Core.Form = init_form %i32.loc4 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_33: Core.Form = init_form %i32.loc4 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %x.param: @F.%T.loc4_16.1 (%T.67db0b.1) = value_param call_param0 @@ -268,8 +268,8 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %T.patt.loc4_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)] // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)] -// CHECK:STDOUT: %x.param_patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_26.2 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %x.param_patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_25.2 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_16.1 [template = %require_complete (constants.%require_complete.944)] @@ -340,16 +340,16 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc4_16.1 => constants.%T.67db0b.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.1 -// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.91d -// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.800 +// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.91d +// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.800 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%i32) { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc4_16.1 => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6 -// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.cee -// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.fbe +// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.cee +// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.fbe // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a @@ -361,8 +361,8 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc4_16.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b -// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.0f9 -// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.2cc +// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.0f9 +// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.2cc // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.cdf @@ -452,16 +452,16 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)] -// CHECK:STDOUT: %x.param_patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_26.1 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %x.param_patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_25.1 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc4 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { // CHECK:STDOUT: %i32.loc4: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc4_34: Core.Form = init_form %i32.loc4 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_33: Core.Form = init_form %i32.loc4 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %x.param: @F.%T.loc4_16.1 (%T.67db0b.1) = value_param call_param0 @@ -499,8 +499,8 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %T.patt.loc4_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)] // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)] -// CHECK:STDOUT: %x.param_patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_26.2 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %x.param_patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_25.2 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_16.1 [template = %require_complete (constants.%require_complete.944)] @@ -544,16 +544,16 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc4_16.1 => constants.%T.67db0b.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.1 -// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.91d -// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.800 +// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.91d +// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.800 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%D) { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc4_16.1 => constants.%D // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d8d -// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.23b -// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.75f +// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.23b +// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.75f // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.357 diff --git a/toolchain/check/testdata/generic/template/fail_todo_template_access_assoc_const.carbon b/toolchain/check/testdata/generic/template/fail_todo_template_access_assoc_const.carbon index 2d10287fcf9b..44bb2ec3bb7a 100644 --- a/toolchain/check/testdata/generic/template/fail_todo_template_access_assoc_const.carbon +++ b/toolchain/check/testdata/generic/template/fail_todo_template_access_assoc_const.carbon @@ -15,10 +15,10 @@ library "[[@TEST_NAME]]"; // TODO: This should check. The `T.I1` access should be deferred until we know // the value of the `template T`. // -// CHECK:STDERR: fail_todo_template_access_assoc_const.carbon:[[@LINE+4]]:36: error: cannot evaluate type expression [TypeExprEvaluationFailure] -// CHECK:STDERR: interface I(template T:! type, N:! T.I1) { -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: fail_todo_template_access_assoc_const.carbon:[[@LINE+4]]:34: error: cannot evaluate type expression [TypeExprEvaluationFailure] +// CHECK:STDERR: interface I(template T: type, N: T.I1) { +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -interface I(template T:! type, N:! T.I1) { - let I1:! type; +interface I(template T: type, N: T.I1) { + let I1: type; } diff --git a/toolchain/check/testdata/generic/template/member_access.carbon b/toolchain/check/testdata/generic/template/member_access.carbon index 9c650ad6c1d9..c14fbddf1037 100644 --- a/toolchain/check/testdata/generic/template/member_access.carbon +++ b/toolchain/check/testdata/generic/template/member_access.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -fn F[template T:! type](x: T) -> i32 { +fn F[template T: type](x: T) -> i32 { let n: i32 = x.n; return n; } @@ -37,7 +37,7 @@ fn Test2(x: {.m: i32, .n: i32}) { library "[[@TEST_NAME]]"; -fn F[template T:! type](x: T) -> i32 { +fn F[template T: type](x: T) -> i32 { let n: i32 = x.n; return n; } @@ -61,7 +61,7 @@ fn Test(d: D) { library "[[@TEST_NAME]]"; -fn F[template T:! type](x: T) -> i32 { +fn F[template T: type](x: T) -> i32 { let n: i32 = x.n; return n; } @@ -187,16 +187,16 @@ fn Test(e: E) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)] -// CHECK:STDOUT: %x.param_patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_26.1 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %x.param_patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_25.1 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc4 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { // CHECK:STDOUT: %i32.loc4: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc4_34: Core.Form = init_form %i32.loc4 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_33: Core.Form = init_form %i32.loc4 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %x.param: @F.%T.loc4_16.1 (%T.67db0b.1) = value_param call_param0 @@ -242,8 +242,8 @@ fn Test(e: E) { // CHECK:STDOUT: %T.patt.loc4_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)] // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_16.1 [template = %pattern_type (constants.%pattern_type.51d)] -// CHECK:STDOUT: %x.param_patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_26.2 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %x.param_patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_25.2 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_16.1 [template = %require_complete (constants.%require_complete.944)] @@ -301,16 +301,16 @@ fn Test(e: E) { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc4_16.1 => constants.%T.67db0b.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.91d -// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.800 +// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.91d +// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.800 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc4_16.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b -// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.0f9 -// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.2cc +// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.0f9 +// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.2cc // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.cdf @@ -324,8 +324,8 @@ fn Test(e: E) { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc4_16.1 => constants.%struct_type.m.n // CHECK:STDOUT: %pattern_type => constants.%pattern_type.860 -// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.c8a -// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.14d +// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.c8a +// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.14d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.08f @@ -415,16 +415,16 @@ fn Test(e: E) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)] -// CHECK:STDOUT: %x.param_patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_26.1 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %x.param_patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_25.1 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc4 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { // CHECK:STDOUT: %i32.loc4: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc4_34: Core.Form = init_form %i32.loc4 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_33: Core.Form = init_form %i32.loc4 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %x.param: @F.%T.loc4_16.1 (%T.67db0b.1) = value_param call_param0 @@ -459,8 +459,8 @@ fn Test(e: E) { // CHECK:STDOUT: %T.patt.loc4_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)] // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_16.1 [template = %pattern_type (constants.%pattern_type.51d)] -// CHECK:STDOUT: %x.param_patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_26.2 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %x.param_patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_25.2 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_16.1 [template = %require_complete (constants.%require_complete.944)] @@ -507,16 +507,16 @@ fn Test(e: E) { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc4_16.1 => constants.%T.67db0b.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.91d -// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.800 +// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.91d +// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.800 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%D) { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc4_16.1 => constants.%D // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d8d -// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.23b -// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.75f +// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.23b +// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.75f // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.37d @@ -619,16 +619,16 @@ fn Test(e: E) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F.loc4 [concrete = constants.%F.708] { // CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)] -// CHECK:STDOUT: %x.param_patt.loc4_26.1: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc4_26.1: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_26.1 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %x.param_patt.loc4_25.1: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc4_25.1: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_25.1 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc4 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { // CHECK:STDOUT: %i32.loc4: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc4_34: Core.Form = init_form %i32.loc4 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_33: Core.Form = init_form %i32.loc4 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %x.param: @F.loc4.%T.loc4_16.1 (%T.67db0b.1) = value_param call_param0 @@ -672,8 +672,8 @@ fn Test(e: E) { // CHECK:STDOUT: %T.patt.loc4_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)] // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)] -// CHECK:STDOUT: %x.param_patt.loc4_26.2: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)] -// CHECK:STDOUT: %x.patt.loc4_26.2: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_26.2 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)] +// CHECK:STDOUT: %x.param_patt.loc4_25.2: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)] +// CHECK:STDOUT: %x.patt.loc4_25.2: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_25.2 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc4_16.1 [template = %require_complete (constants.%require_complete.944)] @@ -720,16 +720,16 @@ fn Test(e: E) { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc4_16.1 => constants.%T.67db0b.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.1 -// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.91d -// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.800 +// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.91d +// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.800 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.loc4(constants.%E) { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc4_16.1 => constants.%E // CHECK:STDOUT: %pattern_type => constants.%pattern_type.849 -// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.209 -// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.b95 +// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.209 +// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.b95 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.15a diff --git a/toolchain/check/testdata/generic/template/unimplemented.carbon b/toolchain/check/testdata/generic/template/unimplemented.carbon index 469c36f5031e..d5b7b5f974d3 100644 --- a/toolchain/check/testdata/generic/template/unimplemented.carbon +++ b/toolchain/check/testdata/generic/template/unimplemented.carbon @@ -18,7 +18,7 @@ library "[[@TEST_NAME]]"; // Check that we get a reasonable diagnostic for an unimplemented operation on a // template dependent expression. -fn F[template T:! type](x: T) -> i32 { +fn F[template T: type](x: T) -> i32 { // CHECK:STDERR: fail_todo_unimplemented_operator.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.MulWith(Core.IntLiteral)` in type `` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return x.n * 3; // CHECK:STDERR: ^~~~~~~ @@ -37,7 +37,7 @@ class C { // Check that we get a reasonable diagnostic for an unimplemented operation on a // template dependent value where the type is concrete but determined through // the template dependent value. -fn F(template c:! C) -> i32 { +fn F(template c: C) -> i32 { // CHECK:STDERR: fail_todo_unimplemented_value.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.MulWith(Core.IntLiteral)` in type `` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return c.n * 3; // CHECK:STDERR: ^~~~~~~ @@ -49,7 +49,7 @@ fn F(template c:! C) -> i32 { library "[[@TEST_NAME]]"; -fn F[template T:! Core.Destroy](x: T) { +fn F[template T: Core.Destroy](x: T) { // TODO: These diagnostics aren't very good, and we should only produce one error here. // CHECK:STDERR: fail_todo_unimplemented_convert.carbon:[[@LINE+8]]:3: error: member name of type `` in compound member access is not an instance member or an interface member [CompoundMemberAccessDoesNotUseBase] // CHECK:STDERR: var unused v: T = 0; @@ -117,16 +117,16 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc6_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc6_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc6_26.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc6_26.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc6_26.1: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc6_26.1 [template = %x.patt.loc6_26.2 (constants.%x.patt)] +// CHECK:STDOUT: %x.param_patt.loc6_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc6_25.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc6_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc6_25.1 [template = %x.patt.loc6_25.2 (constants.%x.patt)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc6_34: Core.Form = init_form %i32 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_33: Core.Form = init_form %i32 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc6_18.1: type = splice_block %.loc6_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_16.2: type = symbolic_binding T, 0, template [template = %T.loc6_16.1 (constants.%T)] // CHECK:STDOUT: %x.param: @F.%T.loc6_16.1 (%T) = value_param call_param0 @@ -141,8 +141,8 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %T.patt.loc6_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc6_16.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_16.1: type = symbolic_binding T, 0, template [template = %T.loc6_16.1 (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc6_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)] -// CHECK:STDOUT: %x.param_patt.loc6_26.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc6_26.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc6_26.2: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc6_26.2 [template = %x.patt.loc6_26.2 (constants.%x.patt)] +// CHECK:STDOUT: %x.param_patt.loc6_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc6_25.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc6_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc6_25.2 [template = %x.patt.loc6_25.2 (constants.%x.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc6_16.1 [template = %require_complete (constants.%require_complete.944)] @@ -166,8 +166,8 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %T.patt.loc6_16.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_16.1 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.1 -// CHECK:STDOUT: %x.param_patt.loc6_26.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc6_26.2 => constants.%x.patt +// CHECK:STDOUT: %x.param_patt.loc6_25.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc6_25.2 => constants.%x.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_unimplemented_value.carbon @@ -222,8 +222,8 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc11_25: Core.Form = init_form %i32 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc11_19: type = splice_block %C.ref [concrete = constants.%C] { +// CHECK:STDOUT: %.loc11_24: Core.Form = init_form %i32 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc11_18: type = splice_block %C.ref [concrete = constants.%C] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: } @@ -328,38 +328,38 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.429 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.351)] -// CHECK:STDOUT: %x.param_patt.loc4_34.1: @F.%pattern_type (%pattern_type.f4e485.2) = value_param_pattern [template = %x.param_patt.loc4_34.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_34.1: @F.%pattern_type (%pattern_type.f4e485.2) = at_binding_pattern x, %x.param_patt.loc4_34.1 [template = %x.patt.loc4_34.2 (constants.%x.patt)] +// CHECK:STDOUT: %x.param_patt.loc4_33.1: @F.%pattern_type (%pattern_type.f4e485.2) = value_param_pattern [template = %x.param_patt.loc4_33.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_33.1: @F.%pattern_type (%pattern_type.f4e485.2) = at_binding_pattern x, %x.param_patt.loc4_33.1 [template = %x.patt.loc4_33.2 (constants.%x.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_23: type = splice_block %Destroy.ref [concrete = constants.%Destroy.type] { +// CHECK:STDOUT: %.loc4_22: type = splice_block %Destroy.ref [concrete = constants.%Destroy.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // 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: } // CHECK:STDOUT: %T.loc4_16.2: %Destroy.type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.0e7)] -// CHECK:STDOUT: %x.param: @F.%T.as_type.loc4_36.1 (%T.as_type.700) = value_param call_param0 -// CHECK:STDOUT: %.loc4_36.1: type = splice_block %.loc4_36.2 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)] { +// CHECK:STDOUT: %x.param: @F.%T.as_type.loc4_35.1 (%T.as_type.700) = value_param call_param0 +// CHECK:STDOUT: %.loc4_35.1: type = splice_block %.loc4_35.2 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)] { // CHECK:STDOUT: %T.ref.loc4: %Destroy.type = name_ref T, %T.loc4_16.2 [template = %T.loc4_16.1 (constants.%T.0e7)] -// CHECK:STDOUT: %T.as_type.loc4_36.2: type = facet_access_type %T.ref.loc4 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)] -// CHECK:STDOUT: %.loc4_36.2: type = converted %T.ref.loc4, %T.as_type.loc4_36.2 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)] +// CHECK:STDOUT: %T.as_type.loc4_35.2: type = facet_access_type %T.ref.loc4 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)] +// CHECK:STDOUT: %.loc4_35.2: type = converted %T.ref.loc4, %T.as_type.loc4_35.2 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%T.as_type.loc4_36.1 (%T.as_type.700) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @F.%T.as_type.loc4_35.1 (%T.as_type.700) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc4_16.2: %Destroy.type) { // CHECK:STDOUT: %T.patt.loc4_16.2: %pattern_type.429 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.351)] // CHECK:STDOUT: %T.loc4_16.1: %Destroy.type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.0e7)] -// CHECK:STDOUT: %T.as_type.loc4_36.1: type = facet_access_type %T.loc4_16.1 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc4_36.1 [template = %pattern_type (constants.%pattern_type.f4e485.2)] -// CHECK:STDOUT: %x.param_patt.loc4_34.2: @F.%pattern_type (%pattern_type.f4e485.2) = value_param_pattern [template = %x.param_patt.loc4_34.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc4_34.2: @F.%pattern_type (%pattern_type.f4e485.2) = at_binding_pattern x, %x.param_patt.loc4_34.2 [template = %x.patt.loc4_34.2 (constants.%x.patt)] +// CHECK:STDOUT: %T.as_type.loc4_35.1: type = facet_access_type %T.loc4_16.1 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc4_35.1 [template = %pattern_type (constants.%pattern_type.f4e485.2)] +// CHECK:STDOUT: %x.param_patt.loc4_33.2: @F.%pattern_type (%pattern_type.f4e485.2) = value_param_pattern [template = %x.param_patt.loc4_33.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc4_33.2: @F.%pattern_type (%pattern_type.f4e485.2) = at_binding_pattern x, %x.param_patt.loc4_33.2 [template = %x.patt.loc4_33.2 (constants.%x.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc4_36.1 [template = %require_complete (constants.%require_complete.14c)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc4_35.1 [template = %require_complete (constants.%require_complete.14c)] // CHECK:STDOUT: %v.patt.loc14_15.2: @F.%pattern_type (%pattern_type.f4e485.2) = ref_binding_pattern v [template = %v.patt.loc14_15.2 (constants.%v.patt)] // CHECK:STDOUT: %v.var_patt.loc14_3.2: @F.%pattern_type (%pattern_type.f4e485.2) = var_pattern %v.patt.loc14_15.2 [template = %v.var_patt.loc14_3.2 (constants.%v.var_patt)] -// CHECK:STDOUT: %ImplicitAs.type.loc14_3.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T.as_type.loc4_36.1)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.f42)] +// CHECK:STDOUT: %ImplicitAs.type.loc14_3.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T.as_type.loc4_35.1)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.f42)] // CHECK:STDOUT: %.loc14_3.5: = access_member_action %ImplicitAs.type.loc14_3.1, Convert [template] // CHECK:STDOUT: %.loc14_3.6: type = type_of_inst %.loc14_3.5 [template] // CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%T.loc4_16.1) [template = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.d3ece9.2)] @@ -368,26 +368,26 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %impl.elem0.loc14_3.2: @F.%.loc14_3.7 (%.53a) = impl_witness_access %Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %specific_impl_fn.loc14_3.2: = specific_impl_function %impl.elem0.loc14_3.2, @Destroy.WithSelf.Op(%T.loc4_16.1) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.afc)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%T.as_type.loc4_36.1 (%T.as_type.700)) { +// CHECK:STDOUT: fn(%x.param: @F.%T.as_type.loc4_35.1 (%T.as_type.700)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.var: ref @F.%T.as_type.loc4_36.1 (%T.as_type.700) = var_storage %v.var_patt.loc14_3.1 +// CHECK:STDOUT: %v.var: ref @F.%T.as_type.loc4_35.1 (%T.as_type.700) = var_storage %v.var_patt.loc14_3.1 // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %ImplicitAs.type.loc14_3.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%T.as_type.700)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.f42)] // CHECK:STDOUT: %.loc14_3.1: @F.%.loc14_3.6 (@F.%.loc14_3.6) = splice_inst %.loc14_3.5 -// CHECK:STDOUT: %.loc14_3.2: @F.%T.as_type.loc4_36.1 (%T.as_type.700) = converted %int_0, [concrete = ] +// CHECK:STDOUT: %.loc14_3.2: @F.%T.as_type.loc4_35.1 (%T.as_type.700) = converted %int_0, [concrete = ] // CHECK:STDOUT: assign %v.var, -// CHECK:STDOUT: %.loc14_17.1: type = splice_block %.loc14_17.2 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)] { +// CHECK:STDOUT: %.loc14_17.1: type = splice_block %.loc14_17.2 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)] { // CHECK:STDOUT: %T.ref.loc14: %Destroy.type = name_ref T, %T.loc4_16.2 [template = %T.loc4_16.1 (constants.%T.0e7)] -// CHECK:STDOUT: %T.as_type.loc14: type = facet_access_type %T.ref.loc14 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)] -// CHECK:STDOUT: %.loc14_17.2: type = converted %T.ref.loc14, %T.as_type.loc14 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)] +// CHECK:STDOUT: %T.as_type.loc14: type = facet_access_type %T.ref.loc14 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)] +// CHECK:STDOUT: %.loc14_17.2: type = converted %T.ref.loc14, %T.as_type.loc14 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: ref @F.%T.as_type.loc4_36.1 (%T.as_type.700) = wrapper_binding v, %v.var +// CHECK:STDOUT: %v: ref @F.%T.as_type.loc4_35.1 (%T.as_type.700) = wrapper_binding v, %v.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt.loc14_15.1: @F.%pattern_type (%pattern_type.f4e485.2) = ref_binding_pattern v [template = %v.patt.loc14_15.2 (constants.%v.patt)] // CHECK:STDOUT: %v.var_patt.loc14_3.1: @F.%pattern_type (%pattern_type.f4e485.2) = var_pattern %v.patt.loc14_15.1 [template = %v.var_patt.loc14_3.2 (constants.%v.var_patt)] // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var_storage %w.var_patt -// CHECK:STDOUT: %x.ref: @F.%T.as_type.loc4_36.1 (%T.as_type.700) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @F.%T.as_type.loc4_35.1 (%T.as_type.700) = name_ref x, %x // CHECK:STDOUT: %.loc22: %i32 = converted %x.ref, [concrete = ] // CHECK:STDOUT: assign %w.var, // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -423,9 +423,9 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: specific @F(constants.%T.0e7) { // CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.351 // CHECK:STDOUT: %T.loc4_16.1 => constants.%T.0e7 -// CHECK:STDOUT: %T.as_type.loc4_36.1 => constants.%T.as_type.700 +// CHECK:STDOUT: %T.as_type.loc4_35.1 => constants.%T.as_type.700 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f4e485.2 -// CHECK:STDOUT: %x.param_patt.loc4_34.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc4_34.2 => constants.%x.patt +// CHECK:STDOUT: %x.param_patt.loc4_33.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc4_33.2 => constants.%x.patt // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/template_dependence.carbon b/toolchain/check/testdata/generic/template_dependence.carbon index 90b4495f3522..1e7f982e2df2 100644 --- a/toolchain/check/testdata/generic/template_dependence.carbon +++ b/toolchain/check/testdata/generic/template_dependence.carbon @@ -15,7 +15,7 @@ library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -fn F[template T:! type](x: T**) -> T* { +fn F[template T: type](x: T**) -> T* { return *x; } //@dump-sem-ir-end @@ -25,7 +25,7 @@ fn F[template T:! type](x: T**) -> T* { library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -fn F(template T:! type, U:! type) -> (T, U) { +fn F(template T: type, generic U: type) -> (T, U) { return F(T, U); } //@dump-sem-ir-end @@ -65,60 +65,60 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc5_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt.d47011.1)] -// CHECK:STDOUT: %x.param_patt.loc5_26.1: @F.%pattern_type.loc5_26 (%pattern_type.8bb) = value_param_pattern [template = %x.param_patt.loc5_26.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc5_26.1: @F.%pattern_type.loc5_26 (%pattern_type.8bb) = at_binding_pattern x, %x.param_patt.loc5_26.1 [template = %x.patt.loc5_26.2 (constants.%x.patt)] -// CHECK:STDOUT: %return.param_patt.loc5_37.1: @F.%pattern_type.loc5_37 (%pattern_type.4f4b84.1) = out_param_pattern [template = %return.param_patt.loc5_37.2 (constants.%return.param_patt.27f587.1)] -// CHECK:STDOUT: %return.patt.loc5_33.1: @F.%pattern_type.loc5_37 (%pattern_type.4f4b84.1) = return_slot_pattern %return.param_patt.loc5_37.1, %ptr.loc5_37 [template = %return.patt.loc5_33.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: %x.param_patt.loc5_25.1: @F.%pattern_type.loc5_25 (%pattern_type.8bb) = value_param_pattern [template = %x.param_patt.loc5_25.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc5_25.1: @F.%pattern_type.loc5_25 (%pattern_type.8bb) = at_binding_pattern x, %x.param_patt.loc5_25.1 [template = %x.patt.loc5_25.2 (constants.%x.patt)] +// CHECK:STDOUT: %return.param_patt.loc5_36.1: @F.%pattern_type.loc5_36 (%pattern_type.4f4b84.1) = out_param_pattern [template = %return.param_patt.loc5_36.2 (constants.%return.param_patt.27f587.1)] +// CHECK:STDOUT: %return.patt.loc5_32.1: @F.%pattern_type.loc5_36 (%pattern_type.4f4b84.1) = return_slot_pattern %return.param_patt.loc5_36.1, %ptr.loc5_36 [template = %return.patt.loc5_32.2 (constants.%return.patt.d67)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc5_36: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T.67db0b.1)] -// CHECK:STDOUT: %ptr.loc5_37: type = ptr_type %T.ref.loc5_36 [template = %ptr.loc5_29.1 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %.loc5_37.2: Core.Form = init_form %ptr.loc5_37 [template = %.loc5_37.1 (constants.%.cb6cb9.1)] -// CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc5_35: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T.67db0b.1)] +// CHECK:STDOUT: %ptr.loc5_36: type = ptr_type %T.ref.loc5_35 [template = %ptr.loc5_28.1 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %.loc5_36.2: Core.Form = init_form %ptr.loc5_36 [template = %.loc5_36.1 (constants.%.cb6cb9.1)] +// CHECK:STDOUT: %.loc5_18.1: type = splice_block %.loc5_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_16.2: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T.67db0b.1)] -// CHECK:STDOUT: %x.param: @F.%ptr.loc5_30.1 (%ptr.125) = value_param call_param0 -// CHECK:STDOUT: %.loc5_30: type = splice_block %ptr.loc5_30.2 [template = %ptr.loc5_30.1 (constants.%ptr.125)] { -// CHECK:STDOUT: %T.ref.loc5_28: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T.67db0b.1)] -// CHECK:STDOUT: %ptr.loc5_29.2: type = ptr_type %T.ref.loc5_28 [template = %ptr.loc5_29.1 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %ptr.loc5_30.2: type = ptr_type %ptr.loc5_29.2 [template = %ptr.loc5_30.1 (constants.%ptr.125)] +// CHECK:STDOUT: %x.param: @F.%ptr.loc5_29.1 (%ptr.125) = value_param call_param0 +// CHECK:STDOUT: %.loc5_29: type = splice_block %ptr.loc5_29.2 [template = %ptr.loc5_29.1 (constants.%ptr.125)] { +// CHECK:STDOUT: %T.ref.loc5_27: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T.67db0b.1)] +// CHECK:STDOUT: %ptr.loc5_28.2: type = ptr_type %T.ref.loc5_27 [template = %ptr.loc5_28.1 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %ptr.loc5_29.2: type = ptr_type %ptr.loc5_28.2 [template = %ptr.loc5_29.1 (constants.%ptr.125)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%ptr.loc5_30.1 (%ptr.125) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = return_slot %return.param +// CHECK:STDOUT: %x: @F.%ptr.loc5_29.1 (%ptr.125) = wrapper_binding x, %x.param +// CHECK:STDOUT: %return.param: ref @F.%ptr.loc5_28.1 (%ptr.e8f8f9.1) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.%ptr.loc5_28.1 (%ptr.e8f8f9.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc5_16.2: type) { // CHECK:STDOUT: %T.patt.loc5_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt.d47011.1)] // CHECK:STDOUT: %T.loc5_16.1: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T.67db0b.1)] -// CHECK:STDOUT: %ptr.loc5_29.1: type = ptr_type %T.loc5_16.1 [template = %ptr.loc5_29.1 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %ptr.loc5_30.1: type = ptr_type %ptr.loc5_29.1 [template = %ptr.loc5_30.1 (constants.%ptr.125)] -// CHECK:STDOUT: %pattern_type.loc5_26: type = pattern_type %ptr.loc5_30.1 [template = %pattern_type.loc5_26 (constants.%pattern_type.8bb)] -// CHECK:STDOUT: %x.param_patt.loc5_26.2: @F.%pattern_type.loc5_26 (%pattern_type.8bb) = value_param_pattern [template = %x.param_patt.loc5_26.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc5_26.2: @F.%pattern_type.loc5_26 (%pattern_type.8bb) = at_binding_pattern x, %x.param_patt.loc5_26.2 [template = %x.patt.loc5_26.2 (constants.%x.patt)] -// CHECK:STDOUT: %.loc5_37.1: Core.Form = init_form %ptr.loc5_29.1 [template = %.loc5_37.1 (constants.%.cb6cb9.1)] -// CHECK:STDOUT: %pattern_type.loc5_37: type = pattern_type %ptr.loc5_29.1 [template = %pattern_type.loc5_37 (constants.%pattern_type.4f4b84.1)] -// CHECK:STDOUT: %return.param_patt.loc5_37.2: @F.%pattern_type.loc5_37 (%pattern_type.4f4b84.1) = out_param_pattern [template = %return.param_patt.loc5_37.2 (constants.%return.param_patt.27f587.1)] -// CHECK:STDOUT: %return.patt.loc5_33.2: @F.%pattern_type.loc5_37 (%pattern_type.4f4b84.1) = return_slot_pattern %return.param_patt.loc5_37.2, %ptr.loc5_29.1 [template = %return.patt.loc5_33.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: %ptr.loc5_28.1: type = ptr_type %T.loc5_16.1 [template = %ptr.loc5_28.1 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %ptr.loc5_29.1: type = ptr_type %ptr.loc5_28.1 [template = %ptr.loc5_29.1 (constants.%ptr.125)] +// CHECK:STDOUT: %pattern_type.loc5_25: type = pattern_type %ptr.loc5_29.1 [template = %pattern_type.loc5_25 (constants.%pattern_type.8bb)] +// CHECK:STDOUT: %x.param_patt.loc5_25.2: @F.%pattern_type.loc5_25 (%pattern_type.8bb) = value_param_pattern [template = %x.param_patt.loc5_25.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc5_25.2: @F.%pattern_type.loc5_25 (%pattern_type.8bb) = at_binding_pattern x, %x.param_patt.loc5_25.2 [template = %x.patt.loc5_25.2 (constants.%x.patt)] +// CHECK:STDOUT: %.loc5_36.1: Core.Form = init_form %ptr.loc5_28.1 [template = %.loc5_36.1 (constants.%.cb6cb9.1)] +// CHECK:STDOUT: %pattern_type.loc5_36: type = pattern_type %ptr.loc5_28.1 [template = %pattern_type.loc5_36 (constants.%pattern_type.4f4b84.1)] +// CHECK:STDOUT: %return.param_patt.loc5_36.2: @F.%pattern_type.loc5_36 (%pattern_type.4f4b84.1) = out_param_pattern [template = %return.param_patt.loc5_36.2 (constants.%return.param_patt.27f587.1)] +// CHECK:STDOUT: %return.patt.loc5_32.2: @F.%pattern_type.loc5_36 (%pattern_type.4f4b84.1) = return_slot_pattern %return.param_patt.loc5_36.2, %ptr.loc5_28.1 [template = %return.patt.loc5_32.2 (constants.%return.patt.d67)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc5_26: = require_complete_type %ptr.loc5_30.1 [template = %require_complete.loc5_26 (constants.%require_complete.fbe)] -// CHECK:STDOUT: %require_complete.loc5_33: = require_complete_type %ptr.loc5_29.1 [template = %require_complete.loc5_33 (constants.%require_complete.ef162c.1)] +// CHECK:STDOUT: %require_complete.loc5_25: = require_complete_type %ptr.loc5_29.1 [template = %require_complete.loc5_25 (constants.%require_complete.fbe)] +// CHECK:STDOUT: %require_complete.loc5_32: = require_complete_type %ptr.loc5_28.1 [template = %require_complete.loc5_32 (constants.%require_complete.ef162c.1)] // CHECK:STDOUT: %.loc6_10.5: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc5_16.1) [template = %.loc6_10.5 (constants.%.0e9)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc5_29.1, @Copy [template = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] -// CHECK:STDOUT: %Copy.facet.loc6_10.3: %Copy.type = facet_value %ptr.loc5_29.1, (%Copy.lookup_impl_witness) [template = %Copy.facet.loc6_10.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc5_28.1, @Copy [template = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] +// CHECK:STDOUT: %Copy.facet.loc6_10.3: %Copy.type = facet_value %ptr.loc5_28.1, (%Copy.lookup_impl_witness) [template = %Copy.facet.loc6_10.3 (constants.%Copy.facet)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc6_10.3) [template = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.884)] // CHECK:STDOUT: %.loc6_10.6: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc6_10.3 [template = %.loc6_10.6 (constants.%.be5)] // CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.6 (%.be5) = impl_witness_access %Copy.lookup_impl_witness, element0 [template = %impl.elem0.loc6_10.2 (constants.%impl.elem0.484)] // CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%Copy.facet.loc6_10.3) [template = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.a76)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%ptr.loc5_30.1 (%ptr.125)) -> out %return.param: @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) { +// CHECK:STDOUT: fn(%x.param: @F.%ptr.loc5_29.1 (%ptr.125)) -> out %return.param: @F.%ptr.loc5_28.1 (%ptr.e8f8f9.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @F.%ptr.loc5_30.1 (%ptr.125) = name_ref x, %x -// CHECK:STDOUT: %.loc6_10.1: ref @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = deref %x.ref -// CHECK:STDOUT: %.loc6_10.2: @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = acquire_value %.loc6_10.1 +// CHECK:STDOUT: %x.ref: @F.%ptr.loc5_29.1 (%ptr.125) = name_ref x, %x +// CHECK:STDOUT: %.loc6_10.1: ref @F.%ptr.loc5_28.1 (%ptr.e8f8f9.1) = deref %x.ref +// CHECK:STDOUT: %.loc6_10.2: @F.%ptr.loc5_28.1 (%ptr.e8f8f9.1) = acquire_value %.loc6_10.1 // CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.6 (%.be5) = impl_witness_access constants.%Copy.lookup_impl_witness.1da, element0 [template = %impl.elem0.loc6_10.2 (constants.%impl.elem0.484)] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %.loc6_10.2, %impl.elem0.loc6_10.1 // CHECK:STDOUT: %Copy.facet.loc6_10.1: %Copy.type = facet_value constants.%ptr.e8f8f9.1, (constants.%Copy.lookup_impl_witness.1da) [template = %Copy.facet.loc6_10.3 (constants.%Copy.facet)] @@ -127,7 +127,7 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: %.loc6_10.4: %Copy.type = converted constants.%ptr.e8f8f9.1, %Copy.facet.loc6_10.2 [template = %Copy.facet.loc6_10.3 (constants.%Copy.facet)] // CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [template = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.a76)] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %.loc6_10.2, %specific_impl_fn.loc6_10.1 -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = call %bound_method.loc6_10.2(%.loc6_10.2) +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc5_28.1 (%ptr.e8f8f9.1) = call %bound_method.loc6_10.2(%.loc6_10.2) // CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -137,15 +137,15 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: specific @F(constants.%T.67db0b.1) { // CHECK:STDOUT: %T.patt.loc5_16.2 => constants.%T.patt.d47011.1 // CHECK:STDOUT: %T.loc5_16.1 => constants.%T.67db0b.1 -// CHECK:STDOUT: %ptr.loc5_29.1 => constants.%ptr.e8f8f9.1 -// CHECK:STDOUT: %ptr.loc5_30.1 => constants.%ptr.125 -// CHECK:STDOUT: %pattern_type.loc5_26 => constants.%pattern_type.8bb -// CHECK:STDOUT: %x.param_patt.loc5_26.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc5_26.2 => constants.%x.patt -// CHECK:STDOUT: %.loc5_37.1 => constants.%.cb6cb9.1 -// CHECK:STDOUT: %pattern_type.loc5_37 => constants.%pattern_type.4f4b84.1 -// CHECK:STDOUT: %return.param_patt.loc5_37.2 => constants.%return.param_patt.27f587.1 -// CHECK:STDOUT: %return.patt.loc5_33.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %ptr.loc5_28.1 => constants.%ptr.e8f8f9.1 +// CHECK:STDOUT: %ptr.loc5_29.1 => constants.%ptr.125 +// CHECK:STDOUT: %pattern_type.loc5_25 => constants.%pattern_type.8bb +// CHECK:STDOUT: %x.param_patt.loc5_25.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc5_25.2 => constants.%x.patt +// CHECK:STDOUT: %.loc5_36.1 => constants.%.cb6cb9.1 +// CHECK:STDOUT: %pattern_type.loc5_36 => constants.%pattern_type.4f4b84.1 +// CHECK:STDOUT: %return.param_patt.loc5_36.2 => constants.%return.param_patt.27f587.1 +// CHECK:STDOUT: %return.patt.loc5_32.2 => constants.%return.patt.d67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- mixed.carbon @@ -174,54 +174,54 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc5_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc5_26.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc5_26.2 (constants.%U.patt)] -// CHECK:STDOUT: %return.param_patt.loc5_43.1: @F.%pattern_type (%pattern_type.eee) = out_param_pattern [template = %return.param_patt.loc5_43.2 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc5_35.1: @F.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc5_43.1, %.loc5_43.4 [template = %return.patt.loc5_35.2 (constants.%return.patt)] +// CHECK:STDOUT: %U.patt.loc5_33.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc5_33.2 (constants.%U.patt)] +// CHECK:STDOUT: %return.param_patt.loc5_49.1: @F.%pattern_type (%pattern_type.eee) = out_param_pattern [template = %return.param_patt.loc5_49.2 (constants.%return.param_patt)] +// CHECK:STDOUT: %return.patt.loc5_41.1: @F.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc5_49.1, %.loc5_49.4 [template = %return.patt.loc5_41.2 (constants.%return.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc5: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T)] -// CHECK:STDOUT: %U.ref.loc5: type = name_ref U, %U.loc5_26.2 [symbolic = %U.loc5_26.1 (constants.%U)] -// CHECK:STDOUT: %.loc5_43.3: %tuple.type.24b = tuple_literal (%T.ref.loc5, %U.ref.loc5) [template = %tuple (constants.%tuple)] -// CHECK:STDOUT: %.loc5_43.4: type = converted %.loc5_43.3, constants.%tuple.type.a5e [template = %tuple.type (constants.%tuple.type.a5e)] -// CHECK:STDOUT: %.loc5_43.5: Core.Form = init_form %.loc5_43.4 [template = %.loc5_43.2 (constants.%.f18)] -// CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.2 [concrete = type] { +// CHECK:STDOUT: %U.ref.loc5: type = name_ref U, %U.loc5_33.2 [symbolic = %U.loc5_33.1 (constants.%U)] +// CHECK:STDOUT: %.loc5_49.3: %tuple.type.24b = tuple_literal (%T.ref.loc5, %U.ref.loc5) [template = %tuple (constants.%tuple)] +// CHECK:STDOUT: %.loc5_49.4: type = converted %.loc5_49.3, constants.%tuple.type.a5e [template = %tuple.type (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %.loc5_49.5: Core.Form = init_form %.loc5_49.4 [template = %.loc5_49.2 (constants.%.f18)] +// CHECK:STDOUT: %.loc5_18.1: type = splice_block %.loc5_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc5_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_16.2: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T)] -// CHECK:STDOUT: %.loc5_29.1: type = splice_block %.loc5_29.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc5_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_29.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_35.1: type = splice_block %.loc5_35.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc5_33: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc5_35.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc5_26.2: type = symbolic_binding U, 1 [symbolic = %U.loc5_26.1 (constants.%U)] +// CHECK:STDOUT: %U.loc5_33.2: type = symbolic_binding U, 1 [symbolic = %U.loc5_33.1 (constants.%U)] // CHECK:STDOUT: %return.param: ref @F.%tuple.type (%tuple.type.a5e) = out_param call_param0 // CHECK:STDOUT: %return: ref @F.%tuple.type (%tuple.type.a5e) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc5_16.2: type, %U.loc5_26.2: type) { +// CHECK:STDOUT: generic fn @F(%T.loc5_16.2: type, %U.loc5_33.2: type) { // CHECK:STDOUT: %T.patt.loc5_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc5_16.1: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc5_26.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc5_26.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc5_26.1: type = symbolic_binding U, 1 [symbolic = %U.loc5_26.1 (constants.%U)] -// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T.loc5_16.1, %U.loc5_26.1) [template = %tuple (constants.%tuple)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%T.loc5_16.1, %U.loc5_26.1) [template = %tuple.type (constants.%tuple.type.a5e)] -// CHECK:STDOUT: %.loc5_43.2: Core.Form = init_form %tuple.type [template = %.loc5_43.2 (constants.%.f18)] +// CHECK:STDOUT: %U.patt.loc5_33.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc5_33.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc5_33.1: type = symbolic_binding U, 1 [symbolic = %U.loc5_33.1 (constants.%U)] +// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T.loc5_16.1, %U.loc5_33.1) [template = %tuple (constants.%tuple)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%T.loc5_16.1, %U.loc5_33.1) [template = %tuple.type (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %.loc5_49.2: Core.Form = init_form %tuple.type [template = %.loc5_49.2 (constants.%.f18)] // CHECK:STDOUT: %pattern_type: type = pattern_type %tuple.type [template = %pattern_type (constants.%pattern_type.eee)] -// CHECK:STDOUT: %return.param_patt.loc5_43.2: @F.%pattern_type (%pattern_type.eee) = out_param_pattern [template = %return.param_patt.loc5_43.2 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc5_35.2: @F.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc5_43.2, %tuple.type [template = %return.patt.loc5_35.2 (constants.%return.patt)] +// CHECK:STDOUT: %return.param_patt.loc5_49.2: @F.%pattern_type (%pattern_type.eee) = out_param_pattern [template = %return.param_patt.loc5_49.2 (constants.%return.param_patt)] +// CHECK:STDOUT: %return.patt.loc5_41.2: @F.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc5_49.2, %tuple.type [template = %return.patt.loc5_41.2 (constants.%return.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [template = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %F.specific_fn.loc6_10.2: = specific_function constants.%F, @F(%T.loc5_16.1, %U.loc5_26.1) [template = %F.specific_fn.loc6_10.2 (constants.%F.specific_fn)] +// CHECK:STDOUT: %F.specific_fn.loc6_10.2: = specific_function constants.%F, @F(%T.loc5_16.1, %U.loc5_33.1) [template = %F.specific_fn.loc6_10.2 (constants.%F.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: @F.%tuple.type (%tuple.type.a5e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %T.ref.loc6: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T)] -// CHECK:STDOUT: %U.ref.loc6: type = name_ref U, %U.loc5_26.2 [symbolic = %U.loc5_26.1 (constants.%U)] +// CHECK:STDOUT: %U.ref.loc6: type = name_ref U, %U.loc5_33.2 [symbolic = %U.loc5_33.1 (constants.%U)] // CHECK:STDOUT: %F.specific_fn.loc6_10.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [template = %F.specific_fn.loc6_10.2 (constants.%F.specific_fn)] -// CHECK:STDOUT: %.loc5_43.1: ref @F.%tuple.type (%tuple.type.a5e) = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.a5e) to %.loc5_43.1 = call %F.specific_fn.loc6_10.1() +// CHECK:STDOUT: %.loc5_49.1: ref @F.%tuple.type (%tuple.type.a5e) = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.a5e) to %.loc5_49.1 = call %F.specific_fn.loc6_10.1() // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -231,14 +231,14 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: specific @F(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc5_16.2 => constants.%T.patt // CHECK:STDOUT: %T.loc5_16.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc5_26.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc5_26.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc5_33.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc5_33.1 => constants.%U // CHECK:STDOUT: %tuple => constants.%tuple // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a5e -// CHECK:STDOUT: %.loc5_43.2 => constants.%.f18 +// CHECK:STDOUT: %.loc5_49.2 => constants.%.f18 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.eee -// CHECK:STDOUT: %return.param_patt.loc5_43.2 => constants.%return.param_patt -// CHECK:STDOUT: %return.patt.loc5_35.2 => constants.%return.patt +// CHECK:STDOUT: %return.param_patt.loc5_49.2 => constants.%return.param_patt +// CHECK:STDOUT: %return.patt.loc5_41.2 => constants.%return.patt // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete diff --git a/toolchain/check/testdata/generic/var_param.carbon b/toolchain/check/testdata/generic/var_param.carbon index 55aa8c20e57e..47bc96e5eda5 100644 --- a/toolchain/check/testdata/generic/var_param.carbon +++ b/toolchain/check/testdata/generic/var_param.carbon @@ -19,7 +19,7 @@ impl i32 as I { } //@dump-sem-ir-begin -fn TestOp[T:! I](unused var x: T) {} +fn TestOp[T: I](unused var x: T) {} //@dump-sem-ir-end fn Test(x: i32) { @@ -66,7 +66,7 @@ fn Test(x: i32) { // CHECK:STDOUT: %Copy.WithSelf.Op.type.d09: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.7a6: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d09, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.4f6, @Int.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %Destroy.Op.type.1d8f74.2: type = fn_type @Destroy.Op.loc22_25.2 [concrete] +// CHECK:STDOUT: %Destroy.Op.type.1d8f74.2: type = fn_type @Destroy.Op.loc22_24.2 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.2: %Destroy.Op.type.1d8f74.2 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -78,36 +78,36 @@ fn Test(x: i32) { // CHECK:STDOUT: file { // CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] { // CHECK:STDOUT: %T.patt.loc22_12.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_12.2 (constants.%T.patt.1df)] -// CHECK:STDOUT: %x.patt.loc22_30.1: @TestOp.%pattern_type (%pattern_type.b3a) = ref_binding_pattern x [symbolic = %x.patt.loc22_30.2 (constants.%x.patt.414)] -// CHECK:STDOUT: %x.param_patt.loc22_25.1: @TestOp.%pattern_type (%pattern_type.b3a) = var_param_pattern %x.patt.loc22_30.1 [symbolic = %x.param_patt.loc22_25.2 (constants.%x.param_patt.1e1)] +// CHECK:STDOUT: %x.patt.loc22_29.1: @TestOp.%pattern_type (%pattern_type.b3a) = ref_binding_pattern x [symbolic = %x.patt.loc22_29.2 (constants.%x.patt.414)] +// CHECK:STDOUT: %x.param_patt.loc22_24.1: @TestOp.%pattern_type (%pattern_type.b3a) = var_param_pattern %x.patt.loc22_29.1 [symbolic = %x.param_patt.loc22_24.2 (constants.%x.param_patt.1e1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc22_15: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %.loc22_14: type = splice_block %I.ref [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc22_12.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc22_12.1 (constants.%T.dda)] -// CHECK:STDOUT: %x.param: ref @TestOp.%T.as_type.loc22_32.1 (%T.as_type.b38) = ref_param call_param0 -// CHECK:STDOUT: %.loc22_32.1: type = splice_block %.loc22_32.2 [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.b38)] { +// CHECK:STDOUT: %x.param: ref @TestOp.%T.as_type.loc22_31.1 (%T.as_type.b38) = ref_param call_param0 +// CHECK:STDOUT: %.loc22_31.1: type = splice_block %.loc22_31.2 [symbolic = %T.as_type.loc22_31.1 (constants.%T.as_type.b38)] { // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc22_12.2 [symbolic = %T.loc22_12.1 (constants.%T.dda)] -// CHECK:STDOUT: %T.as_type.loc22_32.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.b38)] -// CHECK:STDOUT: %.loc22_32.2: type = converted %T.ref, %T.as_type.loc22_32.2 [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %T.as_type.loc22_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc22_31.1 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %.loc22_31.2: type = converted %T.ref, %T.as_type.loc22_31.2 [symbolic = %T.as_type.loc22_31.1 (constants.%T.as_type.b38)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: ref @TestOp.%T.as_type.loc22_32.1 (%T.as_type.b38) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: ref @TestOp.%T.as_type.loc22_31.1 (%T.as_type.b38) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @TestOp(%T.loc22_12.2: %I.type) { // CHECK:STDOUT: %T.patt.loc22_12.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_12.2 (constants.%T.patt.1df)] // CHECK:STDOUT: %T.loc22_12.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc22_12.1 (constants.%T.dda)] -// CHECK:STDOUT: %T.as_type.loc22_32.1: type = facet_access_type %T.loc22_12.1 [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.b38)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_32.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] -// CHECK:STDOUT: %x.patt.loc22_30.2: @TestOp.%pattern_type (%pattern_type.b3a) = ref_binding_pattern x [symbolic = %x.patt.loc22_30.2 (constants.%x.patt.414)] -// CHECK:STDOUT: %x.param_patt.loc22_25.2: @TestOp.%pattern_type (%pattern_type.b3a) = var_param_pattern %x.patt.loc22_30.2 [symbolic = %x.param_patt.loc22_25.2 (constants.%x.param_patt.1e1)] +// CHECK:STDOUT: %T.as_type.loc22_31.1: type = facet_access_type %T.loc22_12.1 [symbolic = %T.as_type.loc22_31.1 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_31.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] +// CHECK:STDOUT: %x.patt.loc22_29.2: @TestOp.%pattern_type (%pattern_type.b3a) = ref_binding_pattern x [symbolic = %x.patt.loc22_29.2 (constants.%x.patt.414)] +// CHECK:STDOUT: %x.param_patt.loc22_24.2: @TestOp.%pattern_type (%pattern_type.b3a) = var_param_pattern %x.patt.loc22_29.2 [symbolic = %x.param_patt.loc22_24.2 (constants.%x.param_patt.1e1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc22_32.1 [symbolic = %require_complete (constants.%require_complete.27c)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc22_31.1 [symbolic = %require_complete (constants.%require_complete.27c)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: ref @TestOp.%T.as_type.loc22_32.1 (%T.as_type.b38)) { +// CHECK:STDOUT: fn(%x.param: ref @TestOp.%T.as_type.loc22_31.1 (%T.as_type.b38)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -129,7 +129,7 @@ fn Test(x: i32) { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc27_10.2: = bound_method %x.ref, %specific_fn // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc27_10.2(%x.ref) -// CHECK:STDOUT: %x.var: ref %i32 = var_storage @TestOp.%x.param_patt.loc22_25.1 +// CHECK:STDOUT: %x.var: ref %i32 = var_storage @TestOp.%x.param_patt.loc22_24.1 // CHECK:STDOUT: assign %x.var, %Int.as.Copy.impl.Op.call // CHECK:STDOUT: %TestOp.call: init %empty_tuple.type = call %TestOp.specific_fn(%x.var) // CHECK:STDOUT: %Destroy.Op.bound: = bound_method %x.var, constants.%Destroy.Op.1a2547.2 @@ -139,9 +139,9 @@ fn Test(x: i32) { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.Op.loc22_25.1(%self.param: ref %i32.builtin) = "no_op"; +// CHECK:STDOUT: fn @Destroy.Op.loc22_24.1(%self.param: ref %i32.builtin) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.Op.loc22_25.2(%self.param: ref %i32) { +// CHECK:STDOUT: fn @Destroy.Op.loc22_24.2(%self.param: ref %i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -151,19 +151,19 @@ fn Test(x: i32) { // CHECK:STDOUT: specific @TestOp(constants.%T.dda) { // CHECK:STDOUT: %T.patt.loc22_12.2 => constants.%T.patt.1df // CHECK:STDOUT: %T.loc22_12.1 => constants.%T.dda -// CHECK:STDOUT: %T.as_type.loc22_32.1 => constants.%T.as_type.b38 +// CHECK:STDOUT: %T.as_type.loc22_31.1 => constants.%T.as_type.b38 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a -// CHECK:STDOUT: %x.patt.loc22_30.2 => constants.%x.patt.414 -// CHECK:STDOUT: %x.param_patt.loc22_25.2 => constants.%x.param_patt.1e1 +// CHECK:STDOUT: %x.patt.loc22_29.2 => constants.%x.patt.414 +// CHECK:STDOUT: %x.param_patt.loc22_24.2 => constants.%x.param_patt.1e1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TestOp(constants.%I.facet) { // CHECK:STDOUT: %T.patt.loc22_12.2 => constants.%T.patt.1df // CHECK:STDOUT: %T.loc22_12.1 => constants.%I.facet -// CHECK:STDOUT: %T.as_type.loc22_32.1 => constants.%i32 +// CHECK:STDOUT: %T.as_type.loc22_31.1 => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6 -// CHECK:STDOUT: %x.patt.loc22_30.2 => constants.%x.patt.aaf -// CHECK:STDOUT: %x.param_patt.loc22_25.2 => constants.%x.param_patt.8f9 +// CHECK:STDOUT: %x.patt.loc22_29.2 => constants.%x.patt.aaf +// CHECK:STDOUT: %x.param_patt.loc22_24.2 => constants.%x.param_patt.8f9 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a diff --git a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon index 1c4ec2cd98e2..385d5408a02b 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -66,7 +66,7 @@ class C { library "[[@TEST_NAME]]"; -base class C(T:! type) {} +base class C(T: type) {} fn F() { class B { @@ -128,7 +128,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst{{[0-9A-F]+}}.loc4_24 [concrete = constants.%C.generic] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst{{[0-9A-F]+}}.loc4_23 [concrete = constants.%C.generic] // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: if %true br !if.expr.then else br !if.expr.else // CHECK:STDOUT: complete_type_witness = invalid diff --git a/toolchain/check/testdata/impl/assoc_const_self.carbon b/toolchain/check/testdata/impl/assoc_const_self.carbon index 5c6ec75f7d81..8750d0c84e71 100644 --- a/toolchain/check/testdata/impl/assoc_const_self.carbon +++ b/toolchain/check/testdata/impl/assoc_const_self.carbon @@ -17,7 +17,7 @@ library "[[@TEST_NAME]]"; interface I { - let V:! Self; + let V: Self; } impl {} as I where .V = {} {} @@ -29,7 +29,7 @@ impl i32 as I where .V = 0 {} library "[[@TEST_NAME]]"; interface I { - let V:! Self; + let V: Self; } // CHECK:STDERR: fail_assoc_const_mismatch.carbon:[[@LINE+7]]:12: error: cannot implicitly convert expression of type `Core.IntLiteral` to `{}` [ConversionFailure] @@ -46,7 +46,7 @@ impl {} as I where .V = 0 {} library "[[@TEST_NAME]]"; interface I { - let V:! Self; + let V: Self; } class C {} @@ -65,16 +65,16 @@ impl C as I where .V = () {} library "[[@TEST_NAME]]"; -interface I(N:! Core.IntLiteral) { - let V:! array(Self, N); +interface I(N: Core.IntLiteral) { + let V: array(Self, N); } // CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE+7]]:24: error: member access into facet of incomplete type `I(-1)` [IncompleteTypeInMemberAccessOfFacet] // CHECK:STDERR: impl {} as I(-1) where .V = () {} // CHECK:STDERR: ^~ -// CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE-6]]:17: note: array bound of -1 is negative [ArrayBoundNegative] -// CHECK:STDERR: let V:! array(Self, N); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE-6]]:16: note: array bound of -1 is negative [ArrayBoundNegative] +// CHECK:STDERR: let V: array(Self, N); +// CHECK:STDERR: ^~~~ // CHECK:STDERR: impl {} as I(-1) where .V = () {} @@ -83,19 +83,19 @@ impl {} as I(-1) where .V = () {} library "[[@TEST_NAME]]"; interface I { - let V:! Self; + let V: Self; } -fn F(T:! I where {} impls Core.ImplicitAs(.Self) and .V = {}); +fn F(generic T: I where {} impls Core.ImplicitAs(.Self) and .V = {}); fn CallF() { // TODO: This call should eventually work. // CHECK:STDERR: fail_todo_constrained_fn.carbon:[[@LINE+7]]:3: error: cannot convert type `{}` into type implementing `I where {} impls Core.ImplicitAs(.Self) and .(I.V) = {}` [ConversionFailureTypeToFacet] // CHECK:STDERR: F({}); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_todo_constrained_fn.carbon:[[@LINE-7]]:6: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(T:! I where {} impls Core.ImplicitAs(.Self) and .V = {}); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_constrained_fn.carbon:[[@LINE-7]]:14: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(generic T: I where {} impls Core.ImplicitAs(.Self) and .V = {}); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F({}); } @@ -718,10 +718,10 @@ fn CallF() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%N.loc4_14.1)> [symbolic = %I.type (constants.%I.type.ac2)] -// CHECK:STDOUT: %Self.loc4_34.2: @I.%I.type (%I.type.ac2) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.4d2)] +// CHECK:STDOUT: %Self.loc4_33.2: @I.%I.type (%I.type.ac2) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.4d2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_34.1: @I.%I.type (%I.type.ac2) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.4d2)] +// CHECK:STDOUT: %Self.loc4_33.1: @I.%I.type (%I.type.ac2) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.4d2)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -730,7 +730,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_34.1 +// CHECK:STDOUT: .Self = %Self.loc4_33.1 // CHECK:STDOUT: .N = // CHECK:STDOUT: .N = // CHECK:STDOUT: .V = @V.%assoc0 @@ -761,7 +761,7 @@ fn CallF() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.ce3 -// CHECK:STDOUT: %Self.loc4_34.2 => constants.%Self.4a1 +// CHECK:STDOUT: %Self.loc4_33.2 => constants.%Self.4a1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%int_-1, constants.%Self.4d2) { @@ -829,42 +829,42 @@ fn CallF() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc8_7.1: %pattern_type.692 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type.692 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.2 [concrete = constants.%I_where.type.14de72.1] { -// CHECK:STDOUT: %.Self.frozen.loc8_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.2 [concrete = constants.%I_where.type.14de72.1] { +// CHECK:STDOUT: %.Self.frozen.loc8_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.frozen.loc8_12: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.frozen.loc8_19: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc8_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.0ff = name_ref ImplicitAs, imports.%Core.ImplicitAs [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %.Self.ref.loc8_43: %I.type = name_ref .Self, %.Self.frozen.loc8_12 [symbolic_self = constants.%.Self.frozen.3a0] -// CHECK:STDOUT: %.Self.as_type.loc8_48: type = facet_access_type %.Self.ref.loc8_43 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc8_48: type = converted %.Self.ref.loc8_43, %.Self.as_type.loc8_48 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %ImplicitAs.type.loc8_48.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%.Self.frozen.as_type)> [symbolic_self = constants.%ImplicitAs.type.acb] -// CHECK:STDOUT: %.loc8_19.2: type = converted %.loc8_19.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %impls.loc8_21.1 = requirement_impls %.loc8_19.2, %ImplicitAs.type.loc8_48.1 [concrete] -// CHECK:STDOUT: %.Self.ref.loc8_54: %I.type = name_ref .Self, %.Self.frozen.loc8_12 [symbolic_self = constants.%.Self.frozen.3a0] -// CHECK:STDOUT: %.Self.as_type.loc8_54: type = facet_access_type %.Self.ref.loc8_54 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc8_54: type = converted %.Self.ref.loc8_54, %.Self.as_type.loc8_54 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.Self.ref.loc8_50: %I.type = name_ref .Self, %.Self.frozen.loc8_19 [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.as_type.loc8_55: type = facet_access_type %.Self.ref.loc8_50 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc8_55: type = converted %.Self.ref.loc8_50, %.Self.as_type.loc8_55 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %ImplicitAs.type.loc8_55.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%.Self.frozen.as_type)> [symbolic_self = constants.%ImplicitAs.type.acb] +// CHECK:STDOUT: %.loc8_26.2: type = converted %.loc8_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %impls.loc8_28.1 = requirement_impls %.loc8_26.2, %ImplicitAs.type.loc8_55.1 [concrete] +// CHECK:STDOUT: %.Self.ref.loc8_61: %I.type = name_ref .Self, %.Self.frozen.loc8_19 [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.as_type.loc8_61: type = facet_access_type %.Self.ref.loc8_61 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc8_61: type = converted %.Self.ref.loc8_61, %.Self.as_type.loc8_61 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.660] -// CHECK:STDOUT: %impl.elem0.loc8_54.1: %.Self.frozen.as_type = impl_witness_access constants.%I.lookup_impl_witness.ced, element0 [symbolic_self = constants.%impl.elem0.cba] -// CHECK:STDOUT: %.loc8_60.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %impl.elem0.loc8_61.1: %.Self.frozen.as_type = impl_witness_access constants.%I.lookup_impl_witness.ced, element0 [symbolic_self = constants.%impl.elem0.cba] +// CHECK:STDOUT: %.loc8_67.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc8_60.2: %empty_struct_type = converted %.loc8_60.1, %empty_struct [concrete = constants.%empty_struct] -// CHECK:STDOUT: %rewrite.loc8_57.1 = requirement_rewrite %impl.elem0.loc8_54.1, %.loc8_60.2 [concrete] -// CHECK:STDOUT: %ImplicitAs.type.loc8_48.2: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%.Self.as_type)> [symbolic_self = constants.%ImplicitAs.type.418] -// CHECK:STDOUT: %impls.loc8_21.2 = requirement_impls %.loc8_19.2, %ImplicitAs.type.loc8_48.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc8_54.2: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness.78b, element0 [symbolic_self = constants.%impl.elem0.e15] -// CHECK:STDOUT: %rewrite.loc8_57.2 = requirement_rewrite %impl.elem0.loc8_54.2, %.loc8_60.2 [concrete] -// CHECK:STDOUT: %.loc8_12.2: type = where_expr [concrete = constants.%I_where.type.14de72.1] { +// CHECK:STDOUT: %.loc8_67.2: %empty_struct_type = converted %.loc8_67.1, %empty_struct [concrete = constants.%empty_struct] +// CHECK:STDOUT: %rewrite.loc8_64.1 = requirement_rewrite %impl.elem0.loc8_61.1, %.loc8_67.2 [concrete] +// CHECK:STDOUT: %ImplicitAs.type.loc8_55.2: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%.Self.as_type)> [symbolic_self = constants.%ImplicitAs.type.418] +// CHECK:STDOUT: %impls.loc8_28.2 = requirement_impls %.loc8_26.2, %ImplicitAs.type.loc8_55.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc8_61.2: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness.78b, element0 [symbolic_self = constants.%impl.elem0.e15] +// CHECK:STDOUT: %rewrite.loc8_64.2 = requirement_rewrite %impl.elem0.loc8_61.2, %.loc8_67.2 [concrete] +// CHECK:STDOUT: %.loc8_19.2: type = where_expr [concrete = constants.%I_where.type.14de72.1] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %impls.loc8_21.2 = requirement_impls %.loc8_19.2, %ImplicitAs.type.loc8_48.2 [concrete] -// CHECK:STDOUT: %rewrite.loc8_57.2 = requirement_rewrite %impl.elem0.loc8_54.2, %.loc8_60.2 [concrete] +// CHECK:STDOUT: %impls.loc8_28.2 = requirement_impls %.loc8_26.2, %ImplicitAs.type.loc8_55.2 [concrete] +// CHECK:STDOUT: %rewrite.loc8_64.2 = requirement_rewrite %impl.elem0.loc8_61.2, %.loc8_67.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_7.2: %I_where.type.14de72.1 = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc8_15.2: %I_where.type.14de72.1 = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallF.decl: %CallF.type = fn_decl @CallF [concrete = constants.%CallF] {} {} // CHECK:STDOUT: } @@ -888,9 +888,9 @@ fn CallF() { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc8_7.2: %I_where.type.14de72.1) { -// CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.692 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_7.1: %I_where.type.14de72.1 = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)] +// CHECK:STDOUT: generic fn @F(%T.loc8_15.2: %I_where.type.14de72.1) { +// CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.692 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc8_15.1: %I_where.type.14de72.1 = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -918,7 +918,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_7.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/basic.carbon b/toolchain/check/testdata/impl/basic.carbon index 609d43add19c..7af660062a77 100644 --- a/toolchain/check/testdata/impl/basic.carbon +++ b/toolchain/check/testdata/impl/basic.carbon @@ -66,7 +66,7 @@ library "[[@TEST_NAME]]"; interface I {} -class C(T:! type) {} +class C(T: type) {} // CHECK:STDERR: fail_conflicting_bad_impls.carbon:[[@LINE+4]]:12: error: name `invalid` not found [NameNotFound] // CHECK:STDERR: final impl invalid as I {} diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index 70097adc0f4a..6b02cbecd750 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -15,7 +15,7 @@ // --- core.carbon package Core; -interface ImplicitAs(Dest:! type) { +interface ImplicitAs(Dest: type) { fn Convert(self) -> Dest; } @@ -154,9 +154,9 @@ fn InstanceCallFail() { // CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.0ff = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] { // CHECK:STDOUT: %Dest.patt.loc3_26.1: %pattern_type.98f = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc3_26.2 (constants.%Dest.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_29.1: type = splice_block %.loc3_29.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_28.1: type = splice_block %.loc3_28.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_29.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_28.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %Dest.loc3_26.2: type = symbolic_binding Dest, 0 [symbolic = %Dest.loc3_26.1 (constants.%Dest)] // CHECK:STDOUT: } @@ -168,10 +168,10 @@ fn InstanceCallFail() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_26.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)] -// CHECK:STDOUT: %Self.loc3_35.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc3_34.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_34.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc3_34.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_34.2 (constants.%Self)] // CHECK:STDOUT: %ImplicitAs.WithSelf.decl = interface_with_self_decl @ImplicitAs [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -185,7 +185,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: %.loc4_23.2: Core.Form = init_form %Dest.ref [symbolic = %.loc4_23.1 (constants.%.184)] // CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc4_14.1 (%Self.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc4_14.1: type = splice_block %.loc4_14.3 [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc4_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc3_35.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc4_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc3_34.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = name_ref Self, %.loc4_14.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc4_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc4_14.3: type = converted %Self.ref, %Self.as_type.loc4_14.2 [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] @@ -197,7 +197,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: %assoc0.loc4_27.1: @ImplicitAs.WithSelf.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc4_27.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_35.1 +// CHECK:STDOUT: .Self = %Self.loc3_34.1 // CHECK:STDOUT: .Dest = // CHECK:STDOUT: .Dest = // CHECK:STDOUT: .Convert = @ImplicitAs.WithSelf.%assoc0.loc4_27.1 @@ -209,7 +209,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%Dest.loc3_26.2: type, @ImplicitAs.%Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) { +// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%Dest.loc3_26.2: type, @ImplicitAs.%Self.loc3_34.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) { // CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)] // CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] diff --git a/toolchain/check/testdata/impl/custom_witness/destroy.carbon b/toolchain/check/testdata/impl/custom_witness/destroy.carbon index c3fbfd612cdb..bfc994e6b32e 100644 --- a/toolchain/check/testdata/impl/custom_witness/destroy.carbon +++ b/toolchain/check/testdata/impl/custom_witness/destroy.carbon @@ -48,7 +48,7 @@ fn F() { // --- destroy_symbolic_int_type.carbon library "[[@TEST_NAME]]"; -fn F(N:! Core.IntLiteral) { +fn F(generic N: Core.IntLiteral) { // This looks for a Destroy witness for a class type that adapts IntType with a // symbolic type. Core.Int(N) as Core.Destroy; @@ -57,7 +57,7 @@ fn F(N:! Core.IntLiteral) { // --- destroy_class_type.carbon library "[[@TEST_NAME]]"; -class C(T:! type) {} +class C(T: type) {} fn F() { // This looks for a Destroy witness for a class type. @@ -67,7 +67,7 @@ fn F() { // --- fail_destroy_incomplete_class.carbon library "[[@TEST_NAME]]"; -class C(T:! type); +class C(T: type); fn F() { // This looks for a Destroy witness for an incomplete class type. diff --git a/toolchain/check/testdata/impl/custom_witness/float_fits_in.carbon b/toolchain/check/testdata/impl/custom_witness/float_fits_in.carbon index cb3e365b467b..9376ae787582 100644 --- a/toolchain/check/testdata/impl/custom_witness/float_fits_in.carbon +++ b/toolchain/check/testdata/impl/custom_witness/float_fits_in.carbon @@ -14,9 +14,9 @@ package Core; -interface FloatFitsIn(Dest:! type) {} +interface FloatFitsIn(Dest: type) {} -fn CheckFitsIn[U:! type, T:! FloatFitsIn(U)](unused t: T, unused u: U) {} +fn CheckFitsIn[U: type, T: FloatFitsIn(U)](unused t: T, unused u: U) {} // --- valid.carbon @@ -46,16 +46,16 @@ fn CheckFail() { // CHECK:STDERR: Core.CheckFitsIn(1.0 as f64, 2.0 as f32); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn CheckFitsIn[U:! type, T:! FloatFitsIn(U)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn CheckFitsIn[U: type, T: FloatFitsIn(U)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Core.CheckFitsIn(1.0 as f64, 2.0 as f32); // CHECK:STDERR: fail_narrowing.carbon:[[@LINE+7]]:3: error: cannot convert type `f32` into type implementing `Core.FloatFitsIn(f16)` [ConversionFailureTypeToFacet] // CHECK:STDERR: Core.CheckFitsIn(1.0 as f32, 2.0 as f16); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn CheckFitsIn[U:! type, T:! FloatFitsIn(U)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn CheckFitsIn[U: type, T: FloatFitsIn(U)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Core.CheckFitsIn(1.0 as f32, 2.0 as f16); } diff --git a/toolchain/check/testdata/impl/custom_witness/int_fits_in.carbon b/toolchain/check/testdata/impl/custom_witness/int_fits_in.carbon index 92614ea7d624..1aa0e2328b95 100644 --- a/toolchain/check/testdata/impl/custom_witness/int_fits_in.carbon +++ b/toolchain/check/testdata/impl/custom_witness/int_fits_in.carbon @@ -14,9 +14,9 @@ package Core; -interface IntFitsIn(Dest:! type) {} +interface IntFitsIn(Dest: type) {} -fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {} +fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {} // --- valid.carbon @@ -46,32 +46,32 @@ fn CheckFail() { // CHECK:STDERR: Core.CheckFitsIn(1 as i64, 2 as i32); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Core.CheckFitsIn(1 as i64, 2 as i32); // CHECK:STDERR: fail_narrowing.carbon:[[@LINE+7]]:3: error: cannot convert type `i64` into type implementing `Core.IntFitsIn(u32)` [ConversionFailureTypeToFacet] // CHECK:STDERR: Core.CheckFitsIn(1 as i64, 2 as u32); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Core.CheckFitsIn(1 as i64, 2 as u32); // CHECK:STDERR: fail_narrowing.carbon:[[@LINE+7]]:3: error: cannot convert type `u64` into type implementing `Core.IntFitsIn(i32)` [ConversionFailureTypeToFacet] // CHECK:STDERR: Core.CheckFitsIn(1 as u64, 2 as i32); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Core.CheckFitsIn(1 as u64, 2 as i32); // CHECK:STDERR: fail_narrowing.carbon:[[@LINE+7]]:3: error: cannot convert type `u64` into type implementing `Core.IntFitsIn(u32)` [ConversionFailureTypeToFacet] // CHECK:STDERR: Core.CheckFitsIn(1 as u64, 2 as u32); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Core.CheckFitsIn(1 as u64, 2 as u32); } @@ -87,16 +87,16 @@ fn CheckFail() { // CHECK:STDERR: Core.CheckFitsIn(1 as u32, 2 as i32); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Core.CheckFitsIn(1 as u32, 2 as i32); // CHECK:STDERR: fail_same_size_sign_change.carbon:[[@LINE+7]]:3: error: cannot convert type `i32` into type implementing `Core.IntFitsIn(u32)` [ConversionFailureTypeToFacet] // CHECK:STDERR: Core.CheckFitsIn(1 as i32, 2 as u32); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Core.CheckFitsIn(1 as i32, 2 as u32); } @@ -112,8 +112,8 @@ fn CheckFail() { // CHECK:STDERR: Core.CheckFitsIn(1 as i32, 2 as u32); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Core.CheckFitsIn(1 as i32, 2 as u32); } diff --git a/toolchain/check/testdata/impl/error_recovery.carbon b/toolchain/check/testdata/impl/error_recovery.carbon index 7fbef48057c8..00cd88233795 100644 --- a/toolchain/check/testdata/impl/error_recovery.carbon +++ b/toolchain/check/testdata/impl/error_recovery.carbon @@ -18,10 +18,10 @@ interface I {} //@dump-sem-ir-begin // CHECK:STDERR: fail_runtime_generic_param.carbon:[[@LINE+4]]:14: error: parameters of generic types must be constant [GenericParamMustBeConstant] -// CHECK:STDERR: impl forall [T: type] C as I {} -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: impl forall [runtime T: type] C as I {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T: type] C as I {} +impl forall [runtime T: type] C as I {} //@dump-sem-ir-end // --- fail_nonfinal_lookup_impl_witness_error_in_import.carbon @@ -29,15 +29,15 @@ library "[[@TEST_NAME]]"; interface Z {} // CHECK:STDERR: fail_nonfinal_lookup_impl_witness_error_in_import.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition] -// CHECK:STDERR: impl forall [T:! type] T as Z; -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] T as Z; +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] T as Z; +impl forall [T: type] T as Z; -fn F(unused U:! Z) {} +fn F(unused generic U: Z) {} //@dump-sem-ir-begin -fn G(T:! type) { +fn G(generic T: type) { // This makes a LookupImplWitness instruction, but future lookups (evaluation // of this instruction with a specific) will result in an error since the impl // is never defined and is left with an error as its witness at the end of the @@ -61,15 +61,15 @@ library "[[@TEST_NAME]]"; interface Z {} // CHECK:STDERR: fail_nonfinal_lookup_impl_witness_error.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition] -// CHECK:STDERR: impl forall [T:! type] T as Z; -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] T as Z; +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] T as Z; +impl forall [T: type] T as Z; -fn F(unused U:! Z) {} +fn F(unused generic U: Z) {} //@dump-sem-ir-begin -fn G(T:! type) { +fn G(generic T: type) { // This makes a LookupImplWitness instruction, but future lookups (evaluation // of this instruction with a specific) will fail with an error since the impl // is never defined and is left with an error as its witness at the end of the @@ -90,12 +90,12 @@ library "[[@TEST_NAME]]"; interface Z {} // CHECK:STDERR: fail_final_lookup_impl_witness_error.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition] -// CHECK:STDERR: impl forall [T:! type] T as Z; -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] T as Z; +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] T as Z; +impl forall [T: type] T as Z; -fn F(unused U:! Z) {} +fn F(unused generic U: Z) {} fn G() { // This impl lookup resolves to a final witness, which poisons any future @@ -180,30 +180,30 @@ impl C as I { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc13_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_10.1: type = splice_block %.loc13_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc13_17.1: type = splice_block %.loc13_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc13_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc13_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc13_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc13_7.2: type) { -// CHECK:STDOUT: %T.patt.loc13_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc13_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)] +// CHECK:STDOUT: generic fn @G(%T.loc13_15.2: type) { +// CHECK:STDOUT: %T.patt.loc13_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc13_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc19_6.2: require_specific_def_type = require_specific_def @T.as.Z.impl(%T.loc13_7.1) [symbolic = %.loc19_6.2 (constants.%.7ae)] -// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc13_7.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] -// CHECK:STDOUT: %Z.facet.loc19_6.2: %Z.type = facet_value %T.loc13_7.1, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)] +// CHECK:STDOUT: %.loc19_6.2: require_specific_def_type = require_specific_def @T.as.Z.impl(%T.loc13_15.1) [symbolic = %.loc19_6.2 (constants.%.7ae)] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc13_15.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] +// CHECK:STDOUT: %Z.facet.loc19_6.2: %Z.type = facet_value %T.loc13_15.1, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)] // CHECK:STDOUT: %F.specific_fn.loc19_3.2: = specific_function constants.%F, @F(%Z.facet.loc19_6.2) [symbolic = %F.specific_fn.loc19_3.2 (constants.%F.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T)] // CHECK:STDOUT: %Z.facet.loc19_6.1: %Z.type = facet_value %T.ref, (constants.%Z.lookup_impl_witness) [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)] // CHECK:STDOUT: %.loc19_6.1: %Z.type = converted %T.ref, %Z.facet.loc19_6.1 [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)] // CHECK:STDOUT: %F.specific_fn.loc19_3.1: = specific_function %F.ref, @F(constants.%Z.facet) [symbolic = %F.specific_fn.loc19_3.2 (constants.%F.specific_fn)] @@ -215,8 +215,8 @@ impl C as I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { -// CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc13_7.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc13_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_nonfinal_lookup_impl_witness_error.carbon @@ -242,30 +242,30 @@ impl C as I { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc13_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_10.1: type = splice_block %.loc13_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc13_17.1: type = splice_block %.loc13_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc13_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc13_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc13_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc13_7.2: type) { -// CHECK:STDOUT: %T.patt.loc13_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc13_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)] +// CHECK:STDOUT: generic fn @G(%T.loc13_15.2: type) { +// CHECK:STDOUT: %T.patt.loc13_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc13_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc19_6.2: require_specific_def_type = require_specific_def @T.as.Z.impl(%T.loc13_7.1) [symbolic = %.loc19_6.2 (constants.%.7ae)] -// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc13_7.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] -// CHECK:STDOUT: %Z.facet.loc19_6.2: %Z.type = facet_value %T.loc13_7.1, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)] +// CHECK:STDOUT: %.loc19_6.2: require_specific_def_type = require_specific_def @T.as.Z.impl(%T.loc13_15.1) [symbolic = %.loc19_6.2 (constants.%.7ae)] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc13_15.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] +// CHECK:STDOUT: %Z.facet.loc19_6.2: %Z.type = facet_value %T.loc13_15.1, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)] // CHECK:STDOUT: %F.specific_fn.loc19_3.2: = specific_function constants.%F, @F(%Z.facet.loc19_6.2) [symbolic = %F.specific_fn.loc19_3.2 (constants.%F.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T)] // CHECK:STDOUT: %Z.facet.loc19_6.1: %Z.type = facet_value %T.ref, (constants.%Z.lookup_impl_witness) [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)] // CHECK:STDOUT: %.loc19_6.1: %Z.type = converted %T.ref, %Z.facet.loc19_6.1 [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)] // CHECK:STDOUT: %F.specific_fn.loc19_3.1: = specific_function %F.ref, @F(constants.%Z.facet) [symbolic = %F.specific_fn.loc19_3.2 (constants.%F.specific_fn)] @@ -277,13 +277,13 @@ impl C as I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { -// CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc13_7.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc13_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%empty_tuple.type) { -// CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc13_7.1 => constants.%empty_tuple.type +// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc13_15.1 => constants.%empty_tuple.type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc19_6.2 => constants.%.d12 diff --git a/toolchain/check/testdata/impl/extend_final.carbon b/toolchain/check/testdata/impl/extend_final.carbon index f99a4c6de6fc..ac083bd38e77 100644 --- a/toolchain/check/testdata/impl/extend_final.carbon +++ b/toolchain/check/testdata/impl/extend_final.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } class C { diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index 153483d6aeec..33ae768896e9 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -interface HasF(T:! type) { +interface HasF(T: type) { fn F() -> T; } @@ -41,11 +41,11 @@ fn G(c: C) { library "[[@TEST_NAME]]"; -interface I(T:! type) { +interface I(T: type) { fn F(self, t: T); } -class X(U:! type) { +class X(U: type) { extend impl as I(U) { fn F(unused self, unused t: U) { } } @@ -183,9 +183,9 @@ class X(U:! type) { // CHECK:STDOUT: %HasF.decl: %HasF.type.c96 = interface_decl @HasF [concrete = constants.%HasF.generic] { // CHECK:STDOUT: %T.patt.loc4_17.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_17.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T.67d)] // CHECK:STDOUT: } @@ -207,10 +207,10 @@ class X(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_17.1)> [symbolic = %HasF.type (constants.%HasF.type.daf)] -// CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.822)] +// CHECK:STDOUT: %Self.loc4_25.2: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_25.2 (constants.%Self.822)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.822)] +// CHECK:STDOUT: %Self.loc4_25.1: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_25.2 (constants.%Self.822)] // CHECK:STDOUT: %HasF.WithSelf.decl = interface_with_self_decl @HasF [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -226,7 +226,7 @@ class X(U:! type) { // CHECK:STDOUT: %assoc0.loc5_14.1: @HasF.WithSelf.%HasF.assoc_type (%HasF.assoc_type.ddf) = assoc_entity element0, %HasF.WithSelf.F.decl [symbolic = %assoc0.loc5_14.2 (constants.%assoc0.e9a)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_26.1 +// CHECK:STDOUT: .Self = %Self.loc4_25.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0.loc5_14.1 @@ -287,7 +287,7 @@ class X(U:! type) { // CHECK:STDOUT: extend @C.as.HasF.impl.%HasF.type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_17.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.daf)) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_17.2: type, @HasF.%Self.loc4_25.1: @HasF.%HasF.type (%HasF.type.daf)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %.loc5_13.1: Core.Form = init_form %T [symbolic = %.loc5_13.1 (constants.%.184347.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d1c4.1)] @@ -411,7 +411,7 @@ class X(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HasF.type => constants.%HasF.type.9e1 -// CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.ef3 +// CHECK:STDOUT: %Self.loc4_25.2 => constants.%Self.ef3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HasF.WithSelf(constants.%Param, constants.%Self.822) { @@ -525,18 +525,18 @@ class X(U:! type) { // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: %X.type = class_decl @X [concrete = constants.%X.generic] { // CHECK:STDOUT: %U.patt.loc8_10.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc8_10.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc8_10.2: type = symbolic_binding U, 0 [symbolic = %U.loc8_10.1 (constants.%U)] // CHECK:STDOUT: } @@ -548,10 +548,10 @@ class X(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc4_14.1)> [symbolic = %I.type (constants.%I.type.3fe556.1)] -// CHECK:STDOUT: %Self.loc4_23.2: @I.%I.type (%I.type.3fe556.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.1916c4.1)] +// CHECK:STDOUT: %Self.loc4_22.2: @I.%I.type (%I.type.3fe556.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self.1916c4.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_23.1: @I.%I.type (%I.type.3fe556.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.1916c4.1)] +// CHECK:STDOUT: %Self.loc4_22.1: @I.%I.type (%I.type.3fe556.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self.1916c4.1)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -563,7 +563,7 @@ class X(U:! type) { // CHECK:STDOUT: } { // 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.3 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc5_8.2: @I.WithSelf.F.%I.type (%I.type.3fe556.1) = specific_constant @I.%Self.loc4_23.1, @I(constants.%T) [symbolic = %Self (constants.%Self.1916c4.1)] +// CHECK:STDOUT: %.loc5_8.2: @I.WithSelf.F.%I.type (%I.type.3fe556.1) = specific_constant @I.%Self.loc4_22.1, @I(constants.%T) [symbolic = %Self (constants.%Self.1916c4.1)] // CHECK:STDOUT: %Self.ref: @I.WithSelf.F.%I.type (%I.type.3fe556.1) = name_ref Self, %.loc5_8.2 [symbolic = %Self (constants.%Self.1916c4.1)] // 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.3: type = converted %Self.ref, %Self.as_type.loc5_8.2 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)] @@ -576,7 +576,7 @@ class X(U:! type) { // CHECK:STDOUT: %assoc0.loc5_19.1: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71f2b.1) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc5_19.2 (constants.%assoc0.13b5f8.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_23.1 +// CHECK:STDOUT: .Self = %Self.loc4_22.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .F = @I.WithSelf.%assoc0.loc5_19.1 @@ -655,7 +655,7 @@ class X(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc4_14.2: type, @I.%Self.loc4_23.1: @I.%I.type (%I.type.3fe556.1)) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc4_14.2: type, @I.%Self.loc4_22.1: @I.%I.type (%I.type.3fe556.1)) { // CHECK:STDOUT: %T: 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.3fe556.1)] // CHECK:STDOUT: %Self: @I.WithSelf.F.%I.type (%I.type.3fe556.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.1916c4.1)] @@ -727,7 +727,7 @@ class X(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.3fe556.2 -// CHECK:STDOUT: %Self.loc4_23.2 => constants.%Self.1916c4.2 +// CHECK:STDOUT: %Self.loc4_22.2 => constants.%Self.1916c4.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X.as.I.impl(constants.%U) { diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index 99127be3c1e6..1520fec6e7ae 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -12,16 +12,16 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/fail_extend_impl_forall.carbon -interface GenericInterface(T:! type) { +interface GenericInterface(T: type) { fn F(x: T); } class C { // CHECK:STDERR: fail_extend_impl_forall.carbon:[[@LINE+4]]:3: error: cannot `extend` a parameterized `impl` [ExtendImplForall] - // CHECK:STDERR: extend impl forall [T:! type] as GenericInterface(T) { + // CHECK:STDERR: extend impl forall [T: type] as GenericInterface(T) { // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: - extend impl forall [T:! type] as GenericInterface(T) { + extend impl forall [T: type] as GenericInterface(T) { fn F(unused x: T) {} } } @@ -62,9 +62,9 @@ class C { // CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.26e = interface_decl @GenericInterface [concrete = constants.%GenericInterface.generic] { // CHECK:STDOUT: %T.patt.loc15_29.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_29.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_32.1: type = splice_block %.loc15_32.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_31.1: type = splice_block %.loc15_31.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_32.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_31.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_29.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_29.1 (constants.%T)] // CHECK:STDOUT: } @@ -77,10 +77,10 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GenericInterface.type: type = facet_type <@GenericInterface, @GenericInterface(%T.loc15_29.1)> [symbolic = %GenericInterface.type (constants.%GenericInterface.type.4e1)] -// CHECK:STDOUT: %Self.loc15_38.2: @GenericInterface.%GenericInterface.type (%GenericInterface.type.4e1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_38.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc15_37.2: @GenericInterface.%GenericInterface.type (%GenericInterface.type.4e1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_37.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc15_38.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.4e1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_38.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc15_37.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.4e1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_37.2 (constants.%Self)] // CHECK:STDOUT: %GenericInterface.WithSelf.decl = interface_with_self_decl @GenericInterface [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -95,7 +95,7 @@ class C { // CHECK:STDOUT: %assoc0.loc16_13.1: @GenericInterface.WithSelf.%GenericInterface.assoc_type (%GenericInterface.assoc_type) = assoc_entity element0, %GenericInterface.WithSelf.F.decl [symbolic = %assoc0.loc16_13.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc15_38.1 +// CHECK:STDOUT: .Self = %Self.loc15_37.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .F = @GenericInterface.WithSelf.%assoc0.loc16_13.1 @@ -110,14 +110,14 @@ class C { // CHECK:STDOUT: generic impl @C.as.GenericInterface.impl(%T.loc24_24.2: type) { // CHECK:STDOUT: %T.patt.loc24_24.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_24.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc24_24.1: type = symbolic_binding T, 0 [symbolic = %T.loc24_24.1 (constants.%T)] -// CHECK:STDOUT: %GenericInterface.type.loc24_54.1: type = facet_type <@GenericInterface, @GenericInterface(%T.loc24_24.1)> [symbolic = %GenericInterface.type.loc24_54.1 (constants.%GenericInterface.type.4e1)] -// CHECK:STDOUT: %GenericInterface.impl_witness.loc24_56.2: = impl_witness %GenericInterface.impl_witness_table, @C.as.GenericInterface.impl(%T.loc24_24.1) [symbolic = %GenericInterface.impl_witness.loc24_56.2 (constants.%GenericInterface.impl_witness)] +// CHECK:STDOUT: %GenericInterface.type.loc24_53.1: type = facet_type <@GenericInterface, @GenericInterface(%T.loc24_24.1)> [symbolic = %GenericInterface.type.loc24_53.1 (constants.%GenericInterface.type.4e1)] +// CHECK:STDOUT: %GenericInterface.impl_witness.loc24_55.2: = impl_witness %GenericInterface.impl_witness_table, @C.as.GenericInterface.impl(%T.loc24_24.1) [symbolic = %GenericInterface.impl_witness.loc24_55.2 (constants.%GenericInterface.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %C.as.GenericInterface.impl.F.type: type = fn_type @C.as.GenericInterface.impl.F, @C.as.GenericInterface.impl(%T.loc24_24.1) [symbolic = %C.as.GenericInterface.impl.F.type (constants.%C.as.GenericInterface.impl.F.type)] // CHECK:STDOUT: %C.as.GenericInterface.impl.F: @C.as.GenericInterface.impl.%C.as.GenericInterface.impl.F.type (%C.as.GenericInterface.impl.F.type) = struct_value () [symbolic = %C.as.GenericInterface.impl.F (constants.%C.as.GenericInterface.impl.F)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %Self.ref as %GenericInterface.type.loc24_54.2 { +// CHECK:STDOUT: impl: %Self.ref as %GenericInterface.type.loc24_53.2 { // CHECK:STDOUT: %C.as.GenericInterface.impl.F.decl: @C.as.GenericInterface.impl.%C.as.GenericInterface.impl.F.type (%C.as.GenericInterface.impl.F.type) = fn_decl @C.as.GenericInterface.impl.F [symbolic = @C.as.GenericInterface.impl.%C.as.GenericInterface.impl.F (constants.%C.as.GenericInterface.impl.F)] { // CHECK:STDOUT: %x.param_patt.loc25_18.1: @C.as.GenericInterface.impl.F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc25_18.2 (constants.%x.param_patt)] // CHECK:STDOUT: %x.patt.loc25_18.1: @C.as.GenericInterface.impl.F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc25_18.1 [symbolic = %x.patt.loc25_18.2 (constants.%x.patt)] @@ -127,12 +127,12 @@ class C { // CHECK:STDOUT: %x: @C.as.GenericInterface.impl.F.%T (%T) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %GenericInterface.impl_witness_table = impl_witness_table (), @C.as.GenericInterface.impl [concrete] -// CHECK:STDOUT: %GenericInterface.impl_witness.loc24_56.1: = impl_witness %GenericInterface.impl_witness_table, @C.as.GenericInterface.impl(constants.%T) [symbolic = %GenericInterface.impl_witness.loc24_56.2 (constants.%GenericInterface.impl_witness)] +// CHECK:STDOUT: %GenericInterface.impl_witness.loc24_55.1: = impl_witness %GenericInterface.impl_witness_table, @C.as.GenericInterface.impl(constants.%T) [symbolic = %GenericInterface.impl_witness.loc24_55.2 (constants.%GenericInterface.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .T = // CHECK:STDOUT: .F = %C.as.GenericInterface.impl.F.decl -// CHECK:STDOUT: extend %GenericInterface.type.loc24_54.2 +// CHECK:STDOUT: extend %GenericInterface.type.loc24_53.2 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -144,10 +144,10 @@ class C { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C] // CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.26e = name_ref GenericInterface, file.%GenericInterface.decl [concrete = constants.%GenericInterface.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc24_24.2 [symbolic = %T.loc24_24.1 (constants.%T)] -// CHECK:STDOUT: %GenericInterface.type.loc24_54.2: type = facet_type <@GenericInterface, @GenericInterface(constants.%T)> [symbolic = %GenericInterface.type.loc24_54.1 (constants.%GenericInterface.type.4e1)] -// CHECK:STDOUT: %.loc24_27.1: type = splice_block %.loc24_27.2 [concrete = type] { +// CHECK:STDOUT: %GenericInterface.type.loc24_53.2: type = facet_type <@GenericInterface, @GenericInterface(constants.%T)> [symbolic = %GenericInterface.type.loc24_53.1 (constants.%GenericInterface.type.4e1)] +// CHECK:STDOUT: %.loc24_26.1: type = splice_block %.loc24_26.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc24_27.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc24_26.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc24_24.2: type = symbolic_binding T, 0 [symbolic = %T.loc24_24.1 (constants.%T)] // CHECK:STDOUT: } @@ -160,7 +160,7 @@ class C { // CHECK:STDOUT: has_error // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @GenericInterface.WithSelf.F(@GenericInterface.%T.loc15_29.2: type, @GenericInterface.%Self.loc15_38.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.4e1)) { +// CHECK:STDOUT: generic fn @GenericInterface.WithSelf.F(@GenericInterface.%T.loc15_29.2: type, @GenericInterface.%Self.loc15_37.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.4e1)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)] // CHECK:STDOUT: %x.param_patt.loc16_9.2: @GenericInterface.WithSelf.F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc16_9.2 (constants.%x.param_patt)] @@ -212,8 +212,8 @@ class C { // CHECK:STDOUT: specific @C.as.GenericInterface.impl(constants.%T) { // CHECK:STDOUT: %T.patt.loc24_24.2 => constants.%T.patt // CHECK:STDOUT: %T.loc24_24.1 => constants.%T -// CHECK:STDOUT: %GenericInterface.type.loc24_54.1 => constants.%GenericInterface.type.4e1 -// CHECK:STDOUT: %GenericInterface.impl_witness.loc24_56.2 => constants.%GenericInterface.impl_witness +// CHECK:STDOUT: %GenericInterface.type.loc24_53.1 => constants.%GenericInterface.type.4e1 +// CHECK:STDOUT: %GenericInterface.impl_witness.loc24_55.2 => constants.%GenericInterface.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %C.as.GenericInterface.impl.F.type => constants.%C.as.GenericInterface.impl.F.type diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon index 9abdbf0f0f34..47169a52988f 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon @@ -12,14 +12,14 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon -interface I { let T:! type; } +interface I { let T: type; } // CHECK:STDERR: fail_impl_bad_assoc_const.carbon:[[@LINE+7]]:1: error: associated constant T not given a value in impl of interface I [ImplAssociatedConstantNeedsValue] // CHECK:STDERR: impl () as I {} // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_bad_assoc_const.carbon:[[@LINE-5]]:19: note: associated constant declared here [AssociatedConstantHere] -// CHECK:STDERR: interface I { let T:! type; } -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: interface I { let T: type; } +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: impl () as I {} diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon index ef7f311d8a4a..cb38d2eb5af8 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -14,7 +14,7 @@ // CHECK:STDERR: fail_self_type_mismatch.carbon: error: cannot implicitly convert expression of type `C(i32 as I)` to `C(i32)` [ConversionFailure] // CHECK:STDERR: fail_self_type_mismatch.carbon: note: type `C(i32 as I)` does not implement interface `Core.ImplicitAs(C(i32))` [MissingImplInMemberAccessInContext] -class C[T:! type](X:! T) {} +class C[T: type](X: T) {} interface I { // Uses of `Self` inside the definition of `I` have type `I`. @@ -138,18 +138,18 @@ impl i32 as I { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc17_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_10.2 (constants.%T.patt)] -// CHECK:STDOUT: %X.patt.loc17_20.1: @C.%pattern_type (%pattern_type.51d1c4.1) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc17_20.2 (constants.%X.patt.9f0)] +// CHECK:STDOUT: %X.patt.loc17_19.1: @C.%pattern_type (%pattern_type.51d1c4.1) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc17_19.2 (constants.%X.patt.9f0)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_13.1: type = splice_block %.loc17_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc17_12.1: type = splice_block %.loc17_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc17_10: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc17_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc17_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc17_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc17_10.1 (constants.%T)] -// CHECK:STDOUT: %.loc17_23: type = splice_block %T.ref [symbolic = %T.loc17_10.1 (constants.%T)] { -// CHECK:STDOUT: %.Self.frozen.loc17_20: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc17_21: type = splice_block %T.ref [symbolic = %T.loc17_10.1 (constants.%T)] { +// CHECK:STDOUT: %.Self.frozen.loc17_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc17_10.2 [symbolic = %T.loc17_10.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %X.loc17_20.2: @C.%T.loc17_10.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc17_20.1 (constants.%X)] +// CHECK:STDOUT: %X.loc17_19.2: @C.%T.loc17_10.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc17_19.1 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @bool.as.I.impl [concrete] {} { @@ -251,12 +251,12 @@ impl i32 as I { // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%T.loc17_10.2: type, %X.loc17_20.2: @C.%T.loc17_10.1 (%T)) { +// CHECK:STDOUT: generic class @C(%T.loc17_10.2: type, %X.loc17_19.2: @C.%T.loc17_10.1 (%T)) { // CHECK:STDOUT: %T.patt.loc17_10.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_10.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc17_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc17_10.1 (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc17_10.1 [symbolic = %pattern_type (constants.%pattern_type.51d1c4.1)] -// CHECK:STDOUT: %X.patt.loc17_20.2: @C.%pattern_type (%pattern_type.51d1c4.1) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc17_20.2 (constants.%X.patt.9f0)] -// CHECK:STDOUT: %X.loc17_20.1: @C.%T.loc17_10.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc17_20.1 (constants.%X)] +// CHECK:STDOUT: %X.patt.loc17_19.2: @C.%pattern_type (%pattern_type.51d1c4.1) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc17_19.2 (constants.%X.patt.9f0)] +// CHECK:STDOUT: %X.loc17_19.1: @C.%T.loc17_10.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc17_19.1 (constants.%X)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -300,8 +300,8 @@ impl i32 as I { // CHECK:STDOUT: %T.patt.loc17_10.2 => constants.%T.patt // CHECK:STDOUT: %T.loc17_10.1 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.1 -// CHECK:STDOUT: %X.patt.loc17_20.2 => constants.%X.patt.9f0 -// CHECK:STDOUT: %X.loc17_20.1 => constants.%X +// CHECK:STDOUT: %X.patt.loc17_19.2 => constants.%X.patt.9f0 +// CHECK:STDOUT: %X.loc17_19.1 => constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%Self.37e) { @@ -315,8 +315,8 @@ impl i32 as I { // CHECK:STDOUT: %T.patt.loc17_10.2 => constants.%T.patt // CHECK:STDOUT: %T.loc17_10.1 => constants.%I.type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6cb -// CHECK:STDOUT: %X.patt.loc17_20.2 => constants.%X.patt.3b7 -// CHECK:STDOUT: %X.loc17_20.1 => constants.%Self.37e +// CHECK:STDOUT: %X.patt.loc17_19.2 => constants.%X.patt.3b7 +// CHECK:STDOUT: %X.loc17_19.1 => constants.%Self.37e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.37e) { @@ -331,8 +331,8 @@ impl i32 as I { // CHECK:STDOUT: %T.patt.loc17_10.2 => constants.%T.patt // CHECK:STDOUT: %T.loc17_10.1 => constants.%I.type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6cb -// CHECK:STDOUT: %X.patt.loc17_20.2 => constants.%X.patt.3b7 -// CHECK:STDOUT: %X.loc17_20.1 => constants.%I.facet.11c +// CHECK:STDOUT: %X.patt.loc17_19.2 => constants.%X.patt.3b7 +// CHECK:STDOUT: %X.loc17_19.1 => constants.%I.facet.11c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet.11c) { @@ -354,8 +354,8 @@ impl i32 as I { // CHECK:STDOUT: %T.patt.loc17_10.2 => constants.%T.patt // CHECK:STDOUT: %T.loc17_10.1 => type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98f -// CHECK:STDOUT: %X.patt.loc17_20.2 => constants.%X.patt.014 -// CHECK:STDOUT: %X.loc17_20.1 => constants.%i32 +// CHECK:STDOUT: %X.patt.loc17_19.2 => constants.%X.patt.014 +// CHECK:STDOUT: %X.loc17_19.1 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -379,8 +379,8 @@ impl i32 as I { // CHECK:STDOUT: %T.patt.loc17_10.2 => constants.%T.patt // CHECK:STDOUT: %T.loc17_10.1 => constants.%I.type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6cb -// CHECK:STDOUT: %X.patt.loc17_20.2 => constants.%X.patt.3b7 -// CHECK:STDOUT: %X.loc17_20.1 => constants.%I.facet.858 +// CHECK:STDOUT: %X.patt.loc17_19.2 => constants.%X.patt.3b7 +// CHECK:STDOUT: %X.loc17_19.1 => constants.%I.facet.858 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/forward_decls.carbon b/toolchain/check/testdata/impl/forward_decls.carbon index 9300da0e5076..7f2e94dcc433 100644 --- a/toolchain/check/testdata/impl/forward_decls.carbon +++ b/toolchain/check/testdata/impl/forward_decls.carbon @@ -47,7 +47,7 @@ impl {} as I & I {} library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } impl {} as I where .T = (); @@ -57,7 +57,7 @@ impl {} as I where .T = () {} library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } class C {} impl C as I where .T = (); @@ -70,7 +70,7 @@ impl C as I where .T = () {} library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } class C {} impl C as I where .T = (); @@ -83,7 +83,7 @@ impl C as I where .T = () {} library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } class C {} impl C as I; @@ -98,8 +98,8 @@ let x: (C as I).T = (); // CHECK:STDERR: impl C as I {} // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: fail_unset_associated_const.carbon:[[@LINE-14]]:7: note: associated constant declared here [AssociatedConstantHere] -// CHECK:STDERR: let T:! type; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: let T: type; +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: impl C as I {} @@ -129,8 +129,8 @@ impl D as I where .T = C {} // --- associated_const_of_parameterized.carbon library "[[@TEST_NAME]]"; -interface I(U:! type) { - let T:! type; +interface I(U: type) { + let T: type; } class C; class D {} @@ -145,13 +145,13 @@ library "[[@TEST_NAME]]"; interface I; class D {} impl D as I; -class C(T:! I); +class C(T: I); fn F(x: C(D)); interface I {} impl D as I {} -class C(T:! I) {} +class C(T: I) {} fn F(unused x: C(D)) {} @@ -174,8 +174,8 @@ interface J {} library "[[@TEST_NAME]]"; interface I { - let T:! type; - let U:! type; + let T: type; + let U: type; } class C {} @@ -185,8 +185,8 @@ impl C as I where .T = (); // CHECK:STDERR: impl C as I where .T = () {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_assigned_associated_const.carbon:[[@LINE-9]]:7: note: associated constant declared here [AssociatedConstantHere] -// CHECK:STDERR: let U:! type; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: let U: type; +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: impl C as I where .T = () {} @@ -196,8 +196,8 @@ library "[[@TEST_NAME]]"; interface X; // Allowed to use incomplete interfaces in function declarations. -fn F(_:! X); -fn G[U:! X](u: U); +fn F(generic _: X); +fn G[U: X](u: U); class C; @@ -224,8 +224,8 @@ fn H(c: C) { // The above declarations require that `interface Y`, `fn F` (since it is // generic), and `impl C as X` are defined in the same file. interface Y {} -fn F(_:! X) {} -fn G[U:! X](unused u: U) {} +fn F(generic _: X) {} +fn G[U: X](unused u: U) {} impl C as Y; impl C as X {} impl C as Y {} @@ -1204,9 +1204,9 @@ impl C as Y {} // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %U.patt.loc3_14.1: %pattern_type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc3_14.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_16.1: type = splice_block %.loc3_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc3_14.2: type = symbolic_binding U, 0 [symbolic = %U.loc3_14.1 (constants.%U)] // CHECK:STDOUT: } @@ -1265,10 +1265,10 @@ impl C as Y {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%U.loc3_14.1)> [symbolic = %I.type (constants.%I.type.3fe)] -// CHECK:STDOUT: %Self.loc3_23.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc3_22.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self.191)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_23.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc3_22.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self.191)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -1277,7 +1277,7 @@ impl C as Y {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_23.1 +// CHECK:STDOUT: .Self = %Self.loc3_22.1 // CHECK:STDOUT: .T = @T.%assoc0 // CHECK:STDOUT: witness = (@I.WithSelf.%T) // CHECK:STDOUT: @@ -1326,7 +1326,7 @@ impl C as Y {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.c9e -// CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.29c +// CHECK:STDOUT: %Self.loc3_22.2 => constants.%Self.29c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%C, constants.%Self.191) { @@ -1816,25 +1816,25 @@ impl C as Y {} // CHECK:STDOUT: %.Self.frozen.loc6: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %X.ref.loc6: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %_.loc6_7.2: %X.type = symbolic_binding _, 0 [symbolic = %_.loc6_7.1 (constants.%_)] +// CHECK:STDOUT: %_.loc6_15.2: %X.type = symbolic_binding _, 0 [symbolic = %_.loc6_15.1 (constants.%_)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl.loc7: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %U.patt.loc35: %pattern_type.ffc = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7 (constants.%U.patt)] // CHECK:STDOUT: %u.param_patt.loc35: @G.%pattern_type (%pattern_type.fa2) = value_param_pattern [symbolic = %u.param_patt.loc7 (constants.%u.param_patt.796)] // CHECK:STDOUT: %u.patt.loc35: @G.%pattern_type (%pattern_type.fa2) = at_binding_pattern u, %u.param_patt.loc35 [symbolic = %u.patt.loc7 (constants.%u.patt.dae)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_10: type = splice_block %X.ref.loc7 [concrete = constants.%X.type] { +// CHECK:STDOUT: %.loc7_9: type = splice_block %X.ref.loc7 [concrete = constants.%X.type] { // CHECK:STDOUT: %.Self.frozen.loc7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %X.ref.loc7: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc7_7.2: %X.type = symbolic_binding U, 0 [symbolic = %U.loc7_7.1 (constants.%U)] -// CHECK:STDOUT: %u.param.loc7: @G.%U.as_type.loc7_16.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc7_16.1: type = splice_block %.loc7_16.2 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)] { +// CHECK:STDOUT: %u.param.loc7: @G.%U.as_type.loc7_15.1 (%U.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc7_15.1: type = splice_block %.loc7_15.2 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)] { // CHECK:STDOUT: %U.ref.loc7: %X.type = name_ref U, %U.loc7_7.2 [symbolic = %U.loc7_7.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc7_16.2: type = facet_access_type %U.ref.loc7 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc7_16.2: type = converted %U.ref.loc7, %U.as_type.loc7_16.2 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.as_type.loc7_15.2: type = facet_access_type %U.ref.loc7 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc7_15.2: type = converted %U.ref.loc7, %U.as_type.loc7_15.2 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u.loc7: @G.%U.as_type.loc7_16.1 (%U.as_type) = wrapper_binding u, %u.param.loc7 +// CHECK:STDOUT: %u.loc7: @G.%U.as_type.loc7_15.1 (%U.as_type) = wrapper_binding u, %u.param.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl.loc9: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: impl_decl @C.as.X.impl [concrete] {} { @@ -1860,25 +1860,25 @@ impl C as Y {} // CHECK:STDOUT: %.Self.frozen.loc34: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %X.ref.loc34: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %_.loc34: %X.type = symbolic_binding _, 0 [symbolic = %_.loc6_7.1 (constants.%_)] +// CHECK:STDOUT: %_.loc34: %X.type = symbolic_binding _, 0 [symbolic = %_.loc6_15.1 (constants.%_)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl.loc35: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %U.patt.loc35: %pattern_type.ffc = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7 (constants.%U.patt)] // CHECK:STDOUT: %u.param_patt.loc35: @G.%pattern_type (%pattern_type.fa2) = value_param_pattern [symbolic = %u.param_patt.loc7 (constants.%u.param_patt.796)] // CHECK:STDOUT: %u.patt.loc35: @G.%pattern_type (%pattern_type.fa2) = at_binding_pattern u, %u.param_patt.loc35 [symbolic = %u.patt.loc7 (constants.%u.patt.dae)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc35_10: type = splice_block %X.ref.loc35 [concrete = constants.%X.type] { +// CHECK:STDOUT: %.loc35_9: type = splice_block %X.ref.loc35 [concrete = constants.%X.type] { // CHECK:STDOUT: %.Self.frozen.loc35: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %X.ref.loc35: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc35: %X.type = symbolic_binding U, 0 [symbolic = %U.loc7_7.1 (constants.%U)] -// CHECK:STDOUT: %u.param.loc35: @G.%U.as_type.loc7_16.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc35_23.1: type = splice_block %.loc35_23.2 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)] { +// CHECK:STDOUT: %u.param.loc35: @G.%U.as_type.loc7_15.1 (%U.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc35_22.1: type = splice_block %.loc35_22.2 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)] { // CHECK:STDOUT: %U.ref.loc35: %X.type = name_ref U, %U.loc35 [symbolic = %U.loc7_7.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc35: type = facet_access_type %U.ref.loc35 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc35_23.2: type = converted %U.ref.loc35, %U.as_type.loc35 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.as_type.loc35: type = facet_access_type %U.ref.loc35 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc35_22.2: type = converted %U.ref.loc35, %U.as_type.loc35 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u.loc35: @G.%U.as_type.loc7_16.1 (%U.as_type) = wrapper_binding u, %u.param.loc35 +// CHECK:STDOUT: %u.loc35: @G.%U.as_type.loc7_15.1 (%U.as_type) = wrapper_binding u, %u.param.loc35 // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @C.as.Y.impl [concrete] {} { // CHECK:STDOUT: %C.ref.loc36: type = name_ref C, file.%C.decl.loc9 [concrete = constants.%C] @@ -1946,9 +1946,9 @@ impl C as Y {} // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%_.loc6_7.2: %X.type) { +// CHECK:STDOUT: generic fn @F(%_.loc6_15.2: %X.type) { // CHECK:STDOUT: %_.patt.loc6: %pattern_type.ffc = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc6 (constants.%_.patt)] -// CHECK:STDOUT: %_.loc6_7.1: %X.type = symbolic_binding _, 0 [symbolic = %_.loc6_7.1 (constants.%_)] +// CHECK:STDOUT: %_.loc6_15.1: %X.type = symbolic_binding _, 0 [symbolic = %_.loc6_15.1 (constants.%_)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1963,15 +1963,15 @@ impl C as Y {} // CHECK:STDOUT: generic fn @G(%U.loc7_7.2: %X.type) { // CHECK:STDOUT: %U.patt.loc7: %pattern_type.ffc = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7 (constants.%U.patt)] // CHECK:STDOUT: %U.loc7_7.1: %X.type = symbolic_binding U, 0 [symbolic = %U.loc7_7.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc7_16.1: type = facet_access_type %U.loc7_7.1 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc7_16.1 [symbolic = %pattern_type (constants.%pattern_type.fa2)] +// CHECK:STDOUT: %U.as_type.loc7_15.1: type = facet_access_type %U.loc7_7.1 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc7_15.1 [symbolic = %pattern_type (constants.%pattern_type.fa2)] // CHECK:STDOUT: %u.param_patt.loc7: @G.%pattern_type (%pattern_type.fa2) = value_param_pattern [symbolic = %u.param_patt.loc7 (constants.%u.param_patt.796)] // CHECK:STDOUT: %u.patt.loc7: @G.%pattern_type (%pattern_type.fa2) = at_binding_pattern u, %u.param_patt.loc7 [symbolic = %u.patt.loc7 (constants.%u.patt.dae)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc7_16.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc7_15.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param.loc35: @G.%U.as_type.loc7_16.1 (%U.as_type)) { +// CHECK:STDOUT: fn(%u.param.loc35: @G.%U.as_type.loc7_15.1 (%U.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -2002,13 +2002,13 @@ impl C as Y {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%_) { // CHECK:STDOUT: %_.patt.loc6 => constants.%_.patt -// CHECK:STDOUT: %_.loc6_7.1 => constants.%_ +// CHECK:STDOUT: %_.loc6_15.1 => constants.%_ // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%U) { // CHECK:STDOUT: %U.patt.loc7 => constants.%U.patt // CHECK:STDOUT: %U.loc7_7.1 => constants.%U -// CHECK:STDOUT: %U.as_type.loc7_16.1 => constants.%U.as_type +// CHECK:STDOUT: %U.as_type.loc7_15.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fa2 // CHECK:STDOUT: %u.param_patt.loc7 => constants.%u.param_patt.796 // CHECK:STDOUT: %u.patt.loc7 => constants.%u.patt.dae @@ -2020,7 +2020,7 @@ impl C as Y {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%X.facet) { // CHECK:STDOUT: %_.patt.loc6 => constants.%_.patt -// CHECK:STDOUT: %_.loc6_7.1 => constants.%X.facet +// CHECK:STDOUT: %_.loc6_15.1 => constants.%X.facet // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -2028,7 +2028,7 @@ impl C as Y {} // CHECK:STDOUT: specific @G(constants.%X.facet) { // CHECK:STDOUT: %U.patt.loc7 => constants.%U.patt // CHECK:STDOUT: %U.loc7_7.1 => constants.%X.facet -// CHECK:STDOUT: %U.as_type.loc7_16.1 => constants.%C +// CHECK:STDOUT: %U.as_type.loc7_15.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b // CHECK:STDOUT: %u.param_patt.loc7 => constants.%u.param_patt.162 // CHECK:STDOUT: %u.patt.loc7 => constants.%u.patt.0e4 diff --git a/toolchain/check/testdata/impl/generic_redeclaration.carbon b/toolchain/check/testdata/impl/generic_redeclaration.carbon index 0afc68ecd973..5b3d4913023c 100644 --- a/toolchain/check/testdata/impl/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/generic_redeclaration.carbon @@ -24,38 +24,38 @@ interface K {} interface L {} // TODO: Put these in a match_first so the test will pass again. -impl forall [T:! I] T as Interface; -impl forall [T:! J] T as Interface; -impl forall [T:! K] T as Interface; -impl forall [T:! L] T as Interface; +impl forall [T: I] T as Interface; +impl forall [T: J] T as Interface; +impl forall [T: K] T as Interface; +impl forall [T: L] T as Interface; // These are different impls, so they are not redefinitions, even though the // self type and constraint type are the same. -impl forall [T:! I] T as Interface {} +impl forall [T: I] T as Interface {} // CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure] -// CHECK:STDERR: impl forall [T:! J] T as Interface {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: J] T as Interface {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE-4]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote] -// CHECK:STDERR: impl forall [T:! I] T as Interface {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: I] T as Interface {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! J] T as Interface {} +impl forall [T: J] T as Interface {} // CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure] -// CHECK:STDERR: impl forall [T:! K] T as Interface {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: K] T as Interface {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE-12]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote] -// CHECK:STDERR: impl forall [T:! I] T as Interface {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: I] T as Interface {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! K] T as Interface {} +impl forall [T: K] T as Interface {} // CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure] -// CHECK:STDERR: impl forall [T:! L] T as Interface {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: L] T as Interface {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE-20]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote] -// CHECK:STDERR: impl forall [T:! I] T as Interface {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: I] T as Interface {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! L] T as Interface {} +impl forall [T: L] T as Interface {} // --- fail_same_self_and_interface_redefined.carbon @@ -64,15 +64,15 @@ library "[[@TEST_NAME]]"; interface I {} interface J {} -impl forall [T:! I] T as J {} +impl forall [T: I] T as J {} // CHECK:STDERR: fail_same_self_and_interface_redefined.carbon:[[@LINE+7]]:1: error: redefinition of `impl T as J` [ImplRedefinition] -// CHECK:STDERR: impl forall [T:! I] T as J {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: I] T as J {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_same_self_and_interface_redefined.carbon:[[@LINE-4]]:1: note: previous definition was here [ImplPreviousDefinition] -// CHECK:STDERR: impl forall [T:! I] T as J {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: I] T as J {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! I] T as J {} +impl forall [T: I] T as J {} // --- fail_same_type_different_spelling.carbon @@ -97,18 +97,18 @@ impl (C, C).0 as I {} interface I {} -impl forall [T:! type] T as I { +impl forall [T: type] T as I { fn A() {} } // CHECK:STDERR: fail_redefinition_generic_regions.carbon:[[@LINE+7]]:1: error: redefinition of `impl T as I` [ImplRedefinition] -// CHECK:STDERR: impl forall [T:! type] T as I { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] T as I { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_redefinition_generic_regions.carbon:[[@LINE-7]]:1: note: previous definition was here [ImplPreviousDefinition] -// CHECK:STDERR: impl forall [T:! type] T as I { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] T as I { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] T as I { +impl forall [T: type] T as I { // Although not referenced, B has the same generic region index of A, and // makes C a different index. We used to merge, and this was a crash. fn B() {} @@ -185,10 +185,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt.1df)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc12: %I.type = name_ref T, %T.loc12_15.1 [symbolic = %T.loc12_15.2 (constants.%T.dda)] -// CHECK:STDOUT: %T.as_type.loc12_21.1: type = facet_access_type %T.ref.loc12 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b38)] -// CHECK:STDOUT: %.loc12_21: type = converted %T.ref.loc12, %T.as_type.loc12_21.1 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %T.as_type.loc12_20.1: type = facet_access_type %T.ref.loc12 [symbolic = %T.as_type.loc12_20.2 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %.loc12_20: type = converted %T.ref.loc12, %T.as_type.loc12_20.1 [symbolic = %T.as_type.loc12_20.2 (constants.%T.as_type.b38)] // CHECK:STDOUT: %Interface.ref.loc12: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %.loc12_18: type = splice_block %I.ref.loc12 [concrete = constants.%I.type] { +// CHECK:STDOUT: %.loc12_17: type = splice_block %I.ref.loc12 [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen.loc12: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref.loc12: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } @@ -198,10 +198,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.ac1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc13: %J.type = name_ref T, %T.loc13_15.1 [symbolic = %T.loc13_15.2 (constants.%T.e40)] -// CHECK:STDOUT: %T.as_type.loc13_21.1: type = facet_access_type %T.ref.loc13 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.d90)] -// CHECK:STDOUT: %.loc13_21: type = converted %T.ref.loc13, %T.as_type.loc13_21.1 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.d90)] +// CHECK:STDOUT: %T.as_type.loc13_20.1: type = facet_access_type %T.ref.loc13 [symbolic = %T.as_type.loc13_20.2 (constants.%T.as_type.d90)] +// CHECK:STDOUT: %.loc13_20: type = converted %T.ref.loc13, %T.as_type.loc13_20.1 [symbolic = %T.as_type.loc13_20.2 (constants.%T.as_type.d90)] // CHECK:STDOUT: %Interface.ref.loc13: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %.loc13_18: type = splice_block %J.ref.loc13 [concrete = constants.%J.type] { +// CHECK:STDOUT: %.loc13_17: type = splice_block %J.ref.loc13 [concrete = constants.%J.type] { // CHECK:STDOUT: %.Self.frozen.loc13: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %J.ref.loc13: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } @@ -211,10 +211,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.patt.loc14_15.1: %pattern_type.b64 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_15.2 (constants.%T.patt.0ef)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc14: %K.type = name_ref T, %T.loc14_15.1 [symbolic = %T.loc14_15.2 (constants.%T.062)] -// CHECK:STDOUT: %T.as_type.loc14_21.1: type = facet_access_type %T.ref.loc14 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.1ea)] -// CHECK:STDOUT: %.loc14_21: type = converted %T.ref.loc14, %T.as_type.loc14_21.1 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.1ea)] +// CHECK:STDOUT: %T.as_type.loc14_20.1: type = facet_access_type %T.ref.loc14 [symbolic = %T.as_type.loc14_20.2 (constants.%T.as_type.1ea)] +// CHECK:STDOUT: %.loc14_20: type = converted %T.ref.loc14, %T.as_type.loc14_20.1 [symbolic = %T.as_type.loc14_20.2 (constants.%T.as_type.1ea)] // CHECK:STDOUT: %Interface.ref.loc14: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %.loc14_18: type = splice_block %K.ref.loc14 [concrete = constants.%K.type] { +// CHECK:STDOUT: %.loc14_17: type = splice_block %K.ref.loc14 [concrete = constants.%K.type] { // CHECK:STDOUT: %.Self.frozen.loc14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %K.ref.loc14: type = name_ref K, file.%K.decl [concrete = constants.%K.type] // CHECK:STDOUT: } @@ -224,10 +224,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.patt.loc15_15.1: %pattern_type.25e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.b11)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc15: %L.type = name_ref T, %T.loc15_15.1 [symbolic = %T.loc15_15.2 (constants.%T.709)] -// CHECK:STDOUT: %T.as_type.loc15_21.1: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.56f)] -// CHECK:STDOUT: %.loc15_21: type = converted %T.ref.loc15, %T.as_type.loc15_21.1 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.56f)] +// CHECK:STDOUT: %T.as_type.loc15_20.1: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type.56f)] +// CHECK:STDOUT: %.loc15_20: type = converted %T.ref.loc15, %T.as_type.loc15_20.1 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type.56f)] // CHECK:STDOUT: %Interface.ref.loc15: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %.loc15_18: type = splice_block %L.ref.loc15 [concrete = constants.%L.type] { +// CHECK:STDOUT: %.loc15_17: type = splice_block %L.ref.loc15 [concrete = constants.%L.type] { // CHECK:STDOUT: %.Self.frozen.loc15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %L.ref.loc15: type = name_ref L, file.%L.decl [concrete = constants.%L.type] // CHECK:STDOUT: } @@ -237,10 +237,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt.1df)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc19: %I.type = name_ref T, %T.loc19 [symbolic = %T.loc12_15.2 (constants.%T.dda)] -// CHECK:STDOUT: %T.as_type.loc19: type = facet_access_type %T.ref.loc19 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b38)] -// CHECK:STDOUT: %.loc19_21: type = converted %T.ref.loc19, %T.as_type.loc19 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %T.as_type.loc19: type = facet_access_type %T.ref.loc19 [symbolic = %T.as_type.loc12_20.2 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %.loc19_20: type = converted %T.ref.loc19, %T.as_type.loc19 [symbolic = %T.as_type.loc12_20.2 (constants.%T.as_type.b38)] // CHECK:STDOUT: %Interface.ref.loc19: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %.loc19_18: type = splice_block %I.ref.loc19 [concrete = constants.%I.type] { +// CHECK:STDOUT: %.loc19_17: type = splice_block %I.ref.loc19 [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen.loc19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref.loc19: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } @@ -250,10 +250,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.ac1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc27: %J.type = name_ref T, %T.loc27 [symbolic = %T.loc13_15.2 (constants.%T.e40)] -// CHECK:STDOUT: %T.as_type.loc27: type = facet_access_type %T.ref.loc27 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.d90)] -// CHECK:STDOUT: %.loc27_21: type = converted %T.ref.loc27, %T.as_type.loc27 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.d90)] +// CHECK:STDOUT: %T.as_type.loc27: type = facet_access_type %T.ref.loc27 [symbolic = %T.as_type.loc13_20.2 (constants.%T.as_type.d90)] +// CHECK:STDOUT: %.loc27_20: type = converted %T.ref.loc27, %T.as_type.loc27 [symbolic = %T.as_type.loc13_20.2 (constants.%T.as_type.d90)] // CHECK:STDOUT: %Interface.ref.loc27: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %.loc27_18: type = splice_block %J.ref.loc27 [concrete = constants.%J.type] { +// CHECK:STDOUT: %.loc27_17: type = splice_block %J.ref.loc27 [concrete = constants.%J.type] { // CHECK:STDOUT: %.Self.frozen.loc27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %J.ref.loc27: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } @@ -263,10 +263,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.patt.loc14_15.1: %pattern_type.b64 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_15.2 (constants.%T.patt.0ef)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc35: %K.type = name_ref T, %T.loc35 [symbolic = %T.loc14_15.2 (constants.%T.062)] -// CHECK:STDOUT: %T.as_type.loc35: type = facet_access_type %T.ref.loc35 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.1ea)] -// CHECK:STDOUT: %.loc35_21: type = converted %T.ref.loc35, %T.as_type.loc35 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.1ea)] +// CHECK:STDOUT: %T.as_type.loc35: type = facet_access_type %T.ref.loc35 [symbolic = %T.as_type.loc14_20.2 (constants.%T.as_type.1ea)] +// CHECK:STDOUT: %.loc35_20: type = converted %T.ref.loc35, %T.as_type.loc35 [symbolic = %T.as_type.loc14_20.2 (constants.%T.as_type.1ea)] // CHECK:STDOUT: %Interface.ref.loc35: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %.loc35_18: type = splice_block %K.ref.loc35 [concrete = constants.%K.type] { +// CHECK:STDOUT: %.loc35_17: type = splice_block %K.ref.loc35 [concrete = constants.%K.type] { // CHECK:STDOUT: %.Self.frozen.loc35: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %K.ref.loc35: type = name_ref K, file.%K.decl [concrete = constants.%K.type] // CHECK:STDOUT: } @@ -276,10 +276,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.patt.loc15_15.1: %pattern_type.25e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.b11)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc43: %L.type = name_ref T, %T.loc43 [symbolic = %T.loc15_15.2 (constants.%T.709)] -// CHECK:STDOUT: %T.as_type.loc43: type = facet_access_type %T.ref.loc43 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.56f)] -// CHECK:STDOUT: %.loc43_21: type = converted %T.ref.loc43, %T.as_type.loc43 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.56f)] +// CHECK:STDOUT: %T.as_type.loc43: type = facet_access_type %T.ref.loc43 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type.56f)] +// CHECK:STDOUT: %.loc43_20: type = converted %T.ref.loc43, %T.as_type.loc43 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type.56f)] // CHECK:STDOUT: %Interface.ref.loc43: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %.loc43_18: type = splice_block %L.ref.loc43 [concrete = constants.%L.type] { +// CHECK:STDOUT: %.loc43_17: type = splice_block %L.ref.loc43 [concrete = constants.%L.type] { // CHECK:STDOUT: %.Self.frozen.loc43: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %L.ref.loc43: type = name_ref L, file.%L.decl [concrete = constants.%L.type] // CHECK:STDOUT: } @@ -355,72 +355,72 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: generic impl @T.as_type.as.Interface.impl.72f(%T.loc12_15.1: %I.type) { // CHECK:STDOUT: %T.patt.loc12_15.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt.1df)] // CHECK:STDOUT: %T.loc12_15.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc12_15.2 (constants.%T.dda)] -// CHECK:STDOUT: %T.as_type.loc12_21.2: type = facet_access_type %T.loc12_15.2 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b38)] -// CHECK:STDOUT: %Interface.impl_witness.loc12_35.2: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.72f(%T.loc12_15.2) [symbolic = %Interface.impl_witness.loc12_35.2 (constants.%Interface.impl_witness.5b0)] +// CHECK:STDOUT: %T.as_type.loc12_20.2: type = facet_access_type %T.loc12_15.2 [symbolic = %T.as_type.loc12_20.2 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %Interface.impl_witness.loc12_34.2: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.72f(%T.loc12_15.2) [symbolic = %Interface.impl_witness.loc12_34.2 (constants.%Interface.impl_witness.5b0)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc12_21 as %Interface.ref.loc12 { +// CHECK:STDOUT: impl: %.loc12_20 as %Interface.ref.loc12 { // CHECK:STDOUT: %Interface.impl_witness_table = impl_witness_table (), @T.as_type.as.Interface.impl.72f [concrete] -// CHECK:STDOUT: %Interface.impl_witness.loc12_35.1: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.72f(constants.%T.dda) [symbolic = %Interface.impl_witness.loc12_35.2 (constants.%Interface.impl_witness.5b0)] +// CHECK:STDOUT: %Interface.impl_witness.loc12_34.1: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.72f(constants.%T.dda) [symbolic = %Interface.impl_witness.loc12_34.2 (constants.%Interface.impl_witness.5b0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %Interface.ref.loc12 -// CHECK:STDOUT: witness = %Interface.impl_witness.loc12_35.1 +// CHECK:STDOUT: witness = %Interface.impl_witness.loc12_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @T.as_type.as.Interface.impl.24e(%T.loc13_15.1: %J.type) { // CHECK:STDOUT: %T.patt.loc13_15.2: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.ac1)] // CHECK:STDOUT: %T.loc13_15.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc13_15.2 (constants.%T.e40)] -// CHECK:STDOUT: %T.as_type.loc13_21.2: type = facet_access_type %T.loc13_15.2 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.d90)] -// CHECK:STDOUT: %Interface.impl_witness.loc13_35.2: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.24e(%T.loc13_15.2) [symbolic = %Interface.impl_witness.loc13_35.2 (constants.%Interface.impl_witness.614)] +// CHECK:STDOUT: %T.as_type.loc13_20.2: type = facet_access_type %T.loc13_15.2 [symbolic = %T.as_type.loc13_20.2 (constants.%T.as_type.d90)] +// CHECK:STDOUT: %Interface.impl_witness.loc13_34.2: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.24e(%T.loc13_15.2) [symbolic = %Interface.impl_witness.loc13_34.2 (constants.%Interface.impl_witness.614)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc13_21 as %Interface.ref.loc13 { +// CHECK:STDOUT: impl: %.loc13_20 as %Interface.ref.loc13 { // CHECK:STDOUT: %Interface.impl_witness_table = impl_witness_table (), @T.as_type.as.Interface.impl.24e [concrete] -// CHECK:STDOUT: %Interface.impl_witness.loc13_35.1: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.24e(constants.%T.e40) [symbolic = %Interface.impl_witness.loc13_35.2 (constants.%Interface.impl_witness.614)] +// CHECK:STDOUT: %Interface.impl_witness.loc13_34.1: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.24e(constants.%T.e40) [symbolic = %Interface.impl_witness.loc13_34.2 (constants.%Interface.impl_witness.614)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %Interface.ref.loc13 -// CHECK:STDOUT: witness = %Interface.impl_witness.loc13_35.1 +// CHECK:STDOUT: witness = %Interface.impl_witness.loc13_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @T.as_type.as.Interface.impl.b21(%T.loc14_15.1: %K.type) { // CHECK:STDOUT: %T.patt.loc14_15.2: %pattern_type.b64 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_15.2 (constants.%T.patt.0ef)] // CHECK:STDOUT: %T.loc14_15.2: %K.type = symbolic_binding T, 0 [symbolic = %T.loc14_15.2 (constants.%T.062)] -// CHECK:STDOUT: %T.as_type.loc14_21.2: type = facet_access_type %T.loc14_15.2 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.1ea)] -// CHECK:STDOUT: %Interface.impl_witness.loc14_35.2: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.b21(%T.loc14_15.2) [symbolic = %Interface.impl_witness.loc14_35.2 (constants.%Interface.impl_witness.bda)] +// CHECK:STDOUT: %T.as_type.loc14_20.2: type = facet_access_type %T.loc14_15.2 [symbolic = %T.as_type.loc14_20.2 (constants.%T.as_type.1ea)] +// CHECK:STDOUT: %Interface.impl_witness.loc14_34.2: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.b21(%T.loc14_15.2) [symbolic = %Interface.impl_witness.loc14_34.2 (constants.%Interface.impl_witness.bda)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc14_21 as %Interface.ref.loc14 { +// CHECK:STDOUT: impl: %.loc14_20 as %Interface.ref.loc14 { // CHECK:STDOUT: %Interface.impl_witness_table = impl_witness_table (), @T.as_type.as.Interface.impl.b21 [concrete] -// CHECK:STDOUT: %Interface.impl_witness.loc14_35.1: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.b21(constants.%T.062) [symbolic = %Interface.impl_witness.loc14_35.2 (constants.%Interface.impl_witness.bda)] +// CHECK:STDOUT: %Interface.impl_witness.loc14_34.1: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.b21(constants.%T.062) [symbolic = %Interface.impl_witness.loc14_34.2 (constants.%Interface.impl_witness.bda)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %Interface.ref.loc14 -// CHECK:STDOUT: witness = %Interface.impl_witness.loc14_35.1 +// CHECK:STDOUT: witness = %Interface.impl_witness.loc14_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @T.as_type.as.Interface.impl.2b4(%T.loc15_15.1: %L.type) { // CHECK:STDOUT: %T.patt.loc15_15.2: %pattern_type.25e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.b11)] // CHECK:STDOUT: %T.loc15_15.2: %L.type = symbolic_binding T, 0 [symbolic = %T.loc15_15.2 (constants.%T.709)] -// CHECK:STDOUT: %T.as_type.loc15_21.2: type = facet_access_type %T.loc15_15.2 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.56f)] -// CHECK:STDOUT: %Interface.impl_witness.loc15_35.2: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.2b4(%T.loc15_15.2) [symbolic = %Interface.impl_witness.loc15_35.2 (constants.%Interface.impl_witness.9d3)] +// CHECK:STDOUT: %T.as_type.loc15_20.2: type = facet_access_type %T.loc15_15.2 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type.56f)] +// CHECK:STDOUT: %Interface.impl_witness.loc15_34.2: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.2b4(%T.loc15_15.2) [symbolic = %Interface.impl_witness.loc15_34.2 (constants.%Interface.impl_witness.9d3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc15_21 as %Interface.ref.loc15 { +// CHECK:STDOUT: impl: %.loc15_20 as %Interface.ref.loc15 { // CHECK:STDOUT: %Interface.impl_witness_table = impl_witness_table (), @T.as_type.as.Interface.impl.2b4 [concrete] -// CHECK:STDOUT: %Interface.impl_witness.loc15_35.1: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.2b4(constants.%T.709) [symbolic = %Interface.impl_witness.loc15_35.2 (constants.%Interface.impl_witness.9d3)] +// CHECK:STDOUT: %Interface.impl_witness.loc15_34.1: = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.2b4(constants.%T.709) [symbolic = %Interface.impl_witness.loc15_34.2 (constants.%Interface.impl_witness.9d3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %Interface.ref.loc15 -// CHECK:STDOUT: witness = %Interface.impl_witness.loc15_35.1 +// CHECK:STDOUT: witness = %Interface.impl_witness.loc15_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -447,29 +447,29 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: specific @T.as_type.as.Interface.impl.72f(constants.%T.dda) { // CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt.1df // CHECK:STDOUT: %T.loc12_15.2 => constants.%T.dda -// CHECK:STDOUT: %T.as_type.loc12_21.2 => constants.%T.as_type.b38 -// CHECK:STDOUT: %Interface.impl_witness.loc12_35.2 => constants.%Interface.impl_witness.5b0 +// CHECK:STDOUT: %T.as_type.loc12_20.2 => constants.%T.as_type.b38 +// CHECK:STDOUT: %Interface.impl_witness.loc12_34.2 => constants.%Interface.impl_witness.5b0 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as_type.as.Interface.impl.24e(constants.%T.e40) { // CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt.ac1 // CHECK:STDOUT: %T.loc13_15.2 => constants.%T.e40 -// CHECK:STDOUT: %T.as_type.loc13_21.2 => constants.%T.as_type.d90 -// CHECK:STDOUT: %Interface.impl_witness.loc13_35.2 => constants.%Interface.impl_witness.614 +// CHECK:STDOUT: %T.as_type.loc13_20.2 => constants.%T.as_type.d90 +// CHECK:STDOUT: %Interface.impl_witness.loc13_34.2 => constants.%Interface.impl_witness.614 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as_type.as.Interface.impl.b21(constants.%T.062) { // CHECK:STDOUT: %T.patt.loc14_15.2 => constants.%T.patt.0ef // CHECK:STDOUT: %T.loc14_15.2 => constants.%T.062 -// CHECK:STDOUT: %T.as_type.loc14_21.2 => constants.%T.as_type.1ea -// CHECK:STDOUT: %Interface.impl_witness.loc14_35.2 => constants.%Interface.impl_witness.bda +// CHECK:STDOUT: %T.as_type.loc14_20.2 => constants.%T.as_type.1ea +// CHECK:STDOUT: %Interface.impl_witness.loc14_34.2 => constants.%Interface.impl_witness.bda // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as_type.as.Interface.impl.2b4(constants.%T.709) { // CHECK:STDOUT: %T.patt.loc15_15.2 => constants.%T.patt.b11 // CHECK:STDOUT: %T.loc15_15.2 => constants.%T.709 -// CHECK:STDOUT: %T.as_type.loc15_21.2 => constants.%T.as_type.56f -// CHECK:STDOUT: %Interface.impl_witness.loc15_35.2 => constants.%Interface.impl_witness.9d3 +// CHECK:STDOUT: %T.as_type.loc15_20.2 => constants.%T.as_type.56f +// CHECK:STDOUT: %Interface.impl_witness.loc15_34.2 => constants.%Interface.impl_witness.9d3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Interface.WithSelf(constants.%Interface.facet.8e9) { @@ -525,10 +525,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.patt.loc7_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc7_15.1 [symbolic = %T.loc7_15.2 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc7_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc7_21: type = converted %T.ref, %T.as_type.loc7_21.1 [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc7_20.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc7_20: type = converted %T.ref, %T.as_type.loc7_20.1 [symbolic = %T.as_type.loc7_20.2 (constants.%T.as_type)] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.loc7_18: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %.loc7_17: type = splice_block %I.ref [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } @@ -538,10 +538,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.patt.loc15_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc15_15.1 [symbolic = %T.loc15_15.2 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc15_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc15_21: type = converted %T.ref, %T.as_type.loc15_21.1 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc15_20.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc15_20: type = converted %T.ref, %T.as_type.loc15_20.1 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type)] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.loc15_18: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %.loc15_17: type = splice_block %I.ref [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } @@ -578,29 +578,29 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: generic impl @T.as_type.as.J.impl.377648.1(%T.loc7_15.1: %I.type) { // CHECK:STDOUT: %T.patt.loc7_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc7_15.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc7_15.2 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc7_21.2: type = facet_access_type %T.loc7_15.2 [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)] -// CHECK:STDOUT: %J.impl_witness.loc7_28.2: = impl_witness %J.impl_witness_table, @T.as_type.as.J.impl.377648.1(%T.loc7_15.2) [symbolic = %J.impl_witness.loc7_28.2 (constants.%J.impl_witness)] +// CHECK:STDOUT: %T.as_type.loc7_20.2: type = facet_access_type %T.loc7_15.2 [symbolic = %T.as_type.loc7_20.2 (constants.%T.as_type)] +// CHECK:STDOUT: %J.impl_witness.loc7_27.2: = impl_witness %J.impl_witness_table, @T.as_type.as.J.impl.377648.1(%T.loc7_15.2) [symbolic = %J.impl_witness.loc7_27.2 (constants.%J.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc7_21 as %J.ref { +// CHECK:STDOUT: impl: %.loc7_20 as %J.ref { // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @T.as_type.as.J.impl.377648.1 [concrete] -// CHECK:STDOUT: %J.impl_witness.loc7_28.1: = impl_witness %J.impl_witness_table, @T.as_type.as.J.impl.377648.1(constants.%T) [symbolic = %J.impl_witness.loc7_28.2 (constants.%J.impl_witness)] +// CHECK:STDOUT: %J.impl_witness.loc7_27.1: = impl_witness %J.impl_witness_table, @T.as_type.as.J.impl.377648.1(constants.%T) [symbolic = %J.impl_witness.loc7_27.2 (constants.%J.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %J.ref -// CHECK:STDOUT: witness = %J.impl_witness.loc7_28.1 +// CHECK:STDOUT: witness = %J.impl_witness.loc7_27.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @T.as_type.as.J.impl.377648.2(%T.loc15_15.1: %I.type) { // CHECK:STDOUT: %T.patt.loc15_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc15_15.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc15_15.2 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc15_21.2: type = facet_access_type %T.loc15_15.2 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc15_20.2: type = facet_access_type %T.loc15_15.2 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc15_21 as %J.ref { +// CHECK:STDOUT: impl: %.loc15_20 as %J.ref { // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %J.ref // CHECK:STDOUT: witness = @@ -618,8 +618,8 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: specific @T.as_type.as.J.impl.377648.1(constants.%T) { // CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_15.2 => constants.%T -// CHECK:STDOUT: %T.as_type.loc7_21.2 => constants.%T.as_type -// CHECK:STDOUT: %J.impl_witness.loc7_28.2 => constants.%J.impl_witness +// CHECK:STDOUT: %T.as_type.loc7_20.2 => constants.%T.as_type +// CHECK:STDOUT: %J.impl_witness.loc7_27.2 => constants.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J.WithSelf(constants.%J.facet) { @@ -629,7 +629,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: specific @T.as_type.as.J.impl.377648.2(constants.%T) { // CHECK:STDOUT: %T.patt.loc15_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc15_15.2 => constants.%T -// CHECK:STDOUT: %T.as_type.loc15_21.2 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc15_20.2 => constants.%T.as_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_same_type_different_spelling.carbon @@ -772,9 +772,9 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -783,9 +783,9 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_15.2 [symbolic = %T.loc15_15.1 (constants.%T)] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.loc15_18.1: type = splice_block %.loc15_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_17.1: type = splice_block %.loc15_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -807,7 +807,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: generic impl @T.as.I.impl.812d8b.1(%T.loc4_15.2: type) { // CHECK:STDOUT: %T.patt.loc4_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] -// CHECK:STDOUT: %I.impl_witness.loc4_31.2: = impl_witness %I.impl_witness_table, @T.as.I.impl.812d8b.1(%T.loc4_15.1) [symbolic = %I.impl_witness.loc4_31.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %I.impl_witness.loc4_30.2: = impl_witness %I.impl_witness_table, @T.as.I.impl.812d8b.1(%T.loc4_15.1) [symbolic = %I.impl_witness.loc4_30.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as.I.impl.A.type: type = fn_type @T.as.I.impl.A, @T.as.I.impl.812d8b.1(%T.loc4_15.1) [symbolic = %T.as.I.impl.A.type (constants.%T.as.I.impl.A.type)] @@ -816,12 +816,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: impl: %T.ref as %I.ref { // CHECK:STDOUT: %T.as.I.impl.A.decl: @T.as.I.impl.812d8b.1.%T.as.I.impl.A.type (%T.as.I.impl.A.type) = fn_decl @T.as.I.impl.A [symbolic = @T.as.I.impl.812d8b.1.%T.as.I.impl.A (constants.%T.as.I.impl.A)] {} {} // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @T.as.I.impl.812d8b.1 [concrete] -// CHECK:STDOUT: %I.impl_witness.loc4_31.1: = impl_witness %I.impl_witness_table, @T.as.I.impl.812d8b.1(constants.%T) [symbolic = %I.impl_witness.loc4_31.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %I.impl_witness.loc4_30.1: = impl_witness %I.impl_witness_table, @T.as.I.impl.812d8b.1(constants.%T) [symbolic = %I.impl_witness.loc4_30.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %T.as.I.impl.A.decl // CHECK:STDOUT: extend %I.ref -// CHECK:STDOUT: witness = %I.impl_witness.loc4_31.1 +// CHECK:STDOUT: witness = %I.impl_witness.loc4_30.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -931,7 +931,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: specific @T.as.I.impl.812d8b.1(constants.%T) { // CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_15.1 => constants.%T -// CHECK:STDOUT: %I.impl_witness.loc4_31.2 => constants.%I.impl_witness +// CHECK:STDOUT: %I.impl_witness.loc4_30.2 => constants.%I.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as.I.impl.A.type => constants.%T.as.I.impl.A.type diff --git a/toolchain/check/testdata/impl/impl_as_named_constraint.carbon b/toolchain/check/testdata/impl/impl_as_named_constraint.carbon index 94ac51ef0203..53612520727c 100644 --- a/toolchain/check/testdata/impl/impl_as_named_constraint.carbon +++ b/toolchain/check/testdata/impl/impl_as_named_constraint.carbon @@ -131,9 +131,9 @@ impl () as C {} // --- fail_duplicate_through_generic_constraint.carbon library "[[@TEST_NAME]]"; -interface A(T:! type) {} +interface A(T: type) {} -constraint B(X:! type, Y:! type) { +constraint B(X: type, Y: type) { extend require impls A(Y); } @@ -152,17 +152,17 @@ impl () as A({}) {} // --- fail_error_self_in_require.carbon library "[[@TEST_NAME]]"; -interface A(T:! type) {} +interface A(T: type) {} // This makes the type of `Self` into an ErrorInst. No `require` is added to // the constraint. //@dump-sem-ir-begin // -// CHECK:STDERR: fail_error_self_in_require.carbon:[[@LINE+4]]:18: error: name `Undefined` not found [NameNotFound] -// CHECK:STDERR: constraint B(X:! Undefined) { -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_error_self_in_require.carbon:[[@LINE+4]]:17: error: name `Undefined` not found [NameNotFound] +// CHECK:STDERR: constraint B(X: Undefined) { +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -constraint B(X:! Undefined) { +constraint B(X: Undefined) { extend require impls A(X); } //@dump-sem-ir-end @@ -173,7 +173,7 @@ impl () as B(1) {} library "[[@TEST_NAME]]"; interface I { - let I1:! type; + let I1: type; } constraint N { @@ -183,7 +183,7 @@ constraint N { class C; impl C as N where .I1 = C {} -fn F(_:! I where .I1 = .Self) {} +fn F(generic _: I where .I1 = .Self) {} fn G() { // TODO: This crashes. // F(C); @@ -192,8 +192,8 @@ fn G() { // --- impl_as_concrete_generic_constraint_where_rewrite.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { - let I1:! type; +interface I(T: type) { + let I1: type; } class C; @@ -204,7 +204,7 @@ constraint N { impl C as N where .I1 = C {} -fn F(_:! I(.Self) where .I1 = .Self) {} +fn F(generic _: I(.Self) where .I1 = .Self) {} fn G() { // TODO: This crashes. // F(C); @@ -213,8 +213,8 @@ fn G() { // --- todo_impl_as_symbolic_generic_constraint_where_rewrite.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { - let I1:! type; +interface I(T: type) { + let I1: type; } constraint N { @@ -224,7 +224,7 @@ constraint N { class C; impl C as N where .I1 = C {} -fn F(_:! I(.Self) where .I1 = .Self) {} +fn F(generic _: I(.Self) where .I1 = .Self) {} fn G() { // TODO: This crashes. // F(C); @@ -234,7 +234,7 @@ fn G() { library "[[@TEST_NAME]]"; interface I { - let I1:! type; + let I1: type; } constraint N { @@ -246,12 +246,12 @@ class C; // CHECK:STDERR: impl C as N {} // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_impl_as_constraint_containing_rewrite_for_concrete_interface.carbon:[[@LINE-11]]:7: note: associated constant declared here [AssociatedConstantHere] -// CHECK:STDERR: let I1:! type; -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: let I1: type; +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: impl C as N {} -fn F(_:! I where .I1 = .Self) {} +fn F(generic _: I where .I1 = .Self) {} fn G() { // TODO: This crashes. // F(C); @@ -260,8 +260,8 @@ fn G() { // --- fail_todo_impl_as_constraint_containing_rewrite_for_generic_interface.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) { - let I1:! type; +interface I(T: type) { + let I1: type; } constraint N { @@ -273,12 +273,12 @@ class C; // CHECK:STDERR: impl C as N {} // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_impl_as_constraint_containing_rewrite_for_generic_interface.carbon:[[@LINE-11]]:7: note: associated constant declared here [AssociatedConstantHere] -// CHECK:STDERR: let I1:! type; -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: let I1: type; +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: impl C as N {} -fn F(_:! I(.Self) where .I1 = .Self) {} +fn F(generic _: I(.Self) where .I1 = .Self) {} fn G() { // TODO: This crashes. // F(C); @@ -287,7 +287,7 @@ fn G() { // --- fail_no_require_self.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} class C; diff --git a/toolchain/check/testdata/impl/impl_assoc_const.carbon b/toolchain/check/testdata/impl/impl_assoc_const.carbon index c4fd95eada50..7b36111ef5ad 100644 --- a/toolchain/check/testdata/impl/impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/impl_assoc_const.carbon @@ -13,21 +13,21 @@ // --- success.carbon library "[[@TEST_NAME]]"; -interface I { let T:! type; } +interface I { let T: type; } impl () as I where .T = {} {} // --- success_associated.carbon library "[[@TEST_NAME]]"; -interface I { let T:! type; let U:! type; } +interface I { let T: type; let U: type; } impl () as I where .T = .U and .U = {} {} // --- redecl.carbon library "[[@TEST_NAME]]"; -interface I2 { let T2:! type; } +interface I2 { let T2: type; } impl () as I2 where .T2 = {}; impl () as I2 where .T2 = {} {} @@ -35,7 +35,7 @@ impl () as I2 where .T2 = {} {} // --- fail_redecl_adds_rewrites.carbon library "[[@TEST_NAME]]"; -interface I3 { let T3:! type; } +interface I3 { let T3: type; } // CHECK:STDERR: fail_redecl_adds_rewrites.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition] // CHECK:STDERR: impl () as I3; @@ -47,7 +47,7 @@ impl () as I3 where .T3 = {} {} // --- fail_mismatch.carbon library "[[@TEST_NAME]]"; -interface J { let U:! type; } +interface J { let U: type; } // CHECK:STDERR: fail_mismatch.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition] // CHECK:STDERR: impl () as J where .U = {}; @@ -60,9 +60,9 @@ impl () as J where .U = () {} library "[[@TEST_NAME]]"; interface I4 { - let T4:! type; - let T5:! type; - let T6:! type; + let T4: type; + let T5: type; + let T6: type; } // CHECK:STDERR: fail_mismatch_bad_value.carbon:[[@LINE+8]]:27: error: name `BAD1` not found [NameNotFound] @@ -88,15 +88,15 @@ impl () as I4 where .T4 = {.b: {}} and .T5 = BAD3 and .T6 = BAD4 {} // --- fail_missing_on_definition.carbon library "[[@TEST_NAME]]"; -interface K { let V:! type; } +interface K { let V: type; } impl () as K where .V = {}; // CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE+11]]:1: error: associated constant V not given a value in impl of interface K [ImplAssociatedConstantNeedsValue] // CHECK:STDERR: impl () as K {} // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE-6]]:19: note: associated constant declared here [AssociatedConstantHere] -// CHECK:STDERR: interface K { let V:! type; } -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: interface K { let V: type; } +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE-8]]:1: error: impl declared but not defined [ImplMissingDefinition] // CHECK:STDERR: impl () as K where .V = {}; @@ -107,7 +107,7 @@ impl () as K {} // --- fail_two_different.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } // CHECK:STDERR: fail_two_different.carbon:[[@LINE+4]]:12: error: associated constant `.(L.W)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues] // CHECK:STDERR: impl () as L where .W = {} and .W = () {} @@ -118,7 +118,7 @@ impl () as L where .W = {} and .W = () {} // --- fail_two_different_first_associated.carbon library "[[@TEST_NAME]]"; -interface L2 { let W2:! type; let X2:! type; } +interface L2 { let W2: type; let X2: type; } // CHECK:STDERR: fail_two_different_first_associated.carbon:[[@LINE+4]]:12: error: associated constant `.(L2.W2)` given two different values `()` and `.(L2.X2)` [AssociatedConstantWithDifferentValues] // CHECK:STDERR: impl () as L2 where .W2 = .X2 and .W2 = () {} @@ -129,7 +129,7 @@ impl () as L2 where .W2 = .X2 and .W2 = () {} // --- fail_two_different_second_associated.carbon library "[[@TEST_NAME]]"; -interface L2 { let W2:! type; let X2:! type; } +interface L2 { let W2: type; let X2: type; } // CHECK:STDERR: fail_two_different_second_associated.carbon:[[@LINE+4]]:12: error: associated constant `.(L2.W2)` given two different values `()` and `.(L2.X2)` [AssociatedConstantWithDifferentValues] // CHECK:STDERR: impl () as L2 where .W2 = () and .W2 = .X2 {} @@ -140,7 +140,7 @@ impl () as L2 where .W2 = () and .W2 = .X2 {} // --- fail_two_different_first_bad.carbon library "[[@TEST_NAME]]"; -interface L2 { let W2:! type; } +interface L2 { let W2: type; } // CHECK:STDERR: fail_two_different_first_bad.carbon:[[@LINE+4]]:27: error: name `BAD5` not found [NameNotFound] // CHECK:STDERR: impl () as L2 where .W2 = BAD5 and .W2 = () {} @@ -151,7 +151,7 @@ impl () as L2 where .W2 = BAD5 and .W2 = () {} // --- fail_two_different_second_bad.carbon library "[[@TEST_NAME]]"; -interface L3 { let W3:! type; } +interface L3 { let W3: type; } // CHECK:STDERR: fail_two_different_second_bad.carbon:[[@LINE+4]]:40: error: name `BAD6` not found [NameNotFound] // CHECK:STDERR: impl () as L3 where .W3 = {} and .W3 = BAD6 {} @@ -162,7 +162,7 @@ impl () as L3 where .W3 = {} and .W3 = BAD6 {} // --- fail_two_different_both_bad.carbon library "[[@TEST_NAME]]"; -interface L4 { let W4:! type; } +interface L4 { let W4: type; } // CHECK:STDERR: fail_two_different_both_bad.carbon:[[@LINE+8]]:27: error: name `BAD7` not found [NameNotFound] // CHECK:STDERR: impl () as L4 where .W4 = BAD7 and .W4 = BAD8 {} @@ -177,7 +177,7 @@ impl () as L4 where .W4 = BAD7 and .W4 = BAD8 {} // --- fail_many_different.carbon library "[[@TEST_NAME]]"; -interface L { let W:! type; } +interface L { let W: type; } // The facet type should have a single rewrite with `` in the RHS (they // are all errors, and they get deduped). @@ -193,21 +193,21 @@ impl () as L where .W = ((), (), ()) and .W = ({}, (), ()) and .W = ({}, {}, ()) // --- repeated.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; } +interface M { let X: type; } impl () as M where .X = {} and .X = {} {} // --- repeated_associated.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; let Y:! type; } +interface M { let X: type; let Y: type; } impl () as M where .X = .Y and .X = .Y and .Y = () {} // --- repeated_concrete_value_and_associated.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; let Y:! type; } +interface M { let X: type; let Y: type; } impl () as M where .X = () and .Y = .X and .X = .Y {} @@ -216,7 +216,7 @@ impl {} as M where .X = () and .X = .X and .Y = () {} // --- fail_repeated_and_different.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; } +interface M { let X: type; } // CHECK:STDERR: fail_repeated_and_different.carbon:[[@LINE+4]]:12: error: associated constant `.(M.X)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues] // CHECK:STDERR: impl () as M where .X = {} and .X = () and .X = {} {} @@ -227,7 +227,7 @@ impl () as M where .X = {} and .X = () and .X = {} {} // --- fail_cycle_single.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; } +interface M { let X: type; } // This fails because it resolves to `.X = .X` which is cyclical. // @@ -249,7 +249,7 @@ impl () as M where .X = .X and .X = () {} // --- fail_cycle.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; let Y:! type; let Z:! type; } +interface M { let X: type; let Y: type; let Z: type; } // This fails because it resolves to `.X = .X` which is cyclical. // The value of .X and .Y becomes but .Z is still valid. @@ -266,11 +266,11 @@ impl () as M where .X = .Y and .Y = .X and .Z = () {} library "[[@TEST_NAME]]"; interface I { - let X1:! type; - let X2:! type; + let X1: type; + let X2: type; } interface J { - let X3:! type; + let X3: type; } // TODO: This should fail due to a cyclic definition of each value. But right @@ -295,7 +295,7 @@ impl () as I where .Self impls J and .X1 = .(J.X3) and .X2 = .X1 and .(J.X3) = . library "[[@TEST_NAME]]"; interface N { - let Y:! {.a: {}}; + let Y: {.a: {}}; } impl () as N where .Y = {.a = {}} { } @@ -304,7 +304,7 @@ impl () as N where .Y = {.a = {}} { } library "[[@TEST_NAME]]"; interface N { - let Y:! {.a: {}}; + let Y: {.a: {}}; } impl () as N where .Y = {.a = {}} and .Y = {.a = {}} { } @@ -313,7 +313,7 @@ impl () as N where .Y = {.a = {}} and .Y = {.a = {}} { } library "[[@TEST_NAME]]"; interface N { - let Y:! {.a: type}; + let Y: {.a: type}; } // CHECK:STDERR: fail_non-type_different.carbon:[[@LINE+4]]:12: error: associated constant `.(N.Y)` given two different values `{.a = {}}` and `{.a = ()}` [AssociatedConstantWithDifferentValues] @@ -340,7 +340,7 @@ impl CD as IF where .F = 0 { // --- facet_type_in_assoc_constant.carbon library "[[@TEST_NAME]]"; -interface M { let X:! type; } +interface M { let X: type; } constraint N { extend require impls M where .X = {}; } @@ -352,7 +352,7 @@ library "[[@TEST_NAME]]"; interface Y {} interface Z { - let Z1:! Y; + let Z1: Y; } class C; @@ -372,7 +372,7 @@ library "[[@TEST_NAME]]"; interface Y {} interface Z { - let Z1:! Y; + let Z1: Y; } class C; @@ -382,11 +382,11 @@ impl C as Z where .Z1 = C {} // Implied constraint: .Self impls Y. Should be verified against the type of the // facet value replacing T when calling F. // -// CHECK:STDERR: fail_todo_period_self_compared_with_concrete_self.carbon:[[@LINE+4]]:31: error: cannot convert type `.Self` that implements `Z` into type implementing `Y` [ConversionFailureFacetToFacet] -// CHECK:STDERR: fn F(unused T:! Z where .Z1 = .Self) {} -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fail_todo_period_self_compared_with_concrete_self.carbon:[[@LINE+4]]:38: error: cannot convert type `.Self` that implements `Z` into type implementing `Y` [ConversionFailureFacetToFacet] +// CHECK:STDERR: fn F(unused generic T: Z where .Z1 = .Self) {} +// CHECK:STDERR: ^~~~~ // CHECK:STDERR: -fn F(unused T:! Z where .Z1 = .Self) {} +fn F(unused generic T: Z where .Z1 = .Self) {} fn G() { F(C); @@ -403,7 +403,7 @@ fn G() { // --- assoc_const_impls_in_decl.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } interface J {} // Test that we avoid an infinite impl lookup cycle from an LookupImplWitness @@ -413,9 +413,9 @@ interface J {} // `.X`. If that lookup found this impl (since it's a final impl, eval can find // it), we would deduce and produce an infinite cycle. Instructions inside the // impl decl should not be able to find the impl. -final impl forall [T:! type] T as I where .X impls J and .X = () {} +final impl forall [T: type] T as I where .X impls J and .X = () {} -fn F(unused T:! I where .X = ()) {} +fn F(unused generic T: I where .X = ()) {} fn G() { class C; F(C); diff --git a/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon b/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon index 0c652fce6aa6..c23ef035734f 100644 --- a/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon +++ b/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; interface I { - let X:! {.a: bool, .b: (i32, i32)}; + let X: {.a: bool, .b: (i32, i32)}; } impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = not false, .b = (3 - 2, 4 / 2)} {} @@ -24,7 +24,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = not false, .b = library "[[@TEST_NAME]]"; interface I { - let X:! {.a: bool, .b: (i32, i32)}; + let X: {.a: bool, .b: (i32, i32)}; } // CHECK:STDERR: fail_two_different_non_type.carbon:[[@LINE+4]]:12: error: associated constant `.(I.X)` given two different values `{.a = true, .b = (1, 2)}` and `{.a = false, .b = (3, 4)}` [AssociatedConstantWithDifferentValues] // CHECK:STDERR: impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, 4)} {} diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index 44bd13a18270..c59af0f33e84 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -16,7 +16,7 @@ interface Simple { fn F(); } -impl forall [T:! type] T as Simple { +impl forall [T: type] T as Simple { fn F() {} } @@ -52,9 +52,9 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_15.2 [symbolic = %T.loc19_15.1 (constants.%T)] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.type] -// CHECK:STDOUT: %.loc19_18.1: type = splice_block %.loc19_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc19_17.1: type = splice_block %.loc19_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc19_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc19_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc19_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc19_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -81,7 +81,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: generic impl @T.as.Simple.impl(%T.loc19_15.2: type) { // CHECK:STDOUT: %T.patt.loc19_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc19_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc19_15.1 (constants.%T)] -// CHECK:STDOUT: %Simple.impl_witness.loc19_36.2: = impl_witness %Simple.impl_witness_table, @T.as.Simple.impl(%T.loc19_15.1) [symbolic = %Simple.impl_witness.loc19_36.2 (constants.%Simple.impl_witness)] +// CHECK:STDOUT: %Simple.impl_witness.loc19_35.2: = impl_witness %Simple.impl_witness_table, @T.as.Simple.impl(%T.loc19_15.1) [symbolic = %Simple.impl_witness.loc19_35.2 (constants.%Simple.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as.Simple.impl.F.type: type = fn_type @T.as.Simple.impl.F, @T.as.Simple.impl(%T.loc19_15.1) [symbolic = %T.as.Simple.impl.F.type (constants.%T.as.Simple.impl.F.type)] @@ -90,12 +90,12 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: impl: %T.ref as %Simple.ref { // CHECK:STDOUT: %T.as.Simple.impl.F.decl: @T.as.Simple.impl.%T.as.Simple.impl.F.type (%T.as.Simple.impl.F.type) = fn_decl @T.as.Simple.impl.F [symbolic = @T.as.Simple.impl.%T.as.Simple.impl.F (constants.%T.as.Simple.impl.F)] {} {} // CHECK:STDOUT: %Simple.impl_witness_table = impl_witness_table (%T.as.Simple.impl.F.decl), @T.as.Simple.impl [concrete] -// CHECK:STDOUT: %Simple.impl_witness.loc19_36.1: = impl_witness %Simple.impl_witness_table, @T.as.Simple.impl(constants.%T) [symbolic = %Simple.impl_witness.loc19_36.2 (constants.%Simple.impl_witness)] +// CHECK:STDOUT: %Simple.impl_witness.loc19_35.1: = impl_witness %Simple.impl_witness_table, @T.as.Simple.impl(constants.%T) [symbolic = %Simple.impl_witness.loc19_35.2 (constants.%Simple.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %T.as.Simple.impl.F.decl // CHECK:STDOUT: extend %Simple.ref -// CHECK:STDOUT: witness = %Simple.impl_witness.loc19_36.1 +// CHECK:STDOUT: witness = %Simple.impl_witness.loc19_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -126,7 +126,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: specific @T.as.Simple.impl(constants.%T) { // CHECK:STDOUT: %T.patt.loc19_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc19_15.1 => constants.%T -// CHECK:STDOUT: %Simple.impl_witness.loc19_36.2 => constants.%Simple.impl_witness +// CHECK:STDOUT: %Simple.impl_witness.loc19_35.2 => constants.%Simple.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as.Simple.impl.F.type => constants.%T.as.Simple.impl.F.type diff --git a/toolchain/check/testdata/impl/impl_inside_interface.carbon b/toolchain/check/testdata/impl/impl_inside_interface.carbon index 8e15ce24dcba..b954ba2d463a 100644 --- a/toolchain/check/testdata/impl/impl_inside_interface.carbon +++ b/toolchain/check/testdata/impl/impl_inside_interface.carbon @@ -37,7 +37,7 @@ library "[[@TEST_NAME]]"; // This test uses many unsupported features, and is expected to change. interface I { - let U:! type; + let U: type; // CHECK:STDERR: fail_todo_impl_in_interface_definition_with_associated.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo] // CHECK:STDERR: default fn F() { // CHECK:STDERR: ^~~~~~~ diff --git a/toolchain/check/testdata/impl/impl_self_as.carbon b/toolchain/check/testdata/impl/impl_self_as.carbon index 18ae596df934..d6195cfc85e7 100644 --- a/toolchain/check/testdata/impl/impl_self_as.carbon +++ b/toolchain/check/testdata/impl/impl_self_as.carbon @@ -15,8 +15,8 @@ library "[[@TEST_NAME]]"; interface I1 {} interface I2 {} -interface J1(T1:! type) {} -interface J2(T2:! type) {} +interface J1(T1: type) {} +interface J2(T2: type) {} // `impl Self as` should match `impl as`, so these should not trigger impl // declaration without definition diagnostics. @@ -28,25 +28,25 @@ class C1 { impl as I2; impl Self as I2 {} - impl forall [U:! type] Self as J1(U); - impl forall [U:! type] as J1(U) {} + impl forall [U: type] Self as J1(U); + impl forall [U: type] as J1(U) {} - impl forall [V:! type] as J2(V); - impl forall [V:! type] Self as J2(V) {} + impl forall [V: type] as J2(V); + impl forall [V: type] Self as J2(V) {} } -class C2(W:! type) { +class C2(W: type) { impl Self as I1; impl as I1 {} impl as I2; impl Self as I2 {} - impl forall [X:! type] Self as J1(X); - impl forall [X:! type] as J1(X) {} + impl forall [X: type] Self as J1(X); + impl forall [X: type] as J1(X) {} - impl forall [Y:! type] as J2(Y); - impl forall [Y:! type] Self as J2(Y) {} + impl forall [Y: type] as J2(Y); + impl forall [Y: type] Self as J2(Y) {} } @@ -57,10 +57,10 @@ interface I3 {} interface I4 {} interface I5 {} interface I6 {} -interface J3(T3:! type) {} -interface J4(T4:! type) {} -interface J5(T5:! type) {} -interface J6(T6:! type) {} +interface J3(T3: type) {} +interface J4(T4: type) {} +interface J5(T5: type) {} +interface J6(T6: type) {} // `impl C as` should not match `impl Self as` or `impl as`. @@ -94,35 +94,35 @@ class C3 { impl C3 as I6 {} // CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition] - // CHECK:STDERR: impl forall [Z3:! type] C3 as J3(Z3); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [Z3: type] C3 as J3(Z3); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - impl forall [Z3:! type] C3 as J3(Z3); - impl forall [Z3:! type] as J3(Z3) {} + impl forall [Z3: type] C3 as J3(Z3); + impl forall [Z3: type] as J3(Z3) {} // CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition] - // CHECK:STDERR: impl forall [Z4:! type] C3 as J4(Z4); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [Z4: type] C3 as J4(Z4); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - impl forall [Z4:! type] C3 as J4(Z4); - impl forall [Z4:! type] Self as J4(Z4) {} + impl forall [Z4: type] C3 as J4(Z4); + impl forall [Z4: type] Self as J4(Z4) {} // CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition] - // CHECK:STDERR: impl forall [Z5:! type] as J5(Z5); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [Z5: type] as J5(Z5); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - impl forall [Z5:! type] as J5(Z5); - impl forall [Z5:! type] C3 as J5(Z5) {} + impl forall [Z5: type] as J5(Z5); + impl forall [Z5: type] C3 as J5(Z5) {} // CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition] - // CHECK:STDERR: impl forall [Z6:! type] Self as J6(Z6); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [Z6: type] Self as J6(Z6); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - impl forall [Z6:! type] Self as J6(Z6); - impl forall [Z6:! type] C3 as J6(Z6) {} + impl forall [Z6: type] Self as J6(Z6); + impl forall [Z6: type] C3 as J6(Z6) {} } -class C4(A:! type) { +class C4(A: type) { // CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition] // CHECK:STDERR: impl C4(A) as I3; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ @@ -152,30 +152,30 @@ class C4(A:! type) { impl C4(A) as I6 {} // CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition] - // CHECK:STDERR: impl forall [B3:! type] C4(A) as J3(B3); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: - impl forall [B3:! type] C4(A) as J3(B3); - impl forall [B3:! type] as J3(B3) {} - - // CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition] - // CHECK:STDERR: impl forall [B4:! type] C4(A) as J4(B4); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: - impl forall [B4:! type] C4(A) as J4(B4); - impl forall [B4:! type] Self as J4(B4) {} - - // CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition] - // CHECK:STDERR: impl forall [B5:! type] as J5(B5); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: - impl forall [B5:! type] as J5(B5); - impl forall [B5:! type] C4(A) as J5(B5) {} - - // CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition] - // CHECK:STDERR: impl forall [B6:! type] Self as J6(B6); + // CHECK:STDERR: impl forall [B3: type] C4(A) as J3(B3); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - impl forall [B6:! type] Self as J6(B6); - impl forall [B6:! type] C4(A) as J6(B6) {} + impl forall [B3: type] C4(A) as J3(B3); + impl forall [B3: type] as J3(B3) {} + + // CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition] + // CHECK:STDERR: impl forall [B4: type] C4(A) as J4(B4); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + impl forall [B4: type] C4(A) as J4(B4); + impl forall [B4: type] Self as J4(B4) {} + + // CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition] + // CHECK:STDERR: impl forall [B5: type] as J5(B5); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + impl forall [B5: type] as J5(B5); + impl forall [B5: type] C4(A) as J5(B5) {} + + // CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition] + // CHECK:STDERR: impl forall [B6: type] Self as J6(B6); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + impl forall [B6: type] Self as J6(B6); + impl forall [B6: type] C4(A) as J6(B6) {} } diff --git a/toolchain/check/testdata/impl/impl_thunk.carbon b/toolchain/check/testdata/impl/impl_thunk.carbon index d605db90750f..182c590175ee 100644 --- a/toolchain/check/testdata/impl/impl_thunk.carbon +++ b/toolchain/check/testdata/impl/impl_thunk.carbon @@ -128,8 +128,8 @@ impl B as X { // --- form_parameter.carbon interface I { - let T:! type; - let Fm:! Core.Form; + let T: type; + let Fm: Core.Form; fn F(x:? Fm, y: {.a: (), .b: ()}); } @@ -276,7 +276,7 @@ impl C as I { library "[[@TEST_NAME]]"; -interface I(T:! type) { +interface I(T: type) { fn F(a: T); } @@ -309,12 +309,12 @@ class C { library "[[@TEST_NAME]]"; interface I { - fn F[T:! type](x: T*) -> T*; + fn F[T: type](x: T*) -> T*; } impl () as I { //@dump-sem-ir-begin - fn F[U:! Core.Copy](x: U) -> U { return x; } + fn F[U: Core.Copy](x: U) -> U { return x; } //@dump-sem-ir-end } @@ -323,12 +323,12 @@ impl () as I { library "[[@TEST_NAME]]"; interface I { - fn F[T:! type](self, x: T*) -> T*; + fn F[T: type](self, x: T*) -> T*; } impl () as I { //@dump-sem-ir-begin - fn F[U:! Core.Copy](unused self: (), x: U) -> U { return x; } + fn F[U: Core.Copy](unused self: (), x: U) -> U { return x; } //@dump-sem-ir-end } @@ -336,7 +336,7 @@ impl () as I { library "[[@TEST_NAME]]"; -interface I(T:! type) { +interface I(T: type) { fn F() -> {.a: T, .b: T}; } @@ -1078,7 +1078,7 @@ impl () as I({}) { // CHECK:STDOUT: %.1ce700.2: Core.Form = init_form %U.as_type.c1c [symbolic] // CHECK:STDOUT: %return.param_patt.bf4475.2: %pattern_type.2c66b4.2 = out_param_pattern [symbolic] // CHECK:STDOUT: %return.patt.f44: %pattern_type.2c66b4.2 = return_slot_pattern %return.param_patt.bf4475.2, %U.as_type.c1c [symbolic] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_34.1 [concrete] +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_33.1 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bd5be1.1: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] @@ -1090,7 +1090,7 @@ impl () as I({}) { // CHECK:STDOUT: %return.param_patt.27f: %pattern_type.4f4 = out_param_pattern [symbolic] // CHECK:STDOUT: %return.patt.d67: %pattern_type.4f4 = return_slot_pattern %return.param_patt.27f, %ptr.e8f [symbolic] // CHECK:STDOUT: %T.patt.d47: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_34.2 [concrete] +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_33.2 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bd5be1.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = struct_value () [concrete] // CHECK:STDOUT: %require_complete.d83f06.1: = require_complete_type %U.as_type.c1c [symbolic] // CHECK:STDOUT: %require_complete.ef1: = require_complete_type %ptr.e8f [symbolic] @@ -1102,7 +1102,7 @@ impl () as I({}) { // CHECK:STDOUT: %Copy.lookup_impl_witness.1da: = lookup_impl_witness %ptr.e8f, @Copy [symbolic] // CHECK:STDOUT: %.0e9: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e8f, (%Copy.lookup_impl_witness.1da) [symbolic] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn: = specific_function %empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_34.1(%Copy.facet) [symbolic] +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn: = specific_function %empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_33.1(%Copy.facet) [symbolic] // CHECK:STDOUT: %Copy.WithSelf.Op.type.884: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [symbolic] // CHECK:STDOUT: %.be5: type = fn_type_with_self_type %Copy.WithSelf.Op.type.884, %Copy.facet [symbolic] // CHECK:STDOUT: %impl.elem0.484: %.be5 = impl_witness_access %Copy.lookup_impl_witness.1da, element0 [symbolic] @@ -1119,35 +1119,35 @@ impl () as I({}) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.I.impl: %.loc8_7.2 as %I.ref { -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_34.1: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_34.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1] { +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_33.1: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_33.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1] { // CHECK:STDOUT: %U.patt.loc10_9.1: %pattern_type.e81 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_9.2 (constants.%U.patt.fe6)] -// CHECK:STDOUT: %x.param_patt.loc10_24.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_24.2 (constants.%x.param_patt.1f4)] -// CHECK:STDOUT: %x.patt.loc10_24.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_24.1 [symbolic = %x.patt.loc10_24.2 (constants.%x.patt.f93)] -// CHECK:STDOUT: %return.param_patt.loc10_32.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_32.2 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc10_29.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_32.1, %.loc10_32.3 [symbolic = %return.patt.loc10_29.2 (constants.%return.patt.f44)] +// CHECK:STDOUT: %x.param_patt.loc10_23.1: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_23.2 (constants.%x.param_patt.1f4)] +// CHECK:STDOUT: %x.patt.loc10_23.1: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_23.1 [symbolic = %x.patt.loc10_23.2 (constants.%x.patt.f93)] +// CHECK:STDOUT: %return.param_patt.loc10_31.1: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_31.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc10_28.1: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_31.1, %.loc10_31.3 [symbolic = %return.patt.loc10_28.2 (constants.%return.patt.f44)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref.loc10_32: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)] -// CHECK:STDOUT: %U.as_type.loc10_32: type = facet_access_type %U.ref.loc10_32 [symbolic = %U.as_type.loc10_26.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %.loc10_32.3: type = converted %U.ref.loc10_32, %U.as_type.loc10_32 [symbolic = %U.as_type.loc10_26.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %.loc10_32.4: Core.Form = init_form %.loc10_32.3 [symbolic = %.loc10_32.2 (constants.%.1ce700.2)] -// CHECK:STDOUT: %.loc10_16: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { +// CHECK:STDOUT: %U.ref.loc10_31: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)] +// CHECK:STDOUT: %U.as_type.loc10_31: type = facet_access_type %U.ref.loc10_31 [symbolic = %U.as_type.loc10_25.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc10_31.3: type = converted %U.ref.loc10_31, %U.as_type.loc10_31 [symbolic = %U.as_type.loc10_25.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc10_31.4: Core.Form = init_form %.loc10_31.3 [symbolic = %.loc10_31.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %.loc10_15: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc10_9.2: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc10_9.1 (constants.%U.f84)] -// CHECK:STDOUT: %x.param: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) = value_param call_param0 -// CHECK:STDOUT: %.loc10_26.1: type = splice_block %.loc10_26.2 [symbolic = %U.as_type.loc10_26.1 (constants.%U.as_type.c1c)] { -// CHECK:STDOUT: %U.ref.loc10_26: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)] -// CHECK:STDOUT: %U.as_type.loc10_26.2: type = facet_access_type %U.ref.loc10_26 [symbolic = %U.as_type.loc10_26.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %.loc10_26.2: type = converted %U.ref.loc10_26, %U.as_type.loc10_26.2 [symbolic = %U.as_type.loc10_26.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %x.param: @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) = value_param call_param0 +// CHECK:STDOUT: %.loc10_25.1: type = splice_block %.loc10_25.2 [symbolic = %U.as_type.loc10_25.1 (constants.%U.as_type.c1c)] { +// CHECK:STDOUT: %U.ref.loc10_25: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)] +// CHECK:STDOUT: %U.as_type.loc10_25.2: type = facet_access_type %U.ref.loc10_25 [symbolic = %U.as_type.loc10_25.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc10_25.2: type = converted %U.ref.loc10_25, %U.as_type.loc10_25.2 [symbolic = %U.as_type.loc10_25.1 (constants.%U.as_type.c1c)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) = out_param call_param1 -// CHECK:STDOUT: %return: ref @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) = return_slot %return.param +// CHECK:STDOUT: %x: @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) = wrapper_binding x, %x.param +// CHECK:STDOUT: %return.param: ref @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) = out_param call_param1 +// CHECK:STDOUT: %return: ref @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_34.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_34.2 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.2] { +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_33.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_33.2 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.2] { // CHECK:STDOUT: // CHECK:STDOUT: } { // CHECK:STDOUT: @@ -1155,85 +1155,85 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_34.1 +// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_33.1 // CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_34.1(%U.loc10_9.2: %Copy.type) { +// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_33.1(%U.loc10_9.2: %Copy.type) { // CHECK:STDOUT: %U.patt.loc10_9.2: %pattern_type.e81 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_9.2 (constants.%U.patt.fe6)] // CHECK:STDOUT: %U.loc10_9.1: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc10_9.1 (constants.%U.f84)] -// CHECK:STDOUT: %U.as_type.loc10_26.1: type = facet_access_type %U.loc10_9.1 [symbolic = %U.as_type.loc10_26.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc10_26.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)] -// CHECK:STDOUT: %x.param_patt.loc10_24.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_24.2 (constants.%x.param_patt.1f4)] -// CHECK:STDOUT: %x.patt.loc10_24.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_24.2 [symbolic = %x.patt.loc10_24.2 (constants.%x.patt.f93)] -// CHECK:STDOUT: %.loc10_32.2: Core.Form = init_form %U.as_type.loc10_26.1 [symbolic = %.loc10_32.2 (constants.%.1ce700.2)] -// CHECK:STDOUT: %return.param_patt.loc10_32.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_32.2 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc10_29.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_32.2, %U.as_type.loc10_26.1 [symbolic = %return.patt.loc10_29.2 (constants.%return.patt.f44)] +// CHECK:STDOUT: %U.as_type.loc10_25.1: type = facet_access_type %U.loc10_9.1 [symbolic = %U.as_type.loc10_25.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc10_25.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)] +// CHECK:STDOUT: %x.param_patt.loc10_23.2: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_23.2 (constants.%x.param_patt.1f4)] +// CHECK:STDOUT: %x.patt.loc10_23.2: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_23.2 [symbolic = %x.patt.loc10_23.2 (constants.%x.patt.f93)] +// CHECK:STDOUT: %.loc10_31.2: Core.Form = init_form %U.as_type.loc10_25.1 [symbolic = %.loc10_31.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %return.param_patt.loc10_31.2: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_31.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc10_28.2: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_31.2, %U.as_type.loc10_25.1 [symbolic = %return.patt.loc10_28.2 (constants.%return.patt.f44)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc10_26.1 [symbolic = %require_complete (constants.%require_complete.d83f06.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc10_25.1 [symbolic = %require_complete (constants.%require_complete.d83f06.1)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%U.loc10_9.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.3)] -// CHECK:STDOUT: %.loc10_43.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc10_9.1 [symbolic = %.loc10_43.3 (constants.%.c29330.2)] +// CHECK:STDOUT: %.loc10_42.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc10_9.1 [symbolic = %.loc10_42.3 (constants.%.c29330.2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %U.loc10_9.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c332.2)] -// CHECK:STDOUT: %impl.elem0.loc10_43.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%.loc10_43.3 (%.c29330.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_43.2 (constants.%impl.elem0.bd2456.2)] -// CHECK:STDOUT: %specific_impl_fn.loc10_43.2: = specific_impl_function %impl.elem0.loc10_43.2, @Copy.WithSelf.Op(%U.loc10_9.1) [symbolic = %specific_impl_fn.loc10_43.2 (constants.%specific_impl_fn.e2af7e.2)] +// CHECK:STDOUT: %impl.elem0.loc10_42.2: @empty_tuple.type.as.I.impl.F.loc10_33.1.%.loc10_42.3 (%.c29330.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_42.2 (constants.%impl.elem0.bd2456.2)] +// CHECK:STDOUT: %specific_impl_fn.loc10_42.2: = specific_impl_function %impl.elem0.loc10_42.2, @Copy.WithSelf.Op(%U.loc10_9.1) [symbolic = %specific_impl_fn.loc10_42.2 (constants.%specific_impl_fn.e2af7e.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) { +// CHECK:STDOUT: fn(%x.param: @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) = name_ref x, %x -// CHECK:STDOUT: %impl.elem0.loc10_43.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%.loc10_43.3 (%.c29330.2) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c332.2, element0 [symbolic = %impl.elem0.loc10_43.2 (constants.%impl.elem0.bd2456.2)] -// CHECK:STDOUT: %bound_method.loc10_43.1: = bound_method %x.ref, %impl.elem0.loc10_43.1 -// CHECK:STDOUT: %.loc10_43.1: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)] -// CHECK:STDOUT: %.loc10_43.2: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)] -// CHECK:STDOUT: %specific_impl_fn.loc10_43.1: = specific_impl_function %impl.elem0.loc10_43.1, @Copy.WithSelf.Op(constants.%U.f84) [symbolic = %specific_impl_fn.loc10_43.2 (constants.%specific_impl_fn.e2af7e.2)] -// CHECK:STDOUT: %bound_method.loc10_43.2: = bound_method %x.ref, %specific_impl_fn.loc10_43.1 -// CHECK:STDOUT: %.loc10_32.1: ref @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) to %.loc10_32.1 = call %bound_method.loc10_43.2(%x.ref) +// CHECK:STDOUT: %x.ref: @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) = name_ref x, %x +// CHECK:STDOUT: %impl.elem0.loc10_42.1: @empty_tuple.type.as.I.impl.F.loc10_33.1.%.loc10_42.3 (%.c29330.2) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c332.2, element0 [symbolic = %impl.elem0.loc10_42.2 (constants.%impl.elem0.bd2456.2)] +// CHECK:STDOUT: %bound_method.loc10_42.1: = bound_method %x.ref, %impl.elem0.loc10_42.1 +// CHECK:STDOUT: %.loc10_42.1: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)] +// CHECK:STDOUT: %.loc10_42.2: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)] +// CHECK:STDOUT: %specific_impl_fn.loc10_42.1: = specific_impl_function %impl.elem0.loc10_42.1, @Copy.WithSelf.Op(constants.%U.f84) [symbolic = %specific_impl_fn.loc10_42.2 (constants.%specific_impl_fn.e2af7e.2)] +// CHECK:STDOUT: %bound_method.loc10_42.2: = bound_method %x.ref, %specific_impl_fn.loc10_42.1 +// CHECK:STDOUT: %.loc10_31.1: ref @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) = splice_block %return.param {} +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) to %.loc10_31.1 = call %bound_method.loc10_42.2(%x.ref) // CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_34.2(%T.2: type) { +// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_33.2(%T.2: type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %.loc10_34.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.1) [symbolic = %.loc10_34.3 (constants.%.0e9)] +// CHECK:STDOUT: %.loc10_33.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.1) [symbolic = %.loc10_33.3 (constants.%.0e9)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] -// CHECK:STDOUT: %Copy.facet.loc10_34.3: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_34.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_34.2: = specific_function constants.%empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_34.1(%Copy.facet.loc10_34.3) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_34.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)] +// CHECK:STDOUT: %Copy.facet.loc10_33.3: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_33.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_33.2: = specific_function constants.%empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_33.1(%Copy.facet.loc10_33.3) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_33.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @empty_tuple.type.as.I.impl.F.loc10_34.2.%ptr (%ptr.e8f)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_34.2.%ptr (%ptr.e8f) [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_34.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet, constants.%T.67d)] { +// CHECK:STDOUT: fn(%x.param: @empty_tuple.type.as.I.impl.F.loc10_33.2.%ptr (%ptr.e8f)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_33.2.%ptr (%ptr.e8f) [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_33.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet, constants.%T.67d)] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = name_ref F, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_34.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1] -// CHECK:STDOUT: %Copy.facet.loc10_34.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_34.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc10_34.1: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_34.1 [symbolic = %Copy.facet.loc10_34.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %Copy.facet.loc10_34.2: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_34.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc10_34.2: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_34.2 [symbolic = %Copy.facet.loc10_34.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_34.1: = specific_function %F.ref, @empty_tuple.type.as.I.impl.F.loc10_34.1(constants.%Copy.facet) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_34.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.call: init @empty_tuple.type.as.I.impl.F.loc10_34.2.%ptr (%ptr.e8f) = call %empty_tuple.type.as.I.impl.F.specific_fn.loc10_34.1(%x.param) +// CHECK:STDOUT: %F.ref: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = name_ref F, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_33.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1] +// CHECK:STDOUT: %Copy.facet.loc10_33.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_33.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %.loc10_33.1: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_33.1 [symbolic = %Copy.facet.loc10_33.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %Copy.facet.loc10_33.2: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_33.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %.loc10_33.2: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_33.2 [symbolic = %Copy.facet.loc10_33.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_33.1: = specific_function %F.ref, @empty_tuple.type.as.I.impl.F.loc10_33.1(constants.%Copy.facet) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_33.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)] +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.call: init @empty_tuple.type.as.I.impl.F.loc10_33.2.%ptr (%ptr.e8f) = call %empty_tuple.type.as.I.impl.F.specific_fn.loc10_33.1(%x.param) // CHECK:STDOUT: return %empty_tuple.type.as.I.impl.F.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_34.1(constants.%U.f84) { +// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_33.1(constants.%U.f84) { // CHECK:STDOUT: %U.patt.loc10_9.2 => constants.%U.patt.fe6 // CHECK:STDOUT: %U.loc10_9.1 => constants.%U.f84 -// CHECK:STDOUT: %U.as_type.loc10_26.1 => constants.%U.as_type.c1c +// CHECK:STDOUT: %U.as_type.loc10_25.1 => constants.%U.as_type.c1c // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2c66b4.2 -// CHECK:STDOUT: %x.param_patt.loc10_24.2 => constants.%x.param_patt.1f4 -// CHECK:STDOUT: %x.patt.loc10_24.2 => constants.%x.patt.f93 -// CHECK:STDOUT: %.loc10_32.2 => constants.%.1ce700.2 -// CHECK:STDOUT: %return.param_patt.loc10_32.2 => constants.%return.param_patt.bf4475.2 -// CHECK:STDOUT: %return.patt.loc10_29.2 => constants.%return.patt.f44 +// CHECK:STDOUT: %x.param_patt.loc10_23.2 => constants.%x.param_patt.1f4 +// CHECK:STDOUT: %x.patt.loc10_23.2 => constants.%x.patt.f93 +// CHECK:STDOUT: %.loc10_31.2 => constants.%.1ce700.2 +// CHECK:STDOUT: %return.param_patt.loc10_31.2 => constants.%return.param_patt.bf4475.2 +// CHECK:STDOUT: %return.patt.loc10_28.2 => constants.%return.patt.f44 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_34.2(constants.%T.67d) { +// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_33.2(constants.%T.67d) { // CHECK:STDOUT: %T.patt.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.1 => constants.%T.67d // CHECK:STDOUT: %ptr => constants.%ptr.e8f @@ -1245,24 +1245,24 @@ impl () as I({}) { // CHECK:STDOUT: %.loc5 => constants.%.cb6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_34.1(constants.%Copy.facet) { +// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_33.1(constants.%Copy.facet) { // CHECK:STDOUT: %U.patt.loc10_9.2 => constants.%U.patt.fe6 // CHECK:STDOUT: %U.loc10_9.1 => constants.%Copy.facet -// CHECK:STDOUT: %U.as_type.loc10_26.1 => constants.%ptr.e8f +// CHECK:STDOUT: %U.as_type.loc10_25.1 => constants.%ptr.e8f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 -// CHECK:STDOUT: %x.param_patt.loc10_24.2 => constants.%x.param_patt.b5c -// CHECK:STDOUT: %x.patt.loc10_24.2 => constants.%x.patt.b28 -// CHECK:STDOUT: %.loc10_32.2 => constants.%.cb6 -// CHECK:STDOUT: %return.param_patt.loc10_32.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc10_29.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %x.param_patt.loc10_23.2 => constants.%x.param_patt.b5c +// CHECK:STDOUT: %x.patt.loc10_23.2 => constants.%x.patt.b28 +// CHECK:STDOUT: %.loc10_31.2 => constants.%.cb6 +// CHECK:STDOUT: %return.param_patt.loc10_31.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc10_28.2 => constants.%return.patt.d67 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 // CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.884 -// CHECK:STDOUT: %.loc10_43.3 => constants.%.be5 +// CHECK:STDOUT: %.loc10_42.3 => constants.%.be5 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.1da -// CHECK:STDOUT: %impl.elem0.loc10_43.2 => constants.%impl.elem0.484 -// CHECK:STDOUT: %specific_impl_fn.loc10_43.2 => constants.%specific_impl_fn.a76 +// CHECK:STDOUT: %impl.elem0.loc10_42.2 => constants.%impl.elem0.484 +// CHECK:STDOUT: %specific_impl_fn.loc10_42.2 => constants.%specific_impl_fn.a76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- generic_method.carbon @@ -1289,7 +1289,7 @@ impl () as I({}) { // CHECK:STDOUT: %.1ce700.2: Core.Form = init_form %U.as_type.c1c [symbolic] // CHECK:STDOUT: %return.param_patt.bf4475.2: %pattern_type.2c66b4.2 = out_param_pattern [symbolic] // CHECK:STDOUT: %return.patt.f44: %pattern_type.2c66b4.2 = return_slot_pattern %return.param_patt.bf4475.2, %U.as_type.c1c [symbolic] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_51.1 [concrete] +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_50.1 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bd5be1.1: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] @@ -1301,7 +1301,7 @@ impl () as I({}) { // CHECK:STDOUT: %return.param_patt.27f: %pattern_type.4f4 = out_param_pattern [symbolic] // CHECK:STDOUT: %return.patt.d67: %pattern_type.4f4 = return_slot_pattern %return.param_patt.27f, %ptr.e8f [symbolic] // CHECK:STDOUT: %T.patt.d47: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_51.2 [concrete] +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_50.2 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bd5be1.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = struct_value () [concrete] // CHECK:STDOUT: %require_complete.d83f06.1: = require_complete_type %U.as_type.c1c [symbolic] // CHECK:STDOUT: %require_complete.ef1: = require_complete_type %ptr.e8f [symbolic] @@ -1313,7 +1313,7 @@ impl () as I({}) { // CHECK:STDOUT: %Copy.lookup_impl_witness.1da: = lookup_impl_witness %ptr.e8f, @Copy [symbolic] // CHECK:STDOUT: %.0e9: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e8f, (%Copy.lookup_impl_witness.1da) [symbolic] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn: = specific_function %empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_51.1(%Copy.facet) [symbolic] +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn: = specific_function %empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_50.1(%Copy.facet) [symbolic] // CHECK:STDOUT: %Copy.WithSelf.Op.type.884: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [symbolic] // CHECK:STDOUT: %.be5: type = fn_type_with_self_type %Copy.WithSelf.Op.type.884, %Copy.facet [symbolic] // CHECK:STDOUT: %impl.elem0.484: %.be5 = impl_witness_access %Copy.lookup_impl_witness.1da, element0 [symbolic] @@ -1330,43 +1330,43 @@ impl () as I({}) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.I.impl: %.loc8_7.2 as %I.ref { -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_51.1: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_51.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1] { +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_50.1: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_50.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1] { // CHECK:STDOUT: %U.patt.loc10_9.1: %pattern_type.e81 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_9.2 (constants.%U.patt.fe6)] // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern [concrete = constants.%self.param_patt.154] // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = at_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8c1] -// CHECK:STDOUT: %x.param_patt.loc10_41.1: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_41.2 (constants.%x.param_patt.1f4)] -// CHECK:STDOUT: %x.patt.loc10_41.1: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_41.1 [symbolic = %x.patt.loc10_41.2 (constants.%x.patt.f93)] -// CHECK:STDOUT: %return.param_patt.loc10_49.1: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_49.2 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc10_46.1: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_49.1, %.loc10_49.3 [symbolic = %return.patt.loc10_46.2 (constants.%return.patt.f44)] +// CHECK:STDOUT: %x.param_patt.loc10_40.1: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_40.2 (constants.%x.param_patt.1f4)] +// CHECK:STDOUT: %x.patt.loc10_40.1: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_40.1 [symbolic = %x.patt.loc10_40.2 (constants.%x.patt.f93)] +// CHECK:STDOUT: %return.param_patt.loc10_48.1: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_48.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc10_45.1: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_48.1, %.loc10_48.3 [symbolic = %return.patt.loc10_45.2 (constants.%return.patt.f44)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref.loc10_49: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)] -// CHECK:STDOUT: %U.as_type.loc10_49: type = facet_access_type %U.ref.loc10_49 [symbolic = %U.as_type.loc10_43.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %.loc10_49.3: type = converted %U.ref.loc10_49, %U.as_type.loc10_49 [symbolic = %U.as_type.loc10_43.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %.loc10_49.4: Core.Form = init_form %.loc10_49.3 [symbolic = %.loc10_49.2 (constants.%.1ce700.2)] -// CHECK:STDOUT: %.loc10_16: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { +// CHECK:STDOUT: %U.ref.loc10_48: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)] +// CHECK:STDOUT: %U.as_type.loc10_48: type = facet_access_type %U.ref.loc10_48 [symbolic = %U.as_type.loc10_42.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc10_48.3: type = converted %U.ref.loc10_48, %U.as_type.loc10_48 [symbolic = %U.as_type.loc10_42.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc10_48.4: Core.Form = init_form %.loc10_48.3 [symbolic = %.loc10_48.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %.loc10_15: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc10_9.2: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc10_9.1 (constants.%U.f84)] // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0 -// CHECK:STDOUT: %.loc10_37.1: type = splice_block %.loc10_37.3 [concrete = constants.%empty_tuple.type] { -// CHECK:STDOUT: %.loc10_37.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc10_37.3: type = converted %.loc10_37.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc10_36.1: type = splice_block %.loc10_36.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc10_36.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc10_36.3: type = converted %.loc10_36.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %self: %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: %x.param: @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) = value_param call_param1 -// CHECK:STDOUT: %.loc10_43.1: type = splice_block %.loc10_43.2 [symbolic = %U.as_type.loc10_43.1 (constants.%U.as_type.c1c)] { -// CHECK:STDOUT: %U.ref.loc10_43: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)] -// CHECK:STDOUT: %U.as_type.loc10_43.2: type = facet_access_type %U.ref.loc10_43 [symbolic = %U.as_type.loc10_43.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %.loc10_43.2: type = converted %U.ref.loc10_43, %U.as_type.loc10_43.2 [symbolic = %U.as_type.loc10_43.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %x.param: @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) = value_param call_param1 +// CHECK:STDOUT: %.loc10_42.1: type = splice_block %.loc10_42.2 [symbolic = %U.as_type.loc10_42.1 (constants.%U.as_type.c1c)] { +// CHECK:STDOUT: %U.ref.loc10_42: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)] +// CHECK:STDOUT: %U.as_type.loc10_42.2: type = facet_access_type %U.ref.loc10_42 [symbolic = %U.as_type.loc10_42.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc10_42.2: type = converted %U.ref.loc10_42, %U.as_type.loc10_42.2 [symbolic = %U.as_type.loc10_42.1 (constants.%U.as_type.c1c)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) = out_param call_param2 -// CHECK:STDOUT: %return: ref @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) = return_slot %return.param +// CHECK:STDOUT: %x: @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) = wrapper_binding x, %x.param +// CHECK:STDOUT: %return.param: ref @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) = out_param call_param2 +// CHECK:STDOUT: %return: ref @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_51.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_51.2 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.2] { +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_50.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_50.2 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.2] { // CHECK:STDOUT: // CHECK:STDOUT: } { // CHECK:STDOUT: @@ -1374,87 +1374,87 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_51.1 +// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_50.1 // CHECK:STDOUT: extend %I.ref // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_51.1(%U.loc10_9.2: %Copy.type) { +// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_50.1(%U.loc10_9.2: %Copy.type) { // CHECK:STDOUT: %U.patt.loc10_9.2: %pattern_type.e81 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_9.2 (constants.%U.patt.fe6)] // CHECK:STDOUT: %U.loc10_9.1: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc10_9.1 (constants.%U.f84)] -// CHECK:STDOUT: %U.as_type.loc10_43.1: type = facet_access_type %U.loc10_9.1 [symbolic = %U.as_type.loc10_43.1 (constants.%U.as_type.c1c)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc10_43.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)] -// CHECK:STDOUT: %x.param_patt.loc10_41.2: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_41.2 (constants.%x.param_patt.1f4)] -// CHECK:STDOUT: %x.patt.loc10_41.2: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_41.2 [symbolic = %x.patt.loc10_41.2 (constants.%x.patt.f93)] -// CHECK:STDOUT: %.loc10_49.2: Core.Form = init_form %U.as_type.loc10_43.1 [symbolic = %.loc10_49.2 (constants.%.1ce700.2)] -// CHECK:STDOUT: %return.param_patt.loc10_49.2: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_49.2 (constants.%return.param_patt.bf4475.2)] -// CHECK:STDOUT: %return.patt.loc10_46.2: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_49.2, %U.as_type.loc10_43.1 [symbolic = %return.patt.loc10_46.2 (constants.%return.patt.f44)] +// CHECK:STDOUT: %U.as_type.loc10_42.1: type = facet_access_type %U.loc10_9.1 [symbolic = %U.as_type.loc10_42.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc10_42.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)] +// CHECK:STDOUT: %x.param_patt.loc10_40.2: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_40.2 (constants.%x.param_patt.1f4)] +// CHECK:STDOUT: %x.patt.loc10_40.2: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_40.2 [symbolic = %x.patt.loc10_40.2 (constants.%x.patt.f93)] +// CHECK:STDOUT: %.loc10_48.2: Core.Form = init_form %U.as_type.loc10_42.1 [symbolic = %.loc10_48.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %return.param_patt.loc10_48.2: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_48.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc10_45.2: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_48.2, %U.as_type.loc10_42.1 [symbolic = %return.patt.loc10_45.2 (constants.%return.patt.f44)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc10_43.1 [symbolic = %require_complete (constants.%require_complete.d83f06.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc10_42.1 [symbolic = %require_complete (constants.%require_complete.d83f06.1)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%U.loc10_9.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.3)] -// CHECK:STDOUT: %.loc10_60.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc10_9.1 [symbolic = %.loc10_60.3 (constants.%.c29330.2)] +// CHECK:STDOUT: %.loc10_59.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc10_9.1 [symbolic = %.loc10_59.3 (constants.%.c29330.2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %U.loc10_9.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c332.2)] -// CHECK:STDOUT: %impl.elem0.loc10_60.2: @empty_tuple.type.as.I.impl.F.loc10_51.1.%.loc10_60.3 (%.c29330.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.bd2456.2)] -// CHECK:STDOUT: %specific_impl_fn.loc10_60.2: = specific_impl_function %impl.elem0.loc10_60.2, @Copy.WithSelf.Op(%U.loc10_9.1) [symbolic = %specific_impl_fn.loc10_60.2 (constants.%specific_impl_fn.e2af7e.2)] +// CHECK:STDOUT: %impl.elem0.loc10_59.2: @empty_tuple.type.as.I.impl.F.loc10_50.1.%.loc10_59.3 (%.c29330.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_59.2 (constants.%impl.elem0.bd2456.2)] +// CHECK:STDOUT: %specific_impl_fn.loc10_59.2: = specific_impl_function %impl.elem0.loc10_59.2, @Copy.WithSelf.Op(%U.loc10_9.1) [symbolic = %specific_impl_fn.loc10_59.2 (constants.%specific_impl_fn.e2af7e.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: %empty_tuple.type, %x.param: @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) { +// CHECK:STDOUT: fn(%self.param: %empty_tuple.type, %x.param: @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) = name_ref x, %x -// CHECK:STDOUT: %impl.elem0.loc10_60.1: @empty_tuple.type.as.I.impl.F.loc10_51.1.%.loc10_60.3 (%.c29330.2) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c332.2, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.bd2456.2)] -// CHECK:STDOUT: %bound_method.loc10_60.1: = bound_method %x.ref, %impl.elem0.loc10_60.1 -// CHECK:STDOUT: %.loc10_60.1: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)] -// CHECK:STDOUT: %.loc10_60.2: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)] -// CHECK:STDOUT: %specific_impl_fn.loc10_60.1: = specific_impl_function %impl.elem0.loc10_60.1, @Copy.WithSelf.Op(constants.%U.f84) [symbolic = %specific_impl_fn.loc10_60.2 (constants.%specific_impl_fn.e2af7e.2)] -// CHECK:STDOUT: %bound_method.loc10_60.2: = bound_method %x.ref, %specific_impl_fn.loc10_60.1 -// CHECK:STDOUT: %.loc10_49.1: ref @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) to %.loc10_49.1 = call %bound_method.loc10_60.2(%x.ref) +// CHECK:STDOUT: %x.ref: @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) = name_ref x, %x +// CHECK:STDOUT: %impl.elem0.loc10_59.1: @empty_tuple.type.as.I.impl.F.loc10_50.1.%.loc10_59.3 (%.c29330.2) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c332.2, element0 [symbolic = %impl.elem0.loc10_59.2 (constants.%impl.elem0.bd2456.2)] +// CHECK:STDOUT: %bound_method.loc10_59.1: = bound_method %x.ref, %impl.elem0.loc10_59.1 +// CHECK:STDOUT: %.loc10_59.1: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)] +// CHECK:STDOUT: %.loc10_59.2: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)] +// CHECK:STDOUT: %specific_impl_fn.loc10_59.1: = specific_impl_function %impl.elem0.loc10_59.1, @Copy.WithSelf.Op(constants.%U.f84) [symbolic = %specific_impl_fn.loc10_59.2 (constants.%specific_impl_fn.e2af7e.2)] +// CHECK:STDOUT: %bound_method.loc10_59.2: = bound_method %x.ref, %specific_impl_fn.loc10_59.1 +// CHECK:STDOUT: %.loc10_48.1: ref @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) = splice_block %return.param {} +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) to %.loc10_48.1 = call %bound_method.loc10_59.2(%x.ref) // CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_51.2(%T.2: type) { +// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_50.2(%T.2: type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %.loc10_51.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.1) [symbolic = %.loc10_51.3 (constants.%.0e9)] +// CHECK:STDOUT: %.loc10_50.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.1) [symbolic = %.loc10_50.3 (constants.%.0e9)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] -// CHECK:STDOUT: %Copy.facet.loc10_51.3: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_51.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_51.2: = specific_function constants.%empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_51.1(%Copy.facet.loc10_51.3) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_51.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)] +// CHECK:STDOUT: %Copy.facet.loc10_50.3: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_50.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_50.2: = specific_function constants.%empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_50.1(%Copy.facet.loc10_50.3) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_50.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: %empty_tuple.type, %x.param: @empty_tuple.type.as.I.impl.F.loc10_51.2.%ptr (%ptr.e8f)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_51.2.%ptr (%ptr.e8f) [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_51.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet, constants.%T.67d)] { +// CHECK:STDOUT: fn(%self.param: %empty_tuple.type, %x.param: @empty_tuple.type.as.I.impl.F.loc10_50.2.%ptr (%ptr.e8f)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_50.2.%ptr (%ptr.e8f) [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_50.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet, constants.%T.67d)] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %F.ref: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = name_ref F, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_51.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1] +// CHECK:STDOUT: %F.ref: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = name_ref F, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_50.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bound: = bound_method %self.param, %F.ref -// CHECK:STDOUT: %Copy.facet.loc10_51.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_51.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc10_51.1: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_51.1 [symbolic = %Copy.facet.loc10_51.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %Copy.facet.loc10_51.2: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_51.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc10_51.2: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_51.2 [symbolic = %Copy.facet.loc10_51.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_51.1: = specific_function %F.ref, @empty_tuple.type.as.I.impl.F.loc10_51.1(constants.%Copy.facet) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_51.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)] -// CHECK:STDOUT: %bound_method: = bound_method %self.param, %empty_tuple.type.as.I.impl.F.specific_fn.loc10_51.1 -// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.call: init @empty_tuple.type.as.I.impl.F.loc10_51.2.%ptr (%ptr.e8f) = call %bound_method(%self.param, %x.param) +// CHECK:STDOUT: %Copy.facet.loc10_50.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_50.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %.loc10_50.1: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_50.1 [symbolic = %Copy.facet.loc10_50.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %Copy.facet.loc10_50.2: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_50.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %.loc10_50.2: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_50.2 [symbolic = %Copy.facet.loc10_50.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_50.1: = specific_function %F.ref, @empty_tuple.type.as.I.impl.F.loc10_50.1(constants.%Copy.facet) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_50.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)] +// CHECK:STDOUT: %bound_method: = bound_method %self.param, %empty_tuple.type.as.I.impl.F.specific_fn.loc10_50.1 +// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.call: init @empty_tuple.type.as.I.impl.F.loc10_50.2.%ptr (%ptr.e8f) = call %bound_method(%self.param, %x.param) // CHECK:STDOUT: return %empty_tuple.type.as.I.impl.F.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_51.1(constants.%U.f84) { +// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_50.1(constants.%U.f84) { // CHECK:STDOUT: %U.patt.loc10_9.2 => constants.%U.patt.fe6 // CHECK:STDOUT: %U.loc10_9.1 => constants.%U.f84 -// CHECK:STDOUT: %U.as_type.loc10_43.1 => constants.%U.as_type.c1c +// CHECK:STDOUT: %U.as_type.loc10_42.1 => constants.%U.as_type.c1c // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2c66b4.2 -// CHECK:STDOUT: %x.param_patt.loc10_41.2 => constants.%x.param_patt.1f4 -// CHECK:STDOUT: %x.patt.loc10_41.2 => constants.%x.patt.f93 -// CHECK:STDOUT: %.loc10_49.2 => constants.%.1ce700.2 -// CHECK:STDOUT: %return.param_patt.loc10_49.2 => constants.%return.param_patt.bf4475.2 -// CHECK:STDOUT: %return.patt.loc10_46.2 => constants.%return.patt.f44 +// CHECK:STDOUT: %x.param_patt.loc10_40.2 => constants.%x.param_patt.1f4 +// CHECK:STDOUT: %x.patt.loc10_40.2 => constants.%x.patt.f93 +// CHECK:STDOUT: %.loc10_48.2 => constants.%.1ce700.2 +// CHECK:STDOUT: %return.param_patt.loc10_48.2 => constants.%return.param_patt.bf4475.2 +// CHECK:STDOUT: %return.patt.loc10_45.2 => constants.%return.patt.f44 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_51.2(constants.%T.67d) { +// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_50.2(constants.%T.67d) { // CHECK:STDOUT: %T.patt.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.1 => constants.%T.67d // CHECK:STDOUT: %ptr => constants.%ptr.e8f @@ -1466,24 +1466,24 @@ impl () as I({}) { // CHECK:STDOUT: %.loc5 => constants.%.cb6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_51.1(constants.%Copy.facet) { +// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_50.1(constants.%Copy.facet) { // CHECK:STDOUT: %U.patt.loc10_9.2 => constants.%U.patt.fe6 // CHECK:STDOUT: %U.loc10_9.1 => constants.%Copy.facet -// CHECK:STDOUT: %U.as_type.loc10_43.1 => constants.%ptr.e8f +// CHECK:STDOUT: %U.as_type.loc10_42.1 => constants.%ptr.e8f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 -// CHECK:STDOUT: %x.param_patt.loc10_41.2 => constants.%x.param_patt.b5c -// CHECK:STDOUT: %x.patt.loc10_41.2 => constants.%x.patt.b28 -// CHECK:STDOUT: %.loc10_49.2 => constants.%.cb6 -// CHECK:STDOUT: %return.param_patt.loc10_49.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc10_46.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %x.param_patt.loc10_40.2 => constants.%x.param_patt.b5c +// CHECK:STDOUT: %x.patt.loc10_40.2 => constants.%x.patt.b28 +// CHECK:STDOUT: %.loc10_48.2 => constants.%.cb6 +// CHECK:STDOUT: %return.param_patt.loc10_48.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc10_45.2 => constants.%return.patt.d67 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 // CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.884 -// CHECK:STDOUT: %.loc10_60.3 => constants.%.be5 +// CHECK:STDOUT: %.loc10_59.3 => constants.%.be5 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.1da -// CHECK:STDOUT: %impl.elem0.loc10_60.2 => constants.%impl.elem0.484 -// CHECK:STDOUT: %specific_impl_fn.loc10_60.2 => constants.%specific_impl_fn.a76 +// CHECK:STDOUT: %impl.elem0.loc10_59.2 => constants.%impl.elem0.484 +// CHECK:STDOUT: %specific_impl_fn.loc10_59.2 => constants.%specific_impl_fn.a76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- generic_interface.carbon diff --git a/toolchain/check/testdata/impl/impl_thunk_min_prelude.carbon b/toolchain/check/testdata/impl/impl_thunk_min_prelude.carbon index 78faa8e159c8..add98741a6f3 100644 --- a/toolchain/check/testdata/impl/impl_thunk_min_prelude.carbon +++ b/toolchain/check/testdata/impl/impl_thunk_min_prelude.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; -interface X(T:! type, U:! type) { +interface X(T: type, U: type) { fn F(t: T) -> U; } @@ -44,13 +44,13 @@ class A { library "[[@TEST_NAME]]"; -class Wrap(T:! type) {} +class Wrap(T: type) {} -interface OpWith(U:! type) { +interface OpWith(U: type) { fn Op(self, u: U); } -impl forall [T:! type, U:! Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U) { +impl forall [T: type, U: Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U) { // CHECK:STDERR: fail_todo_out_of_line_thunk.carbon:[[@LINE+7]]:3: error: use of undefined generic function [MissingGenericFunctionDefinition] // CHECK:STDERR: fn Op(self, other: Self); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ @@ -63,19 +63,19 @@ impl forall [T:! type, U:! Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U) { // TODO: Once we support the syntax for defining impl members out of line, // define the above function here. -// fn (forall [T:! type, U:! Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U)).Op(self, other: Self) {} +// fn (forall [T: type, U: Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U)).Op(self, other: Self) {} // --- builtin_thunk.carbon library "[[@TEST_NAME]]"; -class Wrap(T:! type) {} +class Wrap(T: type) {} -interface OpWith(U:! type) { +interface OpWith(U: type) { fn Op(self, u: U); } -impl forall [T:! type, U:! Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U) { +impl forall [T: type, U: Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U) { fn Op(self, other: Self) = "no_op"; } @@ -83,10 +83,10 @@ impl forall [T:! type, U:! Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U) { library "[[@TEST_NAME]]"; -interface Add(T:! type) { +interface Add(T: type) { fn Op(a: Self, b: T) -> Self; } -impl forall [T:! Core.ImplicitAs(i32)] i32 as Add(T) { +impl forall [T: Core.ImplicitAs(i32)] i32 as Add(T) { fn Op(a: Self, b: Self) -> Self = "int.sadd"; } diff --git a/toolchain/check/testdata/impl/impl_where_redecl.carbon b/toolchain/check/testdata/impl/impl_where_redecl.carbon index 3bfbd10747ca..75b71676a95c 100644 --- a/toolchain/check/testdata/impl/impl_where_redecl.carbon +++ b/toolchain/check/testdata/impl/impl_where_redecl.carbon @@ -15,8 +15,8 @@ // --- fail_match_with_associated_type.carbon library "[[@TEST_NAME]]"; -interface I { let T:! type; } -constraint N(U:! type) {} +interface I { let T: type; } +constraint N(U: type) {} // CHECK:STDERR: fail_match_with_associated_type.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition] // CHECK:STDERR: impl () as I where .T = {}; diff --git a/toolchain/check/testdata/impl/import_builtin_call.carbon b/toolchain/check/testdata/impl/import_builtin_call.carbon index 6d45310ae8a0..d9d9b3d7af86 100644 --- a/toolchain/check/testdata/impl/import_builtin_call.carbon +++ b/toolchain/check/testdata/impl/import_builtin_call.carbon @@ -29,15 +29,15 @@ interface Add { fn Int(n: IntLiteral) -> type = "int.make_type_signed"; -class MyInt(N:! IntLiteral) { +class MyInt(N: IntLiteral) { adapt Int(N); } -impl forall [N:! IntLiteral] MyInt(N) as Add { +impl forall [N: IntLiteral] MyInt(N) as Add { fn Op(self, other: Self) -> Self = "int.sadd"; } -fn Double[N:! IntLiteral](x: MyInt(N)) -> MyInt(N) { +fn Double[N: IntLiteral](x: MyInt(N)) -> MyInt(N) { return x.(Add.Op)(x); } @@ -63,7 +63,7 @@ fn Int(n: IntLiteral) -> type = "int.make_type_signed"; fn ToLiteral(n: Int(32)) -> IntLiteral = "int.convert_checked"; fn FromLiteral(n: IntLiteral) -> Int(32) = "int.convert_checked"; -fn Make(N:! Int(32)) -> Int(ToLiteral(N)) { return Make(N); } +fn Make(generic N: Int(32)) -> Int(ToLiteral(N)) { return Make(N); } class OtherInt { adapt Int(32); @@ -72,7 +72,7 @@ class OtherInt { fn OtherInt.ToLiteral(self) -> IntLiteral = "int.convert_checked"; -fn MakeFromClass(N:! OtherInt) -> Int(N.ToLiteral()) { return MakeFromClass(N); } +fn MakeFromClass(generic N: OtherInt) -> Int(N.ToLiteral()) { return MakeFromClass(N); } // --- use_convert_symbolic.carbon diff --git a/toolchain/check/testdata/impl/import_canonical_witnesses.carbon b/toolchain/check/testdata/impl/import_canonical_witnesses.carbon index 1b7d3acdb267..a0000b4d59ae 100644 --- a/toolchain/check/testdata/impl/import_canonical_witnesses.carbon +++ b/toolchain/check/testdata/impl/import_canonical_witnesses.carbon @@ -39,17 +39,17 @@ interface SimpleOp { fn Op(self); } -impl forall [T:! type] T as SimpleOp { +impl forall [T: type] T as SimpleOp { fn Op(unused self) {} } // An empty interface with blanket impl for pointers. interface Empty {} -impl forall [T:! type] T as Empty {} +impl forall [T: type] T as Empty {} // Class with a use of `SimpleOp.Op`. -class InterfaceWrap(T:! SimpleOp & Empty) { - fn UseSimpleOp(unused self, value:! T) { +class InterfaceWrap(T: SimpleOp & Empty) { + fn UseSimpleOp(unused self, generic value: T) { value.(SimpleOp.Op)(); } } @@ -57,12 +57,12 @@ class InterfaceWrap(T:! SimpleOp & Empty) { // Interface combining the above for an indirect `SimpleOp` use through `C`, // particularly use an associated constant. interface CombinedFacet { - let T:! SimpleOp & Empty; + let T: SimpleOp & Empty; fn GetInterfaceWrap(self) -> InterfaceWrap(T); } // A wrapper providing `CombinedFacet`. -class TypeWrap(T:! type) { +class TypeWrap(T: type) { impl as CombinedFacet where .T = T { fn GetInterfaceWrap(unused self) -> InterfaceWrap(T) { return {}; @@ -77,6 +77,6 @@ import library "interfaces"; class C {} -fn F(t: TypeWrap(C), c:! C) { +fn F(t: TypeWrap(C), generic c: C) { t.(CombinedFacet.GetInterfaceWrap)().UseSimpleOp(c); } diff --git a/toolchain/check/testdata/impl/import_generic.carbon b/toolchain/check/testdata/impl/import_generic.carbon index 481b56767c37..3c2b24fe8143 100644 --- a/toolchain/check/testdata/impl/import_generic.carbon +++ b/toolchain/check/testdata/impl/import_generic.carbon @@ -15,8 +15,8 @@ // --- basic_import_generic_interface.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) {} -interface J(T:! type) { +interface I(T: type) {} +interface J(T: type) { extend require impls I(T); } @@ -32,8 +32,8 @@ impl C as J({}) {} // --- basic_import_generic_constraint.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) {} -constraint J(T:! type) { +interface I(T: type) {} +constraint J(T: type) { extend require impls I(T); } @@ -49,16 +49,16 @@ impl C as J({}) {} library "[[@TEST_NAME]]"; class C {} -interface I(T:! type) {} +interface I(T: type) {} // Has both declaration and definition. -impl forall [T:! type] C as I(T); -impl forall [T:! type] C as I(T) {} +impl forall [T: type] C as I(T); +impl forall [T: type] C as I(T) {} // Only has definition. -impl forall [T:! type] C as I(T*) {} +impl forall [T: type] C as I(T*) {} -constraint N(T:! type) { +constraint N(T: type) { extend require impls I(T); } @@ -67,50 +67,50 @@ constraint N(T:! type) { impl library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] -// CHECK:STDERR: impl forall [T:! type] C as I(T); +// CHECK:STDERR: impl forall [T: type] C as I(T); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: +impl forall [T: type] C as I(T); + +// CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] +// CHECK:STDERR: impl forall [T: type] C as I(T) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] C as I(T); +impl forall [T: type] C as I(T) {} // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] -// CHECK:STDERR: impl forall [T:! type] C as I(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: -impl forall [T:! type] C as I(T) {} - -// CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] -// CHECK:STDERR: impl forall [T:! type] C as I(T*); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: -impl forall [T:! type] C as I(T*); - -// CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] -// CHECK:STDERR: impl forall [T:! type] C as I(T*) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: -impl forall [T:! type] C as I(T*) {} - -// CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] -// CHECK:STDERR: impl forall [T:! type] C as N(T); +// CHECK:STDERR: impl forall [T: type] C as I(T*); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] C as N(T); +impl forall [T: type] C as I(T*); + // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] -// CHECK:STDERR: impl forall [T:! type] C as N(T*); +// CHECK:STDERR: impl forall [T: type] C as I(T*) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] C as N(T*); +impl forall [T: type] C as I(T*) {} + +// CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] +// CHECK:STDERR: impl forall [T: type] C as N(T); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: +impl forall [T: type] C as N(T); +// CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] +// CHECK:STDERR: impl forall [T: type] C as N(T*); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: +impl forall [T: type] C as N(T*); // --- import_generic_with_different_specific.carbon library "[[@TEST_NAME]]"; class C {} -interface I(T:! type) {} +interface I(T: type) {} -impl forall [T:! type] C as I(T) {} +impl forall [T: type] C as I(T) {} -constraint N(T:! type) { +constraint N(T: type) { extend require impls I(T); } @@ -119,71 +119,71 @@ impl library "[[@TEST_NAME]]"; // These have different specifics than any impl decl in the api file, so they // are allowed. -impl forall [T:! type] C as I(T*) {} -impl forall [T:! type] C as N(T**) {} +impl forall [T: type] C as I(T*) {} +impl forall [T: type] C as N(T**) {} // --- fail_import_generic_decl.carbon library "[[@TEST_NAME]]"; class D {} -interface J(T:! type) {} +interface J(T: type) {} -constraint N(T:! type) { +constraint N(T: type) { extend require impls J(T); } // CHECK:STDERR: fail_import_generic_decl.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition] -// CHECK:STDERR: impl forall [T:! type] D as J(T); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] D as J(T); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] D as J(T); +impl forall [T: type] D as J(T); // CHECK:STDERR: fail_import_generic_decl.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition] -// CHECK:STDERR: impl forall [T:! type] D as J(T*); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] D as J(T*); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] D as J(T*); +impl forall [T: type] D as J(T*); // --- fail_import_generic_decl.impl.carbon impl library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] -// CHECK:STDERR: impl forall [T:! type] D as J(T); +// CHECK:STDERR: impl forall [T: type] D as J(T); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: +impl forall [T: type] D as J(T); + +// CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] +// CHECK:STDERR: impl forall [T: type] D as J(T) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] D as J(T); +impl forall [T: type] D as J(T) {} // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] -// CHECK:STDERR: impl forall [T:! type] D as J(T) {} +// CHECK:STDERR: impl forall [T: type] D as J(T*); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: +impl forall [T: type] D as J(T*); + +// CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] +// CHECK:STDERR: impl forall [T: type] D as J(T*) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] D as J(T) {} +impl forall [T: type] D as J(T*) {} // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] -// CHECK:STDERR: impl forall [T:! type] D as J(T*); +// CHECK:STDERR: impl forall [T: type] D as N(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: +impl forall [T: type] D as N(T) {} + +// CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] +// CHECK:STDERR: impl forall [T: type] D as N(T*) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] D as J(T*); - -// CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] -// CHECK:STDERR: impl forall [T:! type] D as J(T*) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: -impl forall [T:! type] D as J(T*) {} - -// CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] -// CHECK:STDERR: impl forall [T:! type] D as N(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: -impl forall [T:! type] D as N(T) {} - -// CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl] -// CHECK:STDERR: impl forall [T:! type] D as N(T*) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: -impl forall [T:! type] D as N(T*) {} +impl forall [T: type] D as N(T*) {} // CHECK:STDOUT: --- basic_import_generic_interface.carbon // CHECK:STDOUT: @@ -212,18 +212,18 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc3_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_16.1: type = splice_block %.loc3_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc3_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %J.decl: %J.type.23c = interface_decl @J [concrete = constants.%J.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] // CHECK:STDOUT: } @@ -235,14 +235,14 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc3_14.1)> [symbolic = %I.type (constants.%I.type.3fe)] -// CHECK:STDOUT: %Self.loc3_23.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc3_22.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self.191)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_23.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc3_22.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self.191)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_23.1 +// CHECK:STDOUT: .Self = %Self.loc3_22.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -257,17 +257,17 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc4_14.1)> [symbolic = %J.type (constants.%J.type.5c8)] -// CHECK:STDOUT: %Self.loc4_23.2: @J.%J.type (%J.type.5c8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.ad7)] +// CHECK:STDOUT: %Self.loc4_22.2: @J.%J.type (%J.type.5c8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self.ad7)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_23.1: @J.%J.type (%J.type.5c8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.ad7)] +// CHECK:STDOUT: %Self.loc4_22.1: @J.%J.type (%J.type.5c8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self.ad7)] // CHECK:STDOUT: %J.WithSelf.decl = interface_with_self_decl @J [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %J.WithSelf.Self.as_type.impls.I.type.require.decl = require_decl @J.WithSelf.Self.as_type.impls.I.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type.loc5_18.1 impls %I.type.loc5_27.1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_type.loc5_18.1: type = facet_access_type @J.%Self.loc4_23.1 [symbolic = %Self.as_type.loc5_18.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %Self.as_type.loc5_18.1: type = facet_access_type @J.%Self.loc4_22.1 [symbolic = %Self.as_type.loc5_18.2 (constants.%Self.as_type)] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, @J.%T.loc4_14.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type.loc5_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc5_27.2 (constants.%I.type.3fe)] @@ -275,7 +275,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %.loc5: type = specific_constant @J.WithSelf.Self.as_type.impls.I.type.require.%I.type.loc5_27.1, @J.WithSelf.Self.as_type.impls.I.type.require(constants.%T, constants.%Self.ad7) [symbolic = %I.type (constants.%I.type.3fe)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_23.1 +// CHECK:STDOUT: .Self = %Self.loc4_22.1 // CHECK:STDOUT: .I = // CHECK:STDOUT: .T = // CHECK:STDOUT: .I = @@ -292,7 +292,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @J.WithSelf.Self.as_type.impls.I.type.require(@J.%T.loc4_14.2: type, @J.%Self.loc4_23.1: @J.%J.type (%J.type.5c8)) { +// CHECK:STDOUT: generic require @J.WithSelf.Self.as_type.impls.I.type.require(@J.%T.loc4_14.2: type, @J.%Self.loc4_22.1: @J.%J.type (%J.type.5c8)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.5c8)] // CHECK:STDOUT: %Self: @J.WithSelf.Self.as_type.impls.I.type.require.%J.type (%J.type.5c8) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.ad7)] @@ -306,7 +306,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.3fe -// CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.191 +// CHECK:STDOUT: %Self.loc3_22.2 => constants.%Self.191 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T, constants.%Self.191) { @@ -363,14 +363,14 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: %I.type.335 = import_ref Main//basic_import_generic_interface, I, loaded [concrete = constants.%I.generic] // CHECK:STDOUT: %Main.J: %J.type.23c = import_ref Main//basic_import_generic_interface, J, loaded [concrete = constants.%J.generic] -// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//basic_import_generic_interface, loc3_23, unloaded +// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//basic_import_generic_interface, loc3_22, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//basic_import_generic_interface, loc3_14, loaded [symbolic = @I.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.6ec = import_ref Main//basic_import_generic_interface, loc5_28, unloaded // CHECK:STDOUT: %Main.import_ref.91b: type = import_ref Main//basic_import_generic_interface, loc5_18, loaded [symbolic = @J.WithSelf.Self.as_type.impls.I.type.require.%Self.as_type (constants.%Self.as_type)] // CHECK:STDOUT: %Main.import_ref.e01: type = import_ref Main//basic_import_generic_interface, loc5_27, loaded [symbolic = @J.WithSelf.Self.as_type.impls.I.type.require.%I.type (constants.%I.type.3fe)] // CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//basic_import_generic_interface, loc4_14, loaded [symbolic = @J.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.a19ec6.2: @J.%J.type (%J.type.5c8) = import_ref Main//basic_import_generic_interface, loc4_23, loaded [symbolic = @J.%Self (constants.%Self.9f1)] -// CHECK:STDOUT: %Main.import_ref.ec8 = import_ref Main//basic_import_generic_interface, loc4_23, unloaded +// CHECK:STDOUT: %Main.import_ref.a19ec6.2: @J.%J.type (%J.type.5c8) = import_ref Main//basic_import_generic_interface, loc4_22, loaded [symbolic = @J.%Self (constants.%Self.9f1)] +// CHECK:STDOUT: %Main.import_ref.ec8 = import_ref Main//basic_import_generic_interface, loc4_22, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.5: type = import_ref Main//basic_import_generic_interface, loc4_14, loaded [symbolic = @J.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -585,18 +585,18 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc3_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_16.1: type = splice_block %.loc3_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc3_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %J.decl: %J.type.28e = constraint_decl @J [concrete = constants.%empty_struct] { // CHECK:STDOUT: %T.patt.loc4_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -608,14 +608,14 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc3_14.1)> [symbolic = %I.type (constants.%I.type.3fe)] -// CHECK:STDOUT: %Self.loc3_23.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc3_22.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self.191)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_23.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc3_22.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self.191)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_23.1 +// CHECK:STDOUT: .Self = %Self.loc3_22.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -630,17 +630,17 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc4_15.1)> [symbolic = %J.type (constants.%J.type.d68)] -// CHECK:STDOUT: %Self.loc4_24.2: @J.%J.type (%J.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_24.2 (constants.%Self.22b)] +// CHECK:STDOUT: %Self.loc4_23.2: @J.%J.type (%J.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.22b)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { -// CHECK:STDOUT: %Self.loc4_24.1: @J.%J.type (%J.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_24.2 (constants.%Self.22b)] +// CHECK:STDOUT: %Self.loc4_23.1: @J.%J.type (%J.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.22b)] // CHECK:STDOUT: %J.WithSelf.decl = constraint_with_self_decl @J [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %J.WithSelf.Self.as_type.impls.I.type.require.decl = require_decl @J.WithSelf.Self.as_type.impls.I.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type.loc5_18.1 impls %I.type.loc5_27.1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_type.loc5_18.1: type = facet_access_type @J.%Self.loc4_24.1 [symbolic = %Self.as_type.loc5_18.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %Self.as_type.loc5_18.1: type = facet_access_type @J.%Self.loc4_23.1 [symbolic = %Self.as_type.loc5_18.2 (constants.%Self.as_type)] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, @J.%T.loc4_15.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type.loc5_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc5_27.2 (constants.%I.type.3fe)] @@ -648,7 +648,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %.loc5: type = specific_constant @J.WithSelf.Self.as_type.impls.I.type.require.%I.type.loc5_27.1, @J.WithSelf.Self.as_type.impls.I.type.require(constants.%T, constants.%Self.22b) [symbolic = %I.type (constants.%I.type.3fe)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_24.1 +// CHECK:STDOUT: .Self = %Self.loc4_23.1 // CHECK:STDOUT: .I = // CHECK:STDOUT: .T = // CHECK:STDOUT: .I = @@ -662,7 +662,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @J.WithSelf.Self.as_type.impls.I.type.require(@J.%T.loc4_15.2: type, @J.%Self.loc4_24.1: @J.%J.type (%J.type.d68)) { +// CHECK:STDOUT: generic require @J.WithSelf.Self.as_type.impls.I.type.require(@J.%T.loc4_15.2: type, @J.%Self.loc4_23.1: @J.%J.type (%J.type.d68)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.d68)] // CHECK:STDOUT: %Self: @J.WithSelf.Self.as_type.impls.I.type.require.%J.type (%J.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.22b)] @@ -676,7 +676,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.3fe -// CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.191 +// CHECK:STDOUT: %Self.loc3_22.2 => constants.%Self.191 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T, constants.%Self.191) { @@ -730,13 +730,13 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Main.I = import_ref Main//basic_import_generic_constraint, I, unloaded // CHECK:STDOUT: %Main.J: %J.type.28e = import_ref Main//basic_import_generic_constraint, J, loaded [concrete = constants.%empty_struct.f37] // CHECK:STDOUT: %Main.import_ref.afe = import_ref Main//basic_import_generic_constraint, loc5_28, unloaded -// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//basic_import_generic_constraint, loc3_23, unloaded +// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//basic_import_generic_constraint, loc3_22, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//basic_import_generic_constraint, loc3_14, loaded [symbolic = @I.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.849: type = import_ref Main//basic_import_generic_constraint, loc5_18, loaded [symbolic = @J.WithSelf.Self.as_type.impls.I.type.require.%Self.as_type (constants.%Self.as_type)] // CHECK:STDOUT: %Main.import_ref.e01: type = import_ref Main//basic_import_generic_constraint, loc5_27, loaded [symbolic = @J.WithSelf.Self.as_type.impls.I.type.require.%I.type (constants.%I.type.3fe)] // CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//basic_import_generic_constraint, loc4_15, loaded [symbolic = @J.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.006c33.2: @J.%J.type (%J.type.d682d6.1) = import_ref Main//basic_import_generic_constraint, loc4_24, loaded [symbolic = @J.%Self (constants.%Self.e1f642.1)] -// CHECK:STDOUT: %Main.import_ref.694 = import_ref Main//basic_import_generic_constraint, loc4_24, unloaded +// CHECK:STDOUT: %Main.import_ref.006c33.2: @J.%J.type (%J.type.d682d6.1) = import_ref Main//basic_import_generic_constraint, loc4_23, loaded [symbolic = @J.%Self (constants.%Self.e1f642.1)] +// CHECK:STDOUT: %Main.import_ref.694 = import_ref Main//basic_import_generic_constraint, loc4_23, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.5: type = import_ref Main//basic_import_generic_constraint, loc4_15, loaded [symbolic = @J.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -939,9 +939,9 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_16.1: type = splice_block %.loc5_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T)] // CHECK:STDOUT: } @@ -951,10 +951,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref.loc8: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref.loc8: type = name_ref T, %T.loc8_15.1 [symbolic = %T.loc8_15.2 (constants.%T)] -// CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.3fe)] -// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] { +// CHECK:STDOUT: %I.type.loc8_31.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_31.2 (constants.%I.type.3fe)] +// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc8: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -964,10 +964,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref.loc9: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc9 [symbolic = %T.loc8_15.2 (constants.%T)] -// CHECK:STDOUT: %I.type.loc9: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.3fe)] -// CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [concrete = type] { +// CHECK:STDOUT: %I.type.loc9: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_31.2 (constants.%I.type.3fe)] +// CHECK:STDOUT: %.loc9_17.1: type = splice_block %.loc9_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc9: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -977,20 +977,20 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_15.1 [symbolic = %T.loc12_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc12_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc12_32.2 (constants.%ptr)] -// CHECK:STDOUT: %I.type.loc12_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc12_33.2 (constants.%I.type.a76)] -// CHECK:STDOUT: %.loc12_18.1: type = splice_block %.loc12_18.2 [concrete = type] { +// CHECK:STDOUT: %ptr.loc12_31.1: type = ptr_type %T.ref [symbolic = %ptr.loc12_31.2 (constants.%ptr)] +// CHECK:STDOUT: %I.type.loc12_32.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc12_32.2 (constants.%I.type.a76)] +// CHECK:STDOUT: %.loc12_17.1: type = splice_block %.loc12_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc12_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %N.decl: %N.type.b76 = constraint_decl @N [concrete = constants.%empty_struct] { // CHECK:STDOUT: %T.patt.loc14_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_18.1: type = splice_block %.loc14_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc14_17.1: type = splice_block %.loc14_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc14_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc14_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc14_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -1002,14 +1002,14 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc5_14.1)> [symbolic = %I.type (constants.%I.type.3fe)] -// CHECK:STDOUT: %Self.loc5_23.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc5_22.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc5_22.2 (constants.%Self.191)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc5_23.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc5_22.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc5_22.2 (constants.%Self.191)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc5_23.1 +// CHECK:STDOUT: .Self = %Self.loc5_22.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1024,17 +1024,17 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T.loc14_15.1)> [symbolic = %N.type (constants.%N.type.d68)] -// CHECK:STDOUT: %Self.loc14_24.2: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self.22b)] +// CHECK:STDOUT: %Self.loc14_23.2: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc14_23.2 (constants.%Self.22b)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { -// CHECK:STDOUT: %Self.loc14_24.1: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self.22b)] +// CHECK:STDOUT: %Self.loc14_23.1: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc14_23.2 (constants.%Self.22b)] // CHECK:STDOUT: %N.WithSelf.decl = constraint_with_self_decl @N [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %N.WithSelf.Self.as_type.impls.I.type.require.decl = require_decl @N.WithSelf.Self.as_type.impls.I.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type.loc15_18.1 impls %I.type.loc15_27.1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_type.loc15_18.1: type = facet_access_type @N.%Self.loc14_24.1 [symbolic = %Self.as_type.loc15_18.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %Self.as_type.loc15_18.1: type = facet_access_type @N.%Self.loc14_23.1 [symbolic = %Self.as_type.loc15_18.2 (constants.%Self.as_type)] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, @N.%T.loc14_15.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type.loc15_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc15_27.2 (constants.%I.type.3fe)] @@ -1042,7 +1042,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %.loc15: type = specific_constant @N.WithSelf.Self.as_type.impls.I.type.require.%I.type.loc15_27.1, @N.WithSelf.Self.as_type.impls.I.type.require(constants.%T, constants.%Self.22b) [symbolic = %I.type (constants.%I.type.3fe)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc14_24.1 +// CHECK:STDOUT: .Self = %Self.loc14_23.1 // CHECK:STDOUT: .I = // CHECK:STDOUT: .T = // CHECK:STDOUT: .I = @@ -1056,7 +1056,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @N.WithSelf.Self.as_type.impls.I.type.require(@N.%T.loc14_15.2: type, @N.%Self.loc14_24.1: @N.%N.type (%N.type.d68)) { +// CHECK:STDOUT: generic require @N.WithSelf.Self.as_type.impls.I.type.require(@N.%T.loc14_15.2: type, @N.%Self.loc14_23.1: @N.%N.type (%N.type.d68)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d68)] // CHECK:STDOUT: %Self: @N.WithSelf.Self.as_type.impls.I.type.require.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.22b)] @@ -1067,39 +1067,39 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: generic impl @C.as.I.impl.da9(%T.loc8_15.1: type) { // CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc8_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.2 (constants.%T)] -// CHECK:STDOUT: %I.type.loc8_32.2: type = facet_type <@I, @I(%T.loc8_15.2)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.3fe)] -// CHECK:STDOUT: %I.impl_witness.loc8_33.2: = impl_witness %I.impl_witness_table, @C.as.I.impl.da9(%T.loc8_15.2) [symbolic = %I.impl_witness.loc8_33.2 (constants.%I.impl_witness.fb7)] +// CHECK:STDOUT: %I.type.loc8_31.2: type = facet_type <@I, @I(%T.loc8_15.2)> [symbolic = %I.type.loc8_31.2 (constants.%I.type.3fe)] +// CHECK:STDOUT: %I.impl_witness.loc8_32.2: = impl_witness %I.impl_witness_table, @C.as.I.impl.da9(%T.loc8_15.2) [symbolic = %I.impl_witness.loc8_32.2 (constants.%I.impl_witness.fb7)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc8_32.2 [symbolic = %require_complete (constants.%require_complete.45e)] +// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc8_31.2 [symbolic = %require_complete (constants.%require_complete.45e)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref.loc8 as %I.type.loc8_32.1 { +// CHECK:STDOUT: impl: %C.ref.loc8 as %I.type.loc8_31.1 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.da9 [concrete] -// CHECK:STDOUT: %I.impl_witness.loc8_33.1: = impl_witness %I.impl_witness_table, @C.as.I.impl.da9(constants.%T) [symbolic = %I.impl_witness.loc8_33.2 (constants.%I.impl_witness.fb7)] +// CHECK:STDOUT: %I.impl_witness.loc8_32.1: = impl_witness %I.impl_witness_table, @C.as.I.impl.da9(constants.%T) [symbolic = %I.impl_witness.loc8_32.2 (constants.%I.impl_witness.fb7)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %I.type.loc8_32.1 -// CHECK:STDOUT: witness = %I.impl_witness.loc8_33.1 +// CHECK:STDOUT: extend %I.type.loc8_31.1 +// CHECK:STDOUT: witness = %I.impl_witness.loc8_32.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @C.as.I.impl.982(%T.loc12_15.1: type) { // CHECK:STDOUT: %T.patt.loc12_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc12_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc12_32.2: type = ptr_type %T.loc12_15.2 [symbolic = %ptr.loc12_32.2 (constants.%ptr)] -// CHECK:STDOUT: %I.type.loc12_33.2: type = facet_type <@I, @I(%ptr.loc12_32.2)> [symbolic = %I.type.loc12_33.2 (constants.%I.type.a76)] -// CHECK:STDOUT: %I.impl_witness.loc12_35.2: = impl_witness %I.impl_witness_table, @C.as.I.impl.982(%T.loc12_15.2) [symbolic = %I.impl_witness.loc12_35.2 (constants.%I.impl_witness.0d7)] +// CHECK:STDOUT: %ptr.loc12_31.2: type = ptr_type %T.loc12_15.2 [symbolic = %ptr.loc12_31.2 (constants.%ptr)] +// CHECK:STDOUT: %I.type.loc12_32.2: type = facet_type <@I, @I(%ptr.loc12_31.2)> [symbolic = %I.type.loc12_32.2 (constants.%I.type.a76)] +// CHECK:STDOUT: %I.impl_witness.loc12_34.2: = impl_witness %I.impl_witness_table, @C.as.I.impl.982(%T.loc12_15.2) [symbolic = %I.impl_witness.loc12_34.2 (constants.%I.impl_witness.0d7)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc12_33.2 [symbolic = %require_complete (constants.%require_complete.078)] +// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc12_32.2 [symbolic = %require_complete (constants.%require_complete.078)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %I.type.loc12_33.1 { +// CHECK:STDOUT: impl: %C.ref as %I.type.loc12_32.1 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.982 [concrete] -// CHECK:STDOUT: %I.impl_witness.loc12_35.1: = impl_witness %I.impl_witness_table, @C.as.I.impl.982(constants.%T) [symbolic = %I.impl_witness.loc12_35.2 (constants.%I.impl_witness.0d7)] +// CHECK:STDOUT: %I.impl_witness.loc12_34.1: = impl_witness %I.impl_witness_table, @C.as.I.impl.982(constants.%T) [symbolic = %I.impl_witness.loc12_34.2 (constants.%I.impl_witness.0d7)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %I.type.loc12_33.1 -// CHECK:STDOUT: witness = %I.impl_witness.loc12_35.1 +// CHECK:STDOUT: extend %I.type.loc12_32.1 +// CHECK:STDOUT: witness = %I.impl_witness.loc12_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1117,7 +1117,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.3fe -// CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.191 +// CHECK:STDOUT: %Self.loc5_22.2 => constants.%Self.191 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T, constants.%Self.191) { @@ -1127,8 +1127,8 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: specific @C.as.I.impl.da9(constants.%T) { // CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_15.2 => constants.%T -// CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.3fe -// CHECK:STDOUT: %I.impl_witness.loc8_33.2 => constants.%I.impl_witness.fb7 +// CHECK:STDOUT: %I.type.loc8_31.2 => constants.%I.type.3fe +// CHECK:STDOUT: %I.impl_witness.loc8_32.2 => constants.%I.impl_witness.fb7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T, constants.%I.facet.0de) { @@ -1141,15 +1141,15 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.a76 -// CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.0ef +// CHECK:STDOUT: %Self.loc5_22.2 => constants.%Self.0ef // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.982(constants.%T) { // CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc12_15.2 => constants.%T -// CHECK:STDOUT: %ptr.loc12_32.2 => constants.%ptr -// CHECK:STDOUT: %I.type.loc12_33.2 => constants.%I.type.a76 -// CHECK:STDOUT: %I.impl_witness.loc12_35.2 => constants.%I.impl_witness.0d7 +// CHECK:STDOUT: %ptr.loc12_31.2 => constants.%ptr +// CHECK:STDOUT: %I.type.loc12_32.2 => constants.%I.type.a76 +// CHECK:STDOUT: %I.impl_witness.loc12_34.2 => constants.%I.impl_witness.0d7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%ptr, constants.%Self.191) { @@ -1210,28 +1210,28 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Main.C: type = import_ref Main//import_generic, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.I: %I.type.335 = import_ref Main//import_generic, I, loaded [concrete = constants.%I.generic] // CHECK:STDOUT: %Main.N: %N.type.b76 = import_ref Main//import_generic, N, loaded [concrete = constants.%empty_struct] -// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//import_generic, loc5_23, unloaded +// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//import_generic, loc5_22, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic, loc5_14, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.c0d = import_ref Main//import_generic, loc8_33, unloaded +// CHECK:STDOUT: %Main.import_ref.c0d = import_ref Main//import_generic, loc8_32, unloaded // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic, loc4_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.e47 = import_ref Main//import_generic, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %I.impl_witness_table.c49 = impl_witness_table (), @C.as.I.impl.119 [concrete] -// CHECK:STDOUT: %Main.import_ref.335f1c.1: type = import_ref Main//import_generic, loc8_24, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.e015f6.1: type = import_ref Main//import_generic, loc8_32, loaded [symbolic = @C.as.I.impl.119.%I.type (constants.%I.type.3fe)] -// CHECK:STDOUT: %Main.import_ref.e87 = import_ref Main//import_generic, loc8_32, unloaded +// CHECK:STDOUT: %Main.import_ref.335f1c.1: type = import_ref Main//import_generic, loc8_23, loaded [concrete = constants.%C] +// CHECK:STDOUT: %Main.import_ref.e015f6.1: type = import_ref Main//import_generic, loc8_31, loaded [symbolic = @C.as.I.impl.119.%I.type (constants.%I.type.3fe)] +// CHECK:STDOUT: %Main.import_ref.e87 = import_ref Main//import_generic, loc8_31, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic, loc8_15, loaded [symbolic = @C.as.I.impl.119.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.496 = import_ref Main//import_generic, loc12_35, unloaded +// CHECK:STDOUT: %Main.import_ref.496 = import_ref Main//import_generic, loc12_34, unloaded // CHECK:STDOUT: %I.impl_witness_table.78a = impl_witness_table (), @C.as.I.impl.238 [concrete] -// CHECK:STDOUT: %Main.import_ref.335f1c.2: type = import_ref Main//import_generic, loc12_24, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.a08: type = import_ref Main//import_generic, loc12_33, loaded [symbolic = @C.as.I.impl.238.%I.type (constants.%I.type.a76)] -// CHECK:STDOUT: %Main.import_ref.891 = import_ref Main//import_generic, loc12_33, unloaded +// CHECK:STDOUT: %Main.import_ref.335f1c.2: type = import_ref Main//import_generic, loc12_23, loaded [concrete = constants.%C] +// CHECK:STDOUT: %Main.import_ref.a08: type = import_ref Main//import_generic, loc12_32, loaded [symbolic = @C.as.I.impl.238.%I.type (constants.%I.type.a76)] +// CHECK:STDOUT: %Main.import_ref.891 = import_ref Main//import_generic, loc12_32, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//import_generic, loc12_15, loaded [symbolic = @C.as.I.impl.238.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.e24 = import_ref Main//import_generic, loc15_28, unloaded // CHECK:STDOUT: %Main.import_ref.849: type = import_ref Main//import_generic, loc15_18, loaded [symbolic = @N.WithSelf.Self.as_type.impls.I.type.require.%Self.as_type (constants.%Self.as_type)] // CHECK:STDOUT: %Main.import_ref.e015f6.2: type = import_ref Main//import_generic, loc15_27, loaded [symbolic = @N.WithSelf.Self.as_type.impls.I.type.require.%I.type (constants.%I.type.3fe)] // CHECK:STDOUT: %Main.import_ref.b3bc94.6: type = import_ref Main//import_generic, loc14_15, loaded [symbolic = @N.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.006c33.2: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic, loc14_24, loaded [symbolic = @N.%Self (constants.%Self.e1f)] -// CHECK:STDOUT: %Main.import_ref.694 = import_ref Main//import_generic, loc14_24, unloaded +// CHECK:STDOUT: %Main.import_ref.006c33.2: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic, loc14_23, loaded [symbolic = @N.%Self (constants.%Self.e1f)] +// CHECK:STDOUT: %Main.import_ref.694 = import_ref Main//import_generic, loc14_23, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.7: type = import_ref Main//import_generic, loc14_15, loaded [symbolic = @N.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1249,10 +1249,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, imports.%Main.I [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_15.1 [symbolic = %T.loc8_15.2 (constants.%T)] -// CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.3fe)] -// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] { +// CHECK:STDOUT: %I.type.loc8_31.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_31.2 (constants.%I.type.3fe)] +// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -1262,10 +1262,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, imports.%Main.I [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_15.1 [symbolic = %T.loc14_15.2 (constants.%T)] -// CHECK:STDOUT: %I.type.loc14_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc14_32.2 (constants.%I.type.3fe)] -// CHECK:STDOUT: %.loc14_18.1: type = splice_block %.loc14_18.2 [concrete = type] { +// CHECK:STDOUT: %I.type.loc14_31.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc14_31.2 (constants.%I.type.3fe)] +// CHECK:STDOUT: %.loc14_17.1: type = splice_block %.loc14_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc14_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc14_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc14_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -1275,11 +1275,11 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, imports.%Main.I [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_15.1 [symbolic = %T.loc20_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc20_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_32.2 (constants.%ptr)] -// CHECK:STDOUT: %I.type.loc20_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc20_33.2 (constants.%I.type.a76)] -// CHECK:STDOUT: %.loc20_18.1: type = splice_block %.loc20_18.2 [concrete = type] { +// CHECK:STDOUT: %ptr.loc20_31.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_31.2 (constants.%ptr)] +// CHECK:STDOUT: %I.type.loc20_32.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc20_32.2 (constants.%I.type.a76)] +// CHECK:STDOUT: %.loc20_17.1: type = splice_block %.loc20_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc20_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc20_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc20_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc20_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -1289,11 +1289,11 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, imports.%Main.I [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc26_15.1 [symbolic = %T.loc26_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc26_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_32.2 (constants.%ptr)] -// CHECK:STDOUT: %I.type.loc26_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc26_33.2 (constants.%I.type.a76)] -// CHECK:STDOUT: %.loc26_18.1: type = splice_block %.loc26_18.2 [concrete = type] { +// CHECK:STDOUT: %ptr.loc26_31.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_31.2 (constants.%ptr)] +// CHECK:STDOUT: %I.type.loc26_32.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc26_32.2 (constants.%I.type.a76)] +// CHECK:STDOUT: %.loc26_17.1: type = splice_block %.loc26_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc26_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc26_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc26_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc26_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -1303,10 +1303,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %N.ref: %N.type.b76 = name_ref N, imports.%Main.N [concrete = constants.%empty_struct] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc32_15.1 [symbolic = %T.loc32_15.2 (constants.%T)] -// CHECK:STDOUT: %N.type.loc32_32.1: type = facet_type <@N, @N(constants.%T)> [symbolic = %N.type.loc32_32.2 (constants.%N.type.d682d6.1)] -// CHECK:STDOUT: %.loc32_18.1: type = splice_block %.loc32_18.2 [concrete = type] { +// CHECK:STDOUT: %N.type.loc32_31.1: type = facet_type <@N, @N(constants.%T)> [symbolic = %N.type.loc32_31.2 (constants.%N.type.d682d6.1)] +// CHECK:STDOUT: %.loc32_17.1: type = splice_block %.loc32_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc32_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc32_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc32_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc32_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -1316,11 +1316,11 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %N.ref: %N.type.b76 = name_ref N, imports.%Main.N [concrete = constants.%empty_struct] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc37_15.1 [symbolic = %T.loc37_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc37_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc37_32.2 (constants.%ptr)] -// CHECK:STDOUT: %N.type.loc37_33.1: type = facet_type <@N, @N(constants.%ptr)> [symbolic = %N.type.loc37_33.2 (constants.%N.type.d682d6.2)] -// CHECK:STDOUT: %.loc37_18.1: type = splice_block %.loc37_18.2 [concrete = type] { +// CHECK:STDOUT: %ptr.loc37_31.1: type = ptr_type %T.ref [symbolic = %ptr.loc37_31.2 (constants.%ptr)] +// CHECK:STDOUT: %N.type.loc37_32.1: type = facet_type <@N, @N(constants.%ptr)> [symbolic = %N.type.loc37_32.2 (constants.%N.type.d682d6.2)] +// CHECK:STDOUT: %.loc37_17.1: type = splice_block %.loc37_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc37_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc37_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc37_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc37_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -1409,21 +1409,21 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: generic impl @C.as.I.impl.da9cee.1(%T.loc8_15.1: type) { // CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc8_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.2 (constants.%T)] -// CHECK:STDOUT: %I.type.loc8_32.2: type = facet_type <@I, @I(%T.loc8_15.2)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.3fe)] +// CHECK:STDOUT: %I.type.loc8_31.2: type = facet_type <@I, @I(%T.loc8_15.2)> [symbolic = %I.type.loc8_31.2 (constants.%I.type.3fe)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %I.type.loc8_32.1; +// CHECK:STDOUT: impl: %C.ref as %I.type.loc8_31.1; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @C.as.I.impl.da9cee.2(%T.loc14_15.1: type) { // CHECK:STDOUT: %T.patt.loc14_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc14_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_15.2 (constants.%T)] -// CHECK:STDOUT: %I.type.loc14_32.2: type = facet_type <@I, @I(%T.loc14_15.2)> [symbolic = %I.type.loc14_32.2 (constants.%I.type.3fe)] +// CHECK:STDOUT: %I.type.loc14_31.2: type = facet_type <@I, @I(%T.loc14_15.2)> [symbolic = %I.type.loc14_31.2 (constants.%I.type.3fe)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %I.type.loc14_32.1 { +// CHECK:STDOUT: impl: %C.ref as %I.type.loc14_31.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %I.type.loc14_32.1 +// CHECK:STDOUT: extend %I.type.loc14_31.1 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1431,23 +1431,23 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: generic impl @C.as.I.impl.982b7a.1(%T.loc20_15.1: type) { // CHECK:STDOUT: %T.patt.loc20_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc20_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc20_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type %T.loc20_15.2 [symbolic = %ptr.loc20_32.2 (constants.%ptr)] -// CHECK:STDOUT: %I.type.loc20_33.2: type = facet_type <@I, @I(%ptr.loc20_32.2)> [symbolic = %I.type.loc20_33.2 (constants.%I.type.a76)] +// CHECK:STDOUT: %ptr.loc20_31.2: type = ptr_type %T.loc20_15.2 [symbolic = %ptr.loc20_31.2 (constants.%ptr)] +// CHECK:STDOUT: %I.type.loc20_32.2: type = facet_type <@I, @I(%ptr.loc20_31.2)> [symbolic = %I.type.loc20_32.2 (constants.%I.type.a76)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %I.type.loc20_33.1; +// CHECK:STDOUT: impl: %C.ref as %I.type.loc20_32.1; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @C.as.I.impl.982b7a.2(%T.loc26_15.1: type) { // CHECK:STDOUT: %T.patt.loc26_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc26_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc26_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type %T.loc26_15.2 [symbolic = %ptr.loc26_32.2 (constants.%ptr)] -// CHECK:STDOUT: %I.type.loc26_33.2: type = facet_type <@I, @I(%ptr.loc26_32.2)> [symbolic = %I.type.loc26_33.2 (constants.%I.type.a76)] +// CHECK:STDOUT: %ptr.loc26_31.2: type = ptr_type %T.loc26_15.2 [symbolic = %ptr.loc26_31.2 (constants.%ptr)] +// CHECK:STDOUT: %I.type.loc26_32.2: type = facet_type <@I, @I(%ptr.loc26_31.2)> [symbolic = %I.type.loc26_32.2 (constants.%I.type.a76)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %I.type.loc26_33.1 { +// CHECK:STDOUT: impl: %C.ref as %I.type.loc26_32.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %I.type.loc26_33.1 +// CHECK:STDOUT: extend %I.type.loc26_32.1 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1455,18 +1455,18 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: generic impl @C.as.I.impl.042f52.1(%T.loc32_15.1: type) { // CHECK:STDOUT: %T.patt.loc32_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc32_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc32_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc32_15.2 (constants.%T)] -// CHECK:STDOUT: %N.type.loc32_32.2: type = facet_type <@N, @N(%T.loc32_15.2)> [symbolic = %N.type.loc32_32.2 (constants.%N.type.d682d6.1)] +// CHECK:STDOUT: %N.type.loc32_31.2: type = facet_type <@N, @N(%T.loc32_15.2)> [symbolic = %N.type.loc32_31.2 (constants.%N.type.d682d6.1)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %N.type.loc32_32.1; +// CHECK:STDOUT: impl: %C.ref as %N.type.loc32_31.1; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @C.as.I.impl.042f52.2(%T.loc37_15.1: type) { // CHECK:STDOUT: %T.patt.loc37_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc37_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc37_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc37_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc37_32.2: type = ptr_type %T.loc37_15.2 [symbolic = %ptr.loc37_32.2 (constants.%ptr)] -// CHECK:STDOUT: %N.type.loc37_33.2: type = facet_type <@N, @N(%ptr.loc37_32.2)> [symbolic = %N.type.loc37_33.2 (constants.%N.type.d682d6.2)] +// CHECK:STDOUT: %ptr.loc37_31.2: type = ptr_type %T.loc37_15.2 [symbolic = %ptr.loc37_31.2 (constants.%ptr)] +// CHECK:STDOUT: %N.type.loc37_32.2: type = facet_type <@N, @N(%ptr.loc37_31.2)> [symbolic = %N.type.loc37_32.2 (constants.%N.type.d682d6.2)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %N.type.loc37_33.1; +// CHECK:STDOUT: impl: %C.ref as %N.type.loc37_32.1; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C [from "import_generic.carbon"] { @@ -1516,27 +1516,27 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: specific @C.as.I.impl.da9cee.1(constants.%T) { // CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_15.2 => constants.%T -// CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.3fe +// CHECK:STDOUT: %I.type.loc8_31.2 => constants.%I.type.3fe // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.da9cee.2(constants.%T) { // CHECK:STDOUT: %T.patt.loc14_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc14_15.2 => constants.%T -// CHECK:STDOUT: %I.type.loc14_32.2 => constants.%I.type.3fe +// CHECK:STDOUT: %I.type.loc14_31.2 => constants.%I.type.3fe // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.982b7a.1(constants.%T) { // CHECK:STDOUT: %T.patt.loc20_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc20_15.2 => constants.%T -// CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr -// CHECK:STDOUT: %I.type.loc20_33.2 => constants.%I.type.a76 +// CHECK:STDOUT: %ptr.loc20_31.2 => constants.%ptr +// CHECK:STDOUT: %I.type.loc20_32.2 => constants.%I.type.a76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.982b7a.2(constants.%T) { // CHECK:STDOUT: %T.patt.loc26_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc26_15.2 => constants.%T -// CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr -// CHECK:STDOUT: %I.type.loc26_33.2 => constants.%I.type.a76 +// CHECK:STDOUT: %ptr.loc26_31.2 => constants.%ptr +// CHECK:STDOUT: %I.type.loc26_32.2 => constants.%I.type.a76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%T) { @@ -1572,7 +1572,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: specific @C.as.I.impl.042f52.1(constants.%T) { // CHECK:STDOUT: %T.patt.loc32_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc32_15.2 => constants.%T -// CHECK:STDOUT: %N.type.loc32_32.2 => constants.%N.type.d682d6.1 +// CHECK:STDOUT: %N.type.loc32_31.2 => constants.%N.type.d682d6.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%ptr) { @@ -1598,8 +1598,8 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: specific @C.as.I.impl.042f52.2(constants.%T) { // CHECK:STDOUT: %T.patt.loc37_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc37_15.2 => constants.%T -// CHECK:STDOUT: %ptr.loc37_32.2 => constants.%ptr -// CHECK:STDOUT: %N.type.loc37_33.2 => constants.%N.type.d682d6.2 +// CHECK:STDOUT: %ptr.loc37_31.2 => constants.%ptr +// CHECK:STDOUT: %N.type.loc37_32.2 => constants.%N.type.d682d6.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_generic_with_different_specific.carbon @@ -1637,9 +1637,9 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_16.1: type = splice_block %.loc5_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T)] // CHECK:STDOUT: } @@ -1649,19 +1649,19 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_15.1 [symbolic = %T.loc7_15.2 (constants.%T)] -// CHECK:STDOUT: %I.type.loc7_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc7_32.2 (constants.%I.type.3fe)] -// CHECK:STDOUT: %.loc7_18.1: type = splice_block %.loc7_18.2 [concrete = type] { +// CHECK:STDOUT: %I.type.loc7_31.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc7_31.2 (constants.%I.type.3fe)] +// CHECK:STDOUT: %.loc7_17.1: type = splice_block %.loc7_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_15.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %N.decl: %N.type.b76 = constraint_decl @N [concrete = constants.%empty_struct] { // CHECK:STDOUT: %T.patt.loc9_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc9_17.1: type = splice_block %.loc9_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -1673,14 +1673,14 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc5_14.1)> [symbolic = %I.type (constants.%I.type.3fe)] -// CHECK:STDOUT: %Self.loc5_23.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc5_22.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc5_22.2 (constants.%Self.191)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc5_23.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc5_22.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc5_22.2 (constants.%Self.191)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc5_23.1 +// CHECK:STDOUT: .Self = %Self.loc5_22.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1695,17 +1695,17 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T.loc9_15.1)> [symbolic = %N.type (constants.%N.type.d68)] -// CHECK:STDOUT: %Self.loc9_24.2: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc9_24.2 (constants.%Self.22b)] +// CHECK:STDOUT: %Self.loc9_23.2: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc9_23.2 (constants.%Self.22b)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { -// CHECK:STDOUT: %Self.loc9_24.1: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc9_24.2 (constants.%Self.22b)] +// CHECK:STDOUT: %Self.loc9_23.1: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc9_23.2 (constants.%Self.22b)] // CHECK:STDOUT: %N.WithSelf.decl = constraint_with_self_decl @N [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %N.WithSelf.Self.as_type.impls.I.type.require.decl = require_decl @N.WithSelf.Self.as_type.impls.I.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type.loc10_18.1 impls %I.type.loc10_27.1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_type.loc10_18.1: type = facet_access_type @N.%Self.loc9_24.1 [symbolic = %Self.as_type.loc10_18.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %Self.as_type.loc10_18.1: type = facet_access_type @N.%Self.loc9_23.1 [symbolic = %Self.as_type.loc10_18.2 (constants.%Self.as_type)] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, @N.%T.loc9_15.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type.loc10_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc10_27.2 (constants.%I.type.3fe)] @@ -1713,7 +1713,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %.loc10: type = specific_constant @N.WithSelf.Self.as_type.impls.I.type.require.%I.type.loc10_27.1, @N.WithSelf.Self.as_type.impls.I.type.require(constants.%T, constants.%Self.22b) [symbolic = %I.type (constants.%I.type.3fe)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc9_24.1 +// CHECK:STDOUT: .Self = %Self.loc9_23.1 // CHECK:STDOUT: .I = // CHECK:STDOUT: .T = // CHECK:STDOUT: .I = @@ -1727,7 +1727,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @N.WithSelf.Self.as_type.impls.I.type.require(@N.%T.loc9_15.2: type, @N.%Self.loc9_24.1: @N.%N.type (%N.type.d68)) { +// CHECK:STDOUT: generic require @N.WithSelf.Self.as_type.impls.I.type.require(@N.%T.loc9_15.2: type, @N.%Self.loc9_23.1: @N.%N.type (%N.type.d68)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d68)] // CHECK:STDOUT: %Self: @N.WithSelf.Self.as_type.impls.I.type.require.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.22b)] @@ -1738,19 +1738,19 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: generic impl @C.as.I.impl(%T.loc7_15.1: type) { // CHECK:STDOUT: %T.patt.loc7_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc7_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_15.2 (constants.%T)] -// CHECK:STDOUT: %I.type.loc7_32.2: type = facet_type <@I, @I(%T.loc7_15.2)> [symbolic = %I.type.loc7_32.2 (constants.%I.type.3fe)] -// CHECK:STDOUT: %I.impl_witness.loc7_34.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc7_15.2) [symbolic = %I.impl_witness.loc7_34.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %I.type.loc7_31.2: type = facet_type <@I, @I(%T.loc7_15.2)> [symbolic = %I.type.loc7_31.2 (constants.%I.type.3fe)] +// CHECK:STDOUT: %I.impl_witness.loc7_33.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc7_15.2) [symbolic = %I.impl_witness.loc7_33.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc7_32.2 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc7_31.2 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %I.type.loc7_32.1 { +// CHECK:STDOUT: impl: %C.ref as %I.type.loc7_31.1 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl [concrete] -// CHECK:STDOUT: %I.impl_witness.loc7_34.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T) [symbolic = %I.impl_witness.loc7_34.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %I.impl_witness.loc7_33.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T) [symbolic = %I.impl_witness.loc7_33.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %I.type.loc7_32.1 -// CHECK:STDOUT: witness = %I.impl_witness.loc7_34.1 +// CHECK:STDOUT: extend %I.type.loc7_31.1 +// CHECK:STDOUT: witness = %I.impl_witness.loc7_33.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1768,7 +1768,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.3fe -// CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.191 +// CHECK:STDOUT: %Self.loc5_22.2 => constants.%Self.191 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T, constants.%Self.191) { @@ -1778,8 +1778,8 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: specific @C.as.I.impl(constants.%T) { // CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_15.2 => constants.%T -// CHECK:STDOUT: %I.type.loc7_32.2 => constants.%I.type.3fe -// CHECK:STDOUT: %I.impl_witness.loc7_34.2 => constants.%I.impl_witness +// CHECK:STDOUT: %I.type.loc7_31.2 => constants.%I.type.3fe +// CHECK:STDOUT: %I.impl_witness.loc7_33.2 => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T, constants.%I.facet) { @@ -1844,22 +1844,22 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Main.C: type = import_ref Main//import_generic_with_different_specific, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.I: %I.type.335 = import_ref Main//import_generic_with_different_specific, I, loaded [concrete = constants.%I.generic] // CHECK:STDOUT: %Main.N: %N.type.b76 = import_ref Main//import_generic_with_different_specific, N, loaded [concrete = constants.%empty_struct] -// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//import_generic_with_different_specific, loc5_23, unloaded +// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//import_generic_with_different_specific, loc5_22, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic_with_different_specific, loc5_14, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.c0d = import_ref Main//import_generic_with_different_specific, loc7_34, unloaded +// CHECK:STDOUT: %Main.import_ref.c0d = import_ref Main//import_generic_with_different_specific, loc7_33, unloaded // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic_with_different_specific, loc4_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.e47 = import_ref Main//import_generic_with_different_specific, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.119 [concrete] -// CHECK:STDOUT: %Main.import_ref.335: type = import_ref Main//import_generic_with_different_specific, loc7_24, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.e015f6.1: type = import_ref Main//import_generic_with_different_specific, loc7_32, loaded [symbolic = @C.as.I.impl.119.%I.type (constants.%I.type.3fe)] -// CHECK:STDOUT: %Main.import_ref.e87 = import_ref Main//import_generic_with_different_specific, loc7_32, unloaded +// CHECK:STDOUT: %Main.import_ref.335: type = import_ref Main//import_generic_with_different_specific, loc7_23, loaded [concrete = constants.%C] +// CHECK:STDOUT: %Main.import_ref.e015f6.1: type = import_ref Main//import_generic_with_different_specific, loc7_31, loaded [symbolic = @C.as.I.impl.119.%I.type (constants.%I.type.3fe)] +// CHECK:STDOUT: %Main.import_ref.e87 = import_ref Main//import_generic_with_different_specific, loc7_31, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic_with_different_specific, loc7_15, loaded [symbolic = @C.as.I.impl.119.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.e24 = import_ref Main//import_generic_with_different_specific, loc10_28, unloaded // CHECK:STDOUT: %Main.import_ref.849: type = import_ref Main//import_generic_with_different_specific, loc10_18, loaded [symbolic = @N.WithSelf.Self.as_type.impls.I.type.require.%Self.as_type (constants.%Self.as_type)] // CHECK:STDOUT: %Main.import_ref.e015f6.2: type = import_ref Main//import_generic_with_different_specific, loc10_27, loaded [symbolic = @N.WithSelf.Self.as_type.impls.I.type.require.%I.type (constants.%I.type.3fe)] // CHECK:STDOUT: %Main.import_ref.b3bc94.5: type = import_ref Main//import_generic_with_different_specific, loc9_15, loaded [symbolic = @N.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.006c33.2: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic_with_different_specific, loc9_24, loaded [symbolic = @N.%Self (constants.%Self.e1f642.1)] -// CHECK:STDOUT: %Main.import_ref.694 = import_ref Main//import_generic_with_different_specific, loc9_24, unloaded +// CHECK:STDOUT: %Main.import_ref.006c33.2: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic_with_different_specific, loc9_23, loaded [symbolic = @N.%Self (constants.%Self.e1f642.1)] +// CHECK:STDOUT: %Main.import_ref.694 = import_ref Main//import_generic_with_different_specific, loc9_23, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.6: type = import_ref Main//import_generic_with_different_specific, loc9_15, loaded [symbolic = @N.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1877,11 +1877,11 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, imports.%Main.I [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc5_15.1 [symbolic = %T.loc5_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc5_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc5_32.2 (constants.%ptr.e8f)] -// CHECK:STDOUT: %I.type.loc5_33.1: type = facet_type <@I, @I(constants.%ptr.e8f)> [symbolic = %I.type.loc5_33.2 (constants.%I.type.a76)] -// CHECK:STDOUT: %.loc5_18.1: type = splice_block %.loc5_18.2 [concrete = type] { +// CHECK:STDOUT: %ptr.loc5_31.1: type = ptr_type %T.ref [symbolic = %ptr.loc5_31.2 (constants.%ptr.e8f)] +// CHECK:STDOUT: %I.type.loc5_32.1: type = facet_type <@I, @I(constants.%ptr.e8f)> [symbolic = %I.type.loc5_32.2 (constants.%I.type.a76)] +// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -1891,12 +1891,12 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %N.ref: %N.type.b76 = name_ref N, imports.%Main.N [concrete = constants.%empty_struct] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_15.1 [symbolic = %T.loc6_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc6_32.2 (constants.%ptr.e8f)] -// CHECK:STDOUT: %ptr.loc6_33.1: type = ptr_type %ptr.loc6_32.1 [symbolic = %ptr.loc6_33.2 (constants.%ptr.125)] -// CHECK:STDOUT: %N.type.loc6_34.1: type = facet_type <@N, @N(constants.%ptr.125)> [symbolic = %N.type.loc6_34.2 (constants.%N.type.d682d6.2)] -// CHECK:STDOUT: %.loc6_18.1: type = splice_block %.loc6_18.2 [concrete = type] { +// CHECK:STDOUT: %ptr.loc6_31.1: type = ptr_type %T.ref [symbolic = %ptr.loc6_31.2 (constants.%ptr.e8f)] +// CHECK:STDOUT: %ptr.loc6_32.1: type = ptr_type %ptr.loc6_31.1 [symbolic = %ptr.loc6_32.2 (constants.%ptr.125)] +// CHECK:STDOUT: %N.type.loc6_33.1: type = facet_type <@N, @N(constants.%ptr.125)> [symbolic = %N.type.loc6_33.2 (constants.%N.type.d682d6.2)] +// CHECK:STDOUT: %.loc6_17.1: type = splice_block %.loc6_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -1968,41 +1968,41 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: generic impl @C.as.I.impl.982(%T.loc5_15.1: type) { // CHECK:STDOUT: %T.patt.loc5_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc5_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc5_32.2: type = ptr_type %T.loc5_15.2 [symbolic = %ptr.loc5_32.2 (constants.%ptr.e8f)] -// CHECK:STDOUT: %I.type.loc5_33.2: type = facet_type <@I, @I(%ptr.loc5_32.2)> [symbolic = %I.type.loc5_33.2 (constants.%I.type.a76)] -// CHECK:STDOUT: %I.impl_witness.loc5_35.2: = impl_witness %I.impl_witness_table, @C.as.I.impl.982(%T.loc5_15.2) [symbolic = %I.impl_witness.loc5_35.2 (constants.%I.impl_witness.0d7)] +// CHECK:STDOUT: %ptr.loc5_31.2: type = ptr_type %T.loc5_15.2 [symbolic = %ptr.loc5_31.2 (constants.%ptr.e8f)] +// CHECK:STDOUT: %I.type.loc5_32.2: type = facet_type <@I, @I(%ptr.loc5_31.2)> [symbolic = %I.type.loc5_32.2 (constants.%I.type.a76)] +// CHECK:STDOUT: %I.impl_witness.loc5_34.2: = impl_witness %I.impl_witness_table, @C.as.I.impl.982(%T.loc5_15.2) [symbolic = %I.impl_witness.loc5_34.2 (constants.%I.impl_witness.0d7)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc5_33.2 [symbolic = %require_complete (constants.%require_complete.078)] +// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc5_32.2 [symbolic = %require_complete (constants.%require_complete.078)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %I.type.loc5_33.1 { +// CHECK:STDOUT: impl: %C.ref as %I.type.loc5_32.1 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.982 [concrete] -// CHECK:STDOUT: %I.impl_witness.loc5_35.1: = impl_witness %I.impl_witness_table, @C.as.I.impl.982(constants.%T) [symbolic = %I.impl_witness.loc5_35.2 (constants.%I.impl_witness.0d7)] +// CHECK:STDOUT: %I.impl_witness.loc5_34.1: = impl_witness %I.impl_witness_table, @C.as.I.impl.982(constants.%T) [symbolic = %I.impl_witness.loc5_34.2 (constants.%I.impl_witness.0d7)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %I.type.loc5_33.1 -// CHECK:STDOUT: witness = %I.impl_witness.loc5_35.1 +// CHECK:STDOUT: extend %I.type.loc5_32.1 +// CHECK:STDOUT: witness = %I.impl_witness.loc5_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @C.as.I.impl.042(%T.loc6_15.1: type) { // CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_32.2: type = ptr_type %T.loc6_15.2 [symbolic = %ptr.loc6_32.2 (constants.%ptr.e8f)] -// CHECK:STDOUT: %ptr.loc6_33.2: type = ptr_type %ptr.loc6_32.2 [symbolic = %ptr.loc6_33.2 (constants.%ptr.125)] -// CHECK:STDOUT: %N.type.loc6_34.2: type = facet_type <@N, @N(%ptr.loc6_33.2)> [symbolic = %N.type.loc6_34.2 (constants.%N.type.d682d6.2)] -// CHECK:STDOUT: %I.impl_witness.loc6_36.2: = impl_witness %I.impl_witness_table, @C.as.I.impl.042(%T.loc6_15.2) [symbolic = %I.impl_witness.loc6_36.2 (constants.%I.impl_witness.b48)] +// CHECK:STDOUT: %ptr.loc6_31.2: type = ptr_type %T.loc6_15.2 [symbolic = %ptr.loc6_31.2 (constants.%ptr.e8f)] +// CHECK:STDOUT: %ptr.loc6_32.2: type = ptr_type %ptr.loc6_31.2 [symbolic = %ptr.loc6_32.2 (constants.%ptr.125)] +// CHECK:STDOUT: %N.type.loc6_33.2: type = facet_type <@N, @N(%ptr.loc6_32.2)> [symbolic = %N.type.loc6_33.2 (constants.%N.type.d682d6.2)] +// CHECK:STDOUT: %I.impl_witness.loc6_35.2: = impl_witness %I.impl_witness_table, @C.as.I.impl.042(%T.loc6_15.2) [symbolic = %I.impl_witness.loc6_35.2 (constants.%I.impl_witness.b48)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %N.type.loc6_34.2 [symbolic = %require_complete (constants.%require_complete.533)] +// CHECK:STDOUT: %require_complete: = require_complete_type %N.type.loc6_33.2 [symbolic = %require_complete (constants.%require_complete.533)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %N.type.loc6_34.1 { +// CHECK:STDOUT: impl: %C.ref as %N.type.loc6_33.1 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.042 [concrete] -// CHECK:STDOUT: %I.impl_witness.loc6_36.1: = impl_witness %I.impl_witness_table, @C.as.I.impl.042(constants.%T) [symbolic = %I.impl_witness.loc6_36.2 (constants.%I.impl_witness.b48)] +// CHECK:STDOUT: %I.impl_witness.loc6_35.1: = impl_witness %I.impl_witness_table, @C.as.I.impl.042(constants.%T) [symbolic = %I.impl_witness.loc6_35.2 (constants.%I.impl_witness.b48)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %N.type.loc6_34.1 -// CHECK:STDOUT: witness = %I.impl_witness.loc6_36.1 +// CHECK:STDOUT: extend %N.type.loc6_33.1 +// CHECK:STDOUT: witness = %I.impl_witness.loc6_35.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2045,9 +2045,9 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: specific @C.as.I.impl.982(constants.%T) { // CHECK:STDOUT: %T.patt.loc5_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc5_15.2 => constants.%T -// CHECK:STDOUT: %ptr.loc5_32.2 => constants.%ptr.e8f -// CHECK:STDOUT: %I.type.loc5_33.2 => constants.%I.type.a76 -// CHECK:STDOUT: %I.impl_witness.loc5_35.2 => constants.%I.impl_witness.0d7 +// CHECK:STDOUT: %ptr.loc5_31.2 => constants.%ptr.e8f +// CHECK:STDOUT: %I.type.loc5_32.2 => constants.%I.type.a76 +// CHECK:STDOUT: %I.impl_witness.loc5_34.2 => constants.%I.impl_witness.0d7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%ptr.e8f, constants.%Self.a67) { @@ -2105,10 +2105,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: specific @C.as.I.impl.042(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_15.2 => constants.%T -// CHECK:STDOUT: %ptr.loc6_32.2 => constants.%ptr.e8f -// CHECK:STDOUT: %ptr.loc6_33.2 => constants.%ptr.125 -// CHECK:STDOUT: %N.type.loc6_34.2 => constants.%N.type.d682d6.2 -// CHECK:STDOUT: %I.impl_witness.loc6_36.2 => constants.%I.impl_witness.b48 +// CHECK:STDOUT: %ptr.loc6_31.2 => constants.%ptr.e8f +// CHECK:STDOUT: %ptr.loc6_32.2 => constants.%ptr.125 +// CHECK:STDOUT: %N.type.loc6_33.2 => constants.%N.type.d682d6.2 +// CHECK:STDOUT: %I.impl_witness.loc6_35.2 => constants.%I.impl_witness.b48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @N.WithSelf(constants.%ptr.125, constants.%Self.e1f642.1) { @@ -2158,18 +2158,18 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %J.decl: %J.type.23c = interface_decl @J [concrete = constants.%J.generic] { // CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_16.1: type = splice_block %.loc5_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %N.decl: %N.type.b76 = constraint_decl @N [concrete = constants.%empty_struct] { // CHECK:STDOUT: %T.patt.loc7_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_18.1: type = splice_block %.loc7_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc7_17.1: type = splice_block %.loc7_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -2179,10 +2179,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %J.ref: %J.type.23c = name_ref J, file.%J.decl [concrete = constants.%J.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_15.1 [symbolic = %T.loc15_15.2 (constants.%T)] -// CHECK:STDOUT: %J.type.loc15_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc15_32.2 (constants.%J.type.5c8)] -// CHECK:STDOUT: %.loc15_18.1: type = splice_block %.loc15_18.2 [concrete = type] { +// CHECK:STDOUT: %J.type.loc15_31.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc15_31.2 (constants.%J.type.5c8)] +// CHECK:STDOUT: %.loc15_17.1: type = splice_block %.loc15_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -2192,11 +2192,11 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %J.ref: %J.type.23c = name_ref J, file.%J.decl [concrete = constants.%J.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc21_15.1 [symbolic = %T.loc21_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc21_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc21_32.2 (constants.%ptr)] -// CHECK:STDOUT: %J.type.loc21_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc21_33.2 (constants.%J.type.c71)] -// CHECK:STDOUT: %.loc21_18.1: type = splice_block %.loc21_18.2 [concrete = type] { +// CHECK:STDOUT: %ptr.loc21_31.1: type = ptr_type %T.ref [symbolic = %ptr.loc21_31.2 (constants.%ptr)] +// CHECK:STDOUT: %J.type.loc21_32.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc21_32.2 (constants.%J.type.c71)] +// CHECK:STDOUT: %.loc21_17.1: type = splice_block %.loc21_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc21_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc21_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc21_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc21_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -2208,14 +2208,14 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc5_14.1)> [symbolic = %J.type (constants.%J.type.5c8)] -// CHECK:STDOUT: %Self.loc5_23.2: @J.%J.type (%J.type.5c8) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.ad7)] +// CHECK:STDOUT: %Self.loc5_22.2: @J.%J.type (%J.type.5c8) = symbolic_binding Self, 1 [symbolic = %Self.loc5_22.2 (constants.%Self.ad7)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc5_23.1: @J.%J.type (%J.type.5c8) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.ad7)] +// CHECK:STDOUT: %Self.loc5_22.1: @J.%J.type (%J.type.5c8) = symbolic_binding Self, 1 [symbolic = %Self.loc5_22.2 (constants.%Self.ad7)] // CHECK:STDOUT: %J.WithSelf.decl = interface_with_self_decl @J [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc5_23.1 +// CHECK:STDOUT: .Self = %Self.loc5_22.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -2230,17 +2230,17 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T.loc7_15.1)> [symbolic = %N.type (constants.%N.type.d68)] -// CHECK:STDOUT: %Self.loc7_24.2: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_24.2 (constants.%Self.22b)] +// CHECK:STDOUT: %Self.loc7_23.2: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_23.2 (constants.%Self.22b)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { -// CHECK:STDOUT: %Self.loc7_24.1: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_24.2 (constants.%Self.22b)] +// CHECK:STDOUT: %Self.loc7_23.1: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_23.2 (constants.%Self.22b)] // CHECK:STDOUT: %N.WithSelf.decl = constraint_with_self_decl @N [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %N.WithSelf.Self.as_type.impls.J.type.require.decl = require_decl @N.WithSelf.Self.as_type.impls.J.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type.loc8_18.1 impls %J.type.loc8_27.1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_type.loc8_18.1: type = facet_access_type @N.%Self.loc7_24.1 [symbolic = %Self.as_type.loc8_18.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %Self.as_type.loc8_18.1: type = facet_access_type @N.%Self.loc7_23.1 [symbolic = %Self.as_type.loc8_18.2 (constants.%Self.as_type)] // CHECK:STDOUT: %J.ref: %J.type.23c = name_ref J, file.%J.decl [concrete = constants.%J.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, @N.%T.loc7_15.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %J.type.loc8_27.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc8_27.2 (constants.%J.type.5c8)] @@ -2248,7 +2248,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %.loc8: type = specific_constant @N.WithSelf.Self.as_type.impls.J.type.require.%J.type.loc8_27.1, @N.WithSelf.Self.as_type.impls.J.type.require(constants.%T, constants.%Self.22b) [symbolic = %J.type (constants.%J.type.5c8)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc7_24.1 +// CHECK:STDOUT: .Self = %Self.loc7_23.1 // CHECK:STDOUT: .J = // CHECK:STDOUT: .T = // CHECK:STDOUT: .J = @@ -2262,7 +2262,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @N.WithSelf.Self.as_type.impls.J.type.require(@N.%T.loc7_15.2: type, @N.%Self.loc7_24.1: @N.%N.type (%N.type.d68)) { +// CHECK:STDOUT: generic require @N.WithSelf.Self.as_type.impls.J.type.require(@N.%T.loc7_15.2: type, @N.%Self.loc7_23.1: @N.%N.type (%N.type.d68)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d68)] // CHECK:STDOUT: %Self: @N.WithSelf.Self.as_type.impls.J.type.require.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.22b)] @@ -2273,20 +2273,20 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: generic impl @D.as.J.impl.5a5(%T.loc15_15.1: type) { // CHECK:STDOUT: %T.patt.loc15_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc15_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_15.2 (constants.%T)] -// CHECK:STDOUT: %J.type.loc15_32.2: type = facet_type <@J, @J(%T.loc15_15.2)> [symbolic = %J.type.loc15_32.2 (constants.%J.type.5c8)] -// CHECK:STDOUT: %J.impl_witness.loc15_33.2: = impl_witness %J.impl_witness_table, @D.as.J.impl.5a5(%T.loc15_15.2) [symbolic = %J.impl_witness.loc15_33.2 (constants.%J.impl_witness.7d7)] +// CHECK:STDOUT: %J.type.loc15_31.2: type = facet_type <@J, @J(%T.loc15_15.2)> [symbolic = %J.type.loc15_31.2 (constants.%J.type.5c8)] +// CHECK:STDOUT: %J.impl_witness.loc15_32.2: = impl_witness %J.impl_witness_table, @D.as.J.impl.5a5(%T.loc15_15.2) [symbolic = %J.impl_witness.loc15_32.2 (constants.%J.impl_witness.7d7)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %D.ref as %J.type.loc15_32.1; +// CHECK:STDOUT: impl: %D.ref as %J.type.loc15_31.1; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @D.as.J.impl.101(%T.loc21_15.1: type) { // CHECK:STDOUT: %T.patt.loc21_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc21_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc21_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc21_32.2: type = ptr_type %T.loc21_15.2 [symbolic = %ptr.loc21_32.2 (constants.%ptr)] -// CHECK:STDOUT: %J.type.loc21_33.2: type = facet_type <@J, @J(%ptr.loc21_32.2)> [symbolic = %J.type.loc21_33.2 (constants.%J.type.c71)] -// CHECK:STDOUT: %J.impl_witness.loc21_34.2: = impl_witness %J.impl_witness_table, @D.as.J.impl.101(%T.loc21_15.2) [symbolic = %J.impl_witness.loc21_34.2 (constants.%J.impl_witness.4af)] +// CHECK:STDOUT: %ptr.loc21_31.2: type = ptr_type %T.loc21_15.2 [symbolic = %ptr.loc21_31.2 (constants.%ptr)] +// CHECK:STDOUT: %J.type.loc21_32.2: type = facet_type <@J, @J(%ptr.loc21_31.2)> [symbolic = %J.type.loc21_32.2 (constants.%J.type.c71)] +// CHECK:STDOUT: %J.impl_witness.loc21_33.2: = impl_witness %J.impl_witness_table, @D.as.J.impl.101(%T.loc21_15.2) [symbolic = %J.impl_witness.loc21_33.2 (constants.%J.impl_witness.4af)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %D.ref as %J.type.loc21_33.1; +// CHECK:STDOUT: impl: %D.ref as %J.type.loc21_32.1; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { @@ -2303,7 +2303,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %J.type => constants.%J.type.5c8 -// CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.ad7 +// CHECK:STDOUT: %Self.loc5_22.2 => constants.%Self.ad7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J.WithSelf(constants.%T, constants.%Self.ad7) { @@ -2328,8 +2328,8 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: specific @D.as.J.impl.5a5(constants.%T) { // CHECK:STDOUT: %T.patt.loc15_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc15_15.2 => constants.%T -// CHECK:STDOUT: %J.type.loc15_32.2 => constants.%J.type.5c8 -// CHECK:STDOUT: %J.impl_witness.loc15_33.2 => constants.%J.impl_witness.7d7 +// CHECK:STDOUT: %J.type.loc15_31.2 => constants.%J.type.5c8 +// CHECK:STDOUT: %J.impl_witness.loc15_32.2 => constants.%J.impl_witness.7d7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J(constants.%ptr) { @@ -2340,9 +2340,9 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: specific @D.as.J.impl.101(constants.%T) { // CHECK:STDOUT: %T.patt.loc21_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc21_15.2 => constants.%T -// CHECK:STDOUT: %ptr.loc21_32.2 => constants.%ptr -// CHECK:STDOUT: %J.type.loc21_33.2 => constants.%J.type.c71 -// CHECK:STDOUT: %J.impl_witness.loc21_34.2 => constants.%J.impl_witness.4af +// CHECK:STDOUT: %ptr.loc21_31.2 => constants.%ptr +// CHECK:STDOUT: %J.type.loc21_32.2 => constants.%J.type.c71 +// CHECK:STDOUT: %J.impl_witness.loc21_33.2 => constants.%J.impl_witness.4af // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_import_generic_decl.impl.carbon @@ -2379,24 +2379,24 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Main.D: type = import_ref Main//import_generic_decl, D, loaded [concrete = constants.%D] // CHECK:STDOUT: %Main.J: %J.type.23c = import_ref Main//import_generic_decl, J, loaded [concrete = constants.%J.generic] // CHECK:STDOUT: %Main.N: %N.type.b76 = import_ref Main//import_generic_decl, N, loaded [concrete = constants.%empty_struct] -// CHECK:STDOUT: %Main.import_ref.ec8 = import_ref Main//import_generic_decl, loc5_23, unloaded +// CHECK:STDOUT: %Main.import_ref.ec8 = import_ref Main//import_generic_decl, loc5_22, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic_decl, loc5_14, loaded [symbolic = @J.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic_decl, loc4_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//import_generic_decl, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %J.impl_witness_table.a64 = impl_witness_table (), @D.as.J.impl.bdb [concrete] -// CHECK:STDOUT: %Main.import_ref.2e2cf0.1: type = import_ref Main//import_generic_decl, loc15_24, loaded [concrete = constants.%D] -// CHECK:STDOUT: %Main.import_ref.1936e1.1: type = import_ref Main//import_generic_decl, loc15_32, loaded [symbolic = @D.as.J.impl.bdb.%J.type (constants.%J.type.5c8)] +// CHECK:STDOUT: %Main.import_ref.2e2cf0.1: type = import_ref Main//import_generic_decl, loc15_23, loaded [concrete = constants.%D] +// CHECK:STDOUT: %Main.import_ref.1936e1.1: type = import_ref Main//import_generic_decl, loc15_31, loaded [symbolic = @D.as.J.impl.bdb.%J.type (constants.%J.type.5c8)] // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic_decl, loc15_15, loaded [symbolic = @D.as.J.impl.bdb.%T (constants.%T)] // CHECK:STDOUT: %J.impl_witness_table.93d = impl_witness_table (), @D.as.J.impl.fa6 [concrete] -// CHECK:STDOUT: %Main.import_ref.2e2cf0.2: type = import_ref Main//import_generic_decl, loc21_24, loaded [concrete = constants.%D] -// CHECK:STDOUT: %Main.import_ref.5a0: type = import_ref Main//import_generic_decl, loc21_33, loaded [symbolic = @D.as.J.impl.fa6.%J.type (constants.%J.type.c71)] +// CHECK:STDOUT: %Main.import_ref.2e2cf0.2: type = import_ref Main//import_generic_decl, loc21_23, loaded [concrete = constants.%D] +// CHECK:STDOUT: %Main.import_ref.5a0: type = import_ref Main//import_generic_decl, loc21_32, loaded [symbolic = @D.as.J.impl.fa6.%J.type (constants.%J.type.c71)] // CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//import_generic_decl, loc21_15, loaded [symbolic = @D.as.J.impl.fa6.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.b19 = import_ref Main//import_generic_decl, loc8_28, unloaded // CHECK:STDOUT: %Main.import_ref.849: type = import_ref Main//import_generic_decl, loc8_18, loaded [symbolic = @N.WithSelf.Self.as_type.impls.J.type.require.%Self.as_type (constants.%Self.as_type)] // CHECK:STDOUT: %Main.import_ref.1936e1.2: type = import_ref Main//import_generic_decl, loc8_27, loaded [symbolic = @N.WithSelf.Self.as_type.impls.J.type.require.%J.type (constants.%J.type.5c8)] // CHECK:STDOUT: %Main.import_ref.b3bc94.6: type = import_ref Main//import_generic_decl, loc7_15, loaded [symbolic = @N.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.006c33.2: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic_decl, loc7_24, loaded [symbolic = @N.%Self (constants.%Self.e1f)] -// CHECK:STDOUT: %Main.import_ref.694 = import_ref Main//import_generic_decl, loc7_24, unloaded +// CHECK:STDOUT: %Main.import_ref.006c33.2: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic_decl, loc7_23, loaded [symbolic = @N.%Self (constants.%Self.e1f)] +// CHECK:STDOUT: %Main.import_ref.694 = import_ref Main//import_generic_decl, loc7_23, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.7: type = import_ref Main//import_generic_decl, loc7_15, loaded [symbolic = @N.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2414,10 +2414,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D] // CHECK:STDOUT: %J.ref: %J.type.23c = name_ref J, imports.%Main.J [concrete = constants.%J.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_15.1 [symbolic = %T.loc8_15.2 (constants.%T)] -// CHECK:STDOUT: %J.type.loc8_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc8_32.2 (constants.%J.type.5c8)] -// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] { +// CHECK:STDOUT: %J.type.loc8_31.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc8_31.2 (constants.%J.type.5c8)] +// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -2427,10 +2427,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D] // CHECK:STDOUT: %J.ref: %J.type.23c = name_ref J, imports.%Main.J [concrete = constants.%J.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_15.1 [symbolic = %T.loc14_15.2 (constants.%T)] -// CHECK:STDOUT: %J.type.loc14_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc14_32.2 (constants.%J.type.5c8)] -// CHECK:STDOUT: %.loc14_18.1: type = splice_block %.loc14_18.2 [concrete = type] { +// CHECK:STDOUT: %J.type.loc14_31.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc14_31.2 (constants.%J.type.5c8)] +// CHECK:STDOUT: %.loc14_17.1: type = splice_block %.loc14_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc14_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc14_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc14_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -2440,11 +2440,11 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D] // CHECK:STDOUT: %J.ref: %J.type.23c = name_ref J, imports.%Main.J [concrete = constants.%J.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_15.1 [symbolic = %T.loc20_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc20_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_32.2 (constants.%ptr)] -// CHECK:STDOUT: %J.type.loc20_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc20_33.2 (constants.%J.type.c71)] -// CHECK:STDOUT: %.loc20_18.1: type = splice_block %.loc20_18.2 [concrete = type] { +// CHECK:STDOUT: %ptr.loc20_31.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_31.2 (constants.%ptr)] +// CHECK:STDOUT: %J.type.loc20_32.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc20_32.2 (constants.%J.type.c71)] +// CHECK:STDOUT: %.loc20_17.1: type = splice_block %.loc20_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc20_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc20_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc20_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc20_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -2454,11 +2454,11 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D] // CHECK:STDOUT: %J.ref: %J.type.23c = name_ref J, imports.%Main.J [concrete = constants.%J.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc26_15.1 [symbolic = %T.loc26_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc26_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_32.2 (constants.%ptr)] -// CHECK:STDOUT: %J.type.loc26_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc26_33.2 (constants.%J.type.c71)] -// CHECK:STDOUT: %.loc26_18.1: type = splice_block %.loc26_18.2 [concrete = type] { +// CHECK:STDOUT: %ptr.loc26_31.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_31.2 (constants.%ptr)] +// CHECK:STDOUT: %J.type.loc26_32.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc26_32.2 (constants.%J.type.c71)] +// CHECK:STDOUT: %.loc26_17.1: type = splice_block %.loc26_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc26_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc26_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc26_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc26_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -2468,10 +2468,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D] // CHECK:STDOUT: %N.ref: %N.type.b76 = name_ref N, imports.%Main.N [concrete = constants.%empty_struct] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc32_15.1 [symbolic = %T.loc32_15.2 (constants.%T)] -// CHECK:STDOUT: %N.type.loc32_32.1: type = facet_type <@N, @N(constants.%T)> [symbolic = %N.type.loc32_32.2 (constants.%N.type.d682d6.1)] -// CHECK:STDOUT: %.loc32_18.1: type = splice_block %.loc32_18.2 [concrete = type] { +// CHECK:STDOUT: %N.type.loc32_31.1: type = facet_type <@N, @N(constants.%T)> [symbolic = %N.type.loc32_31.2 (constants.%N.type.d682d6.1)] +// CHECK:STDOUT: %.loc32_17.1: type = splice_block %.loc32_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc32_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc32_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc32_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc32_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -2481,11 +2481,11 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D] // CHECK:STDOUT: %N.ref: %N.type.b76 = name_ref N, imports.%Main.N [concrete = constants.%empty_struct] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc38_15.1 [symbolic = %T.loc38_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc38_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc38_32.2 (constants.%ptr)] -// CHECK:STDOUT: %N.type.loc38_33.1: type = facet_type <@N, @N(constants.%ptr)> [symbolic = %N.type.loc38_33.2 (constants.%N.type.d682d6.2)] -// CHECK:STDOUT: %.loc38_18.1: type = splice_block %.loc38_18.2 [concrete = type] { +// CHECK:STDOUT: %ptr.loc38_31.1: type = ptr_type %T.ref [symbolic = %ptr.loc38_31.2 (constants.%ptr)] +// CHECK:STDOUT: %N.type.loc38_32.1: type = facet_type <@N, @N(constants.%ptr)> [symbolic = %N.type.loc38_32.2 (constants.%N.type.d682d6.2)] +// CHECK:STDOUT: %.loc38_17.1: type = splice_block %.loc38_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc38_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc38_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc38_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc38_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -2560,21 +2560,21 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: generic impl @D.as.J.impl.5a5643.1(%T.loc8_15.1: type) { // CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc8_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.2 (constants.%T)] -// CHECK:STDOUT: %J.type.loc8_32.2: type = facet_type <@J, @J(%T.loc8_15.2)> [symbolic = %J.type.loc8_32.2 (constants.%J.type.5c8)] +// CHECK:STDOUT: %J.type.loc8_31.2: type = facet_type <@J, @J(%T.loc8_15.2)> [symbolic = %J.type.loc8_31.2 (constants.%J.type.5c8)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %D.ref as %J.type.loc8_32.1; +// CHECK:STDOUT: impl: %D.ref as %J.type.loc8_31.1; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @D.as.J.impl.5a5643.2(%T.loc14_15.1: type) { // CHECK:STDOUT: %T.patt.loc14_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc14_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_15.2 (constants.%T)] -// CHECK:STDOUT: %J.type.loc14_32.2: type = facet_type <@J, @J(%T.loc14_15.2)> [symbolic = %J.type.loc14_32.2 (constants.%J.type.5c8)] +// CHECK:STDOUT: %J.type.loc14_31.2: type = facet_type <@J, @J(%T.loc14_15.2)> [symbolic = %J.type.loc14_31.2 (constants.%J.type.5c8)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %D.ref as %J.type.loc14_32.1 { +// CHECK:STDOUT: impl: %D.ref as %J.type.loc14_31.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %J.type.loc14_32.1 +// CHECK:STDOUT: extend %J.type.loc14_31.1 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -2582,23 +2582,23 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: generic impl @D.as.J.impl.1010f3.1(%T.loc20_15.1: type) { // CHECK:STDOUT: %T.patt.loc20_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc20_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc20_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type %T.loc20_15.2 [symbolic = %ptr.loc20_32.2 (constants.%ptr)] -// CHECK:STDOUT: %J.type.loc20_33.2: type = facet_type <@J, @J(%ptr.loc20_32.2)> [symbolic = %J.type.loc20_33.2 (constants.%J.type.c71)] +// CHECK:STDOUT: %ptr.loc20_31.2: type = ptr_type %T.loc20_15.2 [symbolic = %ptr.loc20_31.2 (constants.%ptr)] +// CHECK:STDOUT: %J.type.loc20_32.2: type = facet_type <@J, @J(%ptr.loc20_31.2)> [symbolic = %J.type.loc20_32.2 (constants.%J.type.c71)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %D.ref as %J.type.loc20_33.1; +// CHECK:STDOUT: impl: %D.ref as %J.type.loc20_32.1; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @D.as.J.impl.1010f3.2(%T.loc26_15.1: type) { // CHECK:STDOUT: %T.patt.loc26_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc26_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc26_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type %T.loc26_15.2 [symbolic = %ptr.loc26_32.2 (constants.%ptr)] -// CHECK:STDOUT: %J.type.loc26_33.2: type = facet_type <@J, @J(%ptr.loc26_32.2)> [symbolic = %J.type.loc26_33.2 (constants.%J.type.c71)] +// CHECK:STDOUT: %ptr.loc26_31.2: type = ptr_type %T.loc26_15.2 [symbolic = %ptr.loc26_31.2 (constants.%ptr)] +// CHECK:STDOUT: %J.type.loc26_32.2: type = facet_type <@J, @J(%ptr.loc26_31.2)> [symbolic = %J.type.loc26_32.2 (constants.%J.type.c71)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %D.ref as %J.type.loc26_33.1 { +// CHECK:STDOUT: impl: %D.ref as %J.type.loc26_32.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %J.type.loc26_33.1 +// CHECK:STDOUT: extend %J.type.loc26_32.1 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -2606,13 +2606,13 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: generic impl @D.as.J.impl.d69d6f.1(%T.loc32_15.1: type) { // CHECK:STDOUT: %T.patt.loc32_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc32_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc32_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc32_15.2 (constants.%T)] -// CHECK:STDOUT: %N.type.loc32_32.2: type = facet_type <@N, @N(%T.loc32_15.2)> [symbolic = %N.type.loc32_32.2 (constants.%N.type.d682d6.1)] +// CHECK:STDOUT: %N.type.loc32_31.2: type = facet_type <@N, @N(%T.loc32_15.2)> [symbolic = %N.type.loc32_31.2 (constants.%N.type.d682d6.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %D.ref as %N.type.loc32_32.1 { +// CHECK:STDOUT: impl: %D.ref as %N.type.loc32_31.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %N.type.loc32_32.1 +// CHECK:STDOUT: extend %N.type.loc32_31.1 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -2620,14 +2620,14 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: generic impl @D.as.J.impl.d69d6f.2(%T.loc38_15.1: type) { // CHECK:STDOUT: %T.patt.loc38_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc38_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc38_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc38_15.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc38_32.2: type = ptr_type %T.loc38_15.2 [symbolic = %ptr.loc38_32.2 (constants.%ptr)] -// CHECK:STDOUT: %N.type.loc38_33.2: type = facet_type <@N, @N(%ptr.loc38_32.2)> [symbolic = %N.type.loc38_33.2 (constants.%N.type.d682d6.2)] +// CHECK:STDOUT: %ptr.loc38_31.2: type = ptr_type %T.loc38_15.2 [symbolic = %ptr.loc38_31.2 (constants.%ptr)] +// CHECK:STDOUT: %N.type.loc38_32.2: type = facet_type <@N, @N(%ptr.loc38_31.2)> [symbolic = %N.type.loc38_32.2 (constants.%N.type.d682d6.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %D.ref as %N.type.loc38_33.1 { +// CHECK:STDOUT: impl: %D.ref as %N.type.loc38_32.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %N.type.loc38_33.1 +// CHECK:STDOUT: extend %N.type.loc38_32.1 // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -2675,27 +2675,27 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: specific @D.as.J.impl.5a5643.1(constants.%T) { // CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_15.2 => constants.%T -// CHECK:STDOUT: %J.type.loc8_32.2 => constants.%J.type.5c8 +// CHECK:STDOUT: %J.type.loc8_31.2 => constants.%J.type.5c8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D.as.J.impl.5a5643.2(constants.%T) { // CHECK:STDOUT: %T.patt.loc14_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc14_15.2 => constants.%T -// CHECK:STDOUT: %J.type.loc14_32.2 => constants.%J.type.5c8 +// CHECK:STDOUT: %J.type.loc14_31.2 => constants.%J.type.5c8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D.as.J.impl.1010f3.1(constants.%T) { // CHECK:STDOUT: %T.patt.loc20_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc20_15.2 => constants.%T -// CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr -// CHECK:STDOUT: %J.type.loc20_33.2 => constants.%J.type.c71 +// CHECK:STDOUT: %ptr.loc20_31.2 => constants.%ptr +// CHECK:STDOUT: %J.type.loc20_32.2 => constants.%J.type.c71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D.as.J.impl.1010f3.2(constants.%T) { // CHECK:STDOUT: %T.patt.loc26_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc26_15.2 => constants.%T -// CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr -// CHECK:STDOUT: %J.type.loc26_33.2 => constants.%J.type.c71 +// CHECK:STDOUT: %ptr.loc26_31.2 => constants.%ptr +// CHECK:STDOUT: %J.type.loc26_32.2 => constants.%J.type.c71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%T) { @@ -2731,7 +2731,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: specific @D.as.J.impl.d69d6f.1(constants.%T) { // CHECK:STDOUT: %T.patt.loc32_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc32_15.2 => constants.%T -// CHECK:STDOUT: %N.type.loc32_32.2 => constants.%N.type.d682d6.1 +// CHECK:STDOUT: %N.type.loc32_31.2 => constants.%N.type.d682d6.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%ptr) { @@ -2757,7 +2757,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: specific @D.as.J.impl.d69d6f.2(constants.%T) { // CHECK:STDOUT: %T.patt.loc38_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc38_15.2 => constants.%T -// CHECK:STDOUT: %ptr.loc38_32.2 => constants.%ptr -// CHECK:STDOUT: %N.type.loc38_33.2 => constants.%N.type.d682d6.2 +// CHECK:STDOUT: %ptr.loc38_31.2 => constants.%ptr +// CHECK:STDOUT: %N.type.loc38_32.2 => constants.%N.type.d682d6.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_interface_assoc_const.carbon b/toolchain/check/testdata/impl/import_interface_assoc_const.carbon index 005beb1dff2d..ca65698167db 100644 --- a/toolchain/check/testdata/impl/import_interface_assoc_const.carbon +++ b/toolchain/check/testdata/impl/import_interface_assoc_const.carbon @@ -15,16 +15,16 @@ // --- interface.carbon library "[[@TEST_NAME]]"; -interface I { let T:! type; } +interface I { let T: type; } interface I3 { - let T1:! type; - let T2:! type; - let T3:! type; + let T1: type; + let T2: type; + let T3: type; } interface NonType { - let Y:! {.a: {}}; + let Y: {.a: {}}; } // --- basic.carbon @@ -106,8 +106,8 @@ impl C6 as I where .T = {}; // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE-7]]:1: in import [InImport] // CHECK:STDERR: interface.carbon:3:19: note: associated constant declared here [AssociatedConstantHere] -// CHECK:STDERR: interface I { let T:! type; } -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: interface I { let T: type; } +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE-9]]:1: error: impl declared but not defined [ImplMissingDefinition] // CHECK:STDERR: impl C6 as I where .T = {}; diff --git a/toolchain/check/testdata/impl/import_self_specific.carbon b/toolchain/check/testdata/impl/import_self_specific.carbon index 9a9245a71113..33a8e7477011 100644 --- a/toolchain/check/testdata/impl/import_self_specific.carbon +++ b/toolchain/check/testdata/impl/import_self_specific.carbon @@ -16,18 +16,18 @@ library "[[@TEST_NAME]]"; // The I.Assoc will be a facet of type Y. interface Y {} -impl forall [T:! type] T as Y {} +impl forall [T: type] T as Y {} // C takes a facet of type Z. interface Z {} -impl forall [U:! type] U as Z {} +impl forall [U: type] U as Z {} -class C(V:! Z) { +class C(V: Z) { adapt (); } interface I { - let Assoc:! Y; + let Assoc: Y; // This is a generic function with a specific that contains a reference `Self` // in it (in the ImplWitnessAccess for `Self.Assoc`). The `Self.Assoc` is @@ -45,7 +45,7 @@ import library "impl_def"; class E {} -class D(N:! E) {} +class D(N: E) {} // The eval block for this generic `impl` must not include any instructions // derived from the import of `I.F`. @@ -58,7 +58,7 @@ class D(N:! E) {} // that evaluation (such as inside impl lookup deduction against the U in the // impl for Z) should not be inappropriately added to this impl's generic eval // block. -impl forall [N:! E] D(N) as I where .Assoc = () { +impl forall [N: E] D(N) as I where .Assoc = () { fn F(unused c: C(())) {} } @@ -122,9 +122,9 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc5_15.1 [symbolic = %T.loc5_15.2 (constants.%T)] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] -// CHECK:STDOUT: %.loc5_18.1: type = splice_block %.loc5_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_15.2 (constants.%T)] // CHECK:STDOUT: } @@ -134,9 +134,9 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc9_15.1 [symbolic = %U.loc9_15.2 (constants.%U)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] -// CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc9_17.1: type = splice_block %.loc9_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc9_15.1: type = symbolic_binding U, 0 [symbolic = %U.loc9_15.2 (constants.%U)] // CHECK:STDOUT: } @@ -222,34 +222,34 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: generic impl @T.as.Y.impl(%T.loc5_15.1: type) { // CHECK:STDOUT: %T.patt.loc5_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc5_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_15.2 (constants.%T)] -// CHECK:STDOUT: %Y.impl_witness.loc5_31.2: = impl_witness %Y.impl_witness_table, @T.as.Y.impl(%T.loc5_15.2) [symbolic = %Y.impl_witness.loc5_31.2 (constants.%Y.impl_witness)] +// CHECK:STDOUT: %Y.impl_witness.loc5_30.2: = impl_witness %Y.impl_witness_table, @T.as.Y.impl(%T.loc5_15.2) [symbolic = %Y.impl_witness.loc5_30.2 (constants.%Y.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %Y.ref { // CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (), @T.as.Y.impl [concrete] -// CHECK:STDOUT: %Y.impl_witness.loc5_31.1: = impl_witness %Y.impl_witness_table, @T.as.Y.impl(constants.%T) [symbolic = %Y.impl_witness.loc5_31.2 (constants.%Y.impl_witness)] +// CHECK:STDOUT: %Y.impl_witness.loc5_30.1: = impl_witness %Y.impl_witness_table, @T.as.Y.impl(constants.%T) [symbolic = %Y.impl_witness.loc5_30.2 (constants.%Y.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %Y.ref -// CHECK:STDOUT: witness = %Y.impl_witness.loc5_31.1 +// CHECK:STDOUT: witness = %Y.impl_witness.loc5_30.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @U.as.Z.impl(%U.loc9_15.1: type) { // CHECK:STDOUT: %U.patt.loc9_15.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_15.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc9_15.2: type = symbolic_binding U, 0 [symbolic = %U.loc9_15.2 (constants.%U)] -// CHECK:STDOUT: %Z.impl_witness.loc9_31.2: = impl_witness %Z.impl_witness_table, @U.as.Z.impl(%U.loc9_15.2) [symbolic = %Z.impl_witness.loc9_31.2 (constants.%Z.impl_witness.4e2)] +// CHECK:STDOUT: %Z.impl_witness.loc9_30.2: = impl_witness %Z.impl_witness_table, @U.as.Z.impl(%U.loc9_15.2) [symbolic = %Z.impl_witness.loc9_30.2 (constants.%Z.impl_witness.4e2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %U.ref as %Z.ref { // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (), @U.as.Z.impl [concrete] -// CHECK:STDOUT: %Z.impl_witness.loc9_31.1: = impl_witness %Z.impl_witness_table, @U.as.Z.impl(constants.%U) [symbolic = %Z.impl_witness.loc9_31.2 (constants.%Z.impl_witness.4e2)] +// CHECK:STDOUT: %Z.impl_witness.loc9_30.1: = impl_witness %Z.impl_witness_table, @U.as.Z.impl(constants.%U) [symbolic = %Z.impl_witness.loc9_30.2 (constants.%Z.impl_witness.4e2)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %Z.ref -// CHECK:STDOUT: witness = %Z.impl_witness.loc9_31.1 +// CHECK:STDOUT: witness = %Z.impl_witness.loc9_30.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -294,7 +294,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: specific @T.as.Y.impl(constants.%T) { // CHECK:STDOUT: %T.patt.loc5_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc5_15.2 => constants.%T -// CHECK:STDOUT: %Y.impl_witness.loc5_31.2 => constants.%Y.impl_witness +// CHECK:STDOUT: %Y.impl_witness.loc5_30.2 => constants.%Y.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Y.WithSelf(constants.%Y.facet) { @@ -308,7 +308,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: specific @U.as.Z.impl(constants.%U) { // CHECK:STDOUT: %U.patt.loc9_15.2 => constants.%U.patt // CHECK:STDOUT: %U.loc9_15.2 => constants.%U -// CHECK:STDOUT: %Z.impl_witness.loc9_31.2 => constants.%Z.impl_witness.4e2 +// CHECK:STDOUT: %Z.impl_witness.loc9_30.2 => constants.%Z.impl_witness.4e2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%Z.facet.156) { @@ -325,7 +325,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: specific @U.as.Z.impl(constants.%as_type) { // CHECK:STDOUT: %U.patt.loc9_15.2 => constants.%U.patt // CHECK:STDOUT: %U.loc9_15.2 => constants.%as_type -// CHECK:STDOUT: %Z.impl_witness.loc9_31.2 => constants.%Z.impl_witness.5d1 +// CHECK:STDOUT: %Z.impl_witness.loc9_30.2 => constants.%Z.impl_witness.5d1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -440,19 +440,19 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %Main.import_ref.3fc: = import_ref Main//impl_def, loc13_1, loaded [concrete = constants.%complete_type.782] // CHECK:STDOUT: %Main.import_ref.b5a = import_ref Main//impl_def, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.65b: %Z.type = import_ref Main//impl_def, loc11_10, loaded [symbolic = @C.%V (constants.%V)] -// CHECK:STDOUT: %Main.import_ref.f68: = import_ref Main//impl_def, loc9_31, loaded [symbolic = @U.as.Z.impl.%Z.impl_witness (constants.%Z.impl_witness.824)] +// CHECK:STDOUT: %Main.import_ref.f68: = import_ref Main//impl_def, loc9_30, loaded [symbolic = @U.as.Z.impl.%Z.impl_witness (constants.%Z.impl_witness.824)] // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (), @U.as.Z.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.b7a: type = import_ref Main//impl_def, loc9_24, loaded [symbolic = @U.as.Z.impl.%U (constants.%U)] -// CHECK:STDOUT: %Main.import_ref.fbe: type = import_ref Main//impl_def, loc9_29, loaded [concrete = constants.%Z.type] +// CHECK:STDOUT: %Main.import_ref.b7a: type = import_ref Main//impl_def, loc9_23, loaded [symbolic = @U.as.Z.impl.%U (constants.%U)] +// CHECK:STDOUT: %Main.import_ref.fbe: type = import_ref Main//impl_def, loc9_28, loaded [concrete = constants.%Z.type] // CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//impl_def, loc9_15, loaded [symbolic = @U.as.Z.impl.%U (constants.%U)] // CHECK:STDOUT: %Main.import_ref.e59c42.2: %I.type = import_ref Main//impl_def, loc15_13, loaded [symbolic = constants.%Self.dda] // CHECK:STDOUT: %Main.import_ref.223 = import_ref Main//impl_def, loc15_13, unloaded // CHECK:STDOUT: %Main.import_ref.d73: %Y.type = import_ref Main//impl_def, loc16_12, loaded [concrete = %Assoc] // CHECK:STDOUT: %Assoc: %Y.type = assoc_const_decl @Assoc [concrete] {} -// CHECK:STDOUT: %Main.import_ref.201: = import_ref Main//impl_def, loc5_31, loaded [symbolic = @T.as.Y.impl.%Y.impl_witness (constants.%Y.impl_witness.3d4)] +// CHECK:STDOUT: %Main.import_ref.201: = import_ref Main//impl_def, loc5_30, loaded [symbolic = @T.as.Y.impl.%Y.impl_witness (constants.%Y.impl_witness.3d4)] // CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (), @T.as.Y.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.68d: type = import_ref Main//impl_def, loc5_24, loaded [symbolic = @T.as.Y.impl.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.81e: type = import_ref Main//impl_def, loc5_29, loaded [concrete = constants.%Y.type] +// CHECK:STDOUT: %Main.import_ref.68d: type = import_ref Main//impl_def, loc5_23, loaded [symbolic = @T.as.Y.impl.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.81e: type = import_ref Main//impl_def, loc5_28, loaded [concrete = constants.%Y.type] // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//impl_def, loc5_15, loaded [symbolic = @T.as.Y.impl.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -481,26 +481,26 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: } { // CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [concrete = constants.%D.generic] // CHECK:STDOUT: %N.ref: %E = name_ref N, %N.loc20_15.2 [symbolic = %N.loc20_15.1 (constants.%N)] -// CHECK:STDOUT: %D.loc20_24.2: type = class_type @D, @D(constants.%N) [symbolic = %D.loc20_24.1 (constants.%D)] +// CHECK:STDOUT: %D.loc20_23.2: type = class_type @D, @D(constants.%N) [symbolic = %D.loc20_23.1 (constants.%D)] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.frozen.loc20_31: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.frozen.loc20_30: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.frozen.loc20_31 [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.frozen.loc20_30 [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc20_37: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc20_36: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %Assoc.ref: %I.assoc_type = name_ref Assoc, imports.%Main.import_ref.f32 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc20_37.1: %Y.type = impl_witness_access constants.%I.lookup_impl_witness.ced, element0 [symbolic_self = constants.%impl.elem0.f7a] -// CHECK:STDOUT: %.loc20_47.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %impl.elem0.loc20_36.1: %Y.type = impl_witness_access constants.%I.lookup_impl_witness.ced, element0 [symbolic_self = constants.%impl.elem0.f7a] +// CHECK:STDOUT: %.loc20_46.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %Y.facet: %Y.type = facet_value constants.%empty_tuple.type, (constants.%Y.impl_witness.2e8) [concrete = constants.%Y.facet] -// CHECK:STDOUT: %.loc20_47.2: %Y.type = converted %.loc20_47.1, %Y.facet [concrete = constants.%Y.facet] -// CHECK:STDOUT: %rewrite.loc20_44.1 = requirement_rewrite %impl.elem0.loc20_37.1, %.loc20_47.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc20_37.2: %Y.type = impl_witness_access constants.%I.lookup_impl_witness.78b, element0 [symbolic_self = constants.%impl.elem0.aef] -// CHECK:STDOUT: %rewrite.loc20_44.2 = requirement_rewrite %impl.elem0.loc20_37.2, %.loc20_47.2 [concrete] -// CHECK:STDOUT: %.loc20_31: type = where_expr [concrete = constants.%I_where.type] { +// CHECK:STDOUT: %.loc20_46.2: %Y.type = converted %.loc20_46.1, %Y.facet [concrete = constants.%Y.facet] +// CHECK:STDOUT: %rewrite.loc20_43.1 = requirement_rewrite %impl.elem0.loc20_36.1, %.loc20_46.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc20_36.2: %Y.type = impl_witness_access constants.%I.lookup_impl_witness.78b, element0 [symbolic_self = constants.%impl.elem0.aef] +// CHECK:STDOUT: %rewrite.loc20_43.2 = requirement_rewrite %impl.elem0.loc20_36.2, %.loc20_46.2 [concrete] +// CHECK:STDOUT: %.loc20_30: type = where_expr [concrete = constants.%I_where.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %rewrite.loc20_44.2 = requirement_rewrite %impl.elem0.loc20_37.2, %.loc20_47.2 [concrete] +// CHECK:STDOUT: %rewrite.loc20_43.2 = requirement_rewrite %impl.elem0.loc20_36.2, %.loc20_46.2 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc20_18: type = splice_block %E.ref [concrete = constants.%E] { +// CHECK:STDOUT: %.loc20_17: type = splice_block %E.ref [concrete = constants.%E] { // CHECK:STDOUT: %.Self.frozen.loc20_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [concrete = constants.%E] // CHECK:STDOUT: } @@ -570,14 +570,14 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: generic impl @D.as.I.impl(%N.loc20_15.2: %E) { // CHECK:STDOUT: %N.patt.loc20_15.2: %pattern_type.849 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc20_15.2 (constants.%N.patt)] // CHECK:STDOUT: %N.loc20_15.1: %E = symbolic_binding N, 0 [symbolic = %N.loc20_15.1 (constants.%N)] -// CHECK:STDOUT: %D.loc20_24.1: type = class_type @D, @D(%N.loc20_15.1) [symbolic = %D.loc20_24.1 (constants.%D)] -// CHECK:STDOUT: %I.impl_witness.loc20_49.2: = impl_witness %I.impl_witness_table, @D.as.I.impl(%N.loc20_15.1) [symbolic = %I.impl_witness.loc20_49.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %D.loc20_23.1: type = class_type @D, @D(%N.loc20_15.1) [symbolic = %D.loc20_23.1 (constants.%D)] +// CHECK:STDOUT: %I.impl_witness.loc20_48.2: = impl_witness %I.impl_witness_table, @D.as.I.impl(%N.loc20_15.1) [symbolic = %I.impl_witness.loc20_48.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %D.as.I.impl.F.type: type = fn_type @D.as.I.impl.F, @D.as.I.impl(%N.loc20_15.1) [symbolic = %D.as.I.impl.F.type (constants.%D.as.I.impl.F.type)] // CHECK:STDOUT: %D.as.I.impl.F: @D.as.I.impl.%D.as.I.impl.F.type (%D.as.I.impl.F.type) = struct_value () [symbolic = %D.as.I.impl.F (constants.%D.as.I.impl.F)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %D.loc20_24.2 as %.loc20_31 { +// CHECK:STDOUT: impl: %D.loc20_23.2 as %.loc20_30 { // CHECK:STDOUT: %D.as.I.impl.F.decl: @D.as.I.impl.%D.as.I.impl.F.type (%D.as.I.impl.F.type) = fn_decl @D.as.I.impl.F [symbolic = @D.as.I.impl.%D.as.I.impl.F (constants.%D.as.I.impl.F)] { // CHECK:STDOUT: %c.param_patt: %pattern_type.78f = value_param_pattern [concrete = constants.%c.param_patt.d23] // CHECK:STDOUT: %c.patt: %pattern_type.78f = at_binding_pattern c, %c.param_patt [concrete = constants.%c.patt.152] @@ -593,14 +593,14 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %c: %C.00e = wrapper_binding c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %D.as.I.impl.F.decl), @D.as.I.impl [concrete] -// CHECK:STDOUT: %I.impl_witness.loc20_49.1: = impl_witness %I.impl_witness_table, @D.as.I.impl(constants.%N) [symbolic = %I.impl_witness.loc20_49.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %I.impl_witness.loc20_48.1: = impl_witness %I.impl_witness_table, @D.as.I.impl(constants.%N) [symbolic = %I.impl_witness.loc20_48.2 (constants.%I.impl_witness)] // CHECK:STDOUT: %impl_witness_assoc_constant: %Y.type = impl_witness_assoc_constant constants.%Y.facet [concrete = constants.%Y.facet] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %D.as.I.impl.F.decl -// CHECK:STDOUT: extend %.loc20_31 -// CHECK:STDOUT: witness = %I.impl_witness.loc20_49.1 +// CHECK:STDOUT: extend %.loc20_30 +// CHECK:STDOUT: witness = %I.impl_witness.loc20_48.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -750,8 +750,8 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: specific @D.as.I.impl(constants.%N) { // CHECK:STDOUT: %N.patt.loc20_15.2 => constants.%N.patt // CHECK:STDOUT: %N.loc20_15.1 => constants.%N -// CHECK:STDOUT: %D.loc20_24.1 => constants.%D -// CHECK:STDOUT: %I.impl_witness.loc20_49.2 => constants.%I.impl_witness +// CHECK:STDOUT: %D.loc20_23.1 => constants.%D +// CHECK:STDOUT: %I.impl_witness.loc20_48.2 => constants.%I.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %D.as.I.impl.F.type => constants.%D.as.I.impl.F.type diff --git a/toolchain/check/testdata/impl/import_thunk.carbon b/toolchain/check/testdata/impl/import_thunk.carbon index 69cf4e041a67..4de32d0f93d6 100644 --- a/toolchain/check/testdata/impl/import_thunk.carbon +++ b/toolchain/check/testdata/impl/import_thunk.carbon @@ -25,9 +25,9 @@ interface I { library "[[@TEST_NAME]]"; import library "a"; -class C(X:! ()) {} +class C(X: ()) {} -impl forall [Y:! ()] C(Y) as I { +impl forall [Y: ()] C(Y) as I { fn F(unused x: C(Y)) {} } @@ -194,10 +194,10 @@ fn G() { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %X.patt.loc5_10.1: %pattern_type.cb1 = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc5_10.2 (constants.%X.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc5_13.1: type = splice_block %.loc5_13.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_14.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc5_14.3: type = converted %.loc5_14.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc5_13.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc5_13.3: type = converted %.loc5_13.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %X.loc5_10.2: %empty_tuple.type = symbolic_binding X, 0 [symbolic = %X.loc5_10.1 (constants.%X)] // CHECK:STDOUT: } @@ -206,12 +206,12 @@ fn G() { // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %Y.ref: %empty_tuple.type = name_ref Y, %Y.loc7_15.2 [symbolic = %Y.loc7_15.1 (constants.%Y)] -// CHECK:STDOUT: %C.loc7_25.2: type = class_type @C, @C(constants.%Y) [symbolic = %C.loc7_25.1 (constants.%C.6b1ed7.2)] +// CHECK:STDOUT: %C.loc7_24.2: type = class_type @C, @C(constants.%Y) [symbolic = %C.loc7_24.1 (constants.%C.6b1ed7.2)] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] -// CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc7_18.1: type = splice_block %.loc7_18.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc7_19.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_19.3: type = converted %.loc7_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc7_18.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc7_18.3: type = converted %.loc7_18.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %Y.loc7_15.2: %empty_tuple.type = symbolic_binding Y, 0 [symbolic = %Y.loc7_15.1 (constants.%Y)] // CHECK:STDOUT: } @@ -233,8 +233,8 @@ fn G() { // CHECK:STDOUT: generic impl @C.as.I.impl(%Y.loc7_15.2: %empty_tuple.type) { // CHECK:STDOUT: %Y.patt.loc7_15.2: %pattern_type.cb1 = symbolic_binding_pattern Y, 0 [symbolic = %Y.patt.loc7_15.2 (constants.%Y.patt)] // CHECK:STDOUT: %Y.loc7_15.1: %empty_tuple.type = symbolic_binding Y, 0 [symbolic = %Y.loc7_15.1 (constants.%Y)] -// CHECK:STDOUT: %C.loc7_25.1: type = class_type @C, @C(%Y.loc7_15.1) [symbolic = %C.loc7_25.1 (constants.%C.6b1ed7.2)] -// CHECK:STDOUT: %I.impl_witness.loc7_32.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%Y.loc7_15.1) [symbolic = %I.impl_witness.loc7_32.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %C.loc7_24.1: type = class_type @C, @C(%Y.loc7_15.1) [symbolic = %C.loc7_24.1 (constants.%C.6b1ed7.2)] +// CHECK:STDOUT: %I.impl_witness.loc7_31.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%Y.loc7_15.1) [symbolic = %I.impl_witness.loc7_31.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %C.as.I.impl.F.type.loc8_24.1: type = fn_type @C.as.I.impl.F.loc8_24.1, @C.as.I.impl(%Y.loc7_15.1) [symbolic = %C.as.I.impl.F.type.loc8_24.1 (constants.%C.as.I.impl.F.type.9a27ec.1)] @@ -242,7 +242,7 @@ fn G() { // CHECK:STDOUT: %C.as.I.impl.F.type.loc8_24.2: type = fn_type @C.as.I.impl.F.loc8_24.2, @C.as.I.impl(%Y.loc7_15.1) [symbolic = %C.as.I.impl.F.type.loc8_24.2 (constants.%C.as.I.impl.F.type.9a27ec.2)] // CHECK:STDOUT: %C.as.I.impl.F.loc8_24.2: @C.as.I.impl.%C.as.I.impl.F.type.loc8_24.2 (%C.as.I.impl.F.type.9a27ec.2) = struct_value () [symbolic = %C.as.I.impl.F.loc8_24.2 (constants.%C.as.I.impl.F.84dd70.2)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.loc7_25.2 as %I.ref { +// CHECK:STDOUT: impl: %C.loc7_24.2 as %I.ref { // CHECK:STDOUT: %C.as.I.impl.F.decl.loc8_24.1: @C.as.I.impl.%C.as.I.impl.F.type.loc8_24.1 (%C.as.I.impl.F.type.9a27ec.1) = fn_decl @C.as.I.impl.F.loc8_24.1 [symbolic = @C.as.I.impl.%C.as.I.impl.F.loc8_24.1 (constants.%C.as.I.impl.F.84dd70.1)] { // CHECK:STDOUT: %x.param_patt.loc8_16.1: @C.as.I.impl.F.loc8_24.1.%pattern_type (%pattern_type.d0f) = value_param_pattern [symbolic = %x.param_patt.loc8_16.2 (constants.%x.param_patt.bc9)] // CHECK:STDOUT: %x.patt.loc8_16.1: @C.as.I.impl.F.loc8_24.1.%pattern_type (%pattern_type.d0f) = at_binding_pattern x, %x.param_patt.loc8_16.1 [symbolic = %x.patt.loc8_16.2 (constants.%x.patt.cc8)] @@ -263,14 +263,14 @@ fn G() { // CHECK:STDOUT: %x: %empty_struct_type = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%C.as.I.impl.F.decl.loc8_24.2), @C.as.I.impl [concrete] -// CHECK:STDOUT: %I.impl_witness.loc7_32.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%Y) [symbolic = %I.impl_witness.loc7_32.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %I.impl_witness.loc7_31.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%Y) [symbolic = %I.impl_witness.loc7_31.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = // CHECK:STDOUT: .Y = // CHECK:STDOUT: .F = %C.as.I.impl.F.decl.loc8_24.1 // CHECK:STDOUT: extend %I.ref -// CHECK:STDOUT: witness = %I.impl_witness.loc7_32.1 +// CHECK:STDOUT: witness = %I.impl_witness.loc7_31.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -383,8 +383,8 @@ fn G() { // CHECK:STDOUT: specific @C.as.I.impl(constants.%Y) { // CHECK:STDOUT: %Y.patt.loc7_15.2 => constants.%Y.patt // CHECK:STDOUT: %Y.loc7_15.1 => constants.%Y -// CHECK:STDOUT: %C.loc7_25.1 => constants.%C.6b1ed7.2 -// CHECK:STDOUT: %I.impl_witness.loc7_32.2 => constants.%I.impl_witness +// CHECK:STDOUT: %C.loc7_24.1 => constants.%C.6b1ed7.2 +// CHECK:STDOUT: %I.impl_witness.loc7_31.2 => constants.%I.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %C.as.I.impl.F.type.loc8_24.1 => constants.%C.as.I.impl.F.type.9a27ec.1 @@ -495,7 +495,7 @@ fn G() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//b, loc5_18, loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//b, loc5_17, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.3fc = import_ref Main//b, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c90e1a.1: %empty_tuple.type = import_ref Main//b, loc5_10, loaded [symbolic = @C.%X (constants.%X)] // CHECK:STDOUT: %Main.import_ref.1b3: %I.assoc_type = import_ref Main//a, loc5_14, loaded [concrete = constants.%assoc0.232] @@ -504,14 +504,14 @@ fn G() { // CHECK:STDOUT: %Main.import_ref.e59c42.2: %I.type = import_ref Main//a, loc4_13, loaded [symbolic = constants.%Self.dda] // CHECK:STDOUT: %Main.import_ref.223 = import_ref Main//a, loc4_13, unloaded // CHECK:STDOUT: %Main.import_ref.9f7: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.418) = import_ref Main//a, loc5_14, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.ca5)] -// CHECK:STDOUT: %Main.import_ref.9c4: = import_ref Main//b, loc7_32, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.95e)] +// CHECK:STDOUT: %Main.import_ref.9c4: = import_ref Main//b, loc7_31, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.95e)] // CHECK:STDOUT: %Main.import_ref.718: @C.as.I.impl.%C.as.I.impl.F.type.2 (%C.as.I.impl.F.type.c7d3b5.1) = import_ref Main//b, loc8_24, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F.2 (constants.%C.as.I.impl.F.c1d971.1)] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.718), @C.as.I.impl [concrete] // CHECK:STDOUT: %Main.import_ref.c90e1a.2: %empty_tuple.type = import_ref Main//b, loc7_15, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)] // CHECK:STDOUT: %Main.F.b80: @C.as.I.impl.%C.as.I.impl.F.type.1 (%C.as.I.impl.F.type.c7d3b5.2) = import_ref Main//b, F, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F.1 (constants.%C.as.I.impl.F.c1d971.2)] // CHECK:STDOUT: %Main.import_ref.c90e1a.3: %empty_tuple.type = import_ref Main//b, loc7_15, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)] -// CHECK:STDOUT: %Main.import_ref.ff4: type = import_ref Main//b, loc7_25, loaded [symbolic = @C.as.I.impl.%C (constants.%C.6b1ed7.2)] -// CHECK:STDOUT: %Main.import_ref.e90: type = import_ref Main//b, loc7_30, loaded [concrete = constants.%I.type] +// CHECK:STDOUT: %Main.import_ref.ff4: type = import_ref Main//b, loc7_24, loaded [symbolic = @C.as.I.impl.%C (constants.%C.6b1ed7.2)] +// CHECK:STDOUT: %Main.import_ref.e90: type = import_ref Main//b, loc7_29, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.import_ref.c90e1a.4: %empty_tuple.type = import_ref Main//b, loc7_15, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_use_generic.carbon b/toolchain/check/testdata/impl/import_use_generic.carbon index 1a59a9d6feb5..bf1c4d22db65 100644 --- a/toolchain/check/testdata/impl/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/import_use_generic.carbon @@ -16,13 +16,13 @@ library "[[@TEST_NAME]]"; -class C(T:! type) {} +class C(T: type) {} interface I { fn F(); } -impl forall [T:! type] C(T) as I { +impl forall [T: type] C(T) as I { fn F() {} } @@ -88,9 +88,9 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc4_10.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_13.1: type = splice_block %.loc4_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_12.1: type = splice_block %.loc4_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_10.1 (constants.%T)] // CHECK:STDOUT: } @@ -100,11 +100,11 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_15.2 [symbolic = %T.loc10_15.1 (constants.%T)] -// CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.1 (constants.%C)] +// CHECK:STDOUT: %C.loc10_26.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_26.1 (constants.%C)] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.loc10_18.1: type = splice_block %.loc10_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc10_17.1: type = splice_block %.loc10_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc10_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc10_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc10_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -131,22 +131,22 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: generic impl @C.as.I.impl(%T.loc10_15.2: type) { // CHECK:STDOUT: %T.patt.loc10_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc10_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.1 (constants.%T)] -// CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(%T.loc10_15.1) [symbolic = %C.loc10_27.1 (constants.%C)] -// CHECK:STDOUT: %I.impl_witness.loc10_34.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc10_15.1) [symbolic = %I.impl_witness.loc10_34.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %C.loc10_26.1: type = class_type @C, @C(%T.loc10_15.1) [symbolic = %C.loc10_26.1 (constants.%C)] +// CHECK:STDOUT: %I.impl_witness.loc10_33.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc10_15.1) [symbolic = %I.impl_witness.loc10_33.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F, @C.as.I.impl(%T.loc10_15.1) [symbolic = %C.as.I.impl.F.type (constants.%C.as.I.impl.F.type)] // CHECK:STDOUT: %C.as.I.impl.F: @C.as.I.impl.%C.as.I.impl.F.type (%C.as.I.impl.F.type) = struct_value () [symbolic = %C.as.I.impl.F (constants.%C.as.I.impl.F)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.loc10_27.2 as %I.ref { +// CHECK:STDOUT: impl: %C.loc10_26.2 as %I.ref { // CHECK:STDOUT: %C.as.I.impl.F.decl: @C.as.I.impl.%C.as.I.impl.F.type (%C.as.I.impl.F.type) = fn_decl @C.as.I.impl.F [symbolic = @C.as.I.impl.%C.as.I.impl.F (constants.%C.as.I.impl.F)] {} {} // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%C.as.I.impl.F.decl), @C.as.I.impl [concrete] -// CHECK:STDOUT: %I.impl_witness.loc10_34.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T) [symbolic = %I.impl_witness.loc10_34.2 (constants.%I.impl_witness)] +// CHECK:STDOUT: %I.impl_witness.loc10_33.1: = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T) [symbolic = %I.impl_witness.loc10_33.2 (constants.%I.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.I.impl.F.decl // CHECK:STDOUT: extend %I.ref -// CHECK:STDOUT: witness = %I.impl_witness.loc10_34.1 +// CHECK:STDOUT: witness = %I.impl_witness.loc10_33.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -197,8 +197,8 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: specific @C.as.I.impl(constants.%T) { // CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc10_15.1 => constants.%T -// CHECK:STDOUT: %C.loc10_27.1 => constants.%C -// CHECK:STDOUT: %I.impl_witness.loc10_34.2 => constants.%I.impl_witness +// CHECK:STDOUT: %C.loc10_26.1 => constants.%C +// CHECK:STDOUT: %I.impl_witness.loc10_33.2 => constants.%I.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %C.as.I.impl.F.type => constants.%C.as.I.impl.F.type @@ -260,7 +260,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: %C.type = import_ref Main//import_generic, C, loaded [concrete = constants.%C.generic] // CHECK:STDOUT: %Main.I: type = import_ref Main//import_generic, I, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic, loc4_20, loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic, loc4_19, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.189 = import_ref Main//import_generic, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//import_generic, loc4_10, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.1b3: %I.assoc_type = import_ref Main//import_generic, loc7_9, loaded [concrete = constants.%assoc0] @@ -268,12 +268,12 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %Main.import_ref.e59c42.2: %I.type = import_ref Main//import_generic, loc6_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.223 = import_ref Main//import_generic, loc6_13, unloaded // CHECK:STDOUT: %Main.import_ref.9f7: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.418) = import_ref Main//import_generic, loc7_9, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.ca5)] -// CHECK:STDOUT: %Main.import_ref.57e: = import_ref Main//import_generic, loc10_34, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.5b2)] +// CHECK:STDOUT: %Main.import_ref.57e: = import_ref Main//import_generic, loc10_33, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.5b2)] // CHECK:STDOUT: %Main.import_ref.bec: @C.as.I.impl.%C.as.I.impl.F.type (%C.as.I.impl.F.type.86f) = import_ref Main//import_generic, loc11_10, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F (constants.%C.as.I.impl.F.45f)] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.bec), @C.as.I.impl [concrete] // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic, loc10_15, loaded [symbolic = @C.as.I.impl.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.4aa: type = import_ref Main//import_generic, loc10_27, loaded [symbolic = @C.as.I.impl.%C (constants.%C.1d0)] -// CHECK:STDOUT: %Main.import_ref.c3f: type = import_ref Main//import_generic, loc10_32, loaded [concrete = constants.%I.type] +// CHECK:STDOUT: %Main.import_ref.4aa: type = import_ref Main//import_generic, loc10_26, loaded [symbolic = @C.as.I.impl.%C (constants.%C.1d0)] +// CHECK:STDOUT: %Main.import_ref.c3f: type = import_ref Main//import_generic, loc10_31, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic, loc10_15, loaded [symbolic = @C.as.I.impl.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/incomplete.carbon b/toolchain/check/testdata/impl/incomplete.carbon index 9a3e5402fe0b..52eaf7c5fcc0 100644 --- a/toolchain/check/testdata/impl/incomplete.carbon +++ b/toolchain/check/testdata/impl/incomplete.carbon @@ -105,7 +105,7 @@ library "[[@TEST_NAME]]"; class C {} -interface J { let T:! type; } +interface J { let T: type; } interface Incomplete; impl C as J where .Self impls Incomplete and .T = (); @@ -156,14 +156,14 @@ constraint Y { require impls Z; } interface X { - let X1:! type; + let X1: type; // Not extend, so only required to be identified. require impls Y; } // Requires `X` to be complete, doesn't require Z to be complete. -fn F(unused T:! X where .X1 = {}) {} +fn F(unused generic T: X where .X1 = {}) {} // --- fail_incomplete_constraint.carbon library "[[@TEST_NAME]]"; @@ -798,29 +798,29 @@ interface B { // CHECK:STDOUT: %Y.decl: type = constraint_decl @Y [concrete = constants.%Y.type] {} {} // CHECK:STDOUT: %X.decl: type = interface_decl @X [concrete = constants.%X.type] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc16_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_14.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc16_22.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_22.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: type = splice_block %.loc16_19.2 [concrete = constants.%X_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc16_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc16_26.1: type = splice_block %.loc16_26.2 [concrete = constants.%X_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc16_22: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X.type] -// CHECK:STDOUT: %.Self.frozen.loc16_19: %X.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.5e5] +// CHECK:STDOUT: %.Self.frozen.loc16_26: %X.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.5e5] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %X.ref [concrete] -// CHECK:STDOUT: %.Self.ref: %X.type = name_ref .Self, %.Self.frozen.loc16_19 [symbolic_self = constants.%.Self.frozen.5e5] +// CHECK:STDOUT: %.Self.ref: %X.type = name_ref .Self, %.Self.frozen.loc16_26 [symbolic_self = constants.%.Self.frozen.5e5] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc16_25: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc16_32: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %X1.ref: %X.assoc_type = name_ref X1, @X1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc16_25.1: type = impl_witness_access constants.%X.lookup_impl_witness.de0, element0 [symbolic_self = constants.%impl.elem0.2f1] -// CHECK:STDOUT: %.loc16_32.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc16_32.2: type = converted %.loc16_32.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %rewrite.loc16_29.1 = requirement_rewrite %impl.elem0.loc16_25.1, %.loc16_32.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc16_25.2: type = impl_witness_access constants.%X.lookup_impl_witness.f28, element0 [symbolic_self = constants.%impl.elem0.061] -// CHECK:STDOUT: %rewrite.loc16_29.2 = requirement_rewrite %impl.elem0.loc16_25.2, %.loc16_32.2 [concrete] -// CHECK:STDOUT: %.loc16_19.2: type = where_expr [concrete = constants.%X_where.type] { +// CHECK:STDOUT: %impl.elem0.loc16_32.1: type = impl_witness_access constants.%X.lookup_impl_witness.de0, element0 [symbolic_self = constants.%impl.elem0.2f1] +// CHECK:STDOUT: %.loc16_39.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc16_39.2: type = converted %.loc16_39.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %rewrite.loc16_36.1 = requirement_rewrite %impl.elem0.loc16_32.1, %.loc16_39.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc16_32.2: type = impl_witness_access constants.%X.lookup_impl_witness.f28, element0 [symbolic_self = constants.%impl.elem0.061] +// CHECK:STDOUT: %rewrite.loc16_36.2 = requirement_rewrite %impl.elem0.loc16_32.2, %.loc16_39.2 [concrete] +// CHECK:STDOUT: %.loc16_26.2: type = where_expr [concrete = constants.%X_where.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %X.ref [concrete] -// CHECK:STDOUT: %rewrite.loc16_29.2 = requirement_rewrite %impl.elem0.loc16_25.2, %.loc16_32.2 [concrete] +// CHECK:STDOUT: %rewrite.loc16_36.2 = requirement_rewrite %impl.elem0.loc16_32.2, %.loc16_39.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc16_14.2: %X_where.type = symbolic_binding T, 0 [symbolic = %T.loc16_14.1 (constants.%T)] +// CHECK:STDOUT: %T.loc16_22.2: %X_where.type = symbolic_binding T, 0 [symbolic = %T.loc16_22.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -889,9 +889,9 @@ interface B { // CHECK:STDOUT: %Self.as_type.loc12_11.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_11.2 (constants.%Self.as_type.ace)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc16_14.2: %X_where.type) { -// CHECK:STDOUT: %T.patt.loc16_14.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc16_14.1: %X_where.type = symbolic_binding T, 0 [symbolic = %T.loc16_14.1 (constants.%T)] +// CHECK:STDOUT: generic fn @F(%T.loc16_22.2: %X_where.type) { +// CHECK:STDOUT: %T.patt.loc16_22.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_22.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc16_22.1: %X_where.type = symbolic_binding T, 0 [symbolic = %T.loc16_22.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -933,8 +933,8 @@ interface B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc16_14.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc16_14.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc16_22.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc16_22.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_incomplete_constraint.carbon diff --git a/toolchain/check/testdata/impl/interface_args.carbon b/toolchain/check/testdata/impl/interface_args.carbon index 7a2af72a5bd5..1ab52ff04b3e 100644 --- a/toolchain/check/testdata/impl/interface_args.carbon +++ b/toolchain/check/testdata/impl/interface_args.carbon @@ -15,7 +15,7 @@ // --- core.carbon package Core; -interface ImplicitAs(Dest:! type) { +interface ImplicitAs(Dest: type) { fn Convert(self) -> Dest; } @@ -23,7 +23,7 @@ interface ImplicitAs(Dest:! type) { library "[[@TEST_NAME]]"; -interface Action(T:! type) { +interface Action(T: type) { fn Op(self); } @@ -57,7 +57,7 @@ fn G(a: A) { a.(Action(C).Op)(); } library "[[@TEST_NAME]]"; -interface Factory(T:! type) { +interface Factory(T: type) { // Non-instance class function fn Make() -> T; // Instance method @@ -141,9 +141,9 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.0ff = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] { // CHECK:STDOUT: %Dest.patt.loc3_26.1: %pattern_type.98f = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc3_26.2 (constants.%Dest.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_29.1: type = splice_block %.loc3_29.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_28.1: type = splice_block %.loc3_28.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_29.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_28.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %Dest.loc3_26.2: type = symbolic_binding Dest, 0 [symbolic = %Dest.loc3_26.1 (constants.%Dest)] // CHECK:STDOUT: } @@ -155,10 +155,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_26.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)] -// CHECK:STDOUT: %Self.loc3_35.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc3_34.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_34.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc3_34.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_34.2 (constants.%Self)] // CHECK:STDOUT: %ImplicitAs.WithSelf.decl = interface_with_self_decl @ImplicitAs [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -172,7 +172,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %.loc4_23.2: Core.Form = init_form %Dest.ref [symbolic = %.loc4_23.1 (constants.%.184)] // CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc4_14.1 (%Self.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc4_14.1: type = splice_block %.loc4_14.3 [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc4_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc3_35.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc4_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc3_34.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = name_ref Self, %.loc4_14.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc4_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc4_14.3: type = converted %Self.ref, %Self.as_type.loc4_14.2 [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] @@ -184,7 +184,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %assoc0.loc4_27.1: @ImplicitAs.WithSelf.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc4_27.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_35.1 +// CHECK:STDOUT: .Self = %Self.loc3_34.1 // CHECK:STDOUT: .Dest = // CHECK:STDOUT: .Dest = // CHECK:STDOUT: .Convert = @ImplicitAs.WithSelf.%assoc0.loc4_27.1 @@ -196,7 +196,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%Dest.loc3_26.2: type, @ImplicitAs.%Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) { +// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%Dest.loc3_26.2: type, @ImplicitAs.%Self.loc3_34.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) { // CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)] // CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] @@ -301,9 +301,9 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Action.decl: %Action.type.538 = interface_decl @Action [concrete = constants.%Action.generic] { // CHECK:STDOUT: %T.patt.loc4_19.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_19.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_22.1: type = splice_block %.loc4_22.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_21.1: type = splice_block %.loc4_21.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_22.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_21.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_19.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_19.1 (constants.%T)] // CHECK:STDOUT: } @@ -332,10 +332,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(%T.loc4_19.1)> [symbolic = %Action.type (constants.%Action.type.cbf)] -// CHECK:STDOUT: %Self.loc4_28.2: @Action.%Action.type (%Action.type.cbf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.67c)] +// CHECK:STDOUT: %Self.loc4_27.2: @Action.%Action.type (%Action.type.cbf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_27.2 (constants.%Self.67c)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_28.1: @Action.%Action.type (%Action.type.cbf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.67c)] +// CHECK:STDOUT: %Self.loc4_27.1: @Action.%Action.type (%Action.type.cbf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_27.2 (constants.%Self.67c)] // CHECK:STDOUT: %Action.WithSelf.decl = interface_with_self_decl @Action [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -345,7 +345,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: @Action.WithSelf.Op.%Self.as_type.loc5_9.1 (%Self.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_9.1: type = splice_block %.loc5_9.3 [symbolic = %Self.as_type.loc5_9.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc5_9.2: @Action.WithSelf.Op.%Action.type (%Action.type.cbf) = specific_constant @Action.%Self.loc4_28.1, @Action(constants.%T) [symbolic = %Self (constants.%Self.67c)] +// CHECK:STDOUT: %.loc5_9.2: @Action.WithSelf.Op.%Action.type (%Action.type.cbf) = specific_constant @Action.%Self.loc4_27.1, @Action(constants.%T) [symbolic = %Self (constants.%Self.67c)] // CHECK:STDOUT: %Self.ref: @Action.WithSelf.Op.%Action.type (%Action.type.cbf) = name_ref Self, %.loc5_9.2 [symbolic = %Self (constants.%Self.67c)] // 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.3: type = converted %Self.ref, %Self.as_type.loc5_9.2 [symbolic = %Self.as_type.loc5_9.1 (constants.%Self.as_type)] @@ -355,7 +355,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %assoc0.loc5_14.1: @Action.WithSelf.%Action.assoc_type (%Action.assoc_type.1c3) = assoc_entity element0, %Action.WithSelf.Op.decl [symbolic = %assoc0.loc5_14.2 (constants.%assoc0.26f)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_28.1 +// CHECK:STDOUT: .Self = %Self.loc4_27.1 // CHECK:STDOUT: .Op = @Action.WithSelf.%assoc0.loc5_14.1 // CHECK:STDOUT: witness = (@Action.WithSelf.%Action.WithSelf.Op.decl) // CHECK:STDOUT: @@ -407,7 +407,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Action.WithSelf.Op(@Action.%T.loc4_19.2: type, @Action.%Self.loc4_28.1: @Action.%Action.type (%Action.type.cbf)) { +// CHECK:STDOUT: generic fn @Action.WithSelf.Op(@Action.%T.loc4_19.2: type, @Action.%Self.loc4_27.1: @Action.%Action.type (%Action.type.cbf)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(%T)> [symbolic = %Action.type (constants.%Action.type.cbf)] // CHECK:STDOUT: %Self: @Action.WithSelf.Op.%Action.type (%Action.type.cbf) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.67c)] @@ -465,7 +465,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Action.type => constants.%Action.type.5d2 -// CHECK:STDOUT: %Self.loc4_28.2 => constants.%Self.7ff +// CHECK:STDOUT: %Self.loc4_27.2 => constants.%Self.7ff // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Action.WithSelf(constants.%B, constants.%Self.67c) { @@ -559,8 +559,8 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.Op = import_ref Main//action, Op, unloaded // CHECK:STDOUT: %Main.import_ref.c56: @Action.WithSelf.%Action.WithSelf.Op.type (%Action.WithSelf.Op.type.a98) = import_ref Main//action, loc5_14, loaded [symbolic = @Action.WithSelf.%Action.WithSelf.Op (constants.%Action.WithSelf.Op.876)] // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//action, loc4_19, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.7dfc68.2: @Action.%Action.type (%Action.type.cbf) = import_ref Main//action, loc4_28, loaded [symbolic = @Action.%Self (constants.%Self.ea2)] -// CHECK:STDOUT: %Main.import_ref.422 = import_ref Main//action, loc4_28, unloaded +// CHECK:STDOUT: %Main.import_ref.7dfc68.2: @Action.%Action.type (%Action.type.cbf) = import_ref Main//action, loc4_27, loaded [symbolic = @Action.%Self (constants.%Self.ea2)] +// CHECK:STDOUT: %Main.import_ref.422 = import_ref Main//action, loc4_27, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//action, loc4_19, loaded [symbolic = @Action.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.371: = import_ref Main//action, loc12_21, loaded [concrete = constants.%Action.impl_witness] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type] @@ -770,8 +770,8 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.Op = import_ref Main//action, Op, unloaded // CHECK:STDOUT: %Main.import_ref.c56: @Action.WithSelf.%Action.WithSelf.Op.type (%Action.WithSelf.Op.type.a98) = import_ref Main//action, loc5_14, loaded [symbolic = @Action.WithSelf.%Action.WithSelf.Op (constants.%Action.WithSelf.Op.876)] // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//action, loc4_19, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.7dfc68.2: @Action.%Action.type (%Action.type.cbf) = import_ref Main//action, loc4_28, loaded [symbolic = @Action.%Self (constants.%Self.ea2)] -// CHECK:STDOUT: %Main.import_ref.422 = import_ref Main//action, loc4_28, unloaded +// CHECK:STDOUT: %Main.import_ref.7dfc68.2: @Action.%Action.type (%Action.type.cbf) = import_ref Main//action, loc4_27, loaded [symbolic = @Action.%Self (constants.%Self.ea2)] +// CHECK:STDOUT: %Main.import_ref.422 = import_ref Main//action, loc4_27, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//action, loc4_19, loaded [symbolic = @Action.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.640 = import_ref Main//action, loc12_21, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type] @@ -1004,9 +1004,9 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Factory.decl: %Factory.type.9da = interface_decl @Factory [concrete = constants.%Factory.generic] { // CHECK:STDOUT: %T.patt.loc4_20.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_20.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_23.1: type = splice_block %.loc4_23.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_22.1: type = splice_block %.loc4_22.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_23.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_22.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_20.1 (constants.%T)] // CHECK:STDOUT: } @@ -1026,10 +1026,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(%T.loc4_20.1)> [symbolic = %Factory.type (constants.%Factory.type.711)] -// CHECK:STDOUT: %Self.loc4_29.2: @Factory.%Factory.type (%Factory.type.711) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.9c2)] +// CHECK:STDOUT: %Self.loc4_28.2: @Factory.%Factory.type (%Factory.type.711) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.9c2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_29.1: @Factory.%Factory.type (%Factory.type.711) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.9c2)] +// CHECK:STDOUT: %Self.loc4_28.1: @Factory.%Factory.type (%Factory.type.711) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.9c2)] // CHECK:STDOUT: %Factory.WithSelf.decl = interface_with_self_decl @Factory [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -1053,7 +1053,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %.loc8_22.2: Core.Form = init_form %T.ref [symbolic = %.loc8_22.1 (constants.%.184)] // CHECK:STDOUT: %self.param: @Factory.WithSelf.Method.%Self.as_type.loc8_13.1 (%Self.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.3 [symbolic = %Self.as_type.loc8_13.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc8_13.2: @Factory.WithSelf.Method.%Factory.type (%Factory.type.711) = specific_constant @Factory.%Self.loc4_29.1, @Factory(constants.%T) [symbolic = %Self (constants.%Self.9c2)] +// CHECK:STDOUT: %.loc8_13.2: @Factory.WithSelf.Method.%Factory.type (%Factory.type.711) = specific_constant @Factory.%Self.loc4_28.1, @Factory(constants.%T) [symbolic = %Self (constants.%Self.9c2)] // CHECK:STDOUT: %Self.ref: @Factory.WithSelf.Method.%Factory.type (%Factory.type.711) = name_ref Self, %.loc8_13.2 [symbolic = %Self (constants.%Self.9c2)] // CHECK:STDOUT: %Self.as_type.loc8_13.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc8_13.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc8_13.3: type = converted %Self.ref, %Self.as_type.loc8_13.2 [symbolic = %Self.as_type.loc8_13.1 (constants.%Self.as_type)] @@ -1065,7 +1065,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %assoc1.loc8_23.1: @Factory.WithSelf.%Factory.assoc_type (%Factory.assoc_type.0ed) = assoc_entity element1, %Factory.WithSelf.Method.decl [symbolic = %assoc1.loc8_23.2 (constants.%assoc1.b7b)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_29.1 +// CHECK:STDOUT: .Self = %Self.loc4_28.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .Make = @Factory.WithSelf.%assoc0.loc6_17.1 @@ -1130,7 +1130,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Factory.WithSelf.Make(@Factory.%T.loc4_20.2: type, @Factory.%Self.loc4_29.1: @Factory.%Factory.type (%Factory.type.711)) { +// CHECK:STDOUT: generic fn @Factory.WithSelf.Make(@Factory.%T.loc4_20.2: type, @Factory.%Self.loc4_28.1: @Factory.%Factory.type (%Factory.type.711)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %.loc6_16.1: Core.Form = init_form %T [symbolic = %.loc6_16.1 (constants.%.184)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)] @@ -1140,7 +1140,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: fn() -> out %return.param: @Factory.WithSelf.Make.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Factory.WithSelf.Method(@Factory.%T.loc4_20.2: type, @Factory.%Self.loc4_29.1: @Factory.%Factory.type (%Factory.type.711)) { +// CHECK:STDOUT: generic fn @Factory.WithSelf.Method(@Factory.%T.loc4_20.2: type, @Factory.%Self.loc4_28.1: @Factory.%Factory.type (%Factory.type.711)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(%T)> [symbolic = %Factory.type (constants.%Factory.type.711)] // CHECK:STDOUT: %Self: @Factory.WithSelf.Method.%Factory.type (%Factory.type.711) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.9c2)] @@ -1195,7 +1195,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Factory.type => constants.%Factory.type.5e3 -// CHECK:STDOUT: %Self.loc4_29.2 => constants.%Self.f44 +// CHECK:STDOUT: %Self.loc4_28.2 => constants.%Self.f44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Factory.WithSelf(constants.%B, constants.%Self.9c2) { @@ -1327,11 +1327,11 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.Method = import_ref Main//factory, Method, unloaded // CHECK:STDOUT: %Main.import_ref.ad0: @Factory.WithSelf.%Factory.WithSelf.Method.type (%Factory.WithSelf.Method.type.d40) = import_ref Main//factory, loc8_23, loaded [symbolic = @Factory.WithSelf.%Factory.WithSelf.Method (constants.%Factory.WithSelf.Method.459)] // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//factory, loc4_20, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.0f8e01.2: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)] +// CHECK:STDOUT: %Main.import_ref.0f8e01.2: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_28, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)] // CHECK:STDOUT: %Main.import_ref.0a8: @Factory.WithSelf.%Factory.WithSelf.Make.type (%Factory.WithSelf.Make.type.cf7) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.WithSelf.%Factory.WithSelf.Make (constants.%Factory.WithSelf.Make.86c)] // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//factory, loc4_20, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.0f8e01.3: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)] -// CHECK:STDOUT: %Main.import_ref.a45 = import_ref Main//factory, loc4_29, unloaded +// CHECK:STDOUT: %Main.import_ref.0f8e01.3: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_28, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)] +// CHECK:STDOUT: %Main.import_ref.a45 = import_ref Main//factory, loc4_28, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//factory, loc4_20, loaded [symbolic = @Factory.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8c3: = import_ref Main//factory, loc14_22, loaded [concrete = constants.%Factory.impl_witness] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type] @@ -1630,11 +1630,11 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.Method = import_ref Main//factory, Method, unloaded // CHECK:STDOUT: %Main.import_ref.ad0: @Factory.WithSelf.%Factory.WithSelf.Method.type (%Factory.WithSelf.Method.type.d40) = import_ref Main//factory, loc8_23, loaded [symbolic = @Factory.WithSelf.%Factory.WithSelf.Method (constants.%Factory.WithSelf.Method.459)] // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//factory, loc4_20, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.0f8e01.2: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)] +// CHECK:STDOUT: %Main.import_ref.0f8e01.2: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_28, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)] // CHECK:STDOUT: %Main.import_ref.0a8: @Factory.WithSelf.%Factory.WithSelf.Make.type (%Factory.WithSelf.Make.type.cf7) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.WithSelf.%Factory.WithSelf.Make (constants.%Factory.WithSelf.Make.86c)] // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//factory, loc4_20, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.0f8e01.3: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)] -// CHECK:STDOUT: %Main.import_ref.a45 = import_ref Main//factory, loc4_29, unloaded +// CHECK:STDOUT: %Main.import_ref.0f8e01.3: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_28, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)] +// CHECK:STDOUT: %Main.import_ref.a45 = import_ref Main//factory, loc4_28, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//factory, loc4_20, loaded [symbolic = @Factory.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.97f = import_ref Main//factory, loc14_22, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type] diff --git a/toolchain/check/testdata/impl/lookup/access.carbon b/toolchain/check/testdata/impl/lookup/access.carbon index 654ca57e17c6..07236b752eb3 100644 --- a/toolchain/check/testdata/impl/lookup/access.carbon +++ b/toolchain/check/testdata/impl/lookup/access.carbon @@ -13,23 +13,23 @@ // --- fail_todo_impl_witness_access_in_impl_type_structure.carbon library "[[@TEST_NAME]]"; -interface X(T:! type) {} +interface X(T: type) {} interface Y { - let Y1:! type; + let Y1: type; } interface Z { - let Z1:! type; + let Z1: type; } // There's 2 ImplWitnessAccess instructions in the type, but they together // resolve to a symbolic type value, so the type structure is: `? as X(?)` -impl forall [T:! Z where .Z1 impls Y] T as X(T.Z1.(Y.Y1)) {} +impl forall [T: Z where .Z1 impls Y] T as X(T.Z1.(Y.Y1)) {} -class C(W:! type) { +class C(W: type) { impl as Y where .Y1 = W {} } -fn F(V:! Z where .Z1 = C({})) { +fn F(generic V: Z where .Z1 = C({})) { // The type stucture is `? as X({})` which will match the impl's less specific // `? as X(?)`, then the impl will deduce the parameter of `X` to be `{}` from // the type of `V`. This would fail if ImplWitnessAccess instructions were @@ -39,13 +39,13 @@ fn F(V:! Z where .Z1 = C({})) { V as X({}); } -fn G(V:! Z where .Z1 impls Y) { +fn G(generic V: Z where .Z1 impls Y) { // The type structure is `? as X(?)`, also built from ImplWitnessAccess insts, // which will match the impl's `? as X(?)`. V as X(V.(Z.Z1).(Y.Y1)); } -fn H(U:! type, V:! Z where .Z1 = C(U)) { +fn H(generic U: type, generic V: Z where .Z1 = C(U)) { // The type structure is `? as X(?)`, without using an ImplWitnessAccess, // which will match the impl's `? as X(?)`. This would fail if // ImplWitnessAccess instructions were treated as Concrete in the type diff --git a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon index aab787d88e98..8a08b6df3391 100644 --- a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon +++ b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon @@ -19,7 +19,7 @@ interface J { fn JJ(self); } -fn F(T:! I & J, t: T) { +fn F(generic T: I & J, t: T) { // Nesting FacetValue and FacetAccessTypes, the `lookup_impl_witness` // instructions should remain canonical, pointing symbolically to `T`, and not // include these conversions. @@ -174,28 +174,28 @@ fn G() { // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc22_7.1: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %t.param_patt.loc22_18.1: @F.%pattern_type (%pattern_type.936) = value_param_pattern [symbolic = %t.param_patt.loc22_18.2 (constants.%t.param_patt.ed4)] -// CHECK:STDOUT: %t.patt.loc22_18.1: @F.%pattern_type (%pattern_type.936) = at_binding_pattern t, %t.param_patt.loc22_18.1 [symbolic = %t.patt.loc22_18.2 (constants.%t.patt.088)] +// CHECK:STDOUT: %T.patt.loc22_15.1: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %t.param_patt.loc22_25.1: @F.%pattern_type (%pattern_type.936) = value_param_pattern [symbolic = %t.param_patt.loc22_25.2 (constants.%t.param_patt.ed4)] +// CHECK:STDOUT: %t.patt.loc22_25.1: @F.%pattern_type (%pattern_type.936) = at_binding_pattern t, %t.param_patt.loc22_25.1 [symbolic = %t.patt.loc22_25.2 (constants.%t.patt.088)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc22_12.1: type = splice_block %.loc22_12.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %.loc22_19.1: type = splice_block %.loc22_19.3 [concrete = constants.%facet_type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref.loc22: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %J.ref.loc22: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %impl.elem0.loc22: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc22: = bound_method %I.ref.loc22, %impl.elem0.loc22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc22(%I.ref.loc22, %J.ref.loc22) [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc22_12.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc22_12.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc22_12.2 [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc22_19.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc22_19.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc22_19.2 [concrete = constants.%facet_type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc22_7.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc22_7.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @F.%T.as_type.loc22_20.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc22_20.1: type = splice_block %.loc22_20.2 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc22: %facet_type = name_ref T, %T.loc22_7.2 [symbolic = %T.loc22_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc22_20.2: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc22_20.2: type = converted %T.ref.loc22, %T.as_type.loc22_20.2 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc22_15.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc22_15.1 (constants.%T)] +// CHECK:STDOUT: %t.param: @F.%T.as_type.loc22_27.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc22_27.1: type = splice_block %.loc22_27.2 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref.loc22: %facet_type = name_ref T, %T.loc22_15.2 [symbolic = %T.loc22_15.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc22_27.2: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc22_27.2: type = converted %T.ref.loc22, %T.as_type.loc22_27.2 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @F.%T.as_type.loc22_20.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @F.%T.as_type.loc22_27.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } @@ -337,53 +337,53 @@ fn G() { // CHECK:STDOUT: fn(%self.param: @J.WithSelf.JJ.%Self.as_type.loc19_9.1 (%Self.as_type.976)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc22_7.2: %facet_type) { -// CHECK:STDOUT: %T.patt.loc22_7.2: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc22_7.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc22_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc22_20.1: type = facet_access_type %T.loc22_7.1 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_20.1 [symbolic = %pattern_type (constants.%pattern_type.936)] -// CHECK:STDOUT: %t.param_patt.loc22_18.2: @F.%pattern_type (%pattern_type.936) = value_param_pattern [symbolic = %t.param_patt.loc22_18.2 (constants.%t.param_patt.ed4)] -// CHECK:STDOUT: %t.patt.loc22_18.2: @F.%pattern_type (%pattern_type.936) = at_binding_pattern t, %t.param_patt.loc22_18.2 [symbolic = %t.patt.loc22_18.2 (constants.%t.patt.088)] +// CHECK:STDOUT: generic fn @F(%T.loc22_15.2: %facet_type) { +// CHECK:STDOUT: %T.patt.loc22_15.2: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc22_15.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc22_15.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc22_27.1: type = facet_access_type %T.loc22_15.1 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_27.1 [symbolic = %pattern_type (constants.%pattern_type.936)] +// CHECK:STDOUT: %t.param_patt.loc22_25.2: @F.%pattern_type (%pattern_type.936) = value_param_pattern [symbolic = %t.param_patt.loc22_25.2 (constants.%t.param_patt.ed4)] +// CHECK:STDOUT: %t.patt.loc22_25.2: @F.%pattern_type (%pattern_type.936) = at_binding_pattern t, %t.param_patt.loc22_25.2 [symbolic = %t.patt.loc22_25.2 (constants.%t.patt.088)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc22_20.1 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc22_7.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %I.facet.loc26_18.2: %I.type = facet_value %T.as_type.loc22_20.1, (%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc22_7.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness)] -// CHECK:STDOUT: %J.facet.loc26_33.2: %J.type = facet_value %T.as_type.loc22_20.1, (%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc22_27.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc22_15.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %I.facet.loc26_18.2: %I.type = facet_value %T.as_type.loc22_27.1, (%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc22_15.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness)] +// CHECK:STDOUT: %J.facet.loc26_33.2: %J.type = facet_value %T.as_type.loc22_27.1, (%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] // CHECK:STDOUT: %J.WithSelf.JJ.type: type = fn_type @J.WithSelf.JJ, @J.WithSelf(%J.facet.loc26_33.2) [symbolic = %J.WithSelf.JJ.type (constants.%J.WithSelf.JJ.type.2d7)] // CHECK:STDOUT: %.loc26_69: type = fn_type_with_self_type %J.WithSelf.JJ.type, %J.facet.loc26_33.2 [symbolic = %.loc26_69 (constants.%.443)] // CHECK:STDOUT: %impl.elem0.loc26_69.2: @F.%.loc26_69 (%.443) = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc26_69.2: = specific_impl_function %impl.elem0.loc26_69.2, @J.WithSelf.JJ(%J.facet.loc26_33.2) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc22_20.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc22_27.1 (%T.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc22_20.1 (%T.as_type) = name_ref t, %t -// CHECK:STDOUT: %T.ref.loc26: %facet_type = name_ref T, %T.loc22_7.2 [symbolic = %T.loc22_7.1 (constants.%T)] +// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc22_27.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %T.ref.loc26: %facet_type = name_ref T, %T.loc22_15.2 [symbolic = %T.loc22_15.1 (constants.%T)] // CHECK:STDOUT: %I.ref.loc26_21: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] // CHECK:STDOUT: %I.facet.loc26_18.1: %I.type = facet_value %T.as_type.loc26, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)] // CHECK:STDOUT: %.loc26_18: %I.type = converted %T.ref.loc26, %I.facet.loc26_18.1 [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)] // CHECK:STDOUT: %.loc26_27: type = type_literal type [concrete = type] -// CHECK:STDOUT: %as_type.loc26_24: type = facet_access_type %.loc26_18 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc26_24: type = converted %.loc26_18, %as_type.loc26_24 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] +// CHECK:STDOUT: %as_type.loc26_24: type = facet_access_type %.loc26_18 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc26_24: type = converted %.loc26_18, %as_type.loc26_24 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] // CHECK:STDOUT: %J.ref.loc26_36: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %J.facet.loc26_33.1: %J.type = facet_value %.loc26_24, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] // CHECK:STDOUT: %.loc26_33: %J.type = converted %.loc26_24, %J.facet.loc26_33.1 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] // CHECK:STDOUT: %.loc26_42: type = type_literal type [concrete = type] -// CHECK:STDOUT: %as_type.loc26_39: type = facet_access_type %.loc26_33 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc26_39: type = converted %.loc26_33, %as_type.loc26_39 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] +// CHECK:STDOUT: %as_type.loc26_39: type = facet_access_type %.loc26_33 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc26_39: type = converted %.loc26_33, %as_type.loc26_39 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] // CHECK:STDOUT: %I.ref.loc26_51: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %I.facet.loc26_48: %I.type = facet_value %.loc26_39, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)] // CHECK:STDOUT: %.loc26_48: %I.type = converted %.loc26_39, %I.facet.loc26_48 [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)] // CHECK:STDOUT: %.loc26_57: type = type_literal type [concrete = type] -// CHECK:STDOUT: %as_type.loc26_54: type = facet_access_type %.loc26_48 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc26_54: type = converted %.loc26_48, %as_type.loc26_54 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] +// CHECK:STDOUT: %as_type.loc26_54: type = facet_access_type %.loc26_48 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc26_54: type = converted %.loc26_48, %as_type.loc26_54 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] // CHECK:STDOUT: %J.ref.loc26_66: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %J.facet.loc26_63: %J.type = facet_value %.loc26_54, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] // CHECK:STDOUT: %.loc26_63: %J.type = converted %.loc26_54, %J.facet.loc26_63 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] -// CHECK:STDOUT: %as_type.loc26_67: type = facet_access_type %.loc26_63 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc26_67: type = converted %.loc26_63, %as_type.loc26_67 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] +// CHECK:STDOUT: %as_type.loc26_67: type = facet_access_type %.loc26_63 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc26_67: type = converted %.loc26_63, %as_type.loc26_67 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] // CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.WithSelf.%assoc0 [concrete = constants.%assoc0.7d8] // CHECK:STDOUT: %impl.elem0.loc26_69.1: @F.%.loc26_69 (%.443) = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc26_69: = bound_method %t.ref, %impl.elem0.loc26_69.1 @@ -516,12 +516,12 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc22_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc22_7.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc22_20.1 => constants.%T.as_type +// CHECK:STDOUT: %T.patt.loc22_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc22_15.1 => constants.%T +// CHECK:STDOUT: %T.as_type.loc22_27.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.936 -// CHECK:STDOUT: %t.param_patt.loc22_18.2 => constants.%t.param_patt.ed4 -// CHECK:STDOUT: %t.patt.loc22_18.2 => constants.%t.patt.088 +// CHECK:STDOUT: %t.param_patt.loc22_25.2 => constants.%t.param_patt.ed4 +// CHECK:STDOUT: %t.patt.loc22_25.2 => constants.%t.patt.088 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T) { @@ -598,12 +598,12 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%facet_value) { -// CHECK:STDOUT: %T.patt.loc22_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc22_7.1 => constants.%facet_value -// CHECK:STDOUT: %T.as_type.loc22_20.1 => constants.%C +// CHECK:STDOUT: %T.patt.loc22_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc22_15.1 => constants.%facet_value +// CHECK:STDOUT: %T.as_type.loc22_27.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f79 -// CHECK:STDOUT: %t.param_patt.loc22_18.2 => constants.%t.param_patt.5f8 -// CHECK:STDOUT: %t.patt.loc22_18.2 => constants.%t.patt.b06 +// CHECK:STDOUT: %t.param_patt.loc22_25.2 => constants.%t.param_patt.5f8 +// CHECK:STDOUT: %t.patt.loc22_25.2 => constants.%t.patt.b06 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type diff --git a/toolchain/check/testdata/impl/lookup/fail_function_types.carbon b/toolchain/check/testdata/impl/lookup/fail_function_types.carbon index 6fd0362ed0c4..de09352d6021 100644 --- a/toolchain/check/testdata/impl/lookup/fail_function_types.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_function_types.carbon @@ -17,7 +17,7 @@ interface Z { fn G(); } -impl forall [T:! type] T as Z { +impl forall [T: type] T as Z { fn G() {} } diff --git a/toolchain/check/testdata/impl/lookup/find_in_final.carbon b/toolchain/check/testdata/impl/lookup/find_in_final.carbon index bc43890f4815..7e0916a5ed04 100644 --- a/toolchain/check/testdata/impl/lookup/find_in_final.carbon +++ b/toolchain/check/testdata/impl/lookup/find_in_final.carbon @@ -13,12 +13,12 @@ // --- final_impl_precedence_over_facet.carbon library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } -final impl forall [U:! type] U as I where .T = () {} +final impl forall [U: type] U as I where .T = () {} -fn F(V:! I) -> V.T { +fn F(generic V: I) -> V.T { // Even though we have a witness that `V impls I` from the constraint on `I`, // we should do an impl lookup to see if any effectively final impl applies // when we find an unknown value in that witness. In this case, that lookup @@ -31,13 +31,13 @@ fn F(V:! I) -> V.T { library "[[@TEST_NAME]]"; interface Z { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } -final impl forall [T:! type] T as Z where .X = () and .Y = () {} +final impl forall [T: type] T as Z where .X = () and .Y = () {} -fn F(ZZ:! Z where .X = ()) { +fn F(generic ZZ: Z where .X = ()) { // Z.Y is unspecified on `ZZ` so it's found on the final impl where it's known // to be the concrete type (), which can then be used in this generic // function. @@ -48,13 +48,13 @@ fn F(ZZ:! Z where .X = ()) { library "[[@TEST_NAME]]"; interface Z { - let X:! type; - let Y:! type; + let X: type; + let Y: type; } -final impl forall [T:! type] T as Z where .X = () and .Y = () {} +final impl forall [T: type] T as Z where .X = () and .Y = () {} -fn F[T:! Z where .X = ()](z: T) { +fn F[T: Z where .X = ()](z: T) { // z.Y is unspecified on `ZZ` so it's found on the final impl where it's known // to be the concrete type (), which can then be used in this generic // function. @@ -64,20 +64,20 @@ fn F[T:! Z where .X = ()](z: T) { // --- final_impl_makes_compatible_facet_values.carbon library "[[@TEST_NAME]]"; -interface I { let X:! type; } +interface I { let X: type; } interface J {} -final impl forall [T:! J] T as I where .X = () {} +final impl forall [T: J] T as I where .X = () {} -class C(T:! I) { +class C(T: I) { var b: T.X; } -class D(T:! J) { +class D(T: J) { var c: C(T)*; } -fn F(T:! I & J) -> () { +fn F(generic T: I & J) -> () { // The witness for `I` found here directly, and inside `D` from a FacetValue // come from the same facet, the `T` binding in the params of F, so they // should be compatible. @@ -90,20 +90,20 @@ fn F(T:! I & J) -> () { // --- non_final_impl_makes_compatible_facet_values.carbon library "[[@TEST_NAME]]"; -interface I { let X:! Core.Destroy; } +interface I { let X: Core.Destroy; } interface J {} -impl forall [T:! J] T as I where .X = () {} +impl forall [T: J] T as I where .X = () {} -class C(T:! I) { +class C(T: I) { var b: T.X; } -class D(T:! J) { +class D(T: J) { var c: C(T)*; } -fn F(T:! I & J) -> T.(I.X)* { +fn F(generic T: I & J) -> T.(I.X)* { var x: C(T); var y: D(T); // The witness for `I` found here directly, and inside `D` from a FacetValue @@ -117,12 +117,12 @@ fn F(T:! I & J) -> T.(I.X)* { library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } -final impl forall [T:! type] T as Z where .X = () {} +final impl forall [T: type] T as Z where .X = () {} // TODO: This should be diagnosed as there is a final impl defining `.X = ()`, // which makes the LHS of this rewrite constraint concrete. And since the RHS is // not the same (or convertible from), the rewrite is impossible. -fn F(unused ZZ:! Z where .X = {.r: ()}) {} +fn F(unused generic ZZ: Z where .X = {.r: ()}) {} diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index d505754c7aa5..e732df5eb326 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -20,7 +20,7 @@ interface HasF { fn F(self); } -impl forall [T:! type] T as HasF { +impl forall [T: type] T as HasF { fn F(unused self) {} } @@ -36,7 +36,7 @@ interface HasF { fn F(self) -> Self; } -impl forall [T:! type] T* as HasF { +impl forall [T: type] T* as HasF { fn F(self) -> T* { return self; } } @@ -52,9 +52,9 @@ interface HasF { fn F(self); } -class C(T:! type) {} +class C(T: type) {} -impl forall [T:! type] C(T) as HasF { +impl forall [T: type] C(T) as HasF { fn F(unused self) {} } @@ -66,11 +66,11 @@ fn G(x: C({})) { library "[[@TEST_NAME]]"; -interface HasF(T:! type) { +interface HasF(T: type) { fn F(self); } -impl forall [T:! type] {} as HasF(T) { +impl forall [T: type] {} as HasF(T) { fn F(unused self) {} } @@ -87,10 +87,10 @@ interface HasF { } // CHECK:STDERR: fail_incomplete_deduction.carbon:[[@LINE+4]]:13: error: `impl` with unused generic binding [ImplUnusedBinding] -// CHECK:STDERR: impl forall [T:! type, U:! type] T as HasF { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type, U: type] T as HasF { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type, U:! type] T as HasF { +impl forall [T: type, U: type] T as HasF { fn F(unused self) {} } @@ -106,11 +106,11 @@ fn G(x: {}) { library "[[@TEST_NAME]]"; -interface HasF(T:! type) { +interface HasF(T: type) { fn F(self); } -impl forall [T:! type] T as HasF(T) { +impl forall [T: type] T as HasF(T) { fn F(unused self) {} } @@ -197,9 +197,9 @@ fn G(x: A) { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T)] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] -// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -248,7 +248,7 @@ fn G(x: A) { // CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc8_15.2: type) { // CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc8_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)] -// CHECK:STDOUT: %HasF.impl_witness.loc8_34.2: = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_34.2 (constants.%HasF.impl_witness.ebe)] +// CHECK:STDOUT: %HasF.impl_witness.loc8_33.2: = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_33.2 (constants.%HasF.impl_witness.ebe)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc8_15.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type.195)] @@ -264,12 +264,12 @@ fn G(x: A) { // CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete] -// CHECK:STDOUT: %HasF.impl_witness.loc8_34.1: = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_34.2 (constants.%HasF.impl_witness.ebe)] +// CHECK:STDOUT: %HasF.impl_witness.loc8_33.1: = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_33.2 (constants.%HasF.impl_witness.ebe)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl // CHECK:STDOUT: extend %HasF.ref -// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_34.1 +// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_33.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -333,7 +333,7 @@ fn G(x: A) { // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T) { // CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_15.1 => constants.%T -// CHECK:STDOUT: %HasF.impl_witness.loc8_34.2 => constants.%HasF.impl_witness.ebe +// CHECK:STDOUT: %HasF.impl_witness.loc8_33.2 => constants.%HasF.impl_witness.ebe // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type.195 @@ -365,7 +365,7 @@ fn G(x: A) { // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%empty_struct_type) { // CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_15.1 => constants.%empty_struct_type -// CHECK:STDOUT: %HasF.impl_witness.loc8_34.2 => constants.%HasF.impl_witness.aaf +// CHECK:STDOUT: %HasF.impl_witness.loc8_33.2 => constants.%HasF.impl_witness.aaf // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type.d06 @@ -489,11 +489,11 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T.67d)] -// CHECK:STDOUT: %ptr.loc8_25.2: type = ptr_type %T.ref [symbolic = %ptr.loc8_25.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %ptr.loc8_24.2: type = ptr_type %T.ref [symbolic = %ptr.loc8_24.1 (constants.%ptr.e8f)] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] -// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T.67d)] // CHECK:STDOUT: } @@ -560,14 +560,14 @@ fn G(x: A) { // CHECK:STDOUT: generic impl @ptr.as.HasF.impl(%T.loc8_15.2: type) { // CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt.d47)] // CHECK:STDOUT: %T.loc8_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T.67d)] -// CHECK:STDOUT: %ptr.loc8_25.1: type = ptr_type %T.loc8_15.1 [symbolic = %ptr.loc8_25.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %HasF.impl_witness.loc8_35.2: = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_35.2 (constants.%HasF.impl_witness.672)] +// CHECK:STDOUT: %ptr.loc8_24.1: type = ptr_type %T.loc8_15.1 [symbolic = %ptr.loc8_24.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %HasF.impl_witness.loc8_34.2: = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_34.2 (constants.%HasF.impl_witness.672)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ptr.as.HasF.impl.F.type: type = fn_type @ptr.as.HasF.impl.F, @ptr.as.HasF.impl(%T.loc8_15.1) [symbolic = %ptr.as.HasF.impl.F.type (constants.%ptr.as.HasF.impl.F.type.d5f)] // CHECK:STDOUT: %ptr.as.HasF.impl.F: @ptr.as.HasF.impl.%ptr.as.HasF.impl.F.type (%ptr.as.HasF.impl.F.type.d5f) = struct_value () [symbolic = %ptr.as.HasF.impl.F (constants.%ptr.as.HasF.impl.F.be3)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %ptr.loc8_25.2 as %HasF.ref { +// CHECK:STDOUT: impl: %ptr.loc8_24.2 as %HasF.ref { // CHECK:STDOUT: %ptr.as.HasF.impl.F.decl: @ptr.as.HasF.impl.%ptr.as.HasF.impl.F.type (%ptr.as.HasF.impl.F.type.d5f) = fn_decl @ptr.as.HasF.impl.F [symbolic = @ptr.as.HasF.impl.%ptr.as.HasF.impl.F (constants.%ptr.as.HasF.impl.F.be3)] { // CHECK:STDOUT: %self.param_patt.loc9_8.1: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = value_param_pattern [symbolic = %self.param_patt.loc9_8.2 (constants.%self.param_patt.921)] // CHECK:STDOUT: %self.patt.loc9_8.1: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = at_binding_pattern self, %self.param_patt.loc9_8.1 [symbolic = %self.patt.loc9_8.2 (constants.%self.patt.99b)] @@ -578,19 +578,19 @@ fn G(x: A) { // CHECK:STDOUT: %ptr.loc9_18: type = ptr_type %T.ref [symbolic = %ptr.loc9_8 (constants.%ptr.e8f)] // CHECK:STDOUT: %.loc9_18.2: Core.Form = init_form %ptr.loc9_18 [symbolic = %.loc9_18.1 (constants.%.cb6)] // CHECK:STDOUT: %self.param: @ptr.as.HasF.impl.F.%ptr.loc9_8 (%ptr.e8f) = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @ptr.as.HasF.impl.%ptr.loc8_25.2 [symbolic = %ptr.loc9_8 (constants.%ptr.e8f)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @ptr.as.HasF.impl.%ptr.loc8_24.2 [symbolic = %ptr.loc9_8 (constants.%ptr.e8f)] // CHECK:STDOUT: %self: @ptr.as.HasF.impl.F.%ptr.loc9_8 (%ptr.e8f) = wrapper_binding self, %self.param // CHECK:STDOUT: %return.param: ref @ptr.as.HasF.impl.F.%ptr.loc9_8 (%ptr.e8f) = out_param call_param1 // CHECK:STDOUT: %return: ref @ptr.as.HasF.impl.F.%ptr.loc9_8 (%ptr.e8f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%ptr.as.HasF.impl.F.decl), @ptr.as.HasF.impl [concrete] -// CHECK:STDOUT: %HasF.impl_witness.loc8_35.1: = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(constants.%T.67d) [symbolic = %HasF.impl_witness.loc8_35.2 (constants.%HasF.impl_witness.672)] +// CHECK:STDOUT: %HasF.impl_witness.loc8_34.1: = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(constants.%T.67d) [symbolic = %HasF.impl_witness.loc8_34.2 (constants.%HasF.impl_witness.672)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .T = // CHECK:STDOUT: .F = %ptr.as.HasF.impl.F.decl // CHECK:STDOUT: extend %HasF.ref -// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_35.1 +// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_34.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -681,8 +681,8 @@ fn G(x: A) { // CHECK:STDOUT: specific @ptr.as.HasF.impl(constants.%T.67d) { // CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc8_15.1 => constants.%T.67d -// CHECK:STDOUT: %ptr.loc8_25.1 => constants.%ptr.e8f -// CHECK:STDOUT: %HasF.impl_witness.loc8_35.2 => constants.%HasF.impl_witness.672 +// CHECK:STDOUT: %ptr.loc8_24.1 => constants.%ptr.e8f +// CHECK:STDOUT: %HasF.impl_witness.loc8_34.2 => constants.%HasF.impl_witness.672 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ptr.as.HasF.impl.F.type => constants.%ptr.as.HasF.impl.F.type.d5f @@ -721,8 +721,8 @@ fn G(x: A) { // CHECK:STDOUT: specific @ptr.as.HasF.impl(constants.%empty_struct_type) { // CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc8_15.1 => constants.%empty_struct_type -// CHECK:STDOUT: %ptr.loc8_25.1 => constants.%ptr.c28 -// CHECK:STDOUT: %HasF.impl_witness.loc8_35.2 => constants.%HasF.impl_witness.e43 +// CHECK:STDOUT: %ptr.loc8_24.1 => constants.%ptr.c28 +// CHECK:STDOUT: %HasF.impl_witness.loc8_34.2 => constants.%HasF.impl_witness.e43 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ptr.as.HasF.impl.F.type => constants.%ptr.as.HasF.impl.F.type.03e @@ -829,9 +829,9 @@ fn G(x: A) { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc8_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_10.1 (constants.%T)] // CHECK:STDOUT: } @@ -840,11 +840,11 @@ fn G(x: A) { // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_15.2 [symbolic = %T.loc10_15.1 (constants.%T)] -// CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.1 (constants.%C.1d0)] +// CHECK:STDOUT: %C.loc10_26.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_26.1 (constants.%C.1d0)] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] -// CHECK:STDOUT: %.loc10_18.1: type = splice_block %.loc10_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc10_17.1: type = splice_block %.loc10_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc10_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc10_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc10_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -895,29 +895,29 @@ fn G(x: A) { // CHECK:STDOUT: generic impl @C.as.HasF.impl(%T.loc10_15.2: type) { // CHECK:STDOUT: %T.patt.loc10_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc10_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.1 (constants.%T)] -// CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(%T.loc10_15.1) [symbolic = %C.loc10_27.1 (constants.%C.1d0)] -// CHECK:STDOUT: %HasF.impl_witness.loc10_37.2: = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(%T.loc10_15.1) [symbolic = %HasF.impl_witness.loc10_37.2 (constants.%HasF.impl_witness.4e6)] +// CHECK:STDOUT: %C.loc10_26.1: type = class_type @C, @C(%T.loc10_15.1) [symbolic = %C.loc10_26.1 (constants.%C.1d0)] +// CHECK:STDOUT: %HasF.impl_witness.loc10_36.2: = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(%T.loc10_15.1) [symbolic = %HasF.impl_witness.loc10_36.2 (constants.%HasF.impl_witness.4e6)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %C.as.HasF.impl.F.type: type = fn_type @C.as.HasF.impl.F, @C.as.HasF.impl(%T.loc10_15.1) [symbolic = %C.as.HasF.impl.F.type (constants.%C.as.HasF.impl.F.type.67f)] // CHECK:STDOUT: %C.as.HasF.impl.F: @C.as.HasF.impl.%C.as.HasF.impl.F.type (%C.as.HasF.impl.F.type.67f) = struct_value () [symbolic = %C.as.HasF.impl.F (constants.%C.as.HasF.impl.F.7ba)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.loc10_27.2 as %HasF.ref { +// CHECK:STDOUT: impl: %C.loc10_26.2 as %HasF.ref { // CHECK:STDOUT: %C.as.HasF.impl.F.decl: @C.as.HasF.impl.%C.as.HasF.impl.F.type (%C.as.HasF.impl.F.type.67f) = fn_decl @C.as.HasF.impl.F [symbolic = @C.as.HasF.impl.%C.as.HasF.impl.F (constants.%C.as.HasF.impl.F.7ba)] { // CHECK:STDOUT: %self.param_patt.loc11_15.1: @C.as.HasF.impl.F.%pattern_type (%pattern_type.ebe) = value_param_pattern [symbolic = %self.param_patt.loc11_15.2 (constants.%self.param_patt.5bc)] // CHECK:STDOUT: %self.patt.loc11_15.1: @C.as.HasF.impl.F.%pattern_type (%pattern_type.ebe) = at_binding_pattern self, %self.param_patt.loc11_15.1 [symbolic = %self.patt.loc11_15.2 (constants.%self.patt.6f1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: @C.as.HasF.impl.F.%C (%C.1d0) = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.HasF.impl.%C.loc10_27.2 [symbolic = %C (constants.%C.1d0)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.HasF.impl.%C.loc10_26.2 [symbolic = %C (constants.%C.1d0)] // CHECK:STDOUT: %self: @C.as.HasF.impl.F.%C (%C.1d0) = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%C.as.HasF.impl.F.decl), @C.as.HasF.impl [concrete] -// CHECK:STDOUT: %HasF.impl_witness.loc10_37.1: = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc10_37.2 (constants.%HasF.impl_witness.4e6)] +// CHECK:STDOUT: %HasF.impl_witness.loc10_36.1: = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc10_36.2 (constants.%HasF.impl_witness.4e6)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl // CHECK:STDOUT: extend %HasF.ref -// CHECK:STDOUT: witness = %HasF.impl_witness.loc10_37.1 +// CHECK:STDOUT: witness = %HasF.impl_witness.loc10_36.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1004,8 +1004,8 @@ fn G(x: A) { // CHECK:STDOUT: specific @C.as.HasF.impl(constants.%T) { // CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc10_15.1 => constants.%T -// CHECK:STDOUT: %C.loc10_27.1 => constants.%C.1d0 -// CHECK:STDOUT: %HasF.impl_witness.loc10_37.2 => constants.%HasF.impl_witness.4e6 +// CHECK:STDOUT: %C.loc10_26.1 => constants.%C.1d0 +// CHECK:STDOUT: %HasF.impl_witness.loc10_36.2 => constants.%HasF.impl_witness.4e6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %C.as.HasF.impl.F.type => constants.%C.as.HasF.impl.F.type.67f @@ -1045,8 +1045,8 @@ fn G(x: A) { // CHECK:STDOUT: specific @C.as.HasF.impl(constants.%empty_struct_type) { // CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc10_15.1 => constants.%empty_struct_type -// CHECK:STDOUT: %C.loc10_27.1 => constants.%C.d8e -// CHECK:STDOUT: %HasF.impl_witness.loc10_37.2 => constants.%HasF.impl_witness.f0d +// CHECK:STDOUT: %C.loc10_26.1 => constants.%C.d8e +// CHECK:STDOUT: %HasF.impl_witness.loc10_36.2 => constants.%HasF.impl_witness.f0d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %C.as.HasF.impl.F.type => constants.%C.as.HasF.impl.F.type.edc @@ -1142,23 +1142,23 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.decl: %HasF.type.c96 = interface_decl @HasF [concrete = constants.%HasF.generic] { // CHECK:STDOUT: %T.patt.loc4_17.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_17.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @empty_struct_type.as.HasF.impl [concrete] { // CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_25.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc8_25.2: type = converted %.loc8_25.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc8_24.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc8_24.2: type = converted %.loc8_24.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %HasF.ref: %HasF.type.c96 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T)] -// CHECK:STDOUT: %HasF.type.loc8_36.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_36.1 (constants.%HasF.type.daf)] -// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] { +// CHECK:STDOUT: %HasF.type.loc8_35.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.daf)] +// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -1181,10 +1181,10 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_17.1)> [symbolic = %HasF.type (constants.%HasF.type.daf)] -// CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.822)] +// CHECK:STDOUT: %Self.loc4_25.2: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_25.2 (constants.%Self.822)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.822)] +// CHECK:STDOUT: %Self.loc4_25.1: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_25.2 (constants.%Self.822)] // CHECK:STDOUT: %HasF.WithSelf.decl = interface_with_self_decl @HasF [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -1194,7 +1194,7 @@ fn G(x: A) { // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: @HasF.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.3 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc5_8.2: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.822)] +// CHECK:STDOUT: %.loc5_8.2: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = specific_constant @HasF.%Self.loc4_25.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.822)] // CHECK:STDOUT: %Self.ref: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = name_ref Self, %.loc5_8.2 [symbolic = %Self (constants.%Self.822)] // 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.3: type = converted %Self.ref, %Self.as_type.loc5_8.2 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)] @@ -1204,7 +1204,7 @@ fn G(x: A) { // CHECK:STDOUT: %assoc0.loc5_13.1: @HasF.WithSelf.%HasF.assoc_type (%HasF.assoc_type.ddf) = assoc_entity element0, %HasF.WithSelf.F.decl [symbolic = %assoc0.loc5_13.2 (constants.%assoc0.e9a)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_26.1 +// CHECK:STDOUT: .Self = %Self.loc4_25.1 // CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0.loc5_13.1 // CHECK:STDOUT: witness = (@HasF.WithSelf.%HasF.WithSelf.F.decl) // CHECK:STDOUT: @@ -1217,34 +1217,34 @@ fn G(x: A) { // CHECK:STDOUT: generic impl @empty_struct_type.as.HasF.impl(%T.loc8_15.2: type) { // CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc8_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)] -// CHECK:STDOUT: %HasF.type.loc8_36.1: type = facet_type <@HasF, @HasF(%T.loc8_15.1)> [symbolic = %HasF.type.loc8_36.1 (constants.%HasF.type.daf)] -// CHECK:STDOUT: %HasF.impl_witness.loc8_38.2: = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_38.2 (constants.%HasF.impl_witness.932)] +// CHECK:STDOUT: %HasF.type.loc8_35.1: type = facet_type <@HasF, @HasF(%T.loc8_15.1)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.daf)] +// CHECK:STDOUT: %HasF.impl_witness.loc8_37.2: = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_37.2 (constants.%HasF.impl_witness.932)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %HasF.type.loc8_36.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %HasF.type.loc8_35.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type: type = fn_type @empty_struct_type.as.HasF.impl.F, @empty_struct_type.as.HasF.impl(%T.loc8_15.1) [symbolic = %empty_struct_type.as.HasF.impl.F.type (constants.%empty_struct_type.as.HasF.impl.F.type.5ee)] // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F: @empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F.type (%empty_struct_type.as.HasF.impl.F.type.5ee) = struct_value () [symbolic = %empty_struct_type.as.HasF.impl.F (constants.%empty_struct_type.as.HasF.impl.F.b79)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc8_25.2 as %HasF.type.loc8_36.2 { +// CHECK:STDOUT: impl: %.loc8_24.2 as %HasF.type.loc8_35.2 { // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.decl: @empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F.type (%empty_struct_type.as.HasF.impl.F.type.5ee) = fn_decl @empty_struct_type.as.HasF.impl.F [symbolic = @empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F (constants.%empty_struct_type.as.HasF.impl.F.b79)] { // CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = value_param_pattern [concrete = constants.%self.param_patt.482] // CHECK:STDOUT: %self.patt: %pattern_type.a96 = at_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b63] // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: %empty_struct_type = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_struct_type.as.HasF.impl.%.loc8_25.2 [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_struct_type.as.HasF.impl.%.loc8_24.2 [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %self: %empty_struct_type = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%empty_struct_type.as.HasF.impl.F.decl), @empty_struct_type.as.HasF.impl [concrete] -// CHECK:STDOUT: %HasF.impl_witness.loc8_38.1: = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_38.2 (constants.%HasF.impl_witness.932)] +// CHECK:STDOUT: %HasF.impl_witness.loc8_37.1: = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_37.2 (constants.%HasF.impl_witness.932)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %empty_struct_type.as.HasF.impl.F.decl -// CHECK:STDOUT: extend %HasF.type.loc8_36.2 -// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_38.1 +// CHECK:STDOUT: extend %HasF.type.loc8_35.2 +// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_37.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_17.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.daf)) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_17.2: type, @HasF.%Self.loc4_25.1: @HasF.%HasF.type (%HasF.type.daf)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.daf)] // CHECK:STDOUT: %Self: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.822)] @@ -1292,7 +1292,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HasF.type => constants.%HasF.type.daf -// CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.822 +// CHECK:STDOUT: %Self.loc4_25.2 => constants.%Self.822 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HasF.WithSelf(constants.%T, constants.%Self.822) { @@ -1319,8 +1319,8 @@ fn G(x: A) { // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl(constants.%T) { // CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_15.1 => constants.%T -// CHECK:STDOUT: %HasF.type.loc8_36.1 => constants.%HasF.type.daf -// CHECK:STDOUT: %HasF.impl_witness.loc8_38.2 => constants.%HasF.impl_witness.932 +// CHECK:STDOUT: %HasF.type.loc8_35.1 => constants.%HasF.type.daf +// CHECK:STDOUT: %HasF.impl_witness.loc8_37.2 => constants.%HasF.impl_witness.932 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete @@ -1357,7 +1357,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HasF.type => constants.%HasF.type.b91 -// CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.aa9 +// CHECK:STDOUT: %Self.loc4_25.2 => constants.%Self.aa9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HasF.WithSelf(constants.%empty_struct_type, constants.%Self.822) { @@ -1374,8 +1374,8 @@ fn G(x: A) { // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl(constants.%empty_struct_type) { // CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_15.1 => constants.%empty_struct_type -// CHECK:STDOUT: %HasF.type.loc8_36.1 => constants.%HasF.type.b91 -// CHECK:STDOUT: %HasF.impl_witness.loc8_38.2 => constants.%HasF.impl_witness.7f1 +// CHECK:STDOUT: %HasF.type.loc8_35.1 => constants.%HasF.type.b91 +// CHECK:STDOUT: %HasF.impl_witness.loc8_37.2 => constants.%HasF.impl_witness.7f1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type @@ -1451,20 +1451,20 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {} // CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] { // CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc12_25.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc12_25.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc12_24.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc12_24.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_15.2 [symbolic = %T.loc12_15.1 (constants.%T)] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] -// CHECK:STDOUT: %.loc12_18.1: type = splice_block %.loc12_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc12_17.1: type = splice_block %.loc12_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc12_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc12_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T)] -// CHECK:STDOUT: %.loc12_28.1: type = splice_block %.loc12_28.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc12_25: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_28.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_26.1: type = splice_block %.loc12_26.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc12_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc12_26.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc12_25.2: type = symbolic_binding U, 1 [symbolic = %U.loc12_25.1 (constants.%U)] +// CHECK:STDOUT: %U.loc12_24.2: type = symbolic_binding U, 1 [symbolic = %U.loc12_24.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %x.param_patt: %pattern_type.a96 = value_param_pattern [concrete = constants.%x.param_patt] @@ -1508,15 +1508,15 @@ fn G(x: A) { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc12_15.2: type, %U.loc12_25.2: type) { +// CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc12_15.2: type, %U.loc12_24.2: type) { // CHECK:STDOUT: %T.patt.loc12_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc12_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc12_25.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc12_25.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc12_25.1: type = symbolic_binding U, 1 [symbolic = %U.loc12_25.1 (constants.%U)] -// CHECK:STDOUT: %HasF.impl_witness.loc12_44.2: = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc12_15.1, %U.loc12_25.1) [symbolic = %HasF.impl_witness.loc12_44.2 (constants.%HasF.impl_witness)] +// CHECK:STDOUT: %U.patt.loc12_24.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc12_24.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc12_24.1: type = symbolic_binding U, 1 [symbolic = %U.loc12_24.1 (constants.%U)] +// CHECK:STDOUT: %HasF.impl_witness.loc12_42.2: = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc12_15.1, %U.loc12_24.1) [symbolic = %HasF.impl_witness.loc12_42.2 (constants.%HasF.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc12_15.1, %U.loc12_25.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type)] +// CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc12_15.1, %U.loc12_24.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type)] // CHECK:STDOUT: %T.as.HasF.impl.F: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = struct_value () [symbolic = %T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %HasF.ref { @@ -1529,7 +1529,7 @@ fn G(x: A) { // CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (), @T.as.HasF.impl [concrete] -// CHECK:STDOUT: %HasF.impl_witness.loc12_44.1: = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T, constants.%U) [symbolic = %HasF.impl_witness.loc12_44.2 (constants.%HasF.impl_witness)] +// CHECK:STDOUT: %HasF.impl_witness.loc12_42.1: = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T, constants.%U) [symbolic = %HasF.impl_witness.loc12_42.2 (constants.%HasF.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl @@ -1548,7 +1548,7 @@ fn G(x: A) { // CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.as_type.loc5_8.1 (%Self.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc12_15.2: type, @T.as.HasF.impl.%U.loc12_25.2: type) { +// CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc12_15.2: type, @T.as.HasF.impl.%U.loc12_24.2: type) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)] // CHECK:STDOUT: %self.param_patt.loc13_15.2: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %self.param_patt.loc13_15.2 (constants.%self.param_patt.b7c)] @@ -1593,9 +1593,9 @@ fn G(x: A) { // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc12_15.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc12_25.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc12_25.1 => constants.%U -// CHECK:STDOUT: %HasF.impl_witness.loc12_44.2 => constants.%HasF.impl_witness +// CHECK:STDOUT: %U.patt.loc12_24.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc12_24.1 => constants.%U +// CHECK:STDOUT: %HasF.impl_witness.loc12_42.2 => constants.%HasF.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type @@ -1676,22 +1676,22 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.decl: %HasF.type.c96 = interface_decl @HasF [concrete = constants.%HasF.generic] { // CHECK:STDOUT: %T.patt.loc4_17.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_17.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] { // CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc8_24: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc8_23: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T)] // CHECK:STDOUT: %HasF.ref: %HasF.type.c96 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic] -// CHECK:STDOUT: %T.ref.loc8_34: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T)] -// CHECK:STDOUT: %HasF.type.loc8_35.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.daf)] -// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc8_33: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T)] +// CHECK:STDOUT: %HasF.type.loc8_34.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_34.1 (constants.%HasF.type.daf)] +// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -1713,10 +1713,10 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_17.1)> [symbolic = %HasF.type (constants.%HasF.type.daf)] -// CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.822)] +// CHECK:STDOUT: %Self.loc4_25.2: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_25.2 (constants.%Self.822)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.822)] +// CHECK:STDOUT: %Self.loc4_25.1: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_25.2 (constants.%Self.822)] // CHECK:STDOUT: %HasF.WithSelf.decl = interface_with_self_decl @HasF [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -1726,7 +1726,7 @@ fn G(x: A) { // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: @HasF.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.3 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc5_8.2: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.822)] +// CHECK:STDOUT: %.loc5_8.2: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = specific_constant @HasF.%Self.loc4_25.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.822)] // CHECK:STDOUT: %Self.ref: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = name_ref Self, %.loc5_8.2 [symbolic = %Self (constants.%Self.822)] // 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.3: type = converted %Self.ref, %Self.as_type.loc5_8.2 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)] @@ -1736,7 +1736,7 @@ fn G(x: A) { // CHECK:STDOUT: %assoc0.loc5_13.1: @HasF.WithSelf.%HasF.assoc_type (%HasF.assoc_type.ddf) = assoc_entity element0, %HasF.WithSelf.F.decl [symbolic = %assoc0.loc5_13.2 (constants.%assoc0.e9a)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_26.1 +// CHECK:STDOUT: .Self = %Self.loc4_25.1 // CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0.loc5_13.1 // CHECK:STDOUT: witness = (@HasF.WithSelf.%HasF.WithSelf.F.decl) // CHECK:STDOUT: @@ -1749,30 +1749,30 @@ fn G(x: A) { // CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc8_15.2: type) { // CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc8_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)] -// CHECK:STDOUT: %HasF.type.loc8_35.1: type = facet_type <@HasF, @HasF(%T.loc8_15.1)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.daf)] -// CHECK:STDOUT: %HasF.impl_witness.loc8_37.2: = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_37.2 (constants.%HasF.impl_witness)] +// CHECK:STDOUT: %HasF.type.loc8_34.1: type = facet_type <@HasF, @HasF(%T.loc8_15.1)> [symbolic = %HasF.type.loc8_34.1 (constants.%HasF.type.daf)] +// CHECK:STDOUT: %HasF.impl_witness.loc8_36.2: = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_36.2 (constants.%HasF.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %HasF.type.loc8_35.1 [symbolic = %require_complete (constants.%require_complete.513)] +// CHECK:STDOUT: %require_complete: = require_complete_type %HasF.type.loc8_34.1 [symbolic = %require_complete (constants.%require_complete.513)] // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc8_15.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type)] // CHECK:STDOUT: %T.as.HasF.impl.F: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = struct_value () [symbolic = %T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %T.ref.loc8_24 as %HasF.type.loc8_35.2 { +// CHECK:STDOUT: impl: %T.ref.loc8_23 as %HasF.type.loc8_34.2 { // CHECK:STDOUT: %T.as.HasF.impl.F.decl: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = fn_decl @T.as.HasF.impl.F [symbolic = @T.as.HasF.impl.%T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)] { // CHECK:STDOUT: %self.param_patt.loc9_15.1: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %self.param_patt.loc9_15.2 (constants.%self.param_patt.b7c)] // CHECK:STDOUT: %self.patt.loc9_15.1: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = at_binding_pattern self, %self.param_patt.loc9_15.1 [symbolic = %self.patt.loc9_15.2 (constants.%self.patt.7e4)] // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref.loc8_24 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref.loc8_23 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = wrapper_binding self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete] -// CHECK:STDOUT: %HasF.impl_witness.loc8_37.1: = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_37.2 (constants.%HasF.impl_witness)] +// CHECK:STDOUT: %HasF.impl_witness.loc8_36.1: = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_36.2 (constants.%HasF.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl -// CHECK:STDOUT: extend %HasF.type.loc8_35.2 -// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_37.1 +// CHECK:STDOUT: extend %HasF.type.loc8_34.2 +// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_36.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1792,7 +1792,7 @@ fn G(x: A) { // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_17.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.daf)) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_17.2: type, @HasF.%Self.loc4_25.1: @HasF.%HasF.type (%HasF.type.daf)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.daf)] // CHECK:STDOUT: %Self: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.822)] @@ -1840,7 +1840,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HasF.type => constants.%HasF.type.daf -// CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.822 +// CHECK:STDOUT: %Self.loc4_25.2 => constants.%Self.822 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HasF.WithSelf(constants.%T, constants.%Self.822) { @@ -1867,8 +1867,8 @@ fn G(x: A) { // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T) { // CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_15.1 => constants.%T -// CHECK:STDOUT: %HasF.type.loc8_35.1 => constants.%HasF.type.daf -// CHECK:STDOUT: %HasF.impl_witness.loc8_37.2 => constants.%HasF.impl_witness +// CHECK:STDOUT: %HasF.type.loc8_34.1 => constants.%HasF.type.daf +// CHECK:STDOUT: %HasF.impl_witness.loc8_36.2 => constants.%HasF.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.513 @@ -1910,7 +1910,7 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %HasF.type => constants.%HasF.type.5a7 -// CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.ad0 +// CHECK:STDOUT: %Self.loc4_25.2 => constants.%Self.ad0 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HasF.WithSelf(constants.%B, constants.%Self.822) { diff --git a/toolchain/check/testdata/impl/lookup/impl_cycle.carbon b/toolchain/check/testdata/impl/lookup/impl_cycle.carbon index 3205fca42dc7..1df01a1a2942 100644 --- a/toolchain/check/testdata/impl/lookup/impl_cycle.carbon +++ b/toolchain/check/testdata/impl/lookup/impl_cycle.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; interface Z {} // This creates a dependency cycle with itself. -impl forall [T:! Z] T as Z {} +impl forall [T: Z] T as Z {} class Point {} @@ -29,8 +29,8 @@ fn F() { // CHECK:STDERR: Point as Z; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: fail_impl_simple_cycle.carbon:[[@LINE-12]]:1: note: determining if this impl clause matches [ImplLookupCycleNote] - // CHECK:STDERR: impl forall [T:! Z] T as Z {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [T: Z] T as Z {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_impl_simple_cycle.carbon:[[@LINE+4]]:3: error: cannot convert type `Point` into type implementing `Z` [ConversionFailureTypeToFacet] // CHECK:STDERR: Point as Z; @@ -46,7 +46,7 @@ interface Y {} interface Z {} // This creates a dependency cycle with itself. -impl forall [T:! type where .Self impls Z] T as Z {} +impl forall [T: type where .Self impls Z] T as Z {} class Point {} @@ -55,8 +55,8 @@ fn F() { // CHECK:STDERR: Point as Z; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: fail_impl_simple_where_cycle.carbon:[[@LINE-8]]:1: note: determining if this impl clause matches [ImplLookupCycleNote] - // CHECK:STDERR: impl forall [T:! type where .Self impls Z] T as Z {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [T: type where .Self impls Z] T as Z {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_impl_simple_where_cycle.carbon:[[@LINE+4]]:3: error: cannot convert type `Point` into type implementing `Z` [ConversionFailureTypeToFacet] // CHECK:STDERR: Point as Z; @@ -72,7 +72,7 @@ interface Z {} interface Y {} // This creates a dependency cycle with itself. -impl forall [T:! Z & Y] T as Z {} +impl forall [T: Z & Y] T as Z {} class Point {} @@ -81,8 +81,8 @@ fn F() { // CHECK:STDERR: Point as Z; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: fail_impl_simple_two_interfaces.carbon:[[@LINE-8]]:1: note: determining if this impl clause matches [ImplLookupCycleNote] - // CHECK:STDERR: impl forall [T:! Z & Y] T as Z {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [T: Z & Y] T as Z {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_impl_simple_two_interfaces.carbon:[[@LINE+4]]:3: error: cannot convert type `Point` into type implementing `Z` [ConversionFailureTypeToFacet] // CHECK:STDERR: Point as Z; @@ -99,9 +99,9 @@ interface Y {} interface Z {} // This creates a dependency cycle with itself. -impl forall [T:! X] T as Y {} -impl forall [T:! Y] T as Z {} -impl forall [T:! Z] T as X {} +impl forall [T: X] T as Y {} +impl forall [T: Y] T as Z {} +impl forall [T: Z] T as X {} class C {} @@ -110,14 +110,14 @@ fn F() { // CHECK:STDERR: C as Z; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: fail_impl_long_cycle.carbon:[[@LINE-9]]:1: note: determining if this impl clause matches [ImplLookupCycleNote] - // CHECK:STDERR: impl forall [T:! Y] T as Z {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [T: Y] T as Z {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_long_cycle.carbon:[[@LINE-13]]:1: note: determining if this impl clause matches [ImplLookupCycleNote] - // CHECK:STDERR: impl forall [T:! X] T as Y {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [T: X] T as Y {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_long_cycle.carbon:[[@LINE-14]]:1: note: determining if this impl clause matches [ImplLookupCycleNote] - // CHECK:STDERR: impl forall [T:! Z] T as X {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [T: Z] T as X {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_impl_long_cycle.carbon:[[@LINE+4]]:3: error: cannot convert type `C` into type implementing `Z` [ConversionFailureTypeToFacet] // CHECK:STDERR: C as Z; @@ -129,34 +129,34 @@ fn F() { // --- fail_impl_cycle_one_generic_param.carbon library "[[@TEST_NAME]]"; -interface ComparableWith(T:! type) {} +interface ComparableWith(T: type) {} // This creates a dependency cycle with itself. -impl forall [U:! type, T:! ComparableWith(U)] +impl forall [U: type, T: ComparableWith(U)] U as ComparableWith(T) {} class C {} class D {} -fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {} +fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {} fn F() { // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE+17]]:3: error: cycle found in search for impl of `ComparableWith(C)` for type `C` [ImplLookupCycle] // CHECK:STDERR: Compare({} as C, {} as C); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-12]]:1: note: determining if this impl clause matches [ImplLookupCycleNote] - // CHECK:STDERR: impl forall [U:! type, T:! ComparableWith(U)] - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [U: type, T: ComparableWith(U)] + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-9]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE+7]]:3: error: cannot convert type `C` into type implementing `ComparableWith(C)` [ConversionFailureTypeToFacet] // CHECK:STDERR: Compare({} as C, {} as C); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-16]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Compare({} as C, {} as C); @@ -164,21 +164,21 @@ fn F() { // CHECK:STDERR: Compare({} as C, {} as D); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-31]]:1: note: determining if this impl clause matches [ImplLookupCycleNote] - // CHECK:STDERR: impl forall [U:! type, T:! ComparableWith(U)] - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [U: type, T: ComparableWith(U)] + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-34]]:1: note: determining if this impl clause matches [ImplLookupCycleNote] - // CHECK:STDERR: impl forall [U:! type, T:! ComparableWith(U)] - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [U: type, T: ComparableWith(U)] + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-31]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE+7]]:3: error: cannot convert type `D` into type implementing `ComparableWith(C)` [ConversionFailureTypeToFacet] // CHECK:STDERR: Compare({} as C, {} as D); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-38]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Compare({} as C, {} as D); @@ -186,21 +186,21 @@ fn F() { // CHECK:STDERR: Compare({} as D, {} as C); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-53]]:1: note: determining if this impl clause matches [ImplLookupCycleNote] - // CHECK:STDERR: impl forall [U:! type, T:! ComparableWith(U)] - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [U: type, T: ComparableWith(U)] + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-56]]:1: note: determining if this impl clause matches [ImplLookupCycleNote] - // CHECK:STDERR: impl forall [U:! type, T:! ComparableWith(U)] - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: impl forall [U: type, T: ComparableWith(U)] + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-53]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE+7]]:3: error: cannot convert type `C` into type implementing `ComparableWith(D)` [ConversionFailureTypeToFacet] // CHECK:STDERR: Compare({} as D, {} as C); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-60]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Compare({} as D, {} as C); } @@ -208,12 +208,12 @@ fn F() { // --- impl_recurse_with_simpler_type_no_cycle.carbon library "[[@TEST_NAME]]"; -class Wraps(T:! type) {} +class Wraps(T: type) {} interface Printable {} // If T is printable, so is Wraps(T). -impl forall [T:! Printable] Wraps(T) as Printable {} +impl forall [T: Printable] Wraps(T) as Printable {} class C {} impl C as Printable {} @@ -226,14 +226,14 @@ fn F() { // --- impl_recurse_with_simpler_type_in_generic_param_no_cycle.carbon library "[[@TEST_NAME]]"; -class Wraps(T:! type) {} +class Wraps(T: type) {} -interface ComparableTo(T:! type) {} +interface ComparableTo(T: type) {} // If U is comparable to T, then U is comparable to Wraps(T). -impl forall [T:! type, U:! ComparableTo(T)] U as ComparableTo(Wraps(T)) {} +impl forall [T: type, U: ComparableTo(T)] U as ComparableTo(Wraps(T)) {} // If U is comparable to T then Wraps(U) is comparable to T. -impl forall [T:! type, U:! ComparableTo(T)] Wraps(U) as ComparableTo(T) {} +impl forall [T: type, U: ComparableTo(T)] Wraps(U) as ComparableTo(T) {} class C {} class D {} @@ -250,9 +250,9 @@ fn F() { library "[[@TEST_NAME]]"; // Implement this for a type in one direction. -interface ComparableTo(T:! type) {} +interface ComparableTo(T: type) {} // Use this as a bound with two types in any direction. -interface ComparableWith(T:! type) {} +interface ComparableWith(T: type) {} class C {} class D {} @@ -266,27 +266,27 @@ impl C as ComparableTo(D) {} // overlap. // T is always ComparableWith(T). -impl forall [T:! type] T as ComparableWith(T) {} +impl forall [T: type] T as ComparableWith(T) {} // If U is ComparableTo(T), U is ComparableWith(T). // CHECK:STDERR: fail_todo_impl_recurse_with_simpler_type_in_generic_param_bidirectional_no_cycle.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure] -// CHECK:STDERR: impl forall [T:! type, U:! ComparableTo(T)] U as ComparableWith(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type, U: ComparableTo(T)] U as ComparableWith(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_impl_recurse_with_simpler_type_in_generic_param_bidirectional_no_cycle.carbon:[[@LINE-5]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote] -// CHECK:STDERR: impl forall [T:! type] T as ComparableWith(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] T as ComparableWith(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type, U:! ComparableTo(T)] U as ComparableWith(T) {} +impl forall [T: type, U: ComparableTo(T)] U as ComparableWith(T) {} // If U is ComparableTo(T), T is ComparableWith(U). // CHECK:STDERR: fail_todo_impl_recurse_with_simpler_type_in_generic_param_bidirectional_no_cycle.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure] -// CHECK:STDERR: impl forall [T:! type, U:! ComparableTo(T)] T as ComparableWith(U) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type, U: ComparableTo(T)] T as ComparableWith(U) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_impl_recurse_with_simpler_type_in_generic_param_bidirectional_no_cycle.carbon:[[@LINE-14]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote] -// CHECK:STDERR: impl forall [T:! type] T as ComparableWith(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] T as ComparableWith(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type, U:! ComparableTo(T)] T as ComparableWith(U) {} +impl forall [T: type, U: ComparableTo(T)] T as ComparableWith(U) {} -fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {} +fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {} fn F() { Compare({} as C, {} as C); @@ -303,8 +303,8 @@ interface Second {} // When answering a query "does T impl Second", we must avoid trying to deduce // parameters for this impl. Not only is doing so unnecessary, it would start a new // "does T impl Second" query, leading to a "cycle in impl lookup" error. -impl forall [T:! Second] T as First {} -impl forall [T:! type] T as Second {} +impl forall [T: Second] T as First {} +impl forall [T: type] T as Second {} class C {} @@ -316,14 +316,14 @@ fn F() { // --- deduce_cycle_with_symbolic.carbon library "[[@TEST_NAME]]"; -interface First(T:! type) {} +interface First(T: type) {} interface Second {} // When answering a query "does T impl Second", we must avoid trying to deduce // parameters for this impl. Not only is doing so unnecessary, it would start a new // "does T impl Second" query, leading to a "cycle in impl lookup" error. -impl forall [T:! Second, U:! type] T as First(U) {} -impl forall [T:! type] T as Second {} +impl forall [T: Second, U: type] T as First(U) {} +impl forall [T: type] T as Second {} class C {} diff --git a/toolchain/check/testdata/impl/lookup/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/impl_forall.carbon index 560e9add73fa..9d59c05c98fe 100644 --- a/toolchain/check/testdata/impl/lookup/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/impl_forall.carbon @@ -13,23 +13,23 @@ // --- impl_forall.carbon library "[[@TEST_NAME]]"; -class A(T:! type) { +class A(T: type) { var n: T; } -interface I(U:! type) { +interface I(U: type) { fn F(ref self) -> U*; } //@dump-sem-ir-begin -impl forall [V:! type] A(V) as I(V) { +impl forall [V: type] A(V) as I(V) { fn F(ref self) -> V* { return &self.n; } } //@dump-sem-ir-end -fn TestGeneric[W:! type](a: A(W)*) -> W* { +fn TestGeneric[W: type](a: A(W)*) -> W* { //@dump-sem-ir-begin return a->(I(W).F)(); //@dump-sem-ir-end @@ -158,14 +158,14 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %V.patt.loc12_15.1: %pattern_type.98f = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc12_15.2 (constants.%V.patt.d47)] // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A.generic] -// CHECK:STDOUT: %V.ref.loc12_26: type = name_ref V, %V.loc12_15.2 [symbolic = %V.loc12_15.1 (constants.%V.67d)] -// CHECK:STDOUT: %A.loc12_27.2: type = class_type @A, @A(constants.%V.67d) [symbolic = %A.loc12_27.1 (constants.%A.47a1de.2)] +// CHECK:STDOUT: %V.ref.loc12_25: type = name_ref V, %V.loc12_15.2 [symbolic = %V.loc12_15.1 (constants.%V.67d)] +// CHECK:STDOUT: %A.loc12_26.2: type = class_type @A, @A(constants.%V.67d) [symbolic = %A.loc12_26.1 (constants.%A.47a1de.2)] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] -// CHECK:STDOUT: %V.ref.loc12_34: type = name_ref V, %V.loc12_15.2 [symbolic = %V.loc12_15.1 (constants.%V.67d)] -// CHECK:STDOUT: %I.type.loc12_35.2: type = facet_type <@I, @I(constants.%V.67d)> [symbolic = %I.type.loc12_35.1 (constants.%I.type.3fe556.2)] -// CHECK:STDOUT: %.loc12_18.1: type = splice_block %.loc12_18.2 [concrete = type] { +// CHECK:STDOUT: %V.ref.loc12_33: type = name_ref V, %V.loc12_15.2 [symbolic = %V.loc12_15.1 (constants.%V.67d)] +// CHECK:STDOUT: %I.type.loc12_34.2: type = facet_type <@I, @I(constants.%V.67d)> [symbolic = %I.type.loc12_34.1 (constants.%I.type.3fe556.2)] +// CHECK:STDOUT: %.loc12_17.1: type = splice_block %.loc12_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %V.loc12_15.2: type = symbolic_binding V, 0 [symbolic = %V.loc12_15.1 (constants.%V.67d)] // CHECK:STDOUT: } @@ -174,16 +174,16 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: generic impl @A.as.I.impl(%V.loc12_15.2: type) { // CHECK:STDOUT: %V.patt.loc12_15.2: %pattern_type.98f = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc12_15.2 (constants.%V.patt.d47)] // CHECK:STDOUT: %V.loc12_15.1: type = symbolic_binding V, 0 [symbolic = %V.loc12_15.1 (constants.%V.67d)] -// CHECK:STDOUT: %A.loc12_27.1: type = class_type @A, @A(%V.loc12_15.1) [symbolic = %A.loc12_27.1 (constants.%A.47a1de.2)] -// CHECK:STDOUT: %I.type.loc12_35.1: type = facet_type <@I, @I(%V.loc12_15.1)> [symbolic = %I.type.loc12_35.1 (constants.%I.type.3fe556.2)] -// CHECK:STDOUT: %I.impl_witness.loc12_37.2: = impl_witness %I.impl_witness_table, @A.as.I.impl(%V.loc12_15.1) [symbolic = %I.impl_witness.loc12_37.2 (constants.%I.impl_witness.25d8bb.1)] +// CHECK:STDOUT: %A.loc12_26.1: type = class_type @A, @A(%V.loc12_15.1) [symbolic = %A.loc12_26.1 (constants.%A.47a1de.2)] +// CHECK:STDOUT: %I.type.loc12_34.1: type = facet_type <@I, @I(%V.loc12_15.1)> [symbolic = %I.type.loc12_34.1 (constants.%I.type.3fe556.2)] +// CHECK:STDOUT: %I.impl_witness.loc12_36.2: = impl_witness %I.impl_witness_table, @A.as.I.impl(%V.loc12_15.1) [symbolic = %I.impl_witness.loc12_36.2 (constants.%I.impl_witness.25d8bb.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc12_35.1 [symbolic = %require_complete (constants.%require_complete.45eab2.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc12_34.1 [symbolic = %require_complete (constants.%require_complete.45eab2.1)] // CHECK:STDOUT: %A.as.I.impl.F.type: type = fn_type @A.as.I.impl.F, @A.as.I.impl(%V.loc12_15.1) [symbolic = %A.as.I.impl.F.type (constants.%A.as.I.impl.F.type.d1ec9e.1)] // CHECK:STDOUT: %A.as.I.impl.F: @A.as.I.impl.%A.as.I.impl.F.type (%A.as.I.impl.F.type.d1ec9e.1) = struct_value () [symbolic = %A.as.I.impl.F (constants.%A.as.I.impl.F.d83bf5.1)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %A.loc12_27.2 as %I.type.loc12_35.2 { +// CHECK:STDOUT: impl: %A.loc12_26.2 as %I.type.loc12_34.2 { // CHECK:STDOUT: %A.as.I.impl.F.decl: @A.as.I.impl.%A.as.I.impl.F.type (%A.as.I.impl.F.type.d1ec9e.1) = fn_decl @A.as.I.impl.F [symbolic = @A.as.I.impl.%A.as.I.impl.F (constants.%A.as.I.impl.F.d83bf5.1)] { // CHECK:STDOUT: %self.param_patt.loc13_12.1: @A.as.I.impl.F.%pattern_type.loc13_12 (%pattern_type.44a178.1) = ref_param_pattern [symbolic = %self.param_patt.loc13_12.2 (constants.%self.param_patt.a903c4.1)] // CHECK:STDOUT: %self.patt.loc13_12.1: @A.as.I.impl.F.%pattern_type.loc13_12 (%pattern_type.44a178.1) = at_binding_pattern self, %self.param_patt.loc13_12.1 [symbolic = %self.patt.loc13_12.2 (constants.%self.patt.4f0789.1)] @@ -194,19 +194,19 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %ptr.loc13_22.2: type = ptr_type %V.ref [symbolic = %ptr.loc13_22.1 (constants.%ptr.e8f8f9.2)] // CHECK:STDOUT: %.loc13_22.2: Core.Form = init_form %ptr.loc13_22.2 [symbolic = %.loc13_22.1 (constants.%.cb6cb9.2)] // CHECK:STDOUT: %self.param: ref @A.as.I.impl.F.%A (%A.47a1de.2) = ref_param call_param0 -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @A.as.I.impl.%A.loc12_27.2 [symbolic = %A (constants.%A.47a1de.2)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @A.as.I.impl.%A.loc12_26.2 [symbolic = %A (constants.%A.47a1de.2)] // CHECK:STDOUT: %self: ref @A.as.I.impl.F.%A (%A.47a1de.2) = wrapper_binding self, %self.param // CHECK:STDOUT: %return.param: ref @A.as.I.impl.F.%ptr.loc13_22.1 (%ptr.e8f8f9.2) = out_param call_param1 // CHECK:STDOUT: %return: ref @A.as.I.impl.F.%ptr.loc13_22.1 (%ptr.e8f8f9.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%A.as.I.impl.F.decl), @A.as.I.impl [concrete] -// CHECK:STDOUT: %I.impl_witness.loc12_37.1: = impl_witness %I.impl_witness_table, @A.as.I.impl(constants.%V.67d) [symbolic = %I.impl_witness.loc12_37.2 (constants.%I.impl_witness.25d8bb.1)] +// CHECK:STDOUT: %I.impl_witness.loc12_36.1: = impl_witness %I.impl_witness_table, @A.as.I.impl(constants.%V.67d) [symbolic = %I.impl_witness.loc12_36.2 (constants.%I.impl_witness.25d8bb.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .V = // CHECK:STDOUT: .F = %A.as.I.impl.F.decl -// CHECK:STDOUT: extend %I.type.loc12_35.2 -// CHECK:STDOUT: witness = %I.impl_witness.loc12_37.1 +// CHECK:STDOUT: extend %I.type.loc12_34.2 +// CHECK:STDOUT: witness = %I.impl_witness.loc12_36.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -265,27 +265,27 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%W.loc19_17.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.b71f2b.3)] // CHECK:STDOUT: %assoc0: @TestGeneric.%I.assoc_type (%I.assoc_type.b71f2b.3) = assoc_entity element0, @I.WithSelf.%I.WithSelf.F.decl [symbolic = %assoc0 (constants.%assoc0.13b5f8.3)] // CHECK:STDOUT: %.loc21_11.2: require_specific_def_type = require_specific_def @A.as.I.impl(%W.loc19_17.1) [symbolic = %.loc21_11.2 (constants.%.346)] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %A.loc19_32.1, @I, @I(%W.loc19_17.1) [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %I.facet: @TestGeneric.%I.type.loc21_17.2 (%I.type.3fe556.3) = facet_value %A.loc19_32.1, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet.3c2)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %A.loc19_31.1, @I, @I(%W.loc19_17.1) [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %I.facet: @TestGeneric.%I.type.loc21_17.2 (%I.type.3fe556.3) = facet_value %A.loc19_31.1, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet.3c2)] // CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I.WithSelf(%W.loc19_17.1, %I.facet) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.52e)] // CHECK:STDOUT: %.loc21_11.3: type = fn_type_with_self_type %I.WithSelf.F.type, %I.facet [symbolic = %.loc21_11.3 (constants.%.72b)] // CHECK:STDOUT: %impl.elem0.loc21_11.2: @TestGeneric.%.loc21_11.3 (%.72b) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.089)] // CHECK:STDOUT: %specific_impl_fn.loc21_11.2: = specific_impl_function %impl.elem0.loc21_11.2, @I.WithSelf.F(%W.loc19_17.1, %I.facet) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.250)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @TestGeneric.%ptr.loc19_33.1 (%ptr.5ab)) -> out %return.param: @TestGeneric.%ptr.loc19_40.1 (%ptr.e8f8f9.4) { +// CHECK:STDOUT: fn(%a.param: @TestGeneric.%ptr.loc19_32.1 (%ptr.5ab)) -> out %return.param: @TestGeneric.%ptr.loc19_39.1 (%ptr.e8f8f9.4) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: @TestGeneric.%ptr.loc19_33.1 (%ptr.5ab) = name_ref a, %a +// CHECK:STDOUT: %a.ref: @TestGeneric.%ptr.loc19_32.1 (%ptr.5ab) = name_ref a, %a // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %W.ref.loc21: type = name_ref W, %W.loc19_17.2 [symbolic = %W.loc19_17.1 (constants.%W)] // CHECK:STDOUT: %I.type.loc21_17.1: type = facet_type <@I, @I(constants.%W)> [symbolic = %I.type.loc21_17.2 (constants.%I.type.3fe556.3)] // CHECK:STDOUT: %.loc21_18: @TestGeneric.%I.assoc_type (%I.assoc_type.b71f2b.3) = specific_constant @I.WithSelf.%assoc0.loc8_23.1, @I.WithSelf(constants.%W, constants.%Self.1916c4.1) [symbolic = %assoc0 (constants.%assoc0.13b5f8.3)] // CHECK:STDOUT: %F.ref: @TestGeneric.%I.assoc_type (%I.assoc_type.b71f2b.3) = name_ref F, %.loc21_18 [symbolic = %assoc0 (constants.%assoc0.13b5f8.3)] -// CHECK:STDOUT: %.loc21_11.1: ref @TestGeneric.%A.loc19_32.1 (%A.47a1de.3) = deref %a.ref +// CHECK:STDOUT: %.loc21_11.1: ref @TestGeneric.%A.loc19_31.1 (%A.47a1de.3) = deref %a.ref // CHECK:STDOUT: %impl.elem0.loc21_11.1: @TestGeneric.%.loc21_11.3 (%.72b) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.089)] // CHECK:STDOUT: %bound_method.loc21_11: = bound_method %.loc21_11.1, %impl.elem0.loc21_11.1 // CHECK:STDOUT: %specific_impl_fn.loc21_11.1: = specific_impl_function %impl.elem0.loc21_11.1, @I.WithSelf.F(constants.%W, constants.%I.facet.3c2) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.250)] // CHECK:STDOUT: %bound_method.loc21_22: = bound_method %.loc21_11.1, %specific_impl_fn.loc21_11.1 -// CHECK:STDOUT: %I.WithSelf.F.call: init @TestGeneric.%ptr.loc19_40.1 (%ptr.e8f8f9.4) = call %bound_method.loc21_22(%.loc21_11.1) +// CHECK:STDOUT: %I.WithSelf.F.call: init @TestGeneric.%ptr.loc19_39.1 (%ptr.e8f8f9.4) = call %bound_method.loc21_22(%.loc21_11.1) // CHECK:STDOUT: return %I.WithSelf.F.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -315,9 +315,9 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: specific @A.as.I.impl(constants.%V.67d) { // CHECK:STDOUT: %V.patt.loc12_15.2 => constants.%V.patt.d47 // CHECK:STDOUT: %V.loc12_15.1 => constants.%V.67d -// CHECK:STDOUT: %A.loc12_27.1 => constants.%A.47a1de.2 -// CHECK:STDOUT: %I.type.loc12_35.1 => constants.%I.type.3fe556.2 -// CHECK:STDOUT: %I.impl_witness.loc12_37.2 => constants.%I.impl_witness.25d8bb.1 +// CHECK:STDOUT: %A.loc12_26.1 => constants.%A.47a1de.2 +// CHECK:STDOUT: %I.type.loc12_34.1 => constants.%I.type.3fe556.2 +// CHECK:STDOUT: %I.impl_witness.loc12_36.2 => constants.%I.impl_witness.25d8bb.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.45eab2.1 @@ -341,24 +341,24 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: specific @TestGeneric(constants.%W) { // CHECK:STDOUT: %W.patt.loc19_17.2 => constants.%W.patt // CHECK:STDOUT: %W.loc19_17.1 => constants.%W -// CHECK:STDOUT: %A.loc19_32.1 => constants.%A.47a1de.3 -// CHECK:STDOUT: %ptr.loc19_33.1 => constants.%ptr.5ab -// CHECK:STDOUT: %pattern_type.loc19_27 => constants.%pattern_type.c61 -// CHECK:STDOUT: %a.param_patt.loc19_27.2 => constants.%a.param_patt.537 -// CHECK:STDOUT: %a.patt.loc19_27.2 => constants.%a.patt.60b -// CHECK:STDOUT: %ptr.loc19_40.1 => constants.%ptr.e8f8f9.4 -// CHECK:STDOUT: %.loc19_40.1 => constants.%.cb6cb9.4 -// CHECK:STDOUT: %pattern_type.loc19_40 => constants.%pattern_type.4f4b84.4 -// CHECK:STDOUT: %return.param_patt.loc19_40.2 => constants.%return.param_patt.27f587.4 -// CHECK:STDOUT: %return.patt.loc19_36.2 => constants.%return.patt.d67681.3 +// CHECK:STDOUT: %A.loc19_31.1 => constants.%A.47a1de.3 +// CHECK:STDOUT: %ptr.loc19_32.1 => constants.%ptr.5ab +// CHECK:STDOUT: %pattern_type.loc19_26 => constants.%pattern_type.c61 +// CHECK:STDOUT: %a.param_patt.loc19_26.2 => constants.%a.param_patt.537 +// CHECK:STDOUT: %a.patt.loc19_26.2 => constants.%a.patt.60b +// CHECK:STDOUT: %ptr.loc19_39.1 => constants.%ptr.e8f8f9.4 +// CHECK:STDOUT: %.loc19_39.1 => constants.%.cb6cb9.4 +// CHECK:STDOUT: %pattern_type.loc19_39 => constants.%pattern_type.4f4b84.4 +// CHECK:STDOUT: %return.param_patt.loc19_39.2 => constants.%return.param_patt.27f587.4 +// CHECK:STDOUT: %return.patt.loc19_35.2 => constants.%return.patt.d67681.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.as.I.impl(constants.%W) { // CHECK:STDOUT: %V.patt.loc12_15.2 => constants.%V.patt.d47 // CHECK:STDOUT: %V.loc12_15.1 => constants.%W -// CHECK:STDOUT: %A.loc12_27.1 => constants.%A.47a1de.3 -// CHECK:STDOUT: %I.type.loc12_35.1 => constants.%I.type.3fe556.3 -// CHECK:STDOUT: %I.impl_witness.loc12_37.2 => constants.%I.impl_witness.25d8bb.2 +// CHECK:STDOUT: %A.loc12_26.1 => constants.%A.47a1de.3 +// CHECK:STDOUT: %I.type.loc12_34.1 => constants.%I.type.3fe556.3 +// CHECK:STDOUT: %I.impl_witness.loc12_36.2 => constants.%I.impl_witness.25d8bb.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.45eab2.2 @@ -369,9 +369,9 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: specific @A.as.I.impl(constants.%empty_struct_type) { // CHECK:STDOUT: %V.patt.loc12_15.2 => constants.%V.patt.d47 // CHECK:STDOUT: %V.loc12_15.1 => constants.%empty_struct_type -// CHECK:STDOUT: %A.loc12_27.1 => constants.%A.940 -// CHECK:STDOUT: %I.type.loc12_35.1 => constants.%I.type.81d -// CHECK:STDOUT: %I.impl_witness.loc12_37.2 => constants.%I.impl_witness.e69 +// CHECK:STDOUT: %A.loc12_26.1 => constants.%A.940 +// CHECK:STDOUT: %I.type.loc12_34.1 => constants.%I.type.81d +// CHECK:STDOUT: %I.impl_witness.loc12_36.2 => constants.%I.impl_witness.e69 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.7da diff --git a/toolchain/check/testdata/impl/lookup/impl_overlap.carbon b/toolchain/check/testdata/impl/lookup/impl_overlap.carbon index f609646512a5..19520852daa2 100644 --- a/toolchain/check/testdata/impl/lookup/impl_overlap.carbon +++ b/toolchain/check/testdata/impl/lookup/impl_overlap.carbon @@ -17,23 +17,23 @@ // --- interface_z.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} // --- interface_z_with_impl.carbon library "[[@TEST_NAME]]"; // Add an extra unused interface to bump `Z`'s id up so that it doesn't // accidentally match the id assigned to the imported copy of `Z`. -interface Other(T:! type) {} +interface Other(T: type) {} -interface Z(T:! type) {} +interface Z(T: type) {} -final impl forall [T:! type] T as Z(T) {} +final impl forall [T: type] T as Z(T) {} // --- type_d.carbon library "[[@TEST_NAME]]"; -class D(T:! type) {} +class D(T: type) {} // ============================================================================ // Test files @@ -44,7 +44,7 @@ library "[[@TEST_NAME]]"; interface Z {} -final impl forall [T:! type] T as Z {} +final impl forall [T: type] T as Z {} // --- final_impl_with_interface_concrete_self_same_file.carbon library "[[@TEST_NAME]]"; @@ -86,26 +86,26 @@ interface Z {} // The root self type is from another file, but the interface is from this file. // This tests the self type being a symbolic type due to the type parameter T. -final impl forall [T:! type] D(T) as Z {} +final impl forall [T: type] D(T) as Z {} // --- fail_multiple_finals_overlap_with_interface.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} -final impl forall [T:! type] T as Z(T) {} +final impl forall [T: type] T as Z(T) {} // The final impl here overlaps with the final impl above, but is not in a // match_first. // // CHECK:STDERR: fail_multiple_finals_overlap_with_interface.carbon:[[@LINE+7]]:1: error: `final impl` overlaps with `final impl` from same file outside a `match_first` block [FinalImplOverlapsSameFile] -// CHECK:STDERR: final impl forall [T:! type] T as Z(()) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_multiple_finals_overlap_with_interface.carbon:[[@LINE-8]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote] -// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {} +// CHECK:STDERR: final impl forall [T: type] T as Z(()) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_multiple_finals_overlap_with_interface.carbon:[[@LINE-8]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote] +// CHECK:STDERR: final impl forall [T: type] T as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -final impl forall [T:! type] T as Z(()) {} +final impl forall [T: type] T as Z(()) {} class C {} @@ -116,8 +116,8 @@ class C {} // CHECK:STDERR: final impl C as Z({}) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_multiple_finals_overlap_with_interface.carbon:[[@LINE-22]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote] -// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: final impl forall [T: type] T as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: final impl C as Z({}) {} @@ -134,13 +134,13 @@ final impl C as Z(()) {} // a match_first. // // CHECK:STDERR: fail_multiple_finals_overlap_with_self_type.carbon:[[@LINE+7]]:1: error: `final impl` overlaps with `final impl` from same file outside a `match_first` block [FinalImplOverlapsSameFile] -// CHECK:STDERR: final impl forall [T:! type] C as Z(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: final impl forall [T: type] C as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_multiple_finals_overlap_with_self_type.carbon:[[@LINE-8]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote] // CHECK:STDERR: final impl C as Z(()) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -final impl forall [T:! type] C as Z(T) {} +final impl forall [T: type] C as Z(T) {} // --- multiple_finals_with_nonoverlapping_with_interface.carbon library "[[@TEST_NAME]]"; @@ -171,11 +171,11 @@ library "[[@TEST_NAME]]"; import library "interface_z"; -class C(T:! type) {} +class C(T: type) {} // Can provide a specialized final blanket impl for a type defined in the same // file. -final impl forall [T:! type] C(T) as Z(T) {} +final impl forall [T: type] C(T) as Z(T) {} // --- fail_final_impl_with_both_interface_and_self_but_different_files.carbon library "[[@TEST_NAME]]"; @@ -192,8 +192,8 @@ class C {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_final_impl_with_both_interface_and_self_but_different_files.carbon:[[@LINE-10]]:1: in import [InImport] // CHECK:STDERR: interface_z_with_impl.carbon:9:1: note: imported `final impl` here [FinalImplOverlapsDifferentFileNote] -// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: final impl forall [T: type] T as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: final impl C as Z(()) {} @@ -212,8 +212,8 @@ class C {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_final_overlaps_final_from_other_file.carbon:[[@LINE-10]]:1: in import [InImport] // CHECK:STDERR: interface_z_with_impl.carbon:9:1: note: imported `final impl` here [FinalImplOverlapsDifferentFileNote] -// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: final impl forall [T: type] T as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: final impl C as Z(C) {} @@ -231,8 +231,8 @@ class C {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_final_overlaps_non_final_from_other_file.carbon:[[@LINE-9]]:1: in import [InImport] // CHECK:STDERR: interface_z_with_impl.carbon:9:1: note: `final impl` declared here would always be used instead [ImplFinalOverlapsNonFinalNote] -// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: final impl forall [T: type] T as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: impl C as Z(C) {} @@ -280,15 +280,15 @@ class C {} // the interface. // // CHECK:STDERR: fail_final_different_file_from_self_and_interface_with_generic_self.carbon:[[@LINE+4]]:1: error: `final impl` found in file that does not contain the root self type nor the interface definition [FinalImplInvalidFile] -// CHECK:STDERR: final impl forall [T:! type] T as Z(C) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: final impl forall [T: type] T as Z(C) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -final impl forall [T:! type] T as Z(C) {} +final impl forall [T: type] T as Z(C) {} // --- fail_final_overlaps_earlier_non_final_impl.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} // CHECK:STDERR: fail_final_overlaps_earlier_non_final_impl.carbon:[[@LINE+3]]:1: error: `impl` will never be used [ImplFinalOverlapsNonFinal] // CHECK:STDERR: impl () as Z(()) {} @@ -296,84 +296,84 @@ interface Z(T:! type) {} impl () as Z(()) {} // CHECK:STDERR: fail_final_overlaps_earlier_non_final_impl.carbon:[[@LINE+4]]:1: note: `final impl` declared here would always be used instead [ImplFinalOverlapsNonFinalNote] -// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: final impl forall [T: type] T as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -final impl forall [T:! type] T as Z(T) {} +final impl forall [T: type] T as Z(T) {} // --- fail_final_overlaps_later_non_final_impl.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} -final impl forall [T:! type] T as Z(T) {} +final impl forall [T: type] T as Z(T) {} // CHECK:STDERR: fail_final_overlaps_later_non_final_impl.carbon:[[@LINE+7]]:1: error: `impl` will never be used [ImplFinalOverlapsNonFinal] // CHECK:STDERR: impl () as Z(()) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_final_overlaps_later_non_final_impl.carbon:[[@LINE-5]]:1: note: `final impl` declared here would always be used instead [ImplFinalOverlapsNonFinalNote] -// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: final impl forall [T: type] T as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: impl () as Z(()) {} // --- fail_final_overlaps_earlier_final_impl.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} class C {} final impl C as Z(C) {} // CHECK:STDERR: fail_final_overlaps_earlier_final_impl.carbon:[[@LINE+7]]:1: error: `final impl` overlaps with `final impl` from same file outside a `match_first` block [FinalImplOverlapsSameFile] -// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: final impl forall [T: type] T as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_final_overlaps_earlier_final_impl.carbon:[[@LINE-5]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote] // CHECK:STDERR: final impl C as Z(C) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -final impl forall [T:! type] T as Z(T) {} +final impl forall [T: type] T as Z(T) {} // --- fail_final_overlaps_later_final_impl.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} class C {} -final impl forall [T:! type] T as Z(T) {} +final impl forall [T: type] T as Z(T) {} // CHECK:STDERR: fail_final_overlaps_later_final_impl.carbon:[[@LINE+7]]:1: error: `final impl` overlaps with `final impl` from same file outside a `match_first` block [FinalImplOverlapsSameFile] // CHECK:STDERR: final impl C as Z(C) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_final_overlaps_later_final_impl.carbon:[[@LINE-5]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote] -// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: final impl forall [T: type] T as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: final impl C as Z(C) {} // --- fail_non_final_type_structure_matches_non_final_impl.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} interface Y {} -impl forall [T:! Y] T as Z(T) {} +impl forall [T: Y] T as Z(T) {} -class C(T:! type); +class C(T: type); // No diagnosis here as the type structure is unique. -impl forall [T:! type] T as Z(C(T)) {} +impl forall [T: type] T as Z(C(T)) {} // CHECK:STDERR: fail_non_final_type_structure_matches_non_final_impl.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure] -// CHECK:STDERR: impl forall [T:! type] T as Z(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] T as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_non_final_type_structure_matches_non_final_impl.carbon:[[@LINE-10]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote] -// CHECK:STDERR: impl forall [T:! Y] T as Z(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: Y] T as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] T as Z(T) {} +impl forall [T: type] T as Z(T) {} // --- non_final_type_structure_same_shape_but_different_concrete_types.carbon library "[[@TEST_NAME]]"; @@ -389,9 +389,9 @@ impl D as Z {} // --- partial_overlap_type_structure_of_non_final_impl.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} -impl forall [T:! type] T as Z(T) {} +impl forall [T: type] T as Z(T) {} class C {} // Partially overlaps the blanket impl, which is fine. @@ -403,20 +403,20 @@ impl D as Z(D) {} // --- fail_final_overlap_where_each_is_more_specific_than_the_other.carbon -interface Z(T:! type) {} +interface Z(T: type) {} -class C(T:! type) {} +class C(T: type) {} // This should be diagnosed as overlapping final impls outside a `match_first`. // The first impl is more specific in the interface constraint. The second is // more specific in the self type. They overlap for the query `C(()) as Z(())` // but neither impl is completely more specific than the other. -final impl forall [T:! type] C(T) as Z(()) {} +final impl forall [T: type] C(T) as Z(()) {} // CHECK:STDERR: fail_final_overlap_where_each_is_more_specific_than_the_other.carbon:[[@LINE+7]]:1: error: `final impl` overlaps with `final impl` from same file outside a `match_first` block [FinalImplOverlapsSameFile] -// CHECK:STDERR: final impl forall [T:! type] C(()) as Z(T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: final impl forall [T: type] C(()) as Z(T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_final_overlap_where_each_is_more_specific_than_the_other.carbon:[[@LINE-4]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote] -// CHECK:STDERR: final impl forall [T:! type] C(T) as Z(()) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: final impl forall [T: type] C(T) as Z(()) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -final impl forall [T:! type] C(()) as Z(T) {} +final impl forall [T: type] C(()) as Z(T) {} diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index 573fc13d0503..49864a3e6f77 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -123,7 +123,7 @@ fn J() { package PackageHasParam; -class AnyParam[T:! type](X:! T) {} +class AnyParam[T: type](X: T) {} interface Y { fn K(unused self) {} @@ -135,7 +135,7 @@ package PackageGenericInterface; import PackageHasParam; -interface GenericInterface(U:! type) {} +interface GenericInterface(U: type) {} impl PackageHasParam.AnyParam(GenericInterface) as PackageHasParam.Y { fn K(unused self) {} @@ -165,7 +165,7 @@ package PackageGenericClass; import PackageHasParam; -class GenericClass(U:! type) {} +class GenericClass(U: type) {} impl PackageHasParam.AnyParam(GenericClass) as PackageHasParam.Y { fn K(unused self) {} @@ -201,7 +201,7 @@ interface Extra6 {} interface Extra7 {} interface Extra8 {} -class C(T:! type) {} +class C(T: type) {} interface I { fn F(self); } impl C((Extra1, Extra2, Extra3, Extra4, Extra5, Extra6, Extra7, Extra8)) as I { @@ -1670,18 +1670,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %AnyParam.decl: %AnyParam.type = class_decl @AnyParam [concrete = constants.%AnyParam.generic] { // CHECK:STDOUT: %T.patt.loc4_17.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)] -// CHECK:STDOUT: %X.patt.loc4_27.1: @AnyParam.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc4_27.2 (constants.%X.patt)] +// CHECK:STDOUT: %X.patt.loc4_26.1: @AnyParam.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc4_26.2 (constants.%X.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc4_17: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_17.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] -// CHECK:STDOUT: %.loc4_30: type = splice_block %T.ref [symbolic = %T.loc4_17.1 (constants.%T)] { -// CHECK:STDOUT: %.Self.frozen.loc4_27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_28: type = splice_block %T.ref [symbolic = %T.loc4_17.1 (constants.%T)] { +// CHECK:STDOUT: %.Self.frozen.loc4_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_17.2 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %X.loc4_27.2: @AnyParam.%T.loc4_17.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc4_27.1 (constants.%X)] +// CHECK:STDOUT: %X.loc4_26.2: @AnyParam.%T.loc4_17.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc4_26.1 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: %Y.decl: type = interface_decl @Y [concrete = constants.%Y.type] {} {} // CHECK:STDOUT: } @@ -1715,12 +1715,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @AnyParam(%T.loc4_17.2: type, %X.loc4_27.2: @AnyParam.%T.loc4_17.1 (%T)) { +// CHECK:STDOUT: generic class @AnyParam(%T.loc4_17.2: type, %X.loc4_26.2: @AnyParam.%T.loc4_17.1 (%T)) { // CHECK:STDOUT: %T.patt.loc4_17.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc4_17.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_17.1 [symbolic = %pattern_type (constants.%pattern_type.51d)] -// CHECK:STDOUT: %X.patt.loc4_27.2: @AnyParam.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc4_27.2 (constants.%X.patt)] -// CHECK:STDOUT: %X.loc4_27.1: @AnyParam.%T.loc4_17.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc4_27.1 (constants.%X)] +// CHECK:STDOUT: %X.patt.loc4_26.2: @AnyParam.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc4_26.2 (constants.%X.patt)] +// CHECK:STDOUT: %X.loc4_26.1: @AnyParam.%T.loc4_17.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc4_26.1 (constants.%X)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1755,8 +1755,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%T.patt // CHECK:STDOUT: %T.loc4_17.1 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %X.patt.loc4_27.2 => constants.%X.patt -// CHECK:STDOUT: %X.loc4_27.1 => constants.%X +// CHECK:STDOUT: %X.patt.loc4_26.2 => constants.%X.patt +// CHECK:STDOUT: %X.loc4_26.1 => constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Y.WithSelf(constants.%Self) { @@ -1843,10 +1843,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: import PackageHasParam//default // CHECK:STDOUT: } // CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic] -// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_32, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageHasParam.import_ref.527 = import_ref PackageHasParam//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T)] -// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_27, loaded [symbolic = @AnyParam.%X (constants.%X)] +// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] // CHECK:STDOUT: %PackageHasParam.import_ref.03c: %Y.assoc_type = import_ref PackageHasParam//default, loc7_21, loaded [concrete = constants.%assoc0.970] // CHECK:STDOUT: %PackageHasParam.K: @Y.WithSelf.%Y.WithSelf.K.type (%Y.WithSelf.K.type.977) = import_ref PackageHasParam//default, K, loaded [symbolic = @Y.WithSelf.%Y.WithSelf.K (constants.%Y.WithSelf.K.d2d)] @@ -1868,9 +1868,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.cd1 = interface_decl @GenericInterface [concrete = constants.%GenericInterface.generic] { // CHECK:STDOUT: %U.patt.loc6_29.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_29.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_32.1: type = splice_block %.loc6_32.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_32.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_31.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc6_29.2: type = symbolic_binding U, 0 [symbolic = %U.loc6_29.1 (constants.%U)] // CHECK:STDOUT: } @@ -1891,14 +1891,14 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GenericInterface.type: type = facet_type <@GenericInterface, @GenericInterface(%U.loc6_29.1)> [symbolic = %GenericInterface.type (constants.%GenericInterface.type.48f)] -// CHECK:STDOUT: %Self.loc6_38.2: @GenericInterface.%GenericInterface.type (%GenericInterface.type.48f) = symbolic_binding Self, 1 [symbolic = %Self.loc6_38.2 (constants.%Self.19b)] +// CHECK:STDOUT: %Self.loc6_37.2: @GenericInterface.%GenericInterface.type (%GenericInterface.type.48f) = symbolic_binding Self, 1 [symbolic = %Self.loc6_37.2 (constants.%Self.19b)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc6_38.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.48f) = symbolic_binding Self, 1 [symbolic = %Self.loc6_38.2 (constants.%Self.19b)] +// CHECK:STDOUT: %Self.loc6_37.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.48f) = symbolic_binding Self, 1 [symbolic = %Self.loc6_37.2 (constants.%Self.19b)] // CHECK:STDOUT: %GenericInterface.WithSelf.decl = interface_with_self_decl @GenericInterface [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc6_38.1 +// CHECK:STDOUT: .Self = %Self.loc6_37.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -2139,12 +2139,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: import PackageGenericInterface//default // CHECK:STDOUT: } // CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic] -// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_32, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageHasParam.import_ref.527 = import_ref PackageHasParam//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T)] -// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_27, loaded [symbolic = @AnyParam.%X (constants.%X)] +// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageGenericInterface.GenericInterface: %GenericInterface.type.cd1 = import_ref PackageGenericInterface//default, GenericInterface, loaded [concrete = constants.%GenericInterface.generic] -// CHECK:STDOUT: %PackageGenericInterface.import_ref.b00 = import_ref PackageGenericInterface//default, loc6_38, unloaded +// CHECK:STDOUT: %PackageGenericInterface.import_ref.b00 = import_ref PackageGenericInterface//default, loc6_37, unloaded // CHECK:STDOUT: %PackageGenericInterface.import_ref.b3bc94.2: type = import_ref PackageGenericInterface//default, loc6_29, loaded [symbolic = @GenericInterface.%U (constants.%U)] // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] // CHECK:STDOUT: %PackageHasParam.import_ref.03c: %Y.assoc_type = import_ref PackageHasParam//default, loc7_21, loaded [concrete = constants.%assoc0.970] @@ -2398,10 +2398,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: import PackageHasParam//default // CHECK:STDOUT: } // CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic] -// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_32, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageHasParam.import_ref.527 = import_ref PackageHasParam//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T)] -// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_27, loaded [symbolic = @AnyParam.%X (constants.%X)] +// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] // CHECK:STDOUT: %PackageHasParam.import_ref.03c: %Y.assoc_type = import_ref PackageHasParam//default, loc7_21, loaded [concrete = constants.%assoc0.970] // CHECK:STDOUT: %PackageHasParam.K: @Y.WithSelf.%Y.WithSelf.K.type (%Y.WithSelf.K.type.977) = import_ref PackageHasParam//default, K, loaded [symbolic = @Y.WithSelf.%Y.WithSelf.K (constants.%Y.WithSelf.K.d2d)] @@ -2423,9 +2423,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %GenericClass.decl: %GenericClass.type = class_decl @GenericClass [concrete = constants.%GenericClass.generic] { // CHECK:STDOUT: %U.patt.loc6_21.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_21.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_24.1: type = splice_block %.loc6_24.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_23.1: type = splice_block %.loc6_23.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_24.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_23.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc6_21.2: type = symbolic_binding U, 0 [symbolic = %U.loc6_21.1 (constants.%U)] // CHECK:STDOUT: } @@ -2683,12 +2683,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: import PackageGenericClass//default // CHECK:STDOUT: } // CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic] -// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_32, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageHasParam.import_ref.527 = import_ref PackageHasParam//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T)] -// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_27, loaded [symbolic = @AnyParam.%X (constants.%X)] +// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageGenericClass.GenericClass: %GenericClass.type = import_ref PackageGenericClass//default, GenericClass, loaded [concrete = constants.%GenericClass.generic] -// CHECK:STDOUT: %PackageGenericClass.import_ref.8f2: = import_ref PackageGenericClass//default, loc6_31, loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %PackageGenericClass.import_ref.8f2: = import_ref PackageGenericClass//default, loc6_30, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageGenericClass.import_ref.772 = import_ref PackageGenericClass//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %PackageGenericClass.import_ref.b3b: type = import_ref PackageGenericClass//default, loc6_21, loaded [symbolic = @GenericClass.%U (constants.%U)] // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] @@ -2955,9 +2955,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc13_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_13.1: type = splice_block %.loc13_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc13_12.1: type = splice_block %.loc13_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc13_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc13_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc13_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_10.1 (constants.%T)] // CHECK:STDOUT: } @@ -3277,7 +3277,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: import HasExtraInterfaces//default // CHECK:STDOUT: } // CHECK:STDOUT: %HasExtraInterfaces.C: %C.type = import_ref HasExtraInterfaces//default, C, loaded [concrete = constants.%C.generic] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.8f2: = import_ref HasExtraInterfaces//default, loc13_20, loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.8f2: = import_ref HasExtraInterfaces//default, loc13_19, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.0f9 = import_ref HasExtraInterfaces//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.b3b: type = import_ref HasExtraInterfaces//default, loc13_10, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %HasExtraInterfaces.I: type = import_ref HasExtraInterfaces//default, I, loaded [concrete = constants.%I.type] diff --git a/toolchain/check/testdata/impl/lookup/import_error.carbon b/toolchain/check/testdata/impl/lookup/import_error.carbon index d601b360bcb7..f9d006035ea0 100644 --- a/toolchain/check/testdata/impl/lookup/import_error.carbon +++ b/toolchain/check/testdata/impl/lookup/import_error.carbon @@ -14,22 +14,22 @@ library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } // The value of .X is an error. -// CHECK:STDERR: fail_error_interface_z.carbon:[[@LINE+4]]:35: error: associated constant `.(Z.X)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues] -// CHECK:STDERR: final impl forall [T:! type] T as Z where .X = {} and .X = () {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_error_interface_z.carbon:[[@LINE+4]]:34: error: associated constant `.(Z.X)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues] +// CHECK:STDERR: final impl forall [T: type] T as Z where .X = {} and .X = () {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -final impl forall [T:! type] T as Z where .X = {} and .X = () {} +final impl forall [T: type] T as Z where .X = {} and .X = () {} // --- fail_import_error.carbon library "[[@TEST_NAME]]"; import library "error_interface_z"; -fn F[unused U:! type](T:! Z) { +fn F[unused U: type](generic T: Z) { // The value of `.X` is an error. It should not crash though. // // CHECK:STDERR: fail_import_error.carbon:[[@LINE+7]]:23: error: cannot implicitly convert expression of type `()` to `T.(Z.X)` [ConversionFailure] diff --git a/toolchain/check/testdata/impl/lookup/import_final.carbon b/toolchain/check/testdata/impl/lookup/import_final.carbon index bcb7ed116edc..04b63bc31bb4 100644 --- a/toolchain/check/testdata/impl/lookup/import_final.carbon +++ b/toolchain/check/testdata/impl/lookup/import_final.carbon @@ -14,18 +14,18 @@ library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } class C {} -final impl forall [T:! type] T as Z where .X = C {} +final impl forall [T: type] T as Z where .X = C {} // --- import_final.carbon library "[[@TEST_NAME]]"; import library "interface_z"; -fn F[unused U:! type](T:! Z) { +fn F[unused U: type](generic T: Z) { // The value of `.X` can be known to be `C` here when the impl `T as Z(C)` is // final. let unused a: T.X = {} as C; diff --git a/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon b/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon index b0260d22c702..eb6d3a6cd2c0 100644 --- a/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon +++ b/toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon @@ -61,12 +61,12 @@ library "[[@TEST_NAME]]"; // the specific ids in the query interface and the facet type will continue // to match after substitution. -class Outer(OuterParam:! type) { +class Outer(OuterParam: type) { interface Y { - let T:! type; + let T: type; } - fn G(unused H:! Y where .T = ()) {} + fn G(unused generic H: Y where .T = ()) {} } class C; @@ -82,12 +82,12 @@ library "[[@TEST_NAME]]"; interface Z1 {} interface Z2 {} -class Outer(OuterParam:! Z1) { +class Outer(OuterParam: Z1) { interface Y { - let T:! type; + let T: type; } - fn G(unused H:! Y where .T = ()) {} + fn G(unused generic H: Y where .T = ()) {} class C; impl C as Y where .T = () {} @@ -178,9 +178,9 @@ fn F() { // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] { // CHECK:STDOUT: %OuterParam.patt.loc49_23.1: %pattern_type.98f = symbolic_binding_pattern OuterParam, 0 [symbolic = %OuterParam.patt.loc49_23.2 (constants.%OuterParam.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc49_26.1: type = splice_block %.loc49_26.2 [concrete = type] { +// CHECK:STDOUT: %.loc49_25.1: type = splice_block %.loc49_25.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc49_26.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc49_25.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %OuterParam.loc49_23.2: type = symbolic_binding OuterParam, 0 [symbolic = %OuterParam.loc49_23.1 (constants.%OuterParam)] // CHECK:STDOUT: } @@ -262,31 +262,31 @@ fn F() { // CHECK:STDOUT: class { // CHECK:STDOUT: %Y.decl: type = interface_decl @Y [symbolic = @Outer.%Y.type (constants.%Y.type.d63)] {} {} // CHECK:STDOUT: %Outer.G.decl: @Outer.%Outer.G.type (%Outer.G.type.744) = fn_decl @Outer.G [symbolic = @Outer.%Outer.G (constants.%Outer.G.2ce)] { -// CHECK:STDOUT: %H.patt.loc54_16.1: @Outer.G.%pattern_type (%pattern_type.a2a) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc54_16.2 (constants.%H.patt.934)] +// CHECK:STDOUT: %H.patt.loc54_24.1: @Outer.G.%pattern_type (%pattern_type.a2a) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc54_24.2 (constants.%H.patt.934)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc54_21.1: type = splice_block %.loc54_21.2 [symbolic = %Y_where.type (constants.%Y_where.type.aab)] { -// CHECK:STDOUT: %.Self.frozen.loc54_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc54_19: type = specific_constant @Outer.%Y.decl, @Outer(constants.%OuterParam) [symbolic = %Y.type (constants.%Y.type.d63)] -// CHECK:STDOUT: %Y.ref: type = name_ref Y, %.loc54_19 [symbolic = %Y.type (constants.%Y.type.d63)] -// CHECK:STDOUT: %.Self.frozen.loc54_21.2: @Outer.G.%Y.type (%Y.type.d63) = symbolic_binding .Self [symbolic = %.Self.frozen.loc54_21.1 (constants.%.Self.frozen.e31)] +// CHECK:STDOUT: %.loc54_28.1: type = splice_block %.loc54_28.2 [symbolic = %Y_where.type (constants.%Y_where.type.aab)] { +// CHECK:STDOUT: %.Self.frozen.loc54_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc54_26: type = specific_constant @Outer.%Y.decl, @Outer(constants.%OuterParam) [symbolic = %Y.type (constants.%Y.type.d63)] +// CHECK:STDOUT: %Y.ref: type = name_ref Y, %.loc54_26 [symbolic = %Y.type (constants.%Y.type.d63)] +// CHECK:STDOUT: %.Self.frozen.loc54_28.2: @Outer.G.%Y.type (%Y.type.d63) = symbolic_binding .Self [symbolic = %.Self.frozen.loc54_28.1 (constants.%.Self.frozen.e31)] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Y.ref [concrete] -// CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.d63) = name_ref .Self, %.Self.frozen.loc54_21.2 [symbolic = %.Self.frozen.loc54_21.1 (constants.%.Self.frozen.e31)] +// CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.d63) = name_ref .Self, %.Self.frozen.loc54_28.2 [symbolic = %.Self.frozen.loc54_28.1 (constants.%.Self.frozen.e31)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.2b2)] -// CHECK:STDOUT: %.loc54_27.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.2b2)] -// CHECK:STDOUT: %.loc54_27.2: @Outer.G.%Y.assoc_type (%Y.assoc_type.045) = specific_constant @T.%assoc0, @Y.WithSelf(constants.%OuterParam, constants.%.Self.frozen.e31) [symbolic = %assoc0 (constants.%assoc0.bbd)] -// CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.045) = name_ref T, %.loc54_27.2 [symbolic = %assoc0 (constants.%assoc0.bbd)] -// CHECK:STDOUT: %impl.elem0.loc54_27.3: type = impl_witness_access constants.%Y.lookup_impl_witness.69a, element0 [symbolic = %impl.elem0.loc54_27.1 (constants.%impl.elem0.093)] -// CHECK:STDOUT: %.loc54_33.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc54_33.2: type = converted %.loc54_33.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %rewrite.loc54_30.1 = requirement_rewrite %impl.elem0.loc54_27.3, %.loc54_33.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc54_27.4: type = impl_witness_access constants.%Y.lookup_impl_witness.c77, element0 [symbolic = %impl.elem0.loc54_27.2 (constants.%impl.elem0.35b)] -// CHECK:STDOUT: %rewrite.loc54_30.2 = requirement_rewrite %impl.elem0.loc54_27.4, %.loc54_33.2 [concrete] -// CHECK:STDOUT: %.loc54_21.2: type = where_expr [symbolic = %Y_where.type (constants.%Y_where.type.aab)] { +// CHECK:STDOUT: %.loc54_34.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.2b2)] +// CHECK:STDOUT: %.loc54_34.2: @Outer.G.%Y.assoc_type (%Y.assoc_type.045) = specific_constant @T.%assoc0, @Y.WithSelf(constants.%OuterParam, constants.%.Self.frozen.e31) [symbolic = %assoc0 (constants.%assoc0.bbd)] +// CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.045) = name_ref T, %.loc54_34.2 [symbolic = %assoc0 (constants.%assoc0.bbd)] +// CHECK:STDOUT: %impl.elem0.loc54_34.3: type = impl_witness_access constants.%Y.lookup_impl_witness.69a, element0 [symbolic = %impl.elem0.loc54_34.1 (constants.%impl.elem0.093)] +// CHECK:STDOUT: %.loc54_40.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc54_40.2: type = converted %.loc54_40.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %rewrite.loc54_37.1 = requirement_rewrite %impl.elem0.loc54_34.3, %.loc54_40.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc54_34.4: type = impl_witness_access constants.%Y.lookup_impl_witness.c77, element0 [symbolic = %impl.elem0.loc54_34.2 (constants.%impl.elem0.35b)] +// CHECK:STDOUT: %rewrite.loc54_37.2 = requirement_rewrite %impl.elem0.loc54_34.4, %.loc54_40.2 [concrete] +// CHECK:STDOUT: %.loc54_28.2: type = where_expr [symbolic = %Y_where.type (constants.%Y_where.type.aab)] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Y.ref [concrete] -// CHECK:STDOUT: %rewrite.loc54_30.2 = requirement_rewrite %impl.elem0.loc54_27.4, %.loc54_33.2 [concrete] +// CHECK:STDOUT: %rewrite.loc54_37.2 = requirement_rewrite %impl.elem0.loc54_34.4, %.loc54_40.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %H.loc54_16.2: @Outer.G.%Y_where.type (%Y_where.type.aab) = symbolic_binding H, 1 [symbolic = %H.loc54_16.1 (constants.%H)] +// CHECK:STDOUT: %H.loc54_24.2: @Outer.G.%Y_where.type (%Y_where.type.aab) = symbolic_binding H, 1 [symbolic = %H.loc54_24.1 (constants.%H)] // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -300,23 +300,23 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: class @C; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Outer.G(@Outer.%OuterParam.loc49_23.2: type, %H.loc54_16.2: @Outer.G.%Y_where.type (%Y_where.type.aab)) { +// CHECK:STDOUT: generic fn @Outer.G(@Outer.%OuterParam.loc49_23.2: type, %H.loc54_24.2: @Outer.G.%Y_where.type (%Y_where.type.aab)) { // CHECK:STDOUT: %OuterParam: type = symbolic_binding OuterParam, 0 [symbolic = %OuterParam (constants.%OuterParam)] // CHECK:STDOUT: %Y.type: type = facet_type <@Y, @Y(%OuterParam)> [symbolic = %Y.type (constants.%Y.type.d63)] -// CHECK:STDOUT: %.Self.frozen.loc54_21.1: @Outer.G.%Y.type (%Y.type.d63) = symbolic_binding .Self [symbolic = %.Self.frozen.loc54_21.1 (constants.%.Self.frozen.e31)] +// CHECK:STDOUT: %.Self.frozen.loc54_28.1: @Outer.G.%Y.type (%Y.type.d63) = symbolic_binding .Self [symbolic = %.Self.frozen.loc54_28.1 (constants.%.Self.frozen.e31)] // CHECK:STDOUT: %require_complete: = require_complete_type %Y.type [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc54_21.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.2b2)] +// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc54_28.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.2b2)] // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%OuterParam) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.045)] // CHECK:STDOUT: %assoc0: @Outer.G.%Y.assoc_type (%Y.assoc_type.045) = assoc_entity element0, @Y.WithSelf.%T [symbolic = %assoc0 (constants.%assoc0.bbd)] -// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_27.1: = lookup_impl_witness %.Self.frozen.loc54_21.1, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc54_27.1 (constants.%Y.lookup_impl_witness.69a)] -// CHECK:STDOUT: %impl.elem0.loc54_27.1: type = impl_witness_access %Y.lookup_impl_witness.loc54_27.1, element0 [symbolic = %impl.elem0.loc54_27.1 (constants.%impl.elem0.093)] +// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_34.1: = lookup_impl_witness %.Self.frozen.loc54_28.1, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc54_34.1 (constants.%Y.lookup_impl_witness.69a)] +// CHECK:STDOUT: %impl.elem0.loc54_34.1: type = impl_witness_access %Y.lookup_impl_witness.loc54_34.1, element0 [symbolic = %impl.elem0.loc54_34.1 (constants.%impl.elem0.093)] // CHECK:STDOUT: %.Self: @Outer.G.%Y.type (%Y.type.d63) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.12c)] -// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_27.2: = lookup_impl_witness %.Self, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc54_27.2 (constants.%Y.lookup_impl_witness.c77)] -// CHECK:STDOUT: %impl.elem0.loc54_27.2: type = impl_witness_access %Y.lookup_impl_witness.loc54_27.2, element0 [symbolic = %impl.elem0.loc54_27.2 (constants.%impl.elem0.35b)] -// CHECK:STDOUT: %Y_where.type: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.loc54_27.2 = constants.%empty_tuple.type> [symbolic = %Y_where.type (constants.%Y_where.type.aab)] +// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_34.2: = lookup_impl_witness %.Self, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc54_34.2 (constants.%Y.lookup_impl_witness.c77)] +// CHECK:STDOUT: %impl.elem0.loc54_34.2: type = impl_witness_access %Y.lookup_impl_witness.loc54_34.2, element0 [symbolic = %impl.elem0.loc54_34.2 (constants.%impl.elem0.35b)] +// CHECK:STDOUT: %Y_where.type: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.loc54_34.2 = constants.%empty_tuple.type> [symbolic = %Y_where.type (constants.%Y_where.type.aab)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Y_where.type [symbolic = %pattern_type (constants.%pattern_type.a2a)] -// CHECK:STDOUT: %H.patt.loc54_16.2: @Outer.G.%pattern_type (%pattern_type.a2a) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc54_16.2 (constants.%H.patt.934)] -// CHECK:STDOUT: %H.loc54_16.1: @Outer.G.%Y_where.type (%Y_where.type.aab) = symbolic_binding H, 1 [symbolic = %H.loc54_16.1 (constants.%H)] +// CHECK:STDOUT: %H.patt.loc54_24.2: @Outer.G.%pattern_type (%pattern_type.a2a) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc54_24.2 (constants.%H.patt.934)] +// CHECK:STDOUT: %H.loc54_24.1: @Outer.G.%Y_where.type (%Y_where.type.aab) = symbolic_binding H, 1 [symbolic = %H.loc54_24.1 (constants.%H)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -380,20 +380,20 @@ fn F() { // CHECK:STDOUT: specific @Outer.G(constants.%OuterParam, constants.%H) { // CHECK:STDOUT: %OuterParam => constants.%OuterParam // CHECK:STDOUT: %Y.type => constants.%Y.type.d63 -// CHECK:STDOUT: %.Self.frozen.loc54_21.1 => constants.%.Self.frozen.e31 +// CHECK:STDOUT: %.Self.frozen.loc54_28.1 => constants.%.Self.frozen.e31 // CHECK:STDOUT: %require_complete => constants.%require_complete // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.2b2 // CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.045 // CHECK:STDOUT: %assoc0 => constants.%assoc0.bbd -// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_27.1 => constants.%Y.lookup_impl_witness.69a -// CHECK:STDOUT: %impl.elem0.loc54_27.1 => constants.%impl.elem0.093 +// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_34.1 => constants.%Y.lookup_impl_witness.69a +// CHECK:STDOUT: %impl.elem0.loc54_34.1 => constants.%impl.elem0.093 // CHECK:STDOUT: %.Self => constants.%.Self.12c -// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_27.2 => constants.%Y.lookup_impl_witness.c77 -// CHECK:STDOUT: %impl.elem0.loc54_27.2 => constants.%impl.elem0.35b +// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_34.2 => constants.%Y.lookup_impl_witness.c77 +// CHECK:STDOUT: %impl.elem0.loc54_34.2 => constants.%impl.elem0.35b // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.aab // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a2a -// CHECK:STDOUT: %H.patt.loc54_16.2 => constants.%H.patt.934 -// CHECK:STDOUT: %H.loc54_16.1 => constants.%H +// CHECK:STDOUT: %H.patt.loc54_24.2 => constants.%H.patt.934 +// CHECK:STDOUT: %H.loc54_24.1 => constants.%H // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%empty_tuple.type) { @@ -437,20 +437,20 @@ fn F() { // CHECK:STDOUT: specific @Outer.G(constants.%empty_tuple.type, constants.%facet_value) { // CHECK:STDOUT: %OuterParam => constants.%empty_tuple.type // CHECK:STDOUT: %Y.type => constants.%Y.type.1f7 -// CHECK:STDOUT: %.Self.frozen.loc54_21.1 => constants.%.Self.frozen.fb9 +// CHECK:STDOUT: %.Self.frozen.loc54_28.1 => constants.%.Self.frozen.fb9 // CHECK:STDOUT: %require_complete => constants.%complete_type.002 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.1ff // CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.46d // CHECK:STDOUT: %assoc0 => constants.%assoc0.a6e -// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_27.1 => constants.%Y.lookup_impl_witness.63b -// CHECK:STDOUT: %impl.elem0.loc54_27.1 => constants.%impl.elem0.1cc +// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_34.1 => constants.%Y.lookup_impl_witness.63b +// CHECK:STDOUT: %impl.elem0.loc54_34.1 => constants.%impl.elem0.1cc // CHECK:STDOUT: %.Self => constants.%.Self.693 -// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_27.2 => constants.%Y.lookup_impl_witness.b55 -// CHECK:STDOUT: %impl.elem0.loc54_27.2 => constants.%impl.elem0.c92 +// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_34.2 => constants.%Y.lookup_impl_witness.b55 +// CHECK:STDOUT: %impl.elem0.loc54_34.2 => constants.%impl.elem0.c92 // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.7cc // CHECK:STDOUT: %pattern_type => constants.%pattern_type.42f -// CHECK:STDOUT: %H.patt.loc54_16.2 => constants.%H.patt.9c6 -// CHECK:STDOUT: %H.loc54_16.1 => constants.%facet_value +// CHECK:STDOUT: %H.patt.loc54_24.2 => constants.%H.patt.9c6 +// CHECK:STDOUT: %H.loc54_24.1 => constants.%facet_value // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -697,31 +697,31 @@ fn F() { // CHECK:STDOUT: class { // CHECK:STDOUT: %Y.decl: type = interface_decl @Y [symbolic = @Outer.%Y.type (constants.%Y.type.6da)] {} {} // CHECK:STDOUT: %Outer.G.decl: @Outer.%Outer.G.type (%Outer.G.type.2cf) = fn_decl @Outer.G [symbolic = @Outer.%Outer.G (constants.%Outer.G.f56)] { -// CHECK:STDOUT: %H.patt.loc11_16.1: @Outer.G.%pattern_type (%pattern_type.a5e) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc11_16.2 (constants.%H.patt.7f4)] +// CHECK:STDOUT: %H.patt.loc11_24.1: @Outer.G.%pattern_type (%pattern_type.a5e) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc11_24.2 (constants.%H.patt.7f4)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_21.1: type = splice_block %.loc11_21.2 [symbolic = %Y_where.type (constants.%Y_where.type.883)] { -// CHECK:STDOUT: %.Self.frozen.loc11_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc11_19: type = specific_constant @Outer.%Y.decl, @Outer(constants.%OuterParam) [symbolic = %Y.type (constants.%Y.type.6da)] -// CHECK:STDOUT: %Y.ref: type = name_ref Y, %.loc11_19 [symbolic = %Y.type (constants.%Y.type.6da)] -// CHECK:STDOUT: %.Self.frozen.loc11_21.2: @Outer.G.%Y.type (%Y.type.6da) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_21.1 (constants.%.Self.frozen.3ed)] +// CHECK:STDOUT: %.loc11_28.1: type = splice_block %.loc11_28.2 [symbolic = %Y_where.type (constants.%Y_where.type.883)] { +// CHECK:STDOUT: %.Self.frozen.loc11_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc11_26: type = specific_constant @Outer.%Y.decl, @Outer(constants.%OuterParam) [symbolic = %Y.type (constants.%Y.type.6da)] +// CHECK:STDOUT: %Y.ref: type = name_ref Y, %.loc11_26 [symbolic = %Y.type (constants.%Y.type.6da)] +// CHECK:STDOUT: %.Self.frozen.loc11_28.2: @Outer.G.%Y.type (%Y.type.6da) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_28.1 (constants.%.Self.frozen.3ed)] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Y.ref [concrete] -// CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.6da) = name_ref .Self, %.Self.frozen.loc11_21.2 [symbolic = %.Self.frozen.loc11_21.1 (constants.%.Self.frozen.3ed)] +// CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.6da) = name_ref .Self, %.Self.frozen.loc11_28.2 [symbolic = %.Self.frozen.loc11_28.1 (constants.%.Self.frozen.3ed)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.b76)] -// CHECK:STDOUT: %.loc11_27.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.b76)] -// CHECK:STDOUT: %.loc11_27.2: @Outer.G.%Y.assoc_type (%Y.assoc_type.9e3) = specific_constant @T.%assoc0, @Y.WithSelf(constants.%OuterParam, constants.%.Self.frozen.3ed) [symbolic = %assoc0 (constants.%assoc0.c2d)] -// CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.9e3) = name_ref T, %.loc11_27.2 [symbolic = %assoc0 (constants.%assoc0.c2d)] -// CHECK:STDOUT: %impl.elem0.loc11_27.3: type = impl_witness_access constants.%Y.lookup_impl_witness.9ce, element0 [symbolic = %impl.elem0.loc11_27.1 (constants.%impl.elem0.c34)] -// CHECK:STDOUT: %.loc11_33.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc11_33.2: type = converted %.loc11_33.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %rewrite.loc11_30.1 = requirement_rewrite %impl.elem0.loc11_27.3, %.loc11_33.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc11_27.4: type = impl_witness_access constants.%Y.lookup_impl_witness.75a, element0 [symbolic = %impl.elem0.loc11_27.2 (constants.%impl.elem0.5e0)] -// CHECK:STDOUT: %rewrite.loc11_30.2 = requirement_rewrite %impl.elem0.loc11_27.4, %.loc11_33.2 [concrete] -// CHECK:STDOUT: %.loc11_21.2: type = where_expr [symbolic = %Y_where.type (constants.%Y_where.type.883)] { +// CHECK:STDOUT: %.loc11_34.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.b76)] +// CHECK:STDOUT: %.loc11_34.2: @Outer.G.%Y.assoc_type (%Y.assoc_type.9e3) = specific_constant @T.%assoc0, @Y.WithSelf(constants.%OuterParam, constants.%.Self.frozen.3ed) [symbolic = %assoc0 (constants.%assoc0.c2d)] +// CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.9e3) = name_ref T, %.loc11_34.2 [symbolic = %assoc0 (constants.%assoc0.c2d)] +// CHECK:STDOUT: %impl.elem0.loc11_34.3: type = impl_witness_access constants.%Y.lookup_impl_witness.9ce, element0 [symbolic = %impl.elem0.loc11_34.1 (constants.%impl.elem0.c34)] +// CHECK:STDOUT: %.loc11_40.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc11_40.2: type = converted %.loc11_40.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %rewrite.loc11_37.1 = requirement_rewrite %impl.elem0.loc11_34.3, %.loc11_40.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc11_34.4: type = impl_witness_access constants.%Y.lookup_impl_witness.75a, element0 [symbolic = %impl.elem0.loc11_34.2 (constants.%impl.elem0.5e0)] +// CHECK:STDOUT: %rewrite.loc11_37.2 = requirement_rewrite %impl.elem0.loc11_34.4, %.loc11_40.2 [concrete] +// CHECK:STDOUT: %.loc11_28.2: type = where_expr [symbolic = %Y_where.type (constants.%Y_where.type.883)] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Y.ref [concrete] -// CHECK:STDOUT: %rewrite.loc11_30.2 = requirement_rewrite %impl.elem0.loc11_27.4, %.loc11_33.2 [concrete] +// CHECK:STDOUT: %rewrite.loc11_37.2 = requirement_rewrite %impl.elem0.loc11_34.4, %.loc11_40.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %H.loc11_16.2: @Outer.G.%Y_where.type (%Y_where.type.883) = symbolic_binding H, 1 [symbolic = %H.loc11_16.1 (constants.%H)] +// CHECK:STDOUT: %H.loc11_24.2: @Outer.G.%Y_where.type (%Y_where.type.883) = symbolic_binding H, 1 [symbolic = %H.loc11_24.1 (constants.%H)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [symbolic = @Outer.%C (constants.%C.147)] {} {} // CHECK:STDOUT: impl_decl @C.as.Y.impl [concrete] {} { @@ -762,23 +762,23 @@ fn F() { // CHECK:STDOUT: class; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Outer.G(@Outer.%OuterParam.loc6_23.2: %Z1.type, %H.loc11_16.2: @Outer.G.%Y_where.type (%Y_where.type.883)) { +// CHECK:STDOUT: generic fn @Outer.G(@Outer.%OuterParam.loc6_23.2: %Z1.type, %H.loc11_24.2: @Outer.G.%Y_where.type (%Y_where.type.883)) { // CHECK:STDOUT: %OuterParam: %Z1.type = symbolic_binding OuterParam, 0 [symbolic = %OuterParam (constants.%OuterParam)] // CHECK:STDOUT: %Y.type: type = facet_type <@Y, @Y(%OuterParam)> [symbolic = %Y.type (constants.%Y.type.6da)] -// CHECK:STDOUT: %.Self.frozen.loc11_21.1: @Outer.G.%Y.type (%Y.type.6da) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_21.1 (constants.%.Self.frozen.3ed)] +// CHECK:STDOUT: %.Self.frozen.loc11_28.1: @Outer.G.%Y.type (%Y.type.6da) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_28.1 (constants.%.Self.frozen.3ed)] // CHECK:STDOUT: %require_complete: = require_complete_type %Y.type [symbolic = %require_complete (constants.%require_complete.ab6)] -// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc11_21.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.b76)] +// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc11_28.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.b76)] // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%OuterParam) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.9e3)] // CHECK:STDOUT: %assoc0: @Outer.G.%Y.assoc_type (%Y.assoc_type.9e3) = assoc_entity element0, @Y.WithSelf.%T [symbolic = %assoc0 (constants.%assoc0.c2d)] -// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_27.1: = lookup_impl_witness %.Self.frozen.loc11_21.1, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc11_27.1 (constants.%Y.lookup_impl_witness.9ce)] -// CHECK:STDOUT: %impl.elem0.loc11_27.1: type = impl_witness_access %Y.lookup_impl_witness.loc11_27.1, element0 [symbolic = %impl.elem0.loc11_27.1 (constants.%impl.elem0.c34)] +// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_34.1: = lookup_impl_witness %.Self.frozen.loc11_28.1, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc11_34.1 (constants.%Y.lookup_impl_witness.9ce)] +// CHECK:STDOUT: %impl.elem0.loc11_34.1: type = impl_witness_access %Y.lookup_impl_witness.loc11_34.1, element0 [symbolic = %impl.elem0.loc11_34.1 (constants.%impl.elem0.c34)] // CHECK:STDOUT: %.Self: @Outer.G.%Y.type (%Y.type.6da) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.b74)] -// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_27.2: = lookup_impl_witness %.Self, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc11_27.2 (constants.%Y.lookup_impl_witness.75a)] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: type = impl_witness_access %Y.lookup_impl_witness.loc11_27.2, element0 [symbolic = %impl.elem0.loc11_27.2 (constants.%impl.elem0.5e0)] -// CHECK:STDOUT: %Y_where.type: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.loc11_27.2 = constants.%empty_tuple.type> [symbolic = %Y_where.type (constants.%Y_where.type.883)] +// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_34.2: = lookup_impl_witness %.Self, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc11_34.2 (constants.%Y.lookup_impl_witness.75a)] +// CHECK:STDOUT: %impl.elem0.loc11_34.2: type = impl_witness_access %Y.lookup_impl_witness.loc11_34.2, element0 [symbolic = %impl.elem0.loc11_34.2 (constants.%impl.elem0.5e0)] +// CHECK:STDOUT: %Y_where.type: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.loc11_34.2 = constants.%empty_tuple.type> [symbolic = %Y_where.type (constants.%Y_where.type.883)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Y_where.type [symbolic = %pattern_type (constants.%pattern_type.a5e)] -// CHECK:STDOUT: %H.patt.loc11_16.2: @Outer.G.%pattern_type (%pattern_type.a5e) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc11_16.2 (constants.%H.patt.7f4)] -// CHECK:STDOUT: %H.loc11_16.1: @Outer.G.%Y_where.type (%Y_where.type.883) = symbolic_binding H, 1 [symbolic = %H.loc11_16.1 (constants.%H)] +// CHECK:STDOUT: %H.patt.loc11_24.2: @Outer.G.%pattern_type (%pattern_type.a5e) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc11_24.2 (constants.%H.patt.7f4)] +// CHECK:STDOUT: %H.loc11_24.1: @Outer.G.%Y_where.type (%Y_where.type.883) = symbolic_binding H, 1 [symbolic = %H.loc11_24.1 (constants.%H)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -878,20 +878,20 @@ fn F() { // CHECK:STDOUT: specific @Outer.G(constants.%OuterParam, constants.%H) { // CHECK:STDOUT: %OuterParam => constants.%OuterParam // CHECK:STDOUT: %Y.type => constants.%Y.type.6da -// CHECK:STDOUT: %.Self.frozen.loc11_21.1 => constants.%.Self.frozen.3ed +// CHECK:STDOUT: %.Self.frozen.loc11_28.1 => constants.%.Self.frozen.3ed // CHECK:STDOUT: %require_complete => constants.%require_complete.ab6 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.b76 // CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.9e3 // CHECK:STDOUT: %assoc0 => constants.%assoc0.c2d -// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_27.1 => constants.%Y.lookup_impl_witness.9ce -// CHECK:STDOUT: %impl.elem0.loc11_27.1 => constants.%impl.elem0.c34 +// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_34.1 => constants.%Y.lookup_impl_witness.9ce +// CHECK:STDOUT: %impl.elem0.loc11_34.1 => constants.%impl.elem0.c34 // CHECK:STDOUT: %.Self => constants.%.Self.b74 -// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_27.2 => constants.%Y.lookup_impl_witness.75a -// CHECK:STDOUT: %impl.elem0.loc11_27.2 => constants.%impl.elem0.5e0 +// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_34.2 => constants.%Y.lookup_impl_witness.75a +// CHECK:STDOUT: %impl.elem0.loc11_34.2 => constants.%impl.elem0.5e0 // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.883 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a5e -// CHECK:STDOUT: %H.patt.loc11_16.2 => constants.%H.patt.7f4 -// CHECK:STDOUT: %H.loc11_16.1 => constants.%H +// CHECK:STDOUT: %H.patt.loc11_24.2 => constants.%H.patt.7f4 +// CHECK:STDOUT: %H.loc11_24.1 => constants.%H // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%OuterParam) {} @@ -980,20 +980,20 @@ fn F() { // CHECK:STDOUT: specific @Outer.G(constants.%Z1.facet, constants.%facet_value.58a) { // CHECK:STDOUT: %OuterParam => constants.%Z1.facet // CHECK:STDOUT: %Y.type => constants.%Y.type.b7c -// CHECK:STDOUT: %.Self.frozen.loc11_21.1 => constants.%.Self.frozen.70d +// CHECK:STDOUT: %.Self.frozen.loc11_28.1 => constants.%.Self.frozen.70d // CHECK:STDOUT: %require_complete => constants.%complete_type.c4c // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.1e5 // CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.d53 // CHECK:STDOUT: %assoc0 => constants.%assoc0.ef6 -// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_27.1 => constants.%Y.lookup_impl_witness.fb3 -// CHECK:STDOUT: %impl.elem0.loc11_27.1 => constants.%impl.elem0.73b +// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_34.1 => constants.%Y.lookup_impl_witness.fb3 +// CHECK:STDOUT: %impl.elem0.loc11_34.1 => constants.%impl.elem0.73b // CHECK:STDOUT: %.Self => constants.%.Self.b06 -// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_27.2 => constants.%Y.lookup_impl_witness.d61 -// CHECK:STDOUT: %impl.elem0.loc11_27.2 => constants.%impl.elem0.400 +// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_34.2 => constants.%Y.lookup_impl_witness.d61 +// CHECK:STDOUT: %impl.elem0.loc11_34.2 => constants.%impl.elem0.400 // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.8eb // CHECK:STDOUT: %pattern_type => constants.%pattern_type.692 -// CHECK:STDOUT: %H.patt.loc11_16.2 => constants.%H.patt.a46 -// CHECK:STDOUT: %H.loc11_16.1 => constants.%facet_value.58a +// CHECK:STDOUT: %H.patt.loc11_24.2 => constants.%H.patt.a46 +// CHECK:STDOUT: %H.loc11_24.1 => constants.%facet_value.58a // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/overlap_with_non_types.carbon b/toolchain/check/testdata/impl/lookup/overlap_with_non_types.carbon index ec7db4729788..8f02bd1651fe 100644 --- a/toolchain/check/testdata/impl/lookup/overlap_with_non_types.carbon +++ b/toolchain/check/testdata/impl/lookup/overlap_with_non_types.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; interface Z {} -class C(B:! bool); +class C(B: bool); impl C(true) as Z {} impl C(false) as Z {} diff --git a/toolchain/check/testdata/impl/lookup/specialization.carbon b/toolchain/check/testdata/impl/lookup/specialization.carbon index 368c6cb20958..9c657d29277e 100644 --- a/toolchain/check/testdata/impl/lookup/specialization.carbon +++ b/toolchain/check/testdata/impl/lookup/specialization.carbon @@ -13,14 +13,14 @@ // --- specialized_self_first.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } class C {} impl C as Z(C) where .X = C {} -impl forall [T:! type] T as Z(T) where .X = () {} +impl forall [T: type] T as Z(T) where .X = () {} fn F() { // The specialization of `Z(C)` should match in preference to the blanket impl @@ -32,11 +32,11 @@ fn F() { // --- specialized_self_second.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } -impl forall [T:! type] T as Z(T) where .X = () {} +impl forall [T: type] T as Z(T) where .X = () {} class C {} impl C as Z(C) where .X = C {} @@ -51,14 +51,14 @@ fn F() { // --- specialized_constraint_first.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } class C {} impl C as Z(C) where .X = C {} -impl forall [T:! type] C as Z(T) where .X = () {} +impl forall [T: type] C as Z(T) where .X = () {} fn F() { // The specialization of `Z(C)` should match in preference to the blanket impl @@ -70,13 +70,13 @@ fn F() { // --- specialized_constraint_second.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } class C {} -impl forall [T:! type] C as Z(T) where .X = () {} +impl forall [T: type] C as Z(T) where .X = () {} impl C as Z(C) where .X = C {} fn F() { @@ -89,14 +89,14 @@ fn F() { // --- specialized_self_vs_constraint_self_first.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } -class C(T:! type) {} +class C(T: type) {} -impl forall [T:! type] C(()) as Z(T) where .X = C(()) {} -impl forall [T:! type] C(T) as Z(C(())) where .X = () {} +impl forall [T: type] C(()) as Z(T) where .X = C(()) {} +impl forall [T: type] C(T) as Z(C(())) where .X = () {} fn F() { // The specialization of `C(())` should match in preference to the blanket impl @@ -108,14 +108,14 @@ fn F() { // --- specialized_self_vs_constraint_self_second.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } -class C(T:! type) {} +class C(T: type) {} -impl forall [T:! type] C(T) as Z(C(())) where .X = () {} -impl forall [T:! type] C(()) as Z(T) where .X = C(()) {} +impl forall [T: type] C(T) as Z(C(())) where .X = () {} +impl forall [T: type] C(()) as Z(T) where .X = C(()) {} fn F() { // The specialization of `Z(C)` should match in preference to the blanket impl @@ -127,16 +127,16 @@ fn F() { // --- generic_class_with_fully_specified_impl.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } -impl forall [T:! type] T as Z(T) where .X = {.a: ()} {} +impl forall [T: type] T as Z(T) where .X = {.a: ()} {} -class C(T:! type) {} +class C(T: type) {} impl C(()) as Z(()) where .X = C(()) {} -impl forall [T:! type] C(T) as Z(T) where .X = {.b: ()} {} +impl forall [T: type] C(T) as Z(T) where .X = {.b: ()} {} fn F() { // The specialization of `Z(C)` should match in preference to the blanket @@ -148,15 +148,15 @@ fn F() { // --- generic_class_with_blanket_impl_first.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } -class C(T:! type) {} +class C(T: type) {} -impl forall [T:! type] C(T) as Z(T) where .X = C(()) {} +impl forall [T: type] C(T) as Z(T) where .X = C(()) {} -impl forall [T:! type] T as Z(T) where .X = () {} +impl forall [T: type] T as Z(T) where .X = () {} fn F() { // The specialization of `Z(C)` should match in preference to the blanket @@ -168,15 +168,15 @@ fn F() { // --- generic_class_with_blanket_impl_second.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } -impl forall [T:! type] T as Z(T) where .X = () {} +impl forall [T: type] T as Z(T) where .X = () {} -class C(T:! type) {} +class C(T: type) {} -impl forall [T:! type] C(T) as Z(T) where .X = C(()) {} +impl forall [T: type] C(T) as Z(T) where .X = C(()) {} fn F() { // The specialization of `Z(C)` should match in preference to the blanket @@ -189,26 +189,26 @@ fn F() { library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } -class D(T:! type) {} -impl forall [T:! type] D(T) as Z where .X = D(()) {} +class D(T: type) {} +impl forall [T: type] D(T) as Z where .X = D(()) {} class E {} impl E as Z where .X = () {} -class C(T:! Z, U:! Z) {} +class C(T: Z, U: Z) {} // This places a FacetValue of type FacetType(Z) at the position of `D` in the // self type, because the class C requires a facet value satisfying Z. It tests // that we correctly determine that this FacetType is not symbolic, and look at // the parametes of D for symbolic references. -impl forall [T:! Z] C(T, D(E)) as Z where .X = () {} -impl forall [T:! Z] C(D(T), T) as Z where .X = () {} +impl forall [T: Z] C(T, D(E)) as Z where .X = () {} +impl forall [T: Z] C(D(T), T) as Z where .X = () {} // This is the best match, `T` is in the last position compared to the others. -impl forall [T:! Z] C(D(E), T) as Z where .X = C(E, E) {} -impl forall [T:! Z] C(T, T) as Z where .X = () {} +impl forall [T: Z] C(D(E), T) as Z where .X = C(E, E) {} +impl forall [T: Z] C(T, T) as Z where .X = () {} fn F() { let unused a: C(D(E), D(E)).(Z.X) = {} as C(E, E); @@ -217,22 +217,22 @@ fn F() { // --- fail_specialized_class_with_symbolic_facet_value_param.carbon interface Z { - let X:! type; + let X: type; } -impl forall [T:! type] T as Z where .X = T {} +impl forall [T: type] T as Z where .X = T {} interface Y {} -class C(T:! Y) {} +class C(T: Y) {} class D {} impl D as Y {} // D can be either a concrete or symbolic FacetValue, depending on what the // caller has. -impl forall [D:! Y] C(D) as Z where .X = () {} +impl forall [D: Y] C(D) as Z where .X = () {} -fn F[D:! Y](unused d: D) { +fn F[D: Y](unused d: D) { // The FacetValue deduced for the param of `C` will be a symbolic FacetValue // because we are in a generic where `D` is an unknown type, which will cause // the query and impl self type to be C(FacetValue) for a symbolic FacetValue. @@ -251,13 +251,13 @@ fn F[D:! Y](unused d: D) { library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } class C {} impl C* as Z where .X = C {} -impl forall [T:! type] T* as Z where .X = () {} +impl forall [T: type] T* as Z where .X = () {} fn F() { // The specialization of `Z(C)` should match in preference to the blanket impl @@ -270,10 +270,10 @@ fn F() { library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } -impl forall [T:! type] T* as Z where .X = () {} +impl forall [T: type] T* as Z where .X = () {} class C {} impl C* as Z where .X = C {} @@ -289,17 +289,17 @@ fn F() { library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } -class C(T:! type) {} +class C(T: type) {} // This impl makes a cycle, but it's not considered at all for `C(())` since // there is another impl with a better type structure, so no diagnostic is // emitted. -impl forall [T:! Z] T as Z where .X = () {} +impl forall [T: Z] T as Z where .X = () {} // Also a cycle, and also a worse match for `C(())`. -impl forall [T:! Z] C(T) as Z where .X = () {} +impl forall [T: Z] C(T) as Z where .X = () {} impl C(()) as Z where .X = C(()) {} @@ -310,17 +310,17 @@ fn F() { // --- final_specialization_before_generic_use_of_type_constant.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } class C {} -impl forall [T:! type, U:! type] T as Z(U) where .X = () {} +impl forall [T: type, U: type] T as Z(U) where .X = () {} -final impl forall [T:! type] T as Z(C) where .X = C {} +final impl forall [T: type] T as Z(C) where .X = C {} -fn F[unused U:! type](T:! Z(C)) { +fn F[unused U: type](generic T: Z(C)) { // The value of `.X` can be known to be `C` here when the impl `T as Z(C)` is // final. let unused a: T.X = {} as C; @@ -329,15 +329,15 @@ fn F[unused U:! type](T:! Z(C)) { // --- fail_specialization_written_after_generic_use_of_type_constant.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } class C {} -impl forall [T:! type, U:! type] T as Z(U) where .X = () {} +impl forall [T: type, U: type] T as Z(U) where .X = () {} -fn F[unused U:! type](T:! Z(C)) { +fn F[unused U: type](generic T: Z(C)) { // The value of `.X` is symbolic, it can't be assigned a value of type `C`. // CHECK:STDERR: fail_specialization_written_after_generic_use_of_type_constant.carbon:[[@LINE+7]]:23: error: cannot implicitly convert expression of type `C` to `T.(Z(C).X)` [ConversionFailure] // CHECK:STDERR: let unused a: T.X = {} as C; @@ -349,28 +349,28 @@ fn F[unused U:! type](T:! Z(C)) { let unused a: T.X = {} as C; } -final impl forall [T:! type] T as Z(C) where .X = C {} +final impl forall [T: type] T as Z(C) where .X = C {} // --- specialization_written_after_generic_use.carbon library "[[@TEST_NAME]]"; interface Z { - let V:! type; + let V: type; fn ZZ() -> V*; } var t: (); interface Y {} -impl forall [T:! Y] T as Z where .V = () { +impl forall [T: Y] T as Z where .V = () { fn ZZ() -> ()* { return &t; } } -fn H(W:! Z, X: W.(Z.V)*) -> W.(Z.V)* { +fn H(generic W: Z, X: W.(Z.V)*) -> W.(Z.V)* { return X; } -fn G(U:! Y) -> U.(Z.V)* { +fn G(generic U: Y) -> U.(Z.V)* { return H(U, U.(Z.ZZ)()); } @@ -391,23 +391,23 @@ fn F() { // --- specialization_written_after_generic_use_with_generic_interface.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let V:! type; +interface Z(T: type) { + let V: type; fn ZZ() -> V*; } var t: (); interface Y {} -impl forall [T:! Y] T as Z(T) where .V = () { +impl forall [T: Y] T as Z(T) where .V = () { fn ZZ() -> ()* { return &t; } } -fn H(U:! Y, W:! Y & Z(U), X: W.(Z(U).V)*) -> W.(Z(U).V)* { +fn H(generic U: Y, generic W: Y & Z(U), X: W.(Z(U).V)*) -> W.(Z(U).V)* { return X; } -fn G(U:! Y) -> U.(Z(U).V)* { +fn G(generic U: Y) -> U.(Z(U).V)* { return H(U, U, U.(Z(U).ZZ)()); } @@ -428,24 +428,24 @@ fn F() { // --- type_structure_first_difference.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; fn MakeX() -> X; } class C {} // Type structure: "?(?)" -impl forall [T:! type] T as Z(T) where .X = {.less_good: ()} { +impl forall [T: type] T as Z(T) where .X = {.less_good: ()} { fn MakeX() -> {.less_good: ()} { return {.less_good = ()}; } } // Type structure: "?(c)". Should outrank the previous impl. -impl forall [T:! type] T as Z(C) where .X = () { +impl forall [T: type] T as Z(C) where .X = () { fn MakeX() -> () { return (); } } -fn F(T:! Z(C)) -> T.(Z(C).X) { +fn F(generic T: Z(C)) -> T.(Z(C).X) { return T.MakeX(); } @@ -457,13 +457,13 @@ fn G() { // --- extend_impl_as_specialization.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } -impl forall [T:! type, S:! type] T as Z(S) where .X = {} {} +impl forall [T: type, S: type] T as Z(S) where .X = {} {} -class C(S:! type) { +class C(S: type) { extend impl as Z(S) where .X = () {} fn CC(a: Self.(Z(S).X)*) -> Self.(Z(S).X)* { return a; } } @@ -477,13 +477,13 @@ fn F() { // --- final_impl_as_specialization.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } -impl forall [T:! type, S:! type] T as Z(S) where .X = {} {} +impl forall [T: type, S: type] T as Z(S) where .X = {} {} -class C(S:! type) { +class C(S: type) { final impl as Z(S) where .X = () {} fn CC() -> Self.(Z(S).X) { return (); } } @@ -495,13 +495,13 @@ fn F() { // --- final_extend_impl_as_specialization.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } -impl forall [T:! type, S:! type] T as Z(S) where .X = {} {} +impl forall [T: type, S: type] T as Z(S) where .X = {} {} -class C(S:! type) { +class C(S: type) { extend final impl as Z(S) where .X = () {} fn CC() -> Self.(Z(S).X) { return (); } } diff --git a/toolchain/check/testdata/impl/lookup/specialization_poison.carbon b/toolchain/check/testdata/impl/lookup/specialization_poison.carbon index ac41ebe20a8c..d0d1806f0987 100644 --- a/toolchain/check/testdata/impl/lookup/specialization_poison.carbon +++ b/toolchain/check/testdata/impl/lookup/specialization_poison.carbon @@ -14,18 +14,18 @@ library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; fn F(self) -> T; } -impl forall [U:! type] U as I where .T = () { +impl forall [U: type] U as I where .T = () { fn F(unused self) -> () { return (); } } -// CHECK:STDERR: fail_final_poisoned_concrete_query_in_specific.carbon:[[@LINE+3]]:25: error: found `impl` that would change the result of an earlier use of `C* as I` [PoisonedImplLookupConcreteResult] -// CHECK:STDERR: fn H[W:! type](v: W) -> W.(I.T) { -// CHECK:STDERR: ^~~~~~~ -fn H[W:! type](v: W) -> W.(I.T) { +// CHECK:STDERR: fail_final_poisoned_concrete_query_in_specific.carbon:[[@LINE+3]]:24: error: found `impl` that would change the result of an earlier use of `C* as I` [PoisonedImplLookupConcreteResult] +// CHECK:STDERR: fn H[W: type](v: W) -> W.(I.T) { +// CHECK:STDERR: ^~~~~~~ +fn H[W: type](v: W) -> W.(I.T) { return v.(I.F)(); } @@ -40,8 +40,8 @@ fn G(p: C*) -> () { // CHECK:STDERR: impl C* as I where .T = C { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_final_poisoned_concrete_query_in_specific.carbon:[[@LINE-21]]:1: note: the use had selected the `impl` here [PoisonedImplLookupConcreteResultNotePreviousImpl] -// CHECK:STDERR: impl forall [U:! type] U as I where .T = () { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [U: type] U as I where .T = () { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: impl C* as I where .T = C { fn F(self) -> C { return *self; } @@ -51,14 +51,14 @@ impl C* as I where .T = C { library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } -impl forall [U:! type] U as I where .T = () {} +impl forall [U: type] U as I where .T = () {} class C {} -fn H[W:! type](unused v: W) { +fn H[W: type](unused v: W) { // This concrete impl lookup query poisons any further specializations. // CHECK:STDERR: fail_final_poisoned_concrete_query_in_generic.carbon:[[@LINE+3]]:17: error: found `impl` that would change the result of an earlier use of `C as I` [PoisonedImplLookupConcreteResult] // CHECK:STDERR: let unused a: C.(I.T) = (); @@ -70,8 +70,8 @@ fn H[W:! type](unused v: W) { // CHECK:STDERR: impl C as I where .T = C {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_final_poisoned_concrete_query_in_generic.carbon:[[@LINE-15]]:1: note: the use had selected the `impl` here [PoisonedImplLookupConcreteResultNotePreviousImpl] -// CHECK:STDERR: impl forall [U:! type] U as I where .T = () {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [U: type] U as I where .T = () {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: impl C as I where .T = C {} @@ -79,13 +79,13 @@ impl C as I where .T = C {} library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; fn F(self) -> T; } -class C(U:! type) {} +class C(U: type) {} -impl forall [U:! type] C(U) as I where .T = () { +impl forall [U: type] C(U) as I where .T = () { fn F(unused self) -> () { return (); } } @@ -101,8 +101,8 @@ fn G(c: C(())) -> () { // CHECK:STDERR: impl C(()) as I where .T = {} { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_final_poisoned_concrete_query_nested_type_in_self.carbon:[[@LINE-15]]:1: note: the use had selected the `impl` here [PoisonedImplLookupConcreteResultNotePreviousImpl] -// CHECK:STDERR: impl forall [U:! type] C(U) as I where .T = () { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [U: type] C(U) as I where .T = () { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: impl C(()) as I where .T = {} { fn F(unused self) -> {} { return {}; } @@ -111,12 +111,12 @@ impl C(()) as I where .T = {} { // --- fail_final_poisoned_concrete_query_nested_type_in_interface.carbon library "[[@TEST_NAME]]"; -interface I(U:! type) { - let T:! type; +interface I(U: type) { + let T: type; fn F(self) -> T; } -impl forall [U:! type] U as I(U) where .T = () { +impl forall [U: type] U as I(U) where .T = () { fn F(unused self) -> () { return (); } } @@ -134,8 +134,8 @@ fn G(c: C) -> () { // CHECK:STDERR: impl C as I(C) where .T = {} { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_final_poisoned_concrete_query_nested_type_in_interface.carbon:[[@LINE-17]]:1: note: the use had selected the `impl` here [PoisonedImplLookupConcreteResultNotePreviousImpl] -// CHECK:STDERR: impl forall [U:! type] U as I(U) where .T = () { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [U: type] U as I(U) where .T = () { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: impl C as I(C) where .T = {} { fn F(unused self) -> {} { return {}; } @@ -145,27 +145,27 @@ impl C as I(C) where .T = {} { library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; fn F(self) -> T; } -impl forall [U:! type] U as I where .T = () { +impl forall [U: type] U as I where .T = () { fn F(unused self) -> () { return (); } } -fn H[W:! type](v: W) -> W.(I.T) { +fn H[W: type](v: W) -> W.(I.T) { return v.(I.F)(); } // This function could return a concrete `X` if it saw the `final` impl below. -fn G[X:! type](p: X*) -> (X*).(I.T) { +fn G[X: type](p: X*) -> (X*).(I.T) { return H(p); } // TODO: This should be diagnosed as poisoned, as H() uses an associated // constant from the `impl` which was treated as a symbolic, but this would // change it to be a concrete type. -final impl forall [V:! Core.Copy] V* as I where .T = V { +final impl forall [V: Core.Copy] V* as I where .T = V { fn F(self) -> V { return *self; } } @@ -180,8 +180,8 @@ fn F() { // CHECK:STDERR: ^~~~ // CHECK:STDERR: musteval fn G() -> auto { - class C(T:! type) {} - impl forall [T:! type] C(T) as Z {} + class C(T: type) {} + impl forall [T: type] C(T) as Z {} C(D) as Z; return C(D); } diff --git a/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon b/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon index eb553079c2be..cf6e934b4a22 100644 --- a/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon +++ b/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon @@ -15,17 +15,17 @@ // --- final_specialized_symbolic_rewrite.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } class C {} -impl forall [T:! type, S:! type] T as Z(S) where .X = () {} +impl forall [T: type, S: type] T as Z(S) where .X = () {} -final impl forall [T:! type] T as Z(C) where .X = T {} +final impl forall [T: type] T as Z(C) where .X = T {} -fn F(T:! Z(C), t: T) { +fn F(generic T: Z(C), t: T) { // This should typecheck, the `final impl` should give the same `T`. let unused a: T.X = t; } @@ -33,18 +33,18 @@ fn F(T:! Z(C), t: T) { // --- fail_nonfinal_specialized_symbolic_rewrite.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } interface Y {} class C {} -impl forall [T:! type, S:! type] T as Z(S) where .X = () {} +impl forall [T: type, S: type] T as Z(S) where .X = () {} -impl forall [T:! type] T as Z(C) where .X = T {} +impl forall [T: type] T as Z(C) where .X = T {} -fn F(T:! Z(C), t: T) { +fn F(generic T: Z(C), t: T) { // CHECK:STDERR: fail_nonfinal_specialized_symbolic_rewrite.carbon:[[@LINE+7]]:23: error: cannot implicitly convert expression of type `T` to `T.(Z(C).X)` [ConversionFailure] // CHECK:STDERR: let unused a: T.X = t; // CHECK:STDERR: ^ @@ -59,12 +59,12 @@ fn F(T:! Z(C), t: T) { library "[[@TEST_NAME]]"; interface Ptr { - let Type:! type; + let Type: type; } -final impl forall [U:! type] U as Ptr where .Type = U* {} +final impl forall [U: type] U as Ptr where .Type = U* {} -fn F[T:! type](var t: T) -> T.(Ptr.Type) { +fn F[T: type](var t: T) -> T.(Ptr.Type) { return &t; } @@ -72,12 +72,12 @@ fn F[T:! type](var t: T) -> T.(Ptr.Type) { library "[[@TEST_NAME]]"; interface Ptr { - let Type:! type; + let Type: type; } -final impl forall [U:! type] U as Ptr where .Type = U* {} +final impl forall [U: type] U as Ptr where .Type = U* {} -fn F[T:! Ptr](var t: T) -> T.Type { +fn F[T: Ptr](var t: T) -> T.Type { return &t; } @@ -85,12 +85,12 @@ fn F[T:! Ptr](var t: T) -> T.Type { library "[[@TEST_NAME]]"; interface Ptr { - let Type:! type; + let Type: type; } -final impl forall [U:! type] U as Ptr where .Type = U* {} +final impl forall [U: type] U as Ptr where .Type = U* {} -fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { +fn F[T: Ptr](var t: T) -> T.(Ptr.Type) { return &t; } @@ -182,97 +182,97 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.decl: %Z.type.c39 = interface_decl @Z [concrete = constants.%Z.generic] { // CHECK:STDOUT: %T.patt.loc3_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_14.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_16.1: type = splice_block %.loc3_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc3_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_14.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: impl_decl @T.as.Z.impl.447 [concrete] { // CHECK:STDOUT: %T.patt.loc9_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %S.patt.loc9_25.1: %pattern_type.98f = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc9_25.2 (constants.%S.patt)] +// CHECK:STDOUT: %S.patt.loc9_24.1: %pattern_type.98f = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc9_24.2 (constants.%S.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc9_15.1 [symbolic = %T.loc9_15.2 (constants.%T.67d)] // CHECK:STDOUT: %Z.ref: %Z.type.c39 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] -// CHECK:STDOUT: %S.ref: type = name_ref S, %S.loc9_25.1 [symbolic = %S.loc9_25.2 (constants.%S)] -// CHECK:STDOUT: %Z.type.loc9_42.1: type = facet_type <@Z, @Z(constants.%S)> [symbolic = %Z.type.loc9_42.2 (constants.%Z.type.78b)] -// CHECK:STDOUT: %.Self.frozen.loc9_44.1: @T.as.Z.impl.447.%Z.type.loc9_42.2 (%Z.type.78b) = symbolic_binding .Self [symbolic = %.Self.frozen.loc9_44.2 (constants.%.Self.frozen.e6b)] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.type.loc9_42.1 [concrete] -// CHECK:STDOUT: %.Self.ref: @T.as.Z.impl.447.%Z.type.loc9_42.2 (%Z.type.78b) = name_ref .Self, %.Self.frozen.loc9_44.1 [symbolic = %.Self.frozen.loc9_44.2 (constants.%.Self.frozen.e6b)] +// CHECK:STDOUT: %S.ref: type = name_ref S, %S.loc9_24.1 [symbolic = %S.loc9_24.2 (constants.%S)] +// CHECK:STDOUT: %Z.type.loc9_40.1: type = facet_type <@Z, @Z(constants.%S)> [symbolic = %Z.type.loc9_40.2 (constants.%Z.type.78b)] +// CHECK:STDOUT: %.Self.frozen.loc9_42.1: @T.as.Z.impl.447.%Z.type.loc9_40.2 (%Z.type.78b) = symbolic_binding .Self [symbolic = %.Self.frozen.loc9_42.2 (constants.%.Self.frozen.e6b)] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.type.loc9_40.1 [concrete] +// CHECK:STDOUT: %.Self.ref: @T.as.Z.impl.447.%Z.type.loc9_40.2 (%Z.type.78b) = name_ref .Self, %.Self.frozen.loc9_42.1 [symbolic = %.Self.frozen.loc9_42.2 (constants.%.Self.frozen.e6b)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.d9d)] -// CHECK:STDOUT: %.loc9_50.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.d9d)] -// CHECK:STDOUT: %.loc9_50.2: @T.as.Z.impl.447.%Z.assoc_type (%Z.assoc_type.083) = specific_constant @X.%assoc0, @Z.WithSelf(constants.%S, constants.%.Self.frozen.e6b) [symbolic = %assoc0 (constants.%assoc0.c53)] -// CHECK:STDOUT: %X.ref: @T.as.Z.impl.447.%Z.assoc_type (%Z.assoc_type.083) = name_ref X, %.loc9_50.2 [symbolic = %assoc0 (constants.%assoc0.c53)] -// CHECK:STDOUT: %impl.elem0.loc9_50.1: type = impl_witness_access constants.%Z.lookup_impl_witness.aff, element0 [symbolic = %impl.elem0.loc9_50.3 (constants.%impl.elem0.4c0)] -// CHECK:STDOUT: %.loc9_56.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_56.2: type = converted %.loc9_56.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %rewrite.loc9_53.1 = requirement_rewrite %impl.elem0.loc9_50.1, %.loc9_56.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc9_50.2: type = impl_witness_access constants.%Z.lookup_impl_witness.d10, element0 [symbolic = %impl.elem0.loc9_50.4 (constants.%impl.elem0.1d4)] -// CHECK:STDOUT: %rewrite.loc9_53.2 = requirement_rewrite %impl.elem0.loc9_50.2, %.loc9_56.2 [concrete] -// CHECK:STDOUT: %.loc9_44: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.a2b)] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.type.loc9_42.1 [concrete] -// CHECK:STDOUT: %rewrite.loc9_53.2 = requirement_rewrite %impl.elem0.loc9_50.2, %.loc9_56.2 [concrete] +// CHECK:STDOUT: %.loc9_48.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.d9d)] +// CHECK:STDOUT: %.loc9_48.2: @T.as.Z.impl.447.%Z.assoc_type (%Z.assoc_type.083) = specific_constant @X.%assoc0, @Z.WithSelf(constants.%S, constants.%.Self.frozen.e6b) [symbolic = %assoc0 (constants.%assoc0.c53)] +// CHECK:STDOUT: %X.ref: @T.as.Z.impl.447.%Z.assoc_type (%Z.assoc_type.083) = name_ref X, %.loc9_48.2 [symbolic = %assoc0 (constants.%assoc0.c53)] +// CHECK:STDOUT: %impl.elem0.loc9_48.1: type = impl_witness_access constants.%Z.lookup_impl_witness.aff, element0 [symbolic = %impl.elem0.loc9_48.3 (constants.%impl.elem0.4c0)] +// CHECK:STDOUT: %.loc9_54.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_54.2: type = converted %.loc9_54.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %rewrite.loc9_51.1 = requirement_rewrite %impl.elem0.loc9_48.1, %.loc9_54.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc9_48.2: type = impl_witness_access constants.%Z.lookup_impl_witness.d10, element0 [symbolic = %impl.elem0.loc9_48.4 (constants.%impl.elem0.1d4)] +// CHECK:STDOUT: %rewrite.loc9_51.2 = requirement_rewrite %impl.elem0.loc9_48.2, %.loc9_54.2 [concrete] +// CHECK:STDOUT: %.loc9_42: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.a2b)] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.type.loc9_40.1 [concrete] +// CHECK:STDOUT: %rewrite.loc9_51.2 = requirement_rewrite %impl.elem0.loc9_48.2, %.loc9_54.2 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc9_17.1: type = splice_block %.loc9_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc9_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc9_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.2 (constants.%T.67d)] -// CHECK:STDOUT: %.loc9_28.1: type = splice_block %.loc9_28.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc9_25: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc9_28.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_26.1: type = splice_block %.loc9_26.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc9_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc9_26.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %S.loc9_25.1: type = symbolic_binding S, 1 [symbolic = %S.loc9_25.2 (constants.%S)] +// CHECK:STDOUT: %S.loc9_24.1: type = symbolic_binding S, 1 [symbolic = %S.loc9_24.2 (constants.%S)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @T.as.Z.impl.adf [concrete] { // CHECK:STDOUT: %T.patt.loc11_21.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_21.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc11_30: type = name_ref T, %T.loc11_21.1 [symbolic = %T.loc11_21.2 (constants.%T.67d)] +// CHECK:STDOUT: %T.ref.loc11_29: type = name_ref T, %T.loc11_21.1 [symbolic = %T.loc11_21.2 (constants.%T.67d)] // CHECK:STDOUT: %Z.ref: %Z.type.c39 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.963] -// CHECK:STDOUT: %.Self.frozen.loc11_40: %Z.type.963 = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.16f] +// CHECK:STDOUT: %.Self.frozen.loc11_39: %Z.type.963 = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.16f] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.type [concrete] -// CHECK:STDOUT: %.Self.ref: %Z.type.963 = name_ref .Self, %.Self.frozen.loc11_40 [symbolic_self = constants.%.Self.frozen.16f] +// CHECK:STDOUT: %.Self.ref: %Z.type.963 = name_ref .Self, %.Self.frozen.loc11_39 [symbolic_self = constants.%.Self.frozen.16f] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type.16b] -// CHECK:STDOUT: %.loc11_46.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type.16b] -// CHECK:STDOUT: %.loc11_46.2: %Z.assoc_type.f4d = specific_constant @X.%assoc0, @Z.WithSelf(constants.%C, constants.%.Self.frozen.16f) [concrete = constants.%assoc0.169] -// CHECK:STDOUT: %X.ref: %Z.assoc_type.f4d = name_ref X, %.loc11_46.2 [concrete = constants.%assoc0.169] -// CHECK:STDOUT: %impl.elem0.loc11_46.1: type = impl_witness_access constants.%Z.lookup_impl_witness.9bf, element0 [symbolic_self = constants.%impl.elem0.b30] -// CHECK:STDOUT: %T.ref.loc11_51: type = name_ref T, %T.loc11_21.1 [symbolic = %T.loc11_21.2 (constants.%T.67d)] -// CHECK:STDOUT: %rewrite.loc11_49.1 = requirement_rewrite %impl.elem0.loc11_46.1, %T.ref.loc11_51 [concrete] -// CHECK:STDOUT: %impl.elem0.loc11_46.2: type = impl_witness_access constants.%Z.lookup_impl_witness.e93, element0 [symbolic_self = constants.%impl.elem0.3ed] -// CHECK:STDOUT: %rewrite.loc11_49.2 = requirement_rewrite %impl.elem0.loc11_46.2, %T.ref.loc11_51 [concrete] -// CHECK:STDOUT: %.loc11_40: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.b22)] { +// CHECK:STDOUT: %.loc11_45.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type.16b] +// CHECK:STDOUT: %.loc11_45.2: %Z.assoc_type.f4d = specific_constant @X.%assoc0, @Z.WithSelf(constants.%C, constants.%.Self.frozen.16f) [concrete = constants.%assoc0.169] +// CHECK:STDOUT: %X.ref: %Z.assoc_type.f4d = name_ref X, %.loc11_45.2 [concrete = constants.%assoc0.169] +// CHECK:STDOUT: %impl.elem0.loc11_45.1: type = impl_witness_access constants.%Z.lookup_impl_witness.9bf, element0 [symbolic_self = constants.%impl.elem0.b30] +// CHECK:STDOUT: %T.ref.loc11_50: type = name_ref T, %T.loc11_21.1 [symbolic = %T.loc11_21.2 (constants.%T.67d)] +// CHECK:STDOUT: %rewrite.loc11_48.1 = requirement_rewrite %impl.elem0.loc11_45.1, %T.ref.loc11_50 [concrete] +// CHECK:STDOUT: %impl.elem0.loc11_45.2: type = impl_witness_access constants.%Z.lookup_impl_witness.e93, element0 [symbolic_self = constants.%impl.elem0.3ed] +// CHECK:STDOUT: %rewrite.loc11_48.2 = requirement_rewrite %impl.elem0.loc11_45.2, %T.ref.loc11_50 [concrete] +// CHECK:STDOUT: %.loc11_39: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.b22)] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.type [concrete] -// CHECK:STDOUT: %rewrite.loc11_49.2 = requirement_rewrite %impl.elem0.loc11_46.2, %T.ref.loc11_51 [concrete] +// CHECK:STDOUT: %rewrite.loc11_48.2 = requirement_rewrite %impl.elem0.loc11_45.2, %T.ref.loc11_50 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_24.1: type = splice_block %.loc11_24.2 [concrete = type] { +// CHECK:STDOUT: %.loc11_23.1: type = splice_block %.loc11_23.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc11_21: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc11_24.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc11_23.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc11_21.1: type = symbolic_binding T, 0 [symbolic = %T.loc11_21.2 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc13_7.1: %pattern_type.d7e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt.4cc)] -// CHECK:STDOUT: %t.param_patt.loc13_17.1: @F.%pattern_type (%pattern_type.d37) = value_param_pattern [symbolic = %t.param_patt.loc13_17.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc13_17.1: @F.%pattern_type (%pattern_type.d37) = at_binding_pattern t, %t.param_patt.loc13_17.1 [symbolic = %t.patt.loc13_17.2 (constants.%t.patt)] +// CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.d7e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.4cc)] +// CHECK:STDOUT: %t.param_patt.loc13_24.1: @F.%pattern_type (%pattern_type.d37) = value_param_pattern [symbolic = %t.param_patt.loc13_24.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc13_24.1: @F.%pattern_type (%pattern_type.d37) = at_binding_pattern t, %t.param_patt.loc13_24.1 [symbolic = %t.patt.loc13_24.2 (constants.%t.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_13: type = splice_block %Z.type [concrete = constants.%Z.type.963] { +// CHECK:STDOUT: %.loc13_20: type = splice_block %Z.type [concrete = constants.%Z.type.963] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %Z.ref: %Z.type.c39 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.963] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc13_7.2: %Z.type.963 = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T.4b3)] -// CHECK:STDOUT: %t.param: @F.%T.as_type.loc13_19.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc13_19.1: type = splice_block %.loc13_19.2 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc13: %Z.type.963 = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T.4b3)] -// CHECK:STDOUT: %T.as_type.loc13_19.2: type = facet_access_type %T.ref.loc13 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc13_19.2: type = converted %T.ref.loc13, %T.as_type.loc13_19.2 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc13_15.2: %Z.type.963 = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T.4b3)] +// CHECK:STDOUT: %t.param: @F.%T.as_type.loc13_26.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc13_26.1: type = splice_block %.loc13_26.2 [symbolic = %T.as_type.loc13_26.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref.loc13: %Z.type.963 = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T.4b3)] +// CHECK:STDOUT: %T.as_type.loc13_26.2: type = facet_access_type %T.ref.loc13 [symbolic = %T.as_type.loc13_26.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc13_26.2: type = converted %T.ref.loc13, %T.as_type.loc13_26.2 [symbolic = %T.as_type.loc13_26.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @F.%T.as_type.loc13_19.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @F.%T.as_type.loc13_26.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -282,10 +282,10 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc3_14.1)> [symbolic = %Z.type (constants.%Z.type.924)] -// CHECK:STDOUT: %Self.loc3_23.2: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.21f)] +// CHECK:STDOUT: %Self.loc3_22.2: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self.21f)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_23.1: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.21f)] +// CHECK:STDOUT: %Self.loc3_22.1: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self.21f)] // CHECK:STDOUT: %Z.WithSelf.decl = interface_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -294,7 +294,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_23.1 +// CHECK:STDOUT: .Self = %Self.loc3_22.1 // CHECK:STDOUT: .X = @X.%assoc0 // CHECK:STDOUT: witness = (@Z.WithSelf.%X) // CHECK:STDOUT: @@ -304,36 +304,36 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @T.as.Z.impl.447(%T.loc9_15.1: type, %S.loc9_25.1: type) { +// CHECK:STDOUT: generic impl @T.as.Z.impl.447(%T.loc9_15.1: type, %S.loc9_24.1: type) { // CHECK:STDOUT: %T.patt.loc9_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt.d47)] // CHECK:STDOUT: %T.loc9_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.2 (constants.%T.67d)] -// CHECK:STDOUT: %S.patt.loc9_25.2: %pattern_type.98f = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc9_25.2 (constants.%S.patt)] -// CHECK:STDOUT: %S.loc9_25.2: type = symbolic_binding S, 1 [symbolic = %S.loc9_25.2 (constants.%S)] -// CHECK:STDOUT: %Z.type.loc9_42.2: type = facet_type <@Z, @Z(%S.loc9_25.2)> [symbolic = %Z.type.loc9_42.2 (constants.%Z.type.78b)] -// CHECK:STDOUT: %.Self.frozen.loc9_44.2: @T.as.Z.impl.447.%Z.type.loc9_42.2 (%Z.type.78b) = symbolic_binding .Self [symbolic = %.Self.frozen.loc9_44.2 (constants.%.Self.frozen.e6b)] -// CHECK:STDOUT: %require_complete.loc9_50: = require_complete_type %Z.type.loc9_42.2 [symbolic = %require_complete.loc9_50 (constants.%require_complete.291)] -// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc9_44.2 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.d9d)] -// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%S.loc9_25.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.083)] +// CHECK:STDOUT: %S.patt.loc9_24.2: %pattern_type.98f = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc9_24.2 (constants.%S.patt)] +// CHECK:STDOUT: %S.loc9_24.2: type = symbolic_binding S, 1 [symbolic = %S.loc9_24.2 (constants.%S)] +// CHECK:STDOUT: %Z.type.loc9_40.2: type = facet_type <@Z, @Z(%S.loc9_24.2)> [symbolic = %Z.type.loc9_40.2 (constants.%Z.type.78b)] +// CHECK:STDOUT: %.Self.frozen.loc9_42.2: @T.as.Z.impl.447.%Z.type.loc9_40.2 (%Z.type.78b) = symbolic_binding .Self [symbolic = %.Self.frozen.loc9_42.2 (constants.%.Self.frozen.e6b)] +// CHECK:STDOUT: %require_complete.loc9_48: = require_complete_type %Z.type.loc9_40.2 [symbolic = %require_complete.loc9_48 (constants.%require_complete.291)] +// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc9_42.2 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.d9d)] +// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%S.loc9_24.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.083)] // CHECK:STDOUT: %assoc0: @T.as.Z.impl.447.%Z.assoc_type (%Z.assoc_type.083) = assoc_entity element0, @Z.WithSelf.%X [symbolic = %assoc0 (constants.%assoc0.c53)] -// CHECK:STDOUT: %Z.lookup_impl_witness.loc9_50.1: = lookup_impl_witness %.Self.frozen.loc9_44.2, @Z, @Z(%S.loc9_25.2) [symbolic = %Z.lookup_impl_witness.loc9_50.1 (constants.%Z.lookup_impl_witness.aff)] -// CHECK:STDOUT: %impl.elem0.loc9_50.3: type = impl_witness_access %Z.lookup_impl_witness.loc9_50.1, element0 [symbolic = %impl.elem0.loc9_50.3 (constants.%impl.elem0.4c0)] -// CHECK:STDOUT: %.Self: @T.as.Z.impl.447.%Z.type.loc9_42.2 (%Z.type.78b) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.6d3)] -// CHECK:STDOUT: %Z.lookup_impl_witness.loc9_50.2: = lookup_impl_witness %.Self, @Z, @Z(%S.loc9_25.2) [symbolic = %Z.lookup_impl_witness.loc9_50.2 (constants.%Z.lookup_impl_witness.d10)] -// CHECK:STDOUT: %impl.elem0.loc9_50.4: type = impl_witness_access %Z.lookup_impl_witness.loc9_50.2, element0 [symbolic = %impl.elem0.loc9_50.4 (constants.%impl.elem0.1d4)] -// CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%S.loc9_25.2) where %impl.elem0.loc9_50.4 = constants.%empty_tuple.type> [symbolic = %Z_where.type (constants.%Z_where.type.a2b)] -// CHECK:STDOUT: %Z.impl_witness.loc9_58.2: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.447(%T.loc9_15.2, %S.loc9_25.2) [symbolic = %Z.impl_witness.loc9_58.2 (constants.%Z.impl_witness.c0c)] +// CHECK:STDOUT: %Z.lookup_impl_witness.loc9_48.1: = lookup_impl_witness %.Self.frozen.loc9_42.2, @Z, @Z(%S.loc9_24.2) [symbolic = %Z.lookup_impl_witness.loc9_48.1 (constants.%Z.lookup_impl_witness.aff)] +// CHECK:STDOUT: %impl.elem0.loc9_48.3: type = impl_witness_access %Z.lookup_impl_witness.loc9_48.1, element0 [symbolic = %impl.elem0.loc9_48.3 (constants.%impl.elem0.4c0)] +// CHECK:STDOUT: %.Self: @T.as.Z.impl.447.%Z.type.loc9_40.2 (%Z.type.78b) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.6d3)] +// CHECK:STDOUT: %Z.lookup_impl_witness.loc9_48.2: = lookup_impl_witness %.Self, @Z, @Z(%S.loc9_24.2) [symbolic = %Z.lookup_impl_witness.loc9_48.2 (constants.%Z.lookup_impl_witness.d10)] +// CHECK:STDOUT: %impl.elem0.loc9_48.4: type = impl_witness_access %Z.lookup_impl_witness.loc9_48.2, element0 [symbolic = %impl.elem0.loc9_48.4 (constants.%impl.elem0.1d4)] +// CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%S.loc9_24.2) where %impl.elem0.loc9_48.4 = constants.%empty_tuple.type> [symbolic = %Z_where.type (constants.%Z_where.type.a2b)] +// CHECK:STDOUT: %Z.impl_witness.loc9_56.2: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.447(%T.loc9_15.2, %S.loc9_24.2) [symbolic = %Z.impl_witness.loc9_56.2 (constants.%Z.impl_witness.c0c)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc9_44: = require_complete_type %Z_where.type [symbolic = %require_complete.loc9_44 (constants.%require_complete.9b7)] +// CHECK:STDOUT: %require_complete.loc9_42: = require_complete_type %Z_where.type [symbolic = %require_complete.loc9_42 (constants.%require_complete.9b7)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %T.ref as %.loc9_44 { +// CHECK:STDOUT: impl: %T.ref as %.loc9_42 { // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @T.as.Z.impl.447 [concrete] -// CHECK:STDOUT: %Z.impl_witness.loc9_58.1: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.447(constants.%T.67d, constants.%S) [symbolic = %Z.impl_witness.loc9_58.2 (constants.%Z.impl_witness.c0c)] +// CHECK:STDOUT: %Z.impl_witness.loc9_56.1: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.447(constants.%T.67d, constants.%S) [symbolic = %Z.impl_witness.loc9_56.2 (constants.%Z.impl_witness.c0c)] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %.loc9_44 -// CHECK:STDOUT: witness = %Z.impl_witness.loc9_58.1 +// CHECK:STDOUT: extend %.loc9_42 +// CHECK:STDOUT: witness = %Z.impl_witness.loc9_56.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -341,19 +341,19 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.patt.loc11_21.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_21.2 (constants.%T.patt.d47)] // CHECK:STDOUT: %T.loc11_21.2: type = symbolic_binding T, 0 [symbolic = %T.loc11_21.2 (constants.%T.67d)] // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(constants.%C) where constants.%impl.elem0.3ed = %T.loc11_21.2> [symbolic = %Z_where.type (constants.%Z_where.type.b22)] -// CHECK:STDOUT: %Z.impl_witness.loc11_53.2: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.adf(%T.loc11_21.2) [symbolic = %Z.impl_witness.loc11_53.2 (constants.%Z.impl_witness.2d9)] +// CHECK:STDOUT: %Z.impl_witness.loc11_52.2: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.adf(%T.loc11_21.2) [symbolic = %Z.impl_witness.loc11_52.2 (constants.%Z.impl_witness.2d9)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete.d7e)] // CHECK:STDOUT: -// CHECK:STDOUT: final impl: %T.ref.loc11_30 as %.loc11_40 { +// CHECK:STDOUT: final impl: %T.ref.loc11_29 as %.loc11_39 { // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @T.as.Z.impl.adf [concrete] -// CHECK:STDOUT: %Z.impl_witness.loc11_53.1: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.adf(constants.%T.67d) [symbolic = %Z.impl_witness.loc11_53.2 (constants.%Z.impl_witness.2d9)] +// CHECK:STDOUT: %Z.impl_witness.loc11_52.1: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.adf(constants.%T.67d) [symbolic = %Z.impl_witness.loc11_52.2 (constants.%Z.impl_witness.2d9)] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%T.67d [symbolic = %T.loc11_21.2 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %.loc11_40 -// CHECK:STDOUT: witness = %Z.impl_witness.loc11_53.1 +// CHECK:STDOUT: extend %.loc11_39 +// CHECK:STDOUT: witness = %Z.impl_witness.loc11_52.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -365,31 +365,31 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc13_7.2: %Z.type.963) { -// CHECK:STDOUT: %T.patt.loc13_7.2: %pattern_type.d7e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt.4cc)] -// CHECK:STDOUT: %T.loc13_7.1: %Z.type.963 = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T.4b3)] -// CHECK:STDOUT: %T.as_type.loc13_19.1: type = facet_access_type %T.loc13_7.1 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc13_19.1 [symbolic = %pattern_type (constants.%pattern_type.d37)] -// CHECK:STDOUT: %t.param_patt.loc13_17.2: @F.%pattern_type (%pattern_type.d37) = value_param_pattern [symbolic = %t.param_patt.loc13_17.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc13_17.2: @F.%pattern_type (%pattern_type.d37) = at_binding_pattern t, %t.param_patt.loc13_17.2 [symbolic = %t.patt.loc13_17.2 (constants.%t.patt)] +// CHECK:STDOUT: generic fn @F(%T.loc13_15.2: %Z.type.963) { +// CHECK:STDOUT: %T.patt.loc13_15.2: %pattern_type.d7e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.4cc)] +// CHECK:STDOUT: %T.loc13_15.1: %Z.type.963 = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T.4b3)] +// CHECK:STDOUT: %T.as_type.loc13_26.1: type = facet_access_type %T.loc13_15.1 [symbolic = %T.as_type.loc13_26.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc13_26.1 [symbolic = %pattern_type (constants.%pattern_type.d37)] +// CHECK:STDOUT: %t.param_patt.loc13_24.2: @F.%pattern_type (%pattern_type.d37) = value_param_pattern [symbolic = %t.param_patt.loc13_24.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc13_24.2: @F.%pattern_type (%pattern_type.d37) = at_binding_pattern t, %t.param_patt.loc13_24.2 [symbolic = %t.patt.loc13_24.2 (constants.%t.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc13_19.1 [symbolic = %require_complete (constants.%require_complete.df7)] -// CHECK:STDOUT: %.loc15_18.4: require_specific_def_type = require_specific_def @T.as.Z.impl.adf(%T.as_type.loc13_19.1) [symbolic = %.loc15_18.4 (constants.%.04f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc13_26.1 [symbolic = %require_complete (constants.%require_complete.df7)] +// CHECK:STDOUT: %.loc15_18.4: require_specific_def_type = require_specific_def @T.as.Z.impl.adf(%T.as_type.loc13_26.1) [symbolic = %.loc15_18.4 (constants.%.04f)] // CHECK:STDOUT: %a.patt.loc15_15.2: @F.%pattern_type (%pattern_type.d37) = value_binding_pattern a [symbolic = %a.patt.loc15_15.2 (constants.%a.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc13_19.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc13_26.1 (%T.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc13_19.1 (%T.as_type) = name_ref t, %t -// CHECK:STDOUT: %.loc15_18.1: type = splice_block %impl.elem0 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc15: %Z.type.963 = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T.4b3)] -// CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc15_18.2: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)] +// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc13_26.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %.loc15_18.1: type = splice_block %impl.elem0 [symbolic = %T.as_type.loc13_26.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref.loc15: %Z.type.963 = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T.4b3)] +// CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc13_26.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc15_18.2: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc13_26.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc15_18.3: %Z.assoc_type.f4d = specific_constant @X.%assoc0, @Z.WithSelf(constants.%C, constants.%T.4b3) [concrete = constants.%assoc0.169] // CHECK:STDOUT: %X.ref: %Z.assoc_type.f4d = name_ref X, %.loc15_18.3 [concrete = constants.%assoc0.169] -// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.impl_witness.d78, element0 [symbolic = %T.as_type.loc13_19.1 (constants.%T.as_type)] +// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.impl_witness.d78, element0 [symbolic = %T.as_type.loc13_26.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%T.as_type.loc13_19.1 (%T.as_type) = wrapper_binding a, %t.ref +// CHECK:STDOUT: %a: @F.%T.as_type.loc13_26.1 (%T.as_type) = wrapper_binding a, %t.ref // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %a.patt.loc15_15.1: @F.%pattern_type (%pattern_type.d37) = value_binding_pattern a [symbolic = %a.patt.loc15_15.2 (constants.%a.patt)] // CHECK:STDOUT: } @@ -412,7 +412,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type => constants.%Z.type.78b -// CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.1a9 +// CHECK:STDOUT: %Self.loc3_22.2 => constants.%Self.1a9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%S, constants.%Self.21f) { @@ -432,21 +432,21 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @T.as.Z.impl.447(constants.%T.67d, constants.%S) { // CHECK:STDOUT: %T.patt.loc9_15.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc9_15.2 => constants.%T.67d -// CHECK:STDOUT: %S.patt.loc9_25.2 => constants.%S.patt -// CHECK:STDOUT: %S.loc9_25.2 => constants.%S -// CHECK:STDOUT: %Z.type.loc9_42.2 => constants.%Z.type.78b -// CHECK:STDOUT: %.Self.frozen.loc9_44.2 => constants.%.Self.frozen.e6b -// CHECK:STDOUT: %require_complete.loc9_50 => constants.%require_complete.291 +// CHECK:STDOUT: %S.patt.loc9_24.2 => constants.%S.patt +// CHECK:STDOUT: %S.loc9_24.2 => constants.%S +// CHECK:STDOUT: %Z.type.loc9_40.2 => constants.%Z.type.78b +// CHECK:STDOUT: %.Self.frozen.loc9_42.2 => constants.%.Self.frozen.e6b +// CHECK:STDOUT: %require_complete.loc9_48 => constants.%require_complete.291 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.d9d // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.083 // CHECK:STDOUT: %assoc0 => constants.%assoc0.c53 -// CHECK:STDOUT: %Z.lookup_impl_witness.loc9_50.1 => constants.%Z.lookup_impl_witness.aff -// CHECK:STDOUT: %impl.elem0.loc9_50.3 => constants.%impl.elem0.4c0 +// CHECK:STDOUT: %Z.lookup_impl_witness.loc9_48.1 => constants.%Z.lookup_impl_witness.aff +// CHECK:STDOUT: %impl.elem0.loc9_48.3 => constants.%impl.elem0.4c0 // CHECK:STDOUT: %.Self => constants.%.Self.6d3 -// CHECK:STDOUT: %Z.lookup_impl_witness.loc9_50.2 => constants.%Z.lookup_impl_witness.d10 -// CHECK:STDOUT: %impl.elem0.loc9_50.4 => constants.%impl.elem0.1d4 +// CHECK:STDOUT: %Z.lookup_impl_witness.loc9_48.2 => constants.%Z.lookup_impl_witness.d10 +// CHECK:STDOUT: %impl.elem0.loc9_48.4 => constants.%impl.elem0.1d4 // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.a2b -// CHECK:STDOUT: %Z.impl_witness.loc9_58.2 => constants.%Z.impl_witness.c0c +// CHECK:STDOUT: %Z.impl_witness.loc9_56.2 => constants.%Z.impl_witness.c0c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%S, constants.%Z.facet.96b) { @@ -462,7 +462,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type => constants.%Z.type.963 -// CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.ae2 +// CHECK:STDOUT: %Self.loc3_22.2 => constants.%Self.ae2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%Self.21f) { @@ -483,7 +483,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.patt.loc11_21.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc11_21.2 => constants.%T.67d // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.b22 -// CHECK:STDOUT: %Z.impl_witness.loc11_53.2 => constants.%Z.impl_witness.2d9 +// CHECK:STDOUT: %Z.impl_witness.loc11_52.2 => constants.%Z.impl_witness.2d9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%Z.facet.b21) { @@ -494,12 +494,12 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.4b3) { -// CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt.4cc -// CHECK:STDOUT: %T.loc13_7.1 => constants.%T.4b3 -// CHECK:STDOUT: %T.as_type.loc13_19.1 => constants.%T.as_type +// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt.4cc +// CHECK:STDOUT: %T.loc13_15.1 => constants.%T.4b3 +// CHECK:STDOUT: %T.as_type.loc13_26.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d37 -// CHECK:STDOUT: %t.param_patt.loc13_17.2 => constants.%t.param_patt -// CHECK:STDOUT: %t.patt.loc13_17.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc13_24.2 => constants.%t.param_patt +// CHECK:STDOUT: %t.patt.loc13_24.2 => constants.%t.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%T.4b3) { @@ -513,7 +513,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.patt.loc11_21.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc11_21.2 => constants.%T.as_type // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.6f1 -// CHECK:STDOUT: %Z.impl_witness.loc11_53.2 => constants.%Z.impl_witness.d78 +// CHECK:STDOUT: %Z.impl_witness.loc11_52.2 => constants.%Z.impl_witness.d78 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.264 @@ -627,9 +627,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.decl: %Z.type.c39 = interface_decl @Z [concrete = constants.%Z.generic] { // CHECK:STDOUT: %T.patt.loc3_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_14.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_16.1: type = splice_block %.loc3_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc3_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_14.1 (constants.%T.67d)] // CHECK:STDOUT: } @@ -637,88 +637,88 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: impl_decl @T.as.Z.impl.447 [concrete] { // CHECK:STDOUT: %T.patt.loc10_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_15.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %S.patt.loc10_25.1: %pattern_type.98f = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc10_25.2 (constants.%S.patt)] +// CHECK:STDOUT: %S.patt.loc10_24.1: %pattern_type.98f = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc10_24.2 (constants.%S.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_15.1 [symbolic = %T.loc10_15.2 (constants.%T.67d)] // CHECK:STDOUT: %Z.ref: %Z.type.c39 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] -// CHECK:STDOUT: %S.ref: type = name_ref S, %S.loc10_25.1 [symbolic = %S.loc10_25.2 (constants.%S)] -// CHECK:STDOUT: %Z.type.loc10_42.1: type = facet_type <@Z, @Z(constants.%S)> [symbolic = %Z.type.loc10_42.2 (constants.%Z.type.78b)] -// CHECK:STDOUT: %.Self.frozen.loc10_44.1: @T.as.Z.impl.447.%Z.type.loc10_42.2 (%Z.type.78b) = symbolic_binding .Self [symbolic = %.Self.frozen.loc10_44.2 (constants.%.Self.frozen.e6b)] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.type.loc10_42.1 [concrete] -// CHECK:STDOUT: %.Self.ref: @T.as.Z.impl.447.%Z.type.loc10_42.2 (%Z.type.78b) = name_ref .Self, %.Self.frozen.loc10_44.1 [symbolic = %.Self.frozen.loc10_44.2 (constants.%.Self.frozen.e6b)] +// CHECK:STDOUT: %S.ref: type = name_ref S, %S.loc10_24.1 [symbolic = %S.loc10_24.2 (constants.%S)] +// CHECK:STDOUT: %Z.type.loc10_40.1: type = facet_type <@Z, @Z(constants.%S)> [symbolic = %Z.type.loc10_40.2 (constants.%Z.type.78b)] +// CHECK:STDOUT: %.Self.frozen.loc10_42.1: @T.as.Z.impl.447.%Z.type.loc10_40.2 (%Z.type.78b) = symbolic_binding .Self [symbolic = %.Self.frozen.loc10_42.2 (constants.%.Self.frozen.e6b)] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.type.loc10_40.1 [concrete] +// CHECK:STDOUT: %.Self.ref: @T.as.Z.impl.447.%Z.type.loc10_40.2 (%Z.type.78b) = name_ref .Self, %.Self.frozen.loc10_42.1 [symbolic = %.Self.frozen.loc10_42.2 (constants.%.Self.frozen.e6b)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.d9d)] -// CHECK:STDOUT: %.loc10_50.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.d9d)] -// CHECK:STDOUT: %.loc10_50.2: @T.as.Z.impl.447.%Z.assoc_type (%Z.assoc_type.083) = specific_constant @X.%assoc0, @Z.WithSelf(constants.%S, constants.%.Self.frozen.e6b) [symbolic = %assoc0 (constants.%assoc0.c53)] -// CHECK:STDOUT: %X.ref: @T.as.Z.impl.447.%Z.assoc_type (%Z.assoc_type.083) = name_ref X, %.loc10_50.2 [symbolic = %assoc0 (constants.%assoc0.c53)] -// CHECK:STDOUT: %impl.elem0.loc10_50.1: type = impl_witness_access constants.%Z.lookup_impl_witness.aff, element0 [symbolic = %impl.elem0.loc10_50.3 (constants.%impl.elem0.4c0)] -// CHECK:STDOUT: %.loc10_56.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc10_56.2: type = converted %.loc10_56.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %rewrite.loc10_53.1 = requirement_rewrite %impl.elem0.loc10_50.1, %.loc10_56.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc10_50.2: type = impl_witness_access constants.%Z.lookup_impl_witness.d10, element0 [symbolic = %impl.elem0.loc10_50.4 (constants.%impl.elem0.1d4)] -// CHECK:STDOUT: %rewrite.loc10_53.2 = requirement_rewrite %impl.elem0.loc10_50.2, %.loc10_56.2 [concrete] -// CHECK:STDOUT: %.loc10_44: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.a2b)] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.type.loc10_42.1 [concrete] -// CHECK:STDOUT: %rewrite.loc10_53.2 = requirement_rewrite %impl.elem0.loc10_50.2, %.loc10_56.2 [concrete] +// CHECK:STDOUT: %.loc10_48.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.d9d)] +// CHECK:STDOUT: %.loc10_48.2: @T.as.Z.impl.447.%Z.assoc_type (%Z.assoc_type.083) = specific_constant @X.%assoc0, @Z.WithSelf(constants.%S, constants.%.Self.frozen.e6b) [symbolic = %assoc0 (constants.%assoc0.c53)] +// CHECK:STDOUT: %X.ref: @T.as.Z.impl.447.%Z.assoc_type (%Z.assoc_type.083) = name_ref X, %.loc10_48.2 [symbolic = %assoc0 (constants.%assoc0.c53)] +// CHECK:STDOUT: %impl.elem0.loc10_48.1: type = impl_witness_access constants.%Z.lookup_impl_witness.aff, element0 [symbolic = %impl.elem0.loc10_48.3 (constants.%impl.elem0.4c0)] +// CHECK:STDOUT: %.loc10_54.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc10_54.2: type = converted %.loc10_54.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %rewrite.loc10_51.1 = requirement_rewrite %impl.elem0.loc10_48.1, %.loc10_54.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc10_48.2: type = impl_witness_access constants.%Z.lookup_impl_witness.d10, element0 [symbolic = %impl.elem0.loc10_48.4 (constants.%impl.elem0.1d4)] +// CHECK:STDOUT: %rewrite.loc10_51.2 = requirement_rewrite %impl.elem0.loc10_48.2, %.loc10_54.2 [concrete] +// CHECK:STDOUT: %.loc10_42: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.a2b)] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.type.loc10_40.1 [concrete] +// CHECK:STDOUT: %rewrite.loc10_51.2 = requirement_rewrite %impl.elem0.loc10_48.2, %.loc10_54.2 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_18.1: type = splice_block %.loc10_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc10_17.1: type = splice_block %.loc10_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc10_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc10_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc10_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc10_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.2 (constants.%T.67d)] -// CHECK:STDOUT: %.loc10_28.1: type = splice_block %.loc10_28.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc10_25: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc10_28.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc10_26.1: type = splice_block %.loc10_26.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc10_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc10_26.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %S.loc10_25.1: type = symbolic_binding S, 1 [symbolic = %S.loc10_25.2 (constants.%S)] +// CHECK:STDOUT: %S.loc10_24.1: type = symbolic_binding S, 1 [symbolic = %S.loc10_24.2 (constants.%S)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @T.as.Z.impl.adf [concrete] { // CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc12_24: type = name_ref T, %T.loc12_15.1 [symbolic = %T.loc12_15.2 (constants.%T.67d)] +// CHECK:STDOUT: %T.ref.loc12_23: type = name_ref T, %T.loc12_15.1 [symbolic = %T.loc12_15.2 (constants.%T.67d)] // CHECK:STDOUT: %Z.ref: %Z.type.c39 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.963] -// CHECK:STDOUT: %.Self.frozen.loc12_34: %Z.type.963 = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.16f] +// CHECK:STDOUT: %.Self.frozen.loc12_33: %Z.type.963 = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.16f] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.type [concrete] -// CHECK:STDOUT: %.Self.ref: %Z.type.963 = name_ref .Self, %.Self.frozen.loc12_34 [symbolic_self = constants.%.Self.frozen.16f] +// CHECK:STDOUT: %.Self.ref: %Z.type.963 = name_ref .Self, %.Self.frozen.loc12_33 [symbolic_self = constants.%.Self.frozen.16f] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type.16b] -// CHECK:STDOUT: %.loc12_40.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type.16b] -// CHECK:STDOUT: %.loc12_40.2: %Z.assoc_type.f4d = specific_constant @X.%assoc0, @Z.WithSelf(constants.%C, constants.%.Self.frozen.16f) [concrete = constants.%assoc0.169] -// CHECK:STDOUT: %X.ref: %Z.assoc_type.f4d = name_ref X, %.loc12_40.2 [concrete = constants.%assoc0.169] -// CHECK:STDOUT: %impl.elem0.loc12_40.1: type = impl_witness_access constants.%Z.lookup_impl_witness.9bf, element0 [symbolic_self = constants.%impl.elem0.b30] -// CHECK:STDOUT: %T.ref.loc12_45: type = name_ref T, %T.loc12_15.1 [symbolic = %T.loc12_15.2 (constants.%T.67d)] -// CHECK:STDOUT: %rewrite.loc12_43.1 = requirement_rewrite %impl.elem0.loc12_40.1, %T.ref.loc12_45 [concrete] -// CHECK:STDOUT: %impl.elem0.loc12_40.2: type = impl_witness_access constants.%Z.lookup_impl_witness.e93, element0 [symbolic_self = constants.%impl.elem0.3ed] -// CHECK:STDOUT: %rewrite.loc12_43.2 = requirement_rewrite %impl.elem0.loc12_40.2, %T.ref.loc12_45 [concrete] -// CHECK:STDOUT: %.loc12_34: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.b22)] { +// CHECK:STDOUT: %.loc12_39.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type.16b] +// CHECK:STDOUT: %.loc12_39.2: %Z.assoc_type.f4d = specific_constant @X.%assoc0, @Z.WithSelf(constants.%C, constants.%.Self.frozen.16f) [concrete = constants.%assoc0.169] +// CHECK:STDOUT: %X.ref: %Z.assoc_type.f4d = name_ref X, %.loc12_39.2 [concrete = constants.%assoc0.169] +// CHECK:STDOUT: %impl.elem0.loc12_39.1: type = impl_witness_access constants.%Z.lookup_impl_witness.9bf, element0 [symbolic_self = constants.%impl.elem0.b30] +// CHECK:STDOUT: %T.ref.loc12_44: type = name_ref T, %T.loc12_15.1 [symbolic = %T.loc12_15.2 (constants.%T.67d)] +// CHECK:STDOUT: %rewrite.loc12_42.1 = requirement_rewrite %impl.elem0.loc12_39.1, %T.ref.loc12_44 [concrete] +// CHECK:STDOUT: %impl.elem0.loc12_39.2: type = impl_witness_access constants.%Z.lookup_impl_witness.e93, element0 [symbolic_self = constants.%impl.elem0.3ed] +// CHECK:STDOUT: %rewrite.loc12_42.2 = requirement_rewrite %impl.elem0.loc12_39.2, %T.ref.loc12_44 [concrete] +// CHECK:STDOUT: %.loc12_33: type = where_expr [symbolic = %Z_where.type (constants.%Z_where.type.b22)] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.type [concrete] -// CHECK:STDOUT: %rewrite.loc12_43.2 = requirement_rewrite %impl.elem0.loc12_40.2, %T.ref.loc12_45 [concrete] +// CHECK:STDOUT: %rewrite.loc12_42.2 = requirement_rewrite %impl.elem0.loc12_39.2, %T.ref.loc12_44 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_18.1: type = splice_block %.loc12_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc12_17.1: type = splice_block %.loc12_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc12_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc12_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc12_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.2 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc14_7.1: %pattern_type.d7e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_7.2 (constants.%T.patt.4cc)] -// CHECK:STDOUT: %t.param_patt.loc14_17.1: @F.%pattern_type.loc14 (%pattern_type.d37) = value_param_pattern [symbolic = %t.param_patt.loc14_17.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc14_17.1: @F.%pattern_type.loc14 (%pattern_type.d37) = at_binding_pattern t, %t.param_patt.loc14_17.1 [symbolic = %t.patt.loc14_17.2 (constants.%t.patt)] +// CHECK:STDOUT: %T.patt.loc14_15.1: %pattern_type.d7e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_15.2 (constants.%T.patt.4cc)] +// CHECK:STDOUT: %t.param_patt.loc14_24.1: @F.%pattern_type.loc14 (%pattern_type.d37) = value_param_pattern [symbolic = %t.param_patt.loc14_24.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc14_24.1: @F.%pattern_type.loc14 (%pattern_type.d37) = at_binding_pattern t, %t.param_patt.loc14_24.1 [symbolic = %t.patt.loc14_24.2 (constants.%t.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_13: type = splice_block %Z.type [concrete = constants.%Z.type.963] { +// CHECK:STDOUT: %.loc14_20: type = splice_block %Z.type [concrete = constants.%Z.type.963] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %Z.ref: %Z.type.c39 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(constants.%C)> [concrete = constants.%Z.type.963] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc14_7.2: %Z.type.963 = symbolic_binding T, 0 [symbolic = %T.loc14_7.1 (constants.%T.4b3)] -// CHECK:STDOUT: %t.param: @F.%T.as_type.loc14_19.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc14_19.1: type = splice_block %.loc14_19.2 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc14: %Z.type.963 = name_ref T, %T.loc14_7.2 [symbolic = %T.loc14_7.1 (constants.%T.4b3)] -// CHECK:STDOUT: %T.as_type.loc14_19.2: type = facet_access_type %T.ref.loc14 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc14_19.2: type = converted %T.ref.loc14, %T.as_type.loc14_19.2 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc14_15.2: %Z.type.963 = symbolic_binding T, 0 [symbolic = %T.loc14_15.1 (constants.%T.4b3)] +// CHECK:STDOUT: %t.param: @F.%T.as_type.loc14_26.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc14_26.1: type = splice_block %.loc14_26.2 [symbolic = %T.as_type.loc14_26.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref.loc14: %Z.type.963 = name_ref T, %T.loc14_15.2 [symbolic = %T.loc14_15.1 (constants.%T.4b3)] +// CHECK:STDOUT: %T.as_type.loc14_26.2: type = facet_access_type %T.ref.loc14 [symbolic = %T.as_type.loc14_26.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc14_26.2: type = converted %T.ref.loc14, %T.as_type.loc14_26.2 [symbolic = %T.as_type.loc14_26.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @F.%T.as_type.loc14_19.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @F.%T.as_type.loc14_26.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -728,10 +728,10 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc3_14.1)> [symbolic = %Z.type (constants.%Z.type.924)] -// CHECK:STDOUT: %Self.loc3_23.2: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.21f)] +// CHECK:STDOUT: %Self.loc3_22.2: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self.21f)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_23.1: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.21f)] +// CHECK:STDOUT: %Self.loc3_22.1: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self.21f)] // CHECK:STDOUT: %Z.WithSelf.decl = interface_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -740,7 +740,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_23.1 +// CHECK:STDOUT: .Self = %Self.loc3_22.1 // CHECK:STDOUT: .X = @X.%assoc0 // CHECK:STDOUT: witness = (@Z.WithSelf.%X) // CHECK:STDOUT: @@ -763,36 +763,36 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @T.as.Z.impl.447(%T.loc10_15.1: type, %S.loc10_25.1: type) { +// CHECK:STDOUT: generic impl @T.as.Z.impl.447(%T.loc10_15.1: type, %S.loc10_24.1: type) { // CHECK:STDOUT: %T.patt.loc10_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_15.2 (constants.%T.patt.d47)] // CHECK:STDOUT: %T.loc10_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.2 (constants.%T.67d)] -// CHECK:STDOUT: %S.patt.loc10_25.2: %pattern_type.98f = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc10_25.2 (constants.%S.patt)] -// CHECK:STDOUT: %S.loc10_25.2: type = symbolic_binding S, 1 [symbolic = %S.loc10_25.2 (constants.%S)] -// CHECK:STDOUT: %Z.type.loc10_42.2: type = facet_type <@Z, @Z(%S.loc10_25.2)> [symbolic = %Z.type.loc10_42.2 (constants.%Z.type.78b)] -// CHECK:STDOUT: %.Self.frozen.loc10_44.2: @T.as.Z.impl.447.%Z.type.loc10_42.2 (%Z.type.78b) = symbolic_binding .Self [symbolic = %.Self.frozen.loc10_44.2 (constants.%.Self.frozen.e6b)] -// CHECK:STDOUT: %require_complete.loc10_50: = require_complete_type %Z.type.loc10_42.2 [symbolic = %require_complete.loc10_50 (constants.%require_complete.291)] -// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc10_44.2 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.d9d)] -// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%S.loc10_25.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.083)] +// CHECK:STDOUT: %S.patt.loc10_24.2: %pattern_type.98f = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc10_24.2 (constants.%S.patt)] +// CHECK:STDOUT: %S.loc10_24.2: type = symbolic_binding S, 1 [symbolic = %S.loc10_24.2 (constants.%S)] +// CHECK:STDOUT: %Z.type.loc10_40.2: type = facet_type <@Z, @Z(%S.loc10_24.2)> [symbolic = %Z.type.loc10_40.2 (constants.%Z.type.78b)] +// CHECK:STDOUT: %.Self.frozen.loc10_42.2: @T.as.Z.impl.447.%Z.type.loc10_40.2 (%Z.type.78b) = symbolic_binding .Self [symbolic = %.Self.frozen.loc10_42.2 (constants.%.Self.frozen.e6b)] +// CHECK:STDOUT: %require_complete.loc10_48: = require_complete_type %Z.type.loc10_40.2 [symbolic = %require_complete.loc10_48 (constants.%require_complete.291)] +// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc10_42.2 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.d9d)] +// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%S.loc10_24.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.083)] // CHECK:STDOUT: %assoc0: @T.as.Z.impl.447.%Z.assoc_type (%Z.assoc_type.083) = assoc_entity element0, @Z.WithSelf.%X [symbolic = %assoc0 (constants.%assoc0.c53)] -// CHECK:STDOUT: %Z.lookup_impl_witness.loc10_50.1: = lookup_impl_witness %.Self.frozen.loc10_44.2, @Z, @Z(%S.loc10_25.2) [symbolic = %Z.lookup_impl_witness.loc10_50.1 (constants.%Z.lookup_impl_witness.aff)] -// CHECK:STDOUT: %impl.elem0.loc10_50.3: type = impl_witness_access %Z.lookup_impl_witness.loc10_50.1, element0 [symbolic = %impl.elem0.loc10_50.3 (constants.%impl.elem0.4c0)] -// CHECK:STDOUT: %.Self: @T.as.Z.impl.447.%Z.type.loc10_42.2 (%Z.type.78b) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.6d3)] -// CHECK:STDOUT: %Z.lookup_impl_witness.loc10_50.2: = lookup_impl_witness %.Self, @Z, @Z(%S.loc10_25.2) [symbolic = %Z.lookup_impl_witness.loc10_50.2 (constants.%Z.lookup_impl_witness.d10)] -// CHECK:STDOUT: %impl.elem0.loc10_50.4: type = impl_witness_access %Z.lookup_impl_witness.loc10_50.2, element0 [symbolic = %impl.elem0.loc10_50.4 (constants.%impl.elem0.1d4)] -// CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%S.loc10_25.2) where %impl.elem0.loc10_50.4 = constants.%empty_tuple.type> [symbolic = %Z_where.type (constants.%Z_where.type.a2b)] -// CHECK:STDOUT: %Z.impl_witness.loc10_58.2: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.447(%T.loc10_15.2, %S.loc10_25.2) [symbolic = %Z.impl_witness.loc10_58.2 (constants.%Z.impl_witness.c0c)] +// CHECK:STDOUT: %Z.lookup_impl_witness.loc10_48.1: = lookup_impl_witness %.Self.frozen.loc10_42.2, @Z, @Z(%S.loc10_24.2) [symbolic = %Z.lookup_impl_witness.loc10_48.1 (constants.%Z.lookup_impl_witness.aff)] +// CHECK:STDOUT: %impl.elem0.loc10_48.3: type = impl_witness_access %Z.lookup_impl_witness.loc10_48.1, element0 [symbolic = %impl.elem0.loc10_48.3 (constants.%impl.elem0.4c0)] +// CHECK:STDOUT: %.Self: @T.as.Z.impl.447.%Z.type.loc10_40.2 (%Z.type.78b) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.6d3)] +// CHECK:STDOUT: %Z.lookup_impl_witness.loc10_48.2: = lookup_impl_witness %.Self, @Z, @Z(%S.loc10_24.2) [symbolic = %Z.lookup_impl_witness.loc10_48.2 (constants.%Z.lookup_impl_witness.d10)] +// CHECK:STDOUT: %impl.elem0.loc10_48.4: type = impl_witness_access %Z.lookup_impl_witness.loc10_48.2, element0 [symbolic = %impl.elem0.loc10_48.4 (constants.%impl.elem0.1d4)] +// CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%S.loc10_24.2) where %impl.elem0.loc10_48.4 = constants.%empty_tuple.type> [symbolic = %Z_where.type (constants.%Z_where.type.a2b)] +// CHECK:STDOUT: %Z.impl_witness.loc10_56.2: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.447(%T.loc10_15.2, %S.loc10_24.2) [symbolic = %Z.impl_witness.loc10_56.2 (constants.%Z.impl_witness.c0c)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc10_44: = require_complete_type %Z_where.type [symbolic = %require_complete.loc10_44 (constants.%require_complete.9b7)] +// CHECK:STDOUT: %require_complete.loc10_42: = require_complete_type %Z_where.type [symbolic = %require_complete.loc10_42 (constants.%require_complete.9b7)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %T.ref as %.loc10_44 { +// CHECK:STDOUT: impl: %T.ref as %.loc10_42 { // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @T.as.Z.impl.447 [concrete] -// CHECK:STDOUT: %Z.impl_witness.loc10_58.1: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.447(constants.%T.67d, constants.%S) [symbolic = %Z.impl_witness.loc10_58.2 (constants.%Z.impl_witness.c0c)] +// CHECK:STDOUT: %Z.impl_witness.loc10_56.1: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.447(constants.%T.67d, constants.%S) [symbolic = %Z.impl_witness.loc10_56.2 (constants.%Z.impl_witness.c0c)] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %.loc10_44 -// CHECK:STDOUT: witness = %Z.impl_witness.loc10_58.1 +// CHECK:STDOUT: extend %.loc10_42 +// CHECK:STDOUT: witness = %Z.impl_witness.loc10_56.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -800,19 +800,19 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.patt.loc12_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt.d47)] // CHECK:STDOUT: %T.loc12_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.2 (constants.%T.67d)] // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(constants.%C) where constants.%impl.elem0.3ed = %T.loc12_15.2> [symbolic = %Z_where.type (constants.%Z_where.type.b22)] -// CHECK:STDOUT: %Z.impl_witness.loc12_47.2: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.adf(%T.loc12_15.2) [symbolic = %Z.impl_witness.loc12_47.2 (constants.%Z.impl_witness.2d9)] +// CHECK:STDOUT: %Z.impl_witness.loc12_46.2: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.adf(%T.loc12_15.2) [symbolic = %Z.impl_witness.loc12_46.2 (constants.%Z.impl_witness.2d9)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %Z_where.type [symbolic = %require_complete (constants.%require_complete.d7e)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %T.ref.loc12_24 as %.loc12_34 { +// CHECK:STDOUT: impl: %T.ref.loc12_23 as %.loc12_33 { // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @T.as.Z.impl.adf [concrete] -// CHECK:STDOUT: %Z.impl_witness.loc12_47.1: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.adf(constants.%T.67d) [symbolic = %Z.impl_witness.loc12_47.2 (constants.%Z.impl_witness.2d9)] +// CHECK:STDOUT: %Z.impl_witness.loc12_46.1: = impl_witness %Z.impl_witness_table, @T.as.Z.impl.adf(constants.%T.67d) [symbolic = %Z.impl_witness.loc12_46.2 (constants.%Z.impl_witness.2d9)] // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%T.67d [symbolic = %T.loc12_15.2 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %.loc12_34 -// CHECK:STDOUT: witness = %Z.impl_witness.loc12_47.1 +// CHECK:STDOUT: extend %.loc12_33 +// CHECK:STDOUT: witness = %Z.impl_witness.loc12_46.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -824,17 +824,17 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc14_7.2: %Z.type.963) { -// CHECK:STDOUT: %T.patt.loc14_7.2: %pattern_type.d7e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_7.2 (constants.%T.patt.4cc)] -// CHECK:STDOUT: %T.loc14_7.1: %Z.type.963 = symbolic_binding T, 0 [symbolic = %T.loc14_7.1 (constants.%T.4b3)] -// CHECK:STDOUT: %T.as_type.loc14_19.1: type = facet_access_type %T.loc14_7.1 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type.loc14: type = pattern_type %T.as_type.loc14_19.1 [symbolic = %pattern_type.loc14 (constants.%pattern_type.d37)] -// CHECK:STDOUT: %t.param_patt.loc14_17.2: @F.%pattern_type.loc14 (%pattern_type.d37) = value_param_pattern [symbolic = %t.param_patt.loc14_17.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc14_17.2: @F.%pattern_type.loc14 (%pattern_type.d37) = at_binding_pattern t, %t.param_patt.loc14_17.2 [symbolic = %t.patt.loc14_17.2 (constants.%t.patt)] +// CHECK:STDOUT: generic fn @F(%T.loc14_15.2: %Z.type.963) { +// CHECK:STDOUT: %T.patt.loc14_15.2: %pattern_type.d7e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_15.2 (constants.%T.patt.4cc)] +// CHECK:STDOUT: %T.loc14_15.1: %Z.type.963 = symbolic_binding T, 0 [symbolic = %T.loc14_15.1 (constants.%T.4b3)] +// CHECK:STDOUT: %T.as_type.loc14_26.1: type = facet_access_type %T.loc14_15.1 [symbolic = %T.as_type.loc14_26.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type.loc14: type = pattern_type %T.as_type.loc14_26.1 [symbolic = %pattern_type.loc14 (constants.%pattern_type.d37)] +// CHECK:STDOUT: %t.param_patt.loc14_24.2: @F.%pattern_type.loc14 (%pattern_type.d37) = value_param_pattern [symbolic = %t.param_patt.loc14_24.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc14_24.2: @F.%pattern_type.loc14 (%pattern_type.d37) = at_binding_pattern t, %t.param_patt.loc14_24.2 [symbolic = %t.patt.loc14_24.2 (constants.%t.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc14: = require_complete_type %T.as_type.loc14_19.1 [symbolic = %require_complete.loc14 (constants.%require_complete.df7)] -// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc14_7.1, @Z, @Z(constants.%C) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.89c)] +// CHECK:STDOUT: %require_complete.loc14: = require_complete_type %T.as_type.loc14_26.1 [symbolic = %require_complete.loc14 (constants.%require_complete.df7)] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc14_15.1, @Z, @Z(constants.%C) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.89c)] // CHECK:STDOUT: %impl.elem0.loc22_18.2: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_18.2 (constants.%impl.elem0.aab)] // CHECK:STDOUT: %require_complete.loc22_18: = require_complete_type %impl.elem0.loc22_18.2 [symbolic = %require_complete.loc22_18 (constants.%require_complete.d22)] // CHECK:STDOUT: %pattern_type.loc22: type = pattern_type %impl.elem0.loc22_18.2 [symbolic = %pattern_type.loc22 (constants.%pattern_type.dc1)] @@ -844,17 +844,17 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.loc22_18.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.aba)] // CHECK:STDOUT: %assoc0: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.aba) = assoc_entity element0, imports.%Core.import_ref.cb2 [symbolic = %assoc0 (constants.%assoc0.7e2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc14_19.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc14_26.1 (%T.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc14_19.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc14_26.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %ImplicitAs.type.loc22_23.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%impl.elem0.aab)> [symbolic = %ImplicitAs.type.loc22_23.2 (constants.%ImplicitAs.type.034)] // CHECK:STDOUT: %.loc22_23.1: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.aba) = specific_constant imports.%Core.import_ref.484, @ImplicitAs.WithSelf(constants.%impl.elem0.aab, constants.%Self.294) [symbolic = %assoc0 (constants.%assoc0.7e2)] // CHECK:STDOUT: %Convert.ref: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.aba) = name_ref Convert, %.loc22_23.1 [symbolic = %assoc0 (constants.%assoc0.7e2)] // CHECK:STDOUT: %.loc22_23.2: @F.%impl.elem0.loc22_18.2 (%impl.elem0.aab) = converted %t.ref, [concrete = ] // CHECK:STDOUT: %.loc22_18.1: type = splice_block %impl.elem0.loc22_18.1 [symbolic = %impl.elem0.loc22_18.2 (constants.%impl.elem0.aab)] { -// CHECK:STDOUT: %T.ref.loc22: %Z.type.963 = name_ref T, %T.loc14_7.2 [symbolic = %T.loc14_7.1 (constants.%T.4b3)] -// CHECK:STDOUT: %T.as_type.loc22: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc22_18.2: type = converted %T.ref.loc22, %T.as_type.loc22 [symbolic = %T.as_type.loc14_19.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.ref.loc22: %Z.type.963 = name_ref T, %T.loc14_15.2 [symbolic = %T.loc14_15.1 (constants.%T.4b3)] +// CHECK:STDOUT: %T.as_type.loc22: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc14_26.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc22_18.2: type = converted %T.ref.loc22, %T.as_type.loc22 [symbolic = %T.as_type.loc14_26.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc22_18.3: %Z.assoc_type.f4d = specific_constant @X.%assoc0, @Z.WithSelf(constants.%C, constants.%T.4b3) [concrete = constants.%assoc0.169] // CHECK:STDOUT: %X.ref: %Z.assoc_type.f4d = name_ref X, %.loc22_18.3 [concrete = constants.%assoc0.169] // CHECK:STDOUT: %impl.elem0.loc22_18.1: type = impl_witness_access constants.%Z.lookup_impl_witness.89c, element0 [symbolic = %impl.elem0.loc22_18.2 (constants.%impl.elem0.aab)] @@ -884,7 +884,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type => constants.%Z.type.78b -// CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.1a9 +// CHECK:STDOUT: %Self.loc3_22.2 => constants.%Self.1a9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%S, constants.%Self.21f) { @@ -904,21 +904,21 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @T.as.Z.impl.447(constants.%T.67d, constants.%S) { // CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc10_15.2 => constants.%T.67d -// CHECK:STDOUT: %S.patt.loc10_25.2 => constants.%S.patt -// CHECK:STDOUT: %S.loc10_25.2 => constants.%S -// CHECK:STDOUT: %Z.type.loc10_42.2 => constants.%Z.type.78b -// CHECK:STDOUT: %.Self.frozen.loc10_44.2 => constants.%.Self.frozen.e6b -// CHECK:STDOUT: %require_complete.loc10_50 => constants.%require_complete.291 +// CHECK:STDOUT: %S.patt.loc10_24.2 => constants.%S.patt +// CHECK:STDOUT: %S.loc10_24.2 => constants.%S +// CHECK:STDOUT: %Z.type.loc10_40.2 => constants.%Z.type.78b +// CHECK:STDOUT: %.Self.frozen.loc10_42.2 => constants.%.Self.frozen.e6b +// CHECK:STDOUT: %require_complete.loc10_48 => constants.%require_complete.291 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.d9d // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.083 // CHECK:STDOUT: %assoc0 => constants.%assoc0.c53 -// CHECK:STDOUT: %Z.lookup_impl_witness.loc10_50.1 => constants.%Z.lookup_impl_witness.aff -// CHECK:STDOUT: %impl.elem0.loc10_50.3 => constants.%impl.elem0.4c0 +// CHECK:STDOUT: %Z.lookup_impl_witness.loc10_48.1 => constants.%Z.lookup_impl_witness.aff +// CHECK:STDOUT: %impl.elem0.loc10_48.3 => constants.%impl.elem0.4c0 // CHECK:STDOUT: %.Self => constants.%.Self.6d3 -// CHECK:STDOUT: %Z.lookup_impl_witness.loc10_50.2 => constants.%Z.lookup_impl_witness.d10 -// CHECK:STDOUT: %impl.elem0.loc10_50.4 => constants.%impl.elem0.1d4 +// CHECK:STDOUT: %Z.lookup_impl_witness.loc10_48.2 => constants.%Z.lookup_impl_witness.d10 +// CHECK:STDOUT: %impl.elem0.loc10_48.4 => constants.%impl.elem0.1d4 // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.a2b -// CHECK:STDOUT: %Z.impl_witness.loc10_58.2 => constants.%Z.impl_witness.c0c +// CHECK:STDOUT: %Z.impl_witness.loc10_56.2 => constants.%Z.impl_witness.c0c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%S, constants.%Z.facet.96b) { @@ -934,7 +934,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type => constants.%Z.type.963 -// CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.ae2 +// CHECK:STDOUT: %Self.loc3_22.2 => constants.%Self.ae2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%Self.21f) { @@ -955,7 +955,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc12_15.2 => constants.%T.67d // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.b22 -// CHECK:STDOUT: %Z.impl_witness.loc12_47.2 => constants.%Z.impl_witness.2d9 +// CHECK:STDOUT: %Z.impl_witness.loc12_46.2 => constants.%Z.impl_witness.2d9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%Z.facet.b21) { @@ -966,12 +966,12 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.4b3) { -// CHECK:STDOUT: %T.patt.loc14_7.2 => constants.%T.patt.4cc -// CHECK:STDOUT: %T.loc14_7.1 => constants.%T.4b3 -// CHECK:STDOUT: %T.as_type.loc14_19.1 => constants.%T.as_type +// CHECK:STDOUT: %T.patt.loc14_15.2 => constants.%T.patt.4cc +// CHECK:STDOUT: %T.loc14_15.1 => constants.%T.4b3 +// CHECK:STDOUT: %T.as_type.loc14_26.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type.loc14 => constants.%pattern_type.d37 -// CHECK:STDOUT: %t.param_patt.loc14_17.2 => constants.%t.param_patt -// CHECK:STDOUT: %t.patt.loc14_17.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc14_24.2 => constants.%t.param_patt +// CHECK:STDOUT: %t.patt.loc14_24.2 => constants.%t.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%C, constants.%T.4b3) { @@ -1054,51 +1054,51 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: impl_decl @U.as.Ptr.impl [concrete] { // CHECK:STDOUT: %U.patt.loc7_21.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_21.2 (constants.%U.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref.loc7_30: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)] +// CHECK:STDOUT: %U.ref.loc7_29: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)] // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] -// CHECK:STDOUT: %.Self.frozen.loc7_39: %Ptr.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.073] +// CHECK:STDOUT: %.Self.frozen.loc7_38: %Ptr.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.073] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Ptr.ref [concrete] -// CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.frozen.loc7_39 [symbolic_self = constants.%.Self.frozen.073] +// CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.frozen.loc7_38 [symbolic_self = constants.%.Self.frozen.073] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc7_44: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.b1a] -// CHECK:STDOUT: %impl.elem0.loc7_45.1: type = impl_witness_access constants.%Ptr.lookup_impl_witness.2e6, element0 [symbolic_self = constants.%impl.elem0.a05] -// CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)] -// CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %rewrite.loc7_51.1 = requirement_rewrite %impl.elem0.loc7_45.1, %ptr.loc7_54.1 [concrete] -// CHECK:STDOUT: %impl.elem0.loc7_45.2: type = impl_witness_access constants.%Ptr.lookup_impl_witness.497, element0 [symbolic_self = constants.%impl.elem0.f33] -// CHECK:STDOUT: %rewrite.loc7_51.2 = requirement_rewrite %impl.elem0.loc7_45.2, %ptr.loc7_54.1 [concrete] -// CHECK:STDOUT: %.loc7_39: type = where_expr [symbolic = %Ptr_where.type (constants.%Ptr_where.type.9d8e6c.1)] { +// CHECK:STDOUT: %impl.elem0.loc7_44.1: type = impl_witness_access constants.%Ptr.lookup_impl_witness.2e6, element0 [symbolic_self = constants.%impl.elem0.a05] +// CHECK:STDOUT: %U.ref.loc7_52: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)] +// CHECK:STDOUT: %ptr.loc7_53.1: type = ptr_type %U.ref.loc7_52 [symbolic = %ptr.loc7_53.2 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %rewrite.loc7_50.1 = requirement_rewrite %impl.elem0.loc7_44.1, %ptr.loc7_53.1 [concrete] +// CHECK:STDOUT: %impl.elem0.loc7_44.2: type = impl_witness_access constants.%Ptr.lookup_impl_witness.497, element0 [symbolic_self = constants.%impl.elem0.f33] +// CHECK:STDOUT: %rewrite.loc7_50.2 = requirement_rewrite %impl.elem0.loc7_44.2, %ptr.loc7_53.1 [concrete] +// CHECK:STDOUT: %.loc7_38: type = where_expr [symbolic = %Ptr_where.type (constants.%Ptr_where.type.9d8e6c.1)] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Ptr.ref [concrete] -// CHECK:STDOUT: %rewrite.loc7_51.2 = requirement_rewrite %impl.elem0.loc7_45.2, %ptr.loc7_54.1 [concrete] +// CHECK:STDOUT: %rewrite.loc7_50.2 = requirement_rewrite %impl.elem0.loc7_44.2, %ptr.loc7_53.1 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7_24.1: type = splice_block %.loc7_24.2 [concrete = type] { +// CHECK:STDOUT: %.loc7_23.1: type = splice_block %.loc7_23.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc7_21: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc7_24.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_23.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc7_21.1: type = symbolic_binding U, 0 [symbolic = %U.loc7_21.2 (constants.%U.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc9_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %t.patt.loc9_21.1: @F.%pattern_type.loc9_21 (%pattern_type.51d) = ref_binding_pattern t [symbolic = %t.patt.loc9_21.2 (constants.%t.patt)] -// CHECK:STDOUT: %t.param_patt.loc9_16.1: @F.%pattern_type.loc9_21 (%pattern_type.51d) = var_param_pattern %t.patt.loc9_21.1 [symbolic = %t.param_patt.loc9_16.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %return.param_patt.loc9_30.1: @F.%pattern_type.loc9_30 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc9_30.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc9_26.1: @F.%pattern_type.loc9_30 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc9_30.1, %impl.elem0.loc9 [symbolic = %return.patt.loc9_26.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: %t.patt.loc9_20.1: @F.%pattern_type.loc9_20 (%pattern_type.51d) = ref_binding_pattern t [symbolic = %t.patt.loc9_20.2 (constants.%t.patt)] +// CHECK:STDOUT: %t.param_patt.loc9_15.1: @F.%pattern_type.loc9_20 (%pattern_type.51d) = var_param_pattern %t.patt.loc9_20.1 [symbolic = %t.param_patt.loc9_15.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %return.param_patt.loc9_29.1: @F.%pattern_type.loc9_29 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc9_29.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc9_25.1: @F.%pattern_type.loc9_29 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc9_29.1, %impl.elem0.loc9 [symbolic = %return.patt.loc9_25.2 (constants.%return.patt.d67)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc9_29: type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.67d)] +// CHECK:STDOUT: %T.ref.loc9_28: type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.67d)] // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.b1a] -// CHECK:STDOUT: %Ptr.facet.loc9_30.2: %Ptr.type = facet_value %T.ref.loc9_29, (constants.%Ptr.impl_witness.add6fd.2) [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet.8eb510.2)] -// CHECK:STDOUT: %.loc9_30.3: %Ptr.type = converted %T.ref.loc9_29, %Ptr.facet.loc9_30.2 [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet.8eb510.2)] +// CHECK:STDOUT: %Ptr.facet.loc9_29.2: %Ptr.type = facet_value %T.ref.loc9_28, (constants.%Ptr.impl_witness.add6fd.2) [symbolic = %Ptr.facet.loc9_29.1 (constants.%Ptr.facet.8eb510.2)] +// CHECK:STDOUT: %.loc9_29.3: %Ptr.type = converted %T.ref.loc9_28, %Ptr.facet.loc9_29.2 [symbolic = %Ptr.facet.loc9_29.1 (constants.%Ptr.facet.8eb510.2)] // CHECK:STDOUT: %impl.elem0.loc9: type = impl_witness_access constants.%Ptr.impl_witness.add6fd.2, element0 [symbolic = %ptr (constants.%ptr.e8f8f9.2)] -// CHECK:STDOUT: %.loc9_30.4: Core.Form = init_form %impl.elem0.loc9 [symbolic = %.loc9_30.2 (constants.%.cb6)] -// CHECK:STDOUT: %.loc9_10.1: type = splice_block %.loc9_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc9_29.4: Core.Form = init_form %impl.elem0.loc9 [symbolic = %.loc9_29.2 (constants.%.cb6)] +// CHECK:STDOUT: %.loc9_9.1: type = splice_block %.loc9_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc9_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.67d)] // CHECK:STDOUT: %t.param: ref @F.%T.loc9_7.1 (%T.67d) = ref_param call_param0 -// CHECK:STDOUT: %T.ref.loc9_23: type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.67d)] +// CHECK:STDOUT: %T.ref.loc9_22: type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.67d)] // CHECK:STDOUT: %t: ref @F.%T.loc9_7.1 (%T.67d) = wrapper_binding t, %t.param // CHECK:STDOUT: %return.param: ref @F.%ptr (%ptr.e8f8f9.2) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%ptr (%ptr.e8f8f9.2) = return_slot %return.param @@ -1127,42 +1127,42 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: generic final impl @U.as.Ptr.impl(%U.loc7_21.1: type) { // CHECK:STDOUT: %U.patt.loc7_21.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_21.2 (constants.%U.patt.d47)] // CHECK:STDOUT: %U.loc7_21.2: type = symbolic_binding U, 0 [symbolic = %U.loc7_21.2 (constants.%U.67d)] -// CHECK:STDOUT: %ptr.loc7_54.2: type = ptr_type %U.loc7_21.2 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0.f33 = %ptr.loc7_54.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.9d8e6c.1)] -// CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2: = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(%U.loc7_21.2) [symbolic = %Ptr.impl_witness.loc7_56.2 (constants.%Ptr.impl_witness.add6fd.1)] +// CHECK:STDOUT: %ptr.loc7_53.2: type = ptr_type %U.loc7_21.2 [symbolic = %ptr.loc7_53.2 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0.f33 = %ptr.loc7_53.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.9d8e6c.1)] +// CHECK:STDOUT: %Ptr.impl_witness.loc7_55.2: = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(%U.loc7_21.2) [symbolic = %Ptr.impl_witness.loc7_55.2 (constants.%Ptr.impl_witness.add6fd.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %Ptr_where.type [symbolic = %require_complete (constants.%require_complete.2060e7.1)] // CHECK:STDOUT: -// CHECK:STDOUT: final impl: %U.ref.loc7_30 as %.loc7_39 { +// CHECK:STDOUT: final impl: %U.ref.loc7_29 as %.loc7_38 { // CHECK:STDOUT: %Ptr.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @U.as.Ptr.impl [concrete] -// CHECK:STDOUT: %Ptr.impl_witness.loc7_56.1: = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(constants.%U.67d) [symbolic = %Ptr.impl_witness.loc7_56.2 (constants.%Ptr.impl_witness.add6fd.1)] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %Ptr.impl_witness.loc7_55.1: = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(constants.%U.67d) [symbolic = %Ptr.impl_witness.loc7_55.2 (constants.%Ptr.impl_witness.add6fd.1)] +// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_53.2 (constants.%ptr.e8f8f9.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %.loc7_39 -// CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_56.1 +// CHECK:STDOUT: extend %.loc7_38 +// CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_55.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc9_7.2: type) { // CHECK:STDOUT: %T.patt.loc9_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.d47)] // CHECK:STDOUT: %T.loc9_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.67d)] -// CHECK:STDOUT: %pattern_type.loc9_21: type = pattern_type %T.loc9_7.1 [symbolic = %pattern_type.loc9_21 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %t.patt.loc9_21.2: @F.%pattern_type.loc9_21 (%pattern_type.51d) = ref_binding_pattern t [symbolic = %t.patt.loc9_21.2 (constants.%t.patt)] -// CHECK:STDOUT: %t.param_patt.loc9_16.2: @F.%pattern_type.loc9_21 (%pattern_type.51d) = var_param_pattern %t.patt.loc9_21.2 [symbolic = %t.param_patt.loc9_16.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %.loc9_30.1: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.loc9_7.1) [symbolic = %.loc9_30.1 (constants.%.6a8)] +// CHECK:STDOUT: %pattern_type.loc9_20: type = pattern_type %T.loc9_7.1 [symbolic = %pattern_type.loc9_20 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %t.patt.loc9_20.2: @F.%pattern_type.loc9_20 (%pattern_type.51d) = ref_binding_pattern t [symbolic = %t.patt.loc9_20.2 (constants.%t.patt)] +// CHECK:STDOUT: %t.param_patt.loc9_15.2: @F.%pattern_type.loc9_20 (%pattern_type.51d) = var_param_pattern %t.patt.loc9_20.2 [symbolic = %t.param_patt.loc9_15.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %.loc9_29.1: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.loc9_7.1) [symbolic = %.loc9_29.1 (constants.%.6a8)] // CHECK:STDOUT: %Ptr.impl_witness: = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%T.loc9_7.1) [symbolic = %Ptr.impl_witness (constants.%Ptr.impl_witness.add6fd.2)] -// CHECK:STDOUT: %Ptr.facet.loc9_30.1: %Ptr.type = facet_value %T.loc9_7.1, (%Ptr.impl_witness) [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet.8eb510.2)] +// CHECK:STDOUT: %Ptr.facet.loc9_29.1: %Ptr.type = facet_value %T.loc9_7.1, (%Ptr.impl_witness) [symbolic = %Ptr.facet.loc9_29.1 (constants.%Ptr.facet.8eb510.2)] // CHECK:STDOUT: %ptr: type = ptr_type %T.loc9_7.1 [symbolic = %ptr (constants.%ptr.e8f8f9.2)] -// CHECK:STDOUT: %.loc9_30.2: Core.Form = init_form %ptr [symbolic = %.loc9_30.2 (constants.%.cb6)] -// CHECK:STDOUT: %pattern_type.loc9_30: type = pattern_type %ptr [symbolic = %pattern_type.loc9_30 (constants.%pattern_type.4f4)] -// CHECK:STDOUT: %return.param_patt.loc9_30.2: @F.%pattern_type.loc9_30 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc9_30.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc9_26.2: @F.%pattern_type.loc9_30 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc9_30.2, %ptr [symbolic = %return.patt.loc9_26.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: %.loc9_29.2: Core.Form = init_form %ptr [symbolic = %.loc9_29.2 (constants.%.cb6)] +// CHECK:STDOUT: %pattern_type.loc9_29: type = pattern_type %ptr [symbolic = %pattern_type.loc9_29 (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %return.param_patt.loc9_29.2: @F.%pattern_type.loc9_29 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc9_29.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc9_25.2: @F.%pattern_type.loc9_29 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc9_29.2, %ptr [symbolic = %return.patt.loc9_25.2 (constants.%return.patt.d67)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc9_16: = require_complete_type %T.loc9_7.1 [symbolic = %require_complete.loc9_16 (constants.%require_complete.944)] -// CHECK:STDOUT: %require_complete.loc9_26: = require_complete_type %ptr [symbolic = %require_complete.loc9_26 (constants.%require_complete.ef1)] +// CHECK:STDOUT: %require_complete.loc9_15: = require_complete_type %T.loc9_7.1 [symbolic = %require_complete.loc9_15 (constants.%require_complete.944)] +// CHECK:STDOUT: %require_complete.loc9_25: = require_complete_type %ptr [symbolic = %require_complete.loc9_25 (constants.%require_complete.ef1)] // CHECK:STDOUT: %.loc10_10.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc9_7.1) [symbolic = %.loc10_10.3 (constants.%.0e9)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] // CHECK:STDOUT: %Copy.facet.loc10_10.3: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_10.3 (constants.%Copy.facet)] @@ -1201,9 +1201,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%U.67d) { // CHECK:STDOUT: %U.patt.loc7_21.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc7_21.2 => constants.%U.67d -// CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.e8f8f9.1 +// CHECK:STDOUT: %ptr.loc7_53.2 => constants.%ptr.e8f8f9.1 // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.9d8e6c.1 -// CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.add6fd.1 +// CHECK:STDOUT: %Ptr.impl_witness.loc7_55.2 => constants.%Ptr.impl_witness.add6fd.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%Ptr.facet.8eb510.1) { @@ -1213,9 +1213,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%T.67d) { // CHECK:STDOUT: %U.patt.loc7_21.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc7_21.2 => constants.%T.67d -// CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.e8f8f9.2 +// CHECK:STDOUT: %ptr.loc7_53.2 => constants.%ptr.e8f8f9.2 // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.9d8e6c.2 -// CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.add6fd.2 +// CHECK:STDOUT: %Ptr.impl_witness.loc7_55.2 => constants.%Ptr.impl_witness.add6fd.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.2060e7.2 @@ -1228,17 +1228,17 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @F(constants.%T.67d) { // CHECK:STDOUT: %T.patt.loc9_7.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc9_7.1 => constants.%T.67d -// CHECK:STDOUT: %pattern_type.loc9_21 => constants.%pattern_type.51d -// CHECK:STDOUT: %t.patt.loc9_21.2 => constants.%t.patt -// CHECK:STDOUT: %t.param_patt.loc9_16.2 => constants.%t.param_patt -// CHECK:STDOUT: %.loc9_30.1 => constants.%.6a8 +// CHECK:STDOUT: %pattern_type.loc9_20 => constants.%pattern_type.51d +// CHECK:STDOUT: %t.patt.loc9_20.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc9_15.2 => constants.%t.param_patt +// CHECK:STDOUT: %.loc9_29.1 => constants.%.6a8 // CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.add6fd.2 -// CHECK:STDOUT: %Ptr.facet.loc9_30.1 => constants.%Ptr.facet.8eb510.2 +// CHECK:STDOUT: %Ptr.facet.loc9_29.1 => constants.%Ptr.facet.8eb510.2 // CHECK:STDOUT: %ptr => constants.%ptr.e8f8f9.2 -// CHECK:STDOUT: %.loc9_30.2 => constants.%.cb6 -// CHECK:STDOUT: %pattern_type.loc9_30 => constants.%pattern_type.4f4 -// CHECK:STDOUT: %return.param_patt.loc9_30.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc9_26.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %.loc9_29.2 => constants.%.cb6 +// CHECK:STDOUT: %pattern_type.loc9_29 => constants.%pattern_type.4f4 +// CHECK:STDOUT: %return.param_patt.loc9_29.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc9_25.2 => constants.%return.patt.d67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_facet_access_type.carbon @@ -1315,55 +1315,55 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: impl_decl @U.as.Ptr.impl [concrete] { // CHECK:STDOUT: %U.patt.loc7_21.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_21.2 (constants.%U.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref.loc7_30: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)] +// CHECK:STDOUT: %U.ref.loc7_29: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)] // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] -// CHECK:STDOUT: %.Self.frozen.loc7_39: %Ptr.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.073] +// CHECK:STDOUT: %.Self.frozen.loc7_38: %Ptr.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.073] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Ptr.ref [concrete] -// CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.frozen.loc7_39 [symbolic_self = constants.%.Self.frozen.073] +// CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.frozen.loc7_38 [symbolic_self = constants.%.Self.frozen.073] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc7_44: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.b1a] -// CHECK:STDOUT: %impl.elem0.loc7_45.1: type = impl_witness_access constants.%Ptr.lookup_impl_witness.2e6, element0 [symbolic_self = constants.%impl.elem0.a05] -// CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)] -// CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %rewrite.loc7_51.1 = requirement_rewrite %impl.elem0.loc7_45.1, %ptr.loc7_54.1 [concrete] -// CHECK:STDOUT: %impl.elem0.loc7_45.2: type = impl_witness_access constants.%Ptr.lookup_impl_witness.497, element0 [symbolic_self = constants.%impl.elem0.f33] -// CHECK:STDOUT: %rewrite.loc7_51.2 = requirement_rewrite %impl.elem0.loc7_45.2, %ptr.loc7_54.1 [concrete] -// CHECK:STDOUT: %.loc7_39: type = where_expr [symbolic = %Ptr_where.type (constants.%Ptr_where.type.9d8)] { +// CHECK:STDOUT: %impl.elem0.loc7_44.1: type = impl_witness_access constants.%Ptr.lookup_impl_witness.2e6, element0 [symbolic_self = constants.%impl.elem0.a05] +// CHECK:STDOUT: %U.ref.loc7_52: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)] +// CHECK:STDOUT: %ptr.loc7_53.1: type = ptr_type %U.ref.loc7_52 [symbolic = %ptr.loc7_53.2 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %rewrite.loc7_50.1 = requirement_rewrite %impl.elem0.loc7_44.1, %ptr.loc7_53.1 [concrete] +// CHECK:STDOUT: %impl.elem0.loc7_44.2: type = impl_witness_access constants.%Ptr.lookup_impl_witness.497, element0 [symbolic_self = constants.%impl.elem0.f33] +// CHECK:STDOUT: %rewrite.loc7_50.2 = requirement_rewrite %impl.elem0.loc7_44.2, %ptr.loc7_53.1 [concrete] +// CHECK:STDOUT: %.loc7_38: type = where_expr [symbolic = %Ptr_where.type (constants.%Ptr_where.type.9d8)] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Ptr.ref [concrete] -// CHECK:STDOUT: %rewrite.loc7_51.2 = requirement_rewrite %impl.elem0.loc7_45.2, %ptr.loc7_54.1 [concrete] +// CHECK:STDOUT: %rewrite.loc7_50.2 = requirement_rewrite %impl.elem0.loc7_44.2, %ptr.loc7_53.1 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7_24.1: type = splice_block %.loc7_24.2 [concrete = type] { +// CHECK:STDOUT: %.loc7_23.1: type = splice_block %.loc7_23.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc7_21: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc7_24.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_23.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc7_21.1: type = symbolic_binding U, 0 [symbolic = %U.loc7_21.2 (constants.%U.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc9_7.1: %pattern_type.f5d = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.a2e)] -// CHECK:STDOUT: %t.patt.loc9_20.1: @F.%pattern_type.loc9_20 (%pattern_type.756) = ref_binding_pattern t [symbolic = %t.patt.loc9_20.2 (constants.%t.patt)] -// CHECK:STDOUT: %t.param_patt.loc9_15.1: @F.%pattern_type.loc9_20 (%pattern_type.756) = var_param_pattern %t.patt.loc9_20.1 [symbolic = %t.param_patt.loc9_15.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %return.param_patt.loc9_29.1: @F.%pattern_type.loc9_29 (%pattern_type.f62) = out_param_pattern [symbolic = %return.param_patt.loc9_29.2 (constants.%return.param_patt.b93)] -// CHECK:STDOUT: %return.patt.loc9_25.1: @F.%pattern_type.loc9_29 (%pattern_type.f62) = return_slot_pattern %return.param_patt.loc9_29.1, %impl.elem0.loc9 [symbolic = %return.patt.loc9_25.2 (constants.%return.patt.058)] +// CHECK:STDOUT: %t.patt.loc9_19.1: @F.%pattern_type.loc9_19 (%pattern_type.756) = ref_binding_pattern t [symbolic = %t.patt.loc9_19.2 (constants.%t.patt)] +// CHECK:STDOUT: %t.param_patt.loc9_14.1: @F.%pattern_type.loc9_19 (%pattern_type.756) = var_param_pattern %t.patt.loc9_19.1 [symbolic = %t.param_patt.loc9_14.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %return.param_patt.loc9_28.1: @F.%pattern_type.loc9_28 (%pattern_type.f62) = out_param_pattern [symbolic = %return.param_patt.loc9_28.2 (constants.%return.param_patt.b93)] +// CHECK:STDOUT: %return.patt.loc9_24.1: @F.%pattern_type.loc9_28 (%pattern_type.f62) = return_slot_pattern %return.param_patt.loc9_28.1, %impl.elem0.loc9 [symbolic = %return.patt.loc9_24.2 (constants.%return.patt.058)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc9_28: %Ptr.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.76f)] -// CHECK:STDOUT: %T.as_type.loc9_29: type = facet_access_type %T.ref.loc9_28 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.468)] -// CHECK:STDOUT: %.loc9_29.3: type = converted %T.ref.loc9_28, %T.as_type.loc9_29 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.468)] +// CHECK:STDOUT: %T.ref.loc9_27: %Ptr.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.76f)] +// CHECK:STDOUT: %T.as_type.loc9_28: type = facet_access_type %T.ref.loc9_27 [symbolic = %T.as_type.loc9_21.1 (constants.%T.as_type.468)] +// CHECK:STDOUT: %.loc9_28.3: type = converted %T.ref.loc9_27, %T.as_type.loc9_28 [symbolic = %T.as_type.loc9_21.1 (constants.%T.as_type.468)] // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.b1a] // CHECK:STDOUT: %impl.elem0.loc9: type = impl_witness_access constants.%Ptr.impl_witness.e33, element0 [symbolic = %ptr (constants.%ptr.ac4)] -// CHECK:STDOUT: %.loc9_29.4: Core.Form = init_form %impl.elem0.loc9 [symbolic = %.loc9_29.2 (constants.%.e16)] -// CHECK:STDOUT: %.loc9_10: type = splice_block %Ptr.ref [concrete = constants.%Ptr.type] { +// CHECK:STDOUT: %.loc9_28.4: Core.Form = init_form %impl.elem0.loc9 [symbolic = %.loc9_28.2 (constants.%.e16)] +// CHECK:STDOUT: %.loc9_9: type = splice_block %Ptr.ref [concrete = constants.%Ptr.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_7.2: %Ptr.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.76f)] -// CHECK:STDOUT: %t.param: ref @F.%T.as_type.loc9_22.1 (%T.as_type.468) = ref_param call_param0 -// CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.468)] { -// CHECK:STDOUT: %T.ref.loc9_22: %Ptr.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.76f)] -// CHECK:STDOUT: %T.as_type.loc9_22.2: type = facet_access_type %T.ref.loc9_22 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.468)] -// CHECK:STDOUT: %.loc9_22.2: type = converted %T.ref.loc9_22, %T.as_type.loc9_22.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.468)] +// CHECK:STDOUT: %t.param: ref @F.%T.as_type.loc9_21.1 (%T.as_type.468) = ref_param call_param0 +// CHECK:STDOUT: %.loc9_21.1: type = splice_block %.loc9_21.2 [symbolic = %T.as_type.loc9_21.1 (constants.%T.as_type.468)] { +// CHECK:STDOUT: %T.ref.loc9_21: %Ptr.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.76f)] +// CHECK:STDOUT: %T.as_type.loc9_21.2: type = facet_access_type %T.ref.loc9_21 [symbolic = %T.as_type.loc9_21.1 (constants.%T.as_type.468)] +// CHECK:STDOUT: %.loc9_21.2: type = converted %T.ref.loc9_21, %T.as_type.loc9_21.2 [symbolic = %T.as_type.loc9_21.1 (constants.%T.as_type.468)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: ref @F.%T.as_type.loc9_22.1 (%T.as_type.468) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: ref @F.%T.as_type.loc9_21.1 (%T.as_type.468) = wrapper_binding t, %t.param // CHECK:STDOUT: %return.param: ref @F.%ptr (%ptr.ac4) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%ptr (%ptr.ac4) = return_slot %return.param // CHECK:STDOUT: } @@ -1391,42 +1391,42 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: generic final impl @U.as.Ptr.impl(%U.loc7_21.1: type) { // CHECK:STDOUT: %U.patt.loc7_21.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_21.2 (constants.%U.patt.d47)] // CHECK:STDOUT: %U.loc7_21.2: type = symbolic_binding U, 0 [symbolic = %U.loc7_21.2 (constants.%U.67d)] -// CHECK:STDOUT: %ptr.loc7_54.2: type = ptr_type %U.loc7_21.2 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0.f33 = %ptr.loc7_54.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.9d8)] -// CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2: = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(%U.loc7_21.2) [symbolic = %Ptr.impl_witness.loc7_56.2 (constants.%Ptr.impl_witness.add)] +// CHECK:STDOUT: %ptr.loc7_53.2: type = ptr_type %U.loc7_21.2 [symbolic = %ptr.loc7_53.2 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0.f33 = %ptr.loc7_53.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.9d8)] +// CHECK:STDOUT: %Ptr.impl_witness.loc7_55.2: = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(%U.loc7_21.2) [symbolic = %Ptr.impl_witness.loc7_55.2 (constants.%Ptr.impl_witness.add)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %Ptr_where.type [symbolic = %require_complete (constants.%require_complete.206)] // CHECK:STDOUT: -// CHECK:STDOUT: final impl: %U.ref.loc7_30 as %.loc7_39 { +// CHECK:STDOUT: final impl: %U.ref.loc7_29 as %.loc7_38 { // CHECK:STDOUT: %Ptr.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @U.as.Ptr.impl [concrete] -// CHECK:STDOUT: %Ptr.impl_witness.loc7_56.1: = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(constants.%U.67d) [symbolic = %Ptr.impl_witness.loc7_56.2 (constants.%Ptr.impl_witness.add)] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %Ptr.impl_witness.loc7_55.1: = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(constants.%U.67d) [symbolic = %Ptr.impl_witness.loc7_55.2 (constants.%Ptr.impl_witness.add)] +// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_53.2 (constants.%ptr.e8f8f9.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %.loc7_39 -// CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_56.1 +// CHECK:STDOUT: extend %.loc7_38 +// CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_55.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc9_7.2: %Ptr.type) { // CHECK:STDOUT: %T.patt.loc9_7.2: %pattern_type.f5d = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.a2e)] // CHECK:STDOUT: %T.loc9_7.1: %Ptr.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.76f)] -// CHECK:STDOUT: %T.as_type.loc9_22.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.468)] -// CHECK:STDOUT: %pattern_type.loc9_20: type = pattern_type %T.as_type.loc9_22.1 [symbolic = %pattern_type.loc9_20 (constants.%pattern_type.756)] -// CHECK:STDOUT: %t.patt.loc9_20.2: @F.%pattern_type.loc9_20 (%pattern_type.756) = ref_binding_pattern t [symbolic = %t.patt.loc9_20.2 (constants.%t.patt)] -// CHECK:STDOUT: %t.param_patt.loc9_15.2: @F.%pattern_type.loc9_20 (%pattern_type.756) = var_param_pattern %t.patt.loc9_20.2 [symbolic = %t.param_patt.loc9_15.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %.loc9_29.1: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.as_type.loc9_22.1) [symbolic = %.loc9_29.1 (constants.%.14a)] -// CHECK:STDOUT: %ptr: type = ptr_type %T.as_type.loc9_22.1 [symbolic = %ptr (constants.%ptr.ac4)] -// CHECK:STDOUT: %.loc9_29.2: Core.Form = init_form %ptr [symbolic = %.loc9_29.2 (constants.%.e16)] -// CHECK:STDOUT: %pattern_type.loc9_29: type = pattern_type %ptr [symbolic = %pattern_type.loc9_29 (constants.%pattern_type.f62)] -// CHECK:STDOUT: %return.param_patt.loc9_29.2: @F.%pattern_type.loc9_29 (%pattern_type.f62) = out_param_pattern [symbolic = %return.param_patt.loc9_29.2 (constants.%return.param_patt.b93)] -// CHECK:STDOUT: %return.patt.loc9_25.2: @F.%pattern_type.loc9_29 (%pattern_type.f62) = return_slot_pattern %return.param_patt.loc9_29.2, %ptr [symbolic = %return.patt.loc9_25.2 (constants.%return.patt.058)] +// CHECK:STDOUT: %T.as_type.loc9_21.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_21.1 (constants.%T.as_type.468)] +// CHECK:STDOUT: %pattern_type.loc9_19: type = pattern_type %T.as_type.loc9_21.1 [symbolic = %pattern_type.loc9_19 (constants.%pattern_type.756)] +// CHECK:STDOUT: %t.patt.loc9_19.2: @F.%pattern_type.loc9_19 (%pattern_type.756) = ref_binding_pattern t [symbolic = %t.patt.loc9_19.2 (constants.%t.patt)] +// CHECK:STDOUT: %t.param_patt.loc9_14.2: @F.%pattern_type.loc9_19 (%pattern_type.756) = var_param_pattern %t.patt.loc9_19.2 [symbolic = %t.param_patt.loc9_14.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %.loc9_28.1: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.as_type.loc9_21.1) [symbolic = %.loc9_28.1 (constants.%.14a)] +// CHECK:STDOUT: %ptr: type = ptr_type %T.as_type.loc9_21.1 [symbolic = %ptr (constants.%ptr.ac4)] +// CHECK:STDOUT: %.loc9_28.2: Core.Form = init_form %ptr [symbolic = %.loc9_28.2 (constants.%.e16)] +// CHECK:STDOUT: %pattern_type.loc9_28: type = pattern_type %ptr [symbolic = %pattern_type.loc9_28 (constants.%pattern_type.f62)] +// CHECK:STDOUT: %return.param_patt.loc9_28.2: @F.%pattern_type.loc9_28 (%pattern_type.f62) = out_param_pattern [symbolic = %return.param_patt.loc9_28.2 (constants.%return.param_patt.b93)] +// CHECK:STDOUT: %return.patt.loc9_24.2: @F.%pattern_type.loc9_28 (%pattern_type.f62) = return_slot_pattern %return.param_patt.loc9_28.2, %ptr [symbolic = %return.patt.loc9_24.2 (constants.%return.patt.058)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc9_15: = require_complete_type %T.as_type.loc9_22.1 [symbolic = %require_complete.loc9_15 (constants.%require_complete.35c)] -// CHECK:STDOUT: %require_complete.loc9_25: = require_complete_type %ptr [symbolic = %require_complete.loc9_25 (constants.%require_complete.841)] -// CHECK:STDOUT: %.loc10_10.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.as_type.loc9_22.1) [symbolic = %.loc10_10.3 (constants.%.ee9)] +// CHECK:STDOUT: %require_complete.loc9_14: = require_complete_type %T.as_type.loc9_21.1 [symbolic = %require_complete.loc9_14 (constants.%require_complete.35c)] +// CHECK:STDOUT: %require_complete.loc9_24: = require_complete_type %ptr [symbolic = %require_complete.loc9_24 (constants.%require_complete.841)] +// CHECK:STDOUT: %.loc10_10.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.as_type.loc9_21.1) [symbolic = %.loc10_10.3 (constants.%.ee9)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d90)] // CHECK:STDOUT: %Copy.facet.loc10_10.3: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_10.3 (constants.%Copy.facet)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc10_10.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.a39)] @@ -1434,9 +1434,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.4 (%.229) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.1f8)] // CHECK:STDOUT: %specific_impl_fn.loc10_10.2: = specific_impl_function %impl.elem0.loc10_10.2, @Copy.WithSelf.Op(%Copy.facet.loc10_10.3) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.d80)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: ref @F.%T.as_type.loc9_22.1 (%T.as_type.468)) -> out %return.param: @F.%ptr (%ptr.ac4) { +// CHECK:STDOUT: fn(%t.param: ref @F.%T.as_type.loc9_21.1 (%T.as_type.468)) -> out %return.param: @F.%ptr (%ptr.ac4) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: ref @F.%T.as_type.loc9_22.1 (%T.as_type.468) = name_ref t, %t +// CHECK:STDOUT: %t.ref: ref @F.%T.as_type.loc9_21.1 (%T.as_type.468) = name_ref t, %t // CHECK:STDOUT: %addr: @F.%ptr (%ptr.ac4) = addr_of %t.ref // CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.4 (%.229) = impl_witness_access constants.%Copy.lookup_impl_witness.d90, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.1f8)] // CHECK:STDOUT: %bound_method.loc10_10.1: = bound_method %addr, %impl.elem0.loc10_10.1 @@ -1464,9 +1464,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%U.67d) { // CHECK:STDOUT: %U.patt.loc7_21.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc7_21.2 => constants.%U.67d -// CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.e8f8f9.1 +// CHECK:STDOUT: %ptr.loc7_53.2 => constants.%ptr.e8f8f9.1 // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.9d8 -// CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.add +// CHECK:STDOUT: %Ptr.impl_witness.loc7_55.2 => constants.%Ptr.impl_witness.add // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%Ptr.facet) { @@ -1480,9 +1480,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%T.as_type.468) { // CHECK:STDOUT: %U.patt.loc7_21.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc7_21.2 => constants.%T.as_type.468 -// CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.ac4 +// CHECK:STDOUT: %ptr.loc7_53.2 => constants.%ptr.ac4 // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.a29 -// CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.e33 +// CHECK:STDOUT: %Ptr.impl_witness.loc7_55.2 => constants.%Ptr.impl_witness.e33 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.d44 @@ -1491,16 +1491,16 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @F(constants.%T.76f) { // CHECK:STDOUT: %T.patt.loc9_7.2 => constants.%T.patt.a2e // CHECK:STDOUT: %T.loc9_7.1 => constants.%T.76f -// CHECK:STDOUT: %T.as_type.loc9_22.1 => constants.%T.as_type.468 -// CHECK:STDOUT: %pattern_type.loc9_20 => constants.%pattern_type.756 -// CHECK:STDOUT: %t.patt.loc9_20.2 => constants.%t.patt -// CHECK:STDOUT: %t.param_patt.loc9_15.2 => constants.%t.param_patt -// CHECK:STDOUT: %.loc9_29.1 => constants.%.14a +// CHECK:STDOUT: %T.as_type.loc9_21.1 => constants.%T.as_type.468 +// CHECK:STDOUT: %pattern_type.loc9_19 => constants.%pattern_type.756 +// CHECK:STDOUT: %t.patt.loc9_19.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc9_14.2 => constants.%t.param_patt +// CHECK:STDOUT: %.loc9_28.1 => constants.%.14a // CHECK:STDOUT: %ptr => constants.%ptr.ac4 -// CHECK:STDOUT: %.loc9_29.2 => constants.%.e16 -// CHECK:STDOUT: %pattern_type.loc9_29 => constants.%pattern_type.f62 -// CHECK:STDOUT: %return.param_patt.loc9_29.2 => constants.%return.param_patt.b93 -// CHECK:STDOUT: %return.patt.loc9_25.2 => constants.%return.patt.058 +// CHECK:STDOUT: %.loc9_28.2 => constants.%.e16 +// CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.f62 +// CHECK:STDOUT: %return.param_patt.loc9_28.2 => constants.%return.param_patt.b93 +// CHECK:STDOUT: %return.patt.loc9_24.2 => constants.%return.patt.058 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_facet_value.carbon @@ -1577,54 +1577,54 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: impl_decl @U.as.Ptr.impl [concrete] { // CHECK:STDOUT: %U.patt.loc7_21.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_21.2 (constants.%U.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref.loc7_30: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)] +// CHECK:STDOUT: %U.ref.loc7_29: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)] // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] -// CHECK:STDOUT: %.Self.frozen.loc7_39: %Ptr.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.073] +// CHECK:STDOUT: %.Self.frozen.loc7_38: %Ptr.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.073] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Ptr.ref [concrete] -// CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.frozen.loc7_39 [symbolic_self = constants.%.Self.frozen.073] +// CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.frozen.loc7_38 [symbolic_self = constants.%.Self.frozen.073] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc7_44: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.b1a] -// CHECK:STDOUT: %impl.elem0.loc7_45.1: type = impl_witness_access constants.%Ptr.lookup_impl_witness.2e6, element0 [symbolic_self = constants.%impl.elem0.a05] -// CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)] -// CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %rewrite.loc7_51.1 = requirement_rewrite %impl.elem0.loc7_45.1, %ptr.loc7_54.1 [concrete] -// CHECK:STDOUT: %impl.elem0.loc7_45.2: type = impl_witness_access constants.%Ptr.lookup_impl_witness.497, element0 [symbolic_self = constants.%impl.elem0.f33] -// CHECK:STDOUT: %rewrite.loc7_51.2 = requirement_rewrite %impl.elem0.loc7_45.2, %ptr.loc7_54.1 [concrete] -// CHECK:STDOUT: %.loc7_39: type = where_expr [symbolic = %Ptr_where.type (constants.%Ptr_where.type.9d8)] { +// CHECK:STDOUT: %impl.elem0.loc7_44.1: type = impl_witness_access constants.%Ptr.lookup_impl_witness.2e6, element0 [symbolic_self = constants.%impl.elem0.a05] +// CHECK:STDOUT: %U.ref.loc7_52: type = name_ref U, %U.loc7_21.1 [symbolic = %U.loc7_21.2 (constants.%U.67d)] +// CHECK:STDOUT: %ptr.loc7_53.1: type = ptr_type %U.ref.loc7_52 [symbolic = %ptr.loc7_53.2 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %rewrite.loc7_50.1 = requirement_rewrite %impl.elem0.loc7_44.1, %ptr.loc7_53.1 [concrete] +// CHECK:STDOUT: %impl.elem0.loc7_44.2: type = impl_witness_access constants.%Ptr.lookup_impl_witness.497, element0 [symbolic_self = constants.%impl.elem0.f33] +// CHECK:STDOUT: %rewrite.loc7_50.2 = requirement_rewrite %impl.elem0.loc7_44.2, %ptr.loc7_53.1 [concrete] +// CHECK:STDOUT: %.loc7_38: type = where_expr [symbolic = %Ptr_where.type (constants.%Ptr_where.type.9d8)] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Ptr.ref [concrete] -// CHECK:STDOUT: %rewrite.loc7_51.2 = requirement_rewrite %impl.elem0.loc7_45.2, %ptr.loc7_54.1 [concrete] +// CHECK:STDOUT: %rewrite.loc7_50.2 = requirement_rewrite %impl.elem0.loc7_44.2, %ptr.loc7_53.1 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7_24.1: type = splice_block %.loc7_24.2 [concrete = type] { +// CHECK:STDOUT: %.loc7_23.1: type = splice_block %.loc7_23.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc7_21: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc7_24.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc7_23.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc7_21.1: type = symbolic_binding U, 0 [symbolic = %U.loc7_21.2 (constants.%U.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc9_7.1: %pattern_type.f5d = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.a2e)] -// CHECK:STDOUT: %t.patt.loc9_20.1: @F.%pattern_type.loc9_20 (%pattern_type.756) = ref_binding_pattern t [symbolic = %t.patt.loc9_20.2 (constants.%t.patt)] -// CHECK:STDOUT: %t.param_patt.loc9_15.1: @F.%pattern_type.loc9_20 (%pattern_type.756) = var_param_pattern %t.patt.loc9_20.1 [symbolic = %t.param_patt.loc9_15.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %return.param_patt.loc9_29.1: @F.%pattern_type.loc9_29 (%pattern_type.f62) = out_param_pattern [symbolic = %return.param_patt.loc9_29.2 (constants.%return.param_patt.b93)] -// CHECK:STDOUT: %return.patt.loc9_25.1: @F.%pattern_type.loc9_29 (%pattern_type.f62) = return_slot_pattern %return.param_patt.loc9_29.1, %impl.elem0.loc9 [symbolic = %return.patt.loc9_25.2 (constants.%return.patt.058)] +// CHECK:STDOUT: %t.patt.loc9_19.1: @F.%pattern_type.loc9_19 (%pattern_type.756) = ref_binding_pattern t [symbolic = %t.patt.loc9_19.2 (constants.%t.patt)] +// CHECK:STDOUT: %t.param_patt.loc9_14.1: @F.%pattern_type.loc9_19 (%pattern_type.756) = var_param_pattern %t.patt.loc9_19.1 [symbolic = %t.param_patt.loc9_14.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %return.param_patt.loc9_28.1: @F.%pattern_type.loc9_28 (%pattern_type.f62) = out_param_pattern [symbolic = %return.param_patt.loc9_28.2 (constants.%return.param_patt.b93)] +// CHECK:STDOUT: %return.patt.loc9_24.1: @F.%pattern_type.loc9_28 (%pattern_type.f62) = return_slot_pattern %return.param_patt.loc9_28.1, %impl.elem0.loc9 [symbolic = %return.patt.loc9_24.2 (constants.%return.patt.058)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc9_28: %Ptr.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.76f)] -// CHECK:STDOUT: %Ptr.ref.loc9_31: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] +// CHECK:STDOUT: %T.ref.loc9_27: %Ptr.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.76f)] +// CHECK:STDOUT: %Ptr.ref.loc9_30: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] // CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.b1a] // CHECK:STDOUT: %impl.elem0.loc9: type = impl_witness_access constants.%Ptr.impl_witness.e33, element0 [symbolic = %ptr (constants.%ptr.ac4)] -// CHECK:STDOUT: %.loc9_29.3: Core.Form = init_form %impl.elem0.loc9 [symbolic = %.loc9_29.2 (constants.%.e16)] -// CHECK:STDOUT: %.loc9_10: type = splice_block %Ptr.ref.loc9_10 [concrete = constants.%Ptr.type] { +// CHECK:STDOUT: %.loc9_28.3: Core.Form = init_form %impl.elem0.loc9 [symbolic = %.loc9_28.2 (constants.%.e16)] +// CHECK:STDOUT: %.loc9_9: type = splice_block %Ptr.ref.loc9_9 [concrete = constants.%Ptr.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %Ptr.ref.loc9_10: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] +// CHECK:STDOUT: %Ptr.ref.loc9_9: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_7.2: %Ptr.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.76f)] -// CHECK:STDOUT: %t.param: ref @F.%T.as_type.loc9_22.1 (%T.as_type.468) = ref_param call_param0 -// CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.468)] { -// CHECK:STDOUT: %T.ref.loc9_22: %Ptr.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.76f)] -// CHECK:STDOUT: %T.as_type.loc9_22.2: type = facet_access_type %T.ref.loc9_22 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.468)] -// CHECK:STDOUT: %.loc9_22.2: type = converted %T.ref.loc9_22, %T.as_type.loc9_22.2 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.468)] +// CHECK:STDOUT: %t.param: ref @F.%T.as_type.loc9_21.1 (%T.as_type.468) = ref_param call_param0 +// CHECK:STDOUT: %.loc9_21.1: type = splice_block %.loc9_21.2 [symbolic = %T.as_type.loc9_21.1 (constants.%T.as_type.468)] { +// CHECK:STDOUT: %T.ref.loc9_21: %Ptr.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.76f)] +// CHECK:STDOUT: %T.as_type.loc9_21.2: type = facet_access_type %T.ref.loc9_21 [symbolic = %T.as_type.loc9_21.1 (constants.%T.as_type.468)] +// CHECK:STDOUT: %.loc9_21.2: type = converted %T.ref.loc9_21, %T.as_type.loc9_21.2 [symbolic = %T.as_type.loc9_21.1 (constants.%T.as_type.468)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: ref @F.%T.as_type.loc9_22.1 (%T.as_type.468) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: ref @F.%T.as_type.loc9_21.1 (%T.as_type.468) = wrapper_binding t, %t.param // CHECK:STDOUT: %return.param: ref @F.%ptr (%ptr.ac4) = out_param call_param1 // CHECK:STDOUT: %return: ref @F.%ptr (%ptr.ac4) = return_slot %return.param // CHECK:STDOUT: } @@ -1652,42 +1652,42 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: generic final impl @U.as.Ptr.impl(%U.loc7_21.1: type) { // CHECK:STDOUT: %U.patt.loc7_21.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_21.2 (constants.%U.patt.d47)] // CHECK:STDOUT: %U.loc7_21.2: type = symbolic_binding U, 0 [symbolic = %U.loc7_21.2 (constants.%U.67d)] -// CHECK:STDOUT: %ptr.loc7_54.2: type = ptr_type %U.loc7_21.2 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0.f33 = %ptr.loc7_54.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.9d8)] -// CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2: = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(%U.loc7_21.2) [symbolic = %Ptr.impl_witness.loc7_56.2 (constants.%Ptr.impl_witness.add)] +// CHECK:STDOUT: %ptr.loc7_53.2: type = ptr_type %U.loc7_21.2 [symbolic = %ptr.loc7_53.2 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %Ptr_where.type: type = facet_type <@Ptr where constants.%impl.elem0.f33 = %ptr.loc7_53.2> [symbolic = %Ptr_where.type (constants.%Ptr_where.type.9d8)] +// CHECK:STDOUT: %Ptr.impl_witness.loc7_55.2: = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(%U.loc7_21.2) [symbolic = %Ptr.impl_witness.loc7_55.2 (constants.%Ptr.impl_witness.add)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %Ptr_where.type [symbolic = %require_complete (constants.%require_complete.206)] // CHECK:STDOUT: -// CHECK:STDOUT: final impl: %U.ref.loc7_30 as %.loc7_39 { +// CHECK:STDOUT: final impl: %U.ref.loc7_29 as %.loc7_38 { // CHECK:STDOUT: %Ptr.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @U.as.Ptr.impl [concrete] -// CHECK:STDOUT: %Ptr.impl_witness.loc7_56.1: = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(constants.%U.67d) [symbolic = %Ptr.impl_witness.loc7_56.2 (constants.%Ptr.impl_witness.add)] -// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %Ptr.impl_witness.loc7_55.1: = impl_witness %Ptr.impl_witness_table, @U.as.Ptr.impl(constants.%U.67d) [symbolic = %Ptr.impl_witness.loc7_55.2 (constants.%Ptr.impl_witness.add)] +// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_53.2 (constants.%ptr.e8f8f9.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: extend %.loc7_39 -// CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_56.1 +// CHECK:STDOUT: extend %.loc7_38 +// CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_55.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc9_7.2: %Ptr.type) { // CHECK:STDOUT: %T.patt.loc9_7.2: %pattern_type.f5d = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.a2e)] // CHECK:STDOUT: %T.loc9_7.1: %Ptr.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.76f)] -// CHECK:STDOUT: %T.as_type.loc9_22.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_22.1 (constants.%T.as_type.468)] -// CHECK:STDOUT: %pattern_type.loc9_20: type = pattern_type %T.as_type.loc9_22.1 [symbolic = %pattern_type.loc9_20 (constants.%pattern_type.756)] -// CHECK:STDOUT: %t.patt.loc9_20.2: @F.%pattern_type.loc9_20 (%pattern_type.756) = ref_binding_pattern t [symbolic = %t.patt.loc9_20.2 (constants.%t.patt)] -// CHECK:STDOUT: %t.param_patt.loc9_15.2: @F.%pattern_type.loc9_20 (%pattern_type.756) = var_param_pattern %t.patt.loc9_20.2 [symbolic = %t.param_patt.loc9_15.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %.loc9_29.1: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.as_type.loc9_22.1) [symbolic = %.loc9_29.1 (constants.%.14a)] -// CHECK:STDOUT: %ptr: type = ptr_type %T.as_type.loc9_22.1 [symbolic = %ptr (constants.%ptr.ac4)] -// CHECK:STDOUT: %.loc9_29.2: Core.Form = init_form %ptr [symbolic = %.loc9_29.2 (constants.%.e16)] -// CHECK:STDOUT: %pattern_type.loc9_29: type = pattern_type %ptr [symbolic = %pattern_type.loc9_29 (constants.%pattern_type.f62)] -// CHECK:STDOUT: %return.param_patt.loc9_29.2: @F.%pattern_type.loc9_29 (%pattern_type.f62) = out_param_pattern [symbolic = %return.param_patt.loc9_29.2 (constants.%return.param_patt.b93)] -// CHECK:STDOUT: %return.patt.loc9_25.2: @F.%pattern_type.loc9_29 (%pattern_type.f62) = return_slot_pattern %return.param_patt.loc9_29.2, %ptr [symbolic = %return.patt.loc9_25.2 (constants.%return.patt.058)] +// CHECK:STDOUT: %T.as_type.loc9_21.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_21.1 (constants.%T.as_type.468)] +// CHECK:STDOUT: %pattern_type.loc9_19: type = pattern_type %T.as_type.loc9_21.1 [symbolic = %pattern_type.loc9_19 (constants.%pattern_type.756)] +// CHECK:STDOUT: %t.patt.loc9_19.2: @F.%pattern_type.loc9_19 (%pattern_type.756) = ref_binding_pattern t [symbolic = %t.patt.loc9_19.2 (constants.%t.patt)] +// CHECK:STDOUT: %t.param_patt.loc9_14.2: @F.%pattern_type.loc9_19 (%pattern_type.756) = var_param_pattern %t.patt.loc9_19.2 [symbolic = %t.param_patt.loc9_14.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %.loc9_28.1: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.as_type.loc9_21.1) [symbolic = %.loc9_28.1 (constants.%.14a)] +// CHECK:STDOUT: %ptr: type = ptr_type %T.as_type.loc9_21.1 [symbolic = %ptr (constants.%ptr.ac4)] +// CHECK:STDOUT: %.loc9_28.2: Core.Form = init_form %ptr [symbolic = %.loc9_28.2 (constants.%.e16)] +// CHECK:STDOUT: %pattern_type.loc9_28: type = pattern_type %ptr [symbolic = %pattern_type.loc9_28 (constants.%pattern_type.f62)] +// CHECK:STDOUT: %return.param_patt.loc9_28.2: @F.%pattern_type.loc9_28 (%pattern_type.f62) = out_param_pattern [symbolic = %return.param_patt.loc9_28.2 (constants.%return.param_patt.b93)] +// CHECK:STDOUT: %return.patt.loc9_24.2: @F.%pattern_type.loc9_28 (%pattern_type.f62) = return_slot_pattern %return.param_patt.loc9_28.2, %ptr [symbolic = %return.patt.loc9_24.2 (constants.%return.patt.058)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc9_15: = require_complete_type %T.as_type.loc9_22.1 [symbolic = %require_complete.loc9_15 (constants.%require_complete.35c)] -// CHECK:STDOUT: %require_complete.loc9_25: = require_complete_type %ptr [symbolic = %require_complete.loc9_25 (constants.%require_complete.841)] -// CHECK:STDOUT: %.loc10_10.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.as_type.loc9_22.1) [symbolic = %.loc10_10.3 (constants.%.ee9)] +// CHECK:STDOUT: %require_complete.loc9_14: = require_complete_type %T.as_type.loc9_21.1 [symbolic = %require_complete.loc9_14 (constants.%require_complete.35c)] +// CHECK:STDOUT: %require_complete.loc9_24: = require_complete_type %ptr [symbolic = %require_complete.loc9_24 (constants.%require_complete.841)] +// CHECK:STDOUT: %.loc10_10.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.as_type.loc9_21.1) [symbolic = %.loc10_10.3 (constants.%.ee9)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d90)] // CHECK:STDOUT: %Copy.facet.loc10_10.3: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_10.3 (constants.%Copy.facet)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc10_10.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.a39)] @@ -1695,9 +1695,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.4 (%.229) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.1f8)] // CHECK:STDOUT: %specific_impl_fn.loc10_10.2: = specific_impl_function %impl.elem0.loc10_10.2, @Copy.WithSelf.Op(%Copy.facet.loc10_10.3) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.d80)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: ref @F.%T.as_type.loc9_22.1 (%T.as_type.468)) -> out %return.param: @F.%ptr (%ptr.ac4) { +// CHECK:STDOUT: fn(%t.param: ref @F.%T.as_type.loc9_21.1 (%T.as_type.468)) -> out %return.param: @F.%ptr (%ptr.ac4) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: ref @F.%T.as_type.loc9_22.1 (%T.as_type.468) = name_ref t, %t +// CHECK:STDOUT: %t.ref: ref @F.%T.as_type.loc9_21.1 (%T.as_type.468) = name_ref t, %t // CHECK:STDOUT: %addr: @F.%ptr (%ptr.ac4) = addr_of %t.ref // CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.4 (%.229) = impl_witness_access constants.%Copy.lookup_impl_witness.d90, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.1f8)] // CHECK:STDOUT: %bound_method.loc10_10.1: = bound_method %addr, %impl.elem0.loc10_10.1 @@ -1725,9 +1725,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%U.67d) { // CHECK:STDOUT: %U.patt.loc7_21.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc7_21.2 => constants.%U.67d -// CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.e8f8f9.1 +// CHECK:STDOUT: %ptr.loc7_53.2 => constants.%ptr.e8f8f9.1 // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.9d8 -// CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.add +// CHECK:STDOUT: %Ptr.impl_witness.loc7_55.2 => constants.%Ptr.impl_witness.add // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Ptr.WithSelf(constants.%Ptr.facet) { @@ -1737,9 +1737,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%T.as_type.468) { // CHECK:STDOUT: %U.patt.loc7_21.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc7_21.2 => constants.%T.as_type.468 -// CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.ac4 +// CHECK:STDOUT: %ptr.loc7_53.2 => constants.%ptr.ac4 // CHECK:STDOUT: %Ptr_where.type => constants.%Ptr_where.type.a29 -// CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.e33 +// CHECK:STDOUT: %Ptr.impl_witness.loc7_55.2 => constants.%Ptr.impl_witness.e33 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.d44 @@ -1752,15 +1752,15 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: specific @F(constants.%T.76f) { // CHECK:STDOUT: %T.patt.loc9_7.2 => constants.%T.patt.a2e // CHECK:STDOUT: %T.loc9_7.1 => constants.%T.76f -// CHECK:STDOUT: %T.as_type.loc9_22.1 => constants.%T.as_type.468 -// CHECK:STDOUT: %pattern_type.loc9_20 => constants.%pattern_type.756 -// CHECK:STDOUT: %t.patt.loc9_20.2 => constants.%t.patt -// CHECK:STDOUT: %t.param_patt.loc9_15.2 => constants.%t.param_patt -// CHECK:STDOUT: %.loc9_29.1 => constants.%.14a +// CHECK:STDOUT: %T.as_type.loc9_21.1 => constants.%T.as_type.468 +// CHECK:STDOUT: %pattern_type.loc9_19 => constants.%pattern_type.756 +// CHECK:STDOUT: %t.patt.loc9_19.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc9_14.2 => constants.%t.param_patt +// CHECK:STDOUT: %.loc9_28.1 => constants.%.14a // CHECK:STDOUT: %ptr => constants.%ptr.ac4 -// CHECK:STDOUT: %.loc9_29.2 => constants.%.e16 -// CHECK:STDOUT: %pattern_type.loc9_29 => constants.%pattern_type.f62 -// CHECK:STDOUT: %return.param_patt.loc9_29.2 => constants.%return.param_patt.b93 -// CHECK:STDOUT: %return.patt.loc9_25.2 => constants.%return.patt.058 +// CHECK:STDOUT: %.loc9_28.2 => constants.%.e16 +// CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.f62 +// CHECK:STDOUT: %return.param_patt.loc9_28.2 => constants.%return.param_patt.b93 +// CHECK:STDOUT: %return.patt.loc9_24.2 => constants.%return.patt.058 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/specific_args.carbon b/toolchain/check/testdata/impl/lookup/specific_args.carbon index 759809d2e62b..fe49a2c1345b 100644 --- a/toolchain/check/testdata/impl/lookup/specific_args.carbon +++ b/toolchain/check/testdata/impl/lookup/specific_args.carbon @@ -16,8 +16,8 @@ library "[[@TEST_NAME]]"; -interface I(T:! type) { fn F(self); } -class C(T:! type) {} +interface I(T: type) { fn F(self); } +class C(T: type) {} class X {} @@ -93,18 +93,18 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc5_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_13.1: type = splice_block %.loc5_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_12.1: type = splice_block %.loc5_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_10.1 (constants.%T)] // CHECK:STDOUT: } @@ -117,31 +117,31 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc4_14.1)> [symbolic = %I.type (constants.%I.type.3fe)] -// CHECK:STDOUT: %Self.loc4_23.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc4_22.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_23.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc4_22.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %I.WithSelf.F.decl: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F)] { -// CHECK:STDOUT: %self.param_patt.loc4_30.1: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = value_param_pattern [symbolic = %self.param_patt.loc4_30.2 (constants.%self.param_patt)] -// CHECK:STDOUT: %self.patt.loc4_30.1: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = at_binding_pattern self, %self.param_patt.loc4_30.1 [symbolic = %self.patt.loc4_30.2 (constants.%self.patt)] +// CHECK:STDOUT: %self.param_patt.loc4_29.1: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = value_param_pattern [symbolic = %self.param_patt.loc4_29.2 (constants.%self.param_patt)] +// CHECK:STDOUT: %self.patt.loc4_29.1: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = at_binding_pattern self, %self.param_patt.loc4_29.1 [symbolic = %self.patt.loc4_29.2 (constants.%self.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc4_30.1 (%Self.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc4_30.1: type = splice_block %.loc4_30.3 [symbolic = %Self.as_type.loc4_30.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc4_30.2: @I.WithSelf.F.%I.type (%I.type.3fe) = specific_constant @I.%Self.loc4_23.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @I.WithSelf.F.%I.type (%I.type.3fe) = name_ref Self, %.loc4_30.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc4_30.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_30.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc4_30.3: type = converted %Self.ref, %Self.as_type.loc4_30.2 [symbolic = %Self.as_type.loc4_30.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc4_29.1 (%Self.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc4_29.1: type = splice_block %.loc4_29.3 [symbolic = %Self.as_type.loc4_29.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %.loc4_29.2: @I.WithSelf.F.%I.type (%I.type.3fe) = specific_constant @I.%Self.loc4_22.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @I.WithSelf.F.%I.type (%I.type.3fe) = name_ref Self, %.loc4_29.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc4_29.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_29.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc4_29.3: type = converted %Self.ref, %Self.as_type.loc4_29.2 [symbolic = %Self.as_type.loc4_29.1 (constants.%Self.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc4_30.1 (%Self.as_type) = wrapper_binding self, %self.param +// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc4_29.1 (%Self.as_type) = wrapper_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc4_35.1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] +// CHECK:STDOUT: %assoc0.loc4_34.1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc4_34.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_23.1 -// CHECK:STDOUT: .F = @I.WithSelf.%assoc0.loc4_35.1 +// CHECK:STDOUT: .Self = %Self.loc4_22.1 +// CHECK:STDOUT: .F = @I.WithSelf.%assoc0.loc4_34.1 // CHECK:STDOUT: witness = (@I.WithSelf.%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -173,16 +173,16 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: .Self = constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc4_14.2: type, @I.%Self.loc4_23.1: @I.%I.type (%I.type.3fe)) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc4_14.2: type, @I.%Self.loc4_22.1: @I.%I.type (%I.type.3fe)) { // CHECK:STDOUT: %T: 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.3fe)] // CHECK:STDOUT: %Self: @I.WithSelf.F.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc4_30.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_30.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc4_30.1 [symbolic = %pattern_type (constants.%pattern_type.b82)] -// CHECK:STDOUT: %self.param_patt.loc4_30.2: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = value_param_pattern [symbolic = %self.param_patt.loc4_30.2 (constants.%self.param_patt)] -// CHECK:STDOUT: %self.patt.loc4_30.2: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = at_binding_pattern self, %self.param_patt.loc4_30.2 [symbolic = %self.patt.loc4_30.2 (constants.%self.patt)] +// CHECK:STDOUT: %Self.as_type.loc4_29.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_29.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc4_29.1 [symbolic = %pattern_type (constants.%pattern_type.b82)] +// CHECK:STDOUT: %self.param_patt.loc4_29.2: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = value_param_pattern [symbolic = %self.param_patt.loc4_29.2 (constants.%self.param_patt)] +// CHECK:STDOUT: %self.patt.loc4_29.2: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = at_binding_pattern self, %self.param_patt.loc4_29.2 [symbolic = %self.patt.loc4_29.2 (constants.%self.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc4_30.1 (%Self.as_type)); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc4_29.1 (%Self.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T) { @@ -196,10 +196,10 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.3fe // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc4_30.1 => constants.%Self.as_type +// CHECK:STDOUT: %Self.as_type.loc4_29.1 => constants.%Self.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b82 -// CHECK:STDOUT: %self.param_patt.loc4_30.2 => constants.%self.param_patt -// CHECK:STDOUT: %self.patt.loc4_30.2 => constants.%self.patt +// CHECK:STDOUT: %self.param_patt.loc4_29.2 => constants.%self.param_patt +// CHECK:STDOUT: %self.patt.loc4_29.2 => constants.%self.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%T) { @@ -250,12 +250,12 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.9c8 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.5f6 = import_ref Main//types, loc4_35, unloaded +// CHECK:STDOUT: %Main.import_ref.5f6 = import_ref Main//types, loc4_34, unloaded // CHECK:STDOUT: %Main.F: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.0fc) = import_ref Main//types, F, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.a92)] -// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_35, unloaded +// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_34, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self (constants.%Self.a67)] -// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_23, unloaded +// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_22, loaded [symbolic = @I.%Self (constants.%Self.a67)] +// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_22, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -456,16 +456,16 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.InInterfaceArgs: type = import_ref Main//impl_in_interface_args, InInterfaceArgs, loaded [concrete = constants.%InInterfaceArgs] // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.9c8 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.c60: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71) = import_ref Main//types, loc4_35, loaded [symbolic = @I.WithSelf.%assoc0 (constants.%assoc0.341)] +// CHECK:STDOUT: %Main.import_ref.c60: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71) = import_ref Main//types, loc4_34, loaded [symbolic = @I.WithSelf.%assoc0 (constants.%assoc0.341)] // CHECK:STDOUT: %Main.F = import_ref Main//types, F, unloaded -// CHECK:STDOUT: %Main.import_ref.620: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.0fc) = import_ref Main//types, loc4_35, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.a92)] +// CHECK:STDOUT: %Main.import_ref.620: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.0fc) = import_ref Main//types, loc4_34, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.a92)] // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self (constants.%Self.a67)] -// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_23, unloaded +// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_22, loaded [symbolic = @I.%Self (constants.%Self.a67)] +// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_22, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//impl_in_interface_args, loc5_24, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.9ad = import_ref Main//impl_in_interface_args, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_35, unloaded +// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_34, unloaded // CHECK:STDOUT: %Main.import_ref.743: = import_ref Main//impl_in_interface_args, loc7_30, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.57b: type = import_ref Main//impl_in_interface_args, loc7_6, loaded [concrete = constants.%X] // CHECK:STDOUT: %Main.import_ref.555: type = import_ref Main//impl_in_interface_args, loc7_28, loaded [concrete = constants.%I.type.ec4] @@ -653,15 +653,15 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.I: %I.type.335 = import_ref Main//types, I, loaded [concrete = constants.%I.generic] // CHECK:STDOUT: %Main.C: %C.type = import_ref Main//types, C, loaded [concrete = constants.%C.generic] // CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X] -// CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc5_20, loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc5_19, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.189 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//types, loc5_10, loaded [symbolic = @C.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.5f6 = import_ref Main//types, loc4_35, unloaded +// CHECK:STDOUT: %Main.import_ref.5f6 = import_ref Main//types, loc4_34, unloaded // CHECK:STDOUT: %Main.F: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.0fc) = import_ref Main//types, F, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.a92)] -// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_35, unloaded +// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_34, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self (constants.%Self.a67)] -// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_23, unloaded +// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_22, loaded [symbolic = @I.%Self (constants.%Self.a67)] +// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_22, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.9c8 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded @@ -893,21 +893,21 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.C: %C.type = import_ref Main//types, C, loaded [concrete = constants.%C.generic] // CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X] // CHECK:STDOUT: %Main.InClassArgs: type = import_ref Main//impl_in_class_args, InClassArgs, loaded [concrete = constants.%InClassArgs] -// CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc5_20, loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc5_19, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.189 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//types, loc5_10, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//impl_in_class_args, loc5_20, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.195 = import_ref Main//impl_in_class_args, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.c60: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71) = import_ref Main//types, loc4_35, loaded [symbolic = @I.WithSelf.%assoc0 (constants.%assoc0.341)] +// CHECK:STDOUT: %Main.import_ref.c60: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71) = import_ref Main//types, loc4_34, loaded [symbolic = @I.WithSelf.%assoc0 (constants.%assoc0.341)] // CHECK:STDOUT: %Main.F = import_ref Main//types, F, unloaded -// CHECK:STDOUT: %Main.import_ref.620: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.0fc) = import_ref Main//types, loc4_35, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.a92)] +// CHECK:STDOUT: %Main.import_ref.620: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.0fc) = import_ref Main//types, loc4_34, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.a92)] // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self (constants.%Self.a67)] -// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_23, unloaded +// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_22, loaded [symbolic = @I.%Self (constants.%Self.a67)] +// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_22, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.9c8 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_35, unloaded +// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_34, unloaded // CHECK:STDOUT: %Main.import_ref.d12: = import_ref Main//impl_in_class_args, loc7_29, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.312: type = import_ref Main//impl_in_class_args, loc7_19, loaded [concrete = constants.%C.165] // CHECK:STDOUT: %Main.import_ref.ae9: type = import_ref Main//impl_in_class_args, loc7_27, loaded [concrete = constants.%I.type.d91] diff --git a/toolchain/check/testdata/impl/lookup/struct.carbon b/toolchain/check/testdata/impl/lookup/struct.carbon index 14a10533e512..20ca0568fe11 100644 --- a/toolchain/check/testdata/impl/lookup/struct.carbon +++ b/toolchain/check/testdata/impl/lookup/struct.carbon @@ -11,7 +11,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/lookup/struct.carbon interface Z { - let X:! type; + let X: type; fn ZZ() -> X; } @@ -35,7 +35,7 @@ impl {.b: (), .a: ()} as Z where .X = D { fn ZZ() -> D { return () as D; } } -fn F(T:! Z) -> T.X { +fn F(generic T: Z) -> T.X { return T.ZZ(); } diff --git a/toolchain/check/testdata/impl/lookup/symbolic_lookup.carbon b/toolchain/check/testdata/impl/lookup/symbolic_lookup.carbon index cfa89cce3273..42619d8aa8b0 100644 --- a/toolchain/check/testdata/impl/lookup/symbolic_lookup.carbon +++ b/toolchain/check/testdata/impl/lookup/symbolic_lookup.carbon @@ -17,25 +17,25 @@ interface X {} interface Y {} interface Z {} -impl forall [T:! Y] T as X {} +impl forall [T: Y] T as X {} -class C(T:! X) {} +class C(T: X) {} // The `adapt C(T)` line produces a symbolic impl lookup that `T` impls `X`: // - At first the impl lookup query in the eval block has self as -// `SymbolicBinding(T:! Y)`. +// `SymbolicBinding(T: Y)`. // // The call to construct `D` from in `Test()` makes a specific for `D`: // - The value of `T` in `D` is deduced to be a `FacetValue` of type `Y & Z` -// pointing to the `SymbolicBinding(T:! Y & Z)` from `Test()`. But +// pointing to the `SymbolicBinding(T: Y & Z)` from `Test()`. But // `FacetValue` needs an instruction of type `TypeType` so the // `SymbolicBinding` is wrapped in `FacetAccessType`, meaning it's -// `FacetValue(FacetAccessType(SymbolicBinding(T:! Y & Z)))`. +// `FacetValue(FacetAccessType(SymbolicBinding(T: Y & Z)))`. // - That facet value is written to the specific of `D` constructed from // `Test()`. // - The eval block of `D` is run with the above specific. This runs the // symbolic impl lookup that `T` impls `X`. But with the `T` rewritten by the -// specific to the `FacetValue(FacetAccessType(SymbolicBinding(T:! Y & Z)))`. +// specific to the `FacetValue(FacetAccessType(SymbolicBinding(T: Y & Z)))`. // // The impl lookup unwraps the `FacetValue` to get the underlying type as it may // have access to a more constrained FacetType (with access to more interfaces) @@ -48,24 +48,24 @@ class C(T:! X) {} // `FacetAccessType` in the initial query that makes the symbolic lookup // instruction (`LookupImplWitness`), but then the self type being replaced // with a `FacetAccessType` when evaluating the instruction. -class D(T:! Y) { adapt C(T); } +class D(T: Y) { adapt C(T); } -fn Test(T:! Y & Z, unused d: D(T)) {} +fn Test(generic T: Y & Z, unused d: D(T)) {} // --- final_symbolic_rewrite.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } // This impl has a rewrite to a symbolic constant, and the `.Self` type has a // dependency on a generic parameter. -final impl forall [T:! type, S:! type] T as Z(S) where .X = T {} +final impl forall [T: type, S: type] T as Z(S) where .X = T {} class C {} -fn F(T:! Z(C), t: T) { +fn F(generic T: Z(C), t: T) { // This should typecheck, the `final impl` should give the same `T`. let unused a: T.X = t; } diff --git a/toolchain/check/testdata/impl/lookup/unused_generic_binding.carbon b/toolchain/check/testdata/impl/lookup/unused_generic_binding.carbon index d81fad733cca..4440f7282579 100644 --- a/toolchain/check/testdata/impl/lookup/unused_generic_binding.carbon +++ b/toolchain/check/testdata/impl/lookup/unused_generic_binding.carbon @@ -14,10 +14,10 @@ library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } -impl forall [U:! type] U as I where .T = () {} +impl forall [U: type] U as I where .T = () {} class C {} @@ -25,10 +25,10 @@ class C {} // should be diagnosed. // // CHECK:STDERR: fail_no_binding_used.carbon:[[@LINE+4]]:13: error: `impl` with unused generic binding [ImplUnusedBinding] -// CHECK:STDERR: impl forall [V:! type] C as I where .T = {.unmatched: ()} {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: impl forall [V: type] C as I where .T = {.unmatched: ()} {} +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -impl forall [V:! type] C as I where .T = {.unmatched: ()} {} +impl forall [V: type] C as I where .T = {.unmatched: ()} {} fn F() { // This shows that the first impl declaration was matched even though the @@ -42,10 +42,10 @@ fn F() { library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } -impl forall [U:! type] U as I where .T = () {} +impl forall [U: type] U as I where .T = () {} class C {} @@ -54,10 +54,10 @@ class C {} // https://discord.com/channels/655572317891461132/941071822756143115/1354563497731686550 // // CHECK:STDERR: fail_one_binding_unused.carbon:[[@LINE+4]]:13: error: `impl` with unused generic binding [ImplUnusedBinding] -// CHECK:STDERR: impl forall [V:! type, W:! type] V as I where .T = {.unmatched: ()} {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [V: type, W: type] V as I where .T = {.unmatched: ()} {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [V:! type, W:! type] V as I where .T = {.unmatched: ()} {} +impl forall [V: type, W: type] V as I where .T = {.unmatched: ()} {} fn F() { // This shows that the first impl declaration was matched even though the @@ -70,12 +70,12 @@ fn F() { library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } -impl forall [U:! type] U as I where .T = () {} +impl forall [U: type] U as I where .T = () {} -class C(U:! type) { +class C(U: type) { // This impl can never deduce its inherited generic binding `U`, which // should be diagnosed. // @@ -96,22 +96,22 @@ fn F() { library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } -impl forall [U:! type] U as I where .T = () {} +impl forall [U: type] U as I where .T = () {} -class C(U:! type) { +class C(U: type) { // This impl can never deduce its inherited generic binding `U`, which // should be diagnosed. // // TODO: We should point the diagnostic at the binding `U` in C. // // CHECK:STDERR: fail_inherited_binding_in_forall_unused.carbon:[[@LINE+4]]:15: error: `impl` with unused generic binding [ImplUnusedBinding] - // CHECK:STDERR: impl forall [V:! type] C(V) as I where .T = {.unmatched: ()} {} - // CHECK:STDERR: ^~~~~~~~~~ + // CHECK:STDERR: impl forall [V: type] C(V) as I where .T = {.unmatched: ()} {} + // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: - impl forall [V:! type] C(V) as I where .T = {.unmatched: ()} {} + impl forall [V: type] C(V) as I where .T = {.unmatched: ()} {} } fn F() { @@ -122,12 +122,12 @@ fn F() { library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } -impl forall [U:! type] U as I where .T = {.unmatched: ()} {} +impl forall [U: type] U as I where .T = {.unmatched: ()} {} -class C(U:! type) { +class C(U: type) { // `U` can be deduced here, so no diagnostic issued. impl C(U) as I where .T = () {} } @@ -140,15 +140,15 @@ fn F() { // --- inherited_binding_in_forall_used.carbon library "[[@TEST_NAME]]"; -interface I(W:! type) { - let T:! type; +interface I(W: type) { + let T: type; } -impl forall [U:! type] U as I(U) where .T = {.unmatched: ()} {} +impl forall [U: type] U as I(U) where .T = {.unmatched: ()} {} -class C(U:! type) { +class C(U: type) { // `U` can be deduced here, so no diagnostic issued. - impl forall [V:! type] C(U) as I(V) where .T = () {} + impl forall [V: type] C(U) as I(V) where .T = () {} } fn F() { diff --git a/toolchain/check/testdata/impl/lookup/use_impl_from_definition.carbon b/toolchain/check/testdata/impl/lookup/use_impl_from_definition.carbon index 18e191fca532..47627b5a3066 100644 --- a/toolchain/check/testdata/impl/lookup/use_impl_from_definition.carbon +++ b/toolchain/check/testdata/impl/lookup/use_impl_from_definition.carbon @@ -14,13 +14,13 @@ library "[[@TEST_NAME]]"; interface I { - let U:! type; + let U: type; fn F() -> U; } class C { adapt {}; } -impl forall [T:! type] T as I where .U = C { +impl forall [T: type] T as I where .U = C { // `T as I` does an impl lookup to form a FacetValue, which must find the impl // being defined and use that. The witness must be a final witness in order to // know that `U` is `C`. @@ -31,13 +31,13 @@ impl forall [T:! type] T as I where .U = C { library "[[@TEST_NAME]]"; interface I { - let U:! type; + let U: type; fn F() -> U; } class C { adapt {}; } -impl forall [T:! type] T as I where .U = C { +impl forall [T: type] T as I where .U = C { // `Self as I` is a symbolic facet value specified in the interface-with-self // specific, and then monomorphized with the self type of the impl. fn F() -> (Self as I).U { return {} as C; } diff --git a/toolchain/check/testdata/impl/name_lookup_in_impl_definition.carbon b/toolchain/check/testdata/impl/name_lookup_in_impl_definition.carbon index ab02042ad21c..2a6d17002a88 100644 --- a/toolchain/check/testdata/impl/name_lookup_in_impl_definition.carbon +++ b/toolchain/check/testdata/impl/name_lookup_in_impl_definition.carbon @@ -14,13 +14,13 @@ library "[[@TEST_NAME]]"; interface I { - let U:! type; + let U: type; fn F() -> U; } class C { adapt {}; } -impl forall [T:! type] T as I where .U = C { +impl forall [T: type] T as I where .U = C { // We perform name lookup into `I` and resolve `U` to `T.(I.U)`. //@dump-sem-ir-begin fn F() -> U { return {} as C; } @@ -55,7 +55,7 @@ impl forall [T:! type] T as I where .U = C { // CHECK:STDOUT: %T.as.I.impl.F.type: type = fn_type @T.as.I.impl.F, @T.as.I.impl(%T.loc10_15.1) [symbolic = %T.as.I.impl.F.type (constants.%T.as.I.impl.F.type)] // CHECK:STDOUT: %T.as.I.impl.F: @T.as.I.impl.%T.as.I.impl.F.type (%T.as.I.impl.F.type) = struct_value () [symbolic = %T.as.I.impl.F (constants.%T.as.I.impl.F)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %T.ref as %.loc10_31 { +// CHECK:STDOUT: impl: %T.ref as %.loc10_30 { // CHECK:STDOUT: %T.as.I.impl.F.decl: @T.as.I.impl.%T.as.I.impl.F.type (%T.as.I.impl.F.type) = fn_decl @T.as.I.impl.F [symbolic = @T.as.I.impl.%T.as.I.impl.F (constants.%T.as.I.impl.F)] { // CHECK:STDOUT: %return.param_patt: %pattern_type.98b = out_param_pattern [concrete = constants.%return.param_patt.89a] // CHECK:STDOUT: %return.patt: %pattern_type.98b = return_slot_pattern %return.param_patt, %U.ref [concrete = constants.%return.patt.e4a] @@ -74,8 +74,8 @@ impl forall [T:! type] T as I where .U = C { // CHECK:STDOUT: .U = // CHECK:STDOUT: .F = %T.as.I.impl.F.decl // CHECK:STDOUT: .C = -// CHECK:STDOUT: extend %.loc10_31 -// CHECK:STDOUT: witness = %I.impl_witness.loc10_44.1 +// CHECK:STDOUT: extend %.loc10_30 +// CHECK:STDOUT: witness = %I.impl_witness.loc10_43.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -106,7 +106,7 @@ impl forall [T:! type] T as I where .U = C { // CHECK:STDOUT: specific @T.as.I.impl(constants.%T) { // CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc10_15.1 => constants.%T -// CHECK:STDOUT: %I.impl_witness.loc10_44.2 => constants.%I.impl_witness +// CHECK:STDOUT: %I.impl_witness.loc10_43.2 => constants.%I.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as.I.impl.F.type => constants.%T.as.I.impl.F.type diff --git a/toolchain/check/testdata/impl/name_poisoning.carbon b/toolchain/check/testdata/impl/name_poisoning.carbon index 7a09995af824..1d67255b1958 100644 --- a/toolchain/check/testdata/impl/name_poisoning.carbon +++ b/toolchain/check/testdata/impl/name_poisoning.carbon @@ -18,7 +18,7 @@ interface I {}; namespace N; // Use `package.I` and poison `N.I`. -fn N.F1(x:! I); +fn N.F1(generic x: I); class N.C { extend impl as I { diff --git a/toolchain/check/testdata/impl/orphan.carbon b/toolchain/check/testdata/impl/orphan.carbon index cac07136b5a6..264f32a92553 100644 --- a/toolchain/check/testdata/impl/orphan.carbon +++ b/toolchain/check/testdata/impl/orphan.carbon @@ -14,14 +14,14 @@ library "[[@TEST_NAME]]"; class ImportedC {} -class ImportedD(T:! type) {} +class ImportedD(T: type) {} interface ImportedY {} -interface ImportedZ(T:! type) {} +interface ImportedZ(T: type) {} -constraint ImportedN(T:! type) {} +constraint ImportedN(T: type) {} -class ImportedAnyParam[T:! type](X:! T) {} +class ImportedAnyParam[T: type](X: T) {} // --- fail_todo_class_definition_missing.carbon library "[[@TEST_NAME]]"; @@ -177,7 +177,7 @@ library "[[@TEST_NAME]]"; import library "imports"; -class D(T:! type) {} +class D(T: type) {} impl ImportedAnyParam(D) as ImportedY {} @@ -197,7 +197,7 @@ library "[[@TEST_NAME]]"; import library "imports"; -interface Z(T:! type) {} +interface Z(T: type) {} impl ImportedAnyParam(Z) as ImportedY {} @@ -217,7 +217,7 @@ library "[[@TEST_NAME]]"; import library "imports"; -constraint N(T:! type) {} +constraint N(T: type) {} impl ImportedAnyParam(N) as ImportedY {} @@ -256,7 +256,7 @@ library "[[@TEST_NAME]]"; interface Z {} -fn F(unused T:! type) { +fn F(unused generic T: type) { class C {} impl C as Z {} } @@ -267,7 +267,7 @@ library "[[@TEST_NAME]]"; interface Z {} // Neither {} nor Z are defined within or by the scope of `F`. -fn F(unused T:! type) { +fn F(unused generic T: type) { // TODO: The error should be about being an orphan, not an unused binding. // CHECK:STDERR: fail_todo_orphan_in_generic_fn_scope.carbon:[[@LINE+4]]:3: error: `impl` with unused generic binding [ImplUnusedBinding] // CHECK:STDERR: impl {} as Z {} diff --git a/toolchain/check/testdata/impl/require_satisified_in_interface.carbon b/toolchain/check/testdata/impl/require_satisified_in_interface.carbon index 8a838b13ddca..3368aa14433e 100644 --- a/toolchain/check/testdata/impl/require_satisified_in_interface.carbon +++ b/toolchain/check/testdata/impl/require_satisified_in_interface.carbon @@ -58,14 +58,14 @@ interface Y { } // T does not need to impl Z yet. -impl forall [T:! type] T as Y; +impl forall [T: type] T as Y; // T needs to impl Z at the start of the definition. // CHECK:STDERR: fail_missing_extend_require_for_symbolic_type.carbon:[[@LINE+4]]:1: error: interface `Y` being implemented requires that `T` implements `Z` [RequireImplsNotImplemented] -// CHECK:STDERR: impl forall [T:! type] T as Y {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] T as Y {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] T as Y {} +impl forall [T: type] T as Y {} // --- fail_missing_require_for_symbolic_type.carbon library "[[@TEST_NAME]]"; @@ -77,25 +77,25 @@ interface Y { } // T does not need to impl Z yet. -impl forall [T:! type] T as Y; +impl forall [T: type] T as Y; // T needs to impl Z at the start of the definition. // CHECK:STDERR: fail_missing_require_for_symbolic_type.carbon:[[@LINE+4]]:1: error: interface `Y` being implemented requires that `T` implements `Z` [RequireImplsNotImplemented] -// CHECK:STDERR: impl forall [T:! type] T as Y {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] T as Y {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] T as Y {} +impl forall [T: type] T as Y {} // --- fail_missing_extend_require_double.carbon library "[[@TEST_NAME]]"; -interface Z1(T:! type) {} -interface Z2(T:! type) {} +interface Z1(T: type) {} +interface Z2(T: type) {} class A; class B; -interface Y(U:! type) { +interface Y(U: type) { extend require impls Z1(U) & Z2(B); } @@ -108,13 +108,13 @@ impl () as Y(A) {} // --- fail_missing_require_double.carbon library "[[@TEST_NAME]]"; -interface Z1(T:! type) {} -interface Z2(T:! type) {} +interface Z1(T: type) {} +interface Z2(T: type) {} class A; class B; -interface Y(U:! type) { +interface Y(U: type) { require impls Z1(U) & Z2(B); } @@ -160,17 +160,17 @@ interface Y { } // T does not need to impl Z1/Z2 yet. -impl forall [T:! type] T as Y; +impl forall [T: type] T as Y; // Now we know T impls Z1 and Z2. -impl forall [T:! type] T as Z1; -impl forall [T:! type] T as Z2; +impl forall [T: type] T as Z1; +impl forall [T: type] T as Z2; // So no error here. -impl forall [T:! type] T as Y {} +impl forall [T: type] T as Y {} -impl forall [T:! type] T as Z1 {} -impl forall [T:! type] T as Z2 {} +impl forall [T: type] T as Z1 {} +impl forall [T: type] T as Z2 {} // --- require_for_symbolic_type_impl_matches_same_interface.carbon library "[[@TEST_NAME]]"; @@ -184,18 +184,18 @@ interface Y { } // This only matches T that impl Z1 and Z2 so no error here. -impl forall [T:! Z1 & Z2] T as Y {} +impl forall [T: Z1 & Z2] T as Y {} // --- require_for_generic_interfaces.carbon library "[[@TEST_NAME]]"; -interface Z1(T:! type) {} -interface Z2(T:! type) {} +interface Z1(T: type) {} +interface Z2(T: type) {} class A; class B; -interface Y(U:! type) { +interface Y(U: type) { extend require impls Z1(U); require impls Z2(B); } @@ -216,11 +216,11 @@ impl () as Z2(B) {} // --- fail_require_non_self_missing.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} class C; -interface Y(U:! type) { +interface Y(U: type) { // `Self` must appear somewhere in the require decl, so it's in the interface // specific because we want to test a different self-type. require C impls Z(Self); @@ -236,11 +236,11 @@ impl () as Y(()) {} // --- require_non_self.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} class C; -interface Y(U:! type) { +interface Y(U: type) { // `Self` must appear somewhere in the require decl, so it's in the interface // specific because we want to test a different self-type. require C impls Z(Self); @@ -264,15 +264,15 @@ interface C { require impls B; } -impl forall [T:! B] T as A { fn AA() {} } +impl forall [T: B] T as A { fn AA() {} } // When we get to the definition we check that anything B requires is satisfied. // - The interface B requires A, so we must check T impls A. // - The impl for A requires T impls B. // - This impl is what provides T impls B. -impl forall [T:! C] T as B {} +impl forall [T: C] T as B {} -fn F(T:! C) { +fn F(generic T: C) { // If things go wrong, we find the impl `T as B`, but inside its definition is // a lookup for `T as A`, which (through deducing `T`) includes a lookup for // `T as B`. This creates a cycle of evaluating `T as B` recursively. @@ -286,25 +286,25 @@ fn F(T:! C) { // --- fail_impl_requires_itself_cycle_with_monomorphization_error.carbon library "[[@TEST_NAME]]"; -class W(T:! type) { +class W(T: type) { adapt {}; } -interface A(N:! Core.IntLiteral) { +interface A(N: Core.IntLiteral) { fn AA() -> W(array((), N)); } -interface B(N:! Core.IntLiteral) { +interface B(N: Core.IntLiteral) { require impls A(N); } -interface C(N:! Core.IntLiteral) { +interface C(N: Core.IntLiteral) { require impls B(N); } -impl forall [N:! Core.IntLiteral, T:! B(N)] T as A(N) { +impl forall [N: Core.IntLiteral, T: B(N)] T as A(N) { fn AA() -> W(array((), N)) { return {} as W(array((), N)); } } -impl forall [N:! Core.IntLiteral, T:! C(N)] T as B(N) { +impl forall [N: Core.IntLiteral, T: C(N)] T as B(N) { // The definition here does not contain the lookups verifying that C(N) impls // `A(N)`, so they do not get re-evaluated for a specific `N`. That doesn't // prevent us from producing a reasonable diagnostic when that `N` causes an @@ -314,7 +314,7 @@ impl forall [N:! Core.IntLiteral, T:! C(N)] T as B(N) { // `T as B(N)` implies `T as A(N)`. } -fn F(T:! C(-1)) { +fn F(generic T: C(-1)) { // CHECK:STDERR: fail_impl_requires_itself_cycle_with_monomorphization_error.carbon:[[@LINE+7]]:3: error: unable to monomorphize specific `AA()` [ResolvingSpecificHere] // CHECK:STDERR: T.(A(-1).AA)(); // CHECK:STDERR: ^~~~~~~~~~~~~~ diff --git a/toolchain/check/testdata/impl/require_satisified_in_named_constraint.carbon b/toolchain/check/testdata/impl/require_satisified_in_named_constraint.carbon index abeb5ea7c644..a87063464f5d 100644 --- a/toolchain/check/testdata/impl/require_satisified_in_named_constraint.carbon +++ b/toolchain/check/testdata/impl/require_satisified_in_named_constraint.carbon @@ -40,11 +40,11 @@ constraint N { } // T does not need to impl Z yet. -impl forall [T:! type] T as N; +impl forall [T: type] T as N; // T needs to impl Z at the start of the definition. // TODO: RequireImplsNotImplemented error that () does not implement Z. -impl forall [T:! type] T as N {} +impl forall [T: type] T as N {} // --- require_for_concrete_type.carbon library "[[@TEST_NAME]]"; @@ -80,15 +80,15 @@ constraint N { } // T does not need to impl Z yet. -impl forall [T:! type] T as N; +impl forall [T: type] T as N; // Now we know T impls Z. -impl forall [T:! type] T as Z; +impl forall [T: type] T as Z; // So no error here. -impl forall [T:! type] T as N {} +impl forall [T: type] T as N {} -impl forall [T:! type] T as Z {} +impl forall [T: type] T as Z {} // --- require_for_symbolic_type_impl_matches_same_interface.carbon library "[[@TEST_NAME]]"; @@ -102,18 +102,18 @@ constraint N { } // This only matches T that impl Z so no error here. -impl forall [T:! Z] T as N {} +impl forall [T: Z] T as N {} // --- require_for_generic_interfaces.carbon library "[[@TEST_NAME]]"; -interface Y(T:! type) {} -interface Z(T:! type) {} +interface Y(T: type) {} +interface Z(T: type) {} class A; class B; -constraint N(U:! type) { +constraint N(U: type) { extend require impls Y(U); require impls Z(B); } diff --git a/toolchain/check/testdata/impl/use_assoc_entity.carbon b/toolchain/check/testdata/impl/use_assoc_entity.carbon index 01f1fbd715c5..eabb39311c92 100644 --- a/toolchain/check/testdata/impl/use_assoc_entity.carbon +++ b/toolchain/check/testdata/impl/use_assoc_entity.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; interface J { - let U:! type; + let U: type; //@dump-sem-ir-begin fn F(self, u: U) -> U; //@dump-sem-ir-end @@ -47,7 +47,7 @@ impl C as J where .U = C { library "[[@TEST_NAME]]"; interface J { - let U:! type; + let U: type; fn F(u: U) -> U; } @@ -65,7 +65,7 @@ fn CallFunction() -> i32 { library "[[@TEST_NAME]]"; interface J { - let U:! type; + let U: type; fn F(u: U) -> U; fn G(self, v: U) -> U; } @@ -91,7 +91,7 @@ fn CallBoth(e: E) { //@dump-sem-ir-end } -fn GenericCallF[T:! J](t: T, u: T.U) -> T.U { +fn GenericCallF[T: J](t: T, u: T.U) -> T.U { return t.F(u); } @@ -107,11 +107,11 @@ interface I { } interface J { - let U:! I & Core.Destroy; + let U: I & Core.Destroy; fn F(u: U) -> U; } -fn GenericResult[T:! J](t: T, u: T.U) -> T.U { +fn GenericResult[T: J](t: T, u: T.U) -> T.U { return t.F(u).(I.Op)(T.F(u)); } @@ -119,11 +119,11 @@ fn GenericResult[T:! J](t: T, u: T.U) -> T.U { library "[[@TEST_NAME]]"; interface J { - let U:! type; + let U: type; fn G(self, v: U) -> U; } -fn GenericCallInterfaceQualified[T:! J](t: T, u: T.U) -> T.U { +fn GenericCallInterfaceQualified[T: J](t: T, u: T.U) -> T.U { return t.(J.G)(u); } @@ -131,11 +131,11 @@ fn GenericCallInterfaceQualified[T:! J](t: T, u: T.U) -> T.U { library "[[@TEST_NAME]]"; interface J { - let U:! type; + let U: type; fn F(u: U) -> U; } -fn GenericCallFI32[T:! J where .U = i32](t: T) -> i32 { +fn GenericCallFI32[T: J where .U = i32](t: T) -> i32 { return t.F(2); } @@ -160,7 +160,7 @@ impl E as J { library "[[@TEST_NAME]]"; interface J { - let U:! type; + let U: type; fn F(u: U) -> U; } @@ -212,7 +212,7 @@ class E { library "[[@TEST_NAME]]"; interface J { - let X:! type; + let X: type; } class E { @@ -227,13 +227,13 @@ class E { library "[[@TEST_NAME]]"; interface J { - let T:! type; + let T: type; fn F() -> T; } class A {} -class E(T:! type) { +class E(T: type) { extend impl as J where .T = A { // This `T` names the interface's `T` (extended by the `impl`), not the // class's `T` parameter. @@ -243,7 +243,7 @@ class E(T:! type) { } } -impl forall [T:! type] T as J where .T = () { +impl forall [T: type] T as J where .T = () { // This `T` names the interface's `T` (extended by the `impl`), not the // class's `T` parameter. // @@ -260,8 +260,8 @@ impl forall [T:! type] T as J where .T = () { library "[[@TEST_NAME]]"; interface J { - let T:! type; - let U:! type; + let T: type; + let U: type; } class A {} @@ -272,15 +272,15 @@ class A {} // CHECK:STDERR: impl A as J { // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE-11]]:7: note: associated constant declared here [AssociatedConstantHere] -// CHECK:STDERR: let T:! type; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: let T: type; +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE+7]]:1: error: associated constant U not given a value in impl of interface J [ImplAssociatedConstantNeedsValue] // CHECK:STDERR: impl A as J { // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE-17]]:7: note: associated constant declared here [AssociatedConstantHere] -// CHECK:STDERR: let U:! type; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: let U: type; +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: impl A as J { // CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE+8]]:3: error: unrecognized declaration introducer [UnrecognizedDecl] @@ -362,7 +362,7 @@ impl A as J { library "[[@TEST_NAME]]"; interface J2 { - let U2:! type; + let U2: type; // CHECK:STDERR: fail_todo_self_period_associated_type.carbon:[[@LINE+14]]:17: error: member access into facet of incomplete type `J2` [IncompleteTypeInMemberAccessOfFacet] // CHECK:STDERR: fn F(self, z: Self.U2) -> Self.U2; // CHECK:STDERR: ^~~~ @@ -398,7 +398,7 @@ impl C2 as J2 where .U2 = C2 { library "[[@TEST_NAME]]"; interface K { - let V:! type; + let V: type; fn F(self, v: V) -> V; } @@ -424,7 +424,7 @@ impl () as K where .V = {.a: ()} { library "[[@TEST_NAME]]"; interface M { - let Z:! {.b: {}}; + let Z: {.b: {}}; fn G() -> {}; } @@ -439,10 +439,10 @@ impl () as M where .Z = {.b = {}} { // --- self_as_uses_correct_rewrite_constraint.carbon library "[[@TEST_NAME]]"; -class C(T:! type) {} +class C(T: type) {} interface M { - let Z:! {.b: type}; + let Z: {.b: type}; fn G() -> type; } @@ -462,7 +462,7 @@ impl C(()) as M where .Z = {.b = ()} { library "[[@TEST_NAME]]"; interface I { - let N:! i32; + let N: i32; fn F(self) -> array(bool, N); } @@ -474,13 +474,13 @@ impl () as I where .N = 2 { library "[[@TEST_NAME]]"; interface Z { - let X:! type; + let X: type; } -class C(T:! type) {} +class C(T: type) {} class D {} -impl forall [T:! type] T as Z where .X = C(T) {} +impl forall [T: type] T as Z where .X = C(T) {} fn F() { let unused a: D.(Z.X) = {} as C(D); diff --git a/toolchain/check/testdata/impl/using_invalid_interface.carbon b/toolchain/check/testdata/impl/using_invalid_interface.carbon index 728883071d49..ee77dbeb41d2 100644 --- a/toolchain/check/testdata/impl/using_invalid_interface.carbon +++ b/toolchain/check/testdata/impl/using_invalid_interface.carbon @@ -15,16 +15,16 @@ library "[[@TEST_NAME]]"; interface I {} -class ArgToI(T:! I) {} +class ArgToI(T: I) {} interface IMisuse { - let Arg:! type; + let Arg: type; // CHECK:STDERR: fail_invalid_interface.carbon:[[@LINE+7]]:18: error: cannot convert type `Arg` into type implementing `I` [ConversionFailureTypeToFacet] // CHECK:STDERR: fn Op(self) -> ArgToI(Arg); // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: fail_invalid_interface.carbon:[[@LINE-7]]:14: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: class ArgToI(T:! I) {} - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: class ArgToI(T: I) {} + // CHECK:STDERR: ^~~~ // CHECK:STDERR: fn Op(self) -> ArgToI(Arg); } @@ -50,15 +50,15 @@ class C { } } -// CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE+8]]:21: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch] -// CHECK:STDERR: fn F(T:! IMisuse) { T.Op(); } -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE+8]]:28: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch] +// CHECK:STDERR: fn F(generic T: IMisuse) { T.Op(); } +// CHECK:STDERR: ^~~~~~ // CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE-21]]:1: in import [InImport] // CHECK:STDERR: fail_invalid_interface.carbon:16:3: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Op(self) -> ArgToI(Arg); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(T:! IMisuse) { T.Op(); } +fn F(generic T: IMisuse) { T.Op(); } fn G() { var c: C; @@ -68,9 +68,9 @@ fn G() { // CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE+7]]:3: note: type `C` does not implement interface `Core.ImplicitAs(IMisuse)` [MissingImplInMemberAccessInContext] // CHECK:STDERR: F(c); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE-10]]:6: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(T:! IMisuse) { T.Op(); } - // CHECK:STDERR: ^~~~~~~~~~~ + // CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE-10]]:14: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(generic T: IMisuse) { T.Op(); } + // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: F(c); } @@ -89,8 +89,8 @@ class C { // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE-9]]:1: in import [InImport] // CHECK:STDERR: fail_invalid_interface.carbon:5:14: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: class ArgToI(T:! I) {} - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: class ArgToI(T: I) {} + // CHECK:STDERR: ^~~~ // CHECK:STDERR: fn Op(unused self) -> ArgToI(ArgC) { return {}; @@ -98,15 +98,15 @@ class C { } } -// CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE+8]]:21: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch] -// CHECK:STDERR: fn F(T:! IMisuse) { T.Op(); } -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE+8]]:28: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch] +// CHECK:STDERR: fn F(generic T: IMisuse) { T.Op(); } +// CHECK:STDERR: ^~~~~~ // CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE-23]]:1: in import [InImport] // CHECK:STDERR: fail_invalid_interface.carbon:16:3: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Op(self) -> ArgToI(Arg); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(T:! IMisuse) { T.Op(); } +fn F(generic T: IMisuse) { T.Op(); } fn G() { var c: C; @@ -116,9 +116,9 @@ fn G() { // CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE+7]]:3: note: type `C` does not implement interface `Core.ImplicitAs(IMisuse)` [MissingImplInMemberAccessInContext] // CHECK:STDERR: F(c); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE-10]]:6: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(T:! IMisuse) { T.Op(); } - // CHECK:STDERR: ^~~~~~~~~~~ + // CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE-10]]:14: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(generic T: IMisuse) { T.Op(); } + // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: F(c); } diff --git a/toolchain/check/testdata/interface/as_type_of_type.carbon b/toolchain/check/testdata/interface/as_type_of_type.carbon index 8c9bd7645af5..5f770a3320f5 100644 --- a/toolchain/check/testdata/interface/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/as_type_of_type.carbon @@ -18,7 +18,7 @@ class C {} impl C as Empty {} -fn F(T:! Empty) { +fn F(generic T: Empty) { var unused x: T*; } @@ -90,13 +90,13 @@ fn F(T:! Empty) { // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc21_7.1: %pattern_type.894 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_7.2 (constants.%T.patt.1d7)] +// CHECK:STDOUT: %T.patt.loc21_15.1: %pattern_type.894 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_15.2 (constants.%T.patt.1d7)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc21: type = splice_block %Empty.ref [concrete = constants.%Empty.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc21_7.2: %Empty.type = symbolic_binding T, 0 [symbolic = %T.loc21_7.1 (constants.%T.4e8)] +// CHECK:STDOUT: %T.loc21_15.2: %Empty.type = symbolic_binding T, 0 [symbolic = %T.loc21_15.1 (constants.%T.4e8)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -130,12 +130,12 @@ fn F(T:! Empty) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc21_7.2: %Empty.type) { -// CHECK:STDOUT: %T.patt.loc21_7.2: %pattern_type.894 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_7.2 (constants.%T.patt.1d7)] -// CHECK:STDOUT: %T.loc21_7.1: %Empty.type = symbolic_binding T, 0 [symbolic = %T.loc21_7.1 (constants.%T.4e8)] +// CHECK:STDOUT: generic fn @F(%T.loc21_15.2: %Empty.type) { +// CHECK:STDOUT: %T.patt.loc21_15.2: %pattern_type.894 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_15.2 (constants.%T.patt.1d7)] +// CHECK:STDOUT: %T.loc21_15.1: %Empty.type = symbolic_binding T, 0 [symbolic = %T.loc21_15.1 (constants.%T.4e8)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc22_18.2: type = facet_access_type %T.loc21_7.1 [symbolic = %T.as_type.loc22_18.2 (constants.%T.as_type.22c)] +// CHECK:STDOUT: %T.as_type.loc22_18.2: type = facet_access_type %T.loc21_15.1 [symbolic = %T.as_type.loc22_18.2 (constants.%T.as_type.22c)] // CHECK:STDOUT: %ptr.loc22_18.2: type = ptr_type %T.as_type.loc22_18.2 [symbolic = %ptr.loc22_18.2 (constants.%ptr)] // CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc22_18.2 [symbolic = %require_complete (constants.%require_complete.ee8)] // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc22_18.2 [symbolic = %pattern_type (constants.%pattern_type.777)] @@ -167,7 +167,7 @@ fn F(T:! Empty) { // CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call: init @F.%ptr.loc22_18.2 (%ptr) = call %specific_impl_fn.loc22_19.1() // CHECK:STDOUT: assign %x.var, %DefaultOrUnformed.WithSelf.Op.call // CHECK:STDOUT: %.loc22_18.1: type = splice_block %ptr.loc22_18.1 [symbolic = %ptr.loc22_18.2 (constants.%ptr)] { -// CHECK:STDOUT: %T.ref: %Empty.type = name_ref T, %T.loc21_7.2 [symbolic = %T.loc21_7.1 (constants.%T.4e8)] +// CHECK:STDOUT: %T.ref: %Empty.type = name_ref T, %T.loc21_15.2 [symbolic = %T.loc21_15.1 (constants.%T.4e8)] // CHECK:STDOUT: %T.as_type.loc22_18.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc22_18.2 (constants.%T.as_type.22c)] // CHECK:STDOUT: %.loc22_18.2: type = converted %T.ref, %T.as_type.loc22_18.1 [symbolic = %T.as_type.loc22_18.2 (constants.%T.as_type.22c)] // CHECK:STDOUT: %ptr.loc22_18.1: type = ptr_type %.loc22_18.2 [symbolic = %ptr.loc22_18.2 (constants.%ptr)] @@ -201,7 +201,7 @@ fn F(T:! Empty) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.4e8) { -// CHECK:STDOUT: %T.patt.loc21_7.2 => constants.%T.patt.1d7 -// CHECK:STDOUT: %T.loc21_7.1 => constants.%T.4e8 +// CHECK:STDOUT: %T.patt.loc21_15.2 => constants.%T.patt.1d7 +// CHECK:STDOUT: %T.loc21_15.1 => constants.%T.4e8 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/assoc_const.carbon b/toolchain/check/testdata/interface/assoc_const.carbon index 34c83b589eb7..3fc448012bd1 100644 --- a/toolchain/check/testdata/interface/assoc_const.carbon +++ b/toolchain/check/testdata/interface/assoc_const.carbon @@ -13,9 +13,9 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/assoc_const.carbon interface I { - let T:! type; - let N:! i32; - let Empty:! (); + let T: type; + let N: i32; + let Empty: (); } // CHECK:STDOUT: --- assoc_const.carbon diff --git a/toolchain/check/testdata/interface/assoc_const_in_generic.carbon b/toolchain/check/testdata/interface/assoc_const_in_generic.carbon index 33ad2e7207b1..414dce9b9079 100644 --- a/toolchain/check/testdata/interface/assoc_const_in_generic.carbon +++ b/toolchain/check/testdata/interface/assoc_const_in_generic.carbon @@ -12,11 +12,11 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/assoc_const_in_generic.carbon -interface I(T:! type) { - fn F(U:! type) -> U; +interface I(T: type) { + fn F(generic U: type) -> U; } -fn G(T:! type) { +fn G(generic T: type) { // This should not result in a `fn_decl` instruction being added to the eval // block for the generic G. This used to crash when printing formatted SemIR // because the same instruction ended up in multiple scopes. @@ -76,20 +76,20 @@ fn H() { // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc15_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_17.1: type = splice_block %.loc15_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc15_16.1: type = splice_block %.loc15_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc15_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc15_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_14.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc19_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc19_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_10.1: type = splice_block %.loc19_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc19_17.1: type = splice_block %.loc19_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc19_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc19_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc19_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc19_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc19_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc19_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {} {} // CHECK:STDOUT: } @@ -100,33 +100,33 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc15_14.1)> [symbolic = %I.type (constants.%I.type.3fe)] -// CHECK:STDOUT: %Self.loc15_23.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc15_22.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self.191)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc15_23.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_23.2 (constants.%Self.191)] +// CHECK:STDOUT: %Self.loc15_22.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self.191)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %I.WithSelf.F.decl: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.09f) = fn_decl @I.WithSelf.F [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.5f2)] { -// CHECK:STDOUT: %U.patt.loc16_9.1: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc16_9.2 (constants.%U.patt)] -// CHECK:STDOUT: %return.param_patt.loc16_21.1: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = out_param_pattern [symbolic = %return.param_patt.loc16_21.2 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc16_18.1: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = return_slot_pattern %return.param_patt.loc16_21.1, %U.ref [symbolic = %return.patt.loc16_18.2 (constants.%return.patt)] +// CHECK:STDOUT: %U.patt.loc16_17.1: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc16_17.2 (constants.%U.patt)] +// CHECK:STDOUT: %return.param_patt.loc16_28.1: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = out_param_pattern [symbolic = %return.param_patt.loc16_28.2 (constants.%return.param_patt)] +// CHECK:STDOUT: %return.patt.loc16_25.1: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = return_slot_pattern %return.param_patt.loc16_28.1, %U.ref [symbolic = %return.patt.loc16_25.2 (constants.%return.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc16_9.2 [symbolic = %U.loc16_9.1 (constants.%U)] -// CHECK:STDOUT: %.loc16_21.2: Core.Form = init_form %U.ref [symbolic = %.loc16_21.1 (constants.%.a6b)] -// CHECK:STDOUT: %.loc16_12.1: type = splice_block %.loc16_12.2 [concrete = type] { +// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc16_17.2 [symbolic = %U.loc16_17.1 (constants.%U)] +// CHECK:STDOUT: %.loc16_28.2: Core.Form = init_form %U.ref [symbolic = %.loc16_28.1 (constants.%.a6b)] +// CHECK:STDOUT: %.loc16_19.1: type = splice_block %.loc16_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc16_12.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc16_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc16_9.2: type = symbolic_binding U, 2 [symbolic = %U.loc16_9.1 (constants.%U)] -// CHECK:STDOUT: %return.param: ref @I.WithSelf.F.%U.loc16_9.1 (%U) = out_param call_param0 -// CHECK:STDOUT: %return: ref @I.WithSelf.F.%U.loc16_9.1 (%U) = return_slot %return.param +// CHECK:STDOUT: %U.loc16_17.2: type = symbolic_binding U, 2 [symbolic = %U.loc16_17.1 (constants.%U)] +// CHECK:STDOUT: %return.param: ref @I.WithSelf.F.%U.loc16_17.1 (%U) = out_param call_param0 +// CHECK:STDOUT: %return: ref @I.WithSelf.F.%U.loc16_17.1 (%U) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc16_22.1: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc16_22.2 (constants.%assoc0.13b)] +// CHECK:STDOUT: %assoc0.loc16_29.1: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc16_29.2 (constants.%assoc0.13b)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc15_23.1 -// CHECK:STDOUT: .F = @I.WithSelf.%assoc0.loc16_22.1 +// CHECK:STDOUT: .Self = %Self.loc15_22.1 +// CHECK:STDOUT: .F = @I.WithSelf.%assoc0.loc16_29.1 // CHECK:STDOUT: witness = (@I.WithSelf.%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -135,33 +135,33 @@ fn H() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc15_14.2: type, @I.%Self.loc15_23.1: @I.%I.type (%I.type.3fe), %U.loc16_9.2: type) { -// CHECK:STDOUT: %U.patt.loc16_9.2: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc16_9.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc16_9.1: type = symbolic_binding U, 2 [symbolic = %U.loc16_9.1 (constants.%U)] -// CHECK:STDOUT: %.loc16_21.1: Core.Form = init_form %U.loc16_9.1 [symbolic = %.loc16_21.1 (constants.%.a6b)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.loc16_9.1 [symbolic = %pattern_type (constants.%pattern_type.62e)] -// CHECK:STDOUT: %return.param_patt.loc16_21.2: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = out_param_pattern [symbolic = %return.param_patt.loc16_21.2 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc16_18.2: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = return_slot_pattern %return.param_patt.loc16_21.2, %U.loc16_9.1 [symbolic = %return.patt.loc16_18.2 (constants.%return.patt)] +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc15_14.2: type, @I.%Self.loc15_22.1: @I.%I.type (%I.type.3fe), %U.loc16_17.2: type) { +// CHECK:STDOUT: %U.patt.loc16_17.2: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc16_17.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc16_17.1: type = symbolic_binding U, 2 [symbolic = %U.loc16_17.1 (constants.%U)] +// CHECK:STDOUT: %.loc16_28.1: Core.Form = init_form %U.loc16_17.1 [symbolic = %.loc16_28.1 (constants.%.a6b)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.loc16_17.1 [symbolic = %pattern_type (constants.%pattern_type.62e)] +// CHECK:STDOUT: %return.param_patt.loc16_28.2: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = out_param_pattern [symbolic = %return.param_patt.loc16_28.2 (constants.%return.param_patt)] +// CHECK:STDOUT: %return.patt.loc16_25.2: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = return_slot_pattern %return.param_patt.loc16_28.2, %U.loc16_17.1 [symbolic = %return.patt.loc16_25.2 (constants.%return.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @I.WithSelf.F.%U.loc16_9.1 (%U); +// CHECK:STDOUT: fn() -> out %return.param: @I.WithSelf.F.%U.loc16_17.1 (%U); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc19_7.2: type) { -// CHECK:STDOUT: %T.patt.loc19_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc19_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc19_7.1 (constants.%T)] +// CHECK:STDOUT: generic fn @G(%T.loc19_15.2: type) { +// CHECK:STDOUT: %T.patt.loc19_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc19_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc19_15.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type.loc23_6.2: type = facet_type <@I, @I(%T.loc19_7.1)> [symbolic = %I.type.loc23_6.2 (constants.%I.type.3fe)] +// CHECK:STDOUT: %I.type.loc23_6.2: type = facet_type <@I, @I(%T.loc19_15.1)> [symbolic = %I.type.loc23_6.2 (constants.%I.type.3fe)] // CHECK:STDOUT: %require_complete: = require_complete_type %I.type.loc23_6.2 [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc19_7.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.b71)] +// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc19_15.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.b71)] // CHECK:STDOUT: %assoc0: @G.%I.assoc_type (%I.assoc_type.b71) = assoc_entity element0, @I.WithSelf.%I.WithSelf.F.decl [symbolic = %assoc0 (constants.%assoc0.13b)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_7.2 [symbolic = %T.loc19_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_15.2 [symbolic = %T.loc19_15.1 (constants.%T)] // CHECK:STDOUT: %I.type.loc23_6.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc23_6.2 (constants.%I.type.3fe)] -// CHECK:STDOUT: %.loc23: @G.%I.assoc_type (%I.assoc_type.b71) = specific_constant @I.WithSelf.%assoc0.loc16_22.1, @I.WithSelf(constants.%T, constants.%Self.191) [symbolic = %assoc0 (constants.%assoc0.13b)] +// CHECK:STDOUT: %.loc23: @G.%I.assoc_type (%I.assoc_type.b71) = specific_constant @I.WithSelf.%assoc0.loc16_29.1, @I.WithSelf(constants.%T, constants.%Self.191) [symbolic = %assoc0 (constants.%assoc0.13b)] // CHECK:STDOUT: %F.ref: @G.%I.assoc_type (%I.assoc_type.b71) = name_ref F, %.loc23 [symbolic = %assoc0 (constants.%assoc0.13b)] // CHECK:STDOUT: return // CHECK:STDOUT: @@ -187,7 +187,7 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.3fe -// CHECK:STDOUT: %Self.loc15_23.2 => constants.%Self.191 +// CHECK:STDOUT: %Self.loc15_22.2 => constants.%Self.191 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T, constants.%Self.191) { @@ -198,26 +198,26 @@ fn H() { // CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.09f // CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.5f2 // CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.b71 -// CHECK:STDOUT: %assoc0.loc16_22.2 => constants.%assoc0.13b +// CHECK:STDOUT: %assoc0.loc16_29.2 => constants.%assoc0.13b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf.F(constants.%T, constants.%Self.191, constants.%U) { -// CHECK:STDOUT: %U.patt.loc16_9.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc16_9.1 => constants.%U -// CHECK:STDOUT: %.loc16_21.1 => constants.%.a6b +// CHECK:STDOUT: %U.patt.loc16_17.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc16_17.1 => constants.%U +// CHECK:STDOUT: %.loc16_28.1 => constants.%.a6b // CHECK:STDOUT: %pattern_type => constants.%pattern_type.62e -// CHECK:STDOUT: %return.param_patt.loc16_21.2 => constants.%return.param_patt -// CHECK:STDOUT: %return.patt.loc16_18.2 => constants.%return.patt +// CHECK:STDOUT: %return.param_patt.loc16_28.2 => constants.%return.param_patt +// CHECK:STDOUT: %return.patt.loc16_25.2 => constants.%return.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { -// CHECK:STDOUT: %T.patt.loc19_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc19_7.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc19_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc19_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%empty_struct_type) { -// CHECK:STDOUT: %T.patt.loc19_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc19_7.1 => constants.%empty_struct_type +// CHECK:STDOUT: %T.patt.loc19_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc19_15.1 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type.loc23_6.2 => constants.%I.type.81d @@ -232,7 +232,7 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.81d -// CHECK:STDOUT: %Self.loc15_23.2 => constants.%Self.524 +// CHECK:STDOUT: %Self.loc15_22.2 => constants.%Self.524 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%empty_struct_type, constants.%Self.191) { @@ -243,6 +243,6 @@ fn H() { // CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.272 // CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.fb6 // CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.cd3 -// CHECK:STDOUT: %assoc0.loc16_22.2 => constants.%assoc0.a4c +// CHECK:STDOUT: %assoc0.loc16_29.2 => constants.%assoc0.a4c // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/compound_member_access.carbon b/toolchain/check/testdata/interface/compound_member_access.carbon index 71116508b248..fb3a14b336a3 100644 --- a/toolchain/check/testdata/interface/compound_member_access.carbon +++ b/toolchain/check/testdata/interface/compound_member_access.carbon @@ -16,14 +16,14 @@ library "[[@TEST_NAME]]"; interface J { - let U:! type; + let U: type; } // Simple member access. -fn Simple1(T:! J, unused S:! T.U) {} +fn Simple1(generic T: J, unused generic S: T.U) {} // This should be equivalent to `Simple1` above, but using compound member access. -fn Compound1(V:! J, unused W:! V.(J.U)) {} +fn Compound1(generic V: J, unused generic W: V.(J.U)) {} // --- non_instance.carbon library "[[@TEST_NAME]]"; @@ -33,12 +33,12 @@ interface K1 { } // Simple member access. -fn Simple2(T:! K1) { +fn Simple2(generic T: K1) { T.Q1(); } // This should be equivalent to `Simple2` above, but using compound member access. -fn Compound2(V:! K1) { +fn Compound2(generic V: K1) { V.(K1.Q1)(); } @@ -50,13 +50,13 @@ interface K2 { } // Simple member access allows this. -fn Simple3(T:! K2, x: T) { +fn Simple3(generic T: K2, x: T) { x.Q2(); } // Compound member access does not. It tries to convert `y` to `K2`, but only // its type `V` can. -fn Compound3(V:! K2, y: V) { +fn Compound3(generic V: K2, y: V) { // CHECK:STDERR: fail_caller_instance_interface_not.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `V` into type implementing `K2` [ConversionFailureNonTypeToFacet] // CHECK:STDERR: y.(K2.Q2)(); // CHECK:STDERR: ^~~~~~~~~ @@ -76,13 +76,13 @@ interface L1 { } // Simple member access. -fn Simple4(T:! L1, x: T, p: T*) { +fn Simple4(generic T: L1, x: T, p: T*) { x.R1(); p->S1(); } // This should be equivalent to `Simple4` above, but using compound member access. -fn Compound4(V:! L1, y: V, p: V*) { +fn Compound4(generic V: L1, y: V, p: V*) { y.(L1.R1)(); p->(L1.S1)(); } @@ -97,7 +97,7 @@ interface L2 { } // Simple member access. Fails since calling an instance method without an object. -fn Simple5(T:! L2) { +fn Simple5(generic T: L2) { // 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: ^~~~~~ @@ -117,7 +117,7 @@ fn Simple5(T:! L2) { } // TODO: Expected to fail in the same way as `Simple5`. -fn Compound5(V:! L2) { +fn Compound5(generic V: L2) { // CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+4]]:3: error: cannot access member of interface `L2` in type `L2` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: V.(L2.R2)(); // CHECK:STDERR: ^~~~~~~~~ @@ -238,41 +238,41 @@ fn Works() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} // CHECK:STDOUT: %Simple1.decl: %Simple1.type = fn_decl @Simple1 [concrete = constants.%Simple1] { -// CHECK:STDOUT: %T.patt.loc8_13.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %S.patt.loc8_27.1: @Simple1.%pattern_type (%pattern_type.0f6fa4.1) = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc8_27.2 (constants.%S.patt)] +// CHECK:STDOUT: %T.patt.loc8_21.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)] +// CHECK:STDOUT: %S.patt.loc8_42.1: @Simple1.%pattern_type (%pattern_type.0f6fa4.1) = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc8_42.2 (constants.%S.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_16: type = splice_block %J.ref [concrete = constants.%J.type] { -// CHECK:STDOUT: %.Self.frozen.loc8_13: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc8_23: type = splice_block %J.ref [concrete = constants.%J.type] { +// CHECK:STDOUT: %.Self.frozen.loc8_21: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_13.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_13.1 (constants.%T)] -// CHECK:STDOUT: %.loc8_31.1: type = splice_block %impl.elem0.loc8_31.2 [symbolic = %impl.elem0.loc8_31.1 (constants.%impl.elem0.436176.1)] { -// CHECK:STDOUT: %.Self.frozen.loc8_27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc8_13.2 [symbolic = %T.loc8_13.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_31.2: type = converted %T.ref, %T.as_type.loc8_31.2 [symbolic = %T.as_type.loc8_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc8_21.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)] +// CHECK:STDOUT: %.loc8_45.1: type = splice_block %impl.elem0.loc8_45.2 [symbolic = %impl.elem0.loc8_45.1 (constants.%impl.elem0.436176.1)] { +// CHECK:STDOUT: %.Self.frozen.loc8_42: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc8_21.2 [symbolic = %T.loc8_21.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc8_45.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_45.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc8_45.2: type = converted %T.ref, %T.as_type.loc8_45.2 [symbolic = %T.as_type.loc8_45.1 (constants.%T.as_type)] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc8_31.2: type = impl_witness_access constants.%J.lookup_impl_witness.1952bf.1, element0 [symbolic = %impl.elem0.loc8_31.1 (constants.%impl.elem0.436176.1)] +// CHECK:STDOUT: %impl.elem0.loc8_45.2: type = impl_witness_access constants.%J.lookup_impl_witness.1952bf.1, element0 [symbolic = %impl.elem0.loc8_45.1 (constants.%impl.elem0.436176.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %S.loc8_27.2: @Simple1.%impl.elem0.loc8_31.1 (%impl.elem0.436176.1) = symbolic_binding S, 1 [symbolic = %S.loc8_27.1 (constants.%S)] +// CHECK:STDOUT: %S.loc8_42.2: @Simple1.%impl.elem0.loc8_45.1 (%impl.elem0.436176.1) = symbolic_binding S, 1 [symbolic = %S.loc8_42.1 (constants.%S)] // CHECK:STDOUT: } // CHECK:STDOUT: %Compound1.decl: %Compound1.type = fn_decl @Compound1 [concrete = constants.%Compound1] { -// CHECK:STDOUT: %V.patt.loc11_15.1: %pattern_type.2c5 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_15.2 (constants.%V.patt)] -// CHECK:STDOUT: %W.patt.loc11_29.1: @Compound1.%pattern_type (%pattern_type.0f6fa4.2) = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc11_29.2 (constants.%W.patt)] +// CHECK:STDOUT: %V.patt.loc11_23.1: %pattern_type.2c5 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_23.2 (constants.%V.patt)] +// CHECK:STDOUT: %W.patt.loc11_44.1: @Compound1.%pattern_type (%pattern_type.0f6fa4.2) = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc11_44.2 (constants.%W.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_18: type = splice_block %J.ref.loc11_18 [concrete = constants.%J.type] { -// CHECK:STDOUT: %.Self.frozen.loc11_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %J.ref.loc11_18: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %.loc11_25: type = splice_block %J.ref.loc11_25 [concrete = constants.%J.type] { +// CHECK:STDOUT: %.Self.frozen.loc11_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %J.ref.loc11_25: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %V.loc11_15.2: %J.type = symbolic_binding V, 0 [symbolic = %V.loc11_15.1 (constants.%V)] -// CHECK:STDOUT: %.loc11_33: type = splice_block %impl.elem0.loc11_33.2 [symbolic = %impl.elem0.loc11_33.1 (constants.%impl.elem0.436176.2)] { -// CHECK:STDOUT: %.Self.frozen.loc11_29: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %V.ref: %J.type = name_ref V, %V.loc11_15.2 [symbolic = %V.loc11_15.1 (constants.%V)] -// CHECK:STDOUT: %J.ref.loc11_35: type = name_ref J, file.%J.decl [concrete = constants.%J.type] +// CHECK:STDOUT: %V.loc11_23.2: %J.type = symbolic_binding V, 0 [symbolic = %V.loc11_23.1 (constants.%V)] +// CHECK:STDOUT: %.loc11_47: type = splice_block %impl.elem0.loc11_47.2 [symbolic = %impl.elem0.loc11_47.1 (constants.%impl.elem0.436176.2)] { +// CHECK:STDOUT: %.Self.frozen.loc11_44: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %V.ref: %J.type = name_ref V, %V.loc11_23.2 [symbolic = %V.loc11_23.1 (constants.%V)] +// CHECK:STDOUT: %J.ref.loc11_49: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc11_33.2: type = impl_witness_access constants.%J.lookup_impl_witness.1952bf.2, element0 [symbolic = %impl.elem0.loc11_33.1 (constants.%impl.elem0.436176.2)] +// CHECK:STDOUT: %impl.elem0.loc11_47.2: type = impl_witness_access constants.%J.lookup_impl_witness.1952bf.2, element0 [symbolic = %impl.elem0.loc11_47.1 (constants.%impl.elem0.436176.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %W.loc11_29.2: @Compound1.%impl.elem0.loc11_33.1 (%impl.elem0.436176.2) = symbolic_binding W, 1 [symbolic = %W.loc11_29.1 (constants.%W)] +// CHECK:STDOUT: %W.loc11_44.2: @Compound1.%impl.elem0.loc11_47.1 (%impl.elem0.436176.2) = symbolic_binding W, 1 [symbolic = %W.loc11_44.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -295,15 +295,15 @@ fn Works() { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Simple1(%T.loc8_13.2: %J.type, %S.loc8_27.2: @Simple1.%impl.elem0.loc8_31.1 (%impl.elem0.436176.1)) { -// CHECK:STDOUT: %T.patt.loc8_13.2: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_13.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_13.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_31.1: type = facet_access_type %T.loc8_13.1 [symbolic = %T.as_type.loc8_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc8_13.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.1952bf.1)] -// CHECK:STDOUT: %impl.elem0.loc8_31.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_31.1 (constants.%impl.elem0.436176.1)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc8_31.1 [symbolic = %pattern_type (constants.%pattern_type.0f6fa4.1)] -// CHECK:STDOUT: %S.patt.loc8_27.2: @Simple1.%pattern_type (%pattern_type.0f6fa4.1) = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc8_27.2 (constants.%S.patt)] -// CHECK:STDOUT: %S.loc8_27.1: @Simple1.%impl.elem0.loc8_31.1 (%impl.elem0.436176.1) = symbolic_binding S, 1 [symbolic = %S.loc8_27.1 (constants.%S)] +// CHECK:STDOUT: generic fn @Simple1(%T.loc8_21.2: %J.type, %S.loc8_42.2: @Simple1.%impl.elem0.loc8_45.1 (%impl.elem0.436176.1)) { +// CHECK:STDOUT: %T.patt.loc8_21.2: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc8_21.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc8_45.1: type = facet_access_type %T.loc8_21.1 [symbolic = %T.as_type.loc8_45.1 (constants.%T.as_type)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc8_21.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.1952bf.1)] +// CHECK:STDOUT: %impl.elem0.loc8_45.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_45.1 (constants.%impl.elem0.436176.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc8_45.1 [symbolic = %pattern_type (constants.%pattern_type.0f6fa4.1)] +// CHECK:STDOUT: %S.patt.loc8_42.2: @Simple1.%pattern_type (%pattern_type.0f6fa4.1) = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc8_42.2 (constants.%S.patt)] +// CHECK:STDOUT: %S.loc8_42.1: @Simple1.%impl.elem0.loc8_45.1 (%impl.elem0.436176.1) = symbolic_binding S, 1 [symbolic = %S.loc8_42.1 (constants.%S)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -315,14 +315,14 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Compound1(%V.loc11_15.2: %J.type, %W.loc11_29.2: @Compound1.%impl.elem0.loc11_33.1 (%impl.elem0.436176.2)) { -// CHECK:STDOUT: %V.patt.loc11_15.2: %pattern_type.2c5 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_15.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.loc11_15.1: %J.type = symbolic_binding V, 0 [symbolic = %V.loc11_15.1 (constants.%V)] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %V.loc11_15.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.1952bf.2)] -// CHECK:STDOUT: %impl.elem0.loc11_33.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_33.1 (constants.%impl.elem0.436176.2)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc11_33.1 [symbolic = %pattern_type (constants.%pattern_type.0f6fa4.2)] -// CHECK:STDOUT: %W.patt.loc11_29.2: @Compound1.%pattern_type (%pattern_type.0f6fa4.2) = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc11_29.2 (constants.%W.patt)] -// CHECK:STDOUT: %W.loc11_29.1: @Compound1.%impl.elem0.loc11_33.1 (%impl.elem0.436176.2) = symbolic_binding W, 1 [symbolic = %W.loc11_29.1 (constants.%W)] +// CHECK:STDOUT: generic fn @Compound1(%V.loc11_23.2: %J.type, %W.loc11_44.2: @Compound1.%impl.elem0.loc11_47.1 (%impl.elem0.436176.2)) { +// CHECK:STDOUT: %V.patt.loc11_23.2: %pattern_type.2c5 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_23.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.loc11_23.1: %J.type = symbolic_binding V, 0 [symbolic = %V.loc11_23.1 (constants.%V)] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %V.loc11_23.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.1952bf.2)] +// CHECK:STDOUT: %impl.elem0.loc11_47.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_47.1 (constants.%impl.elem0.436176.2)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc11_47.1 [symbolic = %pattern_type (constants.%pattern_type.0f6fa4.2)] +// CHECK:STDOUT: %W.patt.loc11_44.2: @Compound1.%pattern_type (%pattern_type.0f6fa4.2) = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc11_44.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.loc11_44.1: @Compound1.%impl.elem0.loc11_47.1 (%impl.elem0.436176.2) = symbolic_binding W, 1 [symbolic = %W.loc11_44.1 (constants.%W)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -343,14 +343,14 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Simple1(constants.%T, constants.%S) { -// CHECK:STDOUT: %T.patt.loc8_13.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_13.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc8_31.1 => constants.%T.as_type +// CHECK:STDOUT: %T.patt.loc8_21.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_21.1 => constants.%T +// CHECK:STDOUT: %T.as_type.loc8_45.1 => constants.%T.as_type // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.1952bf.1 -// CHECK:STDOUT: %impl.elem0.loc8_31.1 => constants.%impl.elem0.436176.1 +// CHECK:STDOUT: %impl.elem0.loc8_45.1 => constants.%impl.elem0.436176.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.0f6fa4.1 -// CHECK:STDOUT: %S.patt.loc8_27.2 => constants.%S.patt -// CHECK:STDOUT: %S.loc8_27.1 => constants.%S +// CHECK:STDOUT: %S.patt.loc8_42.2 => constants.%S.patt +// CHECK:STDOUT: %S.loc8_42.1 => constants.%S // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J.WithSelf(constants.%V) { @@ -358,13 +358,13 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Compound1(constants.%V, constants.%W) { -// CHECK:STDOUT: %V.patt.loc11_15.2 => constants.%V.patt -// CHECK:STDOUT: %V.loc11_15.1 => constants.%V +// CHECK:STDOUT: %V.patt.loc11_23.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc11_23.1 => constants.%V // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.1952bf.2 -// CHECK:STDOUT: %impl.elem0.loc11_33.1 => constants.%impl.elem0.436176.2 +// CHECK:STDOUT: %impl.elem0.loc11_47.1 => constants.%impl.elem0.436176.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.0f6fa4.2 -// CHECK:STDOUT: %W.patt.loc11_29.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc11_29.1 => constants.%W +// CHECK:STDOUT: %W.patt.loc11_44.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc11_44.1 => constants.%W // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- non_instance.carbon @@ -420,22 +420,22 @@ fn Works() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %K1.decl: type = interface_decl @K1 [concrete = constants.%K1.type] {} {} // CHECK:STDOUT: %Simple2.decl: %Simple2.type = fn_decl @Simple2 [concrete = constants.%Simple2] { -// CHECK:STDOUT: %T.patt.loc8_13.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_13.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc8_21.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc8: type = splice_block %K1.ref [concrete = constants.%K1.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %K1.ref: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_13.2: %K1.type = symbolic_binding T, 0 [symbolic = %T.loc8_13.1 (constants.%T)] +// CHECK:STDOUT: %T.loc8_21.2: %K1.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Compound2.decl: %Compound2.type = fn_decl @Compound2 [concrete = constants.%Compound2] { -// CHECK:STDOUT: %V.patt.loc13_15.1: %pattern_type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_15.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.patt.loc13_23.1: %pattern_type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_23.2 (constants.%V.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc13: type = splice_block %K1.ref.loc13 [concrete = constants.%K1.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %K1.ref.loc13: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %V.loc13_15.2: %K1.type = symbolic_binding V, 0 [symbolic = %V.loc13_15.1 (constants.%V)] +// CHECK:STDOUT: %V.loc13_23.2: %K1.type = symbolic_binding V, 0 [symbolic = %V.loc13_23.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -461,21 +461,21 @@ fn Works() { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Simple2(%T.loc8_13.2: %K1.type) { -// CHECK:STDOUT: %T.patt.loc8_13.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_13.1: %K1.type = symbolic_binding T, 0 [symbolic = %T.loc8_13.1 (constants.%T)] +// CHECK:STDOUT: generic fn @Simple2(%T.loc8_21.2: %K1.type) { +// CHECK:STDOUT: %T.patt.loc8_21.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc8_21.1: %K1.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc9_4.2: type = facet_access_type %T.loc8_13.1 [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %K1.WithSelf.Q1.type: type = fn_type @K1.WithSelf.Q1, @K1.WithSelf(%T.loc8_13.1) [symbolic = %K1.WithSelf.Q1.type (constants.%K1.WithSelf.Q1.type.95e2e8.1)] -// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type %K1.WithSelf.Q1.type, %T.loc8_13.1 [symbolic = %.loc9_4.2 (constants.%.ad76f4.1)] -// CHECK:STDOUT: %K1.lookup_impl_witness: = lookup_impl_witness %T.loc8_13.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.27af5e.1)] +// CHECK:STDOUT: %T.as_type.loc9_4.2: type = facet_access_type %T.loc8_21.1 [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)] +// CHECK:STDOUT: %K1.WithSelf.Q1.type: type = fn_type @K1.WithSelf.Q1, @K1.WithSelf(%T.loc8_21.1) [symbolic = %K1.WithSelf.Q1.type (constants.%K1.WithSelf.Q1.type.95e2e8.1)] +// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type %K1.WithSelf.Q1.type, %T.loc8_21.1 [symbolic = %.loc9_4.2 (constants.%.ad76f4.1)] +// CHECK:STDOUT: %K1.lookup_impl_witness: = lookup_impl_witness %T.loc8_21.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.27af5e.1)] // CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple2.%.loc9_4.2 (%.ad76f4.1) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.6d291b.1)] -// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @K1.WithSelf.Q1(%T.loc8_13.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.747340.1)] +// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @K1.WithSelf.Q1(%T.loc8_21.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.747340.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: %K1.type = name_ref T, %T.loc8_13.2 [symbolic = %T.loc8_13.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: %K1.type = name_ref T, %T.loc8_21.2 [symbolic = %T.loc8_21.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc9_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc9_4.1: type = converted %T.ref, %T.as_type.loc9_4.1 [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.WithSelf.%assoc0 [concrete = constants.%assoc0] @@ -488,20 +488,20 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Compound2(%V.loc13_15.2: %K1.type) { -// CHECK:STDOUT: %V.patt.loc13_15.2: %pattern_type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_15.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.loc13_15.1: %K1.type = symbolic_binding V, 0 [symbolic = %V.loc13_15.1 (constants.%V)] +// CHECK:STDOUT: generic fn @Compound2(%V.loc13_23.2: %K1.type) { +// CHECK:STDOUT: %V.patt.loc13_23.2: %pattern_type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_23.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.loc13_23.1: %K1.type = symbolic_binding V, 0 [symbolic = %V.loc13_23.1 (constants.%V)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %K1.WithSelf.Q1.type: type = fn_type @K1.WithSelf.Q1, @K1.WithSelf(%V.loc13_15.1) [symbolic = %K1.WithSelf.Q1.type (constants.%K1.WithSelf.Q1.type.95e2e8.2)] -// CHECK:STDOUT: %.loc14: type = fn_type_with_self_type %K1.WithSelf.Q1.type, %V.loc13_15.1 [symbolic = %.loc14 (constants.%.ad76f4.2)] -// CHECK:STDOUT: %K1.lookup_impl_witness: = lookup_impl_witness %V.loc13_15.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.27af5e.2)] +// CHECK:STDOUT: %K1.WithSelf.Q1.type: type = fn_type @K1.WithSelf.Q1, @K1.WithSelf(%V.loc13_23.1) [symbolic = %K1.WithSelf.Q1.type (constants.%K1.WithSelf.Q1.type.95e2e8.2)] +// CHECK:STDOUT: %.loc14: type = fn_type_with_self_type %K1.WithSelf.Q1.type, %V.loc13_23.1 [symbolic = %.loc14 (constants.%.ad76f4.2)] +// CHECK:STDOUT: %K1.lookup_impl_witness: = lookup_impl_witness %V.loc13_23.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.27af5e.2)] // CHECK:STDOUT: %impl.elem0.loc14_4.2: @Compound2.%.loc14 (%.ad76f4.2) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.6d291b.2)] -// CHECK:STDOUT: %specific_impl_fn.loc14_4.2: = specific_impl_function %impl.elem0.loc14_4.2, @K1.WithSelf.Q1(%V.loc13_15.1) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.747340.2)] +// CHECK:STDOUT: %specific_impl_fn.loc14_4.2: = specific_impl_function %impl.elem0.loc14_4.2, @K1.WithSelf.Q1(%V.loc13_23.1) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.747340.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %V.ref: %K1.type = name_ref V, %V.loc13_15.2 [symbolic = %V.loc13_15.1 (constants.%V)] +// CHECK:STDOUT: %V.ref: %K1.type = name_ref V, %V.loc13_23.2 [symbolic = %V.loc13_23.1 (constants.%V)] // CHECK:STDOUT: %K1.ref.loc14: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type] // CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.WithSelf.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc14_4.1: @Compound2.%.loc14 (%.ad76f4.2) = impl_witness_access constants.%K1.lookup_impl_witness.27af5e.2, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.6d291b.2)] @@ -523,8 +523,8 @@ fn Works() { // CHECK:STDOUT: specific @K1.WithSelf.Q1(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Simple2(constants.%T) { -// CHECK:STDOUT: %T.patt.loc8_13.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_13.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc8_21.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_21.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @K1.WithSelf(constants.%T) { @@ -537,8 +537,8 @@ fn Works() { // CHECK:STDOUT: specific @K1.WithSelf.Q1(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Compound2(constants.%V) { -// CHECK:STDOUT: %V.patt.loc13_15.2 => constants.%V.patt -// CHECK:STDOUT: %V.loc13_15.1 => constants.%V +// CHECK:STDOUT: %V.patt.loc13_23.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc13_23.1 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @K1.WithSelf(constants.%V) { @@ -610,40 +610,40 @@ fn Works() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %K2.decl: type = interface_decl @K2 [concrete = constants.%K2.type] {} {} // CHECK:STDOUT: %Simple3.decl: %Simple3.type = fn_decl @Simple3 [concrete = constants.%Simple3] { -// CHECK:STDOUT: %T.patt.loc8_13.1: %pattern_type.583 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc8_21.1: @Simple3.%pattern_type (%pattern_type.f2711c.1) = value_param_pattern [symbolic = %x.param_patt.loc8_21.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc8_21.1: @Simple3.%pattern_type (%pattern_type.f2711c.1) = at_binding_pattern x, %x.param_patt.loc8_21.1 [symbolic = %x.patt.loc8_21.2 (constants.%x.patt)] +// CHECK:STDOUT: %T.patt.loc8_21.1: %pattern_type.583 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)] +// CHECK:STDOUT: %x.param_patt.loc8_28.1: @Simple3.%pattern_type (%pattern_type.f2711c.1) = value_param_pattern [symbolic = %x.param_patt.loc8_28.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc8_28.1: @Simple3.%pattern_type (%pattern_type.f2711c.1) = at_binding_pattern x, %x.param_patt.loc8_28.1 [symbolic = %x.patt.loc8_28.2 (constants.%x.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_16: type = splice_block %K2.ref [concrete = constants.%K2.type] { +// CHECK:STDOUT: %.loc8_23: type = splice_block %K2.ref [concrete = constants.%K2.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %K2.ref: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_13.2: %K2.type = symbolic_binding T, 0 [symbolic = %T.loc8_13.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @Simple3.%T.as_type.loc8_23.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc8_23.1: type = splice_block %.loc8_23.2 [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref: %K2.type = name_ref T, %T.loc8_13.2 [symbolic = %T.loc8_13.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_23.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_23.2: type = converted %T.ref, %T.as_type.loc8_23.2 [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc8_21.2: %K2.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)] +// CHECK:STDOUT: %x.param: @Simple3.%T.as_type.loc8_30.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc8_30.1: type = splice_block %.loc8_30.2 [symbolic = %T.as_type.loc8_30.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref: %K2.type = name_ref T, %T.loc8_21.2 [symbolic = %T.loc8_21.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc8_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc8_30.2: type = converted %T.ref, %T.as_type.loc8_30.2 [symbolic = %T.as_type.loc8_30.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @Simple3.%T.as_type.loc8_23.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @Simple3.%T.as_type.loc8_30.1 (%T.as_type) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %Compound3.decl: %Compound3.type = fn_decl @Compound3 [concrete = constants.%Compound3] { -// CHECK:STDOUT: %V.patt.loc14_15.1: %pattern_type.583 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc14_15.2 (constants.%V.patt)] -// CHECK:STDOUT: %y.param_patt.loc14_23.1: @Compound3.%pattern_type (%pattern_type.f2711c.2) = value_param_pattern [symbolic = %y.param_patt.loc14_23.2 (constants.%y.param_patt)] -// CHECK:STDOUT: %y.patt.loc14_23.1: @Compound3.%pattern_type (%pattern_type.f2711c.2) = at_binding_pattern y, %y.param_patt.loc14_23.1 [symbolic = %y.patt.loc14_23.2 (constants.%y.patt)] +// CHECK:STDOUT: %V.patt.loc14_23.1: %pattern_type.583 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc14_23.2 (constants.%V.patt)] +// CHECK:STDOUT: %y.param_patt.loc14_30.1: @Compound3.%pattern_type (%pattern_type.f2711c.2) = value_param_pattern [symbolic = %y.param_patt.loc14_30.2 (constants.%y.param_patt)] +// CHECK:STDOUT: %y.patt.loc14_30.1: @Compound3.%pattern_type (%pattern_type.f2711c.2) = at_binding_pattern y, %y.param_patt.loc14_30.1 [symbolic = %y.patt.loc14_30.2 (constants.%y.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_18: type = splice_block %K2.ref.loc14 [concrete = constants.%K2.type] { +// CHECK:STDOUT: %.loc14_25: type = splice_block %K2.ref.loc14 [concrete = constants.%K2.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %K2.ref.loc14: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %V.loc14_15.2: %K2.type = symbolic_binding V, 0 [symbolic = %V.loc14_15.1 (constants.%V)] -// CHECK:STDOUT: %y.param: @Compound3.%V.as_type.loc14_25.1 (%V.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc14_25.1: type = splice_block %.loc14_25.2 [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)] { -// CHECK:STDOUT: %V.ref: %K2.type = name_ref V, %V.loc14_15.2 [symbolic = %V.loc14_15.1 (constants.%V)] -// CHECK:STDOUT: %V.as_type.loc14_25.2: type = facet_access_type %V.ref [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)] -// CHECK:STDOUT: %.loc14_25.2: type = converted %V.ref, %V.as_type.loc14_25.2 [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)] +// CHECK:STDOUT: %V.loc14_23.2: %K2.type = symbolic_binding V, 0 [symbolic = %V.loc14_23.1 (constants.%V)] +// CHECK:STDOUT: %y.param: @Compound3.%V.as_type.loc14_32.1 (%V.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc14_32.1: type = splice_block %.loc14_32.2 [symbolic = %V.as_type.loc14_32.1 (constants.%V.as_type)] { +// CHECK:STDOUT: %V.ref: %K2.type = name_ref V, %V.loc14_23.2 [symbolic = %V.loc14_23.1 (constants.%V)] +// CHECK:STDOUT: %V.as_type.loc14_32.2: type = facet_access_type %V.ref [symbolic = %V.as_type.loc14_32.1 (constants.%V.as_type)] +// CHECK:STDOUT: %.loc14_32.2: type = converted %V.ref, %V.as_type.loc14_32.2 [symbolic = %V.as_type.loc14_32.1 (constants.%V.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %y: @Compound3.%V.as_type.loc14_25.1 (%V.as_type) = wrapper_binding y, %y.param +// CHECK:STDOUT: %y: @Compound3.%V.as_type.loc14_32.1 (%V.as_type) = wrapper_binding y, %y.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -669,25 +669,25 @@ fn Works() { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Simple3(%T.loc8_13.2: %K2.type) { -// CHECK:STDOUT: %T.patt.loc8_13.2: %pattern_type.583 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_13.1: %K2.type = symbolic_binding T, 0 [symbolic = %T.loc8_13.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8_23.1: type = facet_access_type %T.loc8_13.1 [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc8_23.1 [symbolic = %pattern_type (constants.%pattern_type.f2711c.1)] -// CHECK:STDOUT: %x.param_patt.loc8_21.2: @Simple3.%pattern_type (%pattern_type.f2711c.1) = value_param_pattern [symbolic = %x.param_patt.loc8_21.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc8_21.2: @Simple3.%pattern_type (%pattern_type.f2711c.1) = at_binding_pattern x, %x.param_patt.loc8_21.2 [symbolic = %x.patt.loc8_21.2 (constants.%x.patt)] +// CHECK:STDOUT: generic fn @Simple3(%T.loc8_21.2: %K2.type) { +// CHECK:STDOUT: %T.patt.loc8_21.2: %pattern_type.583 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc8_21.1: %K2.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc8_30.1: type = facet_access_type %T.loc8_21.1 [symbolic = %T.as_type.loc8_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc8_30.1 [symbolic = %pattern_type (constants.%pattern_type.f2711c.1)] +// CHECK:STDOUT: %x.param_patt.loc8_28.2: @Simple3.%pattern_type (%pattern_type.f2711c.1) = value_param_pattern [symbolic = %x.param_patt.loc8_28.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc8_28.2: @Simple3.%pattern_type (%pattern_type.f2711c.1) = at_binding_pattern x, %x.param_patt.loc8_28.2 [symbolic = %x.patt.loc8_28.2 (constants.%x.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc8_23.1 [symbolic = %require_complete (constants.%require_complete.041d4e.1)] -// CHECK:STDOUT: %K2.WithSelf.Q2.type: type = fn_type @K2.WithSelf.Q2, @K2.WithSelf(%T.loc8_13.1) [symbolic = %K2.WithSelf.Q2.type (constants.%K2.WithSelf.Q2.type.71e)] -// CHECK:STDOUT: %.loc9: type = fn_type_with_self_type %K2.WithSelf.Q2.type, %T.loc8_13.1 [symbolic = %.loc9 (constants.%.13a)] -// CHECK:STDOUT: %K2.lookup_impl_witness: = lookup_impl_witness %T.loc8_13.1, @K2 [symbolic = %K2.lookup_impl_witness (constants.%K2.lookup_impl_witness)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc8_30.1 [symbolic = %require_complete (constants.%require_complete.041d4e.1)] +// CHECK:STDOUT: %K2.WithSelf.Q2.type: type = fn_type @K2.WithSelf.Q2, @K2.WithSelf(%T.loc8_21.1) [symbolic = %K2.WithSelf.Q2.type (constants.%K2.WithSelf.Q2.type.71e)] +// CHECK:STDOUT: %.loc9: type = fn_type_with_self_type %K2.WithSelf.Q2.type, %T.loc8_21.1 [symbolic = %.loc9 (constants.%.13a)] +// CHECK:STDOUT: %K2.lookup_impl_witness: = lookup_impl_witness %T.loc8_21.1, @K2 [symbolic = %K2.lookup_impl_witness (constants.%K2.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple3.%.loc9 (%.13a) = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @K2.WithSelf.Q2(%T.loc8_13.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @K2.WithSelf.Q2(%T.loc8_21.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @Simple3.%T.as_type.loc8_23.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%x.param: @Simple3.%T.as_type.loc8_30.1 (%T.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @Simple3.%T.as_type.loc8_23.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @Simple3.%T.as_type.loc8_30.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.WithSelf.%assoc0 [concrete = constants.%assoc0.7f8] // CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple3.%.loc9 (%.13a) = impl_witness_access constants.%K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_4.1: = specific_impl_function %impl.elem0.loc9_4.1, @K2.WithSelf.Q2(constants.%T) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] @@ -698,20 +698,20 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Compound3(%V.loc14_15.2: %K2.type) { -// CHECK:STDOUT: %V.patt.loc14_15.2: %pattern_type.583 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc14_15.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.loc14_15.1: %K2.type = symbolic_binding V, 0 [symbolic = %V.loc14_15.1 (constants.%V)] -// CHECK:STDOUT: %V.as_type.loc14_25.1: type = facet_access_type %V.loc14_15.1 [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %V.as_type.loc14_25.1 [symbolic = %pattern_type (constants.%pattern_type.f2711c.2)] -// CHECK:STDOUT: %y.param_patt.loc14_23.2: @Compound3.%pattern_type (%pattern_type.f2711c.2) = value_param_pattern [symbolic = %y.param_patt.loc14_23.2 (constants.%y.param_patt)] -// CHECK:STDOUT: %y.patt.loc14_23.2: @Compound3.%pattern_type (%pattern_type.f2711c.2) = at_binding_pattern y, %y.param_patt.loc14_23.2 [symbolic = %y.patt.loc14_23.2 (constants.%y.patt)] +// CHECK:STDOUT: generic fn @Compound3(%V.loc14_23.2: %K2.type) { +// CHECK:STDOUT: %V.patt.loc14_23.2: %pattern_type.583 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc14_23.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.loc14_23.1: %K2.type = symbolic_binding V, 0 [symbolic = %V.loc14_23.1 (constants.%V)] +// CHECK:STDOUT: %V.as_type.loc14_32.1: type = facet_access_type %V.loc14_23.1 [symbolic = %V.as_type.loc14_32.1 (constants.%V.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %V.as_type.loc14_32.1 [symbolic = %pattern_type (constants.%pattern_type.f2711c.2)] +// CHECK:STDOUT: %y.param_patt.loc14_30.2: @Compound3.%pattern_type (%pattern_type.f2711c.2) = value_param_pattern [symbolic = %y.param_patt.loc14_30.2 (constants.%y.param_patt)] +// CHECK:STDOUT: %y.patt.loc14_30.2: @Compound3.%pattern_type (%pattern_type.f2711c.2) = at_binding_pattern y, %y.param_patt.loc14_30.2 [symbolic = %y.patt.loc14_30.2 (constants.%y.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %V.as_type.loc14_25.1 [symbolic = %require_complete (constants.%require_complete.041d4e.2)] +// CHECK:STDOUT: %require_complete: = require_complete_type %V.as_type.loc14_32.1 [symbolic = %require_complete (constants.%require_complete.041d4e.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%y.param: @Compound3.%V.as_type.loc14_25.1 (%V.as_type)) { +// CHECK:STDOUT: fn(%y.param: @Compound3.%V.as_type.loc14_32.1 (%V.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %y.ref: @Compound3.%V.as_type.loc14_25.1 (%V.as_type) = name_ref y, %y +// CHECK:STDOUT: %y.ref: @Compound3.%V.as_type.loc14_32.1 (%V.as_type) = name_ref y, %y // CHECK:STDOUT: %K2.ref.loc22: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type] // CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.WithSelf.%assoc0 [concrete = constants.%assoc0.7f8] // CHECK:STDOUT: %.loc22: %K2.type = converted %y.ref, [concrete = ] @@ -731,12 +731,12 @@ fn Works() { // CHECK:STDOUT: specific @K2.WithSelf.Q2(constants.%Self.b0c) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Simple3(constants.%T) { -// CHECK:STDOUT: %T.patt.loc8_13.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_13.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc8_23.1 => constants.%T.as_type +// CHECK:STDOUT: %T.patt.loc8_21.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_21.1 => constants.%T +// CHECK:STDOUT: %T.as_type.loc8_30.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f2711c.1 -// CHECK:STDOUT: %x.param_patt.loc8_21.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc8_21.2 => constants.%x.patt +// CHECK:STDOUT: %x.param_patt.loc8_28.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc8_28.2 => constants.%x.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @K2.WithSelf(constants.%T) { @@ -749,12 +749,12 @@ fn Works() { // CHECK:STDOUT: specific @K2.WithSelf.Q2(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Compound3(constants.%V) { -// CHECK:STDOUT: %V.patt.loc14_15.2 => constants.%V.patt -// CHECK:STDOUT: %V.loc14_15.1 => constants.%V -// CHECK:STDOUT: %V.as_type.loc14_25.1 => constants.%V.as_type +// CHECK:STDOUT: %V.patt.loc14_23.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc14_23.1 => constants.%V +// CHECK:STDOUT: %V.as_type.loc14_32.1 => constants.%V.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f2711c.2 -// CHECK:STDOUT: %y.param_patt.loc14_23.2 => constants.%y.param_patt -// CHECK:STDOUT: %y.patt.loc14_23.2 => constants.%y.patt +// CHECK:STDOUT: %y.param_patt.loc14_30.2 => constants.%y.param_patt +// CHECK:STDOUT: %y.patt.loc14_30.2 => constants.%y.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- instance.carbon @@ -856,60 +856,60 @@ fn Works() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %L1.decl: type = interface_decl @L1 [concrete = constants.%L1.type] {} {} // CHECK:STDOUT: %Simple4.decl: %Simple4.type = fn_decl @Simple4 [concrete = constants.%Simple4] { -// CHECK:STDOUT: %T.patt.loc9_13.1: %pattern_type.b7b = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc9_21.1: @Simple4.%pattern_type.loc9_21 (%pattern_type.5697a7.1) = value_param_pattern [symbolic = %x.param_patt.loc9_21.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc9_21.1: @Simple4.%pattern_type.loc9_21 (%pattern_type.5697a7.1) = at_binding_pattern x, %x.param_patt.loc9_21.1 [symbolic = %x.patt.loc9_21.2 (constants.%x.patt)] -// CHECK:STDOUT: %p.param_patt.loc9_27.1: @Simple4.%pattern_type.loc9_27 (%pattern_type.e0b9be.1) = value_param_pattern [symbolic = %p.param_patt.loc9_27.2 (constants.%p.param_patt.f2a353.1)] -// CHECK:STDOUT: %p.patt.loc9_27.1: @Simple4.%pattern_type.loc9_27 (%pattern_type.e0b9be.1) = at_binding_pattern p, %p.param_patt.loc9_27.1 [symbolic = %p.patt.loc9_27.2 (constants.%p.patt.4967c5.1)] +// CHECK:STDOUT: %T.patt.loc9_21.1: %pattern_type.b7b = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_21.2 (constants.%T.patt)] +// CHECK:STDOUT: %x.param_patt.loc9_28.1: @Simple4.%pattern_type.loc9_28 (%pattern_type.5697a7.1) = value_param_pattern [symbolic = %x.param_patt.loc9_28.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc9_28.1: @Simple4.%pattern_type.loc9_28 (%pattern_type.5697a7.1) = at_binding_pattern x, %x.param_patt.loc9_28.1 [symbolic = %x.patt.loc9_28.2 (constants.%x.patt)] +// CHECK:STDOUT: %p.param_patt.loc9_34.1: @Simple4.%pattern_type.loc9_34 (%pattern_type.e0b9be.1) = value_param_pattern [symbolic = %p.param_patt.loc9_34.2 (constants.%p.param_patt.f2a353.1)] +// CHECK:STDOUT: %p.patt.loc9_34.1: @Simple4.%pattern_type.loc9_34 (%pattern_type.e0b9be.1) = at_binding_pattern p, %p.param_patt.loc9_34.1 [symbolic = %p.patt.loc9_34.2 (constants.%p.patt.4967c5.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_16: type = splice_block %L1.ref [concrete = constants.%L1.type] { +// CHECK:STDOUT: %.loc9_23: type = splice_block %L1.ref [concrete = constants.%L1.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %L1.ref: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc9_13.2: %L1.type = symbolic_binding T, 0 [symbolic = %T.loc9_13.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.2 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc9_23: %L1.type = name_ref T, %T.loc9_13.2 [symbolic = %T.loc9_13.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc9_23.2: type = facet_access_type %T.ref.loc9_23 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_23.2: type = converted %T.ref.loc9_23, %T.as_type.loc9_23.2 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc9_21.2: %L1.type = symbolic_binding T, 0 [symbolic = %T.loc9_21.1 (constants.%T)] +// CHECK:STDOUT: %x.param: @Simple4.%T.as_type.loc9_30.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc9_30.1: type = splice_block %.loc9_30.2 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref.loc9_30: %L1.type = name_ref T, %T.loc9_21.2 [symbolic = %T.loc9_21.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc9_30.2: type = facet_access_type %T.ref.loc9_30 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_30.2: type = converted %T.ref.loc9_30, %T.as_type.loc9_30.2 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = wrapper_binding x, %x.param -// CHECK:STDOUT: %p.param: @Simple4.%ptr.loc9_30.1 (%ptr.ed22b9.1) = value_param call_param1 -// CHECK:STDOUT: %.loc9_30.1: type = splice_block %ptr.loc9_30.2 [symbolic = %ptr.loc9_30.1 (constants.%ptr.ed22b9.1)] { -// CHECK:STDOUT: %T.ref.loc9_29: %L1.type = name_ref T, %T.loc9_13.2 [symbolic = %T.loc9_13.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc9_30: type = facet_access_type %T.ref.loc9_29 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_30.2: type = converted %T.ref.loc9_29, %T.as_type.loc9_30 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] -// CHECK:STDOUT: %ptr.loc9_30.2: type = ptr_type %.loc9_30.2 [symbolic = %ptr.loc9_30.1 (constants.%ptr.ed22b9.1)] +// CHECK:STDOUT: %x: @Simple4.%T.as_type.loc9_30.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %p.param: @Simple4.%ptr.loc9_37.1 (%ptr.ed22b9.1) = value_param call_param1 +// CHECK:STDOUT: %.loc9_37.1: type = splice_block %ptr.loc9_37.2 [symbolic = %ptr.loc9_37.1 (constants.%ptr.ed22b9.1)] { +// CHECK:STDOUT: %T.ref.loc9_36: %L1.type = name_ref T, %T.loc9_21.2 [symbolic = %T.loc9_21.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc9_37: type = facet_access_type %T.ref.loc9_36 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_37.2: type = converted %T.ref.loc9_36, %T.as_type.loc9_37 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %ptr.loc9_37.2: type = ptr_type %.loc9_37.2 [symbolic = %ptr.loc9_37.1 (constants.%ptr.ed22b9.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %p: @Simple4.%ptr.loc9_30.1 (%ptr.ed22b9.1) = wrapper_binding p, %p.param +// CHECK:STDOUT: %p: @Simple4.%ptr.loc9_37.1 (%ptr.ed22b9.1) = wrapper_binding p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %Compound4.decl: %Compound4.type = fn_decl @Compound4 [concrete = constants.%Compound4] { -// CHECK:STDOUT: %V.patt.loc15_15.1: %pattern_type.b7b = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc15_15.2 (constants.%V.patt)] -// CHECK:STDOUT: %y.param_patt.loc15_23.1: @Compound4.%pattern_type.loc15_23 (%pattern_type.5697a7.2) = value_param_pattern [symbolic = %y.param_patt.loc15_23.2 (constants.%y.param_patt)] -// CHECK:STDOUT: %y.patt.loc15_23.1: @Compound4.%pattern_type.loc15_23 (%pattern_type.5697a7.2) = at_binding_pattern y, %y.param_patt.loc15_23.1 [symbolic = %y.patt.loc15_23.2 (constants.%y.patt)] -// CHECK:STDOUT: %p.param_patt.loc15_29.1: @Compound4.%pattern_type.loc15_29 (%pattern_type.e0b9be.2) = value_param_pattern [symbolic = %p.param_patt.loc15_29.2 (constants.%p.param_patt.f2a353.2)] -// CHECK:STDOUT: %p.patt.loc15_29.1: @Compound4.%pattern_type.loc15_29 (%pattern_type.e0b9be.2) = at_binding_pattern p, %p.param_patt.loc15_29.1 [symbolic = %p.patt.loc15_29.2 (constants.%p.patt.4967c5.2)] +// CHECK:STDOUT: %V.patt.loc15_23.1: %pattern_type.b7b = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc15_23.2 (constants.%V.patt)] +// CHECK:STDOUT: %y.param_patt.loc15_30.1: @Compound4.%pattern_type.loc15_30 (%pattern_type.5697a7.2) = value_param_pattern [symbolic = %y.param_patt.loc15_30.2 (constants.%y.param_patt)] +// CHECK:STDOUT: %y.patt.loc15_30.1: @Compound4.%pattern_type.loc15_30 (%pattern_type.5697a7.2) = at_binding_pattern y, %y.param_patt.loc15_30.1 [symbolic = %y.patt.loc15_30.2 (constants.%y.patt)] +// CHECK:STDOUT: %p.param_patt.loc15_36.1: @Compound4.%pattern_type.loc15_36 (%pattern_type.e0b9be.2) = value_param_pattern [symbolic = %p.param_patt.loc15_36.2 (constants.%p.param_patt.f2a353.2)] +// CHECK:STDOUT: %p.patt.loc15_36.1: @Compound4.%pattern_type.loc15_36 (%pattern_type.e0b9be.2) = at_binding_pattern p, %p.param_patt.loc15_36.1 [symbolic = %p.patt.loc15_36.2 (constants.%p.patt.4967c5.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_18: type = splice_block %L1.ref.loc15 [concrete = constants.%L1.type] { +// CHECK:STDOUT: %.loc15_25: type = splice_block %L1.ref.loc15 [concrete = constants.%L1.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %L1.ref.loc15: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %V.loc15_15.2: %L1.type = symbolic_binding V, 0 [symbolic = %V.loc15_15.1 (constants.%V)] -// CHECK:STDOUT: %y.param: @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc15_25.1: type = splice_block %.loc15_25.2 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)] { -// CHECK:STDOUT: %V.ref.loc15_25: %L1.type = name_ref V, %V.loc15_15.2 [symbolic = %V.loc15_15.1 (constants.%V)] -// CHECK:STDOUT: %V.as_type.loc15_25.2: type = facet_access_type %V.ref.loc15_25 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)] -// CHECK:STDOUT: %.loc15_25.2: type = converted %V.ref.loc15_25, %V.as_type.loc15_25.2 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)] +// CHECK:STDOUT: %V.loc15_23.2: %L1.type = symbolic_binding V, 0 [symbolic = %V.loc15_23.1 (constants.%V)] +// CHECK:STDOUT: %y.param: @Compound4.%V.as_type.loc15_32.1 (%V.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc15_32.1: type = splice_block %.loc15_32.2 [symbolic = %V.as_type.loc15_32.1 (constants.%V.as_type)] { +// CHECK:STDOUT: %V.ref.loc15_32: %L1.type = name_ref V, %V.loc15_23.2 [symbolic = %V.loc15_23.1 (constants.%V)] +// CHECK:STDOUT: %V.as_type.loc15_32.2: type = facet_access_type %V.ref.loc15_32 [symbolic = %V.as_type.loc15_32.1 (constants.%V.as_type)] +// CHECK:STDOUT: %.loc15_32.2: type = converted %V.ref.loc15_32, %V.as_type.loc15_32.2 [symbolic = %V.as_type.loc15_32.1 (constants.%V.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %y: @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = wrapper_binding y, %y.param -// CHECK:STDOUT: %p.param: @Compound4.%ptr.loc15_32.1 (%ptr.ed22b9.2) = value_param call_param1 -// CHECK:STDOUT: %.loc15_32.1: type = splice_block %ptr.loc15_32.2 [symbolic = %ptr.loc15_32.1 (constants.%ptr.ed22b9.2)] { -// CHECK:STDOUT: %V.ref.loc15_31: %L1.type = name_ref V, %V.loc15_15.2 [symbolic = %V.loc15_15.1 (constants.%V)] -// CHECK:STDOUT: %V.as_type.loc15_32: type = facet_access_type %V.ref.loc15_31 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)] -// CHECK:STDOUT: %.loc15_32.2: type = converted %V.ref.loc15_31, %V.as_type.loc15_32 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)] -// CHECK:STDOUT: %ptr.loc15_32.2: type = ptr_type %.loc15_32.2 [symbolic = %ptr.loc15_32.1 (constants.%ptr.ed22b9.2)] +// CHECK:STDOUT: %y: @Compound4.%V.as_type.loc15_32.1 (%V.as_type) = wrapper_binding y, %y.param +// CHECK:STDOUT: %p.param: @Compound4.%ptr.loc15_39.1 (%ptr.ed22b9.2) = value_param call_param1 +// CHECK:STDOUT: %.loc15_39.1: type = splice_block %ptr.loc15_39.2 [symbolic = %ptr.loc15_39.1 (constants.%ptr.ed22b9.2)] { +// CHECK:STDOUT: %V.ref.loc15_38: %L1.type = name_ref V, %V.loc15_23.2 [symbolic = %V.loc15_23.1 (constants.%V)] +// CHECK:STDOUT: %V.as_type.loc15_39: type = facet_access_type %V.ref.loc15_38 [symbolic = %V.as_type.loc15_32.1 (constants.%V.as_type)] +// CHECK:STDOUT: %.loc15_39.2: type = converted %V.ref.loc15_38, %V.as_type.loc15_39 [symbolic = %V.as_type.loc15_32.1 (constants.%V.as_type)] +// CHECK:STDOUT: %ptr.loc15_39.2: type = ptr_type %.loc15_39.2 [symbolic = %ptr.loc15_39.1 (constants.%ptr.ed22b9.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %p: @Compound4.%ptr.loc15_32.1 (%ptr.ed22b9.2) = wrapper_binding p, %p.param +// CHECK:STDOUT: %p: @Compound4.%ptr.loc15_39.1 (%ptr.ed22b9.2) = wrapper_binding p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -976,49 +976,49 @@ fn Works() { // 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) { -// CHECK:STDOUT: %T.patt.loc9_13.2: %pattern_type.b7b = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc9_13.1: %L1.type = symbolic_binding T, 0 [symbolic = %T.loc9_13.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc9_23.1: type = facet_access_type %T.loc9_13.1 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type.loc9_21: type = pattern_type %T.as_type.loc9_23.1 [symbolic = %pattern_type.loc9_21 (constants.%pattern_type.5697a7.1)] -// CHECK:STDOUT: %x.param_patt.loc9_21.2: @Simple4.%pattern_type.loc9_21 (%pattern_type.5697a7.1) = value_param_pattern [symbolic = %x.param_patt.loc9_21.2 (constants.%x.param_patt)] -// CHECK:STDOUT: %x.patt.loc9_21.2: @Simple4.%pattern_type.loc9_21 (%pattern_type.5697a7.1) = at_binding_pattern x, %x.param_patt.loc9_21.2 [symbolic = %x.patt.loc9_21.2 (constants.%x.patt)] -// CHECK:STDOUT: %ptr.loc9_30.1: type = ptr_type %T.as_type.loc9_23.1 [symbolic = %ptr.loc9_30.1 (constants.%ptr.ed22b9.1)] -// CHECK:STDOUT: %pattern_type.loc9_27: type = pattern_type %ptr.loc9_30.1 [symbolic = %pattern_type.loc9_27 (constants.%pattern_type.e0b9be.1)] -// CHECK:STDOUT: %p.param_patt.loc9_27.2: @Simple4.%pattern_type.loc9_27 (%pattern_type.e0b9be.1) = value_param_pattern [symbolic = %p.param_patt.loc9_27.2 (constants.%p.param_patt.f2a353.1)] -// CHECK:STDOUT: %p.patt.loc9_27.2: @Simple4.%pattern_type.loc9_27 (%pattern_type.e0b9be.1) = at_binding_pattern p, %p.param_patt.loc9_27.2 [symbolic = %p.patt.loc9_27.2 (constants.%p.patt.4967c5.1)] +// CHECK:STDOUT: generic fn @Simple4(%T.loc9_21.2: %L1.type) { +// CHECK:STDOUT: %T.patt.loc9_21.2: %pattern_type.b7b = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_21.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc9_21.1: %L1.type = symbolic_binding T, 0 [symbolic = %T.loc9_21.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc9_30.1: type = facet_access_type %T.loc9_21.1 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type.loc9_28: type = pattern_type %T.as_type.loc9_30.1 [symbolic = %pattern_type.loc9_28 (constants.%pattern_type.5697a7.1)] +// CHECK:STDOUT: %x.param_patt.loc9_28.2: @Simple4.%pattern_type.loc9_28 (%pattern_type.5697a7.1) = value_param_pattern [symbolic = %x.param_patt.loc9_28.2 (constants.%x.param_patt)] +// CHECK:STDOUT: %x.patt.loc9_28.2: @Simple4.%pattern_type.loc9_28 (%pattern_type.5697a7.1) = at_binding_pattern x, %x.param_patt.loc9_28.2 [symbolic = %x.patt.loc9_28.2 (constants.%x.patt)] +// CHECK:STDOUT: %ptr.loc9_37.1: type = ptr_type %T.as_type.loc9_30.1 [symbolic = %ptr.loc9_37.1 (constants.%ptr.ed22b9.1)] +// CHECK:STDOUT: %pattern_type.loc9_34: type = pattern_type %ptr.loc9_37.1 [symbolic = %pattern_type.loc9_34 (constants.%pattern_type.e0b9be.1)] +// CHECK:STDOUT: %p.param_patt.loc9_34.2: @Simple4.%pattern_type.loc9_34 (%pattern_type.e0b9be.1) = value_param_pattern [symbolic = %p.param_patt.loc9_34.2 (constants.%p.param_patt.f2a353.1)] +// CHECK:STDOUT: %p.patt.loc9_34.2: @Simple4.%pattern_type.loc9_34 (%pattern_type.e0b9be.1) = at_binding_pattern p, %p.param_patt.loc9_34.2 [symbolic = %p.patt.loc9_34.2 (constants.%p.patt.4967c5.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc9_21: = 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: = 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_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: = lookup_impl_witness %T.loc9_13.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.cca206.1)] +// CHECK:STDOUT: %require_complete.loc9_28: = require_complete_type %T.as_type.loc9_30.1 [symbolic = %require_complete.loc9_28 (constants.%require_complete.770490.1)] +// CHECK:STDOUT: %require_complete.loc9_34: = require_complete_type %ptr.loc9_37.1 [symbolic = %require_complete.loc9_34 (constants.%require_complete.0d59a1.1)] +// CHECK:STDOUT: %L1.WithSelf.R1.type: type = fn_type @L1.WithSelf.R1, @L1.WithSelf(%T.loc9_21.1) [symbolic = %L1.WithSelf.R1.type (constants.%L1.WithSelf.R1.type.62535e.1)] +// CHECK:STDOUT: %.loc10_4: type = fn_type_with_self_type %L1.WithSelf.R1.type, %T.loc9_21.1 [symbolic = %.loc10_4 (constants.%.56f6e0.1)] +// CHECK:STDOUT: %L1.lookup_impl_witness: = lookup_impl_witness %T.loc9_21.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.cca206.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_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)] +// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @L1.WithSelf.R1(%T.loc9_21.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_21.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_21.1 [symbolic = %.loc11_4.2 (constants.%.b63157.1)] // CHECK:STDOUT: %impl.elem1.loc11_4.2: @Simple4.%.loc11_4.2 (%.b63157.1) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.86bb43.1)] -// CHECK:STDOUT: %specific_impl_fn.loc11_4.2: = specific_impl_function %impl.elem1.loc11_4.2, @L1.WithSelf.S1(%T.loc9_13.1) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.340d61.1)] +// CHECK:STDOUT: %specific_impl_fn.loc11_4.2: = specific_impl_function %impl.elem1.loc11_4.2, @L1.WithSelf.S1(%T.loc9_21.1) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.340d61.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @Simple4.%T.as_type.loc9_23.1 (%T.as_type), %p.param: @Simple4.%ptr.loc9_30.1 (%ptr.ed22b9.1)) { +// CHECK:STDOUT: fn(%x.param: @Simple4.%T.as_type.loc9_30.1 (%T.as_type), %p.param: @Simple4.%ptr.loc9_37.1 (%ptr.ed22b9.1)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @Simple4.%T.as_type.loc9_30.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_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 %x.ref, %impl.elem0.loc10_4.1 -// CHECK:STDOUT: %.loc10_8.1: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_13.1 (constants.%T)] -// CHECK:STDOUT: %.loc10_8.2: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_13.1 (constants.%T)] +// CHECK:STDOUT: %.loc10_8.1: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_21.1 (constants.%T)] +// CHECK:STDOUT: %.loc10_8.2: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_21.1 (constants.%T)] // CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = 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 %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) -// CHECK:STDOUT: %p.ref: @Simple4.%ptr.loc9_30.1 (%ptr.ed22b9.1) = name_ref p, %p -// CHECK:STDOUT: %.loc11_4.1: ref @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = deref %p.ref +// CHECK:STDOUT: %p.ref: @Simple4.%ptr.loc9_37.1 (%ptr.ed22b9.1) = name_ref p, %p +// CHECK:STDOUT: %.loc11_4.1: ref @Simple4.%T.as_type.loc9_30.1 (%T.as_type) = deref %p.ref // 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 %.loc11_4.1, %impl.elem1.loc11_4.1 -// CHECK:STDOUT: %.loc11_9.1: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_13.1 (constants.%T)] -// CHECK:STDOUT: %.loc11_9.2: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_13.1 (constants.%T)] +// CHECK:STDOUT: %.loc11_9.1: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_21.1 (constants.%T)] +// CHECK:STDOUT: %.loc11_9.2: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_21.1 (constants.%T)] // CHECK:STDOUT: %specific_impl_fn.loc11_4.1: = 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 %.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) @@ -1028,51 +1028,51 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Compound4(%V.loc15_15.2: %L1.type) { -// CHECK:STDOUT: %V.patt.loc15_15.2: %pattern_type.b7b = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc15_15.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.loc15_15.1: %L1.type = symbolic_binding V, 0 [symbolic = %V.loc15_15.1 (constants.%V)] -// CHECK:STDOUT: %V.as_type.loc15_25.1: type = facet_access_type %V.loc15_15.1 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)] -// CHECK:STDOUT: %pattern_type.loc15_23: type = pattern_type %V.as_type.loc15_25.1 [symbolic = %pattern_type.loc15_23 (constants.%pattern_type.5697a7.2)] -// CHECK:STDOUT: %y.param_patt.loc15_23.2: @Compound4.%pattern_type.loc15_23 (%pattern_type.5697a7.2) = value_param_pattern [symbolic = %y.param_patt.loc15_23.2 (constants.%y.param_patt)] -// CHECK:STDOUT: %y.patt.loc15_23.2: @Compound4.%pattern_type.loc15_23 (%pattern_type.5697a7.2) = at_binding_pattern y, %y.param_patt.loc15_23.2 [symbolic = %y.patt.loc15_23.2 (constants.%y.patt)] -// CHECK:STDOUT: %ptr.loc15_32.1: type = ptr_type %V.as_type.loc15_25.1 [symbolic = %ptr.loc15_32.1 (constants.%ptr.ed22b9.2)] -// CHECK:STDOUT: %pattern_type.loc15_29: type = pattern_type %ptr.loc15_32.1 [symbolic = %pattern_type.loc15_29 (constants.%pattern_type.e0b9be.2)] -// CHECK:STDOUT: %p.param_patt.loc15_29.2: @Compound4.%pattern_type.loc15_29 (%pattern_type.e0b9be.2) = value_param_pattern [symbolic = %p.param_patt.loc15_29.2 (constants.%p.param_patt.f2a353.2)] -// CHECK:STDOUT: %p.patt.loc15_29.2: @Compound4.%pattern_type.loc15_29 (%pattern_type.e0b9be.2) = at_binding_pattern p, %p.param_patt.loc15_29.2 [symbolic = %p.patt.loc15_29.2 (constants.%p.patt.4967c5.2)] +// CHECK:STDOUT: generic fn @Compound4(%V.loc15_23.2: %L1.type) { +// CHECK:STDOUT: %V.patt.loc15_23.2: %pattern_type.b7b = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc15_23.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.loc15_23.1: %L1.type = symbolic_binding V, 0 [symbolic = %V.loc15_23.1 (constants.%V)] +// CHECK:STDOUT: %V.as_type.loc15_32.1: type = facet_access_type %V.loc15_23.1 [symbolic = %V.as_type.loc15_32.1 (constants.%V.as_type)] +// CHECK:STDOUT: %pattern_type.loc15_30: type = pattern_type %V.as_type.loc15_32.1 [symbolic = %pattern_type.loc15_30 (constants.%pattern_type.5697a7.2)] +// CHECK:STDOUT: %y.param_patt.loc15_30.2: @Compound4.%pattern_type.loc15_30 (%pattern_type.5697a7.2) = value_param_pattern [symbolic = %y.param_patt.loc15_30.2 (constants.%y.param_patt)] +// CHECK:STDOUT: %y.patt.loc15_30.2: @Compound4.%pattern_type.loc15_30 (%pattern_type.5697a7.2) = at_binding_pattern y, %y.param_patt.loc15_30.2 [symbolic = %y.patt.loc15_30.2 (constants.%y.patt)] +// CHECK:STDOUT: %ptr.loc15_39.1: type = ptr_type %V.as_type.loc15_32.1 [symbolic = %ptr.loc15_39.1 (constants.%ptr.ed22b9.2)] +// CHECK:STDOUT: %pattern_type.loc15_36: type = pattern_type %ptr.loc15_39.1 [symbolic = %pattern_type.loc15_36 (constants.%pattern_type.e0b9be.2)] +// CHECK:STDOUT: %p.param_patt.loc15_36.2: @Compound4.%pattern_type.loc15_36 (%pattern_type.e0b9be.2) = value_param_pattern [symbolic = %p.param_patt.loc15_36.2 (constants.%p.param_patt.f2a353.2)] +// CHECK:STDOUT: %p.patt.loc15_36.2: @Compound4.%pattern_type.loc15_36 (%pattern_type.e0b9be.2) = at_binding_pattern p, %p.param_patt.loc15_36.2 [symbolic = %p.patt.loc15_36.2 (constants.%p.patt.4967c5.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc15_23: = 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: = 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_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: = lookup_impl_witness %V.loc15_15.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.cca206.2)] +// CHECK:STDOUT: %require_complete.loc15_30: = require_complete_type %V.as_type.loc15_32.1 [symbolic = %require_complete.loc15_30 (constants.%require_complete.770490.2)] +// CHECK:STDOUT: %require_complete.loc15_36: = require_complete_type %ptr.loc15_39.1 [symbolic = %require_complete.loc15_36 (constants.%require_complete.0d59a1.2)] +// CHECK:STDOUT: %L1.WithSelf.R1.type: type = fn_type @L1.WithSelf.R1, @L1.WithSelf(%V.loc15_23.1) [symbolic = %L1.WithSelf.R1.type (constants.%L1.WithSelf.R1.type.62535e.2)] +// CHECK:STDOUT: %.loc16_4: type = fn_type_with_self_type %L1.WithSelf.R1.type, %V.loc15_23.1 [symbolic = %.loc16_4 (constants.%.56f6e0.2)] +// CHECK:STDOUT: %L1.lookup_impl_witness: = lookup_impl_witness %V.loc15_23.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.cca206.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_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)] +// CHECK:STDOUT: %specific_impl_fn.loc16_4.2: = specific_impl_function %impl.elem0.loc16_4.2, @L1.WithSelf.R1(%V.loc15_23.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_23.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_23.1 [symbolic = %.loc17_4.2 (constants.%.b63157.2)] // CHECK:STDOUT: %impl.elem1.loc17_4.2: @Compound4.%.loc17_4.2 (%.b63157.2) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.86bb43.2)] -// CHECK:STDOUT: %specific_impl_fn.loc17_4.2: = specific_impl_function %impl.elem1.loc17_4.2, @L1.WithSelf.S1(%V.loc15_15.1) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.340d61.2)] +// CHECK:STDOUT: %specific_impl_fn.loc17_4.2: = specific_impl_function %impl.elem1.loc17_4.2, @L1.WithSelf.S1(%V.loc15_23.1) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.340d61.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%y.param: @Compound4.%V.as_type.loc15_25.1 (%V.as_type), %p.param: @Compound4.%ptr.loc15_32.1 (%ptr.ed22b9.2)) { +// CHECK:STDOUT: fn(%y.param: @Compound4.%V.as_type.loc15_32.1 (%V.as_type), %p.param: @Compound4.%ptr.loc15_39.1 (%ptr.ed22b9.2)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %y.ref: @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = name_ref y, %y +// CHECK:STDOUT: %y.ref: @Compound4.%V.as_type.loc15_32.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_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 %y.ref, %impl.elem0.loc16_4.1 -// CHECK:STDOUT: %.loc16_13.1: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_15.1 (constants.%V)] -// CHECK:STDOUT: %.loc16_13.2: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_15.1 (constants.%V)] +// CHECK:STDOUT: %.loc16_13.1: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_23.1 (constants.%V)] +// CHECK:STDOUT: %.loc16_13.2: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_23.1 (constants.%V)] // CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = 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 %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) -// CHECK:STDOUT: %p.ref: @Compound4.%ptr.loc15_32.1 (%ptr.ed22b9.2) = name_ref p, %p +// CHECK:STDOUT: %p.ref: @Compound4.%ptr.loc15_39.1 (%ptr.ed22b9.2) = name_ref p, %p // CHECK:STDOUT: %L1.ref.loc17: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.WithSelf.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %.loc17_4.1: ref @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = deref %p.ref +// CHECK:STDOUT: %.loc17_4.1: ref @Compound4.%V.as_type.loc15_32.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 %.loc17_4.1, %impl.elem1.loc17_4.1 -// CHECK:STDOUT: %.loc17_14.1: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_15.1 (constants.%V)] -// CHECK:STDOUT: %.loc17_14.2: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_15.1 (constants.%V)] +// CHECK:STDOUT: %.loc17_14.1: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_23.1 (constants.%V)] +// CHECK:STDOUT: %.loc17_14.2: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_23.1 (constants.%V)] // CHECK:STDOUT: %specific_impl_fn.loc17_4.1: = 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 %.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) @@ -1108,16 +1108,16 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Simple4(constants.%T) { -// CHECK:STDOUT: %T.patt.loc9_13.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc9_13.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc9_23.1 => constants.%T.as_type -// CHECK:STDOUT: %pattern_type.loc9_21 => constants.%pattern_type.5697a7.1 -// CHECK:STDOUT: %x.param_patt.loc9_21.2 => constants.%x.param_patt -// CHECK:STDOUT: %x.patt.loc9_21.2 => constants.%x.patt -// CHECK:STDOUT: %ptr.loc9_30.1 => constants.%ptr.ed22b9.1 -// CHECK:STDOUT: %pattern_type.loc9_27 => constants.%pattern_type.e0b9be.1 -// CHECK:STDOUT: %p.param_patt.loc9_27.2 => constants.%p.param_patt.f2a353.1 -// CHECK:STDOUT: %p.patt.loc9_27.2 => constants.%p.patt.4967c5.1 +// CHECK:STDOUT: %T.patt.loc9_21.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc9_21.1 => constants.%T +// CHECK:STDOUT: %T.as_type.loc9_30.1 => constants.%T.as_type +// CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.5697a7.1 +// CHECK:STDOUT: %x.param_patt.loc9_28.2 => constants.%x.param_patt +// CHECK:STDOUT: %x.patt.loc9_28.2 => constants.%x.patt +// CHECK:STDOUT: %ptr.loc9_37.1 => constants.%ptr.ed22b9.1 +// CHECK:STDOUT: %pattern_type.loc9_34 => constants.%pattern_type.e0b9be.1 +// CHECK:STDOUT: %p.param_patt.loc9_34.2 => constants.%p.param_patt.f2a353.1 +// CHECK:STDOUT: %p.patt.loc9_34.2 => constants.%p.patt.4967c5.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @L1.WithSelf(constants.%T) { @@ -1146,16 +1146,16 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Compound4(constants.%V) { -// CHECK:STDOUT: %V.patt.loc15_15.2 => constants.%V.patt -// CHECK:STDOUT: %V.loc15_15.1 => constants.%V -// CHECK:STDOUT: %V.as_type.loc15_25.1 => constants.%V.as_type -// CHECK:STDOUT: %pattern_type.loc15_23 => constants.%pattern_type.5697a7.2 -// CHECK:STDOUT: %y.param_patt.loc15_23.2 => constants.%y.param_patt -// CHECK:STDOUT: %y.patt.loc15_23.2 => constants.%y.patt -// CHECK:STDOUT: %ptr.loc15_32.1 => constants.%ptr.ed22b9.2 -// CHECK:STDOUT: %pattern_type.loc15_29 => constants.%pattern_type.e0b9be.2 -// CHECK:STDOUT: %p.param_patt.loc15_29.2 => constants.%p.param_patt.f2a353.2 -// CHECK:STDOUT: %p.patt.loc15_29.2 => constants.%p.patt.4967c5.2 +// CHECK:STDOUT: %V.patt.loc15_23.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc15_23.1 => constants.%V +// CHECK:STDOUT: %V.as_type.loc15_32.1 => constants.%V.as_type +// CHECK:STDOUT: %pattern_type.loc15_30 => constants.%pattern_type.5697a7.2 +// CHECK:STDOUT: %y.param_patt.loc15_30.2 => constants.%y.param_patt +// CHECK:STDOUT: %y.patt.loc15_30.2 => constants.%y.patt +// CHECK:STDOUT: %ptr.loc15_39.1 => constants.%ptr.ed22b9.2 +// CHECK:STDOUT: %pattern_type.loc15_36 => constants.%pattern_type.e0b9be.2 +// CHECK:STDOUT: %p.param_patt.loc15_36.2 => constants.%p.param_patt.f2a353.2 +// CHECK:STDOUT: %p.patt.loc15_36.2 => constants.%p.patt.4967c5.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @L1.WithSelf(constants.%V) { @@ -1241,22 +1241,22 @@ fn Works() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %L2.decl: type = interface_decl @L2 [concrete = constants.%L2.type] {} {} // CHECK:STDOUT: %Simple5.decl: %Simple5.type = fn_decl @Simple5 [concrete = constants.%Simple5] { -// CHECK:STDOUT: %T.patt.loc10_13.1: %pattern_type.5b3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_13.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc10_21.1: %pattern_type.5b3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_21.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc10: type = splice_block %L2.ref [concrete = constants.%L2.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %L2.ref: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc10_13.2: %L2.type = symbolic_binding T, 0 [symbolic = %T.loc10_13.1 (constants.%T)] +// CHECK:STDOUT: %T.loc10_21.2: %L2.type = symbolic_binding T, 0 [symbolic = %T.loc10_21.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %Compound5.decl: %Compound5.type = fn_decl @Compound5 [concrete = constants.%Compound5] { -// CHECK:STDOUT: %V.patt.loc30_15.1: %pattern_type.5b3 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc30_15.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.patt.loc30_23.1: %pattern_type.5b3 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc30_23.2 (constants.%V.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc30: type = splice_block %L2.ref.loc30 [concrete = constants.%L2.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %L2.ref.loc30: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %V.loc30_15.2: %L2.type = symbolic_binding V, 0 [symbolic = %V.loc30_15.1 (constants.%V)] +// CHECK:STDOUT: %V.loc30_23.2: %L2.type = symbolic_binding V, 0 [symbolic = %V.loc30_23.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1323,28 +1323,28 @@ fn Works() { // 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) { -// CHECK:STDOUT: %T.patt.loc10_13.2: %pattern_type.5b3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc10_13.1: %L2.type = symbolic_binding T, 0 [symbolic = %T.loc10_13.1 (constants.%T)] +// CHECK:STDOUT: generic fn @Simple5(%T.loc10_21.2: %L2.type) { +// CHECK:STDOUT: %T.patt.loc10_21.2: %pattern_type.5b3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_21.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc10_21.1: %L2.type = symbolic_binding T, 0 [symbolic = %T.loc10_21.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc18_4.2: type = facet_access_type %T.loc10_13.1 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %L2.WithSelf.R2.type: type = fn_type @L2.WithSelf.R2, @L2.WithSelf(%T.loc10_13.1) [symbolic = %L2.WithSelf.R2.type (constants.%L2.WithSelf.R2.type.1a9)] -// 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: = lookup_impl_witness %T.loc10_13.1, @L2 [symbolic = %L2.lookup_impl_witness (constants.%L2.lookup_impl_witness.d84)] +// CHECK:STDOUT: %T.as_type.loc18_4.2: type = facet_access_type %T.loc10_21.1 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)] +// CHECK:STDOUT: %L2.WithSelf.R2.type: type = fn_type @L2.WithSelf.R2, @L2.WithSelf(%T.loc10_21.1) [symbolic = %L2.WithSelf.R2.type (constants.%L2.WithSelf.R2.type.1a9)] +// CHECK:STDOUT: %.loc18_4.2: type = fn_type_with_self_type %L2.WithSelf.R2.type, %T.loc10_21.1 [symbolic = %.loc18_4.2 (constants.%.244)] +// CHECK:STDOUT: %L2.lookup_impl_witness: = lookup_impl_witness %T.loc10_21.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: %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: %L2.WithSelf.S2.type: type = fn_type @L2.WithSelf.S2, @L2.WithSelf(%T.loc10_21.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_21.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: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref.loc18: %L2.type = name_ref T, %T.loc10_13.2 [symbolic = %T.loc10_13.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc18: %L2.type = name_ref T, %T.loc10_21.2 [symbolic = %T.loc10_21.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc18_4.1: type = facet_access_type %T.ref.loc18 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)] // 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: %T.ref.loc26: %L2.type = name_ref T, %T.loc10_13.2 [symbolic = %T.loc10_13.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc26: %L2.type = name_ref T, %T.loc10_21.2 [symbolic = %T.loc10_21.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] @@ -1355,18 +1355,18 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Compound5(%V.loc30_15.2: %L2.type) { -// CHECK:STDOUT: %V.patt.loc30_15.2: %pattern_type.5b3 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc30_15.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.loc30_15.1: %L2.type = symbolic_binding V, 0 [symbolic = %V.loc30_15.1 (constants.%V)] +// CHECK:STDOUT: generic fn @Compound5(%V.loc30_23.2: %L2.type) { +// CHECK:STDOUT: %V.patt.loc30_23.2: %pattern_type.5b3 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc30_23.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.loc30_23.1: %L2.type = symbolic_binding V, 0 [symbolic = %V.loc30_23.1 (constants.%V)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %V.ref.loc35: %L2.type = name_ref V, %V.loc30_15.2 [symbolic = %V.loc30_15.1 (constants.%V)] +// CHECK:STDOUT: %V.ref.loc35: %L2.type = name_ref V, %V.loc30_23.2 [symbolic = %V.loc30_23.1 (constants.%V)] // CHECK:STDOUT: %L2.ref.loc35: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type] // CHECK:STDOUT: %R2.ref: %L2.assoc_type = name_ref R2, @L2.WithSelf.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %V.ref.loc40: %L2.type = name_ref V, %V.loc30_15.2 [symbolic = %V.loc30_15.1 (constants.%V)] +// CHECK:STDOUT: %V.ref.loc40: %L2.type = name_ref V, %V.loc30_23.2 [symbolic = %V.loc30_23.1 (constants.%V)] // CHECK:STDOUT: %L2.ref.loc40: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type] // CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.WithSelf.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: return @@ -1401,8 +1401,8 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Simple5(constants.%T) { -// CHECK:STDOUT: %T.patt.loc10_13.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc10_13.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc10_21.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc10_21.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @L2.WithSelf(constants.%T) { @@ -1415,8 +1415,8 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Compound5(constants.%V) { -// CHECK:STDOUT: %V.patt.loc30_15.2 => constants.%V.patt -// CHECK:STDOUT: %V.loc30_15.1 => constants.%V +// CHECK:STDOUT: %V.patt.loc30_23.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc30_23.1 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_combine_non_instance.carbon diff --git a/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon b/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon index 07a78fea944d..8a70a577b64a 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; } interface J { @@ -30,12 +30,12 @@ interface J { library "[[@TEST_NAME]]"; interface I2 { - let T2:! type; + let T2: type; } interface J2; -impl forall [V:! J2] V as I2 where .T2 = () {} +impl forall [V: J2] V as I2 where .T2 = () {} //@dump-sem-ir-begin interface J2 { diff --git a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon index 50bdd8610f06..972223ec439e 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon @@ -14,13 +14,13 @@ interface I { // CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet] - // CHECK:STDERR: let T:! type = 42; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: let T: type = 42; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+4]]:3: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] - // CHECK:STDERR: let T:! type = 42; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: let T: type = 42; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: - let T:! type = 42; + let T: type = 42; } // CHECK:STDOUT: --- fail_assoc_const_bad_default.carbon diff --git a/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon b/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon index 34b47d4c395e..a0a7e4a42e5a 100644 --- a/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon @@ -20,7 +20,7 @@ interface I { fn F(self); } -fn Use(T:! I) { +fn Use(generic T: I) { // CHECK:STDERR: fail_member_access.carbon:[[@LINE+4]]:3: error: type `` does not support qualified expressions [QualifiedExprUnsupported] // CHECK:STDERR: T.F.member; // CHECK:STDERR: ^~~~~~~~~~ @@ -65,13 +65,13 @@ fn Use(T:! I) { // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: %Use.decl: %Use.type = fn_decl @Use [concrete = constants.%Use] { -// CHECK:STDOUT: %T.patt.loc8_9.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc8_17.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_17.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc8: type = splice_block %I.ref [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_9.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc8_9.1 (constants.%T)] +// CHECK:STDOUT: %T.loc8_17.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc8_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -114,21 +114,21 @@ fn Use(T:! I) { // 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) { -// CHECK:STDOUT: %T.patt.loc8_9.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_9.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc8_9.1 (constants.%T)] +// CHECK:STDOUT: generic fn @Use(%T.loc8_17.2: %I.type) { +// CHECK:STDOUT: %T.patt.loc8_17.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_17.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc8_17.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc8_17.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc13_4.2: type = facet_access_type %T.loc8_9.1 [symbolic = %T.as_type.loc13_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I.WithSelf(%T.loc8_9.1) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.418)] -// CHECK:STDOUT: %.loc13_4.2: type = fn_type_with_self_type %I.WithSelf.F.type, %T.loc8_9.1 [symbolic = %.loc13_4.2 (constants.%.81d)] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_9.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %T.as_type.loc13_4.2: type = facet_access_type %T.loc8_17.1 [symbolic = %T.as_type.loc13_4.2 (constants.%T.as_type)] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I.WithSelf(%T.loc8_17.1) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.418)] +// CHECK:STDOUT: %.loc13_4.2: type = fn_type_with_self_type %I.WithSelf.F.type, %T.loc8_17.1 [symbolic = %.loc13_4.2 (constants.%.81d)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_17.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc13_4.2: @Use.%.loc13_4.2 (%.81d) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %require_complete: = require_complete_type %.loc13_4.2 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc8_9.2 [symbolic = %T.loc8_9.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc8_17.2 [symbolic = %T.loc8_17.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc13_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc13_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc13_4.1: type = converted %T.ref, %T.as_type.loc13_4.1 [symbolic = %T.as_type.loc13_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.WithSelf.%assoc0 [concrete = constants.%assoc0] @@ -155,8 +155,8 @@ fn Use(T:! I) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Use(constants.%T) { -// CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_9.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc8_17.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc8_17.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T) { diff --git a/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon b/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon index e1c19255f951..c4b03487d9c5 100644 --- a/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon @@ -14,33 +14,33 @@ interface NotGeneric; // CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter list [RedeclParamListDiffers] -// CHECK:STDERR: interface NotGeneric(T:! type) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: interface NotGeneric(T: type) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: note: previously declared without parameter list [RedeclParamListPrevious] // CHECK:STDERR: interface NotGeneric; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -interface NotGeneric(T:! type) {} +interface NotGeneric(T: type) {} -interface Generic(T:! type); +interface Generic(T: type); // CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error: redeclaration differs because of missing parameter list [RedeclParamListDiffers] // CHECK:STDERR: interface Generic {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: note: previously declared with parameter list [RedeclParamListPrevious] -// CHECK:STDERR: interface Generic(T:! type); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: interface Generic(T: type); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: interface Generic {} -interface DifferentParams(T:! type); +interface DifferentParams(T: type); // CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:27: error: type `` of parameter 1 in redeclaration differs from previous parameter type `` [RedeclParamDiffersType] -// CHECK:STDERR: interface DifferentParams(T:! ()) {} -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: interface DifferentParams(T: ()) {} +// CHECK:STDERR: ^~~~~ // CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:27: note: previous declaration's corresponding parameter here [RedeclParamPrevious] -// CHECK:STDERR: interface DifferentParams(T:! type); -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: interface DifferentParams(T: type); +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -interface DifferentParams(T:! ()) {} +interface DifferentParams(T: ()) {} // CHECK:STDOUT: --- fail_generic_redeclaration.carbon // CHECK:STDOUT: @@ -82,18 +82,18 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %NotGeneric.decl.loc23: %NotGeneric.type.fec = interface_decl @NotGeneric.loc23 [concrete = constants.%NotGeneric.generic] { // CHECK:STDOUT: %T.patt.loc23_23.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc23_23.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc23_26.1: type = splice_block %.loc23_26.2 [concrete = type] { +// CHECK:STDOUT: %.loc23_25.1: type = splice_block %.loc23_25.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc23_26.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc23_25.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc23_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc23_23.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %Generic.decl.loc25: %Generic.type.30d = interface_decl @Generic.loc25 [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt.loc25_20.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_20.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc25_23.1: type = splice_block %.loc25_23.2 [concrete = type] { +// CHECK:STDOUT: %.loc25_22.1: type = splice_block %.loc25_22.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc25_23.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc25_22.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc25_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc25_20.1 (constants.%T.67d)] // CHECK:STDOUT: } @@ -101,19 +101,19 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %DifferentParams.decl.loc35: %DifferentParams.type.998819.1 = interface_decl @DifferentParams.loc35 [concrete = constants.%DifferentParams.generic.54c122.1] { // CHECK:STDOUT: %T.patt.loc35_28.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc35_28.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc35_31.1: type = splice_block %.loc35_31.2 [concrete = type] { +// CHECK:STDOUT: %.loc35_30.1: type = splice_block %.loc35_30.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc35_31.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc35_30.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc35_28.2: type = symbolic_binding T, 0 [symbolic = %T.loc35_28.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %DifferentParams.decl.loc43: %DifferentParams.type.998819.2 = interface_decl @DifferentParams.loc43 [concrete = constants.%DifferentParams.generic.54c122.2] { // CHECK:STDOUT: %T.patt.loc43_28.1: %pattern_type.cb1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc43_28.2 (constants.%T.patt.8f8)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc43_32.1: type = splice_block %.loc43_32.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc43_31.1: type = splice_block %.loc43_31.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc43_32.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc43_32.3: type = converted %.loc43_32.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc43_31.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc43_31.3: type = converted %.loc43_31.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc43_28.2: %empty_tuple.type = symbolic_binding T, 0 [symbolic = %T.loc43_28.1 (constants.%T.d5f)] // CHECK:STDOUT: } @@ -127,14 +127,14 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %NotGeneric.type: type = facet_type <@NotGeneric.loc23, @NotGeneric.loc23(%T.loc23_23.1)> [symbolic = %NotGeneric.type (constants.%NotGeneric.type.e75)] -// CHECK:STDOUT: %Self.loc23_32.2: @NotGeneric.loc23.%NotGeneric.type (%NotGeneric.type.e75) = symbolic_binding Self, 1 [symbolic = %Self.loc23_32.2 (constants.%Self.b8f)] +// CHECK:STDOUT: %Self.loc23_31.2: @NotGeneric.loc23.%NotGeneric.type (%NotGeneric.type.e75) = symbolic_binding Self, 1 [symbolic = %Self.loc23_31.2 (constants.%Self.b8f)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc23_32.1: @NotGeneric.loc23.%NotGeneric.type (%NotGeneric.type.e75) = symbolic_binding Self, 1 [symbolic = %Self.loc23_32.2 (constants.%Self.b8f)] +// CHECK:STDOUT: %Self.loc23_31.1: @NotGeneric.loc23.%NotGeneric.type (%NotGeneric.type.e75) = symbolic_binding Self, 1 [symbolic = %Self.loc23_31.2 (constants.%Self.b8f)] // CHECK:STDOUT: %NotGeneric.WithSelf.decl = interface_with_self_decl @NotGeneric.loc23 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc23_32.1 +// CHECK:STDOUT: .Self = %Self.loc23_31.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -176,14 +176,14 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %DifferentParams.type: type = facet_type <@DifferentParams.loc43, @DifferentParams.loc43(%T.loc43_28.1)> [symbolic = %DifferentParams.type (constants.%DifferentParams.type.7d4)] -// CHECK:STDOUT: %Self.loc43_35.2: @DifferentParams.loc43.%DifferentParams.type (%DifferentParams.type.7d4) = symbolic_binding Self, 1 [symbolic = %Self.loc43_35.2 (constants.%Self.a37)] +// CHECK:STDOUT: %Self.loc43_34.2: @DifferentParams.loc43.%DifferentParams.type (%DifferentParams.type.7d4) = symbolic_binding Self, 1 [symbolic = %Self.loc43_34.2 (constants.%Self.a37)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc43_35.1: @DifferentParams.loc43.%DifferentParams.type (%DifferentParams.type.7d4) = symbolic_binding Self, 1 [symbolic = %Self.loc43_35.2 (constants.%Self.a37)] +// CHECK:STDOUT: %Self.loc43_34.1: @DifferentParams.loc43.%DifferentParams.type (%DifferentParams.type.7d4) = symbolic_binding Self, 1 [symbolic = %Self.loc43_34.2 (constants.%Self.a37)] // CHECK:STDOUT: %DifferentParams.WithSelf.decl = interface_with_self_decl @DifferentParams.loc43 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc43_35.1 +// CHECK:STDOUT: .Self = %Self.loc43_34.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: diff --git a/toolchain/check/testdata/interface/fail_member_lookup.carbon b/toolchain/check/testdata/interface/fail_member_lookup.carbon index 6ea1751f7bf6..6c5166231d29 100644 --- a/toolchain/check/testdata/interface/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/fail_member_lookup.carbon @@ -18,7 +18,7 @@ library "[[@TEST_NAME]]"; interface Interface { fn F(); - let T:! type; + let T: type; } fn F() { @@ -40,11 +40,11 @@ fn F() { interface Different {} -// CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:24: error: cannot convert type `U` that implements `Different` into type implementing `Interface` [ConversionFailureFacetToFacet] -// CHECK:STDERR: fn G(U:! Different) -> U.(Interface.T); -// CHECK:STDERR: ^~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:31: error: cannot convert type `U` that implements `Different` into type implementing `Interface` [ConversionFailureFacetToFacet] +// CHECK:STDERR: fn G(generic U: Different) -> U.(Interface.T); +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -fn G(U:! Different) -> U.(Interface.T); +fn G(generic U: Different) -> U.(Interface.T); // CHECK:STDOUT: --- fail_member_lookup.carbon // CHECK:STDOUT: @@ -97,18 +97,18 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: %Different.decl: type = interface_decl @Different [concrete = constants.%Different.type] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %U.patt.loc32_7.1: %pattern_type.776 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc32_7.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc32_15.1: %pattern_type.776 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc32_15.2 (constants.%U.patt)] // CHECK:STDOUT: %return.patt: = return_slot_pattern , [concrete = ] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref: %Different.type = name_ref U, %U.loc32_7.2 [symbolic = %U.loc32_7.1 (constants.%U)] +// CHECK:STDOUT: %U.ref: %Different.type = name_ref U, %U.loc32_15.2 [symbolic = %U.loc32_15.1 (constants.%U)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] // CHECK:STDOUT: %T.ref: %Interface.assoc_type = name_ref T, @T.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %U.as_type.loc32_25.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc32_25.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.as_type.loc32_32.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc32_32.1 (constants.%U.as_type)] // CHECK:STDOUT: %.loc32: type = splice_block %Different.ref [concrete = constants.%Different.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Different.ref: type = name_ref Different, file.%Different.decl [concrete = constants.%Different.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc32_7.2: %Different.type = symbolic_binding U, 0 [symbolic = %U.loc32_7.1 (constants.%U)] +// CHECK:STDOUT: %U.loc32_15.2: %Different.type = symbolic_binding U, 0 [symbolic = %U.loc32_15.1 (constants.%U)] // CHECK:STDOUT: %return: = return_slot // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -173,10 +173,10 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%U.loc32_7.2: %Different.type) { -// CHECK:STDOUT: %U.patt.loc32_7.2: %pattern_type.776 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc32_7.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc32_7.1: %Different.type = symbolic_binding U, 0 [symbolic = %U.loc32_7.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc32_25.1: type = facet_access_type %U.loc32_7.1 [symbolic = %U.as_type.loc32_25.1 (constants.%U.as_type)] +// CHECK:STDOUT: generic fn @G(%U.loc32_15.2: %Different.type) { +// CHECK:STDOUT: %U.patt.loc32_15.2: %pattern_type.776 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc32_15.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc32_15.1: %Different.type = symbolic_binding U, 0 [symbolic = %U.loc32_15.1 (constants.%U)] +// CHECK:STDOUT: %U.as_type.loc32_32.1: type = facet_access_type %U.loc32_15.1 [symbolic = %U.as_type.loc32_32.1 (constants.%U.as_type)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> ; // CHECK:STDOUT: } @@ -195,8 +195,8 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%U) { -// CHECK:STDOUT: %U.patt.loc32_7.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc32_7.1 => constants.%U -// CHECK:STDOUT: %U.as_type.loc32_25.1 => constants.%U.as_type +// CHECK:STDOUT: %U.patt.loc32_15.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc32_15.1 => constants.%U +// CHECK:STDOUT: %U.as_type.loc32_32.1 => constants.%U.as_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon index 1b8bd50c9e24..8dc679f76f62 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -14,15 +14,15 @@ interface I { // CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo] - // CHECK:STDERR: default let T:! type = (i32, i32); + // CHECK:STDERR: default let T: type = (i32, i32); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - default let T:! type = (i32, i32); + default let T: type = (i32, i32); // CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo] - // CHECK:STDERR: default let N:! i32 = 42; + // CHECK:STDERR: default let N: i32 = 42; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - default let N:! i32 = 42; + default let N: i32 = 42; } // CHECK:STDOUT: --- fail_todo_assoc_const_default.carbon @@ -88,21 +88,21 @@ interface I { // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.WithSelf.%T [concrete = constants.%assoc0.2ce] -// CHECK:STDOUT: %i32.loc20_27: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %i32.loc20_32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc20_35: %tuple.type.24b = tuple_literal (%i32.loc20_27, %i32.loc20_32) [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc20_36: type = converted %.loc20_35, constants.%tuple.type.e55 [concrete = constants.%tuple.type.e55] +// CHECK:STDOUT: %i32.loc20_26: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %i32.loc20_31: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc20_34: %tuple.type.24b = tuple_literal (%i32.loc20_26, %i32.loc20_31) [concrete = constants.%tuple] +// CHECK:STDOUT: %.loc20_35: type = converted %.loc20_34, constants.%tuple.type.e55 [concrete = constants.%tuple.type.e55] // CHECK:STDOUT: } // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] { // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.WithSelf.%N [concrete = constants.%assoc1] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] -// CHECK:STDOUT: %bound_method.loc25_27.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] +// CHECK:STDOUT: %bound_method.loc25_26.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc25_27.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc25_27.2(%int_42) [concrete = constants.%int_42.ac4] -// CHECK:STDOUT: %.loc25_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_42.ac4] -// CHECK:STDOUT: %.loc25_27.2: %i32 = converted %int_42, %.loc25_27.1 [concrete = constants.%int_42.ac4] +// CHECK:STDOUT: %bound_method.loc25_26.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc25_26.2(%int_42) [concrete = constants.%int_42.ac4] +// CHECK:STDOUT: %.loc25_26.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_42.ac4] +// CHECK:STDOUT: %.loc25_26.2: %i32 = converted %int_42, %.loc25_26.1 [concrete = constants.%int_42.ac4] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index 7a136805fa3c..b5d214275cdb 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -42,17 +42,17 @@ library "dependent_return_type.carbon"; interface Interface { // TODO: This should be - // default fn F(self, U:! type, u: U*) -> U*; + // default fn F(self, generic 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, U:! type, u: U*) -> U*; + fn F(self, generic U: type, u: U*) -> U*; } } // TODO: This should be -// fn Interface.F(self, U:! type, u: U*) -> U* { return u; } -fn Interface.C.F(unused self, U:! type, u: U*) -> U* { return u; } +// fn Interface.F(self, generic U: type, u: U*) -> U* { return u; } +fn Interface.C.F(unused self, generic U: type, u: U*) -> U* { return u; } // CHECK:STDOUT: --- fail_todo_define_default_fn_out_of_line.carbon @@ -238,33 +238,33 @@ fn Interface.C.F(unused self, U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: %self.param_patt.loc20: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = value_param_pattern [symbolic = %self.param_patt.loc14 (constants.%self.param_patt.f45)] // CHECK:STDOUT: %self.patt.loc20: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = at_binding_pattern self, %self.param_patt.loc20 [symbolic = %self.patt.loc14 (constants.%self.patt.134)] // CHECK:STDOUT: %U.patt.loc20: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc14 (constants.%U.patt.014)] -// CHECK:STDOUT: %u.param_patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = value_param_pattern [symbolic = %u.param_patt.loc14 (constants.%u.param_patt)] -// CHECK:STDOUT: %u.patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = at_binding_pattern u, %u.param_patt.loc20 [symbolic = %u.patt.loc14 (constants.%u.patt)] -// CHECK:STDOUT: %return.param_patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc14 (constants.%return.param_patt.534)] -// CHECK:STDOUT: %return.patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = return_slot_pattern %return.param_patt.loc20, %ptr.loc20_52 [symbolic = %return.patt.loc14 (constants.%return.patt.669)] +// CHECK:STDOUT: %u.param_patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = value_param_pattern [symbolic = %u.param_patt.loc14 (constants.%u.param_patt)] +// CHECK:STDOUT: %u.patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = at_binding_pattern u, %u.param_patt.loc20 [symbolic = %u.patt.loc14 (constants.%u.patt)] +// CHECK:STDOUT: %return.param_patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc14 (constants.%return.param_patt.534)] +// CHECK:STDOUT: %return.patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = return_slot_pattern %return.param_patt.loc20, %ptr.loc20_59 [symbolic = %return.patt.loc14 (constants.%return.patt.669)] // CHECK:STDOUT: } { -// 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: %U.ref.loc20_58: type = name_ref U, %U.loc20 [symbolic = %U.loc14_25.1 (constants.%U.091)] +// CHECK:STDOUT: %ptr.loc20_59: type = ptr_type %U.ref.loc20_58 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)] +// CHECK:STDOUT: %.loc20_59: Core.Form = init_form %ptr.loc20_59 [symbolic = %.loc14_44.1 (constants.%.6d8)] // CHECK:STDOUT: %self.param.loc20: @C.F.%C (%C) = value_param call_param0 // 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) = wrapper_binding self, %self.param.loc20 -// CHECK:STDOUT: %.loc20_35.1: type = splice_block %.loc20_35.2 [concrete = type] { +// CHECK:STDOUT: %.loc20_42.1: type = splice_block %.loc20_42.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc20: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc20_35.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc20_42.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// 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: %U.loc20: type = symbolic_binding U, 1 [symbolic = %U.loc14_25.1 (constants.%U.091)] +// CHECK:STDOUT: %u.param.loc20: @C.F.%ptr.loc14_37.1 (%ptr.18e) = value_param call_param1 +// CHECK:STDOUT: %.loc20_52: type = splice_block %ptr.loc20_52 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)] { +// CHECK:STDOUT: %U.ref.loc20_51: type = name_ref U, %U.loc20 [symbolic = %U.loc14_25.1 (constants.%U.091)] +// CHECK:STDOUT: %ptr.loc20_52: type = ptr_type %U.ref.loc20_51 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u.loc20: @C.F.%ptr.loc14_30.1 (%ptr.18e) = wrapper_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: %u.loc20: @C.F.%ptr.loc14_37.1 (%ptr.18e) = wrapper_binding u, %u.param.loc20 +// CHECK:STDOUT: %return.param.loc20: ref @C.F.%ptr.loc14_37.1 (%ptr.18e) = out_param call_param2 +// CHECK:STDOUT: %return.loc20: ref @C.F.%ptr.loc14_37.1 (%ptr.18e) = return_slot %return.param.loc20 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -296,33 +296,33 @@ fn Interface.C.F(unused self, U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: %self.param_patt.loc20: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = value_param_pattern [symbolic = %self.param_patt.loc14 (constants.%self.param_patt.f45)] // CHECK:STDOUT: %self.patt.loc20: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = at_binding_pattern self, %self.param_patt.loc20 [symbolic = %self.patt.loc14 (constants.%self.patt.134)] // CHECK:STDOUT: %U.patt.loc20: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc14 (constants.%U.patt.014)] -// CHECK:STDOUT: %u.param_patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = value_param_pattern [symbolic = %u.param_patt.loc14 (constants.%u.param_patt)] -// CHECK:STDOUT: %u.patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = at_binding_pattern u, %u.param_patt.loc20 [symbolic = %u.patt.loc14 (constants.%u.patt)] -// CHECK:STDOUT: %return.param_patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc14 (constants.%return.param_patt.534)] -// CHECK:STDOUT: %return.patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = return_slot_pattern %return.param_patt.loc20, %ptr.loc20_52 [symbolic = %return.patt.loc14 (constants.%return.patt.669)] +// CHECK:STDOUT: %u.param_patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = value_param_pattern [symbolic = %u.param_patt.loc14 (constants.%u.param_patt)] +// CHECK:STDOUT: %u.patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = at_binding_pattern u, %u.param_patt.loc20 [symbolic = %u.patt.loc14 (constants.%u.patt)] +// CHECK:STDOUT: %return.param_patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc14 (constants.%return.param_patt.534)] +// CHECK:STDOUT: %return.patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = return_slot_pattern %return.param_patt.loc20, %ptr.loc20_59 [symbolic = %return.patt.loc14 (constants.%return.patt.669)] // CHECK:STDOUT: } { -// 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: %U.ref.loc14_43: type = name_ref U, %U.loc14_25.2 [symbolic = %U.loc14_25.1 (constants.%U.091)] +// CHECK:STDOUT: %ptr.loc14_44: type = ptr_type %U.ref.loc14_43 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)] +// CHECK:STDOUT: %.loc14_44.2: Core.Form = init_form %ptr.loc14_44 [symbolic = %.loc14_44.1 (constants.%.6d8)] // CHECK:STDOUT: %self.param.loc14: @C.F.%C (%C) = value_param call_param0 // 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) = wrapper_binding self, %self.param.loc14 -// CHECK:STDOUT: %.loc14_20.1: type = splice_block %.loc14_20.2 [concrete = type] { +// CHECK:STDOUT: %.loc14_27.1: type = splice_block %.loc14_27.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc14_20.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc14_27.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// 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: %U.loc14_25.2: type = symbolic_binding U, 1 [symbolic = %U.loc14_25.1 (constants.%U.091)] +// CHECK:STDOUT: %u.param.loc14: @C.F.%ptr.loc14_37.1 (%ptr.18e) = value_param call_param1 +// CHECK:STDOUT: %.loc14_37: type = splice_block %ptr.loc14_37.2 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)] { +// CHECK:STDOUT: %U.ref.loc14_36: type = name_ref U, %U.loc14_25.2 [symbolic = %U.loc14_25.1 (constants.%U.091)] +// CHECK:STDOUT: %ptr.loc14_37.2: type = ptr_type %U.ref.loc14_36 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u.loc14: @C.F.%ptr.loc14_30.1 (%ptr.18e) = wrapper_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: %u.loc14: @C.F.%ptr.loc14_37.1 (%ptr.18e) = wrapper_binding u, %u.param.loc14 +// CHECK:STDOUT: %return.param.loc14: ref @C.F.%ptr.loc14_37.1 (%ptr.18e) = out_param call_param2 +// CHECK:STDOUT: %return.loc14: ref @C.F.%ptr.loc14_37.1 (%ptr.18e) = return_slot %return.param.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -333,45 +333,45 @@ fn Interface.C.F(unused 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_17.2: type) { +// CHECK:STDOUT: generic fn @C.F(@Interface.%Self: %Interface.type, %U.loc14_25.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_10: type = pattern_type %C [symbolic = %pattern_type.loc14_10 (constants.%pattern_type.f25)] // CHECK:STDOUT: %self.param_patt.loc14: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = value_param_pattern [symbolic = %self.param_patt.loc14 (constants.%self.param_patt.f45)] // CHECK:STDOUT: %self.patt.loc14: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = at_binding_pattern self, %self.param_patt.loc14 [symbolic = %self.patt.loc14 (constants.%self.patt.134)] // CHECK:STDOUT: %U.patt.loc14: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc14 (constants.%U.patt.014)] -// 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: %u.param_patt.loc14: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = value_param_pattern [symbolic = %u.param_patt.loc14 (constants.%u.param_patt)] -// CHECK:STDOUT: %u.patt.loc14: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = at_binding_pattern u, %u.param_patt.loc14 [symbolic = %u.patt.loc14 (constants.%u.patt)] -// CHECK:STDOUT: %.loc14_37.1: Core.Form = init_form %ptr.loc14_30.1 [symbolic = %.loc14_37.1 (constants.%.6d8)] -// CHECK:STDOUT: %return.param_patt.loc14: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc14 (constants.%return.param_patt.534)] -// CHECK:STDOUT: %return.patt.loc14: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = return_slot_pattern %return.param_patt.loc14, %ptr.loc14_30.1 [symbolic = %return.patt.loc14 (constants.%return.patt.669)] +// CHECK:STDOUT: %U.loc14_25.1: type = symbolic_binding U, 1 [symbolic = %U.loc14_25.1 (constants.%U.091)] +// CHECK:STDOUT: %ptr.loc14_37.1: type = ptr_type %U.loc14_25.1 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)] +// CHECK:STDOUT: %pattern_type.loc14_34: type = pattern_type %ptr.loc14_37.1 [symbolic = %pattern_type.loc14_34 (constants.%pattern_type.423)] +// CHECK:STDOUT: %u.param_patt.loc14: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = value_param_pattern [symbolic = %u.param_patt.loc14 (constants.%u.param_patt)] +// CHECK:STDOUT: %u.patt.loc14: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = at_binding_pattern u, %u.param_patt.loc14 [symbolic = %u.patt.loc14 (constants.%u.patt)] +// CHECK:STDOUT: %.loc14_44.1: Core.Form = init_form %ptr.loc14_37.1 [symbolic = %.loc14_44.1 (constants.%.6d8)] +// CHECK:STDOUT: %return.param_patt.loc14: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc14 (constants.%return.param_patt.534)] +// CHECK:STDOUT: %return.patt.loc14: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = return_slot_pattern %return.param_patt.loc14, %ptr.loc14_37.1 [symbolic = %return.patt.loc14 (constants.%return.patt.669)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc20_25: = require_complete_type %C [symbolic = %require_complete.loc20_25 (constants.%require_complete.f37)] -// CHECK:STDOUT: %require_complete.loc20_42: = require_complete_type %ptr.loc14_30.1 [symbolic = %require_complete.loc20_42 (constants.%require_complete.56d)] -// CHECK:STDOUT: %.loc20_63.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc14_17.1) [symbolic = %.loc20_63.3 (constants.%.ddf)] -// CHECK:STDOUT: %Copy.lookup_impl_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.3: %Copy.type = facet_value %ptr.loc14_30.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc20_63.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc20_63.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.da6)] -// CHECK:STDOUT: %.loc20_63.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc20_63.3 [symbolic = %.loc20_63.4 (constants.%.a56)] -// CHECK:STDOUT: %impl.elem0.loc20_63.2: @C.F.%.loc20_63.4 (%.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_impl_function %impl.elem0.loc20_63.2, @Copy.WithSelf.Op(%Copy.facet.loc20_63.3) [symbolic = %specific_impl_fn.loc20_63.2 (constants.%specific_impl_fn.16d)] +// CHECK:STDOUT: %require_complete.loc20_49: = require_complete_type %ptr.loc14_37.1 [symbolic = %require_complete.loc20_49 (constants.%require_complete.56d)] +// CHECK:STDOUT: %.loc20_70.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc14_25.1) [symbolic = %.loc20_70.3 (constants.%.ddf)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc14_37.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.088)] +// CHECK:STDOUT: %Copy.facet.loc20_70.3: %Copy.type = facet_value %ptr.loc14_37.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc20_70.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc20_70.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.da6)] +// CHECK:STDOUT: %.loc20_70.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc20_70.3 [symbolic = %.loc20_70.4 (constants.%.a56)] +// CHECK:STDOUT: %impl.elem0.loc20_70.2: @C.F.%.loc20_70.4 (%.a56) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_70.2 (constants.%impl.elem0.fbe)] +// CHECK:STDOUT: %specific_impl_fn.loc20_70.2: = specific_impl_function %impl.elem0.loc20_70.2, @Copy.WithSelf.Op(%Copy.facet.loc20_70.3) [symbolic = %specific_impl_fn.loc20_70.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_30.1 (%ptr.18e)) -> out %return.param.loc20: @C.F.%ptr.loc14_30.1 (%ptr.18e) { +// CHECK:STDOUT: fn(%self.param.loc20: @C.F.%C (%C), %u.param.loc20: @C.F.%ptr.loc14_37.1 (%ptr.18e)) -> out %return.param.loc20: @C.F.%ptr.loc14_37.1 (%ptr.18e) { // CHECK:STDOUT: !entry: -// 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.4 (%.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 %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.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc20_63.1: %Copy.type = converted constants.%ptr.18e, %Copy.facet.loc20_63.1 [symbolic = %Copy.facet.loc20_63.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %Copy.facet.loc20_63.2: %Copy.type = facet_value constants.%ptr.18e, (constants.%Copy.lookup_impl_witness.088) [symbolic = %Copy.facet.loc20_63.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc20_63.2: %Copy.type = converted constants.%ptr.18e, %Copy.facet.loc20_63.2 [symbolic = %Copy.facet.loc20_63.3 (constants.%Copy.facet)] -// CHECK:STDOUT: %specific_impl_fn.loc20_63.1: = 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 %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: %u.ref: @C.F.%ptr.loc14_37.1 (%ptr.18e) = name_ref u, %u.loc20 +// CHECK:STDOUT: %impl.elem0.loc20_70.1: @C.F.%.loc20_70.4 (%.a56) = impl_witness_access constants.%Copy.lookup_impl_witness.088, element0 [symbolic = %impl.elem0.loc20_70.2 (constants.%impl.elem0.fbe)] +// CHECK:STDOUT: %bound_method.loc20_70.1: = bound_method %u.ref, %impl.elem0.loc20_70.1 +// CHECK:STDOUT: %Copy.facet.loc20_70.1: %Copy.type = facet_value constants.%ptr.18e, (constants.%Copy.lookup_impl_witness.088) [symbolic = %Copy.facet.loc20_70.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %.loc20_70.1: %Copy.type = converted constants.%ptr.18e, %Copy.facet.loc20_70.1 [symbolic = %Copy.facet.loc20_70.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %Copy.facet.loc20_70.2: %Copy.type = facet_value constants.%ptr.18e, (constants.%Copy.lookup_impl_witness.088) [symbolic = %Copy.facet.loc20_70.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %.loc20_70.2: %Copy.type = converted constants.%ptr.18e, %Copy.facet.loc20_70.2 [symbolic = %Copy.facet.loc20_70.3 (constants.%Copy.facet)] +// CHECK:STDOUT: %specific_impl_fn.loc20_70.1: = specific_impl_function %impl.elem0.loc20_70.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc20_70.2 (constants.%specific_impl_fn.16d)] +// CHECK:STDOUT: %bound_method.loc20_70.2: = bound_method %u.ref, %specific_impl_fn.loc20_70.1 +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @C.F.%ptr.loc14_37.1 (%ptr.18e) = call %bound_method.loc20_70.2(%u.ref) // CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -394,12 +394,12 @@ fn Interface.C.F(unused self, U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: %self.param_patt.loc14 => constants.%self.param_patt.f45 // CHECK:STDOUT: %self.patt.loc14 => constants.%self.patt.134 // CHECK:STDOUT: %U.patt.loc14 => constants.%U.patt.014 -// 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: %U.loc14_25.1 => constants.%U.091 +// CHECK:STDOUT: %ptr.loc14_37.1 => constants.%ptr.18e +// CHECK:STDOUT: %pattern_type.loc14_34 => constants.%pattern_type.423 // CHECK:STDOUT: %u.param_patt.loc14 => constants.%u.param_patt // CHECK:STDOUT: %u.patt.loc14 => constants.%u.patt -// CHECK:STDOUT: %.loc14_37.1 => constants.%.6d8 +// CHECK:STDOUT: %.loc14_44.1 => constants.%.6d8 // CHECK:STDOUT: %return.param_patt.loc14 => constants.%return.param_patt.534 // CHECK:STDOUT: %return.patt.loc14 => constants.%return.patt.669 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/fail_type_as_facet.carbon b/toolchain/check/testdata/interface/fail_type_as_facet.carbon index 4053ab7dd6aa..02f3b766c6f5 100644 --- a/toolchain/check/testdata/interface/fail_type_as_facet.carbon +++ b/toolchain/check/testdata/interface/fail_type_as_facet.carbon @@ -11,13 +11,13 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/fail_type_as_facet.carbon interface I { - let T:! type; - // CHECK:STDERR: fail_type_as_facet.carbon:[[@LINE+7]]:18: error: cannot implicitly convert non-type value of type `Self.(TODO: element 0 in incomplete Self as I)` to `type` [ConversionFailureNonTypeToFacet] - // CHECK:STDERR: fn F[X:! T](x: X); - // CHECK:STDERR: ^ - // CHECK:STDERR: fail_type_as_facet.carbon:[[@LINE+4]]:18: note: type `Self.(TODO: element 0 in incomplete Self as I)` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] - // CHECK:STDERR: fn F[X:! T](x: X); - // CHECK:STDERR: ^ + let T: type; + // CHECK:STDERR: fail_type_as_facet.carbon:[[@LINE+7]]:17: error: cannot implicitly convert non-type value of type `Self.(TODO: element 0 in incomplete Self as I)` to `type` [ConversionFailureNonTypeToFacet] + // CHECK:STDERR: fn F[X: T](x: X); + // CHECK:STDERR: ^ + // CHECK:STDERR: fail_type_as_facet.carbon:[[@LINE+4]]:17: note: type `Self.(TODO: element 0 in incomplete Self as I)` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] + // CHECK:STDERR: fn F[X: T](x: X); + // CHECK:STDERR: ^ // CHECK:STDERR: - fn F[X:! T](x: X); + fn F[X: T](x: X); } diff --git a/toolchain/check/testdata/interface/final.carbon b/toolchain/check/testdata/interface/final.carbon index b208c24e84f2..80d3888a5f7f 100644 --- a/toolchain/check/testdata/interface/final.carbon +++ b/toolchain/check/testdata/interface/final.carbon @@ -17,12 +17,12 @@ library "[[@TEST_NAME]]"; interface I { fn F(); } interface J {} -final impl forall [T:! J] T as I { fn F() {} } +final impl forall [T: J] T as I { fn F() {} } // This is creating an indirection where the `final impl` requires an indirect // instantiation by the caller. -fn UseI(T:! I) { T.F(); } -fn UseJ(T:! J) { UseI(T); } +fn UseI(generic T: I) { T.F(); } +fn UseJ(generic T: J) { UseI(T); } class C {} impl C as J {} @@ -113,32 +113,32 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: %T.patt.loc7_21.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_21.2 (constants.%T.patt.ac1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc7_21.2 [symbolic = %T.loc7_21.1 (constants.%T.e40)] -// CHECK:STDOUT: %T.as_type.loc7_27.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_27.1 (constants.%T.as_type.d90)] -// CHECK:STDOUT: %.loc7_27: type = converted %T.ref, %T.as_type.loc7_27.2 [symbolic = %T.as_type.loc7_27.1 (constants.%T.as_type.d90)] +// CHECK:STDOUT: %T.as_type.loc7_26.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_26.1 (constants.%T.as_type.d90)] +// CHECK:STDOUT: %.loc7_26: type = converted %T.ref, %T.as_type.loc7_26.2 [symbolic = %T.as_type.loc7_26.1 (constants.%T.as_type.d90)] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.loc7_24: type = splice_block %J.ref [concrete = constants.%J.type] { +// CHECK:STDOUT: %.loc7_23: type = splice_block %J.ref [concrete = constants.%J.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_21.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc7_21.1 (constants.%T.e40)] // CHECK:STDOUT: } // CHECK:STDOUT: %UseI.decl: %UseI.type = fn_decl @UseI [concrete = constants.%UseI] { -// CHECK:STDOUT: %T.patt.loc11_10.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_10.2 (constants.%T.patt.1df)] +// CHECK:STDOUT: %T.patt.loc11_18.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_18.2 (constants.%T.patt.1df)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_13: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %.loc11_20: type = splice_block %I.ref [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc11_10.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc11_10.1 (constants.%T.dda)] +// CHECK:STDOUT: %T.loc11_18.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc11_18.1 (constants.%T.dda)] // CHECK:STDOUT: } // CHECK:STDOUT: %UseJ.decl: %UseJ.type = fn_decl @UseJ [concrete = constants.%UseJ] { -// CHECK:STDOUT: %T.patt.loc12_10.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_10.2 (constants.%T.patt.ac1)] +// CHECK:STDOUT: %T.patt.loc12_18.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_18.2 (constants.%T.patt.ac1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_13: type = splice_block %J.ref [concrete = constants.%J.type] { +// CHECK:STDOUT: %.loc12_20: type = splice_block %J.ref [concrete = constants.%J.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc12_10.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc12_10.1 (constants.%T.e40)] +// CHECK:STDOUT: %T.loc12_18.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc12_18.1 (constants.%T.e40)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: impl_decl @C.as.J.impl [concrete] {} { @@ -182,22 +182,22 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: generic final impl @T.as_type.as.I.impl(%T.loc7_21.2: %J.type) { // CHECK:STDOUT: %T.patt.loc7_21.2: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_21.2 (constants.%T.patt.ac1)] // CHECK:STDOUT: %T.loc7_21.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc7_21.1 (constants.%T.e40)] -// CHECK:STDOUT: %T.as_type.loc7_27.1: type = facet_access_type %T.loc7_21.1 [symbolic = %T.as_type.loc7_27.1 (constants.%T.as_type.d90)] -// CHECK:STDOUT: %I.impl_witness.loc7_34.2: = impl_witness %I.impl_witness_table, @T.as_type.as.I.impl(%T.loc7_21.1) [symbolic = %I.impl_witness.loc7_34.2 (constants.%I.impl_witness.333)] +// CHECK:STDOUT: %T.as_type.loc7_26.1: type = facet_access_type %T.loc7_21.1 [symbolic = %T.as_type.loc7_26.1 (constants.%T.as_type.d90)] +// CHECK:STDOUT: %I.impl_witness.loc7_33.2: = impl_witness %I.impl_witness_table, @T.as_type.as.I.impl(%T.loc7_21.1) [symbolic = %I.impl_witness.loc7_33.2 (constants.%I.impl_witness.333)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.as.I.impl.F.type: type = fn_type @T.as_type.as.I.impl.F, @T.as_type.as.I.impl(%T.loc7_21.1) [symbolic = %T.as_type.as.I.impl.F.type (constants.%T.as_type.as.I.impl.F.type.f53)] // CHECK:STDOUT: %T.as_type.as.I.impl.F: @T.as_type.as.I.impl.%T.as_type.as.I.impl.F.type (%T.as_type.as.I.impl.F.type.f53) = struct_value () [symbolic = %T.as_type.as.I.impl.F (constants.%T.as_type.as.I.impl.F.305)] // CHECK:STDOUT: -// CHECK:STDOUT: final impl: %.loc7_27 as %I.ref { +// CHECK:STDOUT: final impl: %.loc7_26 as %I.ref { // CHECK:STDOUT: %T.as_type.as.I.impl.F.decl: @T.as_type.as.I.impl.%T.as_type.as.I.impl.F.type (%T.as_type.as.I.impl.F.type.f53) = fn_decl @T.as_type.as.I.impl.F [symbolic = @T.as_type.as.I.impl.%T.as_type.as.I.impl.F (constants.%T.as_type.as.I.impl.F.305)] {} {} // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%T.as_type.as.I.impl.F.decl), @T.as_type.as.I.impl [concrete] -// CHECK:STDOUT: %I.impl_witness.loc7_34.1: = impl_witness %I.impl_witness_table, @T.as_type.as.I.impl(constants.%T.e40) [symbolic = %I.impl_witness.loc7_34.2 (constants.%I.impl_witness.333)] +// CHECK:STDOUT: %I.impl_witness.loc7_33.1: = impl_witness %I.impl_witness_table, @T.as_type.as.I.impl(constants.%T.e40) [symbolic = %I.impl_witness.loc7_33.2 (constants.%I.impl_witness.333)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %T.as_type.as.I.impl.F.decl // CHECK:STDOUT: extend %I.ref -// CHECK:STDOUT: witness = %I.impl_witness.loc7_34.1 +// CHECK:STDOUT: witness = %I.impl_witness.loc7_33.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -233,53 +233,53 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @UseI(%T.loc11_10.2: %I.type) { -// CHECK:STDOUT: %T.patt.loc11_10.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_10.2 (constants.%T.patt.1df)] -// CHECK:STDOUT: %T.loc11_10.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc11_10.1 (constants.%T.dda)] +// CHECK:STDOUT: generic fn @UseI(%T.loc11_18.2: %I.type) { +// CHECK:STDOUT: %T.patt.loc11_18.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_18.2 (constants.%T.patt.1df)] +// CHECK:STDOUT: %T.loc11_18.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc11_18.1 (constants.%T.dda)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc11_19.2: type = facet_access_type %T.loc11_10.1 [symbolic = %T.as_type.loc11_19.2 (constants.%T.as_type.b38)] -// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I.WithSelf(%T.loc11_10.1) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.418)] -// CHECK:STDOUT: %.loc11_19.2: type = fn_type_with_self_type %I.WithSelf.F.type, %T.loc11_10.1 [symbolic = %.loc11_19.2 (constants.%.81d)] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc11_10.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %impl.elem0.loc11_19.2: @UseI.%.loc11_19.2 (%.81d) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_19.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc11_19.2: = specific_impl_function %impl.elem0.loc11_19.2, @I.WithSelf.F(%T.loc11_10.1) [symbolic = %specific_impl_fn.loc11_19.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %T.as_type.loc11_26.2: type = facet_access_type %T.loc11_18.1 [symbolic = %T.as_type.loc11_26.2 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I.WithSelf(%T.loc11_18.1) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.418)] +// CHECK:STDOUT: %.loc11_26.2: type = fn_type_with_self_type %I.WithSelf.F.type, %T.loc11_18.1 [symbolic = %.loc11_26.2 (constants.%.81d)] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc11_18.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] +// CHECK:STDOUT: %impl.elem0.loc11_26.2: @UseI.%.loc11_26.2 (%.81d) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_26.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc11_26.2: = specific_impl_function %impl.elem0.loc11_26.2, @I.WithSelf.F(%T.loc11_18.1) [symbolic = %specific_impl_fn.loc11_26.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc11_10.2 [symbolic = %T.loc11_10.1 (constants.%T.dda)] -// CHECK:STDOUT: %T.as_type.loc11_19.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc11_19.2 (constants.%T.as_type.b38)] -// CHECK:STDOUT: %.loc11_19.1: type = converted %T.ref, %T.as_type.loc11_19.1 [symbolic = %T.as_type.loc11_19.2 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc11_18.2 [symbolic = %T.loc11_18.1 (constants.%T.dda)] +// CHECK:STDOUT: %T.as_type.loc11_26.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc11_26.2 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %.loc11_26.1: type = converted %T.ref, %T.as_type.loc11_26.1 [symbolic = %T.as_type.loc11_26.2 (constants.%T.as_type.b38)] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.WithSelf.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc11_19.1: @UseI.%.loc11_19.2 (%.81d) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_19.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc11_19.1: = specific_impl_function %impl.elem0.loc11_19.1, @I.WithSelf.F(constants.%T.dda) [symbolic = %specific_impl_fn.loc11_19.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %I.WithSelf.F.call: init %empty_tuple.type = call %specific_impl_fn.loc11_19.1() +// CHECK:STDOUT: %impl.elem0.loc11_26.1: @UseI.%.loc11_26.2 (%.81d) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_26.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc11_26.1: = specific_impl_function %impl.elem0.loc11_26.1, @I.WithSelf.F(constants.%T.dda) [symbolic = %specific_impl_fn.loc11_26.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %I.WithSelf.F.call: init %empty_tuple.type = call %specific_impl_fn.loc11_26.1() // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @UseJ(%T.loc12_10.2: %J.type) { -// CHECK:STDOUT: %T.patt.loc12_10.2: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_10.2 (constants.%T.patt.ac1)] -// CHECK:STDOUT: %T.loc12_10.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc12_10.1 (constants.%T.e40)] +// CHECK:STDOUT: generic fn @UseJ(%T.loc12_18.2: %J.type) { +// CHECK:STDOUT: %T.patt.loc12_18.2: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_18.2 (constants.%T.patt.ac1)] +// CHECK:STDOUT: %T.loc12_18.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc12_18.1 (constants.%T.e40)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc12_24.2: type = facet_access_type %T.loc12_10.1 [symbolic = %T.as_type.loc12_24.2 (constants.%T.as_type.d90)] -// CHECK:STDOUT: %.loc12_24.2: require_specific_def_type = require_specific_def @T.as_type.as.I.impl(%T.loc12_10.1) [symbolic = %.loc12_24.2 (constants.%.062)] -// CHECK:STDOUT: %I.impl_witness: = impl_witness @T.as_type.as.I.impl.%I.impl_witness_table, @T.as_type.as.I.impl(%T.loc12_10.1) [symbolic = %I.impl_witness (constants.%I.impl_witness.333)] -// CHECK:STDOUT: %I.facet.loc12_24.2: %I.type = facet_value %T.as_type.loc12_24.2, (%I.impl_witness) [symbolic = %I.facet.loc12_24.2 (constants.%I.facet.39f)] -// CHECK:STDOUT: %UseI.specific_fn.loc12_18.2: = specific_function constants.%UseI, @UseI(%I.facet.loc12_24.2) [symbolic = %UseI.specific_fn.loc12_18.2 (constants.%UseI.specific_fn.081)] +// CHECK:STDOUT: %T.as_type.loc12_31.2: type = facet_access_type %T.loc12_18.1 [symbolic = %T.as_type.loc12_31.2 (constants.%T.as_type.d90)] +// CHECK:STDOUT: %.loc12_31.2: require_specific_def_type = require_specific_def @T.as_type.as.I.impl(%T.loc12_18.1) [symbolic = %.loc12_31.2 (constants.%.062)] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @T.as_type.as.I.impl.%I.impl_witness_table, @T.as_type.as.I.impl(%T.loc12_18.1) [symbolic = %I.impl_witness (constants.%I.impl_witness.333)] +// CHECK:STDOUT: %I.facet.loc12_31.2: %I.type = facet_value %T.as_type.loc12_31.2, (%I.impl_witness) [symbolic = %I.facet.loc12_31.2 (constants.%I.facet.39f)] +// CHECK:STDOUT: %UseI.specific_fn.loc12_25.2: = specific_function constants.%UseI, @UseI(%I.facet.loc12_31.2) [symbolic = %UseI.specific_fn.loc12_25.2 (constants.%UseI.specific_fn.081)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %UseI.ref: %UseI.type = name_ref UseI, file.%UseI.decl [concrete = constants.%UseI] -// CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc12_10.2 [symbolic = %T.loc12_10.1 (constants.%T.e40)] -// CHECK:STDOUT: %T.as_type.loc12_24.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_24.2 (constants.%T.as_type.d90)] -// CHECK:STDOUT: %I.facet.loc12_24.1: %I.type = facet_value %T.as_type.loc12_24.1, (constants.%I.impl_witness.333) [symbolic = %I.facet.loc12_24.2 (constants.%I.facet.39f)] -// CHECK:STDOUT: %.loc12_24.1: %I.type = converted %T.ref, %I.facet.loc12_24.1 [symbolic = %I.facet.loc12_24.2 (constants.%I.facet.39f)] -// CHECK:STDOUT: %UseI.specific_fn.loc12_18.1: = specific_function %UseI.ref, @UseI(constants.%I.facet.39f) [symbolic = %UseI.specific_fn.loc12_18.2 (constants.%UseI.specific_fn.081)] -// CHECK:STDOUT: %UseI.call: init %empty_tuple.type = call %UseI.specific_fn.loc12_18.1() +// CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T.e40)] +// CHECK:STDOUT: %T.as_type.loc12_31.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_31.2 (constants.%T.as_type.d90)] +// CHECK:STDOUT: %I.facet.loc12_31.1: %I.type = facet_value %T.as_type.loc12_31.1, (constants.%I.impl_witness.333) [symbolic = %I.facet.loc12_31.2 (constants.%I.facet.39f)] +// CHECK:STDOUT: %.loc12_31.1: %I.type = converted %T.ref, %I.facet.loc12_31.1 [symbolic = %I.facet.loc12_31.2 (constants.%I.facet.39f)] +// CHECK:STDOUT: %UseI.specific_fn.loc12_25.1: = specific_function %UseI.ref, @UseI(constants.%I.facet.39f) [symbolic = %UseI.specific_fn.loc12_25.2 (constants.%UseI.specific_fn.081)] +// CHECK:STDOUT: %UseI.call: init %empty_tuple.type = call %UseI.specific_fn.loc12_25.1() // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -315,8 +315,8 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: specific @T.as_type.as.I.impl(constants.%T.e40) { // CHECK:STDOUT: %T.patt.loc7_21.2 => constants.%T.patt.ac1 // CHECK:STDOUT: %T.loc7_21.1 => constants.%T.e40 -// CHECK:STDOUT: %T.as_type.loc7_27.1 => constants.%T.as_type.d90 -// CHECK:STDOUT: %I.impl_witness.loc7_34.2 => constants.%I.impl_witness.333 +// CHECK:STDOUT: %T.as_type.loc7_26.1 => constants.%T.as_type.d90 +// CHECK:STDOUT: %I.impl_witness.loc7_33.2 => constants.%I.impl_witness.333 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.as.I.impl.F.type => constants.%T.as_type.as.I.impl.F.type.f53 @@ -337,8 +337,8 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet.39f) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @UseI(constants.%T.dda) { -// CHECK:STDOUT: %T.patt.loc11_10.2 => constants.%T.patt.1df -// CHECK:STDOUT: %T.loc11_10.1 => constants.%T.dda +// CHECK:STDOUT: %T.patt.loc11_18.2 => constants.%T.patt.1df +// CHECK:STDOUT: %T.loc11_18.1 => constants.%T.dda // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T.dda) { @@ -351,21 +351,21 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: specific @I.WithSelf.F(constants.%T.dda) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @UseJ(constants.%T.e40) { -// CHECK:STDOUT: %T.patt.loc12_10.2 => constants.%T.patt.ac1 -// CHECK:STDOUT: %T.loc12_10.1 => constants.%T.e40 +// CHECK:STDOUT: %T.patt.loc12_18.2 => constants.%T.patt.ac1 +// CHECK:STDOUT: %T.loc12_18.1 => constants.%T.e40 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @UseI(constants.%I.facet.39f) { -// CHECK:STDOUT: %T.patt.loc11_10.2 => constants.%T.patt.1df -// CHECK:STDOUT: %T.loc11_10.1 => constants.%I.facet.39f +// CHECK:STDOUT: %T.patt.loc11_18.2 => constants.%T.patt.1df +// CHECK:STDOUT: %T.loc11_18.1 => constants.%I.facet.39f // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc11_19.2 => constants.%T.as_type.d90 +// CHECK:STDOUT: %T.as_type.loc11_26.2 => constants.%T.as_type.d90 // CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.12f -// CHECK:STDOUT: %.loc11_19.2 => constants.%.c2e +// CHECK:STDOUT: %.loc11_26.2 => constants.%.c2e // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness.333 -// CHECK:STDOUT: %impl.elem0.loc11_19.2 => constants.%T.as_type.as.I.impl.F.305 -// CHECK:STDOUT: %specific_impl_fn.loc11_19.2 => constants.%T.as_type.as.I.impl.F.specific_fn.925 +// CHECK:STDOUT: %impl.elem0.loc11_26.2 => constants.%T.as_type.as.I.impl.F.305 +// CHECK:STDOUT: %specific_impl_fn.loc11_26.2 => constants.%T.as_type.as.I.impl.F.specific_fn.925 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J.WithSelf(constants.%J.facet) { @@ -373,22 +373,22 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @UseJ(constants.%J.facet) { -// CHECK:STDOUT: %T.patt.loc12_10.2 => constants.%T.patt.ac1 -// CHECK:STDOUT: %T.loc12_10.1 => constants.%J.facet +// CHECK:STDOUT: %T.patt.loc12_18.2 => constants.%T.patt.ac1 +// CHECK:STDOUT: %T.loc12_18.1 => constants.%J.facet // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc12_24.2 => constants.%C -// CHECK:STDOUT: %.loc12_24.2 => constants.%.72e +// CHECK:STDOUT: %T.as_type.loc12_31.2 => constants.%C +// CHECK:STDOUT: %.loc12_31.2 => constants.%.72e // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.9d5 -// CHECK:STDOUT: %I.facet.loc12_24.2 => constants.%I.facet.ed7 -// CHECK:STDOUT: %UseI.specific_fn.loc12_18.2 => constants.%UseI.specific_fn.238 +// CHECK:STDOUT: %I.facet.loc12_31.2 => constants.%I.facet.ed7 +// CHECK:STDOUT: %UseI.specific_fn.loc12_25.2 => constants.%UseI.specific_fn.238 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as_type.as.I.impl(constants.%J.facet) { // CHECK:STDOUT: %T.patt.loc7_21.2 => constants.%T.patt.ac1 // CHECK:STDOUT: %T.loc7_21.1 => constants.%J.facet -// CHECK:STDOUT: %T.as_type.loc7_27.1 => constants.%C -// CHECK:STDOUT: %I.impl_witness.loc7_34.2 => constants.%I.impl_witness.9d5 +// CHECK:STDOUT: %T.as_type.loc7_26.1 => constants.%C +// CHECK:STDOUT: %I.impl_witness.loc7_33.2 => constants.%I.impl_witness.9d5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.as.I.impl.F.type => constants.%T.as_type.as.I.impl.F.type.907 @@ -396,16 +396,16 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @UseI(constants.%I.facet.ed7) { -// CHECK:STDOUT: %T.patt.loc11_10.2 => constants.%T.patt.1df -// CHECK:STDOUT: %T.loc11_10.1 => constants.%I.facet.ed7 +// CHECK:STDOUT: %T.patt.loc11_18.2 => constants.%T.patt.1df +// CHECK:STDOUT: %T.loc11_18.1 => constants.%I.facet.ed7 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc11_19.2 => constants.%C +// CHECK:STDOUT: %T.as_type.loc11_26.2 => constants.%C // CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.31e -// CHECK:STDOUT: %.loc11_19.2 => constants.%.7bd +// CHECK:STDOUT: %.loc11_26.2 => constants.%.7bd // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness.9d5 -// CHECK:STDOUT: %impl.elem0.loc11_19.2 => constants.%T.as_type.as.I.impl.F.b2b -// CHECK:STDOUT: %specific_impl_fn.loc11_19.2 => constants.%T.as_type.as.I.impl.F.specific_fn.2e2 +// CHECK:STDOUT: %impl.elem0.loc11_26.2 => constants.%T.as_type.as.I.impl.F.b2b +// CHECK:STDOUT: %specific_impl_fn.loc11_26.2 => constants.%T.as_type.as.I.impl.F.specific_fn.2e2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet.ed7) {} diff --git a/toolchain/check/testdata/interface/generic.carbon b/toolchain/check/testdata/interface/generic.carbon index 392d870d9938..5a078fbee49b 100644 --- a/toolchain/check/testdata/interface/generic.carbon +++ b/toolchain/check/testdata/interface/generic.carbon @@ -16,11 +16,11 @@ library "[[@TEST_NAME]]"; -interface Simple(T:! type) {} +interface Simple(T: type) {} class X {} -interface WithAssocFn(T:! type) { +interface WithAssocFn(T: type) { // TODO: Take `Self`, return `T`, once that works. fn F() -> X; } @@ -34,10 +34,10 @@ class C { } } -interface WithImplicitArgs[T:! type](N:! T); +interface WithImplicitArgs[T: type](N: T); -fn Receive(unused T:! Simple(C)) {} -fn Pass(T:! Simple(C)) { +fn Receive(unused generic T: Simple(C)) {} +fn Pass(generic T: Simple(C)) { Receive(T); } @@ -45,19 +45,19 @@ fn Pass(T:! Simple(C)) { library "[[@TEST_NAME]]"; -interface Generic(T:! type) {} +interface Generic(T: type) {} class A {} class B {} -fn F(T:! Generic(A)); -fn G(T:! Generic(B)) { +fn F(generic T: Generic(A)); +fn G(generic T: Generic(B)) { // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `Generic(B)` into type implementing `Generic(A)` [ConversionFailureFacetToFacet] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-5]]:6: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn F(T:! Generic(A)); - // CHECK:STDERR: ^~~~~~~~~~~~~~ + // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-5]]:14: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn F(generic T: Generic(A)); + // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: F(T); } @@ -65,16 +65,16 @@ fn G(T:! Generic(B)) { // --- fail_args_count_mismatch.carbon library "[[@TEST_NAME]]"; -interface Generic(T:! type) {} +interface Generic(T: type) {} -// CHECK:STDERR: fail_args_count_mismatch.carbon:[[@LINE+7]]:17: error: 2 arguments passed to generic interface expecting 1 argument [CallArgCountMismatch] -// CHECK:STDERR: fn F(unused T:! Generic((), ())) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_args_count_mismatch.carbon:[[@LINE+7]]:24: error: 2 arguments passed to generic interface expecting 1 argument [CallArgCountMismatch] +// CHECK:STDERR: fn F(unused generic T: Generic((), ())) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: fail_args_count_mismatch.carbon:[[@LINE-5]]:1: note: calling generic interface declared here [InCallToEntity] -// CHECK:STDERR: interface Generic(T:! type) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: interface Generic(T: type) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! Generic((), ())) {} +fn F(unused generic T: Generic((), ())) {} // CHECK:STDOUT: --- generic.carbon // CHECK:STDOUT: @@ -152,9 +152,9 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %Simple.decl: %Simple.type.887 = interface_decl @Simple [concrete = constants.%Simple.generic] { // CHECK:STDOUT: %T.patt.loc4_19.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_19.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_22.1: type = splice_block %.loc4_22.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_21.1: type = splice_block %.loc4_21.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_22.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_21.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_19.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_19.1 (constants.%T.67d)] // CHECK:STDOUT: } @@ -162,30 +162,30 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %WithAssocFn.decl: %WithAssocFn.type.0a6 = interface_decl @WithAssocFn [concrete = constants.%WithAssocFn.generic] { // CHECK:STDOUT: %T.patt.loc8_24.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_24.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_27.1: type = splice_block %.loc8_27.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_26.1: type = splice_block %.loc8_26.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_27.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_26.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_24.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_24.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %WithImplicitArgs.decl: %WithImplicitArgs.type = interface_decl @WithImplicitArgs [concrete = constants.%WithImplicitArgs.generic] { // CHECK:STDOUT: %T.patt.loc22_29.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_29.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %N.patt.loc22_39.1: @WithImplicitArgs.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc22_39.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.patt.loc22_38.1: @WithImplicitArgs.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc22_38.2 (constants.%N.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc22_32.1: type = splice_block %.loc22_32.2 [concrete = type] { +// CHECK:STDOUT: %.loc22_31.1: type = splice_block %.loc22_31.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc22_29: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc22_32.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc22_31.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc22_29.2: type = symbolic_binding T, 0 [symbolic = %T.loc22_29.1 (constants.%T.67d)] -// CHECK:STDOUT: %.loc22_42: type = splice_block %T.ref [symbolic = %T.loc22_29.1 (constants.%T.67d)] { -// CHECK:STDOUT: %.Self.frozen.loc22_39: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc22_40: type = splice_block %T.ref [symbolic = %T.loc22_29.1 (constants.%T.67d)] { +// CHECK:STDOUT: %.Self.frozen.loc22_38: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc22_29.2 [symbolic = %T.loc22_29.1 (constants.%T.67d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc22_39.2: @WithImplicitArgs.%T.loc22_29.1 (%T.67d) = symbolic_binding N, 1 [symbolic = %N.loc22_39.1 (constants.%N)] +// CHECK:STDOUT: %N.loc22_38.2: @WithImplicitArgs.%T.loc22_29.1 (%T.67d) = symbolic_binding N, 1 [symbolic = %N.loc22_38.1 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %Receive.decl: %Receive.type = fn_decl @Receive [concrete = constants.%Receive] { -// CHECK:STDOUT: %T.patt.loc24_20.1: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_20.2 (constants.%T.patt.407)] +// CHECK:STDOUT: %T.patt.loc24_28.1: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_28.2 (constants.%T.patt.407)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc24: type = splice_block %Simple.type [concrete = constants.%Simple.type.d50] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -193,10 +193,10 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [concrete = constants.%Simple.type.d50] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc24_20.3: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc24_20.2 (constants.%T.16788c.2)] +// CHECK:STDOUT: %T.loc24_28.3: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc24_28.2 (constants.%T.16788c.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %Pass.decl: %Pass.type = fn_decl @Pass [concrete = constants.%Pass] { -// CHECK:STDOUT: %T.patt.loc25_10.1: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_10.2 (constants.%T.patt.407)] +// CHECK:STDOUT: %T.patt.loc25_18.1: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_18.2 (constants.%T.patt.407)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc25: type = splice_block %Simple.type [concrete = constants.%Simple.type.d50] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -204,7 +204,7 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [concrete = constants.%Simple.type.d50] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc25_10.2: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc25_10.1 (constants.%T.16788c.1)] +// CHECK:STDOUT: %T.loc25_18.2: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc25_18.1 (constants.%T.16788c.1)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -214,14 +214,14 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(%T.loc4_19.1)> [symbolic = %Simple.type (constants.%Simple.type.f9b)] -// CHECK:STDOUT: %Self.loc4_28.2: @Simple.%Simple.type (%Simple.type.f9b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.55b)] +// CHECK:STDOUT: %Self.loc4_27.2: @Simple.%Simple.type (%Simple.type.f9b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_27.2 (constants.%Self.55b)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_28.1: @Simple.%Simple.type (%Simple.type.f9b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.55b)] +// CHECK:STDOUT: %Self.loc4_27.1: @Simple.%Simple.type (%Simple.type.f9b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_27.2 (constants.%Self.55b)] // CHECK:STDOUT: %Simple.WithSelf.decl = interface_with_self_decl @Simple [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_28.1 +// CHECK:STDOUT: .Self = %Self.loc4_27.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -236,10 +236,10 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %WithAssocFn.type: type = facet_type <@WithAssocFn, @WithAssocFn(%T.loc8_24.1)> [symbolic = %WithAssocFn.type (constants.%WithAssocFn.type.ea2)] -// CHECK:STDOUT: %Self.loc8_33.2: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.ea2) = symbolic_binding Self, 1 [symbolic = %Self.loc8_33.2 (constants.%Self.e5d)] +// CHECK:STDOUT: %Self.loc8_32.2: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.ea2) = symbolic_binding Self, 1 [symbolic = %Self.loc8_32.2 (constants.%Self.e5d)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc8_33.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.ea2) = symbolic_binding Self, 1 [symbolic = %Self.loc8_33.2 (constants.%Self.e5d)] +// CHECK:STDOUT: %Self.loc8_32.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.ea2) = symbolic_binding Self, 1 [symbolic = %Self.loc8_32.2 (constants.%Self.e5d)] // CHECK:STDOUT: %WithAssocFn.WithSelf.decl = interface_with_self_decl @WithAssocFn [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -255,7 +255,7 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %assoc0.loc10_14.1: @WithAssocFn.WithSelf.%WithAssocFn.assoc_type (%WithAssocFn.assoc_type.b11) = assoc_entity element0, %WithAssocFn.WithSelf.F.decl [symbolic = %assoc0.loc10_14.2 (constants.%assoc0.f49)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc8_33.1 +// CHECK:STDOUT: .Self = %Self.loc8_32.1 // CHECK:STDOUT: .X = // CHECK:STDOUT: .X = // CHECK:STDOUT: .F = @WithAssocFn.WithSelf.%assoc0.loc10_14.1 @@ -267,12 +267,12 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @WithImplicitArgs(%T.loc22_29.2: type, %N.loc22_39.2: @WithImplicitArgs.%T.loc22_29.1 (%T.67d)) { +// CHECK:STDOUT: generic interface @WithImplicitArgs(%T.loc22_29.2: type, %N.loc22_38.2: @WithImplicitArgs.%T.loc22_29.1 (%T.67d)) { // CHECK:STDOUT: %T.patt.loc22_29.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_29.2 (constants.%T.patt.d47)] // CHECK:STDOUT: %T.loc22_29.1: type = symbolic_binding T, 0 [symbolic = %T.loc22_29.1 (constants.%T.67d)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc22_29.1 [symbolic = %pattern_type (constants.%pattern_type.51d)] -// CHECK:STDOUT: %N.patt.loc22_39.2: @WithImplicitArgs.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc22_39.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.loc22_39.1: @WithImplicitArgs.%T.loc22_29.1 (%T.67d) = symbolic_binding N, 1 [symbolic = %N.loc22_39.1 (constants.%N)] +// CHECK:STDOUT: %N.patt.loc22_38.2: @WithImplicitArgs.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc22_38.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.loc22_38.1: @WithImplicitArgs.%T.loc22_29.1 (%T.67d) = symbolic_binding N, 1 [symbolic = %N.loc22_38.1 (constants.%N)] // CHECK:STDOUT: // CHECK:STDOUT: interface; // CHECK:STDOUT: } @@ -338,7 +338,7 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: .X = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @WithAssocFn.WithSelf.F(@WithAssocFn.%T.loc8_24.2: type, @WithAssocFn.%Self.loc8_33.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.ea2)) { +// CHECK:STDOUT: generic fn @WithAssocFn.WithSelf.F(@WithAssocFn.%T.loc8_24.2: type, @WithAssocFn.%Self.loc8_32.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.ea2)) { // CHECK:STDOUT: fn() -> out %return.param: %X; // CHECK:STDOUT: } // CHECK:STDOUT: @@ -352,10 +352,10 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Receive(%T.loc24_20.3: %Simple.type.d50) { -// CHECK:STDOUT: %T.patt.loc24_20.2: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_20.2 (constants.%T.patt.407)] -// CHECK:STDOUT: %T.loc24_20.1: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc24_20.1 (constants.%T.16788c.1)] -// CHECK:STDOUT: %T.loc24_20.2: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc24_20.2 (constants.%T.16788c.2)] +// CHECK:STDOUT: generic fn @Receive(%T.loc24_28.3: %Simple.type.d50) { +// CHECK:STDOUT: %T.patt.loc24_28.2: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_28.2 (constants.%T.patt.407)] +// CHECK:STDOUT: %T.loc24_28.1: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc24_28.1 (constants.%T.16788c.1)] +// CHECK:STDOUT: %T.loc24_28.2: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc24_28.2 (constants.%T.16788c.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -367,17 +367,17 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Pass(%T.loc25_10.2: %Simple.type.d50) { -// CHECK:STDOUT: %T.patt.loc25_10.2: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_10.2 (constants.%T.patt.407)] -// CHECK:STDOUT: %T.loc25_10.1: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc25_10.1 (constants.%T.16788c.1)] +// CHECK:STDOUT: generic fn @Pass(%T.loc25_18.2: %Simple.type.d50) { +// CHECK:STDOUT: %T.patt.loc25_18.2: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_18.2 (constants.%T.patt.407)] +// CHECK:STDOUT: %T.loc25_18.1: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc25_18.1 (constants.%T.16788c.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Receive.specific_fn.loc26_3.2: = specific_function constants.%Receive, @Receive(%T.loc25_10.1) [symbolic = %Receive.specific_fn.loc26_3.2 (constants.%Receive.specific_fn)] +// CHECK:STDOUT: %Receive.specific_fn.loc26_3.2: = specific_function constants.%Receive, @Receive(%T.loc25_18.1) [symbolic = %Receive.specific_fn.loc26_3.2 (constants.%Receive.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Receive.ref: %Receive.type = name_ref Receive, file.%Receive.decl [concrete = constants.%Receive] -// CHECK:STDOUT: %T.ref: %Simple.type.d50 = name_ref T, %T.loc25_10.2 [symbolic = %T.loc25_10.1 (constants.%T.16788c.1)] +// CHECK:STDOUT: %T.ref: %Simple.type.d50 = name_ref T, %T.loc25_18.2 [symbolic = %T.loc25_18.1 (constants.%T.16788c.1)] // CHECK:STDOUT: %Receive.specific_fn.loc26_3.1: = specific_function %Receive.ref, @Receive(constants.%T.16788c.1) [symbolic = %Receive.specific_fn.loc26_3.2 (constants.%Receive.specific_fn)] // CHECK:STDOUT: %Receive.call: init %empty_tuple.type = call %Receive.specific_fn.loc26_3.1() // CHECK:STDOUT: return @@ -408,7 +408,7 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Simple.type => constants.%Simple.type.d50 -// CHECK:STDOUT: %Self.loc4_28.2 => constants.%Self.e0f +// CHECK:STDOUT: %Self.loc4_27.2 => constants.%Self.e0f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Simple.WithSelf(constants.%C, constants.%Self.55b) { @@ -425,7 +425,7 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %WithAssocFn.type => constants.%WithAssocFn.type.5fd -// CHECK:STDOUT: %Self.loc8_33.2 => constants.%Self.925 +// CHECK:STDOUT: %Self.loc8_32.2 => constants.%Self.925 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WithAssocFn.WithSelf(constants.%C, constants.%Self.e5d) { @@ -456,25 +456,25 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %T.patt.loc22_29.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc22_29.1 => constants.%T.67d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %N.patt.loc22_39.2 => constants.%N.patt -// CHECK:STDOUT: %N.loc22_39.1 => constants.%N +// CHECK:STDOUT: %N.patt.loc22_38.2 => constants.%N.patt +// CHECK:STDOUT: %N.loc22_38.1 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Receive(constants.%T.16788c.2) { -// CHECK:STDOUT: %T.patt.loc24_20.2 => constants.%T.patt.407 -// CHECK:STDOUT: %T.loc24_20.1 => constants.%T.16788c.2 -// CHECK:STDOUT: %T.loc24_20.2 => constants.%T.16788c.2 +// CHECK:STDOUT: %T.patt.loc24_28.2 => constants.%T.patt.407 +// CHECK:STDOUT: %T.loc24_28.1 => constants.%T.16788c.2 +// CHECK:STDOUT: %T.loc24_28.2 => constants.%T.16788c.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Pass(constants.%T.16788c.1) { -// CHECK:STDOUT: %T.patt.loc25_10.2 => constants.%T.patt.407 -// CHECK:STDOUT: %T.loc25_10.1 => constants.%T.16788c.1 +// CHECK:STDOUT: %T.patt.loc25_18.2 => constants.%T.patt.407 +// CHECK:STDOUT: %T.loc25_18.1 => constants.%T.16788c.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Receive(constants.%T.16788c.1) { -// CHECK:STDOUT: %T.patt.loc24_20.2 => constants.%T.patt.407 -// CHECK:STDOUT: %T.loc24_20.1 => constants.%T.16788c.1 -// CHECK:STDOUT: %T.loc24_20.2 => constants.%T.16788c.1 +// CHECK:STDOUT: %T.patt.loc24_28.2 => constants.%T.patt.407 +// CHECK:STDOUT: %T.loc24_28.1 => constants.%T.16788c.1 +// CHECK:STDOUT: %T.loc24_28.2 => constants.%T.16788c.1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -522,16 +522,16 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %Generic.decl: %Generic.type.30d = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt.loc4_20.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_20.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_23.1: type = splice_block %.loc4_23.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_22.1: type = splice_block %.loc4_22.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_23.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_22.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_20.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc9_7.1: %pattern_type.338 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.49c)] +// CHECK:STDOUT: %T.patt.loc9_15.1: %pattern_type.338 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt.49c)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9: type = splice_block %Generic.type [concrete = constants.%Generic.type.c3a] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -539,10 +539,10 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%A)> [concrete = constants.%Generic.type.c3a] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc9_7.2: %Generic.type.c3a = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.ca1)] +// CHECK:STDOUT: %T.loc9_15.2: %Generic.type.c3a = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T.ca1)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc10_7.1: %pattern_type.dae = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_7.2 (constants.%T.patt.b1f)] +// CHECK:STDOUT: %T.patt.loc10_15.1: %pattern_type.dae = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_15.2 (constants.%T.patt.b1f)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc10: type = splice_block %Generic.type [concrete = constants.%Generic.type.57d] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -550,7 +550,7 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%B)> [concrete = constants.%Generic.type.57d] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc10_7.2: %Generic.type.57d = symbolic_binding T, 0 [symbolic = %T.loc10_7.1 (constants.%T.f18)] +// CHECK:STDOUT: %T.loc10_15.2: %Generic.type.57d = symbolic_binding T, 0 [symbolic = %T.loc10_15.1 (constants.%T.f18)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -560,14 +560,14 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%T.loc4_20.1)> [symbolic = %Generic.type (constants.%Generic.type.ee1)] -// CHECK:STDOUT: %Self.loc4_29.2: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.8ea)] +// CHECK:STDOUT: %Self.loc4_28.2: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.8ea)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_29.1: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.8ea)] +// CHECK:STDOUT: %Self.loc4_28.1: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.8ea)] // CHECK:STDOUT: %Generic.WithSelf.decl = interface_with_self_decl @Generic [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_29.1 +// CHECK:STDOUT: .Self = %Self.loc4_28.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -592,24 +592,24 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc9_7.2: %Generic.type.c3a) { -// CHECK:STDOUT: %T.patt.loc9_7.2: %pattern_type.338 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.49c)] -// CHECK:STDOUT: %T.loc9_7.1: %Generic.type.c3a = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.ca1)] +// CHECK:STDOUT: generic fn @F(%T.loc9_15.2: %Generic.type.c3a) { +// CHECK:STDOUT: %T.patt.loc9_15.2: %pattern_type.338 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt.49c)] +// CHECK:STDOUT: %T.loc9_15.1: %Generic.type.c3a = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T.ca1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc10_7.2: %Generic.type.57d) { -// CHECK:STDOUT: %T.patt.loc10_7.2: %pattern_type.dae = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_7.2 (constants.%T.patt.b1f)] -// CHECK:STDOUT: %T.loc10_7.1: %Generic.type.57d = symbolic_binding T, 0 [symbolic = %T.loc10_7.1 (constants.%T.f18)] +// CHECK:STDOUT: generic fn @G(%T.loc10_15.2: %Generic.type.57d) { +// CHECK:STDOUT: %T.patt.loc10_15.2: %pattern_type.dae = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_15.2 (constants.%T.patt.b1f)] +// CHECK:STDOUT: %T.loc10_15.1: %Generic.type.57d = symbolic_binding T, 0 [symbolic = %T.loc10_15.1 (constants.%T.f18)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc18_6.2: type = facet_access_type %T.loc10_7.1 [symbolic = %T.as_type.loc18_6.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc18_6.2: type = facet_access_type %T.loc10_15.1 [symbolic = %T.as_type.loc18_6.2 (constants.%T.as_type)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref: %Generic.type.57d = name_ref T, %T.loc10_7.2 [symbolic = %T.loc10_7.1 (constants.%T.f18)] +// CHECK:STDOUT: %T.ref: %Generic.type.57d = name_ref T, %T.loc10_15.2 [symbolic = %T.loc10_15.1 (constants.%T.f18)] // CHECK:STDOUT: %T.as_type.loc18_6.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc18_6.2 (constants.%T.as_type)] // CHECK:STDOUT: return // CHECK:STDOUT: @@ -630,8 +630,8 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.ca1) { -// CHECK:STDOUT: %T.patt.loc9_7.2 => constants.%T.patt.49c -// CHECK:STDOUT: %T.loc9_7.1 => constants.%T.ca1 +// CHECK:STDOUT: %T.patt.loc9_15.2 => constants.%T.patt.49c +// CHECK:STDOUT: %T.loc9_15.1 => constants.%T.ca1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%B) { @@ -640,12 +640,12 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type => constants.%Generic.type.57d -// CHECK:STDOUT: %Self.loc4_29.2 => constants.%Self.cb2 +// CHECK:STDOUT: %Self.loc4_28.2 => constants.%Self.cb2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T.f18) { -// CHECK:STDOUT: %T.patt.loc10_7.2 => constants.%T.patt.b1f -// CHECK:STDOUT: %T.loc10_7.1 => constants.%T.f18 +// CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt.b1f +// CHECK:STDOUT: %T.loc10_15.1 => constants.%T.f18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.WithSelf(constants.%B, constants.%Self.8ea) { @@ -678,9 +678,9 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %Generic.decl: %Generic.type.30d = interface_decl @Generic [concrete = constants.%Generic.generic] { // CHECK:STDOUT: %T.patt.loc3_20.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_20.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_23.1: type = splice_block %.loc3_23.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_22.1: type = splice_block %.loc3_22.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_23.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_22.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc3_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_20.1 (constants.%T)] // CHECK:STDOUT: } @@ -690,8 +690,8 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %.1: = splice_block [concrete = ] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Generic.ref: %Generic.type.30d = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] -// CHECK:STDOUT: %.loc12_26: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc12_30: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc12_33: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc12_37: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: } // CHECK:STDOUT: %T: = symbolic_binding T, 0 [concrete = ] // CHECK:STDOUT: } @@ -703,14 +703,14 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%T.loc3_20.1)> [symbolic = %Generic.type (constants.%Generic.type.ee1)] -// CHECK:STDOUT: %Self.loc3_29.2: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc3_29.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc3_28.2: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc3_28.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_29.1: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc3_29.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc3_28.1: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc3_28.2 (constants.%Self)] // CHECK:STDOUT: %Generic.WithSelf.decl = interface_with_self_decl @Generic [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_29.1 +// CHECK:STDOUT: .Self = %Self.loc3_28.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: diff --git a/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon b/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon index 54423782a819..88865940194a 100644 --- a/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon +++ b/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon @@ -13,11 +13,11 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon interface I { - fn F(T:! type); - let U:! type; + fn F(generic T: type); + let U: type; // This `T` should have index 1, just like the `T` above. - // The intervening `U:! type` should not cause this to have index 2. - fn G(T:! type); + // The intervening `U: type` should not cause this to have index 2. + fn G(generic T: type); } // CHECK:STDOUT: --- generic_binding_after_assoc_const.carbon @@ -53,26 +53,26 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %I.WithSelf.F.decl: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F)] { -// CHECK:STDOUT: %T.patt.loc16_9.1: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc16_9.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc16_17.1: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc16_17.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_12.1: type = splice_block %.loc16_12.2 [concrete = type] { +// CHECK:STDOUT: %.loc16_19.1: type = splice_block %.loc16_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc16_12.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc16_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc16_9.2: type = symbolic_binding T, 1 [symbolic = %T.loc16_9.1 (constants.%T)] +// CHECK:STDOUT: %T.loc16_17.2: type = symbolic_binding T, 1 [symbolic = %T.loc16_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] { // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.WithSelf.%U [concrete = constants.%assoc1] // CHECK:STDOUT: } // CHECK:STDOUT: %I.WithSelf.G.decl: @I.WithSelf.%I.WithSelf.G.type (%I.WithSelf.G.type) = fn_decl @I.WithSelf.G [symbolic = @I.WithSelf.%I.WithSelf.G (constants.%I.WithSelf.G)] { -// CHECK:STDOUT: %T.patt.loc20_9.1: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc20_9.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc20_17.1: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc20_17.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_12.1: type = splice_block %.loc20_12.2 [concrete = type] { +// CHECK:STDOUT: %.loc20_19.1: type = splice_block %.loc20_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc20_12.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc20_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc20_9.2: type = symbolic_binding T, 1 [symbolic = %T.loc20_9.1 (constants.%T)] +// CHECK:STDOUT: %T.loc20_17.2: type = symbolic_binding T, 1 [symbolic = %T.loc20_17.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, %I.WithSelf.G.decl [concrete = constants.%assoc2] // CHECK:STDOUT: @@ -88,16 +88,16 @@ interface I { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self: %I.type, %T.loc16_9.2: type) { -// CHECK:STDOUT: %T.patt.loc16_9.2: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc16_9.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc16_9.1: type = symbolic_binding T, 1 [symbolic = %T.loc16_9.1 (constants.%T)] +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self: %I.type, %T.loc16_17.2: type) { +// CHECK:STDOUT: %T.patt.loc16_17.2: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc16_17.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc16_17.1: type = symbolic_binding T, 1 [symbolic = %T.loc16_17.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.WithSelf.G(@I.%Self: %I.type, %T.loc20_9.2: type) { -// CHECK:STDOUT: %T.patt.loc20_9.2: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc20_9.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc20_9.1: type = symbolic_binding T, 1 [symbolic = %T.loc20_9.1 (constants.%T)] +// CHECK:STDOUT: generic fn @I.WithSelf.G(@I.%Self: %I.type, %T.loc20_17.2: type) { +// CHECK:STDOUT: %T.patt.loc20_17.2: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc20_17.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc20_17.1: type = symbolic_binding T, 1 [symbolic = %T.loc20_17.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -105,12 +105,12 @@ interface I { // CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self, constants.%T) { -// CHECK:STDOUT: %T.patt.loc16_9.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc16_9.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc16_17.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc16_17.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf.G(constants.%Self, constants.%T) { -// CHECK:STDOUT: %T.patt.loc20_9.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc20_9.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc20_17.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc20_17.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_default_fn.carbon b/toolchain/check/testdata/interface/generic_default_fn.carbon index 75ee76d6e0c9..57de79de9576 100644 --- a/toolchain/check/testdata/interface/generic_default_fn.carbon +++ b/toolchain/check/testdata/interface/generic_default_fn.carbon @@ -10,11 +10,11 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/generic_default_fn.carbon -interface I(_:! type) { +interface I(_: type) { // TODO: Use `default` here. fn F(ref self) -> Self*; } -fn I(_:! type).F(ref self) -> Self* { +fn I(_: type).F(ref self) -> Self* { return &self; } diff --git a/toolchain/check/testdata/interface/generic_import.carbon b/toolchain/check/testdata/interface/generic_import.carbon index 8b68e8fd752a..a0b3e83668aa 100644 --- a/toolchain/check/testdata/interface/generic_import.carbon +++ b/toolchain/check/testdata/interface/generic_import.carbon @@ -16,7 +16,7 @@ library "[[@TEST_NAME]]"; -interface AddWith(T:! type) { +interface AddWith(T: type) { fn F(); } @@ -56,9 +56,9 @@ impl C as AddWith(C) { // CHECK:STDOUT: %AddWith.decl: %AddWith.type.097 = interface_decl @AddWith [concrete = constants.%AddWith.generic] { // CHECK:STDOUT: %T.patt.loc4_20.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_20.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_23.1: type = splice_block %.loc4_23.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_22.1: type = splice_block %.loc4_22.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_23.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_22.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_20.1 (constants.%T)] // CHECK:STDOUT: } @@ -70,10 +70,10 @@ impl C as AddWith(C) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T.loc4_20.1)> [symbolic = %AddWith.type (constants.%AddWith.type.e7b)] -// CHECK:STDOUT: %Self.loc4_29.2: @AddWith.%AddWith.type (%AddWith.type.e7b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc4_28.2: @AddWith.%AddWith.type (%AddWith.type.e7b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_29.1: @AddWith.%AddWith.type (%AddWith.type.e7b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc4_28.1: @AddWith.%AddWith.type (%AddWith.type.e7b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self)] // CHECK:STDOUT: %AddWith.WithSelf.decl = interface_with_self_decl @AddWith [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -81,7 +81,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: %assoc0.loc5_9.1: @AddWith.WithSelf.%AddWith.assoc_type (%AddWith.assoc_type) = assoc_entity element0, %AddWith.WithSelf.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_29.1 +// CHECK:STDOUT: .Self = %Self.loc4_28.1 // CHECK:STDOUT: .F = @AddWith.WithSelf.%assoc0.loc5_9.1 // CHECK:STDOUT: witness = (@AddWith.WithSelf.%AddWith.WithSelf.F.decl) // CHECK:STDOUT: @@ -91,7 +91,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AddWith.WithSelf.F(@AddWith.%T.loc4_20.2: type, @AddWith.%Self.loc4_29.1: @AddWith.%AddWith.type (%AddWith.type.e7b)) { +// CHECK:STDOUT: generic fn @AddWith.WithSelf.F(@AddWith.%T.loc4_20.2: type, @AddWith.%Self.loc4_28.1: @AddWith.%AddWith.type (%AddWith.type.e7b)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -139,8 +139,8 @@ impl C as AddWith(C) { // CHECK:STDOUT: %Main.F: @AddWith.WithSelf.%AddWith.WithSelf.F.type (%AddWith.WithSelf.F.type.ada) = import_ref Main//a, F, loaded [symbolic = @AddWith.WithSelf.%AddWith.WithSelf.F (constants.%AddWith.WithSelf.F.2ed)] // CHECK:STDOUT: %Main.import_ref.b87 = import_ref Main//a, loc5_9, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//a, loc4_20, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.08ad54.2: @AddWith.%AddWith.type (%AddWith.type.e7b) = import_ref Main//a, loc4_29, loaded [symbolic = @AddWith.%Self (constants.%Self.403)] -// CHECK:STDOUT: %Main.import_ref.a0a = import_ref Main//a, loc4_29, unloaded +// CHECK:STDOUT: %Main.import_ref.08ad54.2: @AddWith.%AddWith.type (%AddWith.type.e7b) = import_ref Main//a, loc4_28, loaded [symbolic = @AddWith.%Self (constants.%Self.403)] +// CHECK:STDOUT: %Main.import_ref.a0a = import_ref Main//a, loc4_28, unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//a, loc4_20, loaded [symbolic = @AddWith.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_method.carbon b/toolchain/check/testdata/interface/generic_method.carbon index 9f9cbeda96d0..9b1fba1e1f38 100644 --- a/toolchain/check/testdata/interface/generic_method.carbon +++ b/toolchain/check/testdata/interface/generic_method.carbon @@ -17,8 +17,8 @@ library "[[@TEST_NAME]]"; // T has index 0, Self has index 1, U has index 2. -interface A(T:! type) { - fn F(U:! type, u: U*) -> (T, Self, U*); +interface A(T: type) { + fn F(generic U: type, u: U*) -> (T, Self, U*); } class X {} @@ -28,7 +28,7 @@ class Z {} impl Y as A(X) { // Here, U has index 0. The specific used for A.F needs to renumber its U from // index 2 to index 0. - fn F(U:! type, u: U*) -> (X, Y, U*) { + fn F(generic U: type, u: U*) -> (X, Y, U*) { return ({}, {}, u); } } @@ -38,7 +38,7 @@ fn Call() { (Y as A(X)).F(Z, &u); } -fn CallGeneric(T:! A(X) & Core.Destroy) { +fn CallGeneric(generic T: A(X) & Core.Destroy) { var u: Z; T.F(Z, &u); } @@ -52,8 +52,8 @@ fn CallIndirect() { library "[[@TEST_NAME]]"; // T has index 0, Self has index 1, U has index 2. -interface A(T:! type) { - fn F(U:! type, u: U) -> (T, Self, U); +interface A(T: type) { + fn F(generic U: type, u: U) -> (T, Self, U); } class X {} @@ -61,10 +61,10 @@ class Y1 {} class Y2 {} class Z {} -impl forall [V1:! type, V2:! type, W:! type] (V1, V2) as A(W) { +impl forall [V1: type, V2: type, W: type] (V1, V2) as A(W) { // Here, U has index 3. The specific used for A.F needs to renumber its U from // index 2 to index 3. - fn F(U:! type, u: U) -> (W, (V1, V2), U) { + fn F(generic U: type, u: U) -> (W, (V1, V2), U) { return F(U, u); } } @@ -74,7 +74,7 @@ fn Call() { (((Y1, Y2) as type) as A(X)).F(Z, {}); } -fn CallGeneric(T:! A(X) & Core.Destroy) { +fn CallGeneric(generic T: A(X) & Core.Destroy) { T.F(Z, {}); } @@ -293,9 +293,9 @@ fn CallIndirect() { // CHECK:STDOUT: %A.decl: %A.type.55a = interface_decl @A [concrete = constants.%A.generic] { // CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_16.1: type = splice_block %.loc5_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.67d)] // CHECK:STDOUT: } @@ -310,9 +310,9 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {} // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] { -// CHECK:STDOUT: %T.patt.loc26_17.1: %pattern_type.871 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_17.2 (constants.%T.patt.c17)] +// CHECK:STDOUT: %T.patt.loc26_25.1: %pattern_type.871 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_25.2 (constants.%T.patt.c17)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc26_25.1: type = splice_block %.loc26_25.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %.loc26_32.1: type = splice_block %.loc26_32.3 [concrete = constants.%facet_type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %A.ref: %A.type.55a = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] @@ -322,10 +322,10 @@ fn CallIndirect() { // CHECK:STDOUT: %impl.elem0.loc26: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc26: = bound_method %A.type, %impl.elem0.loc26 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc26(%A.type, %Destroy.ref) [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc26_25.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc26_25.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc26_25.2 [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc26_32.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc26_32.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc26_32.2 [concrete = constants.%facet_type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc26_17.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc26_17.1 (constants.%T.5b7)] +// CHECK:STDOUT: %T.loc26_25.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc26_25.1 (constants.%T.5b7)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {} // CHECK:STDOUT: } @@ -336,51 +336,51 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc5_14.1)> [symbolic = %A.type (constants.%A.type.acd)] -// CHECK:STDOUT: %Self.loc5_23.2: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.49a)] +// CHECK:STDOUT: %Self.loc5_22.2: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc5_22.2 (constants.%Self.49a)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc5_23.1: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.49a)] +// CHECK:STDOUT: %Self.loc5_22.1: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc5_22.2 (constants.%Self.49a)] // CHECK:STDOUT: %A.WithSelf.decl = interface_with_self_decl @A [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %A.WithSelf.F.decl: @A.WithSelf.%A.WithSelf.F.type (%A.WithSelf.F.type.08d) = fn_decl @A.WithSelf.F [symbolic = @A.WithSelf.%A.WithSelf.F (constants.%A.WithSelf.F.3fa)] { -// CHECK:STDOUT: %U.patt.loc6_9.1: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_9.2 (constants.%U.patt.b22)] -// CHECK:STDOUT: %u.param_patt.loc6_19.1: @A.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.986) = value_param_pattern [symbolic = %u.param_patt.loc6_19.2 (constants.%u.param_patt.a01)] -// CHECK:STDOUT: %u.patt.loc6_19.1: @A.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.986) = at_binding_pattern u, %u.param_patt.loc6_19.1 [symbolic = %u.patt.loc6_19.2 (constants.%u.patt.c78)] -// CHECK:STDOUT: %return.param_patt.loc6_40.1: @A.WithSelf.F.%pattern_type.loc6_40 (%pattern_type.0d7) = out_param_pattern [symbolic = %return.param_patt.loc6_40.2 (constants.%return.param_patt.9d3)] -// CHECK:STDOUT: %return.patt.loc6_25.1: @A.WithSelf.F.%pattern_type.loc6_40 (%pattern_type.0d7) = return_slot_pattern %return.param_patt.loc6_40.1, %.loc6_40.4 [symbolic = %return.patt.loc6_25.2 (constants.%return.patt.8aa)] +// CHECK:STDOUT: %U.patt.loc6_17.1: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_17.2 (constants.%U.patt.b22)] +// CHECK:STDOUT: %u.param_patt.loc6_26.1: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.986) = value_param_pattern [symbolic = %u.param_patt.loc6_26.2 (constants.%u.param_patt.a01)] +// CHECK:STDOUT: %u.patt.loc6_26.1: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.986) = at_binding_pattern u, %u.param_patt.loc6_26.1 [symbolic = %u.patt.loc6_26.2 (constants.%u.patt.c78)] +// CHECK:STDOUT: %return.param_patt.loc6_47.1: @A.WithSelf.F.%pattern_type.loc6_47 (%pattern_type.0d7) = out_param_pattern [symbolic = %return.param_patt.loc6_47.2 (constants.%return.param_patt.9d3)] +// CHECK:STDOUT: %return.patt.loc6_32.1: @A.WithSelf.F.%pattern_type.loc6_47 (%pattern_type.0d7) = return_slot_pattern %return.param_patt.loc6_47.1, %.loc6_47.4 [symbolic = %return.patt.loc6_32.2 (constants.%return.patt.8aa)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_14.2 [symbolic = %T (constants.%T.67d)] -// CHECK:STDOUT: %.loc6_32: @A.WithSelf.F.%A.type (%A.type.acd) = specific_constant @A.%Self.loc5_23.1, @A(constants.%T.67d) [symbolic = %Self (constants.%Self.49a)] -// CHECK:STDOUT: %Self.ref: @A.WithSelf.F.%A.type (%A.type.acd) = name_ref Self, %.loc6_32 [symbolic = %Self (constants.%Self.49a)] -// CHECK:STDOUT: %U.ref.loc6_38: type = name_ref U, %U.loc6_9.2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)] -// CHECK:STDOUT: %ptr.loc6_39: type = ptr_type %U.ref.loc6_38 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)] -// CHECK:STDOUT: %.loc6_40.2: @A.WithSelf.F.%tuple.type.loc6_40.1 (%tuple.type.76f) = tuple_literal (%T.ref, %Self.ref, %ptr.loc6_39) [symbolic = %tuple (constants.%tuple.0f4)] -// CHECK:STDOUT: %Self.as_type.loc6_40.2: type = facet_access_type constants.%Self.49a [symbolic = %Self.as_type.loc6_40.1 (constants.%Self.as_type.763)] -// CHECK:STDOUT: %.loc6_40.3: type = converted constants.%Self.49a, %Self.as_type.loc6_40.2 [symbolic = %Self.as_type.loc6_40.1 (constants.%Self.as_type.763)] -// CHECK:STDOUT: %.loc6_40.4: type = converted %.loc6_40.2, constants.%tuple.type.640 [symbolic = %tuple.type.loc6_40.2 (constants.%tuple.type.640)] -// CHECK:STDOUT: %.loc6_40.5: Core.Form = init_form %.loc6_40.4 [symbolic = %.loc6_40.1 (constants.%.f0d)] -// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_39: @A.WithSelf.F.%A.type (%A.type.acd) = specific_constant @A.%Self.loc5_22.1, @A(constants.%T.67d) [symbolic = %Self (constants.%Self.49a)] +// CHECK:STDOUT: %Self.ref: @A.WithSelf.F.%A.type (%A.type.acd) = name_ref Self, %.loc6_39 [symbolic = %Self (constants.%Self.49a)] +// CHECK:STDOUT: %U.ref.loc6_45: type = name_ref U, %U.loc6_17.2 [symbolic = %U.loc6_17.1 (constants.%U.4e7)] +// CHECK:STDOUT: %ptr.loc6_46: type = ptr_type %U.ref.loc6_45 [symbolic = %ptr.loc6_29.1 (constants.%ptr.8f6)] +// CHECK:STDOUT: %.loc6_47.2: @A.WithSelf.F.%tuple.type.loc6_47.1 (%tuple.type.76f) = tuple_literal (%T.ref, %Self.ref, %ptr.loc6_46) [symbolic = %tuple (constants.%tuple.0f4)] +// CHECK:STDOUT: %Self.as_type.loc6_47.2: type = facet_access_type constants.%Self.49a [symbolic = %Self.as_type.loc6_47.1 (constants.%Self.as_type.763)] +// CHECK:STDOUT: %.loc6_47.3: type = converted constants.%Self.49a, %Self.as_type.loc6_47.2 [symbolic = %Self.as_type.loc6_47.1 (constants.%Self.as_type.763)] +// CHECK:STDOUT: %.loc6_47.4: type = converted %.loc6_47.2, constants.%tuple.type.640 [symbolic = %tuple.type.loc6_47.2 (constants.%tuple.type.640)] +// CHECK:STDOUT: %.loc6_47.5: Core.Form = init_form %.loc6_47.4 [symbolic = %.loc6_47.1 (constants.%.f0d)] +// CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc6_9.2: type = symbolic_binding U, 2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)] -// CHECK:STDOUT: %u.param: @A.WithSelf.F.%ptr.loc6_22.1 (%ptr.8f6) = value_param call_param0 -// CHECK:STDOUT: %.loc6_22: type = splice_block %ptr.loc6_22.2 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)] { -// CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_9.2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)] -// CHECK:STDOUT: %ptr.loc6_22.2: type = ptr_type %U.ref.loc6_21 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)] +// CHECK:STDOUT: %U.loc6_17.2: type = symbolic_binding U, 2 [symbolic = %U.loc6_17.1 (constants.%U.4e7)] +// CHECK:STDOUT: %u.param: @A.WithSelf.F.%ptr.loc6_29.1 (%ptr.8f6) = value_param call_param0 +// CHECK:STDOUT: %.loc6_29: type = splice_block %ptr.loc6_29.2 [symbolic = %ptr.loc6_29.1 (constants.%ptr.8f6)] { +// CHECK:STDOUT: %U.ref.loc6_28: type = name_ref U, %U.loc6_17.2 [symbolic = %U.loc6_17.1 (constants.%U.4e7)] +// CHECK:STDOUT: %ptr.loc6_29.2: type = ptr_type %U.ref.loc6_28 [symbolic = %ptr.loc6_29.1 (constants.%ptr.8f6)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @A.WithSelf.F.%ptr.loc6_22.1 (%ptr.8f6) = wrapper_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @A.WithSelf.F.%tuple.type.loc6_40.2 (%tuple.type.640) = out_param call_param1 -// CHECK:STDOUT: %return: ref @A.WithSelf.F.%tuple.type.loc6_40.2 (%tuple.type.640) = return_slot %return.param +// CHECK:STDOUT: %u: @A.WithSelf.F.%ptr.loc6_29.1 (%ptr.8f6) = wrapper_binding u, %u.param +// CHECK:STDOUT: %return.param: ref @A.WithSelf.F.%tuple.type.loc6_47.2 (%tuple.type.640) = out_param call_param1 +// CHECK:STDOUT: %return: ref @A.WithSelf.F.%tuple.type.loc6_47.2 (%tuple.type.640) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc6_41.1: @A.WithSelf.%A.assoc_type (%A.assoc_type.447) = assoc_entity element0, %A.WithSelf.F.decl [symbolic = %assoc0.loc6_41.2 (constants.%assoc0.d4b)] +// CHECK:STDOUT: %assoc0.loc6_48.1: @A.WithSelf.%A.assoc_type (%A.assoc_type.447) = assoc_entity element0, %A.WithSelf.F.decl [symbolic = %assoc0.loc6_48.2 (constants.%assoc0.d4b)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc5_23.1 +// CHECK:STDOUT: .Self = %Self.loc5_22.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = -// CHECK:STDOUT: .F = @A.WithSelf.%assoc0.loc6_41.1 +// CHECK:STDOUT: .F = @A.WithSelf.%assoc0.loc6_48.1 // CHECK:STDOUT: .X = // CHECK:STDOUT: .Y = // CHECK:STDOUT: witness = (@A.WithSelf.%A.WithSelf.F.decl) @@ -393,30 +393,30 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: impl @Y.as.A.impl: %Y.ref as %A.type { // CHECK:STDOUT: %Y.as.A.impl.F.decl: %Y.as.A.impl.F.type = fn_decl @Y.as.A.impl.F [concrete = constants.%Y.as.A.impl.F] { -// CHECK:STDOUT: %U.patt.loc16_9.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc16_9.2 (constants.%U.patt.d47)] -// CHECK:STDOUT: %u.param_patt.loc16_19.1: @Y.as.A.impl.F.%pattern_type.loc16_19 (%pattern_type.4f4b84.1) = value_param_pattern [symbolic = %u.param_patt.loc16_19.2 (constants.%u.param_patt.58b)] -// CHECK:STDOUT: %u.patt.loc16_19.1: @Y.as.A.impl.F.%pattern_type.loc16_19 (%pattern_type.4f4b84.1) = at_binding_pattern u, %u.param_patt.loc16_19.1 [symbolic = %u.patt.loc16_19.2 (constants.%u.patt.542)] -// CHECK:STDOUT: %return.param_patt.loc16_37.1: @Y.as.A.impl.F.%pattern_type.loc16_37 (%pattern_type.178) = out_param_pattern [symbolic = %return.param_patt.loc16_37.2 (constants.%return.param_patt.b96)] -// CHECK:STDOUT: %return.patt.loc16_25.1: @Y.as.A.impl.F.%pattern_type.loc16_37 (%pattern_type.178) = return_slot_pattern %return.param_patt.loc16_37.1, %.loc16_37.3 [symbolic = %return.patt.loc16_25.2 (constants.%return.patt.f2f)] +// CHECK:STDOUT: %U.patt.loc16_17.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc16_17.2 (constants.%U.patt.d47)] +// CHECK:STDOUT: %u.param_patt.loc16_26.1: @Y.as.A.impl.F.%pattern_type.loc16_26 (%pattern_type.4f4b84.1) = value_param_pattern [symbolic = %u.param_patt.loc16_26.2 (constants.%u.param_patt.58b)] +// CHECK:STDOUT: %u.patt.loc16_26.1: @Y.as.A.impl.F.%pattern_type.loc16_26 (%pattern_type.4f4b84.1) = at_binding_pattern u, %u.param_patt.loc16_26.1 [symbolic = %u.patt.loc16_26.2 (constants.%u.patt.542)] +// CHECK:STDOUT: %return.param_patt.loc16_44.1: @Y.as.A.impl.F.%pattern_type.loc16_44 (%pattern_type.178) = out_param_pattern [symbolic = %return.param_patt.loc16_44.2 (constants.%return.param_patt.b96)] +// CHECK:STDOUT: %return.patt.loc16_32.1: @Y.as.A.impl.F.%pattern_type.loc16_44 (%pattern_type.178) = return_slot_pattern %return.param_patt.loc16_44.1, %.loc16_44.3 [symbolic = %return.patt.loc16_32.2 (constants.%return.patt.f2f)] // CHECK:STDOUT: } { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y] -// CHECK:STDOUT: %U.ref.loc16_35: type = name_ref U, %U.loc16_9.2 [symbolic = %U.loc16_9.1 (constants.%U.67d)] -// CHECK:STDOUT: %ptr.loc16_36: type = ptr_type %U.ref.loc16_35 [symbolic = %ptr.loc16_22.1 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %.loc16_37.2: %tuple.type.ff9 = tuple_literal (%X.ref, %Y.ref, %ptr.loc16_36) [symbolic = %tuple (constants.%tuple.f57)] -// CHECK:STDOUT: %.loc16_37.3: type = converted %.loc16_37.2, constants.%tuple.type.316 [symbolic = %tuple.type.loc16 (constants.%tuple.type.316)] -// CHECK:STDOUT: %.loc16_37.4: Core.Form = init_form %.loc16_37.3 [symbolic = %.loc16_37.1 (constants.%.3c1)] -// CHECK:STDOUT: %.loc16_12.1: type = splice_block %.loc16_12.2 [concrete = type] { +// CHECK:STDOUT: %U.ref.loc16_42: type = name_ref U, %U.loc16_17.2 [symbolic = %U.loc16_17.1 (constants.%U.67d)] +// CHECK:STDOUT: %ptr.loc16_43: type = ptr_type %U.ref.loc16_42 [symbolic = %ptr.loc16_29.1 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %.loc16_44.2: %tuple.type.ff9 = tuple_literal (%X.ref, %Y.ref, %ptr.loc16_43) [symbolic = %tuple (constants.%tuple.f57)] +// CHECK:STDOUT: %.loc16_44.3: type = converted %.loc16_44.2, constants.%tuple.type.316 [symbolic = %tuple.type.loc16 (constants.%tuple.type.316)] +// CHECK:STDOUT: %.loc16_44.4: Core.Form = init_form %.loc16_44.3 [symbolic = %.loc16_44.1 (constants.%.3c1)] +// CHECK:STDOUT: %.loc16_19.1: type = splice_block %.loc16_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc16_12.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc16_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc16_9.2: type = symbolic_binding U, 0 [symbolic = %U.loc16_9.1 (constants.%U.67d)] -// CHECK:STDOUT: %u.param: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = value_param call_param0 -// CHECK:STDOUT: %.loc16_22: type = splice_block %ptr.loc16_22.2 [symbolic = %ptr.loc16_22.1 (constants.%ptr.e8f8f9.1)] { -// CHECK:STDOUT: %U.ref.loc16_21: type = name_ref U, %U.loc16_9.2 [symbolic = %U.loc16_9.1 (constants.%U.67d)] -// CHECK:STDOUT: %ptr.loc16_22.2: type = ptr_type %U.ref.loc16_21 [symbolic = %ptr.loc16_22.1 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %U.loc16_17.2: type = symbolic_binding U, 0 [symbolic = %U.loc16_17.1 (constants.%U.67d)] +// CHECK:STDOUT: %u.param: @Y.as.A.impl.F.%ptr.loc16_29.1 (%ptr.e8f8f9.1) = value_param call_param0 +// CHECK:STDOUT: %.loc16_29: type = splice_block %ptr.loc16_29.2 [symbolic = %ptr.loc16_29.1 (constants.%ptr.e8f8f9.1)] { +// CHECK:STDOUT: %U.ref.loc16_28: type = name_ref U, %U.loc16_17.2 [symbolic = %U.loc16_17.1 (constants.%U.67d)] +// CHECK:STDOUT: %ptr.loc16_29.2: type = ptr_type %U.ref.loc16_28 [symbolic = %ptr.loc16_29.1 (constants.%ptr.e8f8f9.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = wrapper_binding u, %u.param +// CHECK:STDOUT: %u: @Y.as.A.impl.F.%ptr.loc16_29.1 (%ptr.e8f8f9.1) = wrapper_binding u, %u.param // CHECK:STDOUT: %return.param: ref @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.316) = out_param call_param1 // CHECK:STDOUT: %return: ref @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.316) = return_slot %return.param // CHECK:STDOUT: } @@ -455,59 +455,59 @@ fn CallIndirect() { // CHECK:STDOUT: .Self = constants.%Z // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%T.loc5_14.2: type, @A.%Self.loc5_23.1: @A.%A.type (%A.type.acd), %U.loc6_9.2: type) { -// CHECK:STDOUT: %U.patt.loc6_9.2: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_9.2 (constants.%U.patt.b22)] -// CHECK:STDOUT: %U.loc6_9.1: type = symbolic_binding U, 2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)] -// CHECK:STDOUT: %ptr.loc6_22.1: type = ptr_type %U.loc6_9.1 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)] -// CHECK:STDOUT: %pattern_type.loc6_19: type = pattern_type %ptr.loc6_22.1 [symbolic = %pattern_type.loc6_19 (constants.%pattern_type.986)] -// CHECK:STDOUT: %u.param_patt.loc6_19.2: @A.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.986) = value_param_pattern [symbolic = %u.param_patt.loc6_19.2 (constants.%u.param_patt.a01)] -// CHECK:STDOUT: %u.patt.loc6_19.2: @A.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.986) = at_binding_pattern u, %u.param_patt.loc6_19.2 [symbolic = %u.patt.loc6_19.2 (constants.%u.patt.c78)] +// CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%T.loc5_14.2: type, @A.%Self.loc5_22.1: @A.%A.type (%A.type.acd), %U.loc6_17.2: type) { +// CHECK:STDOUT: %U.patt.loc6_17.2: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_17.2 (constants.%U.patt.b22)] +// CHECK:STDOUT: %U.loc6_17.1: type = symbolic_binding U, 2 [symbolic = %U.loc6_17.1 (constants.%U.4e7)] +// CHECK:STDOUT: %ptr.loc6_29.1: type = ptr_type %U.loc6_17.1 [symbolic = %ptr.loc6_29.1 (constants.%ptr.8f6)] +// CHECK:STDOUT: %pattern_type.loc6_26: type = pattern_type %ptr.loc6_29.1 [symbolic = %pattern_type.loc6_26 (constants.%pattern_type.986)] +// CHECK:STDOUT: %u.param_patt.loc6_26.2: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.986) = value_param_pattern [symbolic = %u.param_patt.loc6_26.2 (constants.%u.param_patt.a01)] +// CHECK:STDOUT: %u.patt.loc6_26.2: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.986) = at_binding_pattern u, %u.param_patt.loc6_26.2 [symbolic = %u.patt.loc6_26.2 (constants.%u.patt.c78)] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T)> [symbolic = %A.type (constants.%A.type.acd)] // CHECK:STDOUT: %Self: @A.WithSelf.F.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.49a)] -// CHECK:STDOUT: %tuple.type.loc6_40.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_40.1 (constants.%tuple.type.76f)] -// CHECK:STDOUT: %tuple: @A.WithSelf.F.%tuple.type.loc6_40.1 (%tuple.type.76f) = tuple_value (%T, %Self, %ptr.loc6_22.1) [symbolic = %tuple (constants.%tuple.0f4)] -// CHECK:STDOUT: %Self.as_type.loc6_40.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_40.1 (constants.%Self.as_type.763)] -// CHECK:STDOUT: %tuple.type.loc6_40.2: type = tuple_type (%T, %Self.as_type.loc6_40.1, %ptr.loc6_22.1) [symbolic = %tuple.type.loc6_40.2 (constants.%tuple.type.640)] -// CHECK:STDOUT: %.loc6_40.1: Core.Form = init_form %tuple.type.loc6_40.2 [symbolic = %.loc6_40.1 (constants.%.f0d)] -// CHECK:STDOUT: %pattern_type.loc6_40: type = pattern_type %tuple.type.loc6_40.2 [symbolic = %pattern_type.loc6_40 (constants.%pattern_type.0d7)] -// CHECK:STDOUT: %return.param_patt.loc6_40.2: @A.WithSelf.F.%pattern_type.loc6_40 (%pattern_type.0d7) = out_param_pattern [symbolic = %return.param_patt.loc6_40.2 (constants.%return.param_patt.9d3)] -// CHECK:STDOUT: %return.patt.loc6_25.2: @A.WithSelf.F.%pattern_type.loc6_40 (%pattern_type.0d7) = return_slot_pattern %return.param_patt.loc6_40.2, %tuple.type.loc6_40.2 [symbolic = %return.patt.loc6_25.2 (constants.%return.patt.8aa)] +// CHECK:STDOUT: %tuple.type.loc6_47.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_47.1 (constants.%tuple.type.76f)] +// CHECK:STDOUT: %tuple: @A.WithSelf.F.%tuple.type.loc6_47.1 (%tuple.type.76f) = tuple_value (%T, %Self, %ptr.loc6_29.1) [symbolic = %tuple (constants.%tuple.0f4)] +// CHECK:STDOUT: %Self.as_type.loc6_47.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_47.1 (constants.%Self.as_type.763)] +// CHECK:STDOUT: %tuple.type.loc6_47.2: type = tuple_type (%T, %Self.as_type.loc6_47.1, %ptr.loc6_29.1) [symbolic = %tuple.type.loc6_47.2 (constants.%tuple.type.640)] +// CHECK:STDOUT: %.loc6_47.1: Core.Form = init_form %tuple.type.loc6_47.2 [symbolic = %.loc6_47.1 (constants.%.f0d)] +// CHECK:STDOUT: %pattern_type.loc6_47: type = pattern_type %tuple.type.loc6_47.2 [symbolic = %pattern_type.loc6_47 (constants.%pattern_type.0d7)] +// CHECK:STDOUT: %return.param_patt.loc6_47.2: @A.WithSelf.F.%pattern_type.loc6_47 (%pattern_type.0d7) = out_param_pattern [symbolic = %return.param_patt.loc6_47.2 (constants.%return.param_patt.9d3)] +// CHECK:STDOUT: %return.patt.loc6_32.2: @A.WithSelf.F.%pattern_type.loc6_47 (%pattern_type.0d7) = return_slot_pattern %return.param_patt.loc6_47.2, %tuple.type.loc6_47.2 [symbolic = %return.patt.loc6_32.2 (constants.%return.patt.8aa)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @A.WithSelf.F.%ptr.loc6_22.1 (%ptr.8f6)) -> out %return.param: @A.WithSelf.F.%tuple.type.loc6_40.2 (%tuple.type.640); +// CHECK:STDOUT: fn(%u.param: @A.WithSelf.F.%ptr.loc6_29.1 (%ptr.8f6)) -> out %return.param: @A.WithSelf.F.%tuple.type.loc6_47.2 (%tuple.type.640); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Y.as.A.impl.F(%U.loc16_9.2: type) { -// CHECK:STDOUT: %U.patt.loc16_9.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc16_9.2 (constants.%U.patt.d47)] -// CHECK:STDOUT: %U.loc16_9.1: type = symbolic_binding U, 0 [symbolic = %U.loc16_9.1 (constants.%U.67d)] -// CHECK:STDOUT: %ptr.loc16_22.1: type = ptr_type %U.loc16_9.1 [symbolic = %ptr.loc16_22.1 (constants.%ptr.e8f8f9.1)] -// CHECK:STDOUT: %pattern_type.loc16_19: type = pattern_type %ptr.loc16_22.1 [symbolic = %pattern_type.loc16_19 (constants.%pattern_type.4f4b84.1)] -// CHECK:STDOUT: %u.param_patt.loc16_19.2: @Y.as.A.impl.F.%pattern_type.loc16_19 (%pattern_type.4f4b84.1) = value_param_pattern [symbolic = %u.param_patt.loc16_19.2 (constants.%u.param_patt.58b)] -// CHECK:STDOUT: %u.patt.loc16_19.2: @Y.as.A.impl.F.%pattern_type.loc16_19 (%pattern_type.4f4b84.1) = at_binding_pattern u, %u.param_patt.loc16_19.2 [symbolic = %u.patt.loc16_19.2 (constants.%u.patt.542)] -// CHECK:STDOUT: %tuple: %tuple.type.ff9 = tuple_value (constants.%X, constants.%Y, %ptr.loc16_22.1) [symbolic = %tuple (constants.%tuple.f57)] -// CHECK:STDOUT: %tuple.type.loc16: type = tuple_type (constants.%X, constants.%Y, %ptr.loc16_22.1) [symbolic = %tuple.type.loc16 (constants.%tuple.type.316)] -// CHECK:STDOUT: %.loc16_37.1: Core.Form = init_form %tuple.type.loc16 [symbolic = %.loc16_37.1 (constants.%.3c1)] -// CHECK:STDOUT: %pattern_type.loc16_37: type = pattern_type %tuple.type.loc16 [symbolic = %pattern_type.loc16_37 (constants.%pattern_type.178)] -// CHECK:STDOUT: %return.param_patt.loc16_37.2: @Y.as.A.impl.F.%pattern_type.loc16_37 (%pattern_type.178) = out_param_pattern [symbolic = %return.param_patt.loc16_37.2 (constants.%return.param_patt.b96)] -// CHECK:STDOUT: %return.patt.loc16_25.2: @Y.as.A.impl.F.%pattern_type.loc16_37 (%pattern_type.178) = return_slot_pattern %return.param_patt.loc16_37.2, %tuple.type.loc16 [symbolic = %return.patt.loc16_25.2 (constants.%return.patt.f2f)] +// CHECK:STDOUT: generic fn @Y.as.A.impl.F(%U.loc16_17.2: type) { +// CHECK:STDOUT: %U.patt.loc16_17.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc16_17.2 (constants.%U.patt.d47)] +// CHECK:STDOUT: %U.loc16_17.1: type = symbolic_binding U, 0 [symbolic = %U.loc16_17.1 (constants.%U.67d)] +// CHECK:STDOUT: %ptr.loc16_29.1: type = ptr_type %U.loc16_17.1 [symbolic = %ptr.loc16_29.1 (constants.%ptr.e8f8f9.1)] +// CHECK:STDOUT: %pattern_type.loc16_26: type = pattern_type %ptr.loc16_29.1 [symbolic = %pattern_type.loc16_26 (constants.%pattern_type.4f4b84.1)] +// CHECK:STDOUT: %u.param_patt.loc16_26.2: @Y.as.A.impl.F.%pattern_type.loc16_26 (%pattern_type.4f4b84.1) = value_param_pattern [symbolic = %u.param_patt.loc16_26.2 (constants.%u.param_patt.58b)] +// CHECK:STDOUT: %u.patt.loc16_26.2: @Y.as.A.impl.F.%pattern_type.loc16_26 (%pattern_type.4f4b84.1) = at_binding_pattern u, %u.param_patt.loc16_26.2 [symbolic = %u.patt.loc16_26.2 (constants.%u.patt.542)] +// CHECK:STDOUT: %tuple: %tuple.type.ff9 = tuple_value (constants.%X, constants.%Y, %ptr.loc16_29.1) [symbolic = %tuple (constants.%tuple.f57)] +// CHECK:STDOUT: %tuple.type.loc16: type = tuple_type (constants.%X, constants.%Y, %ptr.loc16_29.1) [symbolic = %tuple.type.loc16 (constants.%tuple.type.316)] +// CHECK:STDOUT: %.loc16_44.1: Core.Form = init_form %tuple.type.loc16 [symbolic = %.loc16_44.1 (constants.%.3c1)] +// CHECK:STDOUT: %pattern_type.loc16_44: type = pattern_type %tuple.type.loc16 [symbolic = %pattern_type.loc16_44 (constants.%pattern_type.178)] +// CHECK:STDOUT: %return.param_patt.loc16_44.2: @Y.as.A.impl.F.%pattern_type.loc16_44 (%pattern_type.178) = out_param_pattern [symbolic = %return.param_patt.loc16_44.2 (constants.%return.param_patt.b96)] +// CHECK:STDOUT: %return.patt.loc16_32.2: @Y.as.A.impl.F.%pattern_type.loc16_44 (%pattern_type.178) = return_slot_pattern %return.param_patt.loc16_44.2, %tuple.type.loc16 [symbolic = %return.patt.loc16_32.2 (constants.%return.patt.f2f)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc16_19: = require_complete_type %ptr.loc16_22.1 [symbolic = %require_complete.loc16_19 (constants.%require_complete.ef162c.1)] -// CHECK:STDOUT: %require_complete.loc16_25: = 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.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc16_9.1) [symbolic = %.loc17_21.3 (constants.%.0e9)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_22.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] -// CHECK:STDOUT: %Copy.facet.loc17_21.3: %Copy.type = facet_value %ptr.loc16_22.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc17_21.3 (constants.%Copy.facet.302b)] +// CHECK:STDOUT: %require_complete.loc16_26: = require_complete_type %ptr.loc16_29.1 [symbolic = %require_complete.loc16_26 (constants.%require_complete.ef162c.1)] +// CHECK:STDOUT: %require_complete.loc16_32: = require_complete_type %tuple.type.loc16 [symbolic = %require_complete.loc16_32 (constants.%require_complete.44f)] +// CHECK:STDOUT: %tuple.type.loc17: type = tuple_type (constants.%empty_struct_type, constants.%empty_struct_type, %ptr.loc16_29.1) [symbolic = %tuple.type.loc17 (constants.%tuple.type.dd2)] +// CHECK:STDOUT: %.loc17_21.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc16_17.1) [symbolic = %.loc17_21.3 (constants.%.0e9)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_29.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] +// CHECK:STDOUT: %Copy.facet.loc17_21.3: %Copy.type = facet_value %ptr.loc16_29.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc17_21.3 (constants.%Copy.facet.302b)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc17_21.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.884)] // CHECK:STDOUT: %.loc17_21.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc17_21.3 [symbolic = %.loc17_21.4 (constants.%.be5)] // CHECK:STDOUT: %impl.elem0.loc17_21.2: @Y.as.A.impl.F.%.loc17_21.4 (%.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_impl_function %impl.elem0.loc17_21.2, @Copy.WithSelf.Op(%Copy.facet.loc17_21.3) [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: fn(%u.param: @Y.as.A.impl.F.%ptr.loc16_29.1 (%ptr.e8f8f9.1)) -> out %return.param: @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.316) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc17_14.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc17_18.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %u.ref: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = name_ref u, %u +// CHECK:STDOUT: %u.ref: @Y.as.A.impl.F.%ptr.loc16_29.1 (%ptr.e8f8f9.1) = name_ref u, %u // CHECK:STDOUT: %.loc17_22.1: @Y.as.A.impl.F.%tuple.type.loc17 (%tuple.type.dd2) = tuple_literal (%.loc17_14.1, %.loc17_18.1, %u.ref) // CHECK:STDOUT: %tuple.elem0: ref %X = tuple_access %return.param, element0 // CHECK:STDOUT: %.loc17_14.2: init %X to %tuple.elem0 = class_init () [concrete = constants.%X.val] @@ -523,9 +523,9 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc17_21.2: %Copy.type = converted constants.%ptr.e8f8f9.1, %Copy.facet.loc17_21.2 [symbolic = %Copy.facet.loc17_21.3 (constants.%Copy.facet.302b)] // CHECK:STDOUT: %specific_impl_fn.loc17_21.1: = 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 %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) -// CHECK:STDOUT: %tuple.elem2: ref @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = tuple_access %return.param, element2 -// CHECK:STDOUT: %.loc17_22.4: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) to %tuple.elem2 = in_place_init %Copy.WithSelf.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Y.as.A.impl.F.%ptr.loc16_29.1 (%ptr.e8f8f9.1) = call %bound_method.loc17_21.2(%u.ref) +// CHECK:STDOUT: %tuple.elem2: ref @Y.as.A.impl.F.%ptr.loc16_29.1 (%ptr.e8f8f9.1) = tuple_access %return.param, element2 +// CHECK:STDOUT: %.loc17_22.4: init @Y.as.A.impl.F.%ptr.loc16_29.1 (%ptr.e8f8f9.1) to %tuple.elem2 = in_place_init %Copy.WithSelf.Op.call // CHECK:STDOUT: %.loc17_22.5: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.316) to %return.param = tuple_init (%.loc17_22.2, %.loc17_22.3, %.loc17_22.4) // CHECK:STDOUT: %.loc17_23: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.316) = converted %.loc17_22.1, %.loc17_22.5 // CHECK:STDOUT: return %.loc17_23 to %return.param @@ -559,7 +559,7 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc23_6: %A.type.df0 = converted %Y.ref, %A.facet [concrete = constants.%A.facet.c65] // CHECK:STDOUT: %as_type.loc23: type = facet_access_type %.loc23_6 [concrete = constants.%Y] // CHECK:STDOUT: %.loc23_14.1: type = converted %.loc23_6, %as_type.loc23 [concrete = constants.%Y] -// CHECK:STDOUT: %.loc23_14.2: %A.assoc_type.a54 = specific_constant @A.WithSelf.%assoc0.loc6_41.1, @A.WithSelf(constants.%X, constants.%A.facet.c65) [concrete = constants.%assoc0.987] +// CHECK:STDOUT: %.loc23_14.2: %A.assoc_type.a54 = specific_constant @A.WithSelf.%assoc0.loc6_48.1, @A.WithSelf(constants.%X, constants.%A.facet.c65) [concrete = constants.%assoc0.987] // CHECK:STDOUT: %F.ref: %A.assoc_type.a54 = name_ref F, %.loc23_14.2 [concrete = constants.%assoc0.987] // CHECK:STDOUT: %impl.elem0: %.7d5 = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%Y.as.A.impl.F] // CHECK:STDOUT: %Z.ref.loc23: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] @@ -610,13 +610,13 @@ fn CallIndirect() { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGeneric(%T.loc26_17.2: %facet_type) { -// CHECK:STDOUT: %T.patt.loc26_17.2: %pattern_type.871 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_17.2 (constants.%T.patt.c17)] -// CHECK:STDOUT: %T.loc26_17.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc26_17.1 (constants.%T.5b7)] +// CHECK:STDOUT: generic fn @CallGeneric(%T.loc26_25.2: %facet_type) { +// CHECK:STDOUT: %T.patt.loc26_25.2: %pattern_type.871 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_25.2 (constants.%T.patt.c17)] +// CHECK:STDOUT: %T.loc26_25.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc26_25.1 (constants.%T.5b7)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc28_4.2: type = facet_access_type %T.loc26_17.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.0af)] -// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc26_17.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] +// CHECK:STDOUT: %T.as_type.loc28_4.2: type = facet_access_type %T.loc26_25.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.0af)] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc26_25.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] // CHECK:STDOUT: %A.facet: %A.type.df0 = facet_value %T.as_type.loc28_4.2, (%A.lookup_impl_witness) [symbolic = %A.facet (constants.%A.facet.318)] // CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A.WithSelf(constants.%X, %A.facet) [symbolic = %A.WithSelf.F.type (constants.%A.WithSelf.F.type.497)] // CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type %A.WithSelf.F.type, %A.facet [symbolic = %.loc28_4.3 (constants.%.151)] @@ -648,10 +648,10 @@ fn CallIndirect() { // CHECK:STDOUT: %u.patt: %pattern_type.34e = ref_binding_pattern u [concrete = constants.%u.patt.352] // CHECK:STDOUT: %u.var_patt: %pattern_type.34e = var_pattern %u.patt [concrete = constants.%u.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.ref: %facet_type = name_ref T, %T.loc26_17.2 [symbolic = %T.loc26_17.1 (constants.%T.5b7)] +// CHECK:STDOUT: %T.ref: %facet_type = name_ref T, %T.loc26_25.2 [symbolic = %T.loc26_25.1 (constants.%T.5b7)] // CHECK:STDOUT: %T.as_type.loc28_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.0af)] // CHECK:STDOUT: %.loc28_4.1: type = converted %T.ref, %T.as_type.loc28_4.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.0af)] -// CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.a54 = specific_constant @A.WithSelf.%assoc0.loc6_41.1, @A.WithSelf(constants.%X, constants.%T.5b7) [concrete = constants.%assoc0.987] +// CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.a54 = specific_constant @A.WithSelf.%assoc0.loc6_48.1, @A.WithSelf(constants.%X, constants.%T.5b7) [concrete = constants.%assoc0.987] // CHECK:STDOUT: %F.ref: %A.assoc_type.a54 = name_ref F, %.loc28_4.2 [concrete = constants.%assoc0.987] // CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.151) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.1a3)] // CHECK:STDOUT: %Z.ref.loc28: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] @@ -699,23 +699,23 @@ fn CallIndirect() { // CHECK:STDOUT: specific @A.WithSelf(constants.%T.67d, constants.%Self.49a) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf.F(constants.%T.67d, constants.%Self.49a, constants.%U.4e7) { -// CHECK:STDOUT: %U.patt.loc6_9.2 => constants.%U.patt.b22 -// CHECK:STDOUT: %U.loc6_9.1 => constants.%U.4e7 -// CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.8f6 -// CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.986 -// CHECK:STDOUT: %u.param_patt.loc6_19.2 => constants.%u.param_patt.a01 -// CHECK:STDOUT: %u.patt.loc6_19.2 => constants.%u.patt.c78 +// CHECK:STDOUT: %U.patt.loc6_17.2 => constants.%U.patt.b22 +// CHECK:STDOUT: %U.loc6_17.1 => constants.%U.4e7 +// CHECK:STDOUT: %ptr.loc6_29.1 => constants.%ptr.8f6 +// CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.986 +// CHECK:STDOUT: %u.param_patt.loc6_26.2 => constants.%u.param_patt.a01 +// CHECK:STDOUT: %u.patt.loc6_26.2 => constants.%u.patt.c78 // CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %A.type => constants.%A.type.acd // CHECK:STDOUT: %Self => constants.%Self.49a -// CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.76f +// CHECK:STDOUT: %tuple.type.loc6_47.1 => constants.%tuple.type.76f // CHECK:STDOUT: %tuple => constants.%tuple.0f4 -// CHECK:STDOUT: %Self.as_type.loc6_40.1 => constants.%Self.as_type.763 -// CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.640 -// CHECK:STDOUT: %.loc6_40.1 => constants.%.f0d -// CHECK:STDOUT: %pattern_type.loc6_40 => constants.%pattern_type.0d7 -// CHECK:STDOUT: %return.param_patt.loc6_40.2 => constants.%return.param_patt.9d3 -// CHECK:STDOUT: %return.patt.loc6_25.2 => constants.%return.patt.8aa +// CHECK:STDOUT: %Self.as_type.loc6_47.1 => constants.%Self.as_type.763 +// CHECK:STDOUT: %tuple.type.loc6_47.2 => constants.%tuple.type.640 +// CHECK:STDOUT: %.loc6_47.1 => constants.%.f0d +// CHECK:STDOUT: %pattern_type.loc6_47 => constants.%pattern_type.0d7 +// CHECK:STDOUT: %return.param_patt.loc6_47.2 => constants.%return.param_patt.9d3 +// CHECK:STDOUT: %return.patt.loc6_32.2 => constants.%return.patt.8aa // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%X) { @@ -724,7 +724,7 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A.type => constants.%A.type.df0 -// CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.891 +// CHECK:STDOUT: %Self.loc5_22.2 => constants.%Self.891 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%Self.49a) { @@ -735,22 +735,22 @@ fn CallIndirect() { // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.ad4 // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.1e2 // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.a54 -// CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.987 +// CHECK:STDOUT: %assoc0.loc6_48.2 => constants.%assoc0.987 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Y.as.A.impl.F(constants.%U.67d) { -// CHECK:STDOUT: %U.patt.loc16_9.2 => constants.%U.patt.d47 -// CHECK:STDOUT: %U.loc16_9.1 => constants.%U.67d -// CHECK:STDOUT: %ptr.loc16_22.1 => constants.%ptr.e8f8f9.1 -// CHECK:STDOUT: %pattern_type.loc16_19 => constants.%pattern_type.4f4b84.1 -// CHECK:STDOUT: %u.param_patt.loc16_19.2 => constants.%u.param_patt.58b -// CHECK:STDOUT: %u.patt.loc16_19.2 => constants.%u.patt.542 +// CHECK:STDOUT: %U.patt.loc16_17.2 => constants.%U.patt.d47 +// CHECK:STDOUT: %U.loc16_17.1 => constants.%U.67d +// CHECK:STDOUT: %ptr.loc16_29.1 => constants.%ptr.e8f8f9.1 +// CHECK:STDOUT: %pattern_type.loc16_26 => constants.%pattern_type.4f4b84.1 +// CHECK:STDOUT: %u.param_patt.loc16_26.2 => constants.%u.param_patt.58b +// CHECK:STDOUT: %u.patt.loc16_26.2 => constants.%u.patt.542 // CHECK:STDOUT: %tuple => constants.%tuple.f57 // CHECK:STDOUT: %tuple.type.loc16 => constants.%tuple.type.316 -// CHECK:STDOUT: %.loc16_37.1 => constants.%.3c1 -// CHECK:STDOUT: %pattern_type.loc16_37 => constants.%pattern_type.178 -// CHECK:STDOUT: %return.param_patt.loc16_37.2 => constants.%return.param_patt.b96 -// CHECK:STDOUT: %return.patt.loc16_25.2 => constants.%return.patt.f2f +// CHECK:STDOUT: %.loc16_44.1 => constants.%.3c1 +// CHECK:STDOUT: %pattern_type.loc16_44 => constants.%pattern_type.178 +// CHECK:STDOUT: %return.param_patt.loc16_44.2 => constants.%return.param_patt.b96 +// CHECK:STDOUT: %return.patt.loc16_32.2 => constants.%return.patt.f2f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.c65) { @@ -761,46 +761,46 @@ fn CallIndirect() { // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.22c // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.06a // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.a54 -// CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.987 +// CHECK:STDOUT: %assoc0.loc6_48.2 => constants.%assoc0.987 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.c65, constants.%U.67d) { -// CHECK:STDOUT: %U.patt.loc6_9.2 => constants.%U.patt.b22 -// CHECK:STDOUT: %U.loc6_9.1 => constants.%U.67d -// CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.e8f8f9.1 -// CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.4f4b84.1 -// CHECK:STDOUT: %u.param_patt.loc6_19.2 => constants.%u.param_patt.58b -// CHECK:STDOUT: %u.patt.loc6_19.2 => constants.%u.patt.542 +// CHECK:STDOUT: %U.patt.loc6_17.2 => constants.%U.patt.b22 +// CHECK:STDOUT: %U.loc6_17.1 => constants.%U.67d +// CHECK:STDOUT: %ptr.loc6_29.1 => constants.%ptr.e8f8f9.1 +// CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.4f4b84.1 +// CHECK:STDOUT: %u.param_patt.loc6_26.2 => constants.%u.param_patt.58b +// CHECK:STDOUT: %u.patt.loc6_26.2 => constants.%u.patt.542 // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.df0 // CHECK:STDOUT: %Self => constants.%A.facet.c65 -// CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.966 +// CHECK:STDOUT: %tuple.type.loc6_47.1 => constants.%tuple.type.966 // CHECK:STDOUT: %tuple => constants.%tuple.7f7 -// CHECK:STDOUT: %Self.as_type.loc6_40.1 => constants.%Y -// CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.316 -// CHECK:STDOUT: %.loc6_40.1 => constants.%.3c1 -// CHECK:STDOUT: %pattern_type.loc6_40 => constants.%pattern_type.178 -// CHECK:STDOUT: %return.param_patt.loc6_40.2 => constants.%return.param_patt.b96 -// CHECK:STDOUT: %return.patt.loc6_25.2 => constants.%return.patt.f2f +// CHECK:STDOUT: %Self.as_type.loc6_47.1 => constants.%Y +// CHECK:STDOUT: %tuple.type.loc6_47.2 => constants.%tuple.type.316 +// CHECK:STDOUT: %.loc6_47.1 => constants.%.3c1 +// CHECK:STDOUT: %pattern_type.loc6_47 => constants.%pattern_type.178 +// CHECK:STDOUT: %return.param_patt.loc6_47.2 => constants.%return.param_patt.b96 +// CHECK:STDOUT: %return.patt.loc6_32.2 => constants.%return.patt.f2f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Y.as.A.impl.F(constants.%Z) { -// CHECK:STDOUT: %U.patt.loc16_9.2 => constants.%U.patt.d47 -// CHECK:STDOUT: %U.loc16_9.1 => constants.%Z -// CHECK:STDOUT: %ptr.loc16_22.1 => constants.%ptr.415 -// CHECK:STDOUT: %pattern_type.loc16_19 => constants.%pattern_type.b4b -// CHECK:STDOUT: %u.param_patt.loc16_19.2 => constants.%u.param_patt.5c1 -// CHECK:STDOUT: %u.patt.loc16_19.2 => constants.%u.patt.5b6 +// CHECK:STDOUT: %U.patt.loc16_17.2 => constants.%U.patt.d47 +// CHECK:STDOUT: %U.loc16_17.1 => constants.%Z +// CHECK:STDOUT: %ptr.loc16_29.1 => constants.%ptr.415 +// CHECK:STDOUT: %pattern_type.loc16_26 => constants.%pattern_type.b4b +// CHECK:STDOUT: %u.param_patt.loc16_26.2 => constants.%u.param_patt.5c1 +// CHECK:STDOUT: %u.patt.loc16_26.2 => constants.%u.patt.5b6 // CHECK:STDOUT: %tuple => constants.%tuple.8e4 // CHECK:STDOUT: %tuple.type.loc16 => constants.%tuple.type.2cd -// CHECK:STDOUT: %.loc16_37.1 => constants.%.5bc -// CHECK:STDOUT: %pattern_type.loc16_37 => constants.%pattern_type.b33 -// CHECK:STDOUT: %return.param_patt.loc16_37.2 => constants.%return.param_patt.75d -// CHECK:STDOUT: %return.patt.loc16_25.2 => constants.%return.patt.8bb +// CHECK:STDOUT: %.loc16_44.1 => constants.%.5bc +// CHECK:STDOUT: %pattern_type.loc16_44 => constants.%pattern_type.b33 +// CHECK:STDOUT: %return.param_patt.loc16_44.2 => constants.%return.param_patt.75d +// CHECK:STDOUT: %return.patt.loc16_32.2 => constants.%return.patt.8bb // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc16_19 => constants.%complete_type.458 -// CHECK:STDOUT: %require_complete.loc16_25 => constants.%complete_type.dec +// CHECK:STDOUT: %require_complete.loc16_26 => constants.%complete_type.458 +// CHECK:STDOUT: %require_complete.loc16_32 => constants.%complete_type.dec // CHECK:STDOUT: %tuple.type.loc17 => constants.%tuple.type.2c5 // CHECK:STDOUT: %.loc17_21.3 => constants.%.072 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.d9a @@ -812,8 +812,8 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%T.5b7) { -// CHECK:STDOUT: %T.patt.loc26_17.2 => constants.%T.patt.c17 -// CHECK:STDOUT: %T.loc26_17.1 => constants.%T.5b7 +// CHECK:STDOUT: %T.patt.loc26_25.2 => constants.%T.patt.c17 +// CHECK:STDOUT: %T.loc26_25.1 => constants.%T.5b7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%T.5b7) { @@ -824,7 +824,7 @@ fn CallIndirect() { // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.91d // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.3f4 // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.a54 -// CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.987 +// CHECK:STDOUT: %assoc0.loc6_48.2 => constants.%assoc0.987 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.318) { @@ -835,32 +835,32 @@ fn CallIndirect() { // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.497 // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.a4d // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.a54 -// CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.987 +// CHECK:STDOUT: %assoc0.loc6_48.2 => constants.%assoc0.987 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.318, constants.%Z) { -// CHECK:STDOUT: %U.patt.loc6_9.2 => constants.%U.patt.b22 -// CHECK:STDOUT: %U.loc6_9.1 => constants.%Z -// CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.415 -// CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.b4b -// CHECK:STDOUT: %u.param_patt.loc6_19.2 => constants.%u.param_patt.5c1 -// CHECK:STDOUT: %u.patt.loc6_19.2 => constants.%u.patt.5b6 +// CHECK:STDOUT: %U.patt.loc6_17.2 => constants.%U.patt.b22 +// CHECK:STDOUT: %U.loc6_17.1 => constants.%Z +// CHECK:STDOUT: %ptr.loc6_29.1 => constants.%ptr.415 +// CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.b4b +// CHECK:STDOUT: %u.param_patt.loc6_26.2 => constants.%u.param_patt.5c1 +// CHECK:STDOUT: %u.patt.loc6_26.2 => constants.%u.patt.5b6 // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.df0 // CHECK:STDOUT: %Self => constants.%A.facet.318 -// CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.966 +// CHECK:STDOUT: %tuple.type.loc6_47.1 => constants.%tuple.type.966 // CHECK:STDOUT: %tuple => constants.%tuple.575 -// CHECK:STDOUT: %Self.as_type.loc6_40.1 => constants.%T.as_type.0af -// CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.c2a -// CHECK:STDOUT: %.loc6_40.1 => constants.%.546 -// CHECK:STDOUT: %pattern_type.loc6_40 => constants.%pattern_type.0e9 -// CHECK:STDOUT: %return.param_patt.loc6_40.2 => constants.%return.param_patt.579 -// CHECK:STDOUT: %return.patt.loc6_25.2 => constants.%return.patt.62e +// CHECK:STDOUT: %Self.as_type.loc6_47.1 => constants.%T.as_type.0af +// CHECK:STDOUT: %tuple.type.loc6_47.2 => constants.%tuple.type.c2a +// CHECK:STDOUT: %.loc6_47.1 => constants.%.546 +// CHECK:STDOUT: %pattern_type.loc6_47 => constants.%pattern_type.0e9 +// CHECK:STDOUT: %return.param_patt.loc6_47.2 => constants.%return.param_patt.579 +// CHECK:STDOUT: %return.patt.loc6_32.2 => constants.%return.patt.62e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%facet_value) { -// CHECK:STDOUT: %T.patt.loc26_17.2 => constants.%T.patt.c17 -// CHECK:STDOUT: %T.loc26_17.1 => constants.%facet_value +// CHECK:STDOUT: %T.patt.loc26_25.2 => constants.%T.patt.c17 +// CHECK:STDOUT: %T.loc26_25.1 => constants.%facet_value // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.loc28_4.2 => constants.%Y @@ -881,23 +881,23 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.c65, constants.%Z) { -// CHECK:STDOUT: %U.patt.loc6_9.2 => constants.%U.patt.b22 -// CHECK:STDOUT: %U.loc6_9.1 => constants.%Z -// CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.415 -// CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.b4b -// CHECK:STDOUT: %u.param_patt.loc6_19.2 => constants.%u.param_patt.5c1 -// CHECK:STDOUT: %u.patt.loc6_19.2 => constants.%u.patt.5b6 +// CHECK:STDOUT: %U.patt.loc6_17.2 => constants.%U.patt.b22 +// CHECK:STDOUT: %U.loc6_17.1 => constants.%Z +// CHECK:STDOUT: %ptr.loc6_29.1 => constants.%ptr.415 +// CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.b4b +// CHECK:STDOUT: %u.param_patt.loc6_26.2 => constants.%u.param_patt.5c1 +// CHECK:STDOUT: %u.patt.loc6_26.2 => constants.%u.patt.5b6 // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.df0 // CHECK:STDOUT: %Self => constants.%A.facet.c65 -// CHECK:STDOUT: %tuple.type.loc6_40.1 => constants.%tuple.type.966 +// CHECK:STDOUT: %tuple.type.loc6_47.1 => constants.%tuple.type.966 // CHECK:STDOUT: %tuple => constants.%tuple.1b5 -// CHECK:STDOUT: %Self.as_type.loc6_40.1 => constants.%Y -// CHECK:STDOUT: %tuple.type.loc6_40.2 => constants.%tuple.type.2cd -// CHECK:STDOUT: %.loc6_40.1 => constants.%.5bc -// CHECK:STDOUT: %pattern_type.loc6_40 => constants.%pattern_type.b33 -// CHECK:STDOUT: %return.param_patt.loc6_40.2 => constants.%return.param_patt.75d -// CHECK:STDOUT: %return.patt.loc6_25.2 => constants.%return.patt.8bb +// CHECK:STDOUT: %Self.as_type.loc6_47.1 => constants.%Y +// CHECK:STDOUT: %tuple.type.loc6_47.2 => constants.%tuple.type.2cd +// CHECK:STDOUT: %.loc6_47.1 => constants.%.5bc +// CHECK:STDOUT: %pattern_type.loc6_47 => constants.%pattern_type.b33 +// CHECK:STDOUT: %return.param_patt.loc6_47.2 => constants.%return.param_patt.75d +// CHECK:STDOUT: %return.patt.loc6_32.2 => constants.%return.patt.8bb // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- generic_method_more_params.carbon @@ -1096,9 +1096,9 @@ fn CallIndirect() { // CHECK:STDOUT: %A.decl: %A.type.55a = interface_decl @A [concrete = constants.%A.generic] { // CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_16.1: type = splice_block %.loc5_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.67d)] // CHECK:STDOUT: } @@ -1108,37 +1108,37 @@ fn CallIndirect() { // CHECK:STDOUT: %Z.decl: type = class_decl @Z [concrete = constants.%Z] {} {} // CHECK:STDOUT: impl_decl @tuple.type.as.A.impl [concrete] { // CHECK:STDOUT: %V1.patt.loc14_16.1: %pattern_type.98f = symbolic_binding_pattern V1, 0 [symbolic = %V1.patt.loc14_16.2 (constants.%V1.patt)] -// CHECK:STDOUT: %V2.patt.loc14_27.1: %pattern_type.98f = symbolic_binding_pattern V2, 1 [symbolic = %V2.patt.loc14_27.2 (constants.%V2.patt)] -// CHECK:STDOUT: %W.patt.loc14_37.1: %pattern_type.98f = symbolic_binding_pattern W, 2 [symbolic = %W.patt.loc14_37.2 (constants.%W.patt)] +// CHECK:STDOUT: %V2.patt.loc14_26.1: %pattern_type.98f = symbolic_binding_pattern V2, 1 [symbolic = %V2.patt.loc14_26.2 (constants.%V2.patt)] +// CHECK:STDOUT: %W.patt.loc14_35.1: %pattern_type.98f = symbolic_binding_pattern W, 2 [symbolic = %W.patt.loc14_35.2 (constants.%W.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %V1.ref: type = name_ref V1, %V1.loc14_16.2 [symbolic = %V1.loc14_16.1 (constants.%V1)] -// CHECK:STDOUT: %V2.ref: type = name_ref V2, %V2.loc14_27.2 [symbolic = %V2.loc14_27.1 (constants.%V2)] -// CHECK:STDOUT: %.loc14_53.1: %tuple.type.24b = tuple_literal (%V1.ref, %V2.ref) [symbolic = %tuple (constants.%tuple.4b9)] -// CHECK:STDOUT: %.loc14_53.2: type = converted %.loc14_53.1, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %V2.ref: type = name_ref V2, %V2.loc14_26.2 [symbolic = %V2.loc14_26.1 (constants.%V2)] +// CHECK:STDOUT: %.loc14_50.1: %tuple.type.24b = tuple_literal (%V1.ref, %V2.ref) [symbolic = %tuple (constants.%tuple.4b9)] +// CHECK:STDOUT: %.loc14_50.2: type = converted %.loc14_50.1, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)] // CHECK:STDOUT: %A.ref: %A.type.55a = name_ref A, file.%A.decl [concrete = constants.%A.generic] -// CHECK:STDOUT: %W.ref: type = name_ref W, %W.loc14_37.2 [symbolic = %W.loc14_37.1 (constants.%W)] -// CHECK:STDOUT: %A.type.loc14_61.2: type = facet_type <@A, @A(constants.%W)> [symbolic = %A.type.loc14_61.1 (constants.%A.type.3ad)] -// CHECK:STDOUT: %.loc14_19.1: type = splice_block %.loc14_19.2 [concrete = type] { +// CHECK:STDOUT: %W.ref: type = name_ref W, %W.loc14_35.2 [symbolic = %W.loc14_35.1 (constants.%W)] +// CHECK:STDOUT: %A.type.loc14_58.2: type = facet_type <@A, @A(constants.%W)> [symbolic = %A.type.loc14_58.1 (constants.%A.type.3ad)] +// CHECK:STDOUT: %.loc14_18.1: type = splice_block %.loc14_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc14_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc14_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc14_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %V1.loc14_16.2: type = symbolic_binding V1, 0 [symbolic = %V1.loc14_16.1 (constants.%V1)] -// CHECK:STDOUT: %.loc14_30.1: type = splice_block %.loc14_30.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc14_27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc14_30.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc14_28.1: type = splice_block %.loc14_28.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc14_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc14_28.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %V2.loc14_27.2: type = symbolic_binding V2, 1 [symbolic = %V2.loc14_27.1 (constants.%V2)] -// CHECK:STDOUT: %.loc14_40.1: type = splice_block %.loc14_40.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc14_37: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc14_40.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %V2.loc14_26.2: type = symbolic_binding V2, 1 [symbolic = %V2.loc14_26.1 (constants.%V2)] +// CHECK:STDOUT: %.loc14_37.1: type = splice_block %.loc14_37.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc14_35: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc14_37.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %W.loc14_37.2: type = symbolic_binding W, 2 [symbolic = %W.loc14_37.1 (constants.%W)] +// CHECK:STDOUT: %W.loc14_35.2: type = symbolic_binding W, 2 [symbolic = %W.loc14_35.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {} // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] { -// CHECK:STDOUT: %T.patt.loc27_17.1: %pattern_type.871 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_17.2 (constants.%T.patt.c17)] +// CHECK:STDOUT: %T.patt.loc27_25.1: %pattern_type.871 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_25.2 (constants.%T.patt.c17)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc27_25.1: type = splice_block %.loc27_25.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %.loc27_32.1: type = splice_block %.loc27_32.3 [concrete = constants.%facet_type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %A.ref: %A.type.55a = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] @@ -1148,10 +1148,10 @@ fn CallIndirect() { // CHECK:STDOUT: %impl.elem0.loc27: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc27: = bound_method %A.type, %impl.elem0.loc27 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc27(%A.type, %Destroy.ref) [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc27_25.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc27_25.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc27_25.2 [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc27_32.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] +// CHECK:STDOUT: %.loc27_32.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc27_32.2 [concrete = constants.%facet_type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc27_17.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc27_17.1 (constants.%T.5b7)] +// CHECK:STDOUT: %T.loc27_25.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc27_25.1 (constants.%T.5b7)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {} // CHECK:STDOUT: } @@ -1162,47 +1162,47 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc5_14.1)> [symbolic = %A.type (constants.%A.type.acd)] -// CHECK:STDOUT: %Self.loc5_23.2: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.49a)] +// CHECK:STDOUT: %Self.loc5_22.2: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc5_22.2 (constants.%Self.49a)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc5_23.1: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.49a)] +// CHECK:STDOUT: %Self.loc5_22.1: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc5_22.2 (constants.%Self.49a)] // CHECK:STDOUT: %A.WithSelf.decl = interface_with_self_decl @A [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %A.WithSelf.F.decl: @A.WithSelf.%A.WithSelf.F.type (%A.WithSelf.F.type.08d) = fn_decl @A.WithSelf.F [symbolic = @A.WithSelf.%A.WithSelf.F (constants.%A.WithSelf.F.3fa)] { -// CHECK:STDOUT: %U.patt.loc6_9.1: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_9.2 (constants.%U.patt.b22)] -// CHECK:STDOUT: %u.param_patt.loc6_19.1: @A.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.62e) = value_param_pattern [symbolic = %u.param_patt.loc6_19.2 (constants.%u.param_patt.6ef)] -// CHECK:STDOUT: %u.patt.loc6_19.1: @A.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.62e) = at_binding_pattern u, %u.param_patt.loc6_19.1 [symbolic = %u.patt.loc6_19.2 (constants.%u.patt.8af)] -// CHECK:STDOUT: %return.param_patt.loc6_38.1: @A.WithSelf.F.%pattern_type.loc6_38 (%pattern_type.d6c) = out_param_pattern [symbolic = %return.param_patt.loc6_38.2 (constants.%return.param_patt.52a)] -// CHECK:STDOUT: %return.patt.loc6_24.1: @A.WithSelf.F.%pattern_type.loc6_38 (%pattern_type.d6c) = return_slot_pattern %return.param_patt.loc6_38.1, %.loc6_38.4 [symbolic = %return.patt.loc6_24.2 (constants.%return.patt.808)] +// CHECK:STDOUT: %U.patt.loc6_17.1: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_17.2 (constants.%U.patt.b22)] +// CHECK:STDOUT: %u.param_patt.loc6_26.1: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.62e) = value_param_pattern [symbolic = %u.param_patt.loc6_26.2 (constants.%u.param_patt.6ef)] +// CHECK:STDOUT: %u.patt.loc6_26.1: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.62e) = at_binding_pattern u, %u.param_patt.loc6_26.1 [symbolic = %u.patt.loc6_26.2 (constants.%u.patt.8af)] +// CHECK:STDOUT: %return.param_patt.loc6_45.1: @A.WithSelf.F.%pattern_type.loc6_45 (%pattern_type.d6c) = out_param_pattern [symbolic = %return.param_patt.loc6_45.2 (constants.%return.param_patt.52a)] +// CHECK:STDOUT: %return.patt.loc6_31.1: @A.WithSelf.F.%pattern_type.loc6_45 (%pattern_type.d6c) = return_slot_pattern %return.param_patt.loc6_45.1, %.loc6_45.4 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.808)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_14.2 [symbolic = %T (constants.%T.67d)] -// CHECK:STDOUT: %.loc6_31: @A.WithSelf.F.%A.type (%A.type.acd) = specific_constant @A.%Self.loc5_23.1, @A(constants.%T.67d) [symbolic = %Self (constants.%Self.49a)] -// CHECK:STDOUT: %Self.ref: @A.WithSelf.F.%A.type (%A.type.acd) = name_ref Self, %.loc6_31 [symbolic = %Self (constants.%Self.49a)] -// CHECK:STDOUT: %U.ref.loc6_37: type = name_ref U, %U.loc6_9.2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)] -// CHECK:STDOUT: %.loc6_38.2: @A.WithSelf.F.%tuple.type.loc6_38.1 (%tuple.type.76f) = tuple_literal (%T.ref, %Self.ref, %U.ref.loc6_37) [symbolic = %tuple (constants.%tuple.55a)] -// CHECK:STDOUT: %Self.as_type.loc6_38.2: type = facet_access_type constants.%Self.49a [symbolic = %Self.as_type.loc6_38.1 (constants.%Self.as_type.763)] -// CHECK:STDOUT: %.loc6_38.3: type = converted constants.%Self.49a, %Self.as_type.loc6_38.2 [symbolic = %Self.as_type.loc6_38.1 (constants.%Self.as_type.763)] -// CHECK:STDOUT: %.loc6_38.4: type = converted %.loc6_38.2, constants.%tuple.type.d73 [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.d73)] -// CHECK:STDOUT: %.loc6_38.5: Core.Form = init_form %.loc6_38.4 [symbolic = %.loc6_38.1 (constants.%.bc3)] -// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_38: @A.WithSelf.F.%A.type (%A.type.acd) = specific_constant @A.%Self.loc5_22.1, @A(constants.%T.67d) [symbolic = %Self (constants.%Self.49a)] +// CHECK:STDOUT: %Self.ref: @A.WithSelf.F.%A.type (%A.type.acd) = name_ref Self, %.loc6_38 [symbolic = %Self (constants.%Self.49a)] +// CHECK:STDOUT: %U.ref.loc6_44: type = name_ref U, %U.loc6_17.2 [symbolic = %U.loc6_17.1 (constants.%U.4e7)] +// CHECK:STDOUT: %.loc6_45.2: @A.WithSelf.F.%tuple.type.loc6_45.1 (%tuple.type.76f) = tuple_literal (%T.ref, %Self.ref, %U.ref.loc6_44) [symbolic = %tuple (constants.%tuple.55a)] +// CHECK:STDOUT: %Self.as_type.loc6_45.2: type = facet_access_type constants.%Self.49a [symbolic = %Self.as_type.loc6_45.1 (constants.%Self.as_type.763)] +// CHECK:STDOUT: %.loc6_45.3: type = converted constants.%Self.49a, %Self.as_type.loc6_45.2 [symbolic = %Self.as_type.loc6_45.1 (constants.%Self.as_type.763)] +// CHECK:STDOUT: %.loc6_45.4: type = converted %.loc6_45.2, constants.%tuple.type.d73 [symbolic = %tuple.type.loc6_45.2 (constants.%tuple.type.d73)] +// CHECK:STDOUT: %.loc6_45.5: Core.Form = init_form %.loc6_45.4 [symbolic = %.loc6_45.1 (constants.%.bc3)] +// CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc6_9.2: type = symbolic_binding U, 2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)] -// CHECK:STDOUT: %u.param: @A.WithSelf.F.%U.loc6_9.1 (%U.4e7) = value_param call_param0 -// CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_9.2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)] -// CHECK:STDOUT: %u: @A.WithSelf.F.%U.loc6_9.1 (%U.4e7) = wrapper_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @A.WithSelf.F.%tuple.type.loc6_38.2 (%tuple.type.d73) = out_param call_param1 -// CHECK:STDOUT: %return: ref @A.WithSelf.F.%tuple.type.loc6_38.2 (%tuple.type.d73) = return_slot %return.param +// CHECK:STDOUT: %U.loc6_17.2: type = symbolic_binding U, 2 [symbolic = %U.loc6_17.1 (constants.%U.4e7)] +// CHECK:STDOUT: %u.param: @A.WithSelf.F.%U.loc6_17.1 (%U.4e7) = value_param call_param0 +// CHECK:STDOUT: %U.ref.loc6_28: type = name_ref U, %U.loc6_17.2 [symbolic = %U.loc6_17.1 (constants.%U.4e7)] +// CHECK:STDOUT: %u: @A.WithSelf.F.%U.loc6_17.1 (%U.4e7) = wrapper_binding u, %u.param +// CHECK:STDOUT: %return.param: ref @A.WithSelf.F.%tuple.type.loc6_45.2 (%tuple.type.d73) = out_param call_param1 +// CHECK:STDOUT: %return: ref @A.WithSelf.F.%tuple.type.loc6_45.2 (%tuple.type.d73) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc6_39.1: @A.WithSelf.%A.assoc_type (%A.assoc_type.447) = assoc_entity element0, %A.WithSelf.F.decl [symbolic = %assoc0.loc6_39.2 (constants.%assoc0.d4b)] +// CHECK:STDOUT: %assoc0.loc6_46.1: @A.WithSelf.%A.assoc_type (%A.assoc_type.447) = assoc_entity element0, %A.WithSelf.F.decl [symbolic = %assoc0.loc6_46.2 (constants.%assoc0.d4b)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc5_23.1 +// CHECK:STDOUT: .Self = %Self.loc5_22.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = -// CHECK:STDOUT: .F = @A.WithSelf.%assoc0.loc6_39.1 +// CHECK:STDOUT: .F = @A.WithSelf.%assoc0.loc6_46.1 // CHECK:STDOUT: .W = // CHECK:STDOUT: .V1 = // CHECK:STDOUT: .V2 = @@ -1214,61 +1214,61 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @tuple.type.as.A.impl(%V1.loc14_16.2: type, %V2.loc14_27.2: type, %W.loc14_37.2: type) { +// CHECK:STDOUT: generic impl @tuple.type.as.A.impl(%V1.loc14_16.2: type, %V2.loc14_26.2: type, %W.loc14_35.2: type) { // CHECK:STDOUT: %V1.patt.loc14_16.2: %pattern_type.98f = symbolic_binding_pattern V1, 0 [symbolic = %V1.patt.loc14_16.2 (constants.%V1.patt)] // CHECK:STDOUT: %V1.loc14_16.1: type = symbolic_binding V1, 0 [symbolic = %V1.loc14_16.1 (constants.%V1)] -// CHECK:STDOUT: %V2.patt.loc14_27.2: %pattern_type.98f = symbolic_binding_pattern V2, 1 [symbolic = %V2.patt.loc14_27.2 (constants.%V2.patt)] -// CHECK:STDOUT: %V2.loc14_27.1: type = symbolic_binding V2, 1 [symbolic = %V2.loc14_27.1 (constants.%V2)] -// CHECK:STDOUT: %W.patt.loc14_37.2: %pattern_type.98f = symbolic_binding_pattern W, 2 [symbolic = %W.patt.loc14_37.2 (constants.%W.patt)] -// CHECK:STDOUT: %W.loc14_37.1: type = symbolic_binding W, 2 [symbolic = %W.loc14_37.1 (constants.%W)] -// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%V1.loc14_16.1, %V2.loc14_27.1) [symbolic = %tuple (constants.%tuple.4b9)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%V1.loc14_16.1, %V2.loc14_27.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] -// CHECK:STDOUT: %A.type.loc14_61.1: type = facet_type <@A, @A(%W.loc14_37.1)> [symbolic = %A.type.loc14_61.1 (constants.%A.type.3ad)] -// CHECK:STDOUT: %A.impl_witness.loc14_63.2: = impl_witness %A.impl_witness_table, @tuple.type.as.A.impl(%V1.loc14_16.1, %V2.loc14_27.1, %W.loc14_37.1) [symbolic = %A.impl_witness.loc14_63.2 (constants.%A.impl_witness.756)] +// CHECK:STDOUT: %V2.patt.loc14_26.2: %pattern_type.98f = symbolic_binding_pattern V2, 1 [symbolic = %V2.patt.loc14_26.2 (constants.%V2.patt)] +// CHECK:STDOUT: %V2.loc14_26.1: type = symbolic_binding V2, 1 [symbolic = %V2.loc14_26.1 (constants.%V2)] +// CHECK:STDOUT: %W.patt.loc14_35.2: %pattern_type.98f = symbolic_binding_pattern W, 2 [symbolic = %W.patt.loc14_35.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.loc14_35.1: type = symbolic_binding W, 2 [symbolic = %W.loc14_35.1 (constants.%W)] +// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%V1.loc14_16.1, %V2.loc14_26.1) [symbolic = %tuple (constants.%tuple.4b9)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%V1.loc14_16.1, %V2.loc14_26.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %A.type.loc14_58.1: type = facet_type <@A, @A(%W.loc14_35.1)> [symbolic = %A.type.loc14_58.1 (constants.%A.type.3ad)] +// CHECK:STDOUT: %A.impl_witness.loc14_60.2: = impl_witness %A.impl_witness_table, @tuple.type.as.A.impl(%V1.loc14_16.1, %V2.loc14_26.1, %W.loc14_35.1) [symbolic = %A.impl_witness.loc14_60.2 (constants.%A.impl_witness.756)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %A.type.loc14_61.1 [symbolic = %require_complete (constants.%require_complete.7b2)] -// CHECK:STDOUT: %tuple.type.as.A.impl.F.type: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%V1.loc14_16.1, %V2.loc14_27.1, %W.loc14_37.1) [symbolic = %tuple.type.as.A.impl.F.type (constants.%tuple.type.as.A.impl.F.type.44a)] +// CHECK:STDOUT: %require_complete: = require_complete_type %A.type.loc14_58.1 [symbolic = %require_complete (constants.%require_complete.7b2)] +// CHECK:STDOUT: %tuple.type.as.A.impl.F.type: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%V1.loc14_16.1, %V2.loc14_26.1, %W.loc14_35.1) [symbolic = %tuple.type.as.A.impl.F.type (constants.%tuple.type.as.A.impl.F.type.44a)] // CHECK:STDOUT: %tuple.type.as.A.impl.F: @tuple.type.as.A.impl.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.44a) = struct_value () [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.742)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc14_53.2 as %A.type.loc14_61.2 { +// CHECK:STDOUT: impl: %.loc14_50.2 as %A.type.loc14_58.2 { // CHECK:STDOUT: %tuple.type.as.A.impl.F.decl: @tuple.type.as.A.impl.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.44a) = fn_decl @tuple.type.as.A.impl.F [symbolic = @tuple.type.as.A.impl.%tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.742)] { -// CHECK:STDOUT: %U.patt.loc17_9.1: %pattern_type.98f = symbolic_binding_pattern U, 3 [symbolic = %U.patt.loc17_9.2 (constants.%U.patt.637)] -// CHECK:STDOUT: %u.param_patt.loc17_19.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_19 (%pattern_type.e4a) = value_param_pattern [symbolic = %u.param_patt.loc17_19.2 (constants.%u.param_patt.afe)] -// CHECK:STDOUT: %u.patt.loc17_19.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_19 (%pattern_type.e4a) = at_binding_pattern u, %u.param_patt.loc17_19.1 [symbolic = %u.patt.loc17_19.2 (constants.%u.patt.e63)] -// CHECK:STDOUT: %return.param_patt.loc17_42.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_42 (%pattern_type.5cc) = out_param_pattern [symbolic = %return.param_patt.loc17_42.2 (constants.%return.param_patt.b1c)] -// CHECK:STDOUT: %return.patt.loc17_24.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_42 (%pattern_type.5cc) = return_slot_pattern %return.param_patt.loc17_42.1, %.loc17_42.5 [symbolic = %return.patt.loc17_24.2 (constants.%return.patt.bad9)] +// CHECK:STDOUT: %U.patt.loc17_17.1: %pattern_type.98f = symbolic_binding_pattern U, 3 [symbolic = %U.patt.loc17_17.2 (constants.%U.patt.637)] +// CHECK:STDOUT: %u.param_patt.loc17_26.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_26 (%pattern_type.e4a) = value_param_pattern [symbolic = %u.param_patt.loc17_26.2 (constants.%u.param_patt.afe)] +// CHECK:STDOUT: %u.patt.loc17_26.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_26 (%pattern_type.e4a) = at_binding_pattern u, %u.param_patt.loc17_26.1 [symbolic = %u.patt.loc17_26.2 (constants.%u.patt.e63)] +// CHECK:STDOUT: %return.param_patt.loc17_49.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_49 (%pattern_type.5cc) = out_param_pattern [symbolic = %return.param_patt.loc17_49.2 (constants.%return.param_patt.b1c)] +// CHECK:STDOUT: %return.patt.loc17_31.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_49 (%pattern_type.5cc) = return_slot_pattern %return.param_patt.loc17_49.1, %.loc17_49.5 [symbolic = %return.patt.loc17_31.2 (constants.%return.patt.bad9)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %W.ref: type = name_ref W, @tuple.type.as.A.impl.%W.loc14_37.2 [symbolic = %W (constants.%W)] +// CHECK:STDOUT: %W.ref: type = name_ref W, @tuple.type.as.A.impl.%W.loc14_35.2 [symbolic = %W (constants.%W)] // CHECK:STDOUT: %V1.ref: type = name_ref V1, @tuple.type.as.A.impl.%V1.loc14_16.2 [symbolic = %V1 (constants.%V1)] -// CHECK:STDOUT: %V2.ref: type = name_ref V2, @tuple.type.as.A.impl.%V2.loc14_27.2 [symbolic = %V2 (constants.%V2)] -// CHECK:STDOUT: %.loc17_38: %tuple.type.24b = tuple_literal (%V1.ref, %V2.ref) [symbolic = %tuple.loc17_38 (constants.%tuple.4b9)] -// CHECK:STDOUT: %U.ref.loc17_41: type = name_ref U, %U.loc17_9.2 [symbolic = %U.loc17_9.1 (constants.%U.ce4)] -// CHECK:STDOUT: %.loc17_42.3: %tuple.type.11f = tuple_literal (%W.ref, %.loc17_38, %U.ref.loc17_41) [symbolic = %tuple.loc17_42 (constants.%tuple.117)] -// CHECK:STDOUT: %.loc17_42.4: type = converted constants.%tuple.4b9, constants.%tuple.type.a5e [symbolic = %tuple.type.loc17_42.1 (constants.%tuple.type.a5e)] -// CHECK:STDOUT: %.loc17_42.5: type = converted %.loc17_42.3, constants.%tuple.type.897 [symbolic = %tuple.type.loc17_42.2 (constants.%tuple.type.897)] -// CHECK:STDOUT: %.loc17_42.6: Core.Form = init_form %.loc17_42.5 [symbolic = %.loc17_42.2 (constants.%.f8e)] -// CHECK:STDOUT: %.loc17_12.1: type = splice_block %.loc17_12.2 [concrete = type] { +// CHECK:STDOUT: %V2.ref: type = name_ref V2, @tuple.type.as.A.impl.%V2.loc14_26.2 [symbolic = %V2 (constants.%V2)] +// CHECK:STDOUT: %.loc17_45: %tuple.type.24b = tuple_literal (%V1.ref, %V2.ref) [symbolic = %tuple.loc17_45 (constants.%tuple.4b9)] +// CHECK:STDOUT: %U.ref.loc17_48: type = name_ref U, %U.loc17_17.2 [symbolic = %U.loc17_17.1 (constants.%U.ce4)] +// CHECK:STDOUT: %.loc17_49.3: %tuple.type.11f = tuple_literal (%W.ref, %.loc17_45, %U.ref.loc17_48) [symbolic = %tuple.loc17_49 (constants.%tuple.117)] +// CHECK:STDOUT: %.loc17_49.4: type = converted constants.%tuple.4b9, constants.%tuple.type.a5e [symbolic = %tuple.type.loc17_49.1 (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %.loc17_49.5: type = converted %.loc17_49.3, constants.%tuple.type.897 [symbolic = %tuple.type.loc17_49.2 (constants.%tuple.type.897)] +// CHECK:STDOUT: %.loc17_49.6: Core.Form = init_form %.loc17_49.5 [symbolic = %.loc17_49.2 (constants.%.f8e)] +// CHECK:STDOUT: %.loc17_19.1: type = splice_block %.loc17_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc17_12.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc17_19.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc17_9.2: type = symbolic_binding U, 3 [symbolic = %U.loc17_9.1 (constants.%U.ce4)] -// CHECK:STDOUT: %u.param: @tuple.type.as.A.impl.F.%U.loc17_9.1 (%U.ce4) = value_param call_param0 -// CHECK:STDOUT: %U.ref.loc17_21: type = name_ref U, %U.loc17_9.2 [symbolic = %U.loc17_9.1 (constants.%U.ce4)] -// CHECK:STDOUT: %u: @tuple.type.as.A.impl.F.%U.loc17_9.1 (%U.ce4) = wrapper_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) = out_param call_param1 -// CHECK:STDOUT: %return: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) = return_slot %return.param +// CHECK:STDOUT: %U.loc17_17.2: type = symbolic_binding U, 3 [symbolic = %U.loc17_17.1 (constants.%U.ce4)] +// CHECK:STDOUT: %u.param: @tuple.type.as.A.impl.F.%U.loc17_17.1 (%U.ce4) = value_param call_param0 +// CHECK:STDOUT: %U.ref.loc17_28: type = name_ref U, %U.loc17_17.2 [symbolic = %U.loc17_17.1 (constants.%U.ce4)] +// CHECK:STDOUT: %u: @tuple.type.as.A.impl.F.%U.loc17_17.1 (%U.ce4) = wrapper_binding u, %u.param +// CHECK:STDOUT: %return.param: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_49.2 (%tuple.type.897) = out_param call_param1 +// CHECK:STDOUT: %return: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_49.2 (%tuple.type.897) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (%tuple.type.as.A.impl.F.decl), @tuple.type.as.A.impl [concrete] -// CHECK:STDOUT: %A.impl_witness.loc14_63.1: = impl_witness %A.impl_witness_table, @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) [symbolic = %A.impl_witness.loc14_63.2 (constants.%A.impl_witness.756)] +// CHECK:STDOUT: %A.impl_witness.loc14_60.1: = impl_witness %A.impl_witness_table, @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) [symbolic = %A.impl_witness.loc14_60.2 (constants.%A.impl_witness.756)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .W = // CHECK:STDOUT: .V1 = // CHECK:STDOUT: .V2 = // CHECK:STDOUT: .F = %tuple.type.as.A.impl.F.decl -// CHECK:STDOUT: extend %A.type.loc14_61.2 -// CHECK:STDOUT: witness = %A.impl_witness.loc14_63.1 +// CHECK:STDOUT: extend %A.type.loc14_58.2 +// CHECK:STDOUT: witness = %A.impl_witness.loc14_60.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1304,61 +1304,61 @@ fn CallIndirect() { // CHECK:STDOUT: .Self = constants.%Z // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%T.loc5_14.2: type, @A.%Self.loc5_23.1: @A.%A.type (%A.type.acd), %U.loc6_9.2: type) { -// CHECK:STDOUT: %U.patt.loc6_9.2: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_9.2 (constants.%U.patt.b22)] -// CHECK:STDOUT: %U.loc6_9.1: type = symbolic_binding U, 2 [symbolic = %U.loc6_9.1 (constants.%U.4e7)] -// CHECK:STDOUT: %pattern_type.loc6_19: type = pattern_type %U.loc6_9.1 [symbolic = %pattern_type.loc6_19 (constants.%pattern_type.62e)] -// CHECK:STDOUT: %u.param_patt.loc6_19.2: @A.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.62e) = value_param_pattern [symbolic = %u.param_patt.loc6_19.2 (constants.%u.param_patt.6ef)] -// CHECK:STDOUT: %u.patt.loc6_19.2: @A.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.62e) = at_binding_pattern u, %u.param_patt.loc6_19.2 [symbolic = %u.patt.loc6_19.2 (constants.%u.patt.8af)] +// CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%T.loc5_14.2: type, @A.%Self.loc5_22.1: @A.%A.type (%A.type.acd), %U.loc6_17.2: type) { +// CHECK:STDOUT: %U.patt.loc6_17.2: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_17.2 (constants.%U.patt.b22)] +// CHECK:STDOUT: %U.loc6_17.1: type = symbolic_binding U, 2 [symbolic = %U.loc6_17.1 (constants.%U.4e7)] +// CHECK:STDOUT: %pattern_type.loc6_26: type = pattern_type %U.loc6_17.1 [symbolic = %pattern_type.loc6_26 (constants.%pattern_type.62e)] +// CHECK:STDOUT: %u.param_patt.loc6_26.2: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.62e) = value_param_pattern [symbolic = %u.param_patt.loc6_26.2 (constants.%u.param_patt.6ef)] +// CHECK:STDOUT: %u.patt.loc6_26.2: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.62e) = at_binding_pattern u, %u.param_patt.loc6_26.2 [symbolic = %u.patt.loc6_26.2 (constants.%u.patt.8af)] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T)> [symbolic = %A.type (constants.%A.type.acd)] // CHECK:STDOUT: %Self: @A.WithSelf.F.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.49a)] -// CHECK:STDOUT: %tuple.type.loc6_38.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_38.1 (constants.%tuple.type.76f)] -// CHECK:STDOUT: %tuple: @A.WithSelf.F.%tuple.type.loc6_38.1 (%tuple.type.76f) = tuple_value (%T, %Self, %U.loc6_9.1) [symbolic = %tuple (constants.%tuple.55a)] -// CHECK:STDOUT: %Self.as_type.loc6_38.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_38.1 (constants.%Self.as_type.763)] -// CHECK:STDOUT: %tuple.type.loc6_38.2: type = tuple_type (%T, %Self.as_type.loc6_38.1, %U.loc6_9.1) [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.d73)] -// CHECK:STDOUT: %.loc6_38.1: Core.Form = init_form %tuple.type.loc6_38.2 [symbolic = %.loc6_38.1 (constants.%.bc3)] -// CHECK:STDOUT: %pattern_type.loc6_38: type = pattern_type %tuple.type.loc6_38.2 [symbolic = %pattern_type.loc6_38 (constants.%pattern_type.d6c)] -// CHECK:STDOUT: %return.param_patt.loc6_38.2: @A.WithSelf.F.%pattern_type.loc6_38 (%pattern_type.d6c) = out_param_pattern [symbolic = %return.param_patt.loc6_38.2 (constants.%return.param_patt.52a)] -// CHECK:STDOUT: %return.patt.loc6_24.2: @A.WithSelf.F.%pattern_type.loc6_38 (%pattern_type.d6c) = return_slot_pattern %return.param_patt.loc6_38.2, %tuple.type.loc6_38.2 [symbolic = %return.patt.loc6_24.2 (constants.%return.patt.808)] +// CHECK:STDOUT: %tuple.type.loc6_45.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_45.1 (constants.%tuple.type.76f)] +// CHECK:STDOUT: %tuple: @A.WithSelf.F.%tuple.type.loc6_45.1 (%tuple.type.76f) = tuple_value (%T, %Self, %U.loc6_17.1) [symbolic = %tuple (constants.%tuple.55a)] +// CHECK:STDOUT: %Self.as_type.loc6_45.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_45.1 (constants.%Self.as_type.763)] +// CHECK:STDOUT: %tuple.type.loc6_45.2: type = tuple_type (%T, %Self.as_type.loc6_45.1, %U.loc6_17.1) [symbolic = %tuple.type.loc6_45.2 (constants.%tuple.type.d73)] +// CHECK:STDOUT: %.loc6_45.1: Core.Form = init_form %tuple.type.loc6_45.2 [symbolic = %.loc6_45.1 (constants.%.bc3)] +// CHECK:STDOUT: %pattern_type.loc6_45: type = pattern_type %tuple.type.loc6_45.2 [symbolic = %pattern_type.loc6_45 (constants.%pattern_type.d6c)] +// CHECK:STDOUT: %return.param_patt.loc6_45.2: @A.WithSelf.F.%pattern_type.loc6_45 (%pattern_type.d6c) = out_param_pattern [symbolic = %return.param_patt.loc6_45.2 (constants.%return.param_patt.52a)] +// CHECK:STDOUT: %return.patt.loc6_31.2: @A.WithSelf.F.%pattern_type.loc6_45 (%pattern_type.d6c) = return_slot_pattern %return.param_patt.loc6_45.2, %tuple.type.loc6_45.2 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.808)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @A.WithSelf.F.%U.loc6_9.1 (%U.4e7)) -> out %return.param: @A.WithSelf.F.%tuple.type.loc6_38.2 (%tuple.type.d73); +// CHECK:STDOUT: fn(%u.param: @A.WithSelf.F.%U.loc6_17.1 (%U.4e7)) -> out %return.param: @A.WithSelf.F.%tuple.type.loc6_45.2 (%tuple.type.d73); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @tuple.type.as.A.impl.F(@tuple.type.as.A.impl.%V1.loc14_16.2: type, @tuple.type.as.A.impl.%V2.loc14_27.2: type, @tuple.type.as.A.impl.%W.loc14_37.2: type, %U.loc17_9.2: type) { -// CHECK:STDOUT: %U.patt.loc17_9.2: %pattern_type.98f = symbolic_binding_pattern U, 3 [symbolic = %U.patt.loc17_9.2 (constants.%U.patt.637)] -// CHECK:STDOUT: %U.loc17_9.1: type = symbolic_binding U, 3 [symbolic = %U.loc17_9.1 (constants.%U.ce4)] -// CHECK:STDOUT: %pattern_type.loc17_19: type = pattern_type %U.loc17_9.1 [symbolic = %pattern_type.loc17_19 (constants.%pattern_type.e4a)] -// CHECK:STDOUT: %u.param_patt.loc17_19.2: @tuple.type.as.A.impl.F.%pattern_type.loc17_19 (%pattern_type.e4a) = value_param_pattern [symbolic = %u.param_patt.loc17_19.2 (constants.%u.param_patt.afe)] -// CHECK:STDOUT: %u.patt.loc17_19.2: @tuple.type.as.A.impl.F.%pattern_type.loc17_19 (%pattern_type.e4a) = at_binding_pattern u, %u.param_patt.loc17_19.2 [symbolic = %u.patt.loc17_19.2 (constants.%u.patt.e63)] +// CHECK:STDOUT: generic fn @tuple.type.as.A.impl.F(@tuple.type.as.A.impl.%V1.loc14_16.2: type, @tuple.type.as.A.impl.%V2.loc14_26.2: type, @tuple.type.as.A.impl.%W.loc14_35.2: type, %U.loc17_17.2: type) { +// CHECK:STDOUT: %U.patt.loc17_17.2: %pattern_type.98f = symbolic_binding_pattern U, 3 [symbolic = %U.patt.loc17_17.2 (constants.%U.patt.637)] +// CHECK:STDOUT: %U.loc17_17.1: type = symbolic_binding U, 3 [symbolic = %U.loc17_17.1 (constants.%U.ce4)] +// CHECK:STDOUT: %pattern_type.loc17_26: type = pattern_type %U.loc17_17.1 [symbolic = %pattern_type.loc17_26 (constants.%pattern_type.e4a)] +// CHECK:STDOUT: %u.param_patt.loc17_26.2: @tuple.type.as.A.impl.F.%pattern_type.loc17_26 (%pattern_type.e4a) = value_param_pattern [symbolic = %u.param_patt.loc17_26.2 (constants.%u.param_patt.afe)] +// CHECK:STDOUT: %u.patt.loc17_26.2: @tuple.type.as.A.impl.F.%pattern_type.loc17_26 (%pattern_type.e4a) = at_binding_pattern u, %u.param_patt.loc17_26.2 [symbolic = %u.patt.loc17_26.2 (constants.%u.patt.e63)] // CHECK:STDOUT: %W: type = symbolic_binding W, 2 [symbolic = %W (constants.%W)] // CHECK:STDOUT: %V1: type = symbolic_binding V1, 0 [symbolic = %V1 (constants.%V1)] // CHECK:STDOUT: %V2: type = symbolic_binding V2, 1 [symbolic = %V2 (constants.%V2)] -// CHECK:STDOUT: %tuple.loc17_38: %tuple.type.24b = tuple_value (%V1, %V2) [symbolic = %tuple.loc17_38 (constants.%tuple.4b9)] -// CHECK:STDOUT: %tuple.loc17_42: %tuple.type.11f = tuple_value (%W, %tuple.loc17_38, %U.loc17_9.1) [symbolic = %tuple.loc17_42 (constants.%tuple.117)] -// CHECK:STDOUT: %tuple.type.loc17_42.1: type = tuple_type (%V1, %V2) [symbolic = %tuple.type.loc17_42.1 (constants.%tuple.type.a5e)] -// CHECK:STDOUT: %tuple.type.loc17_42.2: type = tuple_type (%W, %tuple.type.loc17_42.1, %U.loc17_9.1) [symbolic = %tuple.type.loc17_42.2 (constants.%tuple.type.897)] -// CHECK:STDOUT: %.loc17_42.2: Core.Form = init_form %tuple.type.loc17_42.2 [symbolic = %.loc17_42.2 (constants.%.f8e)] -// CHECK:STDOUT: %pattern_type.loc17_42: type = pattern_type %tuple.type.loc17_42.2 [symbolic = %pattern_type.loc17_42 (constants.%pattern_type.5cc)] -// CHECK:STDOUT: %return.param_patt.loc17_42.2: @tuple.type.as.A.impl.F.%pattern_type.loc17_42 (%pattern_type.5cc) = out_param_pattern [symbolic = %return.param_patt.loc17_42.2 (constants.%return.param_patt.b1c)] -// CHECK:STDOUT: %return.patt.loc17_24.2: @tuple.type.as.A.impl.F.%pattern_type.loc17_42 (%pattern_type.5cc) = return_slot_pattern %return.param_patt.loc17_42.2, %tuple.type.loc17_42.2 [symbolic = %return.patt.loc17_24.2 (constants.%return.patt.bad9)] +// CHECK:STDOUT: %tuple.loc17_45: %tuple.type.24b = tuple_value (%V1, %V2) [symbolic = %tuple.loc17_45 (constants.%tuple.4b9)] +// CHECK:STDOUT: %tuple.loc17_49: %tuple.type.11f = tuple_value (%W, %tuple.loc17_45, %U.loc17_17.1) [symbolic = %tuple.loc17_49 (constants.%tuple.117)] +// CHECK:STDOUT: %tuple.type.loc17_49.1: type = tuple_type (%V1, %V2) [symbolic = %tuple.type.loc17_49.1 (constants.%tuple.type.a5e)] +// CHECK:STDOUT: %tuple.type.loc17_49.2: type = tuple_type (%W, %tuple.type.loc17_49.1, %U.loc17_17.1) [symbolic = %tuple.type.loc17_49.2 (constants.%tuple.type.897)] +// CHECK:STDOUT: %.loc17_49.2: Core.Form = init_form %tuple.type.loc17_49.2 [symbolic = %.loc17_49.2 (constants.%.f8e)] +// CHECK:STDOUT: %pattern_type.loc17_49: type = pattern_type %tuple.type.loc17_49.2 [symbolic = %pattern_type.loc17_49 (constants.%pattern_type.5cc)] +// CHECK:STDOUT: %return.param_patt.loc17_49.2: @tuple.type.as.A.impl.F.%pattern_type.loc17_49 (%pattern_type.5cc) = out_param_pattern [symbolic = %return.param_patt.loc17_49.2 (constants.%return.param_patt.b1c)] +// CHECK:STDOUT: %return.patt.loc17_31.2: @tuple.type.as.A.impl.F.%pattern_type.loc17_49 (%pattern_type.5cc) = return_slot_pattern %return.param_patt.loc17_49.2, %tuple.type.loc17_49.2 [symbolic = %return.patt.loc17_31.2 (constants.%return.patt.bad9)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc17_19: = require_complete_type %U.loc17_9.1 [symbolic = %require_complete.loc17_19 (constants.%require_complete.5a4)] -// CHECK:STDOUT: %require_complete.loc17_24: = require_complete_type %tuple.type.loc17_42.2 [symbolic = %require_complete.loc17_24 (constants.%require_complete.da0)] +// CHECK:STDOUT: %require_complete.loc17_26: = require_complete_type %U.loc17_17.1 [symbolic = %require_complete.loc17_26 (constants.%require_complete.5a4)] +// CHECK:STDOUT: %require_complete.loc17_31: = require_complete_type %tuple.type.loc17_49.2 [symbolic = %require_complete.loc17_31 (constants.%require_complete.da0)] // CHECK:STDOUT: %tuple.type.as.A.impl.F.type: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%V1, %V2, %W) [symbolic = %tuple.type.as.A.impl.F.type (constants.%tuple.type.as.A.impl.F.type.44a)] // CHECK:STDOUT: %tuple.type.as.A.impl.F: @tuple.type.as.A.impl.F.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.44a) = struct_value () [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.742)] -// CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2: = specific_function %tuple.type.as.A.impl.F, @tuple.type.as.A.impl.F(%V1, %V2, %W, %U.loc17_9.1) [symbolic = %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 (constants.%tuple.type.as.A.impl.F.specific_fn.37b)] +// CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2: = specific_function %tuple.type.as.A.impl.F, @tuple.type.as.A.impl.F(%V1, %V2, %W, %U.loc17_17.1) [symbolic = %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 (constants.%tuple.type.as.A.impl.F.specific_fn.37b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @tuple.type.as.A.impl.F.%U.loc17_9.1 (%U.ce4)) -> out %return.param: @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) { +// CHECK:STDOUT: fn(%u.param: @tuple.type.as.A.impl.F.%U.loc17_17.1 (%U.ce4)) -> out %return.param: @tuple.type.as.A.impl.F.%tuple.type.loc17_49.2 (%tuple.type.897) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc18: @tuple.type.as.A.impl.F.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.44a) = specific_constant @tuple.type.as.A.impl.%tuple.type.as.A.impl.F.decl, @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.742)] // CHECK:STDOUT: %F.ref: @tuple.type.as.A.impl.F.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.44a) = name_ref F, %.loc18 [symbolic = %tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.742)] -// CHECK:STDOUT: %U.ref.loc18: type = name_ref U, %U.loc17_9.2 [symbolic = %U.loc17_9.1 (constants.%U.ce4)] -// CHECK:STDOUT: %u.ref: @tuple.type.as.A.impl.F.%U.loc17_9.1 (%U.ce4) = name_ref u, %u +// CHECK:STDOUT: %U.ref.loc18: type = name_ref U, %U.loc17_17.2 [symbolic = %U.loc17_17.1 (constants.%U.ce4)] +// CHECK:STDOUT: %u.ref: @tuple.type.as.A.impl.F.%U.loc17_17.1 (%U.ce4) = name_ref u, %u // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.1: = specific_function %F.ref, @tuple.type.as.A.impl.F(constants.%V1, constants.%V2, constants.%W, constants.%U.ce4) [symbolic = %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 (constants.%tuple.type.as.A.impl.F.specific_fn.37b)] -// CHECK:STDOUT: %.loc17_42.1: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) = splice_block %return.param {} -// CHECK:STDOUT: %tuple.type.as.A.impl.F.call: init @tuple.type.as.A.impl.F.%tuple.type.loc17_42.2 (%tuple.type.897) to %.loc17_42.1 = call %tuple.type.as.A.impl.F.specific_fn.loc18_12.1(%u.ref) +// CHECK:STDOUT: %.loc17_49.1: ref @tuple.type.as.A.impl.F.%tuple.type.loc17_49.2 (%tuple.type.897) = splice_block %return.param {} +// CHECK:STDOUT: %tuple.type.as.A.impl.F.call: init @tuple.type.as.A.impl.F.%tuple.type.loc17_49.2 (%tuple.type.897) to %.loc17_49.1 = call %tuple.type.as.A.impl.F.specific_fn.loc18_12.1(%u.ref) // CHECK:STDOUT: return %tuple.type.as.A.impl.F.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -1379,7 +1379,7 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc24_23: %A.type.df0 = converted %.loc24_14, %A.facet [concrete = constants.%A.facet.682] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc24_23 [concrete = constants.%tuple.type.59f] // CHECK:STDOUT: %.loc24_31.1: type = converted %.loc24_23, %as_type [concrete = constants.%tuple.type.59f] -// CHECK:STDOUT: %.loc24_31.2: %A.assoc_type.a54 = specific_constant @A.WithSelf.%assoc0.loc6_39.1, @A.WithSelf(constants.%X, constants.%A.facet.682) [concrete = constants.%assoc0.987] +// CHECK:STDOUT: %.loc24_31.2: %A.assoc_type.a54 = specific_constant @A.WithSelf.%assoc0.loc6_46.1, @A.WithSelf(constants.%X, constants.%A.facet.682) [concrete = constants.%assoc0.987] // CHECK:STDOUT: %F.ref: %A.assoc_type.a54 = name_ref F, %.loc24_31.2 [concrete = constants.%assoc0.987] // CHECK:STDOUT: %impl.elem0: %.d9b = impl_witness_access constants.%A.impl_witness.6b7, element0 [concrete = constants.%tuple.type.as.A.impl.F.749] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] @@ -1445,13 +1445,13 @@ fn CallIndirect() { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGeneric(%T.loc27_17.2: %facet_type) { -// CHECK:STDOUT: %T.patt.loc27_17.2: %pattern_type.871 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_17.2 (constants.%T.patt.c17)] -// CHECK:STDOUT: %T.loc27_17.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc27_17.1 (constants.%T.5b7)] +// CHECK:STDOUT: generic fn @CallGeneric(%T.loc27_25.2: %facet_type) { +// CHECK:STDOUT: %T.patt.loc27_25.2: %pattern_type.871 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_25.2 (constants.%T.patt.c17)] +// CHECK:STDOUT: %T.loc27_25.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc27_25.1 (constants.%T.5b7)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc28_4.2: type = facet_access_type %T.loc27_17.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc27_17.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] +// CHECK:STDOUT: %T.as_type.loc28_4.2: type = facet_access_type %T.loc27_25.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc27_25.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] // CHECK:STDOUT: %A.facet: %A.type.df0 = facet_value %T.as_type.loc28_4.2, (%A.lookup_impl_witness) [symbolic = %A.facet (constants.%A.facet.318)] // CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A.WithSelf(constants.%X, %A.facet) [symbolic = %A.WithSelf.F.type (constants.%A.WithSelf.F.type.497)] // CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type %A.WithSelf.F.type, %A.facet [symbolic = %.loc28_4.3 (constants.%.151)] @@ -1468,10 +1468,10 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: %facet_type = name_ref T, %T.loc27_17.2 [symbolic = %T.loc27_17.1 (constants.%T.5b7)] +// CHECK:STDOUT: %T.ref: %facet_type = name_ref T, %T.loc27_25.2 [symbolic = %T.loc27_25.1 (constants.%T.5b7)] // CHECK:STDOUT: %T.as_type.loc28_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc28_4.1: type = converted %T.ref, %T.as_type.loc28_4.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.a54 = specific_constant @A.WithSelf.%assoc0.loc6_39.1, @A.WithSelf(constants.%X, constants.%T.5b7) [concrete = constants.%assoc0.987] +// CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.a54 = specific_constant @A.WithSelf.%assoc0.loc6_46.1, @A.WithSelf(constants.%X, constants.%T.5b7) [concrete = constants.%assoc0.987] // CHECK:STDOUT: %F.ref: %A.assoc_type.a54 = name_ref F, %.loc28_4.2 [concrete = constants.%assoc0.987] // CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.151) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.1a3)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] @@ -1526,22 +1526,22 @@ fn CallIndirect() { // CHECK:STDOUT: specific @A.WithSelf(constants.%T.67d, constants.%Self.49a) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf.F(constants.%T.67d, constants.%Self.49a, constants.%U.4e7) { -// CHECK:STDOUT: %U.patt.loc6_9.2 => constants.%U.patt.b22 -// CHECK:STDOUT: %U.loc6_9.1 => constants.%U.4e7 -// CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.62e -// CHECK:STDOUT: %u.param_patt.loc6_19.2 => constants.%u.param_patt.6ef -// CHECK:STDOUT: %u.patt.loc6_19.2 => constants.%u.patt.8af +// CHECK:STDOUT: %U.patt.loc6_17.2 => constants.%U.patt.b22 +// CHECK:STDOUT: %U.loc6_17.1 => constants.%U.4e7 +// CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.62e +// CHECK:STDOUT: %u.param_patt.loc6_26.2 => constants.%u.param_patt.6ef +// CHECK:STDOUT: %u.patt.loc6_26.2 => constants.%u.patt.8af // CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %A.type => constants.%A.type.acd // CHECK:STDOUT: %Self => constants.%Self.49a -// CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.76f +// CHECK:STDOUT: %tuple.type.loc6_45.1 => constants.%tuple.type.76f // CHECK:STDOUT: %tuple => constants.%tuple.55a -// CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%Self.as_type.763 -// CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.d73 -// CHECK:STDOUT: %.loc6_38.1 => constants.%.bc3 -// CHECK:STDOUT: %pattern_type.loc6_38 => constants.%pattern_type.d6c -// CHECK:STDOUT: %return.param_patt.loc6_38.2 => constants.%return.param_patt.52a -// CHECK:STDOUT: %return.patt.loc6_24.2 => constants.%return.patt.808 +// CHECK:STDOUT: %Self.as_type.loc6_45.1 => constants.%Self.as_type.763 +// CHECK:STDOUT: %tuple.type.loc6_45.2 => constants.%tuple.type.d73 +// CHECK:STDOUT: %.loc6_45.1 => constants.%.bc3 +// CHECK:STDOUT: %pattern_type.loc6_45 => constants.%pattern_type.d6c +// CHECK:STDOUT: %return.param_patt.loc6_45.2 => constants.%return.param_patt.52a +// CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.808 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%W) { @@ -1550,20 +1550,20 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A.type => constants.%A.type.3ad -// CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.0f8 +// CHECK:STDOUT: %Self.loc5_22.2 => constants.%Self.0f8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) { // CHECK:STDOUT: %V1.patt.loc14_16.2 => constants.%V1.patt // CHECK:STDOUT: %V1.loc14_16.1 => constants.%V1 -// CHECK:STDOUT: %V2.patt.loc14_27.2 => constants.%V2.patt -// CHECK:STDOUT: %V2.loc14_27.1 => constants.%V2 -// CHECK:STDOUT: %W.patt.loc14_37.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc14_37.1 => constants.%W +// CHECK:STDOUT: %V2.patt.loc14_26.2 => constants.%V2.patt +// CHECK:STDOUT: %V2.loc14_26.1 => constants.%V2 +// CHECK:STDOUT: %W.patt.loc14_35.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc14_35.1 => constants.%W // CHECK:STDOUT: %tuple => constants.%tuple.4b9 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a5e -// CHECK:STDOUT: %A.type.loc14_61.1 => constants.%A.type.3ad -// CHECK:STDOUT: %A.impl_witness.loc14_63.2 => constants.%A.impl_witness.756 +// CHECK:STDOUT: %A.type.loc14_58.1 => constants.%A.type.3ad +// CHECK:STDOUT: %A.impl_witness.loc14_60.2 => constants.%A.impl_witness.756 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.7b2 @@ -1579,30 +1579,30 @@ fn CallIndirect() { // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.64e // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.1fb // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.250 -// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.6de +// CHECK:STDOUT: %assoc0.loc6_46.2 => constants.%assoc0.6de // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @tuple.type.as.A.impl.F(constants.%V1, constants.%V2, constants.%W, constants.%U.ce4) { -// CHECK:STDOUT: %U.patt.loc17_9.2 => constants.%U.patt.637 -// CHECK:STDOUT: %U.loc17_9.1 => constants.%U.ce4 -// CHECK:STDOUT: %pattern_type.loc17_19 => constants.%pattern_type.e4a -// CHECK:STDOUT: %u.param_patt.loc17_19.2 => constants.%u.param_patt.afe -// CHECK:STDOUT: %u.patt.loc17_19.2 => constants.%u.patt.e63 +// CHECK:STDOUT: %U.patt.loc17_17.2 => constants.%U.patt.637 +// CHECK:STDOUT: %U.loc17_17.1 => constants.%U.ce4 +// CHECK:STDOUT: %pattern_type.loc17_26 => constants.%pattern_type.e4a +// CHECK:STDOUT: %u.param_patt.loc17_26.2 => constants.%u.param_patt.afe +// CHECK:STDOUT: %u.patt.loc17_26.2 => constants.%u.patt.e63 // CHECK:STDOUT: %W => constants.%W // CHECK:STDOUT: %V1 => constants.%V1 // CHECK:STDOUT: %V2 => constants.%V2 -// CHECK:STDOUT: %tuple.loc17_38 => constants.%tuple.4b9 -// CHECK:STDOUT: %tuple.loc17_42 => constants.%tuple.117 -// CHECK:STDOUT: %tuple.type.loc17_42.1 => constants.%tuple.type.a5e -// CHECK:STDOUT: %tuple.type.loc17_42.2 => constants.%tuple.type.897 -// CHECK:STDOUT: %.loc17_42.2 => constants.%.f8e -// CHECK:STDOUT: %pattern_type.loc17_42 => constants.%pattern_type.5cc -// CHECK:STDOUT: %return.param_patt.loc17_42.2 => constants.%return.param_patt.b1c -// CHECK:STDOUT: %return.patt.loc17_24.2 => constants.%return.patt.bad9 +// CHECK:STDOUT: %tuple.loc17_45 => constants.%tuple.4b9 +// CHECK:STDOUT: %tuple.loc17_49 => constants.%tuple.117 +// CHECK:STDOUT: %tuple.type.loc17_49.1 => constants.%tuple.type.a5e +// CHECK:STDOUT: %tuple.type.loc17_49.2 => constants.%tuple.type.897 +// CHECK:STDOUT: %.loc17_49.2 => constants.%.f8e +// CHECK:STDOUT: %pattern_type.loc17_49 => constants.%pattern_type.5cc +// CHECK:STDOUT: %return.param_patt.loc17_49.2 => constants.%return.param_patt.b1c +// CHECK:STDOUT: %return.patt.loc17_31.2 => constants.%return.patt.bad9 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc17_19 => constants.%require_complete.5a4 -// CHECK:STDOUT: %require_complete.loc17_24 => constants.%require_complete.da0 +// CHECK:STDOUT: %require_complete.loc17_26 => constants.%require_complete.5a4 +// CHECK:STDOUT: %require_complete.loc17_31 => constants.%require_complete.da0 // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.44a // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.742 // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 => constants.%tuple.type.as.A.impl.F.specific_fn.37b @@ -1616,26 +1616,26 @@ fn CallIndirect() { // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.5f0 // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.147 // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.250 -// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.6de +// CHECK:STDOUT: %assoc0.loc6_46.2 => constants.%assoc0.6de // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf.F(constants.%W, constants.%A.facet.ab0, constants.%U.ce4) { -// CHECK:STDOUT: %U.patt.loc6_9.2 => constants.%U.patt.b22 -// CHECK:STDOUT: %U.loc6_9.1 => constants.%U.ce4 -// CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.e4a -// CHECK:STDOUT: %u.param_patt.loc6_19.2 => constants.%u.param_patt.afe -// CHECK:STDOUT: %u.patt.loc6_19.2 => constants.%u.patt.e63 +// CHECK:STDOUT: %U.patt.loc6_17.2 => constants.%U.patt.b22 +// CHECK:STDOUT: %U.loc6_17.1 => constants.%U.ce4 +// CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.e4a +// CHECK:STDOUT: %u.param_patt.loc6_26.2 => constants.%u.param_patt.afe +// CHECK:STDOUT: %u.patt.loc6_26.2 => constants.%u.patt.e63 // CHECK:STDOUT: %T => constants.%W // CHECK:STDOUT: %A.type => constants.%A.type.3ad // CHECK:STDOUT: %Self => constants.%A.facet.ab0 -// CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.a90 +// CHECK:STDOUT: %tuple.type.loc6_45.1 => constants.%tuple.type.a90 // CHECK:STDOUT: %tuple => constants.%tuple.059 -// CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%tuple.type.a5e -// CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.897 -// CHECK:STDOUT: %.loc6_38.1 => constants.%.f8e -// CHECK:STDOUT: %pattern_type.loc6_38 => constants.%pattern_type.5cc -// CHECK:STDOUT: %return.param_patt.loc6_38.2 => constants.%return.param_patt.b1c -// CHECK:STDOUT: %return.patt.loc6_24.2 => constants.%return.patt.bad9 +// CHECK:STDOUT: %Self.as_type.loc6_45.1 => constants.%tuple.type.a5e +// CHECK:STDOUT: %tuple.type.loc6_45.2 => constants.%tuple.type.897 +// CHECK:STDOUT: %.loc6_45.1 => constants.%.f8e +// CHECK:STDOUT: %pattern_type.loc6_45 => constants.%pattern_type.5cc +// CHECK:STDOUT: %return.param_patt.loc6_45.2 => constants.%return.param_patt.b1c +// CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.bad9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%X) { @@ -1644,20 +1644,20 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A.type => constants.%A.type.df0 -// CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.891 +// CHECK:STDOUT: %Self.loc5_22.2 => constants.%Self.891 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @tuple.type.as.A.impl(constants.%Y1, constants.%Y2, constants.%X) { // CHECK:STDOUT: %V1.patt.loc14_16.2 => constants.%V1.patt // CHECK:STDOUT: %V1.loc14_16.1 => constants.%Y1 -// CHECK:STDOUT: %V2.patt.loc14_27.2 => constants.%V2.patt -// CHECK:STDOUT: %V2.loc14_27.1 => constants.%Y2 -// CHECK:STDOUT: %W.patt.loc14_37.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc14_37.1 => constants.%X +// CHECK:STDOUT: %V2.patt.loc14_26.2 => constants.%V2.patt +// CHECK:STDOUT: %V2.loc14_26.1 => constants.%Y2 +// CHECK:STDOUT: %W.patt.loc14_35.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc14_35.1 => constants.%X // CHECK:STDOUT: %tuple => constants.%tuple.8db // CHECK:STDOUT: %tuple.type => constants.%tuple.type.59f -// CHECK:STDOUT: %A.type.loc14_61.1 => constants.%A.type.df0 -// CHECK:STDOUT: %A.impl_witness.loc14_63.2 => constants.%A.impl_witness.6b7 +// CHECK:STDOUT: %A.type.loc14_58.1 => constants.%A.type.df0 +// CHECK:STDOUT: %A.impl_witness.loc14_60.2 => constants.%A.impl_witness.6b7 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.e33 @@ -1673,7 +1673,7 @@ fn CallIndirect() { // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.ad4 // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.1e2 // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.a54 -// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.987 +// CHECK:STDOUT: %assoc0.loc6_46.2 => constants.%assoc0.987 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.682) { @@ -1684,38 +1684,38 @@ fn CallIndirect() { // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.243 // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.5b5 // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.a54 -// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.987 +// CHECK:STDOUT: %assoc0.loc6_46.2 => constants.%assoc0.987 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @tuple.type.as.A.impl.F(constants.%Y1, constants.%Y2, constants.%X, constants.%Z) { -// CHECK:STDOUT: %U.patt.loc17_9.2 => constants.%U.patt.637 -// CHECK:STDOUT: %U.loc17_9.1 => constants.%Z -// CHECK:STDOUT: %pattern_type.loc17_19 => constants.%pattern_type.34e -// CHECK:STDOUT: %u.param_patt.loc17_19.2 => constants.%u.param_patt.a3e -// CHECK:STDOUT: %u.patt.loc17_19.2 => constants.%u.patt.a51 +// CHECK:STDOUT: %U.patt.loc17_17.2 => constants.%U.patt.637 +// CHECK:STDOUT: %U.loc17_17.1 => constants.%Z +// CHECK:STDOUT: %pattern_type.loc17_26 => constants.%pattern_type.34e +// CHECK:STDOUT: %u.param_patt.loc17_26.2 => constants.%u.param_patt.a3e +// CHECK:STDOUT: %u.patt.loc17_26.2 => constants.%u.patt.a51 // CHECK:STDOUT: %W => constants.%X // CHECK:STDOUT: %V1 => constants.%Y1 // CHECK:STDOUT: %V2 => constants.%Y2 -// CHECK:STDOUT: %tuple.loc17_38 => constants.%tuple.8db -// CHECK:STDOUT: %tuple.loc17_42 => constants.%tuple.1a1 -// CHECK:STDOUT: %tuple.type.loc17_42.1 => constants.%tuple.type.59f -// CHECK:STDOUT: %tuple.type.loc17_42.2 => constants.%tuple.type.d40 -// CHECK:STDOUT: %.loc17_42.2 => constants.%.1a9 -// CHECK:STDOUT: %pattern_type.loc17_42 => constants.%pattern_type.6a8 -// CHECK:STDOUT: %return.param_patt.loc17_42.2 => constants.%return.param_patt.fb7 -// CHECK:STDOUT: %return.patt.loc17_24.2 => constants.%return.patt.badc +// CHECK:STDOUT: %tuple.loc17_45 => constants.%tuple.8db +// CHECK:STDOUT: %tuple.loc17_49 => constants.%tuple.1a1 +// CHECK:STDOUT: %tuple.type.loc17_49.1 => constants.%tuple.type.59f +// CHECK:STDOUT: %tuple.type.loc17_49.2 => constants.%tuple.type.d40 +// CHECK:STDOUT: %.loc17_49.2 => constants.%.1a9 +// CHECK:STDOUT: %pattern_type.loc17_49 => constants.%pattern_type.6a8 +// CHECK:STDOUT: %return.param_patt.loc17_49.2 => constants.%return.param_patt.fb7 +// CHECK:STDOUT: %return.patt.loc17_31.2 => constants.%return.patt.badc // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc17_19 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc17_24 => constants.%complete_type.8f6 +// CHECK:STDOUT: %require_complete.loc17_26 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc17_31 => constants.%complete_type.8f6 // CHECK:STDOUT: %tuple.type.as.A.impl.F.type => constants.%tuple.type.as.A.impl.F.type.745 // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.749 // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 => constants.%tuple.type.as.A.impl.F.specific_fn.981 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%T.5b7) { -// CHECK:STDOUT: %T.patt.loc27_17.2 => constants.%T.patt.c17 -// CHECK:STDOUT: %T.loc27_17.1 => constants.%T.5b7 +// CHECK:STDOUT: %T.patt.loc27_25.2 => constants.%T.patt.c17 +// CHECK:STDOUT: %T.loc27_25.1 => constants.%T.5b7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%T.5b7) { @@ -1726,7 +1726,7 @@ fn CallIndirect() { // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.91d // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.3f4 // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.a54 -// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.987 +// CHECK:STDOUT: %assoc0.loc6_46.2 => constants.%assoc0.987 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.318) { @@ -1737,31 +1737,31 @@ fn CallIndirect() { // CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.497 // CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.a4d // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.a54 -// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.987 +// CHECK:STDOUT: %assoc0.loc6_46.2 => constants.%assoc0.987 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.318, constants.%Z) { -// CHECK:STDOUT: %U.patt.loc6_9.2 => constants.%U.patt.b22 -// CHECK:STDOUT: %U.loc6_9.1 => constants.%Z -// CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.34e -// CHECK:STDOUT: %u.param_patt.loc6_19.2 => constants.%u.param_patt.a3e -// CHECK:STDOUT: %u.patt.loc6_19.2 => constants.%u.patt.a51 +// CHECK:STDOUT: %U.patt.loc6_17.2 => constants.%U.patt.b22 +// CHECK:STDOUT: %U.loc6_17.1 => constants.%Z +// CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.34e +// CHECK:STDOUT: %u.param_patt.loc6_26.2 => constants.%u.param_patt.a3e +// CHECK:STDOUT: %u.patt.loc6_26.2 => constants.%u.patt.a51 // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.df0 // CHECK:STDOUT: %Self => constants.%A.facet.318 -// CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.966 +// CHECK:STDOUT: %tuple.type.loc6_45.1 => constants.%tuple.type.966 // CHECK:STDOUT: %tuple => constants.%tuple.b58 -// CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%T.as_type -// CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.036 -// CHECK:STDOUT: %.loc6_38.1 => constants.%.772 -// CHECK:STDOUT: %pattern_type.loc6_38 => constants.%pattern_type.8f9 -// CHECK:STDOUT: %return.param_patt.loc6_38.2 => constants.%return.param_patt.cc2 -// CHECK:STDOUT: %return.patt.loc6_24.2 => constants.%return.patt.eed +// CHECK:STDOUT: %Self.as_type.loc6_45.1 => constants.%T.as_type +// CHECK:STDOUT: %tuple.type.loc6_45.2 => constants.%tuple.type.036 +// CHECK:STDOUT: %.loc6_45.1 => constants.%.772 +// CHECK:STDOUT: %pattern_type.loc6_45 => constants.%pattern_type.8f9 +// CHECK:STDOUT: %return.param_patt.loc6_45.2 => constants.%return.param_patt.cc2 +// CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.eed // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%facet_value) { -// CHECK:STDOUT: %T.patt.loc27_17.2 => constants.%T.patt.c17 -// CHECK:STDOUT: %T.loc27_17.1 => constants.%facet_value +// CHECK:STDOUT: %T.patt.loc27_25.2 => constants.%T.patt.c17 +// CHECK:STDOUT: %T.loc27_25.1 => constants.%facet_value // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.as_type.loc28_4.2 => constants.%tuple.type.59f @@ -1782,21 +1782,21 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.682, constants.%Z) { -// CHECK:STDOUT: %U.patt.loc6_9.2 => constants.%U.patt.b22 -// CHECK:STDOUT: %U.loc6_9.1 => constants.%Z -// CHECK:STDOUT: %pattern_type.loc6_19 => constants.%pattern_type.34e -// CHECK:STDOUT: %u.param_patt.loc6_19.2 => constants.%u.param_patt.a3e -// CHECK:STDOUT: %u.patt.loc6_19.2 => constants.%u.patt.a51 +// CHECK:STDOUT: %U.patt.loc6_17.2 => constants.%U.patt.b22 +// CHECK:STDOUT: %U.loc6_17.1 => constants.%Z +// CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.34e +// CHECK:STDOUT: %u.param_patt.loc6_26.2 => constants.%u.param_patt.a3e +// CHECK:STDOUT: %u.patt.loc6_26.2 => constants.%u.patt.a51 // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.df0 // CHECK:STDOUT: %Self => constants.%A.facet.682 -// CHECK:STDOUT: %tuple.type.loc6_38.1 => constants.%tuple.type.966 +// CHECK:STDOUT: %tuple.type.loc6_45.1 => constants.%tuple.type.966 // CHECK:STDOUT: %tuple => constants.%tuple.92c -// CHECK:STDOUT: %Self.as_type.loc6_38.1 => constants.%tuple.type.59f -// CHECK:STDOUT: %tuple.type.loc6_38.2 => constants.%tuple.type.d40 -// CHECK:STDOUT: %.loc6_38.1 => constants.%.1a9 -// CHECK:STDOUT: %pattern_type.loc6_38 => constants.%pattern_type.6a8 -// CHECK:STDOUT: %return.param_patt.loc6_38.2 => constants.%return.param_patt.fb7 -// CHECK:STDOUT: %return.patt.loc6_24.2 => constants.%return.patt.badc +// CHECK:STDOUT: %Self.as_type.loc6_45.1 => constants.%tuple.type.59f +// CHECK:STDOUT: %tuple.type.loc6_45.2 => constants.%tuple.type.d40 +// CHECK:STDOUT: %.loc6_45.1 => constants.%.1a9 +// CHECK:STDOUT: %pattern_type.loc6_45 => constants.%pattern_type.6a8 +// CHECK:STDOUT: %return.param_patt.loc6_45.2 => constants.%return.param_patt.fb7 +// CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.badc // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_vs_params.carbon b/toolchain/check/testdata/interface/generic_vs_params.carbon index fe5996621c0d..369c649f663f 100644 --- a/toolchain/check/testdata/interface/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/generic_vs_params.carbon @@ -18,11 +18,11 @@ library "[[@TEST_NAME]]"; interface NotGenericNoParams {} interface NotGenericButParams() {} -interface GenericAndParams(T:! type) {} +interface GenericAndParams(T: type) {} -class C(T:! type) { +class C(T: type) { interface GenericNoParams {} - interface GenericAndParams(U:! type) {} + interface GenericAndParams(U: type) {} } class X {} @@ -37,20 +37,20 @@ impl X as C(X).GenericAndParams(X) {} library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_non_generic_implicit_params.carbon:[[@LINE+4]]:13: error: parameters of generic types must be constant [GenericParamMustBeConstant] -// CHECK:STDERR: interface A[T: type]() {} -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: interface A[runtime T: type]() {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -interface A[T: type]() {} +interface A[runtime T: type]() {} // --- fail_non_generic_params.carbon library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_non_generic_params.carbon:[[@LINE+4]]:13: error: parameters of generic types must be constant [GenericParamMustBeConstant] -// CHECK:STDERR: interface A(T: type) {} -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: interface A(runtime T: type) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -interface A(T: type) {} +interface A(runtime T: type) {} // --- fail_implicit_params_only_empty.carbon @@ -67,10 +67,10 @@ interface Bar[] {} library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_implicit_params_only.carbon:[[@LINE+4]]:14: error: expected explicit parameters after implicit parameters [GenericMissingExplicitParameters] -// CHECK:STDERR: interface Bar[T:! type] {} -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: interface Bar[T: type] {} +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -interface Bar[T:! type] {} +interface Bar[T: type] {} // CHECK:STDOUT: --- params.carbon // CHECK:STDOUT: @@ -138,18 +138,18 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.23f = interface_decl @GenericAndParams.loc6 [concrete = constants.%GenericAndParams.generic.504] { // CHECK:STDOUT: %T.patt.loc6_29.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_29.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_32.1: type = splice_block %.loc6_32.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_32.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_31.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_29.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_29.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc8_10.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_10.1 (constants.%T)] // CHECK:STDOUT: } @@ -221,14 +221,14 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GenericAndParams.type: type = facet_type <@GenericAndParams.loc6, @GenericAndParams.loc6(%T.loc6_29.1)> [symbolic = %GenericAndParams.type (constants.%GenericAndParams.type.b17)] -// CHECK:STDOUT: %Self.loc6_38.2: @GenericAndParams.loc6.%GenericAndParams.type (%GenericAndParams.type.b17) = symbolic_binding Self, 1 [symbolic = %Self.loc6_38.2 (constants.%Self.cda)] +// CHECK:STDOUT: %Self.loc6_37.2: @GenericAndParams.loc6.%GenericAndParams.type (%GenericAndParams.type.b17) = symbolic_binding Self, 1 [symbolic = %Self.loc6_37.2 (constants.%Self.cda)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc6_38.1: @GenericAndParams.loc6.%GenericAndParams.type (%GenericAndParams.type.b17) = symbolic_binding Self, 1 [symbolic = %Self.loc6_38.2 (constants.%Self.cda)] +// CHECK:STDOUT: %Self.loc6_37.1: @GenericAndParams.loc6.%GenericAndParams.type (%GenericAndParams.type.b17) = symbolic_binding Self, 1 [symbolic = %Self.loc6_37.2 (constants.%Self.cda)] // CHECK:STDOUT: %GenericAndParams.WithSelf.decl = interface_with_self_decl @GenericAndParams.loc6 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc6_38.1 +// CHECK:STDOUT: .Self = %Self.loc6_37.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -264,14 +264,14 @@ interface Bar[T:! type] {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %GenericAndParams.type: type = facet_type <@GenericAndParams.loc10, @GenericAndParams.loc10(%T, %U.loc10_31.1)> [symbolic = %GenericAndParams.type (constants.%GenericAndParams.type.ba4)] -// CHECK:STDOUT: %Self.loc10_40.2: @GenericAndParams.loc10.%GenericAndParams.type (%GenericAndParams.type.ba4) = symbolic_binding Self, 2 [symbolic = %Self.loc10_40.2 (constants.%Self.72e)] +// CHECK:STDOUT: %Self.loc10_39.2: @GenericAndParams.loc10.%GenericAndParams.type (%GenericAndParams.type.ba4) = symbolic_binding Self, 2 [symbolic = %Self.loc10_39.2 (constants.%Self.72e)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc10_40.1: @GenericAndParams.loc10.%GenericAndParams.type (%GenericAndParams.type.ba4) = symbolic_binding Self, 2 [symbolic = %Self.loc10_40.2 (constants.%Self.72e)] +// CHECK:STDOUT: %Self.loc10_39.1: @GenericAndParams.loc10.%GenericAndParams.type (%GenericAndParams.type.ba4) = symbolic_binding Self, 2 [symbolic = %Self.loc10_39.2 (constants.%Self.72e)] // CHECK:STDOUT: %GenericAndParams.WithSelf.decl = interface_with_self_decl @GenericAndParams.loc10 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc10_40.1 +// CHECK:STDOUT: .Self = %Self.loc10_39.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -339,9 +339,9 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.c43) = interface_decl @GenericAndParams.loc10 [symbolic = @C.%GenericAndParams.generic (constants.%GenericAndParams.generic.079)] { // CHECK:STDOUT: %U.patt.loc10_31.1: %pattern_type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc10_31.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_34.1: type = splice_block %.loc10_34.2 [concrete = type] { +// CHECK:STDOUT: %.loc10_33.1: type = splice_block %.loc10_33.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc10_34.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc10_33.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc10_31.2: type = symbolic_binding U, 1 [symbolic = %U.loc10_31.1 (constants.%U)] // CHECK:STDOUT: } @@ -408,7 +408,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GenericAndParams.type => constants.%GenericAndParams.type.8ab -// CHECK:STDOUT: %Self.loc6_38.2 => constants.%Self.34f +// CHECK:STDOUT: %Self.loc6_37.2 => constants.%Self.34f // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.WithSelf.loc6(constants.%X, constants.%Self.cda) { @@ -451,7 +451,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %GenericAndParams.type => constants.%GenericAndParams.type.b2b -// CHECK:STDOUT: %Self.loc10_40.2 => constants.%Self.883 +// CHECK:STDOUT: %Self.loc10_39.2 => constants.%Self.883 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.WithSelf.loc10(constants.%X, constants.%X, constants.%Self.72e) { @@ -576,9 +576,9 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %Bar.decl: %Bar.type.3f0 = interface_decl @Bar [concrete = constants.%Bar.generic] { // CHECK:STDOUT: %T.patt.loc8_16.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_16.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_19.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_16.1 (constants.%T)] // CHECK:STDOUT: } @@ -590,14 +590,14 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Bar.type: type = facet_type <@Bar, @Bar(%T.loc8_16.1)> [symbolic = %Bar.type (constants.%Bar.type.e6f)] -// CHECK:STDOUT: %Self.loc8_25.2: @Bar.%Bar.type (%Bar.type.e6f) = symbolic_binding Self, 1 [symbolic = %Self.loc8_25.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc8_24.2: @Bar.%Bar.type (%Bar.type.e6f) = symbolic_binding Self, 1 [symbolic = %Self.loc8_24.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc8_25.1: @Bar.%Bar.type (%Bar.type.e6f) = symbolic_binding Self, 1 [symbolic = %Self.loc8_25.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc8_24.1: @Bar.%Bar.type (%Bar.type.e6f) = symbolic_binding Self, 1 [symbolic = %Self.loc8_24.2 (constants.%Self)] // CHECK:STDOUT: %Bar.WithSelf.decl = interface_with_self_decl @Bar [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc8_25.1 +// CHECK:STDOUT: .Self = %Self.loc8_24.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: diff --git a/toolchain/check/testdata/interface/import.carbon b/toolchain/check/testdata/interface/import.carbon index b2ced51ef9fe..c82efec33518 100644 --- a/toolchain/check/testdata/interface/import.carbon +++ b/toolchain/check/testdata/interface/import.carbon @@ -20,7 +20,7 @@ interface Empty { } interface Basic { - let T:! type; + let T: type; fn F(); } @@ -28,7 +28,7 @@ interface Basic { // interface ForwardDeclared; interface ForwardDeclared { - let T:! type; + let T: type; fn F(); } diff --git a/toolchain/check/testdata/interface/incomplete.carbon b/toolchain/check/testdata/interface/incomplete.carbon index 2b5d180bfa9a..70d71b30afd1 100644 --- a/toolchain/check/testdata/interface/incomplete.carbon +++ b/toolchain/check/testdata/interface/incomplete.carbon @@ -18,7 +18,7 @@ library "[[@TEST_NAME]]"; class C; interface I { - let T:! C; + let T: C; } // --- fail_incomplete_type_impl.carbon @@ -27,7 +27,7 @@ library "[[@TEST_NAME]]"; class C; interface I { - let T:! C; + let T: C; } // CHECK:STDERR: fail_incomplete_type_impl.carbon:[[@LINE+7]]:26: error: invalid use of incomplete type `C` [IncompleteTypeInConversion] @@ -45,10 +45,10 @@ library "[[@TEST_NAME]]"; class C; interface I { - let T:! C; + let T: C; } -fn F[U:! I](a: U) { +fn F[U: I](a: U) { // TODO: Should this be diagnosed as having an incomplete type? a.T; } @@ -86,13 +86,13 @@ interface A { // --- fail_extend_require_enclosing_generic.carbon library "[[@TEST_NAME]]"; -interface A(T:! type) { +interface A(T: type) { // CHECK:STDERR: fail_extend_require_enclosing_generic.carbon:[[@LINE+7]]:24: error: `extend require` of incomplete facet type `A({})` [RequireImplsIncompleteFacetType] // CHECK:STDERR: extend require impls A({}); // CHECK:STDERR: ^~~~~ // CHECK:STDERR: fail_extend_require_enclosing_generic.carbon:[[@LINE-4]]:1: note: interface is currently being defined [InterfaceIncompleteWithinDefinition] - // CHECK:STDERR: interface A(T:! type) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: interface A(T: type) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: extend require impls A({}); } @@ -261,21 +261,21 @@ interface A(T:! type) { // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %U.patt.loc9_7.1: %pattern_type.6cb = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_7.2 (constants.%U.patt)] -// CHECK:STDOUT: %a.param_patt.loc9_14.1: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %a.param_patt.loc9_14.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc9_14.1: @F.%pattern_type (%pattern_type.b3a) = at_binding_pattern a, %a.param_patt.loc9_14.1 [symbolic = %a.patt.loc9_14.2 (constants.%a.patt)] +// CHECK:STDOUT: %a.param_patt.loc9_13.1: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %a.param_patt.loc9_13.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc9_13.1: @F.%pattern_type (%pattern_type.b3a) = at_binding_pattern a, %a.param_patt.loc9_13.1 [symbolic = %a.patt.loc9_13.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_10: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %.loc9_9: type = splice_block %I.ref [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc9_7.2: %I.type = symbolic_binding U, 0 [symbolic = %U.loc9_7.1 (constants.%U)] -// CHECK:STDOUT: %a.param: @F.%U.as_type.loc9_16.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc9_16.1: type = splice_block %.loc9_16.2 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] { +// CHECK:STDOUT: %a.param: @F.%U.as_type.loc9_15.1 (%U.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc9_15.1: type = splice_block %.loc9_15.2 [symbolic = %U.as_type.loc9_15.1 (constants.%U.as_type)] { // CHECK:STDOUT: %U.ref: %I.type = name_ref U, %U.loc9_7.2 [symbolic = %U.loc9_7.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc9_16.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc9_16.2: type = converted %U.ref, %U.as_type.loc9_16.2 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.as_type.loc9_15.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc9_15.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc9_15.2: type = converted %U.ref, %U.as_type.loc9_15.2 [symbolic = %U.as_type.loc9_15.1 (constants.%U.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @F.%U.as_type.loc9_16.1 (%U.as_type) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @F.%U.as_type.loc9_15.1 (%U.as_type) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -305,19 +305,19 @@ interface A(T:! type) { // CHECK:STDOUT: generic fn @F(%U.loc9_7.2: %I.type) { // CHECK:STDOUT: %U.patt.loc9_7.2: %pattern_type.6cb = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_7.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc9_7.1: %I.type = symbolic_binding U, 0 [symbolic = %U.loc9_7.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc9_16.1: type = facet_access_type %U.loc9_7.1 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc9_16.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] -// CHECK:STDOUT: %a.param_patt.loc9_14.2: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %a.param_patt.loc9_14.2 (constants.%a.param_patt)] -// CHECK:STDOUT: %a.patt.loc9_14.2: @F.%pattern_type (%pattern_type.b3a) = at_binding_pattern a, %a.param_patt.loc9_14.2 [symbolic = %a.patt.loc9_14.2 (constants.%a.patt)] +// CHECK:STDOUT: %U.as_type.loc9_15.1: type = facet_access_type %U.loc9_7.1 [symbolic = %U.as_type.loc9_15.1 (constants.%U.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc9_15.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] +// CHECK:STDOUT: %a.param_patt.loc9_13.2: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %a.param_patt.loc9_13.2 (constants.%a.param_patt)] +// CHECK:STDOUT: %a.patt.loc9_13.2: @F.%pattern_type (%pattern_type.b3a) = at_binding_pattern a, %a.param_patt.loc9_13.2 [symbolic = %a.patt.loc9_13.2 (constants.%a.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc9_16.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc9_15.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %U.loc9_7.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc11_4.2: %C = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%U.as_type.loc9_16.1 (%U.as_type)) { +// CHECK:STDOUT: fn(%a.param: @F.%U.as_type.loc9_15.1 (%U.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: @F.%U.as_type.loc9_16.1 (%U.as_type) = name_ref a, %a +// CHECK:STDOUT: %a.ref: @F.%U.as_type.loc9_15.1 (%U.as_type) = name_ref a, %a // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc11_4.1: %C = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: return @@ -333,10 +333,10 @@ interface A(T:! type) { // CHECK:STDOUT: specific @F(constants.%U) { // CHECK:STDOUT: %U.patt.loc9_7.2 => constants.%U.patt // CHECK:STDOUT: %U.loc9_7.1 => constants.%U -// CHECK:STDOUT: %U.as_type.loc9_16.1 => constants.%U.as_type +// CHECK:STDOUT: %U.as_type.loc9_15.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a -// CHECK:STDOUT: %a.param_patt.loc9_14.2 => constants.%a.param_patt -// CHECK:STDOUT: %a.patt.loc9_14.2 => constants.%a.patt +// CHECK:STDOUT: %a.param_patt.loc9_13.2 => constants.%a.param_patt +// CHECK:STDOUT: %a.patt.loc9_13.2 => constants.%a.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%U) { @@ -455,9 +455,9 @@ interface A(T:! type) { // CHECK:STDOUT: %A.decl: %A.type.55a = interface_decl @A [concrete = constants.%A.generic] { // CHECK:STDOUT: %T.patt.loc3_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_16.1: type = splice_block %.loc3_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc3_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_14.1 (constants.%T)] // CHECK:STDOUT: } @@ -469,17 +469,17 @@ interface A(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc3_14.1)> [symbolic = %A.type (constants.%A.type.acd)] -// CHECK:STDOUT: %Self.loc3_23.2: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc3_22.2: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_23.1: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc3_22.1: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self)] // CHECK:STDOUT: %A.WithSelf.decl = interface_with_self_decl @A [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %A.WithSelf.Self.as_type.impls.A.type.require.decl = require_decl @A.WithSelf.Self.as_type.impls.A.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type.loc11_18.1 impls %A.type.loc11_28 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_type.loc11_18.1: type = facet_access_type @A.%Self.loc3_23.1 [symbolic = %Self.as_type.loc11_18.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %Self.as_type.loc11_18.1: type = facet_access_type @A.%Self.loc3_22.1 [symbolic = %Self.as_type.loc11_18.2 (constants.%Self.as_type)] // CHECK:STDOUT: %A.ref: %A.type.55a = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %.loc11_27: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc11_28: type = converted %.loc11_27, constants.%empty_struct_type [concrete = constants.%empty_struct_type] @@ -487,7 +487,7 @@ interface A(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_23.1 +// CHECK:STDOUT: .Self = %Self.loc3_22.1 // CHECK:STDOUT: .A = // CHECK:STDOUT: .A = // CHECK:STDOUT: witness = () @@ -498,7 +498,7 @@ interface A(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @A.WithSelf.Self.as_type.impls.A.type.require(@A.%T.loc3_14.2: type, @A.%Self.loc3_23.1: @A.%A.type (%A.type.acd)) { +// CHECK:STDOUT: generic require @A.WithSelf.Self.as_type.impls.A.type.require(@A.%T.loc3_14.2: type, @A.%Self.loc3_22.1: @A.%A.type (%A.type.acd)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %A.type.loc11_18: type = facet_type <@A, @A(%T)> [symbolic = %A.type.loc11_18 (constants.%A.type.acd)] // CHECK:STDOUT: %Self: @A.WithSelf.Self.as_type.impls.A.type.require.%A.type.loc11_18 (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] diff --git a/toolchain/check/testdata/interface/member_lookup.carbon b/toolchain/check/testdata/interface/member_lookup.carbon index d6c2a7432e97..cf6a57475381 100644 --- a/toolchain/check/testdata/interface/member_lookup.carbon +++ b/toolchain/check/testdata/interface/member_lookup.carbon @@ -16,15 +16,15 @@ library "[[@TEST_NAME]]"; -interface Interface(T:! type) { - let X:! T*; +interface Interface(T: type) { + let X: T*; } -fn AccessGeneric[T:! type](I:! Interface(T)) -> T* { +fn AccessGeneric[T: type](generic I: Interface(T)) -> T* { return I.X; } -fn AccessConcrete(I:! Interface(i32)) -> i32* { +fn AccessConcrete(generic I: Interface(i32)) -> i32* { return I.X; } @@ -32,11 +32,11 @@ fn AccessConcrete(I:! Interface(i32)) -> i32* { library "[[@TEST_NAME]]"; -interface Interface(T:! type) { - let X:! T*; +interface Interface(T: type) { + let X: T*; } -fn AccessMissingGeneric[T:! type](I:! Interface(T)) -> T { +fn AccessMissingGeneric[T: type](generic I: Interface(T)) -> T { // CHECK:STDERR: fail_no_member.carbon:[[@LINE+4]]:10: error: member name `nonesuch` not found in `Interface(T)` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: return I.nonesuch; // CHECK:STDERR: ^~~~~~~~~~ @@ -44,7 +44,7 @@ fn AccessMissingGeneric[T:! type](I:! Interface(T)) -> T { return I.nonesuch; } -fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { +fn AccessMissingConcrete(generic I: Interface(i32)) -> i32 { // CHECK:STDERR: fail_no_member.carbon:[[@LINE+4]]:10: error: member name `nonesuch` not found in `Interface(i32)` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: return I.nonesuch; // CHECK:STDERR: ^~~~~~~~~~ @@ -150,51 +150,51 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %Interface.decl: %Interface.type.1b1 = interface_decl @Interface [concrete = constants.%Interface.generic] { // CHECK:STDOUT: %T.patt.loc4_22.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_22.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_25.1: type = splice_block %.loc4_25.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_24.1: type = splice_block %.loc4_24.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_25.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_24.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_22.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_22.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %AccessGeneric.decl: %AccessGeneric.type = fn_decl @AccessGeneric [concrete = constants.%AccessGeneric] { // CHECK:STDOUT: %T.patt.loc8_19.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_19.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %I.patt.loc8_29.1: @AccessGeneric.%pattern_type.loc8_29 (%pattern_type.2c6f) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_29.2 (constants.%I.patt.0cc)] -// CHECK:STDOUT: %return.param_patt.loc8_50.1: @AccessGeneric.%pattern_type.loc8_50 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc8_50.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc8_46.1: @AccessGeneric.%pattern_type.loc8_50 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc8_50.1, %ptr.loc8_50.2 [symbolic = %return.patt.loc8_46.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: %I.patt.loc8_36.1: @AccessGeneric.%pattern_type.loc8_36 (%pattern_type.2c6f) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_36.2 (constants.%I.patt.0cc)] +// CHECK:STDOUT: %return.param_patt.loc8_56.1: @AccessGeneric.%pattern_type.loc8_56 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc8_56.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc8_52.1: @AccessGeneric.%pattern_type.loc8_56 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc8_56.1, %ptr.loc8_56.2 [symbolic = %return.patt.loc8_52.2 (constants.%return.patt.d67)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_19.2 [symbolic = %T.loc8_19.1 (constants.%T.67d)] -// CHECK:STDOUT: %ptr.loc8_50.2: type = ptr_type %T.ref.loc8_49 [symbolic = %ptr.loc8_50.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.loc8_50.2: Core.Form = init_form %ptr.loc8_50.2 [symbolic = %.loc8_50.1 (constants.%.cb6)] -// CHECK:STDOUT: %.loc8_22.1: type = splice_block %.loc8_22.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc8_55: type = name_ref T, %T.loc8_19.2 [symbolic = %T.loc8_19.1 (constants.%T.67d)] +// CHECK:STDOUT: %ptr.loc8_56.2: type = ptr_type %T.ref.loc8_55 [symbolic = %ptr.loc8_56.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.loc8_56.2: Core.Form = init_form %ptr.loc8_56.2 [symbolic = %.loc8_56.1 (constants.%.cb6)] +// CHECK:STDOUT: %.loc8_21.1: type = splice_block %.loc8_21.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc8_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_22.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_21.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_19.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_19.1 (constants.%T.67d)] -// CHECK:STDOUT: %.loc8_43: type = splice_block %Interface.type.loc8_43.2 [symbolic = %Interface.type.loc8_43.1 (constants.%Interface.type.fe8)] { -// CHECK:STDOUT: %.Self.frozen.loc8_29: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc8_49: type = splice_block %Interface.type.loc8_49.2 [symbolic = %Interface.type.loc8_49.1 (constants.%Interface.type.fe8)] { +// CHECK:STDOUT: %.Self.frozen.loc8_36: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Interface.ref: %Interface.type.1b1 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic] -// CHECK:STDOUT: %T.ref.loc8_42: type = name_ref T, %T.loc8_19.2 [symbolic = %T.loc8_19.1 (constants.%T.67d)] -// CHECK:STDOUT: %Interface.type.loc8_43.2: type = facet_type <@Interface, @Interface(constants.%T.67d)> [symbolic = %Interface.type.loc8_43.1 (constants.%Interface.type.fe8)] +// CHECK:STDOUT: %T.ref.loc8_48: type = name_ref T, %T.loc8_19.2 [symbolic = %T.loc8_19.1 (constants.%T.67d)] +// CHECK:STDOUT: %Interface.type.loc8_49.2: type = facet_type <@Interface, @Interface(constants.%T.67d)> [symbolic = %Interface.type.loc8_49.1 (constants.%Interface.type.fe8)] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.loc8_29.2: @AccessGeneric.%Interface.type.loc8_43.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_29.1 (constants.%I.63c)] -// CHECK:STDOUT: %return.param: ref @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = out_param call_param0 -// CHECK:STDOUT: %return: ref @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = return_slot %return.param +// CHECK:STDOUT: %I.loc8_36.2: @AccessGeneric.%Interface.type.loc8_49.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_36.1 (constants.%I.63c)] +// CHECK:STDOUT: %return.param: ref @AccessGeneric.%ptr.loc8_56.1 (%ptr.e8f) = out_param call_param0 +// CHECK:STDOUT: %return: ref @AccessGeneric.%ptr.loc8_56.1 (%ptr.e8f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessConcrete.decl: %AccessConcrete.type = fn_decl @AccessConcrete [concrete = constants.%AccessConcrete] { -// CHECK:STDOUT: %I.patt.loc12_20.1: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc12_20.2 (constants.%I.patt.b65)] +// CHECK:STDOUT: %I.patt.loc12_28.1: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc12_28.2 (constants.%I.patt.b65)] // CHECK:STDOUT: %return.param_patt: %pattern_type.f00 = out_param_pattern [concrete = constants.%return.param_patt.7dd] // CHECK:STDOUT: %return.patt: %pattern_type.f00 = return_slot_pattern %return.param_patt, %ptr [concrete = constants.%return.patt.dbe] // CHECK:STDOUT: } { -// CHECK:STDOUT: %i32.loc12_42: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %ptr: type = ptr_type %i32.loc12_42 [concrete = constants.%ptr.d08] -// CHECK:STDOUT: %.loc12_45: Core.Form = init_form %ptr [concrete = constants.%.952] -// CHECK:STDOUT: %.loc12_36: type = splice_block %Interface.type [concrete = constants.%Interface.type.c5f] { +// CHECK:STDOUT: %i32.loc12_49: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %ptr: type = ptr_type %i32.loc12_49 [concrete = constants.%ptr.d08] +// CHECK:STDOUT: %.loc12_52: Core.Form = init_form %ptr [concrete = constants.%.952] +// CHECK:STDOUT: %.loc12_43: type = splice_block %Interface.type [concrete = constants.%Interface.type.c5f] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Interface.ref: %Interface.type.1b1 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic] -// CHECK:STDOUT: %i32.loc12_33: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %i32.loc12_40: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(constants.%i32)> [concrete = constants.%Interface.type.c5f] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.loc12_20.2: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc12_20.1 (constants.%I.e05)] +// CHECK:STDOUT: %I.loc12_28.2: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc12_28.1 (constants.%I.e05)] // CHECK:STDOUT: %return.param: ref %ptr.d08 = out_param call_param0 // CHECK:STDOUT: %return: ref %ptr.d08 = return_slot %return.param // CHECK:STDOUT: } @@ -206,10 +206,10 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(%T.loc4_22.1)> [symbolic = %Interface.type (constants.%Interface.type.fe8)] -// CHECK:STDOUT: %Self.loc4_31.2: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_31.2 (constants.%Self.45e)] +// CHECK:STDOUT: %Self.loc4_30.2: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_30.2 (constants.%Self.45e)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_31.1: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_31.2 (constants.%Self.45e)] +// CHECK:STDOUT: %Self.loc4_30.1: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_30.2 (constants.%Self.45e)] // CHECK:STDOUT: %Interface.WithSelf.decl = interface_with_self_decl @Interface [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -218,7 +218,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_31.1 +// CHECK:STDOUT: .Self = %Self.loc4_30.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .X = @X.%assoc0 @@ -230,30 +230,30 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AccessGeneric(%T.loc8_19.2: type, %I.loc8_29.2: @AccessGeneric.%Interface.type.loc8_43.1 (%Interface.type.fe8)) { +// CHECK:STDOUT: generic fn @AccessGeneric(%T.loc8_19.2: type, %I.loc8_36.2: @AccessGeneric.%Interface.type.loc8_49.1 (%Interface.type.fe8)) { // CHECK:STDOUT: %T.patt.loc8_19.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_19.2 (constants.%T.patt.d47)] // CHECK:STDOUT: %T.loc8_19.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_19.1 (constants.%T.67d)] -// CHECK:STDOUT: %Interface.type.loc8_43.1: type = facet_type <@Interface, @Interface(%T.loc8_19.1)> [symbolic = %Interface.type.loc8_43.1 (constants.%Interface.type.fe8)] -// CHECK:STDOUT: %pattern_type.loc8_29: type = pattern_type %Interface.type.loc8_43.1 [symbolic = %pattern_type.loc8_29 (constants.%pattern_type.2c6f)] -// CHECK:STDOUT: %I.patt.loc8_29.2: @AccessGeneric.%pattern_type.loc8_29 (%pattern_type.2c6f) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_29.2 (constants.%I.patt.0cc)] -// CHECK:STDOUT: %I.loc8_29.1: @AccessGeneric.%Interface.type.loc8_43.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_29.1 (constants.%I.63c)] -// CHECK:STDOUT: %ptr.loc8_50.1: type = ptr_type %T.loc8_19.1 [symbolic = %ptr.loc8_50.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.loc8_50.1: Core.Form = init_form %ptr.loc8_50.1 [symbolic = %.loc8_50.1 (constants.%.cb6)] -// CHECK:STDOUT: %pattern_type.loc8_50: type = pattern_type %ptr.loc8_50.1 [symbolic = %pattern_type.loc8_50 (constants.%pattern_type.4f4)] -// CHECK:STDOUT: %return.param_patt.loc8_50.2: @AccessGeneric.%pattern_type.loc8_50 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc8_50.2 (constants.%return.param_patt.27f)] -// CHECK:STDOUT: %return.patt.loc8_46.2: @AccessGeneric.%pattern_type.loc8_50 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc8_50.2, %ptr.loc8_50.1 [symbolic = %return.patt.loc8_46.2 (constants.%return.patt.d67)] +// CHECK:STDOUT: %Interface.type.loc8_49.1: type = facet_type <@Interface, @Interface(%T.loc8_19.1)> [symbolic = %Interface.type.loc8_49.1 (constants.%Interface.type.fe8)] +// CHECK:STDOUT: %pattern_type.loc8_36: type = pattern_type %Interface.type.loc8_49.1 [symbolic = %pattern_type.loc8_36 (constants.%pattern_type.2c6f)] +// CHECK:STDOUT: %I.patt.loc8_36.2: @AccessGeneric.%pattern_type.loc8_36 (%pattern_type.2c6f) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_36.2 (constants.%I.patt.0cc)] +// CHECK:STDOUT: %I.loc8_36.1: @AccessGeneric.%Interface.type.loc8_49.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_36.1 (constants.%I.63c)] +// CHECK:STDOUT: %ptr.loc8_56.1: type = ptr_type %T.loc8_19.1 [symbolic = %ptr.loc8_56.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.loc8_56.1: Core.Form = init_form %ptr.loc8_56.1 [symbolic = %.loc8_56.1 (constants.%.cb6)] +// CHECK:STDOUT: %pattern_type.loc8_56: type = pattern_type %ptr.loc8_56.1 [symbolic = %pattern_type.loc8_56 (constants.%pattern_type.4f4)] +// CHECK:STDOUT: %return.param_patt.loc8_56.2: @AccessGeneric.%pattern_type.loc8_56 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc8_56.2 (constants.%return.param_patt.27f)] +// CHECK:STDOUT: %return.patt.loc8_52.2: @AccessGeneric.%pattern_type.loc8_56 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc8_56.2, %ptr.loc8_56.1 [symbolic = %return.patt.loc8_52.2 (constants.%return.patt.d67)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc8: = require_complete_type %ptr.loc8_50.1 [symbolic = %require_complete.loc8 (constants.%require_complete.ef1)] -// CHECK:STDOUT: %require_complete.loc9: = require_complete_type %Interface.type.loc8_43.1 [symbolic = %require_complete.loc9 (constants.%require_complete.08a)] -// CHECK:STDOUT: %I.as_type.loc9_11.2: type = facet_access_type %I.loc8_29.1 [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.3c3)] +// CHECK:STDOUT: %require_complete.loc8: = require_complete_type %ptr.loc8_56.1 [symbolic = %require_complete.loc8 (constants.%require_complete.ef1)] +// CHECK:STDOUT: %require_complete.loc9: = require_complete_type %Interface.type.loc8_49.1 [symbolic = %require_complete.loc9 (constants.%require_complete.08a)] +// CHECK:STDOUT: %I.as_type.loc9_11.2: type = facet_access_type %I.loc8_36.1 [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.3c3)] // CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface, @Interface(%T.loc8_19.1) [symbolic = %Interface.assoc_type (constants.%Interface.assoc_type.61f)] // 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: = 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: %Interface.lookup_impl_witness: = lookup_impl_witness %I.loc8_36.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_56.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.5: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc8_19.1) [symbolic = %.loc9_11.5 (constants.%.0e9)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc8_50.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] -// CHECK:STDOUT: %Copy.facet.loc9_11.3: %Copy.type = facet_value %ptr.loc8_50.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc9_11.3 (constants.%Copy.facet.302)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc8_56.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)] +// CHECK:STDOUT: %Copy.facet.loc9_11.3: %Copy.type = facet_value %ptr.loc8_56.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc9_11.3 (constants.%Copy.facet.302)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc9_11.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.884)] // CHECK:STDOUT: %.loc9_11.6: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc9_11.3 [symbolic = %.loc9_11.6 (constants.%.be5)] // CHECK:STDOUT: %impl.elem0.loc9_11.4: @AccessGeneric.%.loc9_11.6 (%.be5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.484)] @@ -261,14 +261,14 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem0.loc9_11.4, @Copy.WithSelf.Op(%Copy.facet.loc9_11.3) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.a76)] // CHECK:STDOUT: %bound_method.loc9_11.4: = 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) { +// CHECK:STDOUT: fn() -> out %return.param: @AccessGeneric.%ptr.loc8_56.1 (%ptr.e8f) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %I.ref: @AccessGeneric.%Interface.type.loc8_43.1 (%Interface.type.fe8) = name_ref I, %I.loc8_29.2 [symbolic = %I.loc8_29.1 (constants.%I.63c)] +// CHECK:STDOUT: %I.ref: @AccessGeneric.%Interface.type.loc8_49.1 (%Interface.type.fe8) = name_ref I, %I.loc8_36.2 [symbolic = %I.loc8_36.1 (constants.%I.63c)] // CHECK:STDOUT: %I.as_type.loc9_11.1: type = facet_access_type %I.ref [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.3c3)] // CHECK:STDOUT: %.loc9_11.1: type = converted %I.ref, %I.as_type.loc9_11.1 [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.3c3)] // 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.1: @AccessGeneric.%ptr.loc8_56.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.6 (%.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 %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.3 (constants.%Copy.facet.302)] @@ -277,27 +277,27 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %.loc9_11.4: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc9_11.2 [symbolic = %Copy.facet.loc9_11.3 (constants.%Copy.facet.302)] // CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = 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 %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) +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @AccessGeneric.%ptr.loc8_56.1 (%ptr.e8f) = call %bound_method.loc9_11.2(%impl.elem0.loc9_11.1) // CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AccessConcrete(%I.loc12_20.2: %Interface.type.c5f) { -// CHECK:STDOUT: %I.patt.loc12_20.2: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc12_20.2 (constants.%I.patt.b65)] -// CHECK:STDOUT: %I.loc12_20.1: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc12_20.1 (constants.%I.e05)] +// CHECK:STDOUT: generic fn @AccessConcrete(%I.loc12_28.2: %Interface.type.c5f) { +// CHECK:STDOUT: %I.patt.loc12_28.2: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc12_28.2 (constants.%I.patt.b65)] +// CHECK:STDOUT: %I.loc12_28.1: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc12_28.1 (constants.%I.e05)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.as_type.loc13_11.2: type = facet_access_type %I.loc12_20.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.307)] -// CHECK:STDOUT: %Interface.lookup_impl_witness: = lookup_impl_witness %I.loc12_20.1, @Interface, @Interface(constants.%i32) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.64c)] +// CHECK:STDOUT: %I.as_type.loc13_11.2: type = facet_access_type %I.loc12_28.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.307)] +// CHECK:STDOUT: %Interface.lookup_impl_witness: = lookup_impl_witness %I.loc12_28.1, @Interface, @Interface(constants.%i32) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.64c)] // CHECK:STDOUT: %impl.elem0.loc13_11.3: %ptr.d08 = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_11.3 (constants.%impl.elem0.3b7)] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: = bound_method %impl.elem0.loc13_11.3, constants.%ptr.as.Copy.impl.Op.d1c [symbolic = %ptr.as.Copy.impl.Op.bound (constants.%ptr.as.Copy.impl.Op.bound)] // CHECK:STDOUT: %bound_method.loc13_11.3: = bound_method %impl.elem0.loc13_11.3, constants.%ptr.as.Copy.impl.Op.specific_fn [symbolic = %bound_method.loc13_11.3 (constants.%bound_method.195)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: %ptr.d08 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %I.ref: %Interface.type.c5f = name_ref I, %I.loc12_20.2 [symbolic = %I.loc12_20.1 (constants.%I.e05)] +// CHECK:STDOUT: %I.ref: %Interface.type.c5f = name_ref I, %I.loc12_28.2 [symbolic = %I.loc12_28.1 (constants.%I.e05)] // CHECK:STDOUT: %I.as_type.loc13_11.1: type = facet_access_type %I.ref [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.307)] // CHECK:STDOUT: %.loc13_11.1: type = converted %I.ref, %I.as_type.loc13_11.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.307)] // CHECK:STDOUT: %.loc13_11.2: %Interface.assoc_type.d6a = specific_constant @X.%assoc0, @Interface.WithSelf(constants.%i32, constants.%I.e05) [concrete = constants.%assoc0.80c] @@ -320,7 +320,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type => constants.%Interface.type.fe8 -// CHECK:STDOUT: %Self.loc4_31.2 => constants.%Self.45e +// CHECK:STDOUT: %Self.loc4_30.2 => constants.%Self.45e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Interface.WithSelf(constants.%T.67d, constants.%Self.45e) { @@ -334,15 +334,15 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: specific @AccessGeneric(constants.%T.67d, constants.%I.63c) { // CHECK:STDOUT: %T.patt.loc8_19.2 => constants.%T.patt.d47 // CHECK:STDOUT: %T.loc8_19.1 => constants.%T.67d -// CHECK:STDOUT: %Interface.type.loc8_43.1 => constants.%Interface.type.fe8 -// CHECK:STDOUT: %pattern_type.loc8_29 => constants.%pattern_type.2c6f -// CHECK:STDOUT: %I.patt.loc8_29.2 => constants.%I.patt.0cc -// CHECK:STDOUT: %I.loc8_29.1 => constants.%I.63c -// CHECK:STDOUT: %ptr.loc8_50.1 => constants.%ptr.e8f -// CHECK:STDOUT: %.loc8_50.1 => constants.%.cb6 -// CHECK:STDOUT: %pattern_type.loc8_50 => constants.%pattern_type.4f4 -// CHECK:STDOUT: %return.param_patt.loc8_50.2 => constants.%return.param_patt.27f -// CHECK:STDOUT: %return.patt.loc8_46.2 => constants.%return.patt.d67 +// CHECK:STDOUT: %Interface.type.loc8_49.1 => constants.%Interface.type.fe8 +// CHECK:STDOUT: %pattern_type.loc8_36 => constants.%pattern_type.2c6f +// CHECK:STDOUT: %I.patt.loc8_36.2 => constants.%I.patt.0cc +// CHECK:STDOUT: %I.loc8_36.1 => constants.%I.63c +// CHECK:STDOUT: %ptr.loc8_56.1 => constants.%ptr.e8f +// CHECK:STDOUT: %.loc8_56.1 => constants.%.cb6 +// CHECK:STDOUT: %pattern_type.loc8_56 => constants.%pattern_type.4f4 +// CHECK:STDOUT: %return.param_patt.loc8_56.2 => constants.%return.param_patt.27f +// CHECK:STDOUT: %return.patt.loc8_52.2 => constants.%return.patt.d67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Interface.WithSelf(constants.%T.67d, constants.%I.63c) { @@ -359,12 +359,12 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type => constants.%Interface.type.c5f -// CHECK:STDOUT: %Self.loc4_31.2 => constants.%Self.43d +// CHECK:STDOUT: %Self.loc4_30.2 => constants.%Self.43d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AccessConcrete(constants.%I.e05) { -// CHECK:STDOUT: %I.patt.loc12_20.2 => constants.%I.patt.b65 -// CHECK:STDOUT: %I.loc12_20.1 => constants.%I.e05 +// CHECK:STDOUT: %I.patt.loc12_28.2 => constants.%I.patt.b65 +// CHECK:STDOUT: %I.loc12_28.1 => constants.%I.e05 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Interface.WithSelf(constants.%i32, constants.%Self.45e) { @@ -451,49 +451,49 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %Interface.decl: %Interface.type.1b1 = interface_decl @Interface [concrete = constants.%Interface.generic] { // CHECK:STDOUT: %T.patt.loc4_22.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_22.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_25.1: type = splice_block %.loc4_25.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_24.1: type = splice_block %.loc4_24.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_25.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_24.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_22.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_22.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMissingGeneric.decl: %AccessMissingGeneric.type = fn_decl @AccessMissingGeneric [concrete = constants.%AccessMissingGeneric] { // CHECK:STDOUT: %T.patt.loc8_26.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_26.2 (constants.%T.patt)] -// CHECK:STDOUT: %I.patt.loc8_36.1: @AccessMissingGeneric.%pattern_type.loc8_36 (%pattern_type.2c6) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_36.2 (constants.%I.patt.0cc)] -// CHECK:STDOUT: %return.param_patt.loc8_56.1: @AccessMissingGeneric.%pattern_type.loc8_56 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc8_56.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc8_53.1: @AccessMissingGeneric.%pattern_type.loc8_56 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc8_56.1, %T.ref.loc8_56 [symbolic = %return.patt.loc8_53.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %I.patt.loc8_43.1: @AccessMissingGeneric.%pattern_type.loc8_43 (%pattern_type.2c6) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_43.2 (constants.%I.patt.0cc)] +// CHECK:STDOUT: %return.param_patt.loc8_62.1: @AccessMissingGeneric.%pattern_type.loc8_62 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc8_62.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc8_59.1: @AccessMissingGeneric.%pattern_type.loc8_62 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc8_62.1, %T.ref.loc8_62 [symbolic = %return.patt.loc8_59.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc8_56: type = name_ref T, %T.loc8_26.2 [symbolic = %T.loc8_26.1 (constants.%T)] -// CHECK:STDOUT: %.loc8_56.2: Core.Form = init_form %T.ref.loc8_56 [symbolic = %.loc8_56.1 (constants.%.184)] -// CHECK:STDOUT: %.loc8_29.1: type = splice_block %.loc8_29.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc8_62: type = name_ref T, %T.loc8_26.2 [symbolic = %T.loc8_26.1 (constants.%T)] +// CHECK:STDOUT: %.loc8_62.2: Core.Form = init_form %T.ref.loc8_62 [symbolic = %.loc8_62.1 (constants.%.184)] +// CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc8_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_29.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_28.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_26.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_26.1 (constants.%T)] -// CHECK:STDOUT: %.loc8_50: type = splice_block %Interface.type.loc8_50.2 [symbolic = %Interface.type.loc8_50.1 (constants.%Interface.type.fe8)] { -// CHECK:STDOUT: %.Self.frozen.loc8_36: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc8_56: type = splice_block %Interface.type.loc8_56.2 [symbolic = %Interface.type.loc8_56.1 (constants.%Interface.type.fe8)] { +// CHECK:STDOUT: %.Self.frozen.loc8_43: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Interface.ref: %Interface.type.1b1 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic] -// CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_26.2 [symbolic = %T.loc8_26.1 (constants.%T)] -// CHECK:STDOUT: %Interface.type.loc8_50.2: type = facet_type <@Interface, @Interface(constants.%T)> [symbolic = %Interface.type.loc8_50.1 (constants.%Interface.type.fe8)] +// CHECK:STDOUT: %T.ref.loc8_55: type = name_ref T, %T.loc8_26.2 [symbolic = %T.loc8_26.1 (constants.%T)] +// CHECK:STDOUT: %Interface.type.loc8_56.2: type = facet_type <@Interface, @Interface(constants.%T)> [symbolic = %Interface.type.loc8_56.1 (constants.%Interface.type.fe8)] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.loc8_36.2: @AccessMissingGeneric.%Interface.type.loc8_50.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_36.1 (constants.%I.63c)] +// CHECK:STDOUT: %I.loc8_43.2: @AccessMissingGeneric.%Interface.type.loc8_56.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_43.1 (constants.%I.63c)] // CHECK:STDOUT: %return.param: ref @AccessMissingGeneric.%T.loc8_26.1 (%T) = out_param call_param0 // CHECK:STDOUT: %return: ref @AccessMissingGeneric.%T.loc8_26.1 (%T) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AccessMissingConcrete.decl: %AccessMissingConcrete.type = fn_decl @AccessMissingConcrete [concrete = constants.%AccessMissingConcrete] { -// CHECK:STDOUT: %I.patt.loc16_27.1: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc16_27.2 (constants.%I.patt.b65)] +// CHECK:STDOUT: %I.patt.loc16_35.1: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc16_35.2 (constants.%I.patt.b65)] // CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a] -// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc16_49 [concrete = constants.%return.patt.e1b] +// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc16_56 [concrete = constants.%return.patt.e1b] // CHECK:STDOUT: } { -// CHECK:STDOUT: %i32.loc16_49: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc16_49: Core.Form = init_form %i32.loc16_49 [concrete = constants.%.795] -// CHECK:STDOUT: %.loc16_43: type = splice_block %Interface.type [concrete = constants.%Interface.type.c5f] { +// CHECK:STDOUT: %i32.loc16_56: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc16_56: Core.Form = init_form %i32.loc16_56 [concrete = constants.%.795] +// CHECK:STDOUT: %.loc16_50: type = splice_block %Interface.type [concrete = constants.%Interface.type.c5f] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Interface.ref: %Interface.type.1b1 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic] -// CHECK:STDOUT: %i32.loc16_40: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %i32.loc16_47: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(constants.%i32)> [concrete = constants.%Interface.type.c5f] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.loc16_27.2: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc16_27.1 (constants.%I.e05)] +// CHECK:STDOUT: %I.loc16_35.2: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc16_35.1 (constants.%I.e05)] // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -505,10 +505,10 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(%T.loc4_22.1)> [symbolic = %Interface.type (constants.%Interface.type.fe8)] -// CHECK:STDOUT: %Self.loc4_31.2: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_31.2 (constants.%Self.45e)] +// CHECK:STDOUT: %Self.loc4_30.2: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_30.2 (constants.%Self.45e)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_31.1: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_31.2 (constants.%Self.45e)] +// CHECK:STDOUT: %Self.loc4_30.1: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_30.2 (constants.%Self.45e)] // CHECK:STDOUT: %Interface.WithSelf.decl = interface_with_self_decl @Interface [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -517,7 +517,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_31.1 +// CHECK:STDOUT: .Self = %Self.loc4_30.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .X = @X.%assoc0 @@ -530,26 +530,26 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AccessMissingGeneric(%T.loc8_26.2: type, %I.loc8_36.2: @AccessMissingGeneric.%Interface.type.loc8_50.1 (%Interface.type.fe8)) { +// CHECK:STDOUT: generic fn @AccessMissingGeneric(%T.loc8_26.2: type, %I.loc8_43.2: @AccessMissingGeneric.%Interface.type.loc8_56.1 (%Interface.type.fe8)) { // CHECK:STDOUT: %T.patt.loc8_26.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_26.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc8_26.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_26.1 (constants.%T)] -// CHECK:STDOUT: %Interface.type.loc8_50.1: type = facet_type <@Interface, @Interface(%T.loc8_26.1)> [symbolic = %Interface.type.loc8_50.1 (constants.%Interface.type.fe8)] -// CHECK:STDOUT: %pattern_type.loc8_36: type = pattern_type %Interface.type.loc8_50.1 [symbolic = %pattern_type.loc8_36 (constants.%pattern_type.2c6)] -// CHECK:STDOUT: %I.patt.loc8_36.2: @AccessMissingGeneric.%pattern_type.loc8_36 (%pattern_type.2c6) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_36.2 (constants.%I.patt.0cc)] -// CHECK:STDOUT: %I.loc8_36.1: @AccessMissingGeneric.%Interface.type.loc8_50.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_36.1 (constants.%I.63c)] -// CHECK:STDOUT: %.loc8_56.1: Core.Form = init_form %T.loc8_26.1 [symbolic = %.loc8_56.1 (constants.%.184)] -// CHECK:STDOUT: %pattern_type.loc8_56: type = pattern_type %T.loc8_26.1 [symbolic = %pattern_type.loc8_56 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %return.param_patt.loc8_56.2: @AccessMissingGeneric.%pattern_type.loc8_56 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc8_56.2 (constants.%return.param_patt.41d)] -// CHECK:STDOUT: %return.patt.loc8_53.2: @AccessMissingGeneric.%pattern_type.loc8_56 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc8_56.2, %T.loc8_26.1 [symbolic = %return.patt.loc8_53.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %Interface.type.loc8_56.1: type = facet_type <@Interface, @Interface(%T.loc8_26.1)> [symbolic = %Interface.type.loc8_56.1 (constants.%Interface.type.fe8)] +// CHECK:STDOUT: %pattern_type.loc8_43: type = pattern_type %Interface.type.loc8_56.1 [symbolic = %pattern_type.loc8_43 (constants.%pattern_type.2c6)] +// CHECK:STDOUT: %I.patt.loc8_43.2: @AccessMissingGeneric.%pattern_type.loc8_43 (%pattern_type.2c6) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_43.2 (constants.%I.patt.0cc)] +// CHECK:STDOUT: %I.loc8_43.1: @AccessMissingGeneric.%Interface.type.loc8_56.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_43.1 (constants.%I.63c)] +// CHECK:STDOUT: %.loc8_62.1: Core.Form = init_form %T.loc8_26.1 [symbolic = %.loc8_62.1 (constants.%.184)] +// CHECK:STDOUT: %pattern_type.loc8_62: type = pattern_type %T.loc8_26.1 [symbolic = %pattern_type.loc8_62 (constants.%pattern_type.51d)] +// CHECK:STDOUT: %return.param_patt.loc8_62.2: @AccessMissingGeneric.%pattern_type.loc8_62 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc8_62.2 (constants.%return.param_patt.41d)] +// CHECK:STDOUT: %return.patt.loc8_59.2: @AccessMissingGeneric.%pattern_type.loc8_62 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc8_62.2, %T.loc8_26.1 [symbolic = %return.patt.loc8_59.2 (constants.%return.patt.b39)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc8: = require_complete_type %T.loc8_26.1 [symbolic = %require_complete.loc8 (constants.%require_complete.944)] -// CHECK:STDOUT: %require_complete.loc13: = require_complete_type %Interface.type.loc8_50.1 [symbolic = %require_complete.loc13 (constants.%require_complete.08a)] -// CHECK:STDOUT: %I.as_type.loc13_11.2: type = facet_access_type %I.loc8_36.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.3c3)] +// CHECK:STDOUT: %require_complete.loc13: = require_complete_type %Interface.type.loc8_56.1 [symbolic = %require_complete.loc13 (constants.%require_complete.08a)] +// CHECK:STDOUT: %I.as_type.loc13_11.2: type = facet_access_type %I.loc8_43.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.3c3)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: @AccessMissingGeneric.%T.loc8_26.1 (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %I.ref: @AccessMissingGeneric.%Interface.type.loc8_50.1 (%Interface.type.fe8) = name_ref I, %I.loc8_36.2 [symbolic = %I.loc8_36.1 (constants.%I.63c)] +// CHECK:STDOUT: %I.ref: @AccessMissingGeneric.%Interface.type.loc8_56.1 (%Interface.type.fe8) = name_ref I, %I.loc8_43.2 [symbolic = %I.loc8_43.1 (constants.%I.63c)] // CHECK:STDOUT: %I.as_type.loc13_11.1: type = facet_access_type %I.ref [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.3c3)] // CHECK:STDOUT: %.loc13: type = converted %I.ref, %I.as_type.loc13_11.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.3c3)] // CHECK:STDOUT: %nonesuch.ref: = name_ref nonesuch, [concrete = ] @@ -559,16 +559,16 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AccessMissingConcrete(%I.loc16_27.2: %Interface.type.c5f) { -// CHECK:STDOUT: %I.patt.loc16_27.2: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc16_27.2 (constants.%I.patt.b65)] -// CHECK:STDOUT: %I.loc16_27.1: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc16_27.1 (constants.%I.e05)] +// CHECK:STDOUT: generic fn @AccessMissingConcrete(%I.loc16_35.2: %Interface.type.c5f) { +// CHECK:STDOUT: %I.patt.loc16_35.2: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc16_35.2 (constants.%I.patt.b65)] +// CHECK:STDOUT: %I.loc16_35.1: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc16_35.1 (constants.%I.e05)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.as_type.loc21_11.2: type = facet_access_type %I.loc16_27.1 [symbolic = %I.as_type.loc21_11.2 (constants.%I.as_type.307)] +// CHECK:STDOUT: %I.as_type.loc21_11.2: type = facet_access_type %I.loc16_35.1 [symbolic = %I.as_type.loc21_11.2 (constants.%I.as_type.307)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %I.ref: %Interface.type.c5f = name_ref I, %I.loc16_27.2 [symbolic = %I.loc16_27.1 (constants.%I.e05)] +// CHECK:STDOUT: %I.ref: %Interface.type.c5f = name_ref I, %I.loc16_35.2 [symbolic = %I.loc16_35.1 (constants.%I.e05)] // CHECK:STDOUT: %I.as_type.loc21_11.1: type = facet_access_type %I.ref [symbolic = %I.as_type.loc21_11.2 (constants.%I.as_type.307)] // CHECK:STDOUT: %.loc21: type = converted %I.ref, %I.as_type.loc21_11.1 [symbolic = %I.as_type.loc21_11.2 (constants.%I.as_type.307)] // CHECK:STDOUT: %nonesuch.ref: = name_ref nonesuch, [concrete = ] @@ -584,7 +584,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type => constants.%Interface.type.fe8 -// CHECK:STDOUT: %Self.loc4_31.2 => constants.%Self.45e +// CHECK:STDOUT: %Self.loc4_30.2 => constants.%Self.45e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Interface.WithSelf(constants.%T, constants.%Self.45e) { @@ -598,14 +598,14 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: specific @AccessMissingGeneric(constants.%T, constants.%I.63c) { // CHECK:STDOUT: %T.patt.loc8_26.2 => constants.%T.patt // CHECK:STDOUT: %T.loc8_26.1 => constants.%T -// CHECK:STDOUT: %Interface.type.loc8_50.1 => constants.%Interface.type.fe8 -// CHECK:STDOUT: %pattern_type.loc8_36 => constants.%pattern_type.2c6 -// CHECK:STDOUT: %I.patt.loc8_36.2 => constants.%I.patt.0cc -// CHECK:STDOUT: %I.loc8_36.1 => constants.%I.63c -// CHECK:STDOUT: %.loc8_56.1 => constants.%.184 -// CHECK:STDOUT: %pattern_type.loc8_56 => constants.%pattern_type.51d -// CHECK:STDOUT: %return.param_patt.loc8_56.2 => constants.%return.param_patt.41d -// CHECK:STDOUT: %return.patt.loc8_53.2 => constants.%return.patt.b39 +// CHECK:STDOUT: %Interface.type.loc8_56.1 => constants.%Interface.type.fe8 +// CHECK:STDOUT: %pattern_type.loc8_43 => constants.%pattern_type.2c6 +// CHECK:STDOUT: %I.patt.loc8_43.2 => constants.%I.patt.0cc +// CHECK:STDOUT: %I.loc8_43.1 => constants.%I.63c +// CHECK:STDOUT: %.loc8_62.1 => constants.%.184 +// CHECK:STDOUT: %pattern_type.loc8_62 => constants.%pattern_type.51d +// CHECK:STDOUT: %return.param_patt.loc8_62.2 => constants.%return.param_patt.41d +// CHECK:STDOUT: %return.patt.loc8_59.2 => constants.%return.patt.b39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Interface.WithSelf(constants.%T, constants.%I.63c) { @@ -622,12 +622,12 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type => constants.%Interface.type.c5f -// CHECK:STDOUT: %Self.loc4_31.2 => constants.%Self.43d +// CHECK:STDOUT: %Self.loc4_30.2 => constants.%Self.43d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AccessMissingConcrete(constants.%I.e05) { -// CHECK:STDOUT: %I.patt.loc16_27.2 => constants.%I.patt.b65 -// CHECK:STDOUT: %I.loc16_27.1 => constants.%I.e05 +// CHECK:STDOUT: %I.patt.loc16_35.2 => constants.%I.patt.b65 +// CHECK:STDOUT: %I.loc16_35.1 => constants.%I.e05 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Interface.WithSelf(constants.%i32, constants.%Self.45e) { diff --git a/toolchain/check/testdata/interface/name_poisoning.carbon b/toolchain/check/testdata/interface/name_poisoning.carbon index 77f5940f480a..9936fbd90a48 100644 --- a/toolchain/check/testdata/interface/name_poisoning.carbon +++ b/toolchain/check/testdata/interface/name_poisoning.carbon @@ -19,9 +19,9 @@ interface I; // `N.F` uses `N.I` and not `package.I`. namespace N; interface N.I {} -fn N.F(unused x:! I) {} +fn N.F(unused generic x: I) {} -fn TestCall(x:! N.I) { +fn TestCall(generic x: N.I) { // `N.F` accepts an `N.I` not a `package.I`. N.F(x); } @@ -34,7 +34,7 @@ interface I; namespace N; // Use `package.I` and poison `N.I`. -fn N.F(x:! I); +fn N.F(generic x: I); // --- fail_declare_after_poison.carbon @@ -44,10 +44,10 @@ interface I; namespace N; // Use `package.I` and poison `N.I`. -// CHECK:STDERR: fail_declare_after_poison.carbon:[[@LINE+3]]:12: error: name `I` used before it was declared [NameUseBeforeDecl] -// CHECK:STDERR: fn N.F(x:! I); -// CHECK:STDERR: ^ -fn N.F(x:! I); +// CHECK:STDERR: fail_declare_after_poison.carbon:[[@LINE+3]]:19: error: name `I` used before it was declared [NameUseBeforeDecl] +// CHECK:STDERR: fn N.F(generic x: I); +// CHECK:STDERR: ^ +fn N.F(generic x: I); // Failure: N.I declared after it was poisoned. // CHECK:STDERR: fail_declare_after_poison.carbon:[[@LINE+4]]:13: note: declared here [NameUseBeforeDeclNote] @@ -64,13 +64,13 @@ interface I; namespace N; // Use `package.I` and poison `N.I`. -fn N.F1(x:! I); +fn N.F1(generic x: I); -// CHECK:STDERR: fail_use_poison.carbon:[[@LINE+4]]:13: error: member name `I` not found in `N` [MemberNameNotFoundInInstScope] -// CHECK:STDERR: fn N.F2(x:! N.I); -// CHECK:STDERR: ^~~ +// CHECK:STDERR: fail_use_poison.carbon:[[@LINE+4]]:20: error: member name `I` not found in `N` [MemberNameNotFoundInInstScope] +// CHECK:STDERR: fn N.F2(generic x: N.I); +// CHECK:STDERR: ^~~ // CHECK:STDERR: -fn N.F2(x:! N.I); +fn N.F2(generic x: N.I); // --- fail_use_declaration_after_poison.carbon @@ -80,10 +80,10 @@ interface I; namespace N; // Use `package.I` and poison `N.I`. -// CHECK:STDERR: fail_use_declaration_after_poison.carbon:[[@LINE+3]]:13: error: name `I` used before it was declared [NameUseBeforeDecl] -// CHECK:STDERR: fn N.F1(x:! I); -// CHECK:STDERR: ^ -fn N.F1(x:! I); +// CHECK:STDERR: fail_use_declaration_after_poison.carbon:[[@LINE+3]]:20: error: name `I` used before it was declared [NameUseBeforeDecl] +// CHECK:STDERR: fn N.F1(generic x: I); +// CHECK:STDERR: ^ +fn N.F1(generic x: I); // CHECK:STDERR: fail_use_declaration_after_poison.carbon:[[@LINE+4]]:13: note: declared here [NameUseBeforeDeclNote] // CHECK:STDERR: interface N.I; @@ -91,11 +91,11 @@ fn N.F1(x:! I); // CHECK:STDERR: interface N.I; -// CHECK:STDERR: fail_use_declaration_after_poison.carbon:[[@LINE+4]]:13: error: member name `I` not found in `N` [MemberNameNotFoundInInstScope] -// CHECK:STDERR: fn N.F2(x:! N.I); -// CHECK:STDERR: ^~~ +// CHECK:STDERR: fail_use_declaration_after_poison.carbon:[[@LINE+4]]:20: error: member name `I` not found in `N` [MemberNameNotFoundInInstScope] +// CHECK:STDERR: fn N.F2(generic x: N.I); +// CHECK:STDERR: ^~~ // CHECK:STDERR: -fn N.F2(x:! N.I); +fn N.F2(generic x: N.I); // --- fail_alias.carbon @@ -126,27 +126,27 @@ interface I2 { // * `I2.I1` // * `I2.I3.I1` // * `I2.I3.I4.I1` - // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+3]]:16: error: name `I1` used before it was declared [NameUseBeforeDecl] - // CHECK:STDERR: fn F(x:! I1); - // CHECK:STDERR: ^~ - fn F(x:! I1); + // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+3]]:23: error: name `I1` used before it was declared [NameUseBeforeDecl] + // CHECK:STDERR: fn F(generic x: I1); + // CHECK:STDERR: ^~ + fn F(generic x: I1); // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+7]]:17: note: declared here [NameUseBeforeDeclNote] // CHECK:STDERR: interface I1; // CHECK:STDERR: ^~ // CHECK:STDERR: - // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE-6]]:16: error: name `I1` used before it was declared [NameUseBeforeDecl] - // CHECK:STDERR: fn F(x:! I1); - // CHECK:STDERR: ^~ + // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE-6]]:23: error: name `I1` used before it was declared [NameUseBeforeDecl] + // CHECK:STDERR: fn F(generic x: I1); + // CHECK:STDERR: ^~ interface I1; } // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+7]]:15: note: declared here [NameUseBeforeDeclNote] // CHECK:STDERR: interface I1; // CHECK:STDERR: ^~ // CHECK:STDERR: - // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE-15]]:16: error: name `I1` used before it was declared [NameUseBeforeDecl] - // CHECK:STDERR: fn F(x:! I1); - // CHECK:STDERR: ^~ + // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE-15]]:23: error: name `I1` used before it was declared [NameUseBeforeDecl] + // CHECK:STDERR: fn F(generic x: I1); + // CHECK:STDERR: ^~ interface I1; } // CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+4]]:13: note: declared here [NameUseBeforeDeclNote] @@ -177,23 +177,23 @@ library "[[@TEST_NAME]]"; namespace N; // `package.I` and `N.I` poisoned when not found. -// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE+7]]:12: error: name `I` not found [NameNotFound] -// CHECK:STDERR: fn N.F(x:! I); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE+7]]:19: error: name `I` not found [NameNotFound] +// CHECK:STDERR: fn N.F(generic x: I); +// CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE+3]]:12: error: name `I` used before it was declared [NameUseBeforeDecl] -// CHECK:STDERR: fn N.F(x:! I); -// CHECK:STDERR: ^ -fn N.F(x:! I); +// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE+3]]:19: error: name `I` used before it was declared [NameUseBeforeDecl] +// CHECK:STDERR: fn N.F(generic x: I); +// CHECK:STDERR: ^ +fn N.F(generic x: I); // TODO: We should ideally only produce one diagnostic here. // CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE+7]]:11: note: declared here [NameUseBeforeDeclNote] // CHECK:STDERR: interface I; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE-7]]:12: error: name `I` used before it was declared [NameUseBeforeDecl] -// CHECK:STDERR: fn N.F(x:! I); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE-7]]:19: error: name `I` used before it was declared [NameUseBeforeDecl] +// CHECK:STDERR: fn N.F(generic x: I); +// CHECK:STDERR: ^ interface I; // CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE+4]]:13: note: declared here [NameUseBeforeDeclNote] // CHECK:STDERR: interface N.I; diff --git a/toolchain/check/testdata/interface/observe.carbon b/toolchain/check/testdata/interface/observe.carbon index 5d032990d943..658930b9a3d9 100644 --- a/toolchain/check/testdata/interface/observe.carbon +++ b/toolchain/check/testdata/interface/observe.carbon @@ -19,9 +19,9 @@ interface Q { fn InQ(self); } interface R { fn InR(self); } interface Transitive { - let A:! P & Core.Destroy; - let B:! (Q where .Self == A) & Core.Destroy; - let C:! (R where .Self == B) & Core.Destroy; + let A: P & Core.Destroy; + let B: (Q where .Self == A) & Core.Destroy; + let C: (R where .Self == B) & Core.Destroy; fn GetA(self) -> A; fn TakesC(self, c: C); @@ -34,7 +34,7 @@ library "[[@TEST_NAME]]"; import library "transitive"; -fn F[T:! Transitive](t: T) { +fn F[T: Transitive](t: T) { var a: T.A = t.GetA(); // CHECK:STDERR: fail_todo_equivalent.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `T.(Transitive.A)` to `T.(Transitive.B)` [ConversionFailure] @@ -73,16 +73,16 @@ interface A {} interface B { require impls A; } interface C { require impls B; } -fn RequiresA[T:! A](unused x: T) {} -fn F[T:! C](x: T) { +fn RequiresA[T: A](unused x: T) {} +fn F[T: C](x: T) { observe T impls B; // CHECK:STDERR: fail_todo_impls.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `C` into type implementing `A` [ConversionFailureFacetToFacet] // CHECK:STDERR: RequiresA(x); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fail_todo_impls.carbon:[[@LINE-7]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn RequiresA[T:! A](unused x: T) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn RequiresA[T: A](unused x: T) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: RequiresA(x); } @@ -92,8 +92,8 @@ library "[[@TEST_NAME]]"; import library "transitive"; -fn TakesPQR[U:! P & Q & R](unused u: U) {} -fn G[T:! Transitive](t: T) { +fn TakesPQR[U: P & Q & R](unused u: U) {} +fn G[T: Transitive](t: T) { var a: T.A = t.GetA(); observe T.A == T.B impls Q; @@ -108,8 +108,8 @@ fn G[T:! Transitive](t: T) { // CHECK:STDERR: TakesPQR(a); // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: fail_todo_equivalent_impls.carbon:[[@LINE-15]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn TakesPQR[U:! P & Q & R](unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn TakesPQR[U: P & Q & R](unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: TakesPQR(a); } @@ -119,8 +119,8 @@ library "[[@TEST_NAME]]"; import library "transitive"; -fn TakesPQR[U:! P & Q & R](unused u: U) {} -fn G[T:! Transitive](t: T) { +fn TakesPQR[U: P & Q & R](unused u: U) {} +fn G[T: Transitive](t: T) { var a: T.A = t.GetA(); // CHECK:STDERR: fail_equivalent_impls_without_observe.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Q` in type `T.(Transitive.A)` that does not implement that interface [MissingImplInMemberAccess] @@ -133,8 +133,8 @@ fn G[T:! Transitive](t: T) { // CHECK:STDERR: TakesPQR(a); // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: fail_equivalent_impls_without_observe.carbon:[[@LINE-13]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn TakesPQR[U:! P & Q & R](unused u: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn TakesPQR[U: P & Q & R](unused u: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: TakesPQR(a); } @@ -144,7 +144,7 @@ library "[[@TEST_NAME]]"; import library "transitive"; -fn G[T:! Transitive](t: T) { +fn G[T: Transitive](t: T) { observe T.A == T.B == T.C; var a: T.A = t.GetA(); @@ -167,14 +167,14 @@ interface B { } interface C { } interface D { } -impl forall [T:! A] T as B { } -impl forall [T:! B] T as C { } -impl forall [T:! C] T as D { } +impl forall [T: A] T as B { } +impl forall [T: B] T as C { } +impl forall [T: C] T as D { } -fn RequiresB[T:! B](unused x: T) {} -fn RequiresD[T:! D](unused x: T) {} +fn RequiresB[T: B](unused x: T) {} +fn RequiresD[T: D](unused x: T) {} -fn RequiresA[T:! A](x: T) { +fn RequiresA[T: A](x: T) { RequiresB(x); observe T impls B; @@ -188,8 +188,8 @@ library "[[@TEST_NAME]]"; interface A {} interface B {} -fn RequiresA[T:! A](unused x: T) {} -fn F[T:! A, U:! B where .Self == T]() { +fn RequiresA[T: A](unused x: T) {} +fn F[T: A, U: B where .Self == T]() { observe T == U; fn InnerF(x: U) { @@ -197,8 +197,8 @@ fn F[T:! A, U:! B where .Self == T]() { // CHECK:STDERR: RequiresA(x); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fail_todo_nested_functions_in_outer.carbon:[[@LINE-8]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn RequiresA[T:! A](unused x: T) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn RequiresA[T: A](unused x: T) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: RequiresA(x); } @@ -210,8 +210,8 @@ library "[[@TEST_NAME]]"; interface A {} interface B {} -fn RequiresA[T:! A](unused x: T) {} -fn F[T:! A, U:! B where .Self == T]() { +fn RequiresA[T: A](unused x: T) {} +fn F[T: A, U: B where .Self == T]() { fn InnerF(x: U) { observe T == U; @@ -220,8 +220,8 @@ fn F[T:! A, U:! B where .Self == T]() { // CHECK:STDERR: RequiresA(x); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fail_todo_nested_functions_in_inner.carbon:[[@LINE-9]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn RequiresA[T:! A](unused x: T) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn RequiresA[T: A](unused x: T) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: RequiresA(x); } @@ -233,16 +233,16 @@ library "[[@TEST_NAME]]"; interface A {} interface B {} -fn RequiresA[T:! A](unused x: T) {} -fn F[T:! A, U:! B where .Self == T]() { +fn RequiresA[T: A](unused x: T) {} +fn F[T: A, U: B where .Self == T]() { fn InnerF(x: U) { // CHECK:STDERR: fail_nested_functions_lexical_order.carbon:[[@LINE+7]]:5: error: cannot convert type `U` that implements `B where...` into type implementing `A` [ConversionFailureFacetToFacet] // CHECK:STDERR: RequiresA(x); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fail_nested_functions_lexical_order.carbon:[[@LINE-7]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn RequiresA[T:! A](unused x: T) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn RequiresA[T: A](unused x: T) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: RequiresA(x); } @@ -256,8 +256,8 @@ library "[[@TEST_NAME]]"; interface A {} interface B {} -fn RequiresA[T:! A](unused x: T) {} -fn F[T:! A, U:! B where .Self == T](x: U) { +fn RequiresA[T: A](unused x: T) {} +fn F[T: A, U: B where .Self == T](x: U) { fn InnerF(unused x: U) { observe T == U; @@ -267,8 +267,8 @@ fn F[T:! A, U:! B where .Self == T](x: U) { // CHECK:STDERR: RequiresA(x); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fail_nested_functions_leak_upward.carbon:[[@LINE-10]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn RequiresA[T:! A](unused x: T) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn RequiresA[T: A](unused x: T) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: RequiresA(x); } @@ -279,16 +279,16 @@ library "[[@TEST_NAME]]"; interface A {} interface B {} -fn RequiresA[T:! A](unused x: T) {} -fn F[T:! A, U:! B where .Self == T, V:! B](x: U) { +fn RequiresA[T: A](unused x: T) {} +fn F[T: A, U: B where .Self == T, V: B](x: U) { observe T == V; // CHECK:STDERR: fail_not_observed.carbon:[[@LINE+7]]:3: error: cannot convert type `U` that implements `B where...` into type implementing `A` [ConversionFailureFacetToFacet] // CHECK:STDERR: RequiresA(x); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fail_not_observed.carbon:[[@LINE-7]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn RequiresA[T:! A](unused x: T) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn RequiresA[T: A](unused x: T) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: RequiresA(x); } @@ -299,15 +299,15 @@ library "[[@TEST_NAME]]"; interface A {} interface B {} -fn TakesA[T:! A](unused x: T) {} -fn F[T:! A, U:! B](x: U) { +fn TakesA[T: A](unused x: T) {} +fn F[T: A, U: B](x: U) { observe T == U; // CHECK:STDERR: fail_invalid_equivalent.carbon:[[@LINE+7]]:3: error: cannot convert type `U` that implements `B` into type implementing `A` [ConversionFailureFacetToFacet] // CHECK:STDERR: TakesA(x); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: fail_invalid_equivalent.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn TakesA[T:! A](unused x: T) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn TakesA[T: A](unused x: T) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: TakesA(x); } @@ -315,7 +315,7 @@ fn F[T:! A, U:! B](x: U) { // --- fail_wrong_scope_class.carbon library "[[@TEST_NAME]]"; -class C(T:! type, U:! type) { +class C(T: type, U: type) { // CHECK:STDERR: fail_wrong_scope_class.carbon:[[@LINE+4]]:3: error: `observe` can only be used in an `interface` or `function` [ObserveInWrongScope] // CHECK:STDERR: observe T == U; // CHECK:STDERR: ^~~~~~~ @@ -326,7 +326,7 @@ class C(T:! type, U:! type) { // --- fail_wrong_scope_named_constraint.carbon library "[[@TEST_NAME]]"; -constraint C(T:! type, U:! type) { +constraint C(T: type, U: type) { // CHECK:STDERR: fail_wrong_scope_named_constraint.carbon:[[@LINE+4]]:3: error: `observe` can only be used in an `interface` or `function` [ObserveInWrongScope] // CHECK:STDERR: observe T == U; // CHECK:STDERR: ^~~~~~~ @@ -340,7 +340,7 @@ library "[[@TEST_NAME]]"; class C {} interface A {} -fn F[T:! A]() { +fn F[T: A]() { // CHECK:STDERR: fail_non_facet_type_in_impls.carbon:[[@LINE+4]]:19: error: right argument of `impls` requirement must be a facet type [ImplsOnNonFacetType] // CHECK:STDERR: observe T impls C; // CHECK:STDERR: ^ @@ -353,8 +353,8 @@ library "[[@TEST_NAME]]"; interface A {} interface B {} -interface I(T:! A & Core.Destroy) { - let U:! (B where .Self == T) & Core.Destroy; +interface I(T: A & Core.Destroy) { + let U: (B where .Self == T) & Core.Destroy; fn GetU(self) -> U; fn TakesT(self, t: T); @@ -370,7 +370,7 @@ import library "generic_observe"; class C {} impl C as A {} -fn F[T:! I(C)](t: T) { +fn F[T: I(C)](t: T) { var u: T.U = t.GetU(); // CHECK:STDERR: fail_todo_generic_import.carbon:[[@LINE+8]]:3: 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] @@ -1044,21 +1044,21 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc5_7.1: %pattern_type.bd9 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %t.param_patt.loc5_23.1: @F.%pattern_type.loc5 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc5_23.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc5_23.1: @F.%pattern_type.loc5 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc5_23.1 [symbolic = %t.patt.loc5_23.2 (constants.%t.patt)] +// CHECK:STDOUT: %t.param_patt.loc5_22.1: @F.%pattern_type.loc5 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc5_22.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc5_22.1: @F.%pattern_type.loc5 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc5_22.1 [symbolic = %t.patt.loc5_22.2 (constants.%t.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_10: type = splice_block %Transitive.ref [concrete = constants.%Transitive.type] { +// CHECK:STDOUT: %.loc5_9: type = splice_block %Transitive.ref [concrete = constants.%Transitive.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Transitive.ref: type = name_ref Transitive, imports.%Main.Transitive [concrete = constants.%Transitive.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_7.2: %Transitive.type = symbolic_binding T, 0 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @F.%T.as_type.loc5_25.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc5_25.1: type = splice_block %.loc5_25.2 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %t.param: @F.%T.as_type.loc5_24.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc5_24.1: type = splice_block %.loc5_24.2 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref.loc5: %Transitive.type = name_ref T, %T.loc5_7.2 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc5_25.2: type = facet_access_type %T.ref.loc5 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc5_25.2: type = converted %T.ref.loc5, %T.as_type.loc5_25.2 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc5_24.2: type = facet_access_type %T.ref.loc5 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc5_24.2: type = converted %T.ref.loc5, %T.as_type.loc5_24.2 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @F.%T.as_type.loc5_25.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @F.%T.as_type.loc5_24.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1179,13 +1179,13 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @F(%T.loc5_7.2: %Transitive.type) { // CHECK:STDOUT: %T.patt.loc5_7.2: %pattern_type.bd9 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc5_7.1: %Transitive.type = symbolic_binding T, 0 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc5_25.1: type = facet_access_type %T.loc5_7.1 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type.loc5: type = pattern_type %T.as_type.loc5_25.1 [symbolic = %pattern_type.loc5 (constants.%pattern_type.68e728.2)] -// CHECK:STDOUT: %t.param_patt.loc5_23.2: @F.%pattern_type.loc5 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc5_23.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc5_23.2: @F.%pattern_type.loc5 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc5_23.2 [symbolic = %t.patt.loc5_23.2 (constants.%t.patt)] +// CHECK:STDOUT: %T.as_type.loc5_24.1: type = facet_access_type %T.loc5_7.1 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type.loc5: type = pattern_type %T.as_type.loc5_24.1 [symbolic = %pattern_type.loc5 (constants.%pattern_type.68e728.2)] +// CHECK:STDOUT: %t.param_patt.loc5_22.2: @F.%pattern_type.loc5 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc5_22.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc5_22.2: @F.%pattern_type.loc5 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc5_22.2 [symbolic = %t.patt.loc5_22.2 (constants.%t.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc5: = require_complete_type %T.as_type.loc5_25.1 [symbolic = %require_complete.loc5 (constants.%require_complete.fbd)] +// CHECK:STDOUT: %require_complete.loc5: = require_complete_type %T.as_type.loc5_24.1 [symbolic = %require_complete.loc5 (constants.%require_complete.fbd)] // CHECK:STDOUT: %Transitive.lookup_impl_witness: = lookup_impl_witness %T.loc5_7.1, @Transitive [symbolic = %Transitive.lookup_impl_witness (constants.%Transitive.lookup_impl_witness.ab0b8d.2)] // CHECK:STDOUT: %impl.elem0.loc6_11.2: %facet_type.1ff = impl_witness_access %Transitive.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_11.2 (constants.%impl.elem0.8aa205.2)] // CHECK:STDOUT: %as_type.loc6_11.2: type = facet_access_type %impl.elem0.loc6_11.2 [symbolic = %as_type.loc6_11.2 (constants.%as_type.a0914b.2)] @@ -1238,10 +1238,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %impl.elem0.loc6_3.2: @F.%.loc6_3.4 (%.569) = impl_witness_access %Destroy.lookup_impl_witness.loc6, element0 [symbolic = %impl.elem0.loc6_3.2 (constants.%impl.elem0.95f)] // CHECK:STDOUT: %specific_impl_fn.loc6_3.2: = specific_impl_function %impl.elem0.loc6_3.2, @Destroy.WithSelf.Op(%Destroy.facet.loc6_3.3) [symbolic = %specific_impl_fn.loc6_3.2 (constants.%specific_impl_fn.584)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc5_25.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc5_24.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.var: ref @F.%as_type.loc6_11.2 (%as_type.a0914b.2) = var_storage %a.var_patt.loc6_3.1 -// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc5_25.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc5_24.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %GetA.ref: %Transitive.assoc_type = name_ref GetA, imports.%Main.import_ref.5c5 [concrete = constants.%assoc3] // CHECK:STDOUT: %impl.elem3.loc6_17.1: @F.%.loc6_17 (%.657) = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element3 [symbolic = %impl.elem3.loc6_17.2 (constants.%impl.elem3)] // CHECK:STDOUT: %bound_method.loc6_17: = bound_method %t.ref, %impl.elem3.loc6_17.1 @@ -1254,8 +1254,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: assign %a.var, %Transitive.WithSelf.GetA.call // CHECK:STDOUT: %.loc6_11.1: type = splice_block %.loc6_11.3 [symbolic = %as_type.loc6_11.2 (constants.%as_type.a0914b.2)] { // CHECK:STDOUT: %T.ref.loc6: %Transitive.type = name_ref T, %T.loc5_7.2 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6: type = facet_access_type %T.ref.loc6 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_11.2: type = converted %T.ref.loc6, %T.as_type.loc6 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6: type = facet_access_type %T.ref.loc6 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_11.2: type = converted %T.ref.loc6, %T.as_type.loc6 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %A.ref: %Transitive.assoc_type = name_ref A, imports.%Main.import_ref.72c [concrete = constants.%assoc0.e77] // CHECK:STDOUT: %impl.elem0.loc6_11.1: %facet_type.1ff = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element0 [symbolic = %impl.elem0.loc6_11.2 (constants.%impl.elem0.8aa205.2)] // CHECK:STDOUT: %as_type.loc6_11.1: type = facet_access_type %impl.elem0.loc6_11.1 [symbolic = %as_type.loc6_11.2 (constants.%as_type.a0914b.2)] @@ -1276,8 +1276,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: assign %b.var, // CHECK:STDOUT: %.loc15_11.1: type = splice_block %.loc15_11.3 [symbolic = %as_type.loc15_11.2 (constants.%as_type.f86e2d.2)] { // CHECK:STDOUT: %T.ref.loc15: %Transitive.type = name_ref T, %T.loc5_7.2 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc15_11.2: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc15_11.2: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %B.ref: %Transitive.assoc_type = name_ref B, imports.%Main.import_ref.e5e [concrete = constants.%assoc1] // CHECK:STDOUT: %impl.elem1.loc15_11.1: %facet_type.1b9 = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element1 [symbolic = %impl.elem1.loc15_11.2 (constants.%impl.elem1.1413d6.2)] // CHECK:STDOUT: %as_type.loc15_11.1: type = facet_access_type %impl.elem1.loc15_11.1 [symbolic = %as_type.loc15_11.2 (constants.%as_type.f86e2d.2)] @@ -1302,8 +1302,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %Q.WithSelf.InQ.call: init %empty_tuple.type = call %bound_method.loc16_9(%.loc16_3) // CHECK:STDOUT: %a.ref.loc26: ref @F.%as_type.loc6_11.2 (%as_type.a0914b.2) = name_ref a, %a // CHECK:STDOUT: %T.ref.loc26: %Transitive.type = name_ref T, %T.loc5_7.2 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc26_7: type = converted %T.ref.loc26, %T.as_type.loc26 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc26_7: type = converted %T.ref.loc26, %T.as_type.loc26 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %C.ref.loc26: %Transitive.assoc_type = name_ref C, imports.%Main.import_ref.c9c [concrete = constants.%assoc2] // CHECK:STDOUT: %impl.elem2.loc26_7.1: %facet_type.0e9 = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element2 [symbolic = %impl.elem2.loc26_7.2 (constants.%impl.elem2.279493.2)] // CHECK:STDOUT: %as_type.loc26_9.1: type = facet_access_type %impl.elem2.loc26_7.1 [symbolic = %as_type.loc26_9.2 (constants.%as_type.b2aa43.2)] @@ -1314,8 +1314,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %bound_method.loc26: = bound_method %a.ref.loc26, %impl.elem0.loc26_9.1 // CHECK:STDOUT: %a.ref.loc34: ref @F.%as_type.loc6_11.2 (%as_type.a0914b.2) = name_ref a, %a // CHECK:STDOUT: %T.ref.loc34: %Transitive.type = name_ref T, %T.loc5_7.2 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc34: type = facet_access_type %T.ref.loc34 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc34_10.1: type = converted %T.ref.loc34, %T.as_type.loc34 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc34: type = facet_access_type %T.ref.loc34 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc34_10.1: type = converted %T.ref.loc34, %T.as_type.loc34 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %C.ref.loc34: %Transitive.assoc_type = name_ref C, imports.%Main.import_ref.c9c [concrete = constants.%assoc2] // CHECK:STDOUT: %impl.elem2.loc34: %facet_type.0e9 = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element2 [symbolic = %impl.elem2.loc26_7.2 (constants.%impl.elem2.279493.2)] // CHECK:STDOUT: %as_type.loc34: type = facet_access_type %impl.elem2.loc34 [symbolic = %as_type.loc26_9.2 (constants.%as_type.b2aa43.2)] @@ -1444,10 +1444,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc5_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc5_7.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc5_25.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc5_24.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type.loc5 => constants.%pattern_type.68e728.2 -// CHECK:STDOUT: %t.param_patt.loc5_23.2 => constants.%t.param_patt -// CHECK:STDOUT: %t.patt.loc5_23.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc5_22.2 => constants.%t.param_patt +// CHECK:STDOUT: %t.patt.loc5_22.2 => constants.%t.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Transitive.WithSelf(constants.%T) { @@ -1577,39 +1577,39 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %C.decl: type = interface_decl @C [concrete = constants.%C.type] {} {} // 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.a4b)] -// CHECK:STDOUT: %x.param_patt.loc7_29.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc7_29.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc7_29.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc7_29.1 [symbolic = %x.patt.loc7_29.2 (constants.%x.patt.19b)] +// 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) = at_binding_pattern x, %x.param_patt.loc7_28.1 [symbolic = %x.patt.loc7_28.2 (constants.%x.patt.19b)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_18: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc7_17: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // 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.626)] -// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc7_31.1 (%T.as_type.3b8) = value_param call_param0 -// CHECK:STDOUT: %.loc7_31.1: type = splice_block %.loc7_31.2 [symbolic = %T.as_type.loc7_31.1 (constants.%T.as_type.3b8)] { +// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc7_30.1 (%T.as_type.3b8) = 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.3b8)] { // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc7_15.2 [symbolic = %T.loc7_15.1 (constants.%T.626)] -// CHECK:STDOUT: %T.as_type.loc7_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_31.1 (constants.%T.as_type.3b8)] -// CHECK:STDOUT: %.loc7_31.2: type = converted %T.ref, %T.as_type.loc7_31.2 [symbolic = %T.as_type.loc7_31.1 (constants.%T.as_type.3b8)] +// 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.3b8)] +// 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.3b8)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc7_31.1 (%T.as_type.3b8) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc7_30.1 (%T.as_type.3b8) = 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.647 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt.ece)] -// CHECK:STDOUT: %x.param_patt.loc8_14.1: @F.%pattern_type (%pattern_type.df0) = value_param_pattern [symbolic = %x.param_patt.loc8_14.2 (constants.%x.param_patt.948)] -// CHECK:STDOUT: %x.patt.loc8_14.1: @F.%pattern_type (%pattern_type.df0) = at_binding_pattern x, %x.param_patt.loc8_14.1 [symbolic = %x.patt.loc8_14.2 (constants.%x.patt.f9a)] +// CHECK:STDOUT: %x.param_patt.loc8_13.1: @F.%pattern_type (%pattern_type.df0) = value_param_pattern [symbolic = %x.param_patt.loc8_13.2 (constants.%x.param_patt.948)] +// CHECK:STDOUT: %x.patt.loc8_13.1: @F.%pattern_type (%pattern_type.df0) = at_binding_pattern x, %x.param_patt.loc8_13.1 [symbolic = %x.patt.loc8_13.2 (constants.%x.patt.f9a)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_10: type = splice_block %C.ref [concrete = constants.%C.type] { +// CHECK:STDOUT: %.loc8_9: type = splice_block %C.ref [concrete = constants.%C.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_7.2: %C.type = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T.659)] -// CHECK:STDOUT: %x.param: @F.%T.as_type.loc8_16.1 (%T.as_type.c69) = value_param call_param0 -// CHECK:STDOUT: %.loc8_16.1: type = splice_block %.loc8_16.2 [symbolic = %T.as_type.loc8_16.1 (constants.%T.as_type.c69)] { +// CHECK:STDOUT: %x.param: @F.%T.as_type.loc8_15.1 (%T.as_type.c69) = value_param call_param0 +// CHECK:STDOUT: %.loc8_15.1: type = splice_block %.loc8_15.2 [symbolic = %T.as_type.loc8_15.1 (constants.%T.as_type.c69)] { // CHECK:STDOUT: %T.ref.loc8: %C.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T.659)] -// CHECK:STDOUT: %T.as_type.loc8_16.2: type = facet_access_type %T.ref.loc8 [symbolic = %T.as_type.loc8_16.1 (constants.%T.as_type.c69)] -// CHECK:STDOUT: %.loc8_16.2: type = converted %T.ref.loc8, %T.as_type.loc8_16.2 [symbolic = %T.as_type.loc8_16.1 (constants.%T.as_type.c69)] +// CHECK:STDOUT: %T.as_type.loc8_15.2: type = facet_access_type %T.ref.loc8 [symbolic = %T.as_type.loc8_15.1 (constants.%T.as_type.c69)] +// CHECK:STDOUT: %.loc8_15.2: type = converted %T.ref.loc8, %T.as_type.loc8_15.2 [symbolic = %T.as_type.loc8_15.1 (constants.%T.as_type.c69)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%T.as_type.loc8_16.1 (%T.as_type.c69) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @F.%T.as_type.loc8_15.1 (%T.as_type.c69) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1691,15 +1691,15 @@ fn F[T:! I(C)](t: T) { // 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.a4b)] // CHECK:STDOUT: %T.loc7_15.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_15.1 (constants.%T.626)] -// CHECK:STDOUT: %T.as_type.loc7_31.1: type = facet_access_type %T.loc7_15.1 [symbolic = %T.as_type.loc7_31.1 (constants.%T.as_type.3b8)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc7_31.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] -// CHECK:STDOUT: %x.param_patt.loc7_29.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc7_29.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc7_29.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc7_29.2 [symbolic = %x.patt.loc7_29.2 (constants.%x.patt.19b)] +// 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.3b8)] +// 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) = at_binding_pattern x, %x.param_patt.loc7_28.2 [symbolic = %x.patt.loc7_28.2 (constants.%x.patt.19b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc7_31.1 [symbolic = %require_complete (constants.%require_complete.94f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc7_30.1 [symbolic = %require_complete (constants.%require_complete.94f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc7_31.1 (%T.as_type.3b8)) { +// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc7_30.1 (%T.as_type.3b8)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -1710,24 +1710,24 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @F(%T.loc8_7.2: %C.type) { // CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.647 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt.ece)] // CHECK:STDOUT: %T.loc8_7.1: %C.type = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T.659)] -// CHECK:STDOUT: %T.as_type.loc8_16.1: type = facet_access_type %T.loc8_7.1 [symbolic = %T.as_type.loc8_16.1 (constants.%T.as_type.c69)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc8_16.1 [symbolic = %pattern_type (constants.%pattern_type.df0)] -// CHECK:STDOUT: %x.param_patt.loc8_14.2: @F.%pattern_type (%pattern_type.df0) = value_param_pattern [symbolic = %x.param_patt.loc8_14.2 (constants.%x.param_patt.948)] -// CHECK:STDOUT: %x.patt.loc8_14.2: @F.%pattern_type (%pattern_type.df0) = at_binding_pattern x, %x.param_patt.loc8_14.2 [symbolic = %x.patt.loc8_14.2 (constants.%x.patt.f9a)] +// CHECK:STDOUT: %T.as_type.loc8_15.1: type = facet_access_type %T.loc8_7.1 [symbolic = %T.as_type.loc8_15.1 (constants.%T.as_type.c69)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc8_15.1 [symbolic = %pattern_type (constants.%pattern_type.df0)] +// CHECK:STDOUT: %x.param_patt.loc8_13.2: @F.%pattern_type (%pattern_type.df0) = value_param_pattern [symbolic = %x.param_patt.loc8_13.2 (constants.%x.param_patt.948)] +// CHECK:STDOUT: %x.patt.loc8_13.2: @F.%pattern_type (%pattern_type.df0) = at_binding_pattern x, %x.param_patt.loc8_13.2 [symbolic = %x.patt.loc8_13.2 (constants.%x.patt.f9a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc8_16.1 [symbolic = %require_complete (constants.%require_complete.8a2)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc8_15.1 [symbolic = %require_complete (constants.%require_complete.8a2)] // CHECK:STDOUT: %impls = observe_impls %T.loc8_7.1, constants.%B.type [symbolic = %impls (constants.%impls)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%T.as_type.loc8_16.1 (%T.as_type.c69)) { +// CHECK:STDOUT: fn(%x.param: @F.%T.as_type.loc8_15.1 (%T.as_type.c69)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref.loc9: %C.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T.659)] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %T.as_type.loc9: type = facet_access_type %T.ref.loc9 [symbolic = %T.as_type.loc8_16.1 (constants.%T.as_type.c69)] -// CHECK:STDOUT: %.loc9: type = converted %T.ref.loc9, %T.as_type.loc9 [symbolic = %T.as_type.loc8_16.1 (constants.%T.as_type.c69)] +// CHECK:STDOUT: %T.as_type.loc9: type = facet_access_type %T.ref.loc9 [symbolic = %T.as_type.loc8_15.1 (constants.%T.as_type.c69)] +// CHECK:STDOUT: %.loc9: type = converted %T.ref.loc9, %T.as_type.loc9 [symbolic = %T.as_type.loc8_15.1 (constants.%T.as_type.c69)] // CHECK:STDOUT: %F.observe.decl = observe_decl @F.observe [concrete] // CHECK:STDOUT: %RequiresA.ref: %RequiresA.type = name_ref RequiresA, file.%RequiresA.decl [concrete = constants.%RequiresA] -// CHECK:STDOUT: %x.ref: @F.%T.as_type.loc8_16.1 (%T.as_type.c69) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @F.%T.as_type.loc8_15.1 (%T.as_type.c69) = name_ref x, %x // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -1760,19 +1760,19 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @RequiresA(constants.%T.626) { // CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt.a4b // CHECK:STDOUT: %T.loc7_15.1 => constants.%T.626 -// CHECK:STDOUT: %T.as_type.loc7_31.1 => constants.%T.as_type.3b8 +// CHECK:STDOUT: %T.as_type.loc7_30.1 => constants.%T.as_type.3b8 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e -// CHECK:STDOUT: %x.param_patt.loc7_29.2 => constants.%x.param_patt.241 -// CHECK:STDOUT: %x.patt.loc7_29.2 => constants.%x.patt.19b +// CHECK:STDOUT: %x.param_patt.loc7_28.2 => constants.%x.param_patt.241 +// CHECK:STDOUT: %x.patt.loc7_28.2 => constants.%x.patt.19b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.659) { // CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt.ece // CHECK:STDOUT: %T.loc8_7.1 => constants.%T.659 -// CHECK:STDOUT: %T.as_type.loc8_16.1 => constants.%T.as_type.c69 +// CHECK:STDOUT: %T.as_type.loc8_15.1 => constants.%T.as_type.c69 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.df0 -// CHECK:STDOUT: %x.param_patt.loc8_14.2 => constants.%x.param_patt.948 -// CHECK:STDOUT: %x.patt.loc8_14.2 => constants.%x.patt.f9a +// CHECK:STDOUT: %x.param_patt.loc8_13.2 => constants.%x.param_patt.948 +// CHECK:STDOUT: %x.patt.loc8_13.2 => constants.%x.patt.f9a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_equivalent_impls.carbon @@ -1975,51 +1975,51 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %TakesPQR.decl: %TakesPQR.type = fn_decl @TakesPQR [concrete = constants.%TakesPQR] { // CHECK:STDOUT: %U.patt.loc5_14.1: %pattern_type.075 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc5_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %u.param_patt.loc5_36.1: @TakesPQR.%pattern_type (%pattern_type.54d) = value_param_pattern [symbolic = %u.param_patt.loc5_36.2 (constants.%u.param_patt)] -// CHECK:STDOUT: %u.patt.loc5_36.1: @TakesPQR.%pattern_type (%pattern_type.54d) = at_binding_pattern u, %u.param_patt.loc5_36.1 [symbolic = %u.patt.loc5_36.2 (constants.%u.patt)] +// CHECK:STDOUT: %u.param_patt.loc5_35.1: @TakesPQR.%pattern_type (%pattern_type.54d) = value_param_pattern [symbolic = %u.param_patt.loc5_35.2 (constants.%u.param_patt)] +// CHECK:STDOUT: %u.patt.loc5_35.1: @TakesPQR.%pattern_type (%pattern_type.54d) = at_binding_pattern u, %u.param_patt.loc5_35.1 [symbolic = %u.patt.loc5_35.2 (constants.%u.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_23.1: type = splice_block %.loc5_23.3 [concrete = constants.%facet_type.0b6] { +// CHECK:STDOUT: %.loc5_22.1: type = splice_block %.loc5_22.3 [concrete = constants.%facet_type.0b6] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %P.ref: type = name_ref P, imports.%Main.P [concrete = constants.%P.type] // CHECK:STDOUT: %Q.ref: type = name_ref Q, imports.%Main.Q [concrete = constants.%Q.type] -// CHECK:STDOUT: %impl.elem0.loc5_19: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method.loc5_19: = bound_method %P.ref, %impl.elem0.loc5_19 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.dd7] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc5_19: init type = call %bound_method.loc5_19(%P.ref, %Q.ref) [concrete = constants.%facet_type.bc0] +// CHECK:STDOUT: %impl.elem0.loc5_18: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %bound_method.loc5_18: = bound_method %P.ref, %impl.elem0.loc5_18 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.dd7] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc5_18: init type = call %bound_method.loc5_18(%P.ref, %Q.ref) [concrete = constants.%facet_type.bc0] // CHECK:STDOUT: %R.ref: type = name_ref R, imports.%Main.R [concrete = constants.%R.type] -// CHECK:STDOUT: %impl.elem0.loc5_23: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method.loc5_23: = bound_method %type.as.BitAndWith.impl.Op.call.loc5_19, %impl.elem0.loc5_23 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.588] -// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc5_19 [concrete = constants.%facet_type.bc0] -// CHECK:STDOUT: %.loc5_19.2: type = converted %type.as.BitAndWith.impl.Op.call.loc5_19, %.loc5_19.1 [concrete = constants.%facet_type.bc0] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc5_23: init type = call %bound_method.loc5_23(%.loc5_19.2, %R.ref) [concrete = constants.%facet_type.0b6] -// CHECK:STDOUT: %.loc5_23.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc5_23 [concrete = constants.%facet_type.0b6] -// CHECK:STDOUT: %.loc5_23.3: type = converted %type.as.BitAndWith.impl.Op.call.loc5_23, %.loc5_23.2 [concrete = constants.%facet_type.0b6] +// CHECK:STDOUT: %impl.elem0.loc5_22: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %bound_method.loc5_22: = bound_method %type.as.BitAndWith.impl.Op.call.loc5_18, %impl.elem0.loc5_22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.588] +// CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc5_18 [concrete = constants.%facet_type.bc0] +// CHECK:STDOUT: %.loc5_18.2: type = converted %type.as.BitAndWith.impl.Op.call.loc5_18, %.loc5_18.1 [concrete = constants.%facet_type.bc0] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc5_22: init type = call %bound_method.loc5_22(%.loc5_18.2, %R.ref) [concrete = constants.%facet_type.0b6] +// CHECK:STDOUT: %.loc5_22.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc5_22 [concrete = constants.%facet_type.0b6] +// CHECK:STDOUT: %.loc5_22.3: type = converted %type.as.BitAndWith.impl.Op.call.loc5_22, %.loc5_22.2 [concrete = constants.%facet_type.0b6] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc5_14.2: %facet_type.0b6 = symbolic_binding U, 0 [symbolic = %U.loc5_14.1 (constants.%U)] -// CHECK:STDOUT: %u.param: @TakesPQR.%U.as_type.loc5_38.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc5_38.1: type = splice_block %.loc5_38.2 [symbolic = %U.as_type.loc5_38.1 (constants.%U.as_type)] { +// CHECK:STDOUT: %u.param: @TakesPQR.%U.as_type.loc5_37.1 (%U.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc5_37.1: type = splice_block %.loc5_37.2 [symbolic = %U.as_type.loc5_37.1 (constants.%U.as_type)] { // CHECK:STDOUT: %U.ref: %facet_type.0b6 = name_ref U, %U.loc5_14.2 [symbolic = %U.loc5_14.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc5_38.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc5_38.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc5_38.2: type = converted %U.ref, %U.as_type.loc5_38.2 [symbolic = %U.as_type.loc5_38.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.as_type.loc5_37.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc5_37.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc5_37.2: type = converted %U.ref, %U.as_type.loc5_37.2 [symbolic = %U.as_type.loc5_37.1 (constants.%U.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @TakesPQR.%U.as_type.loc5_38.1 (%U.as_type) = wrapper_binding u, %u.param +// CHECK:STDOUT: %u: @TakesPQR.%U.as_type.loc5_37.1 (%U.as_type) = wrapper_binding u, %u.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.bd9 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %t.param_patt.loc6_23.1: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc6_23.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc6_23.1: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc6_23.1 [symbolic = %t.patt.loc6_23.2 (constants.%t.patt)] +// CHECK:STDOUT: %t.param_patt.loc6_22.1: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc6_22.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc6_22.1: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc6_22.1 [symbolic = %t.patt.loc6_22.2 (constants.%t.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_10: type = splice_block %Transitive.ref [concrete = constants.%Transitive.type] { +// CHECK:STDOUT: %.loc6_9: type = splice_block %Transitive.ref [concrete = constants.%Transitive.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Transitive.ref: type = name_ref Transitive, imports.%Main.Transitive [concrete = constants.%Transitive.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_7.2: %Transitive.type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @G.%T.as_type.loc6_25.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc6_25.1: type = splice_block %.loc6_25.2 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %t.param: @G.%T.as_type.loc6_24.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc6_24.1: type = splice_block %.loc6_24.2 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref.loc6: %Transitive.type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_25.2: type = facet_access_type %T.ref.loc6 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_25.2: type = converted %T.ref.loc6, %T.as_type.loc6_25.2 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_24.2: type = facet_access_type %T.ref.loc6 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_24.2: type = converted %T.ref.loc6, %T.as_type.loc6_24.2 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @G.%T.as_type.loc6_25.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @G.%T.as_type.loc6_24.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2107,15 +2107,15 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @TakesPQR(%U.loc5_14.2: %facet_type.0b6) { // CHECK:STDOUT: %U.patt.loc5_14.2: %pattern_type.075 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc5_14.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc5_14.1: %facet_type.0b6 = symbolic_binding U, 0 [symbolic = %U.loc5_14.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc5_38.1: type = facet_access_type %U.loc5_14.1 [symbolic = %U.as_type.loc5_38.1 (constants.%U.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc5_38.1 [symbolic = %pattern_type (constants.%pattern_type.54d)] -// CHECK:STDOUT: %u.param_patt.loc5_36.2: @TakesPQR.%pattern_type (%pattern_type.54d) = value_param_pattern [symbolic = %u.param_patt.loc5_36.2 (constants.%u.param_patt)] -// CHECK:STDOUT: %u.patt.loc5_36.2: @TakesPQR.%pattern_type (%pattern_type.54d) = at_binding_pattern u, %u.param_patt.loc5_36.2 [symbolic = %u.patt.loc5_36.2 (constants.%u.patt)] +// CHECK:STDOUT: %U.as_type.loc5_37.1: type = facet_access_type %U.loc5_14.1 [symbolic = %U.as_type.loc5_37.1 (constants.%U.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc5_37.1 [symbolic = %pattern_type (constants.%pattern_type.54d)] +// CHECK:STDOUT: %u.param_patt.loc5_35.2: @TakesPQR.%pattern_type (%pattern_type.54d) = value_param_pattern [symbolic = %u.param_patt.loc5_35.2 (constants.%u.param_patt)] +// CHECK:STDOUT: %u.patt.loc5_35.2: @TakesPQR.%pattern_type (%pattern_type.54d) = at_binding_pattern u, %u.param_patt.loc5_35.2 [symbolic = %u.patt.loc5_35.2 (constants.%u.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc5_38.1 [symbolic = %require_complete (constants.%require_complete.192)] +// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc5_37.1 [symbolic = %require_complete (constants.%require_complete.192)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @TakesPQR.%U.as_type.loc5_38.1 (%U.as_type)) { +// CHECK:STDOUT: fn(%u.param: @TakesPQR.%U.as_type.loc5_37.1 (%U.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -2159,13 +2159,13 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @G(%T.loc6_7.2: %Transitive.type) { // CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.bd9 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_7.1: %Transitive.type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_25.1: type = facet_access_type %T.loc6_7.1 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %T.as_type.loc6_25.1 [symbolic = %pattern_type.loc6 (constants.%pattern_type.68e728.2)] -// CHECK:STDOUT: %t.param_patt.loc6_23.2: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc6_23.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc6_23.2: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc6_23.2 [symbolic = %t.patt.loc6_23.2 (constants.%t.patt)] +// CHECK:STDOUT: %T.as_type.loc6_24.1: type = facet_access_type %T.loc6_7.1 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %T.as_type.loc6_24.1 [symbolic = %pattern_type.loc6 (constants.%pattern_type.68e728.2)] +// CHECK:STDOUT: %t.param_patt.loc6_22.2: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc6_22.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc6_22.2: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc6_22.2 [symbolic = %t.patt.loc6_22.2 (constants.%t.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6: = require_complete_type %T.as_type.loc6_25.1 [symbolic = %require_complete.loc6 (constants.%require_complete.fbd)] +// CHECK:STDOUT: %require_complete.loc6: = require_complete_type %T.as_type.loc6_24.1 [symbolic = %require_complete.loc6 (constants.%require_complete.fbd)] // CHECK:STDOUT: %Transitive.lookup_impl_witness: = lookup_impl_witness %T.loc6_7.1, @Transitive [symbolic = %Transitive.lookup_impl_witness (constants.%Transitive.lookup_impl_witness.ab0b8d.2)] // CHECK:STDOUT: %impl.elem0.loc7_11.2: %facet_type.b1b = impl_witness_access %Transitive.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_11.2 (constants.%impl.elem0.0439e7.2)] // CHECK:STDOUT: %as_type.loc7_11.2: type = facet_access_type %impl.elem0.loc7_11.2 [symbolic = %as_type.loc7_11.2 (constants.%as_type.6a024f.2)] @@ -2192,10 +2192,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %impl.elem0.loc7_3.2: @G.%.loc7_3.4 (%.e75) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.678)] // CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.WithSelf.Op(%Destroy.facet.loc7_3.3) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.e8e)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @G.%T.as_type.loc6_25.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @G.%T.as_type.loc6_24.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.var: ref @G.%as_type.loc7_11.2 (%as_type.6a024f.2) = var_storage %a.var_patt.loc7_3.1 -// CHECK:STDOUT: %t.ref: @G.%T.as_type.loc6_25.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref: @G.%T.as_type.loc6_24.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %GetA.ref: %Transitive.assoc_type = name_ref GetA, imports.%Main.import_ref.5c5 [concrete = constants.%assoc3] // CHECK:STDOUT: %impl.elem3.loc7_17.1: @G.%.loc7_17 (%.657) = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element3 [symbolic = %impl.elem3.loc7_17.2 (constants.%impl.elem3)] // CHECK:STDOUT: %bound_method.loc7_17: = bound_method %t.ref, %impl.elem3.loc7_17.1 @@ -2208,8 +2208,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: assign %a.var, %Transitive.WithSelf.GetA.call // CHECK:STDOUT: %.loc7_11.1: type = splice_block %.loc7_11.3 [symbolic = %as_type.loc7_11.2 (constants.%as_type.6a024f.2)] { // CHECK:STDOUT: %T.ref.loc7: %Transitive.type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc7: type = facet_access_type %T.ref.loc7 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc7_11.2: type = converted %T.ref.loc7, %T.as_type.loc7 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc7: type = facet_access_type %T.ref.loc7 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc7_11.2: type = converted %T.ref.loc7, %T.as_type.loc7 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %A.ref.loc7: %Transitive.assoc_type = name_ref A, imports.%Main.import_ref.72c [concrete = constants.%assoc0.7cd] // CHECK:STDOUT: %impl.elem0.loc7_11.1: %facet_type.b1b = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element0 [symbolic = %impl.elem0.loc7_11.2 (constants.%impl.elem0.0439e7.2)] // CHECK:STDOUT: %as_type.loc7_11.1: type = facet_access_type %impl.elem0.loc7_11.1 [symbolic = %as_type.loc7_11.2 (constants.%as_type.6a024f.2)] @@ -2221,13 +2221,13 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %a.var_patt.loc7_3.1: @G.%pattern_type.loc7 (%pattern_type.c73ac0.2) = var_pattern %a.patt.loc7_8.1 [symbolic = %a.var_patt.loc7_3.2 (constants.%a.var_patt)] // CHECK:STDOUT: } // CHECK:STDOUT: %T.ref.loc9_11: %Transitive.type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc9_12: type = facet_access_type %T.ref.loc9_11 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_12.1: type = converted %T.ref.loc9_11, %T.as_type.loc9_12 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc9_12: type = facet_access_type %T.ref.loc9_11 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_12.1: type = converted %T.ref.loc9_11, %T.as_type.loc9_12 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %A.ref.loc9: %Transitive.assoc_type = name_ref A, imports.%Main.import_ref.72c [concrete = constants.%assoc0.7cd] // CHECK:STDOUT: %impl.elem0.loc9: %facet_type.b1b = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element0 [symbolic = %impl.elem0.loc7_11.2 (constants.%impl.elem0.0439e7.2)] // CHECK:STDOUT: %T.ref.loc9_18: %Transitive.type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc9_19: type = facet_access_type %T.ref.loc9_18 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_19.1: type = converted %T.ref.loc9_18, %T.as_type.loc9_19 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc9_19: type = facet_access_type %T.ref.loc9_18 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc9_19.1: type = converted %T.ref.loc9_18, %T.as_type.loc9_19 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %B.ref: %Transitive.assoc_type = name_ref B, imports.%Main.import_ref.e5e [concrete = constants.%assoc1] // CHECK:STDOUT: %impl.elem1.loc9_19.1: %facet_type.130 = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element1 [symbolic = %impl.elem1.loc9_19.2 (constants.%impl.elem1.6be46c.2)] // CHECK:STDOUT: %as_type.loc9_19.1: type = facet_access_type %impl.elem1.loc9_19.1 [symbolic = %as_type.loc9_19.3 (constants.%as_type.dca436.2)] @@ -2242,13 +2242,13 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %Q.ref.loc14: type = name_ref Q, imports.%Main.Q [concrete = constants.%Q.type] // CHECK:STDOUT: %InQ.ref: %Q.assoc_type = name_ref InQ, imports.%Main.import_ref.e2a [concrete = constants.%assoc0.6a1] // CHECK:STDOUT: %T.ref.loc16_11: %Transitive.type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc16_12: type = facet_access_type %T.ref.loc16_11 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc16_12.1: type = converted %T.ref.loc16_11, %T.as_type.loc16_12 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc16_12: type = facet_access_type %T.ref.loc16_11 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc16_12.1: type = converted %T.ref.loc16_11, %T.as_type.loc16_12 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %A.ref.loc16: %Transitive.assoc_type = name_ref A, imports.%Main.import_ref.72c [concrete = constants.%assoc0.7cd] // CHECK:STDOUT: %impl.elem0.loc16: %facet_type.b1b = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element0 [symbolic = %impl.elem0.loc7_11.2 (constants.%impl.elem0.0439e7.2)] // CHECK:STDOUT: %T.ref.loc16_18: %Transitive.type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc16_19: type = facet_access_type %T.ref.loc16_18 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc16_19.1: type = converted %T.ref.loc16_18, %T.as_type.loc16_19 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc16_19: type = facet_access_type %T.ref.loc16_18 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc16_19.1: type = converted %T.ref.loc16_18, %T.as_type.loc16_19 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %C.ref: %Transitive.assoc_type = name_ref C, imports.%Main.import_ref.c9c [concrete = constants.%assoc2] // CHECK:STDOUT: %impl.elem2.loc16_19.1: %facet_type.4c8 = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element2 [symbolic = %impl.elem2.loc16_19.2 (constants.%impl.elem2.731f97.2)] // CHECK:STDOUT: %as_type.loc16_19.1: type = facet_access_type %impl.elem2.loc16_19.1 [symbolic = %as_type.loc16_19.3 (constants.%as_type.2fadd6.2)] @@ -2330,10 +2330,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @TakesPQR(constants.%U) { // CHECK:STDOUT: %U.patt.loc5_14.2 => constants.%U.patt // CHECK:STDOUT: %U.loc5_14.1 => constants.%U -// CHECK:STDOUT: %U.as_type.loc5_38.1 => constants.%U.as_type +// CHECK:STDOUT: %U.as_type.loc5_37.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.54d -// CHECK:STDOUT: %u.param_patt.loc5_36.2 => constants.%u.param_patt -// CHECK:STDOUT: %u.patt.loc5_36.2 => constants.%u.patt +// CHECK:STDOUT: %u.param_patt.loc5_35.2 => constants.%u.param_patt +// CHECK:STDOUT: %u.patt.loc5_35.2 => constants.%u.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Transitive.WithSelf(constants.%Self.744) { @@ -2386,10 +2386,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @G(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc6_25.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc6_24.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type.loc6 => constants.%pattern_type.68e728.2 -// CHECK:STDOUT: %t.param_patt.loc6_23.2 => constants.%t.param_patt -// CHECK:STDOUT: %t.patt.loc6_23.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc6_22.2 => constants.%t.param_patt +// CHECK:STDOUT: %t.patt.loc6_22.2 => constants.%t.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Transitive.WithSelf(constants.%T) { @@ -2616,51 +2616,51 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %TakesPQR.decl: %TakesPQR.type = fn_decl @TakesPQR [concrete = constants.%TakesPQR] { // CHECK:STDOUT: %U.patt.loc5_14.1: %pattern_type.075 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc5_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %u.param_patt.loc5_36.1: @TakesPQR.%pattern_type (%pattern_type.54d) = value_param_pattern [symbolic = %u.param_patt.loc5_36.2 (constants.%u.param_patt)] -// CHECK:STDOUT: %u.patt.loc5_36.1: @TakesPQR.%pattern_type (%pattern_type.54d) = at_binding_pattern u, %u.param_patt.loc5_36.1 [symbolic = %u.patt.loc5_36.2 (constants.%u.patt)] +// CHECK:STDOUT: %u.param_patt.loc5_35.1: @TakesPQR.%pattern_type (%pattern_type.54d) = value_param_pattern [symbolic = %u.param_patt.loc5_35.2 (constants.%u.param_patt)] +// CHECK:STDOUT: %u.patt.loc5_35.1: @TakesPQR.%pattern_type (%pattern_type.54d) = at_binding_pattern u, %u.param_patt.loc5_35.1 [symbolic = %u.patt.loc5_35.2 (constants.%u.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_23.1: type = splice_block %.loc5_23.3 [concrete = constants.%facet_type.0b6] { +// CHECK:STDOUT: %.loc5_22.1: type = splice_block %.loc5_22.3 [concrete = constants.%facet_type.0b6] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %P.ref: type = name_ref P, imports.%Main.P [concrete = constants.%P.type] // CHECK:STDOUT: %Q.ref: type = name_ref Q, imports.%Main.Q [concrete = constants.%Q.type] -// CHECK:STDOUT: %impl.elem0.loc5_19: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method.loc5_19: = bound_method %P.ref, %impl.elem0.loc5_19 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.dd7] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc5_19: init type = call %bound_method.loc5_19(%P.ref, %Q.ref) [concrete = constants.%facet_type.bc0] +// CHECK:STDOUT: %impl.elem0.loc5_18: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %bound_method.loc5_18: = bound_method %P.ref, %impl.elem0.loc5_18 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.dd7] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc5_18: init type = call %bound_method.loc5_18(%P.ref, %Q.ref) [concrete = constants.%facet_type.bc0] // CHECK:STDOUT: %R.ref: type = name_ref R, imports.%Main.R [concrete = constants.%R.type] -// CHECK:STDOUT: %impl.elem0.loc5_23: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method.loc5_23: = bound_method %type.as.BitAndWith.impl.Op.call.loc5_19, %impl.elem0.loc5_23 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.588] -// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc5_19 [concrete = constants.%facet_type.bc0] -// CHECK:STDOUT: %.loc5_19.2: type = converted %type.as.BitAndWith.impl.Op.call.loc5_19, %.loc5_19.1 [concrete = constants.%facet_type.bc0] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc5_23: init type = call %bound_method.loc5_23(%.loc5_19.2, %R.ref) [concrete = constants.%facet_type.0b6] -// CHECK:STDOUT: %.loc5_23.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc5_23 [concrete = constants.%facet_type.0b6] -// CHECK:STDOUT: %.loc5_23.3: type = converted %type.as.BitAndWith.impl.Op.call.loc5_23, %.loc5_23.2 [concrete = constants.%facet_type.0b6] +// CHECK:STDOUT: %impl.elem0.loc5_22: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %bound_method.loc5_22: = bound_method %type.as.BitAndWith.impl.Op.call.loc5_18, %impl.elem0.loc5_22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.588] +// CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc5_18 [concrete = constants.%facet_type.bc0] +// CHECK:STDOUT: %.loc5_18.2: type = converted %type.as.BitAndWith.impl.Op.call.loc5_18, %.loc5_18.1 [concrete = constants.%facet_type.bc0] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc5_22: init type = call %bound_method.loc5_22(%.loc5_18.2, %R.ref) [concrete = constants.%facet_type.0b6] +// CHECK:STDOUT: %.loc5_22.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc5_22 [concrete = constants.%facet_type.0b6] +// CHECK:STDOUT: %.loc5_22.3: type = converted %type.as.BitAndWith.impl.Op.call.loc5_22, %.loc5_22.2 [concrete = constants.%facet_type.0b6] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc5_14.2: %facet_type.0b6 = symbolic_binding U, 0 [symbolic = %U.loc5_14.1 (constants.%U)] -// CHECK:STDOUT: %u.param: @TakesPQR.%U.as_type.loc5_38.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc5_38.1: type = splice_block %.loc5_38.2 [symbolic = %U.as_type.loc5_38.1 (constants.%U.as_type)] { +// CHECK:STDOUT: %u.param: @TakesPQR.%U.as_type.loc5_37.1 (%U.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc5_37.1: type = splice_block %.loc5_37.2 [symbolic = %U.as_type.loc5_37.1 (constants.%U.as_type)] { // CHECK:STDOUT: %U.ref: %facet_type.0b6 = name_ref U, %U.loc5_14.2 [symbolic = %U.loc5_14.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc5_38.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc5_38.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc5_38.2: type = converted %U.ref, %U.as_type.loc5_38.2 [symbolic = %U.as_type.loc5_38.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.as_type.loc5_37.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc5_37.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc5_37.2: type = converted %U.ref, %U.as_type.loc5_37.2 [symbolic = %U.as_type.loc5_37.1 (constants.%U.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @TakesPQR.%U.as_type.loc5_38.1 (%U.as_type) = wrapper_binding u, %u.param +// CHECK:STDOUT: %u: @TakesPQR.%U.as_type.loc5_37.1 (%U.as_type) = wrapper_binding u, %u.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.bd9 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %t.param_patt.loc6_23.1: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc6_23.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc6_23.1: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc6_23.1 [symbolic = %t.patt.loc6_23.2 (constants.%t.patt)] +// CHECK:STDOUT: %t.param_patt.loc6_22.1: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc6_22.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc6_22.1: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc6_22.1 [symbolic = %t.patt.loc6_22.2 (constants.%t.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_10: type = splice_block %Transitive.ref [concrete = constants.%Transitive.type] { +// CHECK:STDOUT: %.loc6_9: type = splice_block %Transitive.ref [concrete = constants.%Transitive.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Transitive.ref: type = name_ref Transitive, imports.%Main.Transitive [concrete = constants.%Transitive.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_7.2: %Transitive.type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @G.%T.as_type.loc6_25.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc6_25.1: type = splice_block %.loc6_25.2 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %t.param: @G.%T.as_type.loc6_24.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc6_24.1: type = splice_block %.loc6_24.2 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref.loc6: %Transitive.type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_25.2: type = facet_access_type %T.ref.loc6 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_25.2: type = converted %T.ref.loc6, %T.as_type.loc6_25.2 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_24.2: type = facet_access_type %T.ref.loc6 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_24.2: type = converted %T.ref.loc6, %T.as_type.loc6_24.2 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @G.%T.as_type.loc6_25.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @G.%T.as_type.loc6_24.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2748,15 +2748,15 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @TakesPQR(%U.loc5_14.2: %facet_type.0b6) { // CHECK:STDOUT: %U.patt.loc5_14.2: %pattern_type.075 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc5_14.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc5_14.1: %facet_type.0b6 = symbolic_binding U, 0 [symbolic = %U.loc5_14.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc5_38.1: type = facet_access_type %U.loc5_14.1 [symbolic = %U.as_type.loc5_38.1 (constants.%U.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc5_38.1 [symbolic = %pattern_type (constants.%pattern_type.54d)] -// CHECK:STDOUT: %u.param_patt.loc5_36.2: @TakesPQR.%pattern_type (%pattern_type.54d) = value_param_pattern [symbolic = %u.param_patt.loc5_36.2 (constants.%u.param_patt)] -// CHECK:STDOUT: %u.patt.loc5_36.2: @TakesPQR.%pattern_type (%pattern_type.54d) = at_binding_pattern u, %u.param_patt.loc5_36.2 [symbolic = %u.patt.loc5_36.2 (constants.%u.patt)] +// CHECK:STDOUT: %U.as_type.loc5_37.1: type = facet_access_type %U.loc5_14.1 [symbolic = %U.as_type.loc5_37.1 (constants.%U.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc5_37.1 [symbolic = %pattern_type (constants.%pattern_type.54d)] +// CHECK:STDOUT: %u.param_patt.loc5_35.2: @TakesPQR.%pattern_type (%pattern_type.54d) = value_param_pattern [symbolic = %u.param_patt.loc5_35.2 (constants.%u.param_patt)] +// CHECK:STDOUT: %u.patt.loc5_35.2: @TakesPQR.%pattern_type (%pattern_type.54d) = at_binding_pattern u, %u.param_patt.loc5_35.2 [symbolic = %u.patt.loc5_35.2 (constants.%u.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc5_38.1 [symbolic = %require_complete (constants.%require_complete.192)] +// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc5_37.1 [symbolic = %require_complete (constants.%require_complete.192)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @TakesPQR.%U.as_type.loc5_38.1 (%U.as_type)) { +// CHECK:STDOUT: fn(%u.param: @TakesPQR.%U.as_type.loc5_37.1 (%U.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -2800,13 +2800,13 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @G(%T.loc6_7.2: %Transitive.type) { // CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.bd9 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_7.1: %Transitive.type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_25.1: type = facet_access_type %T.loc6_7.1 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %T.as_type.loc6_25.1 [symbolic = %pattern_type.loc6 (constants.%pattern_type.68e728.2)] -// CHECK:STDOUT: %t.param_patt.loc6_23.2: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc6_23.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc6_23.2: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc6_23.2 [symbolic = %t.patt.loc6_23.2 (constants.%t.patt)] +// CHECK:STDOUT: %T.as_type.loc6_24.1: type = facet_access_type %T.loc6_7.1 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %T.as_type.loc6_24.1 [symbolic = %pattern_type.loc6 (constants.%pattern_type.68e728.2)] +// CHECK:STDOUT: %t.param_patt.loc6_22.2: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc6_22.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc6_22.2: @G.%pattern_type.loc6 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc6_22.2 [symbolic = %t.patt.loc6_22.2 (constants.%t.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc6: = require_complete_type %T.as_type.loc6_25.1 [symbolic = %require_complete.loc6 (constants.%require_complete.fbd)] +// CHECK:STDOUT: %require_complete.loc6: = require_complete_type %T.as_type.loc6_24.1 [symbolic = %require_complete.loc6 (constants.%require_complete.fbd)] // CHECK:STDOUT: %Transitive.lookup_impl_witness: = lookup_impl_witness %T.loc6_7.1, @Transitive [symbolic = %Transitive.lookup_impl_witness (constants.%Transitive.lookup_impl_witness.ab0b8d.2)] // CHECK:STDOUT: %impl.elem0.loc7_11.2: %facet_type.b1b = impl_witness_access %Transitive.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_11.2 (constants.%impl.elem0.0439e7.2)] // CHECK:STDOUT: %as_type.loc7_11.2: type = facet_access_type %impl.elem0.loc7_11.2 [symbolic = %as_type.loc7_11.2 (constants.%as_type.6a024f.2)] @@ -2825,10 +2825,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %impl.elem0.loc7_3.2: @G.%.loc7_3.4 (%.e75) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.678)] // CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.WithSelf.Op(%Destroy.facet.loc7_3.3) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.e8e)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @G.%T.as_type.loc6_25.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @G.%T.as_type.loc6_24.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.var: ref @G.%as_type.loc7_11.2 (%as_type.6a024f.2) = var_storage %a.var_patt.loc7_3.1 -// CHECK:STDOUT: %t.ref: @G.%T.as_type.loc6_25.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref: @G.%T.as_type.loc6_24.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %GetA.ref: %Transitive.assoc_type = name_ref GetA, imports.%Main.import_ref.5c5 [concrete = constants.%assoc3] // CHECK:STDOUT: %impl.elem3.loc7_17.1: @G.%.loc7_17 (%.657) = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element3 [symbolic = %impl.elem3.loc7_17.2 (constants.%impl.elem3)] // CHECK:STDOUT: %bound_method.loc7_17: = bound_method %t.ref, %impl.elem3.loc7_17.1 @@ -2841,8 +2841,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: assign %a.var, %Transitive.WithSelf.GetA.call // CHECK:STDOUT: %.loc7_11.1: type = splice_block %.loc7_11.3 [symbolic = %as_type.loc7_11.2 (constants.%as_type.6a024f.2)] { // CHECK:STDOUT: %T.ref.loc7: %Transitive.type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc7: type = facet_access_type %T.ref.loc7 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc7_11.2: type = converted %T.ref.loc7, %T.as_type.loc7 [symbolic = %T.as_type.loc6_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc7: type = facet_access_type %T.ref.loc7 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc7_11.2: type = converted %T.ref.loc7, %T.as_type.loc7 [symbolic = %T.as_type.loc6_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %A.ref: %Transitive.assoc_type = name_ref A, imports.%Main.import_ref.72c [concrete = constants.%assoc0.7cd] // CHECK:STDOUT: %impl.elem0.loc7_11.1: %facet_type.b1b = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element0 [symbolic = %impl.elem0.loc7_11.2 (constants.%impl.elem0.0439e7.2)] // CHECK:STDOUT: %as_type.loc7_11.1: type = facet_access_type %impl.elem0.loc7_11.1 [symbolic = %as_type.loc7_11.2 (constants.%as_type.6a024f.2)] @@ -2921,10 +2921,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @TakesPQR(constants.%U) { // CHECK:STDOUT: %U.patt.loc5_14.2 => constants.%U.patt // CHECK:STDOUT: %U.loc5_14.1 => constants.%U -// CHECK:STDOUT: %U.as_type.loc5_38.1 => constants.%U.as_type +// CHECK:STDOUT: %U.as_type.loc5_37.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.54d -// CHECK:STDOUT: %u.param_patt.loc5_36.2 => constants.%u.param_patt -// CHECK:STDOUT: %u.patt.loc5_36.2 => constants.%u.patt +// CHECK:STDOUT: %u.param_patt.loc5_35.2 => constants.%u.param_patt +// CHECK:STDOUT: %u.patt.loc5_35.2 => constants.%u.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Transitive.WithSelf(constants.%Self.744) { @@ -2977,10 +2977,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @G(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_7.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc6_25.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc6_24.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type.loc6 => constants.%pattern_type.68e728.2 -// CHECK:STDOUT: %t.param_patt.loc6_23.2 => constants.%t.param_patt -// CHECK:STDOUT: %t.patt.loc6_23.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc6_22.2 => constants.%t.param_patt +// CHECK:STDOUT: %t.patt.loc6_22.2 => constants.%t.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Transitive.WithSelf(constants.%T) { @@ -3194,21 +3194,21 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %T.patt.loc5_7.1: %pattern_type.bd9 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %t.param_patt.loc5_23.1: @G.%pattern_type.loc5 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc5_23.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc5_23.1: @G.%pattern_type.loc5 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc5_23.1 [symbolic = %t.patt.loc5_23.2 (constants.%t.patt)] +// CHECK:STDOUT: %t.param_patt.loc5_22.1: @G.%pattern_type.loc5 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc5_22.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc5_22.1: @G.%pattern_type.loc5 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc5_22.1 [symbolic = %t.patt.loc5_22.2 (constants.%t.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_10: type = splice_block %Transitive.ref [concrete = constants.%Transitive.type] { +// CHECK:STDOUT: %.loc5_9: type = splice_block %Transitive.ref [concrete = constants.%Transitive.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Transitive.ref: type = name_ref Transitive, imports.%Main.Transitive [concrete = constants.%Transitive.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_7.2: %Transitive.type = symbolic_binding T, 0 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @G.%T.as_type.loc5_25.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc5_25.1: type = splice_block %.loc5_25.2 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %t.param: @G.%T.as_type.loc5_24.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc5_24.1: type = splice_block %.loc5_24.2 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref.loc5: %Transitive.type = name_ref T, %T.loc5_7.2 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc5_25.2: type = facet_access_type %T.ref.loc5 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc5_25.2: type = converted %T.ref.loc5, %T.as_type.loc5_25.2 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc5_24.2: type = facet_access_type %T.ref.loc5 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc5_24.2: type = converted %T.ref.loc5, %T.as_type.loc5_24.2 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @G.%T.as_type.loc5_25.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @G.%T.as_type.loc5_24.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3329,13 +3329,13 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @G(%T.loc5_7.2: %Transitive.type) { // CHECK:STDOUT: %T.patt.loc5_7.2: %pattern_type.bd9 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc5_7.1: %Transitive.type = symbolic_binding T, 0 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc5_25.1: type = facet_access_type %T.loc5_7.1 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type.loc5: type = pattern_type %T.as_type.loc5_25.1 [symbolic = %pattern_type.loc5 (constants.%pattern_type.68e728.2)] -// CHECK:STDOUT: %t.param_patt.loc5_23.2: @G.%pattern_type.loc5 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc5_23.2 (constants.%t.param_patt)] -// CHECK:STDOUT: %t.patt.loc5_23.2: @G.%pattern_type.loc5 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc5_23.2 [symbolic = %t.patt.loc5_23.2 (constants.%t.patt)] +// CHECK:STDOUT: %T.as_type.loc5_24.1: type = facet_access_type %T.loc5_7.1 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type.loc5: type = pattern_type %T.as_type.loc5_24.1 [symbolic = %pattern_type.loc5 (constants.%pattern_type.68e728.2)] +// CHECK:STDOUT: %t.param_patt.loc5_22.2: @G.%pattern_type.loc5 (%pattern_type.68e728.2) = value_param_pattern [symbolic = %t.param_patt.loc5_22.2 (constants.%t.param_patt)] +// CHECK:STDOUT: %t.patt.loc5_22.2: @G.%pattern_type.loc5 (%pattern_type.68e728.2) = at_binding_pattern t, %t.param_patt.loc5_22.2 [symbolic = %t.patt.loc5_22.2 (constants.%t.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc5: = require_complete_type %T.as_type.loc5_25.1 [symbolic = %require_complete.loc5 (constants.%require_complete.fbd)] +// CHECK:STDOUT: %require_complete.loc5: = require_complete_type %T.as_type.loc5_24.1 [symbolic = %require_complete.loc5 (constants.%require_complete.fbd)] // CHECK:STDOUT: %Transitive.lookup_impl_witness: = lookup_impl_witness %T.loc5_7.1, @Transitive [symbolic = %Transitive.lookup_impl_witness (constants.%Transitive.lookup_impl_witness.ab0b8d.2)] // CHECK:STDOUT: %impl.elem0.loc6_12.2: %facet_type.1ff = impl_witness_access %Transitive.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_12.2 (constants.%impl.elem0.8aa205.2)] // CHECK:STDOUT: %impl.elem1.loc6_19.2: %facet_type.1b9 = impl_witness_access %Transitive.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc6_19.2 (constants.%impl.elem1.1413d6.2)] @@ -3365,16 +3365,16 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %impl.elem0.loc8_3.2: @G.%.loc8_3.4 (%.569) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_3.2 (constants.%impl.elem0.95f)] // CHECK:STDOUT: %specific_impl_fn.loc8_3.2: = specific_impl_function %impl.elem0.loc8_3.2, @Destroy.WithSelf.Op(%Destroy.facet.loc8_3.3) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.584)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @G.%T.as_type.loc5_25.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @G.%T.as_type.loc5_24.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref.loc6_11: %Transitive.type = name_ref T, %T.loc5_7.2 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_12: type = facet_access_type %T.ref.loc6_11 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_12.1: type = converted %T.ref.loc6_11, %T.as_type.loc6_12 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_12: type = facet_access_type %T.ref.loc6_11 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_12.1: type = converted %T.ref.loc6_11, %T.as_type.loc6_12 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %A.ref.loc6: %Transitive.assoc_type = name_ref A, imports.%Main.import_ref.72c [concrete = constants.%assoc0.e77] // CHECK:STDOUT: %impl.elem0.loc6_12.1: %facet_type.1ff = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element0 [symbolic = %impl.elem0.loc6_12.2 (constants.%impl.elem0.8aa205.2)] // CHECK:STDOUT: %T.ref.loc6_18: %Transitive.type = name_ref T, %T.loc5_7.2 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_19: type = facet_access_type %T.ref.loc6_18 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_19.1: type = converted %T.ref.loc6_18, %T.as_type.loc6_19 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_19: type = facet_access_type %T.ref.loc6_18 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_19.1: type = converted %T.ref.loc6_18, %T.as_type.loc6_19 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %B.ref: %Transitive.assoc_type = name_ref B, imports.%Main.import_ref.e5e [concrete = constants.%assoc1] // CHECK:STDOUT: %impl.elem1.loc6_19.1: %facet_type.1b9 = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element1 [symbolic = %impl.elem1.loc6_19.2 (constants.%impl.elem1.1413d6.2)] // CHECK:STDOUT: %as_type.loc6_19.1: type = facet_access_type %impl.elem1.loc6_19.1 [symbolic = %as_type.loc6_19.3 (constants.%as_type.f86e2d.2)] @@ -3382,8 +3382,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %as_type.loc6_12.1: type = facet_access_type %impl.elem0.loc6_12.1 [symbolic = %as_type.loc6_12.2 (constants.%as_type.a0914b.2)] // CHECK:STDOUT: %.loc6_12.2: type = converted %impl.elem0.loc6_12.1, %as_type.loc6_12.1 [symbolic = %as_type.loc6_12.2 (constants.%as_type.a0914b.2)] // CHECK:STDOUT: %T.ref.loc6_25: %Transitive.type = name_ref T, %T.loc5_7.2 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_26: type = facet_access_type %T.ref.loc6_25 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_26.1: type = converted %T.ref.loc6_25, %T.as_type.loc6_26 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_26: type = facet_access_type %T.ref.loc6_25 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_26.1: type = converted %T.ref.loc6_25, %T.as_type.loc6_26 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %C.ref.loc6: %Transitive.assoc_type = name_ref C, imports.%Main.import_ref.c9c [concrete = constants.%assoc2] // CHECK:STDOUT: %impl.elem2.loc6_26.1: %facet_type.0e9 = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element2 [symbolic = %impl.elem2.loc6_26.2 (constants.%impl.elem2.279493.2)] // CHECK:STDOUT: %as_type.loc6_26.1: type = facet_access_type %impl.elem2.loc6_26.1 [symbolic = %as_type.loc6_26.2 (constants.%as_type.b2aa43.2)] @@ -3392,7 +3392,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %.loc6_19.3: type = converted %impl.elem1.loc6_19.1, %as_type.loc6_19.2 [symbolic = %as_type.loc6_19.3 (constants.%as_type.f86e2d.2)] // CHECK:STDOUT: %G.observe.decl = observe_decl @G.observe [concrete] // CHECK:STDOUT: %a.var: ref @G.%as_type.loc6_12.2 (%as_type.a0914b.2) = var_storage %a.var_patt.loc8_3.1 -// CHECK:STDOUT: %t.ref: @G.%T.as_type.loc5_25.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref: @G.%T.as_type.loc5_24.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %GetA.ref: %Transitive.assoc_type = name_ref GetA, imports.%Main.import_ref.5c5 [concrete = constants.%assoc3] // CHECK:STDOUT: %impl.elem3.loc8_17.1: @G.%.loc8_17 (%.657) = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element3 [symbolic = %impl.elem3.loc8_17.2 (constants.%impl.elem3)] // CHECK:STDOUT: %bound_method.loc8_17: = bound_method %t.ref, %impl.elem3.loc8_17.1 @@ -3405,8 +3405,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: assign %a.var, %Transitive.WithSelf.GetA.call // CHECK:STDOUT: %.loc8_11.1: type = splice_block %.loc8_11.3 [symbolic = %as_type.loc6_12.2 (constants.%as_type.a0914b.2)] { // CHECK:STDOUT: %T.ref.loc8: %Transitive.type = name_ref T, %T.loc5_7.2 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc8: type = facet_access_type %T.ref.loc8 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc8_11.2: type = converted %T.ref.loc8, %T.as_type.loc8 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc8: type = facet_access_type %T.ref.loc8 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc8_11.2: type = converted %T.ref.loc8, %T.as_type.loc8 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %A.ref.loc8: %Transitive.assoc_type = name_ref A, imports.%Main.import_ref.72c [concrete = constants.%assoc0.e77] // CHECK:STDOUT: %impl.elem0.loc8_11: %facet_type.1ff = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element0 [symbolic = %impl.elem0.loc6_12.2 (constants.%impl.elem0.8aa205.2)] // CHECK:STDOUT: %as_type.loc8: type = facet_access_type %impl.elem0.loc8_11 [symbolic = %as_type.loc6_12.2 (constants.%as_type.a0914b.2)] @@ -3419,8 +3419,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: %a.ref: ref @G.%as_type.loc6_12.2 (%as_type.a0914b.2) = name_ref a, %a // CHECK:STDOUT: %T.ref.loc17: %Transitive.type = name_ref T, %T.loc5_7.2 [symbolic = %T.loc5_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc17: type = facet_access_type %T.ref.loc17 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc17_7: type = converted %T.ref.loc17, %T.as_type.loc17 [symbolic = %T.as_type.loc5_25.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc17: type = facet_access_type %T.ref.loc17 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc17_7: type = converted %T.ref.loc17, %T.as_type.loc17 [symbolic = %T.as_type.loc5_24.1 (constants.%T.as_type)] // CHECK:STDOUT: %C.ref.loc17: %Transitive.assoc_type = name_ref C, imports.%Main.import_ref.c9c [concrete = constants.%assoc2] // CHECK:STDOUT: %impl.elem2.loc17: %facet_type.0e9 = impl_witness_access constants.%Transitive.lookup_impl_witness.ab0b8d.2, element2 [symbolic = %impl.elem2.loc6_26.2 (constants.%impl.elem2.279493.2)] // CHECK:STDOUT: %as_type.loc17: type = facet_access_type %impl.elem2.loc17 [symbolic = %as_type.loc6_26.2 (constants.%as_type.b2aa43.2)] @@ -3542,10 +3542,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @G(constants.%T) { // CHECK:STDOUT: %T.patt.loc5_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc5_7.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc5_25.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc5_24.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type.loc5 => constants.%pattern_type.68e728.2 -// CHECK:STDOUT: %t.param_patt.loc5_23.2 => constants.%t.param_patt -// CHECK:STDOUT: %t.patt.loc5_23.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc5_22.2 => constants.%t.param_patt +// CHECK:STDOUT: %t.patt.loc5_22.2 => constants.%t.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Transitive.WithSelf(constants.%T) { @@ -3694,10 +3694,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt.a4b)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc8_15.1 [symbolic = %T.loc8_15.2 (constants.%T.626)] -// CHECK:STDOUT: %T.as_type.loc8_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_21.2 (constants.%T.as_type.3b8)] -// CHECK:STDOUT: %.loc8_21: type = converted %T.ref, %T.as_type.loc8_21.1 [symbolic = %T.as_type.loc8_21.2 (constants.%T.as_type.3b8)] +// CHECK:STDOUT: %T.as_type.loc8_20.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_20.2 (constants.%T.as_type.3b8)] +// CHECK:STDOUT: %.loc8_20: type = converted %T.ref, %T.as_type.loc8_20.1 [symbolic = %T.as_type.loc8_20.2 (constants.%T.as_type.3b8)] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %.loc8_18: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc8_17: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } @@ -3707,10 +3707,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %T.patt.loc9_15.1: %pattern_type.7b5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt.ca5)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: %B.type = name_ref T, %T.loc9_15.1 [symbolic = %T.loc9_15.2 (constants.%T.ed4)] -// CHECK:STDOUT: %T.as_type.loc9_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_21.2 (constants.%T.as_type.4de)] -// CHECK:STDOUT: %.loc9_21: type = converted %T.ref, %T.as_type.loc9_21.1 [symbolic = %T.as_type.loc9_21.2 (constants.%T.as_type.4de)] +// CHECK:STDOUT: %T.as_type.loc9_20.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_20.2 (constants.%T.as_type.4de)] +// CHECK:STDOUT: %.loc9_20: type = converted %T.ref, %T.as_type.loc9_20.1 [symbolic = %T.as_type.loc9_20.2 (constants.%T.as_type.4de)] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C.type] -// CHECK:STDOUT: %.loc9_18: type = splice_block %B.ref [concrete = constants.%B.type] { +// CHECK:STDOUT: %.loc9_17: type = splice_block %B.ref [concrete = constants.%B.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: } @@ -3720,10 +3720,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %T.patt.loc10_15.1: %pattern_type.647 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_15.2 (constants.%T.patt.ece)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: %C.type = name_ref T, %T.loc10_15.1 [symbolic = %T.loc10_15.2 (constants.%T.659)] -// CHECK:STDOUT: %T.as_type.loc10_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc10_21.2 (constants.%T.as_type.c69)] -// CHECK:STDOUT: %.loc10_21: type = converted %T.ref, %T.as_type.loc10_21.1 [symbolic = %T.as_type.loc10_21.2 (constants.%T.as_type.c69)] +// CHECK:STDOUT: %T.as_type.loc10_20.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc10_20.2 (constants.%T.as_type.c69)] +// CHECK:STDOUT: %.loc10_20: type = converted %T.ref, %T.as_type.loc10_20.1 [symbolic = %T.as_type.loc10_20.2 (constants.%T.as_type.c69)] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D.type] -// CHECK:STDOUT: %.loc10_18: type = splice_block %C.ref [concrete = constants.%C.type] { +// CHECK:STDOUT: %.loc10_17: type = splice_block %C.ref [concrete = constants.%C.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C.type] // CHECK:STDOUT: } @@ -3731,57 +3731,57 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: %RequiresB.decl: %RequiresB.type = fn_decl @RequiresB [concrete = constants.%RequiresB] { // CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type.7b5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt.ca5)] -// CHECK:STDOUT: %x.param_patt.loc12_29.1: @RequiresB.%pattern_type (%pattern_type.c89) = value_param_pattern [symbolic = %x.param_patt.loc12_29.2 (constants.%x.param_patt.1d2)] -// CHECK:STDOUT: %x.patt.loc12_29.1: @RequiresB.%pattern_type (%pattern_type.c89) = at_binding_pattern x, %x.param_patt.loc12_29.1 [symbolic = %x.patt.loc12_29.2 (constants.%x.patt.3a5)] +// CHECK:STDOUT: %x.param_patt.loc12_28.1: @RequiresB.%pattern_type (%pattern_type.c89) = value_param_pattern [symbolic = %x.param_patt.loc12_28.2 (constants.%x.param_patt.1d2)] +// CHECK:STDOUT: %x.patt.loc12_28.1: @RequiresB.%pattern_type (%pattern_type.c89) = at_binding_pattern x, %x.param_patt.loc12_28.1 [symbolic = %x.patt.loc12_28.2 (constants.%x.patt.3a5)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_18: type = splice_block %B.ref [concrete = constants.%B.type] { +// CHECK:STDOUT: %.loc12_17: type = splice_block %B.ref [concrete = constants.%B.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc12_15.2: %B.type = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T.ed4)] -// CHECK:STDOUT: %x.param: @RequiresB.%T.as_type.loc12_31.1 (%T.as_type.4de) = value_param call_param0 -// CHECK:STDOUT: %.loc12_31.1: type = splice_block %.loc12_31.2 [symbolic = %T.as_type.loc12_31.1 (constants.%T.as_type.4de)] { +// CHECK:STDOUT: %x.param: @RequiresB.%T.as_type.loc12_30.1 (%T.as_type.4de) = value_param call_param0 +// CHECK:STDOUT: %.loc12_30.1: type = splice_block %.loc12_30.2 [symbolic = %T.as_type.loc12_30.1 (constants.%T.as_type.4de)] { // CHECK:STDOUT: %T.ref: %B.type = name_ref T, %T.loc12_15.2 [symbolic = %T.loc12_15.1 (constants.%T.ed4)] -// CHECK:STDOUT: %T.as_type.loc12_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_31.1 (constants.%T.as_type.4de)] -// CHECK:STDOUT: %.loc12_31.2: type = converted %T.ref, %T.as_type.loc12_31.2 [symbolic = %T.as_type.loc12_31.1 (constants.%T.as_type.4de)] +// CHECK:STDOUT: %T.as_type.loc12_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_30.1 (constants.%T.as_type.4de)] +// CHECK:STDOUT: %.loc12_30.2: type = converted %T.ref, %T.as_type.loc12_30.2 [symbolic = %T.as_type.loc12_30.1 (constants.%T.as_type.4de)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @RequiresB.%T.as_type.loc12_31.1 (%T.as_type.4de) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @RequiresB.%T.as_type.loc12_30.1 (%T.as_type.4de) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %RequiresD.decl: %RequiresD.type = fn_decl @RequiresD [concrete = constants.%RequiresD] { // CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.549 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.604)] -// CHECK:STDOUT: %x.param_patt.loc13_29.1: @RequiresD.%pattern_type (%pattern_type.86b) = value_param_pattern [symbolic = %x.param_patt.loc13_29.2 (constants.%x.param_patt.2ab)] -// CHECK:STDOUT: %x.patt.loc13_29.1: @RequiresD.%pattern_type (%pattern_type.86b) = at_binding_pattern x, %x.param_patt.loc13_29.1 [symbolic = %x.patt.loc13_29.2 (constants.%x.patt.a712ca.1)] +// CHECK:STDOUT: %x.param_patt.loc13_28.1: @RequiresD.%pattern_type (%pattern_type.86b) = value_param_pattern [symbolic = %x.param_patt.loc13_28.2 (constants.%x.param_patt.2ab)] +// CHECK:STDOUT: %x.patt.loc13_28.1: @RequiresD.%pattern_type (%pattern_type.86b) = at_binding_pattern x, %x.param_patt.loc13_28.1 [symbolic = %x.patt.loc13_28.2 (constants.%x.patt.a712ca.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_18: type = splice_block %D.ref [concrete = constants.%D.type] { +// CHECK:STDOUT: %.loc13_17: type = splice_block %D.ref [concrete = constants.%D.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc13_15.2: %D.type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T.3dd)] -// CHECK:STDOUT: %x.param: @RequiresD.%T.as_type.loc13_31.1 (%T.as_type.8cd) = value_param call_param0 -// CHECK:STDOUT: %.loc13_31.1: type = splice_block %.loc13_31.2 [symbolic = %T.as_type.loc13_31.1 (constants.%T.as_type.8cd)] { +// CHECK:STDOUT: %x.param: @RequiresD.%T.as_type.loc13_30.1 (%T.as_type.8cd) = value_param call_param0 +// CHECK:STDOUT: %.loc13_30.1: type = splice_block %.loc13_30.2 [symbolic = %T.as_type.loc13_30.1 (constants.%T.as_type.8cd)] { // CHECK:STDOUT: %T.ref: %D.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T.3dd)] -// CHECK:STDOUT: %T.as_type.loc13_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc13_31.1 (constants.%T.as_type.8cd)] -// CHECK:STDOUT: %.loc13_31.2: type = converted %T.ref, %T.as_type.loc13_31.2 [symbolic = %T.as_type.loc13_31.1 (constants.%T.as_type.8cd)] +// CHECK:STDOUT: %T.as_type.loc13_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc13_30.1 (constants.%T.as_type.8cd)] +// CHECK:STDOUT: %.loc13_30.2: type = converted %T.ref, %T.as_type.loc13_30.2 [symbolic = %T.as_type.loc13_30.1 (constants.%T.as_type.8cd)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @RequiresD.%T.as_type.loc13_31.1 (%T.as_type.8cd) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @RequiresD.%T.as_type.loc13_30.1 (%T.as_type.8cd) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %RequiresA.decl: %RequiresA.type = fn_decl @RequiresA [concrete = constants.%RequiresA] { // CHECK:STDOUT: %T.patt.loc15_15.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.a4b)] -// CHECK:STDOUT: %x.param_patt.loc15_22.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc15_22.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc15_22.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc15_22.1 [symbolic = %x.patt.loc15_22.2 (constants.%x.patt.19b9f1.1)] +// CHECK:STDOUT: %x.param_patt.loc15_21.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc15_21.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc15_21.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc15_21.1 [symbolic = %x.patt.loc15_21.2 (constants.%x.patt.19b9f1.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_18: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc15_17: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc15_15.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc15_15.1 (constants.%T.626)] -// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc15_24.1 (%T.as_type.3b8) = value_param call_param0 -// CHECK:STDOUT: %.loc15_24.1: type = splice_block %.loc15_24.2 [symbolic = %T.as_type.loc15_24.1 (constants.%T.as_type.3b8)] { +// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc15_23.1 (%T.as_type.3b8) = value_param call_param0 +// CHECK:STDOUT: %.loc15_23.1: type = splice_block %.loc15_23.2 [symbolic = %T.as_type.loc15_23.1 (constants.%T.as_type.3b8)] { // CHECK:STDOUT: %T.ref.loc15: %A.type = name_ref T, %T.loc15_15.2 [symbolic = %T.loc15_15.1 (constants.%T.626)] -// CHECK:STDOUT: %T.as_type.loc15_24.2: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc15_24.1 (constants.%T.as_type.3b8)] -// CHECK:STDOUT: %.loc15_24.2: type = converted %T.ref.loc15, %T.as_type.loc15_24.2 [symbolic = %T.as_type.loc15_24.1 (constants.%T.as_type.3b8)] +// CHECK:STDOUT: %T.as_type.loc15_23.2: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc15_23.1 (constants.%T.as_type.3b8)] +// CHECK:STDOUT: %.loc15_23.2: type = converted %T.ref.loc15, %T.as_type.loc15_23.2 [symbolic = %T.as_type.loc15_23.1 (constants.%T.as_type.3b8)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc15_24.1 (%T.as_type.3b8) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc15_23.1 (%T.as_type.3b8) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3840,69 +3840,69 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic impl @T.as_type.as.B.impl(%T.loc8_15.1: %A.type) { // CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt.a4b)] // CHECK:STDOUT: %T.loc8_15.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc8_15.2 (constants.%T.626)] -// CHECK:STDOUT: %T.as_type.loc8_21.2: type = facet_access_type %T.loc8_15.2 [symbolic = %T.as_type.loc8_21.2 (constants.%T.as_type.3b8)] -// CHECK:STDOUT: %B.impl_witness.loc8_28.2: = impl_witness %B.impl_witness_table, @T.as_type.as.B.impl(%T.loc8_15.2) [symbolic = %B.impl_witness.loc8_28.2 (constants.%B.impl_witness)] +// CHECK:STDOUT: %T.as_type.loc8_20.2: type = facet_access_type %T.loc8_15.2 [symbolic = %T.as_type.loc8_20.2 (constants.%T.as_type.3b8)] +// CHECK:STDOUT: %B.impl_witness.loc8_27.2: = impl_witness %B.impl_witness_table, @T.as_type.as.B.impl(%T.loc8_15.2) [symbolic = %B.impl_witness.loc8_27.2 (constants.%B.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc8_21 as %B.ref { +// CHECK:STDOUT: impl: %.loc8_20 as %B.ref { // CHECK:STDOUT: %B.impl_witness_table = impl_witness_table (), @T.as_type.as.B.impl [concrete] -// CHECK:STDOUT: %B.impl_witness.loc8_28.1: = impl_witness %B.impl_witness_table, @T.as_type.as.B.impl(constants.%T.626) [symbolic = %B.impl_witness.loc8_28.2 (constants.%B.impl_witness)] +// CHECK:STDOUT: %B.impl_witness.loc8_27.1: = impl_witness %B.impl_witness_table, @T.as_type.as.B.impl(constants.%T.626) [symbolic = %B.impl_witness.loc8_27.2 (constants.%B.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: witness = %B.impl_witness.loc8_28.1 +// CHECK:STDOUT: witness = %B.impl_witness.loc8_27.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @T.as_type.as.C.impl(%T.loc9_15.1: %B.type) { // CHECK:STDOUT: %T.patt.loc9_15.2: %pattern_type.7b5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt.ca5)] // CHECK:STDOUT: %T.loc9_15.2: %B.type = symbolic_binding T, 0 [symbolic = %T.loc9_15.2 (constants.%T.ed4)] -// CHECK:STDOUT: %T.as_type.loc9_21.2: type = facet_access_type %T.loc9_15.2 [symbolic = %T.as_type.loc9_21.2 (constants.%T.as_type.4de)] -// CHECK:STDOUT: %C.impl_witness.loc9_28.2: = impl_witness %C.impl_witness_table, @T.as_type.as.C.impl(%T.loc9_15.2) [symbolic = %C.impl_witness.loc9_28.2 (constants.%C.impl_witness.9e3)] +// CHECK:STDOUT: %T.as_type.loc9_20.2: type = facet_access_type %T.loc9_15.2 [symbolic = %T.as_type.loc9_20.2 (constants.%T.as_type.4de)] +// CHECK:STDOUT: %C.impl_witness.loc9_27.2: = impl_witness %C.impl_witness_table, @T.as_type.as.C.impl(%T.loc9_15.2) [symbolic = %C.impl_witness.loc9_27.2 (constants.%C.impl_witness.9e3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc9_21 as %C.ref { +// CHECK:STDOUT: impl: %.loc9_20 as %C.ref { // CHECK:STDOUT: %C.impl_witness_table = impl_witness_table (), @T.as_type.as.C.impl [concrete] -// CHECK:STDOUT: %C.impl_witness.loc9_28.1: = impl_witness %C.impl_witness_table, @T.as_type.as.C.impl(constants.%T.ed4) [symbolic = %C.impl_witness.loc9_28.2 (constants.%C.impl_witness.9e3)] +// CHECK:STDOUT: %C.impl_witness.loc9_27.1: = impl_witness %C.impl_witness_table, @T.as_type.as.C.impl(constants.%T.ed4) [symbolic = %C.impl_witness.loc9_27.2 (constants.%C.impl_witness.9e3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %C.ref -// CHECK:STDOUT: witness = %C.impl_witness.loc9_28.1 +// CHECK:STDOUT: witness = %C.impl_witness.loc9_27.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @T.as_type.as.D.impl(%T.loc10_15.1: %C.type) { // CHECK:STDOUT: %T.patt.loc10_15.2: %pattern_type.647 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_15.2 (constants.%T.patt.ece)] // CHECK:STDOUT: %T.loc10_15.2: %C.type = symbolic_binding T, 0 [symbolic = %T.loc10_15.2 (constants.%T.659)] -// CHECK:STDOUT: %T.as_type.loc10_21.2: type = facet_access_type %T.loc10_15.2 [symbolic = %T.as_type.loc10_21.2 (constants.%T.as_type.c69)] -// CHECK:STDOUT: %D.impl_witness.loc10_28.2: = impl_witness %D.impl_witness_table, @T.as_type.as.D.impl(%T.loc10_15.2) [symbolic = %D.impl_witness.loc10_28.2 (constants.%D.impl_witness.8a1)] +// CHECK:STDOUT: %T.as_type.loc10_20.2: type = facet_access_type %T.loc10_15.2 [symbolic = %T.as_type.loc10_20.2 (constants.%T.as_type.c69)] +// CHECK:STDOUT: %D.impl_witness.loc10_27.2: = impl_witness %D.impl_witness_table, @T.as_type.as.D.impl(%T.loc10_15.2) [symbolic = %D.impl_witness.loc10_27.2 (constants.%D.impl_witness.8a1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc10_21 as %D.ref { +// CHECK:STDOUT: impl: %.loc10_20 as %D.ref { // CHECK:STDOUT: %D.impl_witness_table = impl_witness_table (), @T.as_type.as.D.impl [concrete] -// CHECK:STDOUT: %D.impl_witness.loc10_28.1: = impl_witness %D.impl_witness_table, @T.as_type.as.D.impl(constants.%T.659) [symbolic = %D.impl_witness.loc10_28.2 (constants.%D.impl_witness.8a1)] +// CHECK:STDOUT: %D.impl_witness.loc10_27.1: = impl_witness %D.impl_witness_table, @T.as_type.as.D.impl(constants.%T.659) [symbolic = %D.impl_witness.loc10_27.2 (constants.%D.impl_witness.8a1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: extend %D.ref -// CHECK:STDOUT: witness = %D.impl_witness.loc10_28.1 +// CHECK:STDOUT: witness = %D.impl_witness.loc10_27.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @RequiresB(%T.loc12_15.2: %B.type) { // CHECK:STDOUT: %T.patt.loc12_15.2: %pattern_type.7b5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt.ca5)] // CHECK:STDOUT: %T.loc12_15.1: %B.type = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T.ed4)] -// CHECK:STDOUT: %T.as_type.loc12_31.1: type = facet_access_type %T.loc12_15.1 [symbolic = %T.as_type.loc12_31.1 (constants.%T.as_type.4de)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc12_31.1 [symbolic = %pattern_type (constants.%pattern_type.c89)] -// CHECK:STDOUT: %x.param_patt.loc12_29.2: @RequiresB.%pattern_type (%pattern_type.c89) = value_param_pattern [symbolic = %x.param_patt.loc12_29.2 (constants.%x.param_patt.1d2)] -// CHECK:STDOUT: %x.patt.loc12_29.2: @RequiresB.%pattern_type (%pattern_type.c89) = at_binding_pattern x, %x.param_patt.loc12_29.2 [symbolic = %x.patt.loc12_29.2 (constants.%x.patt.3a5)] +// CHECK:STDOUT: %T.as_type.loc12_30.1: type = facet_access_type %T.loc12_15.1 [symbolic = %T.as_type.loc12_30.1 (constants.%T.as_type.4de)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc12_30.1 [symbolic = %pattern_type (constants.%pattern_type.c89)] +// CHECK:STDOUT: %x.param_patt.loc12_28.2: @RequiresB.%pattern_type (%pattern_type.c89) = value_param_pattern [symbolic = %x.param_patt.loc12_28.2 (constants.%x.param_patt.1d2)] +// CHECK:STDOUT: %x.patt.loc12_28.2: @RequiresB.%pattern_type (%pattern_type.c89) = at_binding_pattern x, %x.param_patt.loc12_28.2 [symbolic = %x.patt.loc12_28.2 (constants.%x.patt.3a5)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc12_31.1 [symbolic = %require_complete (constants.%require_complete.346)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc12_30.1 [symbolic = %require_complete (constants.%require_complete.346)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @RequiresB.%T.as_type.loc12_31.1 (%T.as_type.4de)) { +// CHECK:STDOUT: fn(%x.param: @RequiresB.%T.as_type.loc12_30.1 (%T.as_type.4de)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -3913,15 +3913,15 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @RequiresD(%T.loc13_15.2: %D.type) { // CHECK:STDOUT: %T.patt.loc13_15.2: %pattern_type.549 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.604)] // CHECK:STDOUT: %T.loc13_15.1: %D.type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T.3dd)] -// CHECK:STDOUT: %T.as_type.loc13_31.1: type = facet_access_type %T.loc13_15.1 [symbolic = %T.as_type.loc13_31.1 (constants.%T.as_type.8cd)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc13_31.1 [symbolic = %pattern_type (constants.%pattern_type.86b)] -// CHECK:STDOUT: %x.param_patt.loc13_29.2: @RequiresD.%pattern_type (%pattern_type.86b) = value_param_pattern [symbolic = %x.param_patt.loc13_29.2 (constants.%x.param_patt.2ab)] -// CHECK:STDOUT: %x.patt.loc13_29.2: @RequiresD.%pattern_type (%pattern_type.86b) = at_binding_pattern x, %x.param_patt.loc13_29.2 [symbolic = %x.patt.loc13_29.2 (constants.%x.patt.a712ca.1)] +// CHECK:STDOUT: %T.as_type.loc13_30.1: type = facet_access_type %T.loc13_15.1 [symbolic = %T.as_type.loc13_30.1 (constants.%T.as_type.8cd)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc13_30.1 [symbolic = %pattern_type (constants.%pattern_type.86b)] +// CHECK:STDOUT: %x.param_patt.loc13_28.2: @RequiresD.%pattern_type (%pattern_type.86b) = value_param_pattern [symbolic = %x.param_patt.loc13_28.2 (constants.%x.param_patt.2ab)] +// CHECK:STDOUT: %x.patt.loc13_28.2: @RequiresD.%pattern_type (%pattern_type.86b) = at_binding_pattern x, %x.param_patt.loc13_28.2 [symbolic = %x.patt.loc13_28.2 (constants.%x.patt.a712ca.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc13_31.1 [symbolic = %require_complete (constants.%require_complete.904)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc13_30.1 [symbolic = %require_complete (constants.%require_complete.904)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @RequiresD.%T.as_type.loc13_31.1 (%T.as_type.8cd)) { +// CHECK:STDOUT: fn(%x.param: @RequiresD.%T.as_type.loc13_30.1 (%T.as_type.8cd)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -3932,30 +3932,30 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @RequiresA(%T.loc15_15.2: %A.type) { // CHECK:STDOUT: %T.patt.loc15_15.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.a4b)] // CHECK:STDOUT: %T.loc15_15.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc15_15.1 (constants.%T.626)] -// CHECK:STDOUT: %T.as_type.loc15_24.1: type = facet_access_type %T.loc15_15.1 [symbolic = %T.as_type.loc15_24.1 (constants.%T.as_type.3b8)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc15_24.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] -// CHECK:STDOUT: %x.param_patt.loc15_22.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc15_22.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc15_22.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc15_22.2 [symbolic = %x.patt.loc15_22.2 (constants.%x.patt.19b9f1.1)] +// CHECK:STDOUT: %T.as_type.loc15_23.1: type = facet_access_type %T.loc15_15.1 [symbolic = %T.as_type.loc15_23.1 (constants.%T.as_type.3b8)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc15_23.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] +// CHECK:STDOUT: %x.param_patt.loc15_21.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc15_21.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc15_21.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc15_21.2 [symbolic = %x.patt.loc15_21.2 (constants.%x.patt.19b9f1.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc15_24.1 [symbolic = %require_complete (constants.%require_complete.94f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc15_23.1 [symbolic = %require_complete (constants.%require_complete.94f)] // CHECK:STDOUT: %.loc16_14.3: require_specific_def_type = require_specific_def @T.as_type.as.B.impl(%T.loc15_15.1) [symbolic = %.loc16_14.3 (constants.%.714)] // CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T.loc15_15.1, @B [symbolic = %B.lookup_impl_witness (constants.%B.lookup_impl_witness)] -// CHECK:STDOUT: %B.facet.loc16_14.3: %B.type = facet_value %T.as_type.loc15_24.1, (%B.lookup_impl_witness) [symbolic = %B.facet.loc16_14.3 (constants.%B.facet.c85)] +// CHECK:STDOUT: %B.facet.loc16_14.3: %B.type = facet_value %T.as_type.loc15_23.1, (%B.lookup_impl_witness) [symbolic = %B.facet.loc16_14.3 (constants.%B.facet.c85)] // CHECK:STDOUT: %RequiresB.specific_fn.loc16_3.2: = specific_function constants.%RequiresB, @RequiresB(%B.facet.loc16_14.3) [symbolic = %RequiresB.specific_fn.loc16_3.2 (constants.%RequiresB.specific_fn)] // CHECK:STDOUT: %impls.loc18 = observe_impls %T.loc15_15.1, constants.%B.type [symbolic = %impls.loc18 (constants.%impls.be1)] // CHECK:STDOUT: %impls.loc19 = observe_impls %T.loc15_15.1, constants.%C.type [symbolic = %impls.loc19 (constants.%impls.86f)] // CHECK:STDOUT: %C.lookup_impl_witness: = lookup_impl_witness %T.loc15_15.1, @C [symbolic = %C.lookup_impl_witness (constants.%C.lookup_impl_witness)] -// CHECK:STDOUT: %C.facet: %C.type = facet_value %T.as_type.loc15_24.1, (%C.lookup_impl_witness) [symbolic = %C.facet (constants.%C.facet.124)] +// CHECK:STDOUT: %C.facet: %C.type = facet_value %T.as_type.loc15_23.1, (%C.lookup_impl_witness) [symbolic = %C.facet (constants.%C.facet.124)] // CHECK:STDOUT: %.loc20_14.3: require_specific_def_type = require_specific_def @T.as_type.as.D.impl(%C.facet) [symbolic = %.loc20_14.3 (constants.%.f88)] // CHECK:STDOUT: %D.lookup_impl_witness: = lookup_impl_witness %T.loc15_15.1, @D [symbolic = %D.lookup_impl_witness (constants.%D.lookup_impl_witness)] -// CHECK:STDOUT: %D.facet.loc20_14.3: %D.type = facet_value %T.as_type.loc15_24.1, (%D.lookup_impl_witness) [symbolic = %D.facet.loc20_14.3 (constants.%D.facet.5cf)] +// CHECK:STDOUT: %D.facet.loc20_14.3: %D.type = facet_value %T.as_type.loc15_23.1, (%D.lookup_impl_witness) [symbolic = %D.facet.loc20_14.3 (constants.%D.facet.5cf)] // CHECK:STDOUT: %RequiresD.specific_fn.loc20_3.2: = specific_function constants.%RequiresD, @RequiresD(%D.facet.loc20_14.3) [symbolic = %RequiresD.specific_fn.loc20_3.2 (constants.%RequiresD.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc15_24.1 (%T.as_type.3b8)) { +// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc15_23.1 (%T.as_type.3b8)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %RequiresB.ref: %RequiresB.type = name_ref RequiresB, file.%RequiresB.decl [concrete = constants.%RequiresB] -// CHECK:STDOUT: %x.ref.loc16: @RequiresA.%T.as_type.loc15_24.1 (%T.as_type.3b8) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc16: @RequiresA.%T.as_type.loc15_23.1 (%T.as_type.3b8) = name_ref x, %x // CHECK:STDOUT: %B.facet.loc16_14.1: %B.type = facet_value constants.%T.as_type.3b8, (constants.%B.lookup_impl_witness) [symbolic = %B.facet.loc16_14.3 (constants.%B.facet.c85)] // CHECK:STDOUT: %.loc16_14.1: %B.type = converted constants.%T.as_type.3b8, %B.facet.loc16_14.1 [symbolic = %B.facet.loc16_14.3 (constants.%B.facet.c85)] // CHECK:STDOUT: %B.facet.loc16_14.2: %B.type = facet_value constants.%T.as_type.3b8, (constants.%B.lookup_impl_witness) [symbolic = %B.facet.loc16_14.3 (constants.%B.facet.c85)] @@ -3964,16 +3964,16 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %RequiresB.call: init %empty_tuple.type = call %RequiresB.specific_fn.loc16_3.1(%x.ref.loc16) // CHECK:STDOUT: %T.ref.loc18: %A.type = name_ref T, %T.loc15_15.2 [symbolic = %T.loc15_15.1 (constants.%T.626)] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %T.as_type.loc18: type = facet_access_type %T.ref.loc18 [symbolic = %T.as_type.loc15_24.1 (constants.%T.as_type.3b8)] -// CHECK:STDOUT: %.loc18: type = converted %T.ref.loc18, %T.as_type.loc18 [symbolic = %T.as_type.loc15_24.1 (constants.%T.as_type.3b8)] +// CHECK:STDOUT: %T.as_type.loc18: type = facet_access_type %T.ref.loc18 [symbolic = %T.as_type.loc15_23.1 (constants.%T.as_type.3b8)] +// CHECK:STDOUT: %.loc18: type = converted %T.ref.loc18, %T.as_type.loc18 [symbolic = %T.as_type.loc15_23.1 (constants.%T.as_type.3b8)] // CHECK:STDOUT: %RequiresA.observe.decl.loc18 = observe_decl @RequiresA.observe.loc18 [concrete] // CHECK:STDOUT: %T.ref.loc19: %A.type = name_ref T, %T.loc15_15.2 [symbolic = %T.loc15_15.1 (constants.%T.626)] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C.type] -// CHECK:STDOUT: %T.as_type.loc19: type = facet_access_type %T.ref.loc19 [symbolic = %T.as_type.loc15_24.1 (constants.%T.as_type.3b8)] -// CHECK:STDOUT: %.loc19: type = converted %T.ref.loc19, %T.as_type.loc19 [symbolic = %T.as_type.loc15_24.1 (constants.%T.as_type.3b8)] +// CHECK:STDOUT: %T.as_type.loc19: type = facet_access_type %T.ref.loc19 [symbolic = %T.as_type.loc15_23.1 (constants.%T.as_type.3b8)] +// CHECK:STDOUT: %.loc19: type = converted %T.ref.loc19, %T.as_type.loc19 [symbolic = %T.as_type.loc15_23.1 (constants.%T.as_type.3b8)] // CHECK:STDOUT: %RequiresA.observe.decl.loc19 = observe_decl @RequiresA.observe.loc19 [concrete] // CHECK:STDOUT: %RequiresD.ref: %RequiresD.type = name_ref RequiresD, file.%RequiresD.decl [concrete = constants.%RequiresD] -// CHECK:STDOUT: %x.ref.loc20: @RequiresA.%T.as_type.loc15_24.1 (%T.as_type.3b8) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc20: @RequiresA.%T.as_type.loc15_23.1 (%T.as_type.3b8) = name_ref x, %x // CHECK:STDOUT: %D.facet.loc20_14.1: %D.type = facet_value constants.%T.as_type.3b8, (constants.%D.lookup_impl_witness) [symbolic = %D.facet.loc20_14.3 (constants.%D.facet.5cf)] // CHECK:STDOUT: %.loc20_14.1: %D.type = converted constants.%T.as_type.3b8, %D.facet.loc20_14.1 [symbolic = %D.facet.loc20_14.3 (constants.%D.facet.5cf)] // CHECK:STDOUT: %D.facet.loc20_14.2: %D.type = facet_value constants.%T.as_type.3b8, (constants.%D.lookup_impl_witness) [symbolic = %D.facet.loc20_14.3 (constants.%D.facet.5cf)] @@ -4011,8 +4011,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @T.as_type.as.B.impl(constants.%T.626) { // CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt.a4b // CHECK:STDOUT: %T.loc8_15.2 => constants.%T.626 -// CHECK:STDOUT: %T.as_type.loc8_21.2 => constants.%T.as_type.3b8 -// CHECK:STDOUT: %B.impl_witness.loc8_28.2 => constants.%B.impl_witness +// CHECK:STDOUT: %T.as_type.loc8_20.2 => constants.%T.as_type.3b8 +// CHECK:STDOUT: %B.impl_witness.loc8_27.2 => constants.%B.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -4024,8 +4024,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @T.as_type.as.C.impl(constants.%T.ed4) { // CHECK:STDOUT: %T.patt.loc9_15.2 => constants.%T.patt.ca5 // CHECK:STDOUT: %T.loc9_15.2 => constants.%T.ed4 -// CHECK:STDOUT: %T.as_type.loc9_21.2 => constants.%T.as_type.4de -// CHECK:STDOUT: %C.impl_witness.loc9_28.2 => constants.%C.impl_witness.9e3 +// CHECK:STDOUT: %T.as_type.loc9_20.2 => constants.%T.as_type.4de +// CHECK:STDOUT: %C.impl_witness.loc9_27.2 => constants.%C.impl_witness.9e3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.WithSelf(constants.%C.facet.355) { @@ -4035,8 +4035,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @T.as_type.as.D.impl(constants.%T.659) { // CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt.ece // CHECK:STDOUT: %T.loc10_15.2 => constants.%T.659 -// CHECK:STDOUT: %T.as_type.loc10_21.2 => constants.%T.as_type.c69 -// CHECK:STDOUT: %D.impl_witness.loc10_28.2 => constants.%D.impl_witness.8a1 +// CHECK:STDOUT: %T.as_type.loc10_20.2 => constants.%T.as_type.c69 +// CHECK:STDOUT: %D.impl_witness.loc10_27.2 => constants.%D.impl_witness.8a1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D.WithSelf(constants.%D.facet.3d0) { @@ -4046,37 +4046,37 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @RequiresB(constants.%T.ed4) { // CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt.ca5 // CHECK:STDOUT: %T.loc12_15.1 => constants.%T.ed4 -// CHECK:STDOUT: %T.as_type.loc12_31.1 => constants.%T.as_type.4de +// CHECK:STDOUT: %T.as_type.loc12_30.1 => constants.%T.as_type.4de // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c89 -// CHECK:STDOUT: %x.param_patt.loc12_29.2 => constants.%x.param_patt.1d2 -// CHECK:STDOUT: %x.patt.loc12_29.2 => constants.%x.patt.3a5 +// CHECK:STDOUT: %x.param_patt.loc12_28.2 => constants.%x.param_patt.1d2 +// CHECK:STDOUT: %x.patt.loc12_28.2 => constants.%x.patt.3a5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @RequiresD(constants.%T.3dd) { // CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt.604 // CHECK:STDOUT: %T.loc13_15.1 => constants.%T.3dd -// CHECK:STDOUT: %T.as_type.loc13_31.1 => constants.%T.as_type.8cd +// CHECK:STDOUT: %T.as_type.loc13_30.1 => constants.%T.as_type.8cd // CHECK:STDOUT: %pattern_type => constants.%pattern_type.86b -// CHECK:STDOUT: %x.param_patt.loc13_29.2 => constants.%x.param_patt.2ab -// CHECK:STDOUT: %x.patt.loc13_29.2 => constants.%x.patt.a712ca.2 +// CHECK:STDOUT: %x.param_patt.loc13_28.2 => constants.%x.param_patt.2ab +// CHECK:STDOUT: %x.patt.loc13_28.2 => constants.%x.patt.a712ca.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @RequiresA(constants.%T.626) { // CHECK:STDOUT: %T.patt.loc15_15.2 => constants.%T.patt.a4b // CHECK:STDOUT: %T.loc15_15.1 => constants.%T.626 -// CHECK:STDOUT: %T.as_type.loc15_24.1 => constants.%T.as_type.3b8 +// CHECK:STDOUT: %T.as_type.loc15_23.1 => constants.%T.as_type.3b8 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e -// CHECK:STDOUT: %x.param_patt.loc15_22.2 => constants.%x.param_patt.241 -// CHECK:STDOUT: %x.patt.loc15_22.2 => constants.%x.patt.19b9f1.1 +// CHECK:STDOUT: %x.param_patt.loc15_21.2 => constants.%x.param_patt.241 +// CHECK:STDOUT: %x.patt.loc15_21.2 => constants.%x.patt.19b9f1.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @RequiresB(constants.%B.facet.c85) { // CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt.ca5 // CHECK:STDOUT: %T.loc12_15.1 => constants.%B.facet.c85 -// CHECK:STDOUT: %T.as_type.loc12_31.1 => constants.%T.as_type.3b8 +// CHECK:STDOUT: %T.as_type.loc12_30.1 => constants.%T.as_type.3b8 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e -// CHECK:STDOUT: %x.param_patt.loc12_29.2 => constants.%x.param_patt.241 -// CHECK:STDOUT: %x.patt.loc12_29.2 => constants.%x.patt.19b9f1.2 +// CHECK:STDOUT: %x.param_patt.loc12_28.2 => constants.%x.param_patt.241 +// CHECK:STDOUT: %x.patt.loc12_28.2 => constants.%x.patt.19b9f1.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.94f @@ -4085,8 +4085,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @T.as_type.as.C.impl(constants.%B.facet.c85) { // CHECK:STDOUT: %T.patt.loc9_15.2 => constants.%T.patt.ca5 // CHECK:STDOUT: %T.loc9_15.2 => constants.%B.facet.c85 -// CHECK:STDOUT: %T.as_type.loc9_21.2 => constants.%T.as_type.3b8 -// CHECK:STDOUT: %C.impl_witness.loc9_28.2 => constants.%C.impl_witness.f05 +// CHECK:STDOUT: %T.as_type.loc9_20.2 => constants.%T.as_type.3b8 +// CHECK:STDOUT: %C.impl_witness.loc9_27.2 => constants.%C.impl_witness.f05 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -4094,8 +4094,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @T.as_type.as.D.impl(constants.%C.facet.124) { // CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt.ece // CHECK:STDOUT: %T.loc10_15.2 => constants.%C.facet.124 -// CHECK:STDOUT: %T.as_type.loc10_21.2 => constants.%T.as_type.3b8 -// CHECK:STDOUT: %D.impl_witness.loc10_28.2 => constants.%D.impl_witness.049 +// CHECK:STDOUT: %T.as_type.loc10_20.2 => constants.%T.as_type.3b8 +// CHECK:STDOUT: %D.impl_witness.loc10_27.2 => constants.%D.impl_witness.049 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -4103,10 +4103,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @RequiresD(constants.%D.facet.5cf) { // CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt.604 // CHECK:STDOUT: %T.loc13_15.1 => constants.%D.facet.5cf -// CHECK:STDOUT: %T.as_type.loc13_31.1 => constants.%T.as_type.3b8 +// CHECK:STDOUT: %T.as_type.loc13_30.1 => constants.%T.as_type.3b8 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e -// CHECK:STDOUT: %x.param_patt.loc13_29.2 => constants.%x.param_patt.241 -// CHECK:STDOUT: %x.patt.loc13_29.2 => constants.%x.patt.19b9f1.2 +// CHECK:STDOUT: %x.param_patt.loc13_28.2 => constants.%x.param_patt.241 +// CHECK:STDOUT: %x.patt.loc13_28.2 => constants.%x.patt.19b9f1.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.94f @@ -4169,48 +4169,48 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %B.decl: type = interface_decl @B [concrete = constants.%B.type] {} {} // CHECK:STDOUT: %RequiresA.decl: %RequiresA.type = fn_decl @RequiresA [concrete = constants.%RequiresA] { // CHECK:STDOUT: %T.patt.loc6_15.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc6_29.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_29.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc6_29.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_29.1 [symbolic = %x.patt.loc6_29.2 (constants.%x.patt.19b)] +// CHECK:STDOUT: %x.param_patt.loc6_28.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_28.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc6_28.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_28.1 [symbolic = %x.patt.loc6_28.2 (constants.%x.patt.19b)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_18: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc6_17: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_15.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.2 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc6_30.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc6_30.1: type = splice_block %.loc6_30.2 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_31.2: type = converted %T.ref, %T.as_type.loc6_31.2 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_30.2: type = converted %T.ref, %T.as_type.loc6_30.2 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc6_30.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.loc7_7.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc7_14.1: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_14.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc7_13.1: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_13.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_10: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc7_9: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen.loc7_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_7.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.2 [concrete = constants.%B_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc7_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc7_17.1: type = splice_block %.loc7_17.2 [concrete = constants.%B_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc7_13: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %.Self.frozen.loc7_19: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.f7e] +// CHECK:STDOUT: %.Self.frozen.loc7_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.loc7_25.1: %B.type = name_ref .Self, %.Self.frozen.loc7_19 [symbolic_self = constants.%.Self.frozen.f7e] +// CHECK:STDOUT: %.Self.ref.loc7_23.1: %B.type = name_ref .Self, %.Self.frozen.loc7_17 [symbolic_self = constants.%.Self.frozen.f7e] // CHECK:STDOUT: %T.ref.loc7: %A.type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %equiv.loc7_31.1 = requirement_equivalent %.Self.ref.loc7_25.1, %T.ref.loc7 [concrete] +// CHECK:STDOUT: %equiv.loc7_29.1 = requirement_equivalent %.Self.ref.loc7_23.1, %T.ref.loc7 [concrete] // CHECK:STDOUT: %.Self: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc7_25.2: %B.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %equiv.loc7_31.2 = requirement_equivalent %.Self.ref.loc7_25.2, %T.ref.loc7 [concrete] -// CHECK:STDOUT: %.loc7_19.2: type = where_expr [concrete = constants.%B_where.type] { +// CHECK:STDOUT: %.Self.ref.loc7_23.2: %B.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %equiv.loc7_29.2 = requirement_equivalent %.Self.ref.loc7_23.2, %T.ref.loc7 [concrete] +// CHECK:STDOUT: %.loc7_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.loc7_31.2 = requirement_equivalent %.Self.ref.loc7_25.2, %T.ref.loc7 [concrete] +// CHECK:STDOUT: %equiv.loc7_29.2 = requirement_equivalent %.Self.ref.loc7_23.2, %T.ref.loc7 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc7_14.2: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_14.1 (constants.%U)] +// CHECK:STDOUT: %U.loc7_13.2: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_13.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -4243,15 +4243,15 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @RequiresA(%T.loc6_15.2: %A.type) { // CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_15.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_31.1: type = facet_access_type %T.loc6_15.1 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_31.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] -// CHECK:STDOUT: %x.param_patt.loc6_29.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_29.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc6_29.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_29.2 [symbolic = %x.patt.loc6_29.2 (constants.%x.patt.19b)] +// CHECK:STDOUT: %T.as_type.loc6_30.1: type = facet_access_type %T.loc6_15.1 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_30.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] +// CHECK:STDOUT: %x.param_patt.loc6_28.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_28.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc6_28.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_28.2 [symbolic = %x.patt.loc6_28.2 (constants.%x.patt.19b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_31.1 [symbolic = %require_complete (constants.%require_complete.94f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_30.1 [symbolic = %require_complete (constants.%require_complete.94f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc6_30.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -4259,23 +4259,23 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %A.type, %U.loc7_14.2: %B_where.type) { +// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %A.type, %U.loc7_13.2: %B_where.type) { // CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc7_7.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc7_14.2: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc7_14.1: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_14.1 (constants.%U)] +// CHECK:STDOUT: %U.patt.loc7_13.2: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_13.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc7_13.1: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_13.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %U.as_type.loc8_16.2: type = facet_access_type %U.loc7_14.1 [symbolic = %U.as_type.loc8_16.2 (constants.%U.as_type)] +// CHECK:STDOUT: %U.as_type.loc8_16.2: type = facet_access_type %U.loc7_13.1 [symbolic = %U.as_type.loc8_16.2 (constants.%U.as_type)] // CHECK:STDOUT: %T.as_type.loc8_11.2: type = facet_access_type %T.loc7_7.1 [symbolic = %T.as_type.loc8_11.2 (constants.%T.as_type)] -// CHECK:STDOUT: %eq = observe_equivalent %T.loc7_7.1, %U.loc7_14.1 [symbolic = %eq (constants.%eq)] -// CHECK:STDOUT: %InnerF.type: type = fn_type @InnerF, @F(%T.loc7_7.1, %U.loc7_14.1) [symbolic = %InnerF.type (constants.%InnerF.type)] +// CHECK:STDOUT: %eq = observe_equivalent %T.loc7_7.1, %U.loc7_13.1 [symbolic = %eq (constants.%eq)] +// CHECK:STDOUT: %InnerF.type: type = fn_type @InnerF, @F(%T.loc7_7.1, %U.loc7_13.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.loc8: %A.type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, %U.loc7_14.2 [symbolic = %U.loc7_14.1 (constants.%U)] +// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, %U.loc7_13.2 [symbolic = %U.loc7_13.1 (constants.%U)] // CHECK:STDOUT: %U.as_type.loc8_16.1: type = facet_access_type %U.ref [symbolic = %U.as_type.loc8_16.2 (constants.%U.as_type)] // CHECK:STDOUT: %.loc8_16: type = converted %U.ref, %U.as_type.loc8_16.1 [symbolic = %U.as_type.loc8_16.2 (constants.%U.as_type)] // CHECK:STDOUT: %T.as_type.loc8_11.1: type = facet_access_type %T.ref.loc8 [symbolic = %T.as_type.loc8_11.2 (constants.%T.as_type)] @@ -4287,7 +4287,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: @InnerF.%U.as_type.loc10_16.1 (%U.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc10_16.1: type = splice_block %.loc10_16.2 [symbolic = %U.as_type.loc10_16.1 (constants.%U.as_type)] { -// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, @F.%U.loc7_14.2 [symbolic = %U (constants.%U)] +// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, @F.%U.loc7_13.2 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %U.as_type.loc10_16.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc10_16.1 (constants.%U.as_type)] // CHECK:STDOUT: %.loc10_16.2: type = converted %U.ref, %U.as_type.loc10_16.2 [symbolic = %U.as_type.loc10_16.1 (constants.%U.as_type)] // CHECK:STDOUT: } @@ -4302,7 +4302,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @InnerF(@F.%T.loc7_7.2: %A.type, @F.%U.loc7_14.2: %B_where.type) { +// CHECK:STDOUT: generic fn @InnerF(@F.%T.loc7_7.2: %A.type, @F.%U.loc7_13.2: %B_where.type) { // CHECK:STDOUT: %U: %B_where.type = symbolic_binding U, 1 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %U.as_type.loc10_16.1: type = facet_access_type %U [symbolic = %U.as_type.loc10_16.1 (constants.%U.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc10_16.1 [symbolic = %pattern_type (constants.%pattern_type.d51)] @@ -4334,17 +4334,17 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @RequiresA(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_15.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc6_31.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc6_30.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e -// CHECK:STDOUT: %x.param_patt.loc6_29.2 => constants.%x.param_patt.241 -// CHECK:STDOUT: %x.patt.loc6_29.2 => constants.%x.patt.19b +// CHECK:STDOUT: %x.param_patt.loc6_28.2 => constants.%x.param_patt.241 +// CHECK:STDOUT: %x.patt.loc6_28.2 => constants.%x.patt.19b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_7.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc7_14.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc7_14.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc7_13.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc7_13.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @InnerF(constants.%T, constants.%U) { @@ -4412,48 +4412,48 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %B.decl: type = interface_decl @B [concrete = constants.%B.type] {} {} // CHECK:STDOUT: %RequiresA.decl: %RequiresA.type = fn_decl @RequiresA [concrete = constants.%RequiresA] { // CHECK:STDOUT: %T.patt.loc6_15.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc6_29.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_29.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc6_29.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_29.1 [symbolic = %x.patt.loc6_29.2 (constants.%x.patt.19b)] +// CHECK:STDOUT: %x.param_patt.loc6_28.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_28.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc6_28.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_28.1 [symbolic = %x.patt.loc6_28.2 (constants.%x.patt.19b)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_18: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc6_17: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_15.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.2 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc6_30.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc6_30.1: type = splice_block %.loc6_30.2 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_31.2: type = converted %T.ref, %T.as_type.loc6_31.2 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_30.2: type = converted %T.ref, %T.as_type.loc6_30.2 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc6_30.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.loc7_7.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc7_14.1: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_14.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc7_13.1: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_13.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_10: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc7_9: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen.loc7_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_7.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.2 [concrete = constants.%B_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc7_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc7_17.1: type = splice_block %.loc7_17.2 [concrete = constants.%B_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc7_13: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %.Self.frozen.loc7_19: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.f7e] +// CHECK:STDOUT: %.Self.frozen.loc7_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.loc7_25.1: %B.type = name_ref .Self, %.Self.frozen.loc7_19 [symbolic_self = constants.%.Self.frozen.f7e] +// CHECK:STDOUT: %.Self.ref.loc7_23.1: %B.type = name_ref .Self, %.Self.frozen.loc7_17 [symbolic_self = constants.%.Self.frozen.f7e] // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %equiv.loc7_31.1 = requirement_equivalent %.Self.ref.loc7_25.1, %T.ref [concrete] +// CHECK:STDOUT: %equiv.loc7_29.1 = requirement_equivalent %.Self.ref.loc7_23.1, %T.ref [concrete] // CHECK:STDOUT: %.Self: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc7_25.2: %B.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %equiv.loc7_31.2 = requirement_equivalent %.Self.ref.loc7_25.2, %T.ref [concrete] -// CHECK:STDOUT: %.loc7_19.2: type = where_expr [concrete = constants.%B_where.type] { +// CHECK:STDOUT: %.Self.ref.loc7_23.2: %B.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %equiv.loc7_29.2 = requirement_equivalent %.Self.ref.loc7_23.2, %T.ref [concrete] +// CHECK:STDOUT: %.loc7_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.loc7_31.2 = requirement_equivalent %.Self.ref.loc7_25.2, %T.ref [concrete] +// CHECK:STDOUT: %equiv.loc7_29.2 = requirement_equivalent %.Self.ref.loc7_23.2, %T.ref [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc7_14.2: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_14.1 (constants.%U)] +// CHECK:STDOUT: %U.loc7_13.2: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_13.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -4486,15 +4486,15 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @RequiresA(%T.loc6_15.2: %A.type) { // CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_15.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_31.1: type = facet_access_type %T.loc6_15.1 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_31.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] -// CHECK:STDOUT: %x.param_patt.loc6_29.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_29.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc6_29.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_29.2 [symbolic = %x.patt.loc6_29.2 (constants.%x.patt.19b)] +// CHECK:STDOUT: %T.as_type.loc6_30.1: type = facet_access_type %T.loc6_15.1 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_30.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] +// CHECK:STDOUT: %x.param_patt.loc6_28.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_28.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc6_28.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_28.2 [symbolic = %x.patt.loc6_28.2 (constants.%x.patt.19b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_31.1 [symbolic = %require_complete (constants.%require_complete.94f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_30.1 [symbolic = %require_complete (constants.%require_complete.94f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc6_30.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -4502,14 +4502,14 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %A.type, %U.loc7_14.2: %B_where.type) { +// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %A.type, %U.loc7_13.2: %B_where.type) { // CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc7_7.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc7_14.2: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc7_14.1: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_14.1 (constants.%U)] +// CHECK:STDOUT: %U.patt.loc7_13.2: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_13.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc7_13.1: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_13.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %InnerF.type: type = fn_type @InnerF, @F(%T.loc7_7.1, %U.loc7_14.1) [symbolic = %InnerF.type (constants.%InnerF.type)] +// CHECK:STDOUT: %InnerF.type: type = fn_type @InnerF, @F(%T.loc7_7.1, %U.loc7_13.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() { @@ -4520,7 +4520,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: @InnerF.%U.as_type.loc9_16.1 (%U.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc9_16.1: type = splice_block %.loc9_16.2 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] { -// CHECK:STDOUT: %U.ref.loc9: %B_where.type = name_ref U, @F.%U.loc7_14.2 [symbolic = %U (constants.%U)] +// CHECK:STDOUT: %U.ref.loc9: %B_where.type = name_ref U, @F.%U.loc7_13.2 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %U.as_type.loc9_16.2: type = facet_access_type %U.ref.loc9 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] // CHECK:STDOUT: %.loc9_16.2: type = converted %U.ref.loc9, %U.as_type.loc9_16.2 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] // CHECK:STDOUT: } @@ -4532,7 +4532,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @InnerF(@F.%T.loc7_7.2: %A.type, @F.%U.loc7_14.2: %B_where.type) { +// CHECK:STDOUT: generic fn @InnerF(@F.%T.loc7_7.2: %A.type, @F.%U.loc7_13.2: %B_where.type) { // CHECK:STDOUT: %U: %B_where.type = symbolic_binding U, 1 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %U.as_type.loc9_16.1: type = facet_access_type %U [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc9_16.1 [symbolic = %pattern_type (constants.%pattern_type.d51)] @@ -4548,7 +4548,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: fn(%x.param: @InnerF.%U.as_type.loc9_16.1 (%U.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: %A.type = name_ref T, @F.%T.loc7_7.2 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %U.ref.loc10: %B_where.type = name_ref U, @F.%U.loc7_14.2 [symbolic = %U (constants.%U)] +// CHECK:STDOUT: %U.ref.loc10: %B_where.type = name_ref U, @F.%U.loc7_13.2 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %U.as_type.loc10: type = facet_access_type %U.ref.loc10 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] // CHECK:STDOUT: %.loc10_18: type = converted %U.ref.loc10, %U.as_type.loc10 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] // CHECK:STDOUT: %T.as_type.loc10_13.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc10_13.2 (constants.%T.as_type)] @@ -4577,17 +4577,17 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @RequiresA(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_15.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc6_31.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc6_30.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e -// CHECK:STDOUT: %x.param_patt.loc6_29.2 => constants.%x.param_patt.241 -// CHECK:STDOUT: %x.patt.loc6_29.2 => constants.%x.patt.19b +// CHECK:STDOUT: %x.param_patt.loc6_28.2 => constants.%x.param_patt.241 +// CHECK:STDOUT: %x.patt.loc6_28.2 => constants.%x.patt.19b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_7.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc7_14.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc7_14.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc7_13.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc7_13.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @InnerF(constants.%T, constants.%U) { @@ -4655,48 +4655,48 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %B.decl: type = interface_decl @B [concrete = constants.%B.type] {} {} // CHECK:STDOUT: %RequiresA.decl: %RequiresA.type = fn_decl @RequiresA [concrete = constants.%RequiresA] { // CHECK:STDOUT: %T.patt.loc6_15.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc6_29.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_29.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc6_29.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_29.1 [symbolic = %x.patt.loc6_29.2 (constants.%x.patt.19b)] +// CHECK:STDOUT: %x.param_patt.loc6_28.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_28.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc6_28.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_28.1 [symbolic = %x.patt.loc6_28.2 (constants.%x.patt.19b)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_18: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc6_17: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_15.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.2 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc6_30.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc6_30.1: type = splice_block %.loc6_30.2 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_31.2: type = converted %T.ref, %T.as_type.loc6_31.2 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_30.2: type = converted %T.ref, %T.as_type.loc6_30.2 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc6_30.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.loc7_7.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc7_14.1: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_14.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc7_13.1: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_13.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_10: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc7_9: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen.loc7_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_7.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.2 [concrete = constants.%B_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc7_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc7_17.1: type = splice_block %.loc7_17.2 [concrete = constants.%B_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc7_13: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %.Self.frozen.loc7_19: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.f7e] +// CHECK:STDOUT: %.Self.frozen.loc7_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.loc7_25.1: %B.type = name_ref .Self, %.Self.frozen.loc7_19 [symbolic_self = constants.%.Self.frozen.f7e] +// CHECK:STDOUT: %.Self.ref.loc7_23.1: %B.type = name_ref .Self, %.Self.frozen.loc7_17 [symbolic_self = constants.%.Self.frozen.f7e] // CHECK:STDOUT: %T.ref.loc7: %A.type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %equiv.loc7_31.1 = requirement_equivalent %.Self.ref.loc7_25.1, %T.ref.loc7 [concrete] +// CHECK:STDOUT: %equiv.loc7_29.1 = requirement_equivalent %.Self.ref.loc7_23.1, %T.ref.loc7 [concrete] // CHECK:STDOUT: %.Self: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc7_25.2: %B.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %equiv.loc7_31.2 = requirement_equivalent %.Self.ref.loc7_25.2, %T.ref.loc7 [concrete] -// CHECK:STDOUT: %.loc7_19.2: type = where_expr [concrete = constants.%B_where.type] { +// CHECK:STDOUT: %.Self.ref.loc7_23.2: %B.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %equiv.loc7_29.2 = requirement_equivalent %.Self.ref.loc7_23.2, %T.ref.loc7 [concrete] +// CHECK:STDOUT: %.loc7_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.loc7_31.2 = requirement_equivalent %.Self.ref.loc7_25.2, %T.ref.loc7 [concrete] +// CHECK:STDOUT: %equiv.loc7_29.2 = requirement_equivalent %.Self.ref.loc7_23.2, %T.ref.loc7 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc7_14.2: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_14.1 (constants.%U)] +// CHECK:STDOUT: %U.loc7_13.2: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_13.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -4729,15 +4729,15 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @RequiresA(%T.loc6_15.2: %A.type) { // CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_15.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_31.1: type = facet_access_type %T.loc6_15.1 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_31.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] -// CHECK:STDOUT: %x.param_patt.loc6_29.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_29.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc6_29.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_29.2 [symbolic = %x.patt.loc6_29.2 (constants.%x.patt.19b)] +// CHECK:STDOUT: %T.as_type.loc6_30.1: type = facet_access_type %T.loc6_15.1 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_30.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] +// CHECK:STDOUT: %x.param_patt.loc6_28.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_28.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc6_28.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_28.2 [symbolic = %x.patt.loc6_28.2 (constants.%x.patt.19b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_31.1 [symbolic = %require_complete (constants.%require_complete.94f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_30.1 [symbolic = %require_complete (constants.%require_complete.94f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc6_30.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -4745,18 +4745,18 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %A.type, %U.loc7_14.2: %B_where.type) { +// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %A.type, %U.loc7_13.2: %B_where.type) { // CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc7_7.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc7_14.2: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc7_14.1: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_14.1 (constants.%U)] +// CHECK:STDOUT: %U.patt.loc7_13.2: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_13.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc7_13.1: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_13.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %InnerF.type: type = fn_type @InnerF, @F(%T.loc7_7.1, %U.loc7_14.1) [symbolic = %InnerF.type (constants.%InnerF.type)] +// CHECK:STDOUT: %InnerF.type: type = fn_type @InnerF, @F(%T.loc7_7.1, %U.loc7_13.1) [symbolic = %InnerF.type (constants.%InnerF.type)] // CHECK:STDOUT: %InnerF: @F.%InnerF.type (%InnerF.type) = struct_value () [symbolic = %InnerF (constants.%InnerF)] -// CHECK:STDOUT: %U.as_type.loc20_16.2: type = facet_access_type %U.loc7_14.1 [symbolic = %U.as_type.loc20_16.2 (constants.%U.as_type)] +// CHECK:STDOUT: %U.as_type.loc20_16.2: type = facet_access_type %U.loc7_13.1 [symbolic = %U.as_type.loc20_16.2 (constants.%U.as_type)] // CHECK:STDOUT: %T.as_type.loc20_11.2: type = facet_access_type %T.loc7_7.1 [symbolic = %T.as_type.loc20_11.2 (constants.%T.as_type)] -// CHECK:STDOUT: %eq = observe_equivalent %T.loc7_7.1, %U.loc7_14.1 [symbolic = %eq (constants.%eq)] +// CHECK:STDOUT: %eq = observe_equivalent %T.loc7_7.1, %U.loc7_13.1 [symbolic = %eq (constants.%eq)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -4766,14 +4766,14 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: @InnerF.%U.as_type.loc9_16.1 (%U.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc9_16.1: type = splice_block %.loc9_16.2 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] { -// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, @F.%U.loc7_14.2 [symbolic = %U (constants.%U)] +// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, @F.%U.loc7_13.2 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %U.as_type.loc9_16.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] // CHECK:STDOUT: %.loc9_16.2: type = converted %U.ref, %U.as_type.loc9_16.2 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @InnerF.%U.as_type.loc9_16.1 (%U.as_type) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %T.ref.loc20: %A.type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, %U.loc7_14.2 [symbolic = %U.loc7_14.1 (constants.%U)] +// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, %U.loc7_13.2 [symbolic = %U.loc7_13.1 (constants.%U)] // CHECK:STDOUT: %U.as_type.loc20_16.1: type = facet_access_type %U.ref [symbolic = %U.as_type.loc20_16.2 (constants.%U.as_type)] // CHECK:STDOUT: %.loc20_16: type = converted %U.ref, %U.as_type.loc20_16.1 [symbolic = %U.as_type.loc20_16.2 (constants.%U.as_type)] // CHECK:STDOUT: %T.as_type.loc20_11.1: type = facet_access_type %T.ref.loc20 [symbolic = %T.as_type.loc20_11.2 (constants.%T.as_type)] @@ -4788,7 +4788,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @InnerF(@F.%T.loc7_7.2: %A.type, @F.%U.loc7_14.2: %B_where.type) { +// CHECK:STDOUT: generic fn @InnerF(@F.%T.loc7_7.2: %A.type, @F.%U.loc7_13.2: %B_where.type) { // CHECK:STDOUT: %U: %B_where.type = symbolic_binding U, 1 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %U.as_type.loc9_16.1: type = facet_access_type %U [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc9_16.1 [symbolic = %pattern_type (constants.%pattern_type.d51)] @@ -4820,17 +4820,17 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @RequiresA(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_15.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc6_31.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc6_30.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e -// CHECK:STDOUT: %x.param_patt.loc6_29.2 => constants.%x.param_patt.241 -// CHECK:STDOUT: %x.patt.loc6_29.2 => constants.%x.patt.19b +// CHECK:STDOUT: %x.param_patt.loc6_28.2 => constants.%x.param_patt.241 +// CHECK:STDOUT: %x.patt.loc6_28.2 => constants.%x.patt.19b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_7.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc7_14.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc7_14.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc7_13.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc7_13.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @InnerF(constants.%T, constants.%U) { @@ -4898,57 +4898,57 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %B.decl: type = interface_decl @B [concrete = constants.%B.type] {} {} // CHECK:STDOUT: %RequiresA.decl: %RequiresA.type = fn_decl @RequiresA [concrete = constants.%RequiresA] { // CHECK:STDOUT: %T.patt.loc6_15.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc6_29.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_29.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc6_29.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_29.1 [symbolic = %x.patt.loc6_29.2 (constants.%x.patt.19b)] +// CHECK:STDOUT: %x.param_patt.loc6_28.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_28.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc6_28.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_28.1 [symbolic = %x.patt.loc6_28.2 (constants.%x.patt.19b)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_18: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc6_17: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_15.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.2 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc6_30.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc6_30.1: type = splice_block %.loc6_30.2 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_31.2: type = converted %T.ref, %T.as_type.loc6_31.2 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_30.2: type = converted %T.ref, %T.as_type.loc6_30.2 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc6_30.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.loc7_7.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc7_14.1: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %x.param_patt.loc7_38.1: @F.%pattern_type (%pattern_type.d51) = value_param_pattern [symbolic = %x.param_patt.loc7_38.2 (constants.%x.param_patt.fbe)] -// CHECK:STDOUT: %x.patt.loc7_38.1: @F.%pattern_type (%pattern_type.d51) = at_binding_pattern x, %x.param_patt.loc7_38.1 [symbolic = %x.patt.loc7_38.2 (constants.%x.patt.cdb)] +// CHECK:STDOUT: %U.patt.loc7_13.1: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_13.2 (constants.%U.patt)] +// CHECK:STDOUT: %x.param_patt.loc7_36.1: @F.%pattern_type (%pattern_type.d51) = value_param_pattern [symbolic = %x.param_patt.loc7_36.2 (constants.%x.param_patt.fbe)] +// CHECK:STDOUT: %x.patt.loc7_36.1: @F.%pattern_type (%pattern_type.d51) = at_binding_pattern x, %x.param_patt.loc7_36.1 [symbolic = %x.patt.loc7_36.2 (constants.%x.patt.cdb)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_10: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc7_9: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen.loc7_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_7.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.2 [concrete = constants.%B_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc7_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc7_17.1: type = splice_block %.loc7_17.2 [concrete = constants.%B_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc7_13: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %.Self.frozen.loc7_19: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.f7e] +// CHECK:STDOUT: %.Self.frozen.loc7_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.loc7_25.1: %B.type = name_ref .Self, %.Self.frozen.loc7_19 [symbolic_self = constants.%.Self.frozen.f7e] +// CHECK:STDOUT: %.Self.ref.loc7_23.1: %B.type = name_ref .Self, %.Self.frozen.loc7_17 [symbolic_self = constants.%.Self.frozen.f7e] // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %equiv.loc7_31.1 = requirement_equivalent %.Self.ref.loc7_25.1, %T.ref [concrete] +// CHECK:STDOUT: %equiv.loc7_29.1 = requirement_equivalent %.Self.ref.loc7_23.1, %T.ref [concrete] // CHECK:STDOUT: %.Self: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc7_25.2: %B.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %equiv.loc7_31.2 = requirement_equivalent %.Self.ref.loc7_25.2, %T.ref [concrete] -// CHECK:STDOUT: %.loc7_19.2: type = where_expr [concrete = constants.%B_where.type] { +// CHECK:STDOUT: %.Self.ref.loc7_23.2: %B.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %equiv.loc7_29.2 = requirement_equivalent %.Self.ref.loc7_23.2, %T.ref [concrete] +// CHECK:STDOUT: %.loc7_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.loc7_31.2 = requirement_equivalent %.Self.ref.loc7_25.2, %T.ref [concrete] +// CHECK:STDOUT: %equiv.loc7_29.2 = requirement_equivalent %.Self.ref.loc7_23.2, %T.ref [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc7_14.2: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_14.1 (constants.%U)] -// CHECK:STDOUT: %x.param: @F.%U.as_type.loc7_40.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc7_40.1: type = splice_block %.loc7_40.2 [symbolic = %U.as_type.loc7_40.1 (constants.%U.as_type)] { -// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, %U.loc7_14.2 [symbolic = %U.loc7_14.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc7_40.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc7_40.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc7_40.2: type = converted %U.ref, %U.as_type.loc7_40.2 [symbolic = %U.as_type.loc7_40.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.loc7_13.2: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_13.1 (constants.%U)] +// CHECK:STDOUT: %x.param: @F.%U.as_type.loc7_38.1 (%U.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc7_38.1: type = splice_block %.loc7_38.2 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type)] { +// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, %U.loc7_13.2 [symbolic = %U.loc7_13.1 (constants.%U)] +// CHECK:STDOUT: %U.as_type.loc7_38.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc7_38.2: type = converted %U.ref, %U.as_type.loc7_38.2 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%U.as_type.loc7_40.1 (%U.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @F.%U.as_type.loc7_38.1 (%U.as_type) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -4981,15 +4981,15 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @RequiresA(%T.loc6_15.2: %A.type) { // CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_15.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_31.1: type = facet_access_type %T.loc6_15.1 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_31.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] -// CHECK:STDOUT: %x.param_patt.loc6_29.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_29.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc6_29.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_29.2 [symbolic = %x.patt.loc6_29.2 (constants.%x.patt.19b)] +// CHECK:STDOUT: %T.as_type.loc6_30.1: type = facet_access_type %T.loc6_15.1 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_30.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] +// CHECK:STDOUT: %x.param_patt.loc6_28.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_28.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc6_28.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_28.2 [symbolic = %x.patt.loc6_28.2 (constants.%x.patt.19b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_31.1 [symbolic = %require_complete (constants.%require_complete.94f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_30.1 [symbolic = %require_complete (constants.%require_complete.94f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc6_30.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -4997,22 +4997,22 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %A.type, %U.loc7_14.2: %B_where.type) { +// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %A.type, %U.loc7_13.2: %B_where.type) { // CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc7_7.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc7_14.2: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc7_14.1: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_14.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc7_40.1: type = facet_access_type %U.loc7_14.1 [symbolic = %U.as_type.loc7_40.1 (constants.%U.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc7_40.1 [symbolic = %pattern_type (constants.%pattern_type.d51)] -// CHECK:STDOUT: %x.param_patt.loc7_38.2: @F.%pattern_type (%pattern_type.d51) = value_param_pattern [symbolic = %x.param_patt.loc7_38.2 (constants.%x.param_patt.fbe)] -// CHECK:STDOUT: %x.patt.loc7_38.2: @F.%pattern_type (%pattern_type.d51) = at_binding_pattern x, %x.param_patt.loc7_38.2 [symbolic = %x.patt.loc7_38.2 (constants.%x.patt.cdb)] +// CHECK:STDOUT: %U.patt.loc7_13.2: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_13.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc7_13.1: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_13.1 (constants.%U)] +// CHECK:STDOUT: %U.as_type.loc7_38.1: type = facet_access_type %U.loc7_13.1 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc7_38.1 [symbolic = %pattern_type (constants.%pattern_type.d51)] +// CHECK:STDOUT: %x.param_patt.loc7_36.2: @F.%pattern_type (%pattern_type.d51) = value_param_pattern [symbolic = %x.param_patt.loc7_36.2 (constants.%x.param_patt.fbe)] +// CHECK:STDOUT: %x.patt.loc7_36.2: @F.%pattern_type (%pattern_type.d51) = at_binding_pattern x, %x.param_patt.loc7_36.2 [symbolic = %x.patt.loc7_36.2 (constants.%x.patt.cdb)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc7_40.1 [symbolic = %require_complete (constants.%require_complete.963)] -// CHECK:STDOUT: %InnerF.type: type = fn_type @InnerF, @F(%T.loc7_7.1, %U.loc7_14.1) [symbolic = %InnerF.type (constants.%InnerF.type)] +// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc7_38.1 [symbolic = %require_complete (constants.%require_complete.963)] +// CHECK:STDOUT: %InnerF.type: type = fn_type @InnerF, @F(%T.loc7_7.1, %U.loc7_13.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(%x.param: @F.%U.as_type.loc7_40.1 (%U.as_type)) { +// CHECK:STDOUT: fn(%x.param: @F.%U.as_type.loc7_38.1 (%U.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %InnerF.decl: @F.%InnerF.type (%InnerF.type) = fn_decl @InnerF [symbolic = @F.%InnerF (constants.%InnerF)] { // CHECK:STDOUT: %x.param_patt.loc9_21.1: @InnerF.%pattern_type (%pattern_type.d51) = value_param_pattern [symbolic = %x.param_patt.loc9_21.2 (constants.%x.param_patt.fbe)] @@ -5020,14 +5020,14 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } { // CHECK:STDOUT: %x.param: @InnerF.%U.as_type.loc9_23.1 (%U.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.2 [symbolic = %U.as_type.loc9_23.1 (constants.%U.as_type)] { -// CHECK:STDOUT: %U.ref.loc9: %B_where.type = name_ref U, @F.%U.loc7_14.2 [symbolic = %U (constants.%U)] +// CHECK:STDOUT: %U.ref.loc9: %B_where.type = name_ref U, @F.%U.loc7_13.2 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %U.as_type.loc9_23.2: type = facet_access_type %U.ref.loc9 [symbolic = %U.as_type.loc9_23.1 (constants.%U.as_type)] // CHECK:STDOUT: %.loc9_23.2: type = converted %U.ref.loc9, %U.as_type.loc9_23.2 [symbolic = %U.as_type.loc9_23.1 (constants.%U.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @InnerF.%U.as_type.loc9_23.1 (%U.as_type) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %RequiresA.ref: %RequiresA.type = name_ref RequiresA, file.%RequiresA.decl [concrete = constants.%RequiresA] -// CHECK:STDOUT: %x.ref: @F.%U.as_type.loc7_40.1 (%U.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @F.%U.as_type.loc7_38.1 (%U.as_type) = name_ref x, %x // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete = constants.%B.type] // CHECK:STDOUT: return // CHECK:STDOUT: @@ -5035,7 +5035,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @InnerF(@F.%T.loc7_7.2: %A.type, @F.%U.loc7_14.2: %B_where.type) { +// CHECK:STDOUT: generic fn @InnerF(@F.%T.loc7_7.2: %A.type, @F.%U.loc7_13.2: %B_where.type) { // CHECK:STDOUT: %U: %B_where.type = symbolic_binding U, 1 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %U.as_type.loc9_23.1: type = facet_access_type %U [symbolic = %U.as_type.loc9_23.1 (constants.%U.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc9_23.1 [symbolic = %pattern_type (constants.%pattern_type.d51)] @@ -5051,7 +5051,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: fn(%x.param: @InnerF.%U.as_type.loc9_23.1 (%U.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: %A.type = name_ref T, @F.%T.loc7_7.2 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %U.ref.loc10: %B_where.type = name_ref U, @F.%U.loc7_14.2 [symbolic = %U (constants.%U)] +// CHECK:STDOUT: %U.ref.loc10: %B_where.type = name_ref U, @F.%U.loc7_13.2 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %U.as_type.loc10: type = facet_access_type %U.ref.loc10 [symbolic = %U.as_type.loc9_23.1 (constants.%U.as_type)] // CHECK:STDOUT: %.loc10_18: type = converted %U.ref.loc10, %U.as_type.loc10 [symbolic = %U.as_type.loc9_23.1 (constants.%U.as_type)] // CHECK:STDOUT: %T.as_type.loc10_13.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc10_13.2 (constants.%T.as_type)] @@ -5077,21 +5077,21 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @RequiresA(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_15.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc6_31.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc6_30.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e -// CHECK:STDOUT: %x.param_patt.loc6_29.2 => constants.%x.param_patt.241 -// CHECK:STDOUT: %x.patt.loc6_29.2 => constants.%x.patt.19b +// CHECK:STDOUT: %x.param_patt.loc6_28.2 => constants.%x.param_patt.241 +// CHECK:STDOUT: %x.patt.loc6_28.2 => constants.%x.patt.19b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_7.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc7_14.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc7_14.1 => constants.%U -// CHECK:STDOUT: %U.as_type.loc7_40.1 => constants.%U.as_type +// CHECK:STDOUT: %U.patt.loc7_13.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc7_13.1 => constants.%U +// CHECK:STDOUT: %U.as_type.loc7_38.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d51 -// CHECK:STDOUT: %x.param_patt.loc7_38.2 => constants.%x.param_patt.fbe -// CHECK:STDOUT: %x.patt.loc7_38.2 => constants.%x.patt.cdb +// CHECK:STDOUT: %x.param_patt.loc7_36.2 => constants.%x.param_patt.fbe +// CHECK:STDOUT: %x.patt.loc7_36.2 => constants.%x.patt.cdb // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @InnerF(constants.%T, constants.%U) { @@ -5161,63 +5161,63 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %B.decl: type = interface_decl @B [concrete = constants.%B.type] {} {} // CHECK:STDOUT: %RequiresA.decl: %RequiresA.type = fn_decl @RequiresA [concrete = constants.%RequiresA] { // CHECK:STDOUT: %T.patt.loc6_15.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc6_29.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_29.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc6_29.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_29.1 [symbolic = %x.patt.loc6_29.2 (constants.%x.patt.19b)] +// CHECK:STDOUT: %x.param_patt.loc6_28.1: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_28.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc6_28.1: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_28.1 [symbolic = %x.patt.loc6_28.2 (constants.%x.patt.19b)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_18: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc6_17: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_15.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.2 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %x.param: @RequiresA.%T.as_type.loc6_30.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc6_30.1: type = splice_block %.loc6_30.2 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_31.2: type = converted %T.ref, %T.as_type.loc6_31.2 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_30.2: type = converted %T.ref, %T.as_type.loc6_30.2 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @RequiresA.%T.as_type.loc6_30.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.loc7_7.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc7_14.1: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %V.patt.loc7_38.1: %pattern_type.7b5 = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc7_38.2 (constants.%V.patt)] -// CHECK:STDOUT: %x.param_patt.loc7_45.1: @F.%pattern_type (%pattern_type.d51) = value_param_pattern [symbolic = %x.param_patt.loc7_45.2 (constants.%x.param_patt.fbe)] -// CHECK:STDOUT: %x.patt.loc7_45.1: @F.%pattern_type (%pattern_type.d51) = at_binding_pattern x, %x.param_patt.loc7_45.1 [symbolic = %x.patt.loc7_45.2 (constants.%x.patt.cdb)] +// CHECK:STDOUT: %U.patt.loc7_13.1: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_13.2 (constants.%U.patt)] +// CHECK:STDOUT: %V.patt.loc7_36.1: %pattern_type.7b5 = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc7_36.2 (constants.%V.patt)] +// CHECK:STDOUT: %x.param_patt.loc7_42.1: @F.%pattern_type (%pattern_type.d51) = value_param_pattern [symbolic = %x.param_patt.loc7_42.2 (constants.%x.param_patt.fbe)] +// CHECK:STDOUT: %x.patt.loc7_42.1: @F.%pattern_type (%pattern_type.d51) = at_binding_pattern x, %x.param_patt.loc7_42.1 [symbolic = %x.patt.loc7_42.2 (constants.%x.patt.cdb)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_10: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc7_9: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen.loc7_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_7.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.2 [concrete = constants.%B_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc7_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %B.ref.loc7_17: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %.Self.frozen.loc7_19: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.f7e] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %B.ref.loc7_17 [concrete] -// CHECK:STDOUT: %.Self.ref.loc7_25.1: %B.type = name_ref .Self, %.Self.frozen.loc7_19 [symbolic_self = constants.%.Self.frozen.f7e] +// CHECK:STDOUT: %.loc7_17.1: type = splice_block %.loc7_17.2 [concrete = constants.%B_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc7_13: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %B.ref.loc7_15: type = name_ref B, file.%B.decl [concrete = constants.%B.type] +// CHECK:STDOUT: %.Self.frozen.loc7_17: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.f7e] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %B.ref.loc7_15 [concrete] +// CHECK:STDOUT: %.Self.ref.loc7_23.1: %B.type = name_ref .Self, %.Self.frozen.loc7_17 [symbolic_self = constants.%.Self.frozen.f7e] // CHECK:STDOUT: %T.ref.loc7: %A.type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %equiv.loc7_31.1 = requirement_equivalent %.Self.ref.loc7_25.1, %T.ref.loc7 [concrete] +// CHECK:STDOUT: %equiv.loc7_29.1 = requirement_equivalent %.Self.ref.loc7_23.1, %T.ref.loc7 [concrete] // CHECK:STDOUT: %.Self: %B.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc7_25.2: %B.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %equiv.loc7_31.2 = requirement_equivalent %.Self.ref.loc7_25.2, %T.ref.loc7 [concrete] -// CHECK:STDOUT: %.loc7_19.2: type = where_expr [concrete = constants.%B_where.type] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %B.ref.loc7_17 [concrete] -// CHECK:STDOUT: %equiv.loc7_31.2 = requirement_equivalent %.Self.ref.loc7_25.2, %T.ref.loc7 [concrete] +// CHECK:STDOUT: %.Self.ref.loc7_23.2: %B.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %equiv.loc7_29.2 = requirement_equivalent %.Self.ref.loc7_23.2, %T.ref.loc7 [concrete] +// CHECK:STDOUT: %.loc7_17.2: type = where_expr [concrete = constants.%B_where.type] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %B.ref.loc7_15 [concrete] +// CHECK:STDOUT: %equiv.loc7_29.2 = requirement_equivalent %.Self.ref.loc7_23.2, %T.ref.loc7 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc7_14.2: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_14.1 (constants.%U)] -// CHECK:STDOUT: %.loc7_41: type = splice_block %B.ref.loc7_41 [concrete = constants.%B.type] { -// CHECK:STDOUT: %.Self.frozen.loc7_38: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %B.ref.loc7_41: type = name_ref B, file.%B.decl [concrete = constants.%B.type] +// CHECK:STDOUT: %U.loc7_13.2: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_13.1 (constants.%U)] +// CHECK:STDOUT: %.loc7_38: type = splice_block %B.ref.loc7_38 [concrete = constants.%B.type] { +// CHECK:STDOUT: %.Self.frozen.loc7_36: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %B.ref.loc7_38: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %V.loc7_38.2: %B.type = symbolic_binding V, 2 [symbolic = %V.loc7_38.1 (constants.%V)] -// CHECK:STDOUT: %x.param: @F.%U.as_type.loc7_47.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc7_47.1: type = splice_block %.loc7_47.2 [symbolic = %U.as_type.loc7_47.1 (constants.%U.as_type)] { -// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, %U.loc7_14.2 [symbolic = %U.loc7_14.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc7_47.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc7_47.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc7_47.2: type = converted %U.ref, %U.as_type.loc7_47.2 [symbolic = %U.as_type.loc7_47.1 (constants.%U.as_type)] +// CHECK:STDOUT: %V.loc7_36.2: %B.type = symbolic_binding V, 2 [symbolic = %V.loc7_36.1 (constants.%V)] +// CHECK:STDOUT: %x.param: @F.%U.as_type.loc7_44.1 (%U.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc7_44.1: type = splice_block %.loc7_44.2 [symbolic = %U.as_type.loc7_44.1 (constants.%U.as_type)] { +// CHECK:STDOUT: %U.ref: %B_where.type = name_ref U, %U.loc7_13.2 [symbolic = %U.loc7_13.1 (constants.%U)] +// CHECK:STDOUT: %U.as_type.loc7_44.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc7_44.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc7_44.2: type = converted %U.ref, %U.as_type.loc7_44.2 [symbolic = %U.as_type.loc7_44.1 (constants.%U.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%U.as_type.loc7_47.1 (%U.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @F.%U.as_type.loc7_44.1 (%U.as_type) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -5250,15 +5250,15 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @RequiresA(%T.loc6_15.2: %A.type) { // CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_15.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_31.1: type = facet_access_type %T.loc6_15.1 [symbolic = %T.as_type.loc6_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_31.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] -// CHECK:STDOUT: %x.param_patt.loc6_29.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_29.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc6_29.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_29.2 [symbolic = %x.patt.loc6_29.2 (constants.%x.patt.19b)] +// CHECK:STDOUT: %T.as_type.loc6_30.1: type = facet_access_type %T.loc6_15.1 [symbolic = %T.as_type.loc6_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_30.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] +// CHECK:STDOUT: %x.param_patt.loc6_28.2: @RequiresA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_28.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc6_28.2: @RequiresA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_28.2 [symbolic = %x.patt.loc6_28.2 (constants.%x.patt.19b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_31.1 [symbolic = %require_complete (constants.%require_complete.94f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_30.1 [symbolic = %require_complete (constants.%require_complete.94f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc6_31.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%x.param: @RequiresA.%T.as_type.loc6_30.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -5266,35 +5266,35 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %A.type, %U.loc7_14.2: %B_where.type, %V.loc7_38.2: %B.type) { +// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %A.type, %U.loc7_13.2: %B_where.type, %V.loc7_36.2: %B.type) { // CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc7_7.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc7_14.2: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc7_14.1: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_14.1 (constants.%U)] -// CHECK:STDOUT: %V.patt.loc7_38.2: %pattern_type.7b5 = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc7_38.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.loc7_38.1: %B.type = symbolic_binding V, 2 [symbolic = %V.loc7_38.1 (constants.%V)] -// CHECK:STDOUT: %U.as_type.loc7_47.1: type = facet_access_type %U.loc7_14.1 [symbolic = %U.as_type.loc7_47.1 (constants.%U.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc7_47.1 [symbolic = %pattern_type (constants.%pattern_type.d51)] -// CHECK:STDOUT: %x.param_patt.loc7_45.2: @F.%pattern_type (%pattern_type.d51) = value_param_pattern [symbolic = %x.param_patt.loc7_45.2 (constants.%x.param_patt.fbe)] -// CHECK:STDOUT: %x.patt.loc7_45.2: @F.%pattern_type (%pattern_type.d51) = at_binding_pattern x, %x.param_patt.loc7_45.2 [symbolic = %x.patt.loc7_45.2 (constants.%x.patt.cdb)] +// CHECK:STDOUT: %U.patt.loc7_13.2: %pattern_type.831 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_13.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc7_13.1: %B_where.type = symbolic_binding U, 1 [symbolic = %U.loc7_13.1 (constants.%U)] +// CHECK:STDOUT: %V.patt.loc7_36.2: %pattern_type.7b5 = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc7_36.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.loc7_36.1: %B.type = symbolic_binding V, 2 [symbolic = %V.loc7_36.1 (constants.%V)] +// CHECK:STDOUT: %U.as_type.loc7_44.1: type = facet_access_type %U.loc7_13.1 [symbolic = %U.as_type.loc7_44.1 (constants.%U.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc7_44.1 [symbolic = %pattern_type (constants.%pattern_type.d51)] +// CHECK:STDOUT: %x.param_patt.loc7_42.2: @F.%pattern_type (%pattern_type.d51) = value_param_pattern [symbolic = %x.param_patt.loc7_42.2 (constants.%x.param_patt.fbe)] +// CHECK:STDOUT: %x.patt.loc7_42.2: @F.%pattern_type (%pattern_type.d51) = at_binding_pattern x, %x.param_patt.loc7_42.2 [symbolic = %x.patt.loc7_42.2 (constants.%x.patt.cdb)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc7_47.1 [symbolic = %require_complete (constants.%require_complete.963)] -// CHECK:STDOUT: %V.as_type.loc8_16.2: type = facet_access_type %V.loc7_38.1 [symbolic = %V.as_type.loc8_16.2 (constants.%V.as_type)] +// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc7_44.1 [symbolic = %require_complete (constants.%require_complete.963)] +// CHECK:STDOUT: %V.as_type.loc8_16.2: type = facet_access_type %V.loc7_36.1 [symbolic = %V.as_type.loc8_16.2 (constants.%V.as_type)] // CHECK:STDOUT: %T.as_type.loc8_11.2: type = facet_access_type %T.loc7_7.1 [symbolic = %T.as_type.loc8_11.2 (constants.%T.as_type)] -// CHECK:STDOUT: %eq = observe_equivalent %T.loc7_7.1, %V.loc7_38.1 [symbolic = %eq (constants.%eq)] +// CHECK:STDOUT: %eq = observe_equivalent %T.loc7_7.1, %V.loc7_36.1 [symbolic = %eq (constants.%eq)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%U.as_type.loc7_47.1 (%U.as_type)) { +// CHECK:STDOUT: fn(%x.param: @F.%U.as_type.loc7_44.1 (%U.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref.loc8: %A.type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %V.ref: %B.type = name_ref V, %V.loc7_38.2 [symbolic = %V.loc7_38.1 (constants.%V)] +// CHECK:STDOUT: %V.ref: %B.type = name_ref V, %V.loc7_36.2 [symbolic = %V.loc7_36.1 (constants.%V)] // CHECK:STDOUT: %V.as_type.loc8_16.1: type = facet_access_type %V.ref [symbolic = %V.as_type.loc8_16.2 (constants.%V.as_type)] // CHECK:STDOUT: %.loc8_16: type = converted %V.ref, %V.as_type.loc8_16.1 [symbolic = %V.as_type.loc8_16.2 (constants.%V.as_type)] // CHECK:STDOUT: %T.as_type.loc8_11.1: type = facet_access_type %T.ref.loc8 [symbolic = %T.as_type.loc8_11.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc8_11: type = converted %T.ref.loc8, %T.as_type.loc8_11.1 [symbolic = %T.as_type.loc8_11.2 (constants.%T.as_type)] // CHECK:STDOUT: %F.observe.decl = observe_decl @F.observe [concrete] // CHECK:STDOUT: %RequiresA.ref: %RequiresA.type = name_ref RequiresA, file.%RequiresA.decl [concrete = constants.%RequiresA] -// CHECK:STDOUT: %x.ref: @F.%U.as_type.loc7_47.1 (%U.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @F.%U.as_type.loc7_44.1 (%U.as_type) = name_ref x, %x // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete = constants.%B.type] // CHECK:STDOUT: return // CHECK:STDOUT: @@ -5316,23 +5316,23 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @RequiresA(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_15.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc6_31.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc6_30.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e -// CHECK:STDOUT: %x.param_patt.loc6_29.2 => constants.%x.param_patt.241 -// CHECK:STDOUT: %x.patt.loc6_29.2 => constants.%x.patt.19b +// CHECK:STDOUT: %x.param_patt.loc6_28.2 => constants.%x.param_patt.241 +// CHECK:STDOUT: %x.patt.loc6_28.2 => constants.%x.patt.19b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%U, constants.%V) { // CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_7.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc7_14.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc7_14.1 => constants.%U -// CHECK:STDOUT: %V.patt.loc7_38.2 => constants.%V.patt -// CHECK:STDOUT: %V.loc7_38.1 => constants.%V -// CHECK:STDOUT: %U.as_type.loc7_47.1 => constants.%U.as_type +// CHECK:STDOUT: %U.patt.loc7_13.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc7_13.1 => constants.%U +// CHECK:STDOUT: %V.patt.loc7_36.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc7_36.1 => constants.%V +// CHECK:STDOUT: %U.as_type.loc7_44.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d51 -// CHECK:STDOUT: %x.param_patt.loc7_45.2 => constants.%x.param_patt.fbe -// CHECK:STDOUT: %x.patt.loc7_45.2 => constants.%x.patt.cdb +// CHECK:STDOUT: %x.param_patt.loc7_42.2 => constants.%x.param_patt.fbe +// CHECK:STDOUT: %x.patt.loc7_42.2 => constants.%x.patt.cdb // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_invalid_equivalent.carbon @@ -5387,45 +5387,45 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %B.decl: type = interface_decl @B [concrete = constants.%B.type] {} {} // CHECK:STDOUT: %TakesA.decl: %TakesA.type = fn_decl @TakesA [concrete = constants.%TakesA] { // CHECK:STDOUT: %T.patt.loc6_12.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_12.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.param_patt.loc6_26.1: @TakesA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_26.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc6_26.1: @TakesA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_26.1 [symbolic = %x.patt.loc6_26.2 (constants.%x.patt.19b)] +// CHECK:STDOUT: %x.param_patt.loc6_25.1: @TakesA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_25.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc6_25.1: @TakesA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_25.1 [symbolic = %x.patt.loc6_25.2 (constants.%x.patt.19b)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_15: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc6_14: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_12.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc6_12.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @TakesA.%T.as_type.loc6_28.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc6_28.1: type = splice_block %.loc6_28.2 [symbolic = %T.as_type.loc6_28.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %x.param: @TakesA.%T.as_type.loc6_27.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc6_27.1: type = splice_block %.loc6_27.2 [symbolic = %T.as_type.loc6_27.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc6_12.2 [symbolic = %T.loc6_12.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_28.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_28.2: type = converted %T.ref, %T.as_type.loc6_28.2 [symbolic = %T.as_type.loc6_28.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_27.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc6_27.2: type = converted %T.ref, %T.as_type.loc6_27.2 [symbolic = %T.as_type.loc6_27.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @TakesA.%T.as_type.loc6_28.1 (%T.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @TakesA.%T.as_type.loc6_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.loc7_7.1: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc7_14.1: %pattern_type.7b5 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %x.param_patt.loc7_21.1: @F.%pattern_type (%pattern_type.d7b) = value_param_pattern [symbolic = %x.param_patt.loc7_21.2 (constants.%x.param_patt.19f)] -// CHECK:STDOUT: %x.patt.loc7_21.1: @F.%pattern_type (%pattern_type.d7b) = at_binding_pattern x, %x.param_patt.loc7_21.1 [symbolic = %x.patt.loc7_21.2 (constants.%x.patt.033)] +// CHECK:STDOUT: %U.patt.loc7_13.1: %pattern_type.7b5 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_13.2 (constants.%U.patt)] +// CHECK:STDOUT: %x.param_patt.loc7_19.1: @F.%pattern_type (%pattern_type.d7b) = value_param_pattern [symbolic = %x.param_patt.loc7_19.2 (constants.%x.param_patt.19f)] +// CHECK:STDOUT: %x.patt.loc7_19.1: @F.%pattern_type (%pattern_type.d7b) = at_binding_pattern x, %x.param_patt.loc7_19.1 [symbolic = %x.patt.loc7_19.2 (constants.%x.patt.033)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_10: type = splice_block %A.ref [concrete = constants.%A.type] { +// CHECK:STDOUT: %.loc7_9: type = splice_block %A.ref [concrete = constants.%A.type] { // CHECK:STDOUT: %.Self.frozen.loc7_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc7_7.2: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc7_17: type = splice_block %B.ref [concrete = constants.%B.type] { -// CHECK:STDOUT: %.Self.frozen.loc7_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc7_15: type = splice_block %B.ref [concrete = constants.%B.type] { +// CHECK:STDOUT: %.Self.frozen.loc7_13: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc7_14.2: %B.type = symbolic_binding U, 1 [symbolic = %U.loc7_14.1 (constants.%U)] -// CHECK:STDOUT: %x.param: @F.%U.as_type.loc7_23.1 (%U.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc7_23.1: type = splice_block %.loc7_23.2 [symbolic = %U.as_type.loc7_23.1 (constants.%U.as_type)] { -// CHECK:STDOUT: %U.ref.loc7: %B.type = name_ref U, %U.loc7_14.2 [symbolic = %U.loc7_14.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc7_23.2: type = facet_access_type %U.ref.loc7 [symbolic = %U.as_type.loc7_23.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc7_23.2: type = converted %U.ref.loc7, %U.as_type.loc7_23.2 [symbolic = %U.as_type.loc7_23.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.loc7_13.2: %B.type = symbolic_binding U, 1 [symbolic = %U.loc7_13.1 (constants.%U)] +// CHECK:STDOUT: %x.param: @F.%U.as_type.loc7_21.1 (%U.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc7_21.1: type = splice_block %.loc7_21.2 [symbolic = %U.as_type.loc7_21.1 (constants.%U.as_type)] { +// CHECK:STDOUT: %U.ref.loc7: %B.type = name_ref U, %U.loc7_13.2 [symbolic = %U.loc7_13.1 (constants.%U)] +// CHECK:STDOUT: %U.as_type.loc7_21.2: type = facet_access_type %U.ref.loc7 [symbolic = %U.as_type.loc7_21.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc7_21.2: type = converted %U.ref.loc7, %U.as_type.loc7_21.2 [symbolic = %U.as_type.loc7_21.1 (constants.%U.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @F.%U.as_type.loc7_23.1 (%U.as_type) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @F.%U.as_type.loc7_21.1 (%U.as_type) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -5458,15 +5458,15 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @TakesA(%T.loc6_12.2: %A.type) { // CHECK:STDOUT: %T.patt.loc6_12.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_12.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_12.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc6_12.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc6_28.1: type = facet_access_type %T.loc6_12.1 [symbolic = %T.as_type.loc6_28.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_28.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] -// CHECK:STDOUT: %x.param_patt.loc6_26.2: @TakesA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_26.2 (constants.%x.param_patt.241)] -// CHECK:STDOUT: %x.patt.loc6_26.2: @TakesA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_26.2 [symbolic = %x.patt.loc6_26.2 (constants.%x.patt.19b)] +// CHECK:STDOUT: %T.as_type.loc6_27.1: type = facet_access_type %T.loc6_12.1 [symbolic = %T.as_type.loc6_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc6_27.1 [symbolic = %pattern_type (constants.%pattern_type.a0e)] +// CHECK:STDOUT: %x.param_patt.loc6_25.2: @TakesA.%pattern_type (%pattern_type.a0e) = value_param_pattern [symbolic = %x.param_patt.loc6_25.2 (constants.%x.param_patt.241)] +// CHECK:STDOUT: %x.patt.loc6_25.2: @TakesA.%pattern_type (%pattern_type.a0e) = at_binding_pattern x, %x.param_patt.loc6_25.2 [symbolic = %x.patt.loc6_25.2 (constants.%x.patt.19b)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_28.1 [symbolic = %require_complete (constants.%require_complete.94f)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_27.1 [symbolic = %require_complete (constants.%require_complete.94f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @TakesA.%T.as_type.loc6_28.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%x.param: @TakesA.%T.as_type.loc6_27.1 (%T.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -5474,32 +5474,32 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %A.type, %U.loc7_14.2: %B.type) { +// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %A.type, %U.loc7_13.2: %B.type) { // CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type.029 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc7_7.1: %A.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc7_14.2: %pattern_type.7b5 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc7_14.1: %B.type = symbolic_binding U, 1 [symbolic = %U.loc7_14.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc7_23.1: type = facet_access_type %U.loc7_14.1 [symbolic = %U.as_type.loc7_23.1 (constants.%U.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc7_23.1 [symbolic = %pattern_type (constants.%pattern_type.d7b)] -// CHECK:STDOUT: %x.param_patt.loc7_21.2: @F.%pattern_type (%pattern_type.d7b) = value_param_pattern [symbolic = %x.param_patt.loc7_21.2 (constants.%x.param_patt.19f)] -// CHECK:STDOUT: %x.patt.loc7_21.2: @F.%pattern_type (%pattern_type.d7b) = at_binding_pattern x, %x.param_patt.loc7_21.2 [symbolic = %x.patt.loc7_21.2 (constants.%x.patt.033)] +// CHECK:STDOUT: %U.patt.loc7_13.2: %pattern_type.7b5 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc7_13.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc7_13.1: %B.type = symbolic_binding U, 1 [symbolic = %U.loc7_13.1 (constants.%U)] +// CHECK:STDOUT: %U.as_type.loc7_21.1: type = facet_access_type %U.loc7_13.1 [symbolic = %U.as_type.loc7_21.1 (constants.%U.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc7_21.1 [symbolic = %pattern_type (constants.%pattern_type.d7b)] +// CHECK:STDOUT: %x.param_patt.loc7_19.2: @F.%pattern_type (%pattern_type.d7b) = value_param_pattern [symbolic = %x.param_patt.loc7_19.2 (constants.%x.param_patt.19f)] +// CHECK:STDOUT: %x.patt.loc7_19.2: @F.%pattern_type (%pattern_type.d7b) = at_binding_pattern x, %x.param_patt.loc7_19.2 [symbolic = %x.patt.loc7_19.2 (constants.%x.patt.033)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc7_23.1 [symbolic = %require_complete (constants.%require_complete.806)] +// CHECK:STDOUT: %require_complete: = require_complete_type %U.as_type.loc7_21.1 [symbolic = %require_complete (constants.%require_complete.806)] // CHECK:STDOUT: %T.as_type.loc8_11.2: type = facet_access_type %T.loc7_7.1 [symbolic = %T.as_type.loc8_11.2 (constants.%T.as_type)] -// CHECK:STDOUT: %eq = observe_equivalent %T.loc7_7.1, %U.loc7_14.1 [symbolic = %eq (constants.%eq)] +// CHECK:STDOUT: %eq = observe_equivalent %T.loc7_7.1, %U.loc7_13.1 [symbolic = %eq (constants.%eq)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%U.as_type.loc7_23.1 (%U.as_type)) { +// CHECK:STDOUT: fn(%x.param: @F.%U.as_type.loc7_21.1 (%U.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %T.loc7_7.2 [symbolic = %T.loc7_7.1 (constants.%T)] -// CHECK:STDOUT: %U.ref.loc8: %B.type = name_ref U, %U.loc7_14.2 [symbolic = %U.loc7_14.1 (constants.%U)] -// CHECK:STDOUT: %U.as_type.loc8: type = facet_access_type %U.ref.loc8 [symbolic = %U.as_type.loc7_23.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc8_16: type = converted %U.ref.loc8, %U.as_type.loc8 [symbolic = %U.as_type.loc7_23.1 (constants.%U.as_type)] +// CHECK:STDOUT: %U.ref.loc8: %B.type = name_ref U, %U.loc7_13.2 [symbolic = %U.loc7_13.1 (constants.%U)] +// CHECK:STDOUT: %U.as_type.loc8: type = facet_access_type %U.ref.loc8 [symbolic = %U.as_type.loc7_21.1 (constants.%U.as_type)] +// CHECK:STDOUT: %.loc8_16: type = converted %U.ref.loc8, %U.as_type.loc8 [symbolic = %U.as_type.loc7_21.1 (constants.%U.as_type)] // CHECK:STDOUT: %T.as_type.loc8_11.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_11.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc8_11: type = converted %T.ref, %T.as_type.loc8_11.1 [symbolic = %T.as_type.loc8_11.2 (constants.%T.as_type)] // CHECK:STDOUT: %F.observe.decl = observe_decl @F.observe [concrete] // CHECK:STDOUT: %TakesA.ref: %TakesA.type = name_ref TakesA, file.%TakesA.decl [concrete = constants.%TakesA] -// CHECK:STDOUT: %x.ref: @F.%U.as_type.loc7_23.1 (%U.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @F.%U.as_type.loc7_21.1 (%U.as_type) = name_ref x, %x // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -5520,21 +5520,21 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @TakesA(constants.%T) { // CHECK:STDOUT: %T.patt.loc6_12.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_12.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc6_28.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc6_27.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0e -// CHECK:STDOUT: %x.param_patt.loc6_26.2 => constants.%x.param_patt.241 -// CHECK:STDOUT: %x.patt.loc6_26.2 => constants.%x.patt.19b +// CHECK:STDOUT: %x.param_patt.loc6_25.2 => constants.%x.param_patt.241 +// CHECK:STDOUT: %x.patt.loc6_25.2 => constants.%x.patt.19b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc7_7.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc7_14.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc7_14.1 => constants.%U -// CHECK:STDOUT: %U.as_type.loc7_23.1 => constants.%U.as_type +// CHECK:STDOUT: %U.patt.loc7_13.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc7_13.1 => constants.%U +// CHECK:STDOUT: %U.as_type.loc7_21.1 => constants.%U.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d7b -// CHECK:STDOUT: %x.param_patt.loc7_21.2 => constants.%x.param_patt.19f -// CHECK:STDOUT: %x.patt.loc7_21.2 => constants.%x.patt.033 +// CHECK:STDOUT: %x.param_patt.loc7_19.2 => constants.%x.param_patt.19f +// CHECK:STDOUT: %x.patt.loc7_19.2 => constants.%x.patt.033 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_wrong_scope_class.carbon @@ -5569,32 +5569,32 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { // CHECK:STDOUT: %T.patt.loc3_10.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_10.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc3_20.1: %pattern_type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc3_20.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc3_19.1: %pattern_type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc3_19.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_13.1: type = splice_block %.loc3_13.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_12.1: type = splice_block %.loc3_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc3_10: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_13.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc3_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_10.1 (constants.%T)] -// CHECK:STDOUT: %.loc3_23.1: type = splice_block %.loc3_23.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc3_20: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_23.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_21.1: type = splice_block %.loc3_21.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc3_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc3_21.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc3_20.2: type = symbolic_binding U, 1 [symbolic = %U.loc3_20.1 (constants.%U)] +// CHECK:STDOUT: %U.loc3_19.2: type = symbolic_binding U, 1 [symbolic = %U.loc3_19.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%T.loc3_10.2: type, %U.loc3_20.2: type) { +// CHECK:STDOUT: generic class @C(%T.loc3_10.2: type, %U.loc3_19.2: type) { // CHECK:STDOUT: %T.patt.loc3_10.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_10.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc3_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc3_10.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc3_20.2: %pattern_type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc3_20.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc3_20.1: type = symbolic_binding U, 1 [symbolic = %U.loc3_20.1 (constants.%U)] +// CHECK:STDOUT: %U.patt.loc3_19.2: %pattern_type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc3_19.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc3_19.1: type = symbolic_binding U, 1 [symbolic = %U.loc3_19.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc3_10.2 [symbolic = %T.loc3_10.1 (constants.%T)] -// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc3_20.2 [symbolic = %U.loc3_20.1 (constants.%U)] +// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc3_19.2 [symbolic = %U.loc3_19.1 (constants.%U)] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: @@ -5608,8 +5608,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @C(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc3_10.2 => constants.%T.patt // CHECK:STDOUT: %T.loc3_10.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc3_20.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc3_20.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc3_19.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc3_19.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_wrong_scope_named_constraint.carbon @@ -5643,41 +5643,41 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: %C.type.eac = constraint_decl @C [concrete = constants.%empty_struct] { // CHECK:STDOUT: %T.patt.loc3_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.patt.loc3_25.1: %pattern_type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc3_25.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc3_24.1: %pattern_type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc3_24.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_18.1: type = splice_block %.loc3_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc3_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc3_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_15.1 (constants.%T)] -// CHECK:STDOUT: %.loc3_28.1: type = splice_block %.loc3_28.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc3_25: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_28.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc3_26.1: type = splice_block %.loc3_26.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc3_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc3_26.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc3_25.2: type = symbolic_binding U, 1 [symbolic = %U.loc3_25.1 (constants.%U)] +// CHECK:STDOUT: %U.loc3_24.2: type = symbolic_binding U, 1 [symbolic = %U.loc3_24.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic constraint @C(%T.loc3_15.2: type, %U.loc3_25.2: type) { +// CHECK:STDOUT: generic constraint @C(%T.loc3_15.2: type, %U.loc3_24.2: type) { // CHECK:STDOUT: %T.patt.loc3_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc3_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc3_15.1 (constants.%T)] -// CHECK:STDOUT: %U.patt.loc3_25.2: %pattern_type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc3_25.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc3_25.1: type = symbolic_binding U, 1 [symbolic = %U.loc3_25.1 (constants.%U)] +// CHECK:STDOUT: %U.patt.loc3_24.2: %pattern_type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc3_24.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc3_24.1: type = symbolic_binding U, 1 [symbolic = %U.loc3_24.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %C.type: type = facet_type <@C, @C(%T.loc3_15.1, %U.loc3_25.1)> [symbolic = %C.type (constants.%C.type.d68)] -// CHECK:STDOUT: %Self.loc3_34.2: @C.%C.type (%C.type.d68) = symbolic_binding Self, 2 [symbolic = %Self.loc3_34.2 (constants.%Self)] +// CHECK:STDOUT: %C.type: type = facet_type <@C, @C(%T.loc3_15.1, %U.loc3_24.1)> [symbolic = %C.type (constants.%C.type.d68)] +// CHECK:STDOUT: %Self.loc3_32.2: @C.%C.type (%C.type.d68) = symbolic_binding Self, 2 [symbolic = %Self.loc3_32.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { -// CHECK:STDOUT: %Self.loc3_34.1: @C.%C.type (%C.type.d68) = symbolic_binding Self, 2 [symbolic = %Self.loc3_34.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc3_32.1: @C.%C.type (%C.type.d68) = symbolic_binding Self, 2 [symbolic = %Self.loc3_32.2 (constants.%Self)] // CHECK:STDOUT: %C.WithSelf.decl = constraint_with_self_decl @C [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T.ref: type = name_ref T, @C.%T.loc3_15.2 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %U.ref: type = name_ref U, @C.%U.loc3_25.2 [symbolic = %U (constants.%U)] +// CHECK:STDOUT: %U.ref: type = name_ref U, @C.%U.loc3_24.2 [symbolic = %U (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_34.1 +// CHECK:STDOUT: .Self = %Self.loc3_32.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .U = // CHECK:STDOUT: .T = @@ -5690,8 +5690,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @C(constants.%T, constants.%U) { // CHECK:STDOUT: %T.patt.loc3_15.2 => constants.%T.patt // CHECK:STDOUT: %T.loc3_15.1 => constants.%T -// CHECK:STDOUT: %U.patt.loc3_25.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc3_25.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc3_24.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc3_24.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.WithSelf(constants.%T, constants.%U, constants.%Self) {} @@ -5873,7 +5873,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { // CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type.827 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.3 [concrete = constants.%facet_type.8cb] { +// CHECK:STDOUT: %.loc5_18.1: type = splice_block %.loc5_18.3 [concrete = constants.%facet_type.8cb] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // 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] @@ -5881,8 +5881,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %impl.elem0: %.d56 = 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: %.loc5_19.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.8cb] -// CHECK:STDOUT: %.loc5_19.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc5_19.2 [concrete = constants.%facet_type.8cb] +// CHECK:STDOUT: %.loc5_18.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.8cb] +// CHECK:STDOUT: %.loc5_18.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc5_18.2 [concrete = constants.%facet_type.8cb] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_14.2: %facet_type.8cb = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T)] // CHECK:STDOUT: } @@ -5920,10 +5920,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc5_14.1)> [symbolic = %I.type (constants.%I.type.715)] -// CHECK:STDOUT: %Self.loc5_35.2: @I.%I.type (%I.type.715) = symbolic_binding Self, 1 [symbolic = %Self.loc5_35.2 (constants.%Self.dca)] +// CHECK:STDOUT: %Self.loc5_34.2: @I.%I.type (%I.type.715) = symbolic_binding Self, 1 [symbolic = %Self.loc5_34.2 (constants.%Self.dca)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc5_35.1: @I.%I.type (%I.type.715) = symbolic_binding Self, 1 [symbolic = %Self.loc5_35.2 (constants.%Self.dca)] +// CHECK:STDOUT: %Self.loc5_34.1: @I.%I.type (%I.type.715) = symbolic_binding Self, 1 [symbolic = %Self.loc5_34.2 (constants.%Self.dca)] // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -5943,7 +5943,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %.loc8_20.3: Core.Form = init_form %.loc8_20.2 [symbolic = %.loc8_20.1 (constants.%.344)] // CHECK:STDOUT: %self.param: @I.WithSelf.GetU.%Self.as_type.loc8_11.1 (%Self.as_type.37b) = value_param call_param0 // CHECK:STDOUT: %.loc8_11.1: type = splice_block %.loc8_11.3 [symbolic = %Self.as_type.loc8_11.1 (constants.%Self.as_type.37b)] { -// CHECK:STDOUT: %.loc8_11.2: @I.WithSelf.GetU.%I.type (%I.type.715) = specific_constant @I.%Self.loc5_35.1, @I(constants.%T) [symbolic = %Self (constants.%Self.dca)] +// CHECK:STDOUT: %.loc8_11.2: @I.WithSelf.GetU.%I.type (%I.type.715) = specific_constant @I.%Self.loc5_34.1, @I(constants.%T) [symbolic = %Self (constants.%Self.dca)] // CHECK:STDOUT: %Self.ref: @I.WithSelf.GetU.%I.type (%I.type.715) = name_ref Self, %.loc8_11.2 [symbolic = %Self (constants.%Self.dca)] // CHECK:STDOUT: %Self.as_type.loc8_11.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc8_11.1 (constants.%Self.as_type.37b)] // CHECK:STDOUT: %.loc8_11.3: type = converted %Self.ref, %Self.as_type.loc8_11.2 [symbolic = %Self.as_type.loc8_11.1 (constants.%Self.as_type.37b)] @@ -5961,7 +5961,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: @I.WithSelf.TakesT.%Self.as_type.loc9_13.1 (%Self.as_type.37b) = value_param call_param0 // CHECK:STDOUT: %.loc9_13.1: type = splice_block %.loc9_13.3 [symbolic = %Self.as_type.loc9_13.1 (constants.%Self.as_type.37b)] { -// CHECK:STDOUT: %.loc9_13.2: @I.WithSelf.TakesT.%I.type (%I.type.715) = specific_constant @I.%Self.loc5_35.1, @I(constants.%T) [symbolic = %Self (constants.%Self.dca)] +// CHECK:STDOUT: %.loc9_13.2: @I.WithSelf.TakesT.%I.type (%I.type.715) = specific_constant @I.%Self.loc5_34.1, @I(constants.%T) [symbolic = %Self (constants.%Self.dca)] // CHECK:STDOUT: %Self.ref: @I.WithSelf.TakesT.%I.type (%I.type.715) = name_ref Self, %.loc9_13.2 [symbolic = %Self (constants.%Self.dca)] // CHECK:STDOUT: %Self.as_type.loc9_13.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_13.1 (constants.%Self.as_type.37b)] // CHECK:STDOUT: %.loc9_13.3: type = converted %Self.ref, %Self.as_type.loc9_13.2 [symbolic = %Self.as_type.loc9_13.1 (constants.%Self.as_type.37b)] @@ -5986,7 +5986,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %I.observe.decl = observe_decl @I.observe [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc5_35.1 +// CHECK:STDOUT: .Self = %Self.loc5_34.1 // CHECK:STDOUT: .B = // CHECK:STDOUT: .T = // CHECK:STDOUT: .B = @@ -6005,7 +6005,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.WithSelf.GetU(@I.%T.loc5_14.2: %facet_type.8cb, @I.%Self.loc5_35.1: @I.%I.type (%I.type.715)) { +// CHECK:STDOUT: generic fn @I.WithSelf.GetU(@I.%T.loc5_14.2: %facet_type.8cb, @I.%Self.loc5_34.1: @I.%I.type (%I.type.715)) { // 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.715)] // CHECK:STDOUT: %Self: @I.WithSelf.GetU.%I.type (%I.type.715) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.dca)] @@ -6024,7 +6024,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: fn(%self.param: @I.WithSelf.GetU.%Self.as_type.loc8_11.1 (%Self.as_type.37b)) -> out %return.param: @I.WithSelf.GetU.%as_type (%as_type); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.WithSelf.TakesT(@I.%T.loc5_14.2: %facet_type.8cb, @I.%Self.loc5_35.1: @I.%I.type (%I.type.715)) { +// CHECK:STDOUT: generic fn @I.WithSelf.TakesT(@I.%T.loc5_14.2: %facet_type.8cb, @I.%Self.loc5_34.1: @I.%I.type (%I.type.715)) { // 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.715)] // CHECK:STDOUT: %Self: @I.WithSelf.TakesT.%I.type (%I.type.715) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.dca)] @@ -6131,7 +6131,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %return.param_patt.8e4: %pattern_type.304 = out_param_pattern [symbolic] // CHECK:STDOUT: %return.patt.9ec: %pattern_type.304 = return_slot_pattern %return.param_patt.8e4, invalid [symbolic] // CHECK:STDOUT: %.c94: Core.Form = init_form %as_type.b29 [symbolic] -// CHECK:STDOUT: %Destroy.Op.type.1d8f74.2: type = fn_type @Destroy.Op.loc8_13.2 [concrete] +// CHECK:STDOUT: %Destroy.Op.type.1d8f74.2: type = fn_type @Destroy.Op.loc8_12.2 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.2: %Destroy.Op.type.1d8f74.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.2: = custom_witness (%Destroy.Op.1a2547.2), @Destroy [concrete] // CHECK:STDOUT: %facet_value: %facet_type.8cb = facet_value %C, (%A.impl_witness, %custom_witness.df9cc1.2) [concrete] @@ -6212,12 +6212,12 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %Main.import_ref.c07 = import_ref Main//generic_observe, loc4_13, unloaded // CHECK:STDOUT: %Main.import_ref.93b: @I.WithSelf.%I.WithSelf.TakesT.type (%I.WithSelf.TakesT.type.74f) = import_ref Main//generic_observe, loc9_24, loaded [symbolic = @I.WithSelf.%I.WithSelf.TakesT (constants.%I.WithSelf.TakesT.406)] // CHECK:STDOUT: %Main.import_ref.10abc5.2: %facet_type.8cb = import_ref Main//generic_observe, loc5_14, loaded [symbolic = @I.%T (constants.%T.2b7)] -// CHECK:STDOUT: %Main.import_ref.563720.2: @I.%I.type (%I.type.715) = import_ref Main//generic_observe, loc5_35, loaded [symbolic = @I.%Self (constants.%Self.a17)] +// CHECK:STDOUT: %Main.import_ref.563720.2: @I.%I.type (%I.type.715) = import_ref Main//generic_observe, loc5_34, loaded [symbolic = @I.%Self (constants.%Self.a17)] // CHECK:STDOUT: %Main.import_ref.1a4: @I.WithSelf.%I.WithSelf.GetU.type (%I.WithSelf.GetU.type.841) = import_ref Main//generic_observe, loc8_21, loaded [symbolic = @I.WithSelf.%I.WithSelf.GetU (constants.%I.WithSelf.GetU.7cf)] // CHECK:STDOUT: %Main.import_ref.10abc5.3: %facet_type.8cb = import_ref Main//generic_observe, loc5_14, loaded [symbolic = @I.%T (constants.%T.2b7)] -// CHECK:STDOUT: %Main.import_ref.563720.3: @I.%I.type (%I.type.715) = import_ref Main//generic_observe, loc5_35, loaded [symbolic = @I.%Self (constants.%Self.a17)] +// CHECK:STDOUT: %Main.import_ref.563720.3: @I.%I.type (%I.type.715) = import_ref Main//generic_observe, loc5_34, loaded [symbolic = @I.%Self (constants.%Self.a17)] // CHECK:STDOUT: %Main.import_ref.bda: %facet_type.0e2 = import_ref Main//generic_observe, loc6_8, loaded [concrete = %U] -// CHECK:STDOUT: %Main.import_ref.603 = import_ref Main//generic_observe, loc5_35, unloaded +// CHECK:STDOUT: %Main.import_ref.603 = import_ref Main//generic_observe, loc5_34, unloaded // CHECK:STDOUT: %Main.import_ref.10abc5.4: %facet_type.8cb = import_ref Main//generic_observe, loc5_14, loaded [symbolic = @I.%T (constants.%T.2b7)] // CHECK:STDOUT: %Main.import_ref.4e9 = import_ref Main//generic_observe, loc6_8, unloaded // CHECK:STDOUT: %U: %facet_type.0e2 = assoc_const_decl @U [concrete] {} @@ -6244,25 +6244,25 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc8_7.1: %pattern_type.7b0 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt.fb5)] -// CHECK:STDOUT: %t.param_patt.loc8_17.1: @F.%pattern_type.loc8 (%pattern_type.cf2) = value_param_pattern [symbolic = %t.param_patt.loc8_17.2 (constants.%t.param_patt.135)] -// CHECK:STDOUT: %t.patt.loc8_17.1: @F.%pattern_type.loc8 (%pattern_type.cf2) = at_binding_pattern t, %t.param_patt.loc8_17.1 [symbolic = %t.patt.loc8_17.2 (constants.%t.patt.1b6)] +// CHECK:STDOUT: %t.param_patt.loc8_16.1: @F.%pattern_type.loc8 (%pattern_type.cf2) = value_param_pattern [symbolic = %t.param_patt.loc8_16.2 (constants.%t.param_patt.135)] +// CHECK:STDOUT: %t.patt.loc8_16.1: @F.%pattern_type.loc8 (%pattern_type.cf2) = at_binding_pattern t, %t.param_patt.loc8_16.1 [symbolic = %t.patt.loc8_16.2 (constants.%t.patt.1b6)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_13.1: type = splice_block %I.type [concrete = constants.%I.type.8a7] { +// CHECK:STDOUT: %.loc8_12.1: type = splice_block %I.type [concrete = constants.%I.type.8a7] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, imports.%Main.I [concrete = constants.%I.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %facet_value: %facet_type.8cb = facet_value %C.ref, (constants.%A.impl_witness, constants.%custom_witness.df9cc1.2) [concrete = constants.%facet_value] -// CHECK:STDOUT: %.loc8_13.2: %facet_type.8cb = converted %C.ref, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc8_12.2: %facet_type.8cb = converted %C.ref, %facet_value [concrete = constants.%facet_value] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%facet_value)> [concrete = constants.%I.type.8a7] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_7.2: %I.type.8a7 = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T.e69)] -// CHECK:STDOUT: %t.param: @F.%T.as_type.loc8_19.1 (%T.as_type.a68) = value_param call_param0 -// CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.2 [symbolic = %T.as_type.loc8_19.1 (constants.%T.as_type.a68)] { +// CHECK:STDOUT: %t.param: @F.%T.as_type.loc8_18.1 (%T.as_type.a68) = value_param call_param0 +// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [symbolic = %T.as_type.loc8_18.1 (constants.%T.as_type.a68)] { // CHECK:STDOUT: %T.ref.loc8: %I.type.8a7 = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T.e69)] -// CHECK:STDOUT: %T.as_type.loc8_19.2: type = facet_access_type %T.ref.loc8 [symbolic = %T.as_type.loc8_19.1 (constants.%T.as_type.a68)] -// CHECK:STDOUT: %.loc8_19.2: type = converted %T.ref.loc8, %T.as_type.loc8_19.2 [symbolic = %T.as_type.loc8_19.1 (constants.%T.as_type.a68)] +// CHECK:STDOUT: %T.as_type.loc8_18.2: type = facet_access_type %T.ref.loc8 [symbolic = %T.as_type.loc8_18.1 (constants.%T.as_type.a68)] +// CHECK:STDOUT: %.loc8_18.2: type = converted %T.ref.loc8, %T.as_type.loc8_18.2 [symbolic = %T.as_type.loc8_18.1 (constants.%T.as_type.a68)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @F.%T.as_type.loc8_19.1 (%T.as_type.a68) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @F.%T.as_type.loc8_18.1 (%T.as_type.a68) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -6363,9 +6363,9 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.Op.loc8_13.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @Destroy.Op.loc8_12.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.Op.loc8_13.2(%self.param: ref %C) { +// CHECK:STDOUT: fn @Destroy.Op.loc8_12.2(%self.param: ref %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: @@ -6375,13 +6375,13 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: generic fn @F(%T.loc8_7.2: %I.type.8a7) { // CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.7b0 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt.fb5)] // CHECK:STDOUT: %T.loc8_7.1: %I.type.8a7 = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T.e69)] -// CHECK:STDOUT: %T.as_type.loc8_19.1: type = facet_access_type %T.loc8_7.1 [symbolic = %T.as_type.loc8_19.1 (constants.%T.as_type.a68)] -// CHECK:STDOUT: %pattern_type.loc8: type = pattern_type %T.as_type.loc8_19.1 [symbolic = %pattern_type.loc8 (constants.%pattern_type.cf2)] -// CHECK:STDOUT: %t.param_patt.loc8_17.2: @F.%pattern_type.loc8 (%pattern_type.cf2) = value_param_pattern [symbolic = %t.param_patt.loc8_17.2 (constants.%t.param_patt.135)] -// CHECK:STDOUT: %t.patt.loc8_17.2: @F.%pattern_type.loc8 (%pattern_type.cf2) = at_binding_pattern t, %t.param_patt.loc8_17.2 [symbolic = %t.patt.loc8_17.2 (constants.%t.patt.1b6)] +// CHECK:STDOUT: %T.as_type.loc8_18.1: type = facet_access_type %T.loc8_7.1 [symbolic = %T.as_type.loc8_18.1 (constants.%T.as_type.a68)] +// CHECK:STDOUT: %pattern_type.loc8: type = pattern_type %T.as_type.loc8_18.1 [symbolic = %pattern_type.loc8 (constants.%pattern_type.cf2)] +// CHECK:STDOUT: %t.param_patt.loc8_16.2: @F.%pattern_type.loc8 (%pattern_type.cf2) = value_param_pattern [symbolic = %t.param_patt.loc8_16.2 (constants.%t.param_patt.135)] +// CHECK:STDOUT: %t.patt.loc8_16.2: @F.%pattern_type.loc8 (%pattern_type.cf2) = at_binding_pattern t, %t.param_patt.loc8_16.2 [symbolic = %t.patt.loc8_16.2 (constants.%t.patt.1b6)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc8: = require_complete_type %T.as_type.loc8_19.1 [symbolic = %require_complete.loc8 (constants.%require_complete.3ae)] +// CHECK:STDOUT: %require_complete.loc8: = require_complete_type %T.as_type.loc8_18.1 [symbolic = %require_complete.loc8 (constants.%require_complete.3ae)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_7.1, @I, @I(constants.%facet_value) [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness.919)] // CHECK:STDOUT: %impl.elem0.loc9_11.2: %facet_type.0e2 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.ae2)] // CHECK:STDOUT: %as_type.loc9_11.2: type = facet_access_type %impl.elem0.loc9_11.2 [symbolic = %as_type.loc9_11.2 (constants.%as_type.93c)] @@ -6403,10 +6403,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %impl.elem0.loc9_3.2: @F.%.loc9_3.4 (%.8d3) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_3.2 (constants.%impl.elem0.706)] // CHECK:STDOUT: %specific_impl_fn.loc9_3.2: = specific_impl_function %impl.elem0.loc9_3.2, @Destroy.WithSelf.Op(%Destroy.facet.loc9_3.3) [symbolic = %specific_impl_fn.loc9_3.2 (constants.%specific_impl_fn.977)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc8_19.1 (%T.as_type.a68)) { +// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc8_18.1 (%T.as_type.a68)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %u.var: ref @F.%as_type.loc9_11.2 (%as_type.93c) = var_storage %u.var_patt.loc9_3.1 -// CHECK:STDOUT: %t.ref.loc9: @F.%T.as_type.loc8_19.1 (%T.as_type.a68) = name_ref t, %t +// CHECK:STDOUT: %t.ref.loc9: @F.%T.as_type.loc8_18.1 (%T.as_type.a68) = name_ref t, %t // CHECK:STDOUT: %.loc9_17.1: %I.assoc_type.cf6 = specific_constant imports.%Main.import_ref.c5a, @I.WithSelf(constants.%facet_value, constants.%T.e69) [concrete = constants.%assoc1.9b4] // CHECK:STDOUT: %GetU.ref: %I.assoc_type.cf6 = name_ref GetU, %.loc9_17.1 [concrete = constants.%assoc1.9b4] // CHECK:STDOUT: %impl.elem1.loc9_17.1: @F.%.loc9_17.2 (%.086) = impl_witness_access constants.%I.lookup_impl_witness.919, element1 [symbolic = %impl.elem1.loc9_17.2 (constants.%impl.elem1)] @@ -6418,8 +6418,8 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: assign %u.var, %I.WithSelf.GetU.call // CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.4 [symbolic = %as_type.loc9_11.2 (constants.%as_type.93c)] { // CHECK:STDOUT: %T.ref.loc9: %I.type.8a7 = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T.e69)] -// CHECK:STDOUT: %T.as_type.loc9: type = facet_access_type %T.ref.loc9 [symbolic = %T.as_type.loc8_19.1 (constants.%T.as_type.a68)] -// CHECK:STDOUT: %.loc9_11.2: type = converted %T.ref.loc9, %T.as_type.loc9 [symbolic = %T.as_type.loc8_19.1 (constants.%T.as_type.a68)] +// CHECK:STDOUT: %T.as_type.loc9: type = facet_access_type %T.ref.loc9 [symbolic = %T.as_type.loc8_18.1 (constants.%T.as_type.a68)] +// CHECK:STDOUT: %.loc9_11.2: type = converted %T.ref.loc9, %T.as_type.loc9 [symbolic = %T.as_type.loc8_18.1 (constants.%T.as_type.a68)] // CHECK:STDOUT: %.loc9_11.3: %I.assoc_type.cf6 = specific_constant imports.%Main.import_ref.327, @I.WithSelf(constants.%facet_value, constants.%T.e69) [concrete = constants.%assoc0.64a] // CHECK:STDOUT: %U.ref: %I.assoc_type.cf6 = name_ref U, %.loc9_11.3 [concrete = constants.%assoc0.64a] // CHECK:STDOUT: %impl.elem0.loc9_11.1: %facet_type.0e2 = impl_witness_access constants.%I.lookup_impl_witness.919, element0 [symbolic = %impl.elem0.loc9_11.2 (constants.%impl.elem0.ae2)] @@ -6431,7 +6431,7 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: %u.patt.loc9_8.1: @F.%pattern_type.loc9 (%pattern_type.439) = ref_binding_pattern u [symbolic = %u.patt.loc9_8.2 (constants.%u.patt)] // CHECK:STDOUT: %u.var_patt.loc9_3.1: @F.%pattern_type.loc9 (%pattern_type.439) = var_pattern %u.patt.loc9_8.1 [symbolic = %u.var_patt.loc9_3.2 (constants.%u.var_patt)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t.ref.loc19: @F.%T.as_type.loc8_19.1 (%T.as_type.a68) = name_ref t, %t +// CHECK:STDOUT: %t.ref.loc19: @F.%T.as_type.loc8_18.1 (%T.as_type.a68) = name_ref t, %t // CHECK:STDOUT: %.loc19_4.1: %I.assoc_type.cf6 = specific_constant imports.%Main.import_ref.f14, @I.WithSelf(constants.%facet_value, constants.%T.e69) [concrete = constants.%assoc2.e5d] // CHECK:STDOUT: %TakesT.ref: %I.assoc_type.cf6 = name_ref TakesT, %.loc19_4.1 [concrete = constants.%assoc2.e5d] // CHECK:STDOUT: %impl.elem2.loc19_4.1: @F.%.loc19_4.2 (%.dea) = impl_witness_access constants.%I.lookup_impl_witness.919, element2 [symbolic = %impl.elem2.loc19_4.2 (constants.%impl.elem2)] @@ -6535,10 +6535,10 @@ fn F[T:! I(C)](t: T) { // CHECK:STDOUT: specific @F(constants.%T.e69) { // CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt.fb5 // CHECK:STDOUT: %T.loc8_7.1 => constants.%T.e69 -// CHECK:STDOUT: %T.as_type.loc8_19.1 => constants.%T.as_type.a68 +// CHECK:STDOUT: %T.as_type.loc8_18.1 => constants.%T.as_type.a68 // CHECK:STDOUT: %pattern_type.loc8 => constants.%pattern_type.cf2 -// CHECK:STDOUT: %t.param_patt.loc8_17.2 => constants.%t.param_patt.135 -// CHECK:STDOUT: %t.patt.loc8_17.2 => constants.%t.patt.1b6 +// CHECK:STDOUT: %t.param_patt.loc8_16.2 => constants.%t.param_patt.135 +// CHECK:STDOUT: %t.patt.loc8_16.2 => constants.%t.patt.1b6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%facet_value, constants.%T.e69) { diff --git a/toolchain/check/testdata/interface/require.carbon b/toolchain/check/testdata/interface/require.carbon index 8fbf2a0fd1c7..8a3b09b49b4a 100644 --- a/toolchain/check/testdata/interface/require.carbon +++ b/toolchain/check/testdata/interface/require.carbon @@ -23,9 +23,9 @@ interface Z { } //@dump-sem-ir-end -fn F(T:! Z, t:! T) { +fn F(generic T: Z, generic t: T) { // TODO: We find the name `YY`, but then fail to do impl lookup for `Y` in - // `T:! Z` since the identified facet type doesn't include `Y`. The + // `T: Z` since the identified facet type doesn't include `Y`. The // identified facet type needs to include extends inside interfaces? // CHECK:STDERR: fail_todo_extend.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Y` in type `T` that does not implement that interface [MissingImplInMemberAccess] @@ -49,7 +49,7 @@ fn F(T:! Z, t:! T) { // --- fail_todo_extend_with_self.carbon library "[[@TEST_NAME]]"; -interface Y(T:! type) { +interface Y(T: type) { fn YY(); } @@ -59,9 +59,9 @@ interface Z { } //@dump-sem-ir-end -fn F(T:! Z) { +fn F(generic T: Z) { // TODO: We find the name `YY`, but then fail to do impl lookup for `Y` in - // `T:! Z` since the identified facet type doesn't include `Y`. The + // `T: Z` since the identified facet type doesn't include `Y`. The // identified facet type needs to include extends inside interfaces? // // CHECK:STDERR: fail_todo_extend_with_self.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Y(T)` in type `T` that does not implement that interface [MissingImplInMemberAccess] @@ -89,7 +89,7 @@ interface Z { } //@dump-sem-ir-end -fn F(T:! Z) { +fn F(generic T: Z) { // CHECK:STDERR: fail_todo_implicit_self_impls.carbon:[[@LINE+4]]:3: error: cannot convert type `T` that implements `Z` into type implementing `Y` [ConversionFailureFacetToFacet] // CHECK:STDERR: T.(Y.YY)(); // CHECK:STDERR: ^~~~~~~~ @@ -110,7 +110,7 @@ interface Z { } //@dump-sem-ir-end -fn F(T:! Z) { +fn F(generic T: Z) { // CHECK:STDERR: fail_todo_explicit_self_impls.carbon:[[@LINE+4]]:3: error: cannot convert type `T` that implements `Z` into type implementing `Y` [ConversionFailureFacetToFacet] // CHECK:STDERR: T.(Y.YY)(); // CHECK:STDERR: ^~~~~~~~ @@ -129,7 +129,7 @@ interface Z { require impls Y; } -fn F(T:! Z) { +fn F(generic T: Z) { // This should fail name lookup since Z does not extend Y. // // CHECK:STDERR: fail_implicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInSpecificScope] @@ -150,7 +150,7 @@ interface Z { require Self impls Y; } -fn F(T:! Z) { +fn F(generic T: Z) { // This should fail name lookup since Z does not extend Y. // // CHECK:STDERR: fail_explicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInSpecificScope] @@ -165,7 +165,7 @@ library "[[@TEST_NAME]]"; interface Y {} -class C(T:! type); +class C(T: type); //@dump-sem-ir-begin interface Z { @@ -180,13 +180,13 @@ interface Y { fn YY(); } -class C(T:! type); +class C(T: type); interface Z { require C(Self) impls Y; } -fn F(T:! Z) { +fn F(generic T: Z) { // This fails because `T impls Z` implies that `C(T) impls Y`, not that // `T impls Y`. // CHECK:STDERR: fail_non_self_doesnt_provide_witness_for_self.carbon:[[@LINE+4]]:3: error: cannot convert type `T` that implements `Z` into type implementing `Y` [ConversionFailureFacetToFacet] @@ -203,13 +203,13 @@ interface Y { fn YY(); } -class C(T:! type); +class C(T: type); interface Z { require C(Self) impls Y; } -fn F(T:! Z) { +fn F(generic T: Z) { // CHECK:STDERR: fail_todo_non_self_provide_witness_for_non_self.carbon:[[@LINE+4]]:3: error: cannot convert type `C(T)` into type implementing `Y` [ConversionFailureTypeToFacet] // CHECK:STDERR: C(T).(Y.YY)(); // CHECK:STDERR: ^~~~~~~~~~~ @@ -220,7 +220,7 @@ fn F(T:! Z) { // --- require_impls_where.carbon library "[[@TEST_NAME]]"; -interface Y { let Y1:! type; } +interface Y { let Y1: type; } //@dump-sem-ir-begin interface Z { @@ -232,7 +232,7 @@ interface Z { library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -interface Z(T:! type) { +interface Z(T: type) { require T impls Z(Self); } //@dump-sem-ir-end @@ -241,10 +241,10 @@ interface Z(T:! type) { library "[[@TEST_NAME]]"; interface Y { - let Y1:! type; + let Y1: type; } -interface Z(T:! type) { +interface Z(T: type) { // Either the type `T` or the facet type `Y` must mention `Self` in a way that // it would appear in the type structure used for impl lookup (so inside a // `where` does not count). But they don't. @@ -259,9 +259,9 @@ interface Z(T:! type) { // --- fail_require_impls_without_self_in_one_interface.carbon library "[[@TEST_NAME]]"; -interface Y(T:! type) {} +interface Y(T: type) {} -interface Z(T:! type) { +interface Z(T: type) { // Self is in one interface but not the other. // // CHECK:STDERR: fail_require_impls_without_self_in_one_interface.carbon:[[@LINE+4]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but found interface `Y({})` without a `Self` argument [RequireImplsMissingSelf] @@ -274,9 +274,9 @@ interface Z(T:! type) { // --- fail_require_impls_without_self_in_multiple_interfaces.carbon library "[[@TEST_NAME]]"; -interface Y(T:! type) {} +interface Y(T: type) {} -interface Z(T:! type) { +interface Z(T: type) { // Self does not appear in either interface, we should get an error for each. // // CHECK:STDERR: fail_require_impls_without_self_in_multiple_interfaces.carbon:[[@LINE+8]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but found interface `Y(())` without a `Self` argument [RequireImplsMissingSelf] @@ -293,7 +293,7 @@ interface Z(T:! type) { // --- fail_self_impls_self.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { +interface Z(T: type) { // CHECK:STDERR: fail_self_impls_self.carbon:[[@LINE+4]]:17: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType] // CHECK:STDERR: require impls Self; // CHECK:STDERR: ^~~~ @@ -304,9 +304,9 @@ interface Z(T:! type) { // --- fail_impls_type.carbon library "[[@TEST_NAME]]"; -class C(T:! type) {} +class C(T: type) {} -interface Z(T:! type) { +interface Z(T: type) { // CHECK:STDERR: fail_impls_type.carbon:[[@LINE+4]]:19: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType] // CHECK:STDERR: require T impls C(Self); // CHECK:STDERR: ^~~~~~~ @@ -319,7 +319,7 @@ library "[[@TEST_NAME]]"; interface Y {} -interface Z(T:! type) { +interface Z(T: type) { // CHECK:STDERR: fail_non_type_impls.carbon:[[@LINE+7]]:11: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet] // CHECK:STDERR: require 1 impls Y; // CHECK:STDERR: ^ @@ -335,7 +335,7 @@ library "[[@TEST_NAME]]"; interface Y {} -interface Z(T:! type) { +interface Z(T: type) { // CHECK:STDERR: fail_impls_non_type.carbon:[[@LINE+4]]:17: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType] // CHECK:STDERR: require impls 1; // CHECK:STDERR: ^ @@ -347,7 +347,7 @@ interface Z(T:! type) { library "[[@TEST_NAME]]"; interface Y { - let Y1:! type; + let Y1: type; } //@dump-sem-ir-begin @@ -365,7 +365,7 @@ interface Y { } //@dump-sem-ir-begin -interface Z(T:! type) { +interface Z(T: type) { // This is okay because an interface Z can be identified before it's complete, // unlike a named constraint. require impls Z(T); @@ -783,9 +783,9 @@ interface Z(T:! type) { // CHECK:STDOUT: %Z.decl: %Z.type.c39 = interface_decl @Z [concrete = constants.%Z.generic] { // CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] // CHECK:STDOUT: } @@ -797,10 +797,10 @@ interface Z(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc4_14.1)> [symbolic = %Z.type (constants.%Z.type.924)] -// CHECK:STDOUT: %Self.loc4_23.2: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc4_22.2: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_23.1: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc4_22.1: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self)] // CHECK:STDOUT: %Z.WithSelf.decl = interface_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -809,7 +809,7 @@ interface Z(T:! type) { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @Z.%T.loc4_14.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Z.ref: %Z.type.c39 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] -// CHECK:STDOUT: %.loc5_21: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.924) = specific_constant @Z.%Self.loc4_23.1, @Z(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc5_21: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.924) = specific_constant @Z.%Self.loc4_22.1, @Z(constants.%T) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.924) = name_ref Self, %.loc5_21 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc5_25.1: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_25.2 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc5_25: type = converted %Self.ref, %Self.as_type.loc5_25.1 [symbolic = %Self.as_type.loc5_25.2 (constants.%Self.as_type)] @@ -817,7 +817,7 @@ interface Z(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_23.1 +// CHECK:STDOUT: .Self = %Self.loc4_22.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .Z = // CHECK:STDOUT: .T = @@ -833,7 +833,7 @@ interface Z(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.WithSelf.T.impls.Z.type.require(@Z.%T.loc4_14.2: type, @Z.%Self.loc4_23.1: @Z.%Z.type (%Z.type.924)) { +// CHECK:STDOUT: generic require @Z.WithSelf.T.impls.Z.type.require(@Z.%T.loc4_14.2: type, @Z.%Self.loc4_22.1: @Z.%Z.type (%Z.type.924)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Z.type.loc5_21: type = facet_type <@Z, @Z(%T)> [symbolic = %Z.type.loc5_21 (constants.%Z.type.924)] // CHECK:STDOUT: %Self: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] @@ -960,9 +960,9 @@ interface Z(T:! type) { // CHECK:STDOUT: %Z.decl: %Z.type.c39 = interface_decl @Z [concrete = constants.%Z.generic] { // CHECK:STDOUT: %T.patt.loc8_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_16.1: type = splice_block %.loc8_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)] // CHECK:STDOUT: } @@ -974,24 +974,24 @@ interface Z(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc8_14.1)> [symbolic = %Z.type (constants.%Z.type.924)] -// CHECK:STDOUT: %Self.loc8_23.2: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc8_23.2 (constants.%Self.21f)] +// CHECK:STDOUT: %Self.loc8_22.2: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc8_22.2 (constants.%Self.21f)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc8_23.1: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc8_23.2 (constants.%Self.21f)] +// CHECK:STDOUT: %Self.loc8_22.1: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc8_22.2 (constants.%Self.21f)] // CHECK:STDOUT: %Z.WithSelf.decl = interface_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %Z.WithSelf.Self.as_type.impls.Z.type.require.decl = require_decl @Z.WithSelf.Self.as_type.impls.Z.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type.loc11_11.1 impls %Z.type.loc11_20 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_type.loc11_11.1: type = facet_access_type @Z.%Self.loc8_23.1 [symbolic = %Self.as_type.loc11_11.2 (constants.%Self.as_type.a0d)] +// CHECK:STDOUT: %Self.as_type.loc11_11.1: type = facet_access_type @Z.%Self.loc8_22.1 [symbolic = %Self.as_type.loc11_11.2 (constants.%Self.as_type.a0d)] // CHECK:STDOUT: %Z.ref: %Z.type.c39 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, @Z.%T.loc8_14.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Z.type.loc11_20: type = facet_type <@Z, @Z(constants.%T)> [symbolic = %Z.type.loc11_11 (constants.%Z.type.924)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc8_23.1 +// CHECK:STDOUT: .Self = %Self.loc8_22.1 // CHECK:STDOUT: .Z = // CHECK:STDOUT: .T = // CHECK:STDOUT: .Z = @@ -1007,7 +1007,7 @@ interface Z(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.WithSelf.Self.as_type.impls.Z.type.require(@Z.%T.loc8_14.2: type, @Z.%Self.loc8_23.1: @Z.%Z.type (%Z.type.924)) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.as_type.impls.Z.type.require(@Z.%T.loc8_14.2: type, @Z.%Self.loc8_22.1: @Z.%Z.type (%Z.type.924)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Z.type.loc11_11: type = facet_type <@Z, @Z(%T)> [symbolic = %Z.type.loc11_11 (constants.%Z.type.924)] // CHECK:STDOUT: %Self: @Z.WithSelf.Self.as_type.impls.Z.type.require.%Z.type.loc11_11 (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.21f)] diff --git a/toolchain/check/testdata/interface/syntactic_merge.carbon b/toolchain/check/testdata/interface/syntactic_merge.carbon index 528f0863efcf..f93143561717 100644 --- a/toolchain/check/testdata/interface/syntactic_merge.carbon +++ b/toolchain/check/testdata/interface/syntactic_merge.carbon @@ -19,11 +19,11 @@ library "[[@TEST_NAME]]"; class C {} alias D = C; -interface Foo(a:! C); -interface Foo(a:! C) {} +interface Foo(a: C); +interface Foo(a: C) {} -interface Bar(a:! D); -interface Bar(a:! D) {} +interface Bar(a: D); +interface Bar(a: D) {} // --- spacing.carbon @@ -31,8 +31,8 @@ library "[[@TEST_NAME]]"; class C {} -interface Foo [ ] ( a :! C ); -interface Foo[](a:! C) {} +interface Foo [ ] ( a : C ); +interface Foo[](a: C) {} // --- fail_parens.carbon @@ -40,15 +40,15 @@ library "[[@TEST_NAME]]"; class C {} -interface Foo(a:! C); -// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] -// CHECK:STDERR: interface Foo(a:! (C)) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] -// CHECK:STDERR: interface Foo(a:! C); -// CHECK:STDERR: ^ +interface Foo(a: C); +// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:18: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] +// CHECK:STDERR: interface Foo(a: (C)) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:18: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] +// CHECK:STDERR: interface Foo(a: C); +// CHECK:STDERR: ^ // CHECK:STDERR: -interface Foo(a:! (C)) {} +interface Foo(a: (C)) {} // --- fail_raw_identifier.carbon @@ -56,15 +56,15 @@ library "[[@TEST_NAME]]"; class C {} -interface Foo(a:! C); -// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] -// CHECK:STDERR: interface Foo(a:! r#C) {} -// CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] -// CHECK:STDERR: interface Foo(a:! C); -// CHECK:STDERR: ^ +interface Foo(a: C); +// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE+7]]:18: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] +// CHECK:STDERR: interface Foo(a: r#C) {} +// CHECK:STDERR: ^~~ +// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE-4]]:18: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] +// CHECK:STDERR: interface Foo(a: C); +// CHECK:STDERR: ^ // CHECK:STDERR: -interface Foo(a:! r#C) {} +interface Foo(a: r#C) {} // --- two_file.carbon @@ -73,31 +73,31 @@ library "[[@TEST_NAME]]"; class C {} alias D = C; -interface Foo(a:! C); -interface Bar(a:! D); +interface Foo(a: C); +interface Bar(a: D); // --- fail_todo_two_file.impl.carbon impl library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+8]]:11: error: duplicate name `Foo` being declared in the same scope [NameDeclDuplicate] -// CHECK:STDERR: interface Foo(a:! C) {} +// CHECK:STDERR: interface Foo(a: C) {} // CHECK:STDERR: ^~~ // CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-5]]:1: in import [InImport] // CHECK:STDERR: two_file.carbon:7:1: note: name is previously declared here [NameDeclPrevious] -// CHECK:STDERR: interface Foo(a:! C); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: interface Foo(a: C); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -interface Foo(a:! C) {} +interface Foo(a: C) {} // CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+8]]:11: error: duplicate name `Bar` being declared in the same scope [NameDeclDuplicate] -// CHECK:STDERR: interface Bar(a:! D) {} +// CHECK:STDERR: interface Bar(a: D) {} // CHECK:STDERR: ^~~ // CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-14]]:1: in import [InImport] // CHECK:STDERR: two_file.carbon:8:1: note: name is previously declared here [NameDeclPrevious] -// CHECK:STDERR: interface Bar(a:! D); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: interface Bar(a: D); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -interface Bar(a:! D) {} +interface Bar(a: D) {} // --- fail_name_mismatch.carbon @@ -106,15 +106,15 @@ library "[[@TEST_NAME]]"; class C {} alias D = C; -interface Foo(a:! C); +interface Foo(a: C); // CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:15: error: redeclaration differs at parameter 1 [RedeclParamDiffers] -// CHECK:STDERR: interface Foo(b:! D) {} -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: interface Foo(b: D) {} +// CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:15: note: previous declaration's corresponding parameter here [RedeclParamPrevious] -// CHECK:STDERR: interface Foo(a:! C); -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: interface Foo(a: C); +// CHECK:STDERR: ^~~~ // CHECK:STDERR: -interface Foo(b:! D) {} +interface Foo(b: D) {} // --- fail_alias.carbon @@ -123,15 +123,15 @@ library "[[@TEST_NAME]]"; class C {} alias D = C; -interface Foo(a:! C); -// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] -// CHECK:STDERR: interface Foo(a:! D) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] -// CHECK:STDERR: interface Foo(a:! C); -// CHECK:STDERR: ^ +interface Foo(a: C); +// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:18: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] +// CHECK:STDERR: interface Foo(a: D) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:18: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] +// CHECK:STDERR: interface Foo(a: C); +// CHECK:STDERR: ^ // CHECK:STDERR: -interface Foo(a:! D) {} +interface Foo(a: D) {} // --- fail_deduced_alias.carbon @@ -140,15 +140,15 @@ library "[[@TEST_NAME]]"; class C {} alias D = C; -interface Foo[a:! C](); -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] -// CHECK:STDERR: interface Foo[a:! D]() {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] -// CHECK:STDERR: interface Foo[a:! C](); -// CHECK:STDERR: ^ +interface Foo[a: C](); +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:18: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] +// CHECK:STDERR: interface Foo[a: D]() {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:18: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] +// CHECK:STDERR: interface Foo[a: C](); +// CHECK:STDERR: ^ // CHECK:STDERR: -interface Foo[a:! D]() {} +interface Foo[a: D]() {} // --- alias_two_file.carbon @@ -156,7 +156,7 @@ library "[[@TEST_NAME]]"; class C {} -interface Foo(a:! C); +interface Foo(a: C); // --- fail_alias_two_file.impl.carbon @@ -168,14 +168,14 @@ alias D = C; // fail due to `C` versus `D`, but may succeed if importing interfaces is fixed // before syntax matching on imports is supported. // CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE+8]]:11: error: duplicate name `Foo` being declared in the same scope [NameDeclDuplicate] -// CHECK:STDERR: interface Foo(a:! D) {} +// CHECK:STDERR: interface Foo(a: D) {} // CHECK:STDERR: ^~~ // CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE-10]]:1: in import [InImport] // CHECK:STDERR: alias_two_file.carbon:6:1: note: name is previously declared here [NameDeclPrevious] -// CHECK:STDERR: interface Foo(a:! C); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: interface Foo(a: C); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -interface Foo(a:! D) {} +interface Foo(a: D) {} // --- fail_repeat_const.carbon @@ -183,19 +183,19 @@ library "[[@TEST_NAME]]"; class C {} -interface Foo(a:! const C); -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+11]]:19: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst] -// CHECK:STDERR: interface Foo(a:! const (const C)) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~ +interface Foo(a: const C); +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+11]]:18: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst] +// CHECK:STDERR: interface Foo(a: const (const C)) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+7]]:25: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] -// CHECK:STDERR: interface Foo(a:! const (const C)) {} -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:25: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] -// CHECK:STDERR: interface Foo(a:! const C); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+7]]:24: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] +// CHECK:STDERR: interface Foo(a: const (const C)) {} +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:24: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] +// CHECK:STDERR: interface Foo(a: const C); +// CHECK:STDERR: ^ // CHECK:STDERR: -interface Foo(a:! const (const C)) {} +interface Foo(a: const (const C)) {} // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: @@ -272,14 +272,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Foo.type: type = facet_type <@Foo, @Foo(%a.loc7_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)] -// CHECK:STDOUT: %Self.loc8_22.2: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc8_22.2 (constants.%Self.a95)] +// CHECK:STDOUT: %Self.loc8_21.2: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc8_21.2 (constants.%Self.a95)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc8_22.1: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc8_22.2 (constants.%Self.a95)] +// CHECK:STDOUT: %Self.loc8_21.1: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc8_21.2 (constants.%Self.a95)] // CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc8_22.1 +// CHECK:STDOUT: .Self = %Self.loc8_21.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -294,14 +294,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Bar.type: type = facet_type <@Bar, @Bar(%a.loc10_16.1)> [symbolic = %Bar.type (constants.%Bar.type.ab7)] -// CHECK:STDOUT: %Self.loc11_22.2: @Bar.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc11_22.2 (constants.%Self.a90)] +// CHECK:STDOUT: %Self.loc11_21.2: @Bar.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc11_21.2 (constants.%Self.a90)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc11_22.1: @Bar.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc11_22.2 (constants.%Self.a90)] +// CHECK:STDOUT: %Self.loc11_21.1: @Bar.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc11_21.2 (constants.%Self.a90)] // CHECK:STDOUT: %Bar.WithSelf.decl = interface_with_self_decl @Bar [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc11_22.1 +// CHECK:STDOUT: .Self = %Self.loc11_21.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -381,14 +381,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Foo.type: type = facet_type <@Foo, @Foo(%a.loc6_23.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)] -// CHECK:STDOUT: %Self.loc7_24.2: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc7_24.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc7_23.2: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc7_23.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc7_24.1: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc7_24.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc7_23.1: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc7_23.2 (constants.%Self)] // CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc7_24.1 +// CHECK:STDOUT: .Self = %Self.loc7_23.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -470,14 +470,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc14, @Foo.loc14(%a.loc14_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)] -// CHECK:STDOUT: %Self.loc14_24.2: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc14_23.2: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_23.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc14_24.1: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc14_23.1: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_23.2 (constants.%Self)] // CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc14 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc14_24.1 +// CHECK:STDOUT: .Self = %Self.loc14_23.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -564,14 +564,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc14, @Foo.loc14(%a.loc14_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)] -// CHECK:STDOUT: %Self.loc14_24.2: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc14_23.2: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_23.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc14_24.1: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc14_23.1: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_23.2 (constants.%Self)] // CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc14 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc14_24.1 +// CHECK:STDOUT: .Self = %Self.loc14_23.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -757,14 +757,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc12, @Foo.loc12(%a.loc12_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)] -// CHECK:STDOUT: %Self.loc12_22.2: @Foo.loc12.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc12_22.2 (constants.%Self.a95)] +// CHECK:STDOUT: %Self.loc12_21.2: @Foo.loc12.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc12_21.2 (constants.%Self.a95)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc12_22.1: @Foo.loc12.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc12_22.2 (constants.%Self.a95)] +// CHECK:STDOUT: %Self.loc12_21.1: @Foo.loc12.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc12_21.2 (constants.%Self.a95)] // CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc12 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc12_22.1 +// CHECK:STDOUT: .Self = %Self.loc12_21.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -786,14 +786,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Bar.type: type = facet_type <@Bar.loc21, @Bar.loc21(%a.loc21_16.1)> [symbolic = %Bar.type (constants.%Bar.type.ab7)] -// CHECK:STDOUT: %Self.loc21_22.2: @Bar.loc21.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc21_22.2 (constants.%Self.a90)] +// CHECK:STDOUT: %Self.loc21_21.2: @Bar.loc21.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc21_21.2 (constants.%Self.a90)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc21_22.1: @Bar.loc21.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc21_22.2 (constants.%Self.a90)] +// CHECK:STDOUT: %Self.loc21_21.1: @Bar.loc21.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc21_21.2 (constants.%Self.a90)] // CHECK:STDOUT: %Bar.WithSelf.decl = interface_with_self_decl @Bar.loc21 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc21_22.1 +// CHECK:STDOUT: .Self = %Self.loc21_21.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -896,14 +896,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc15, @Foo.loc15(%b.loc15_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)] -// CHECK:STDOUT: %Self.loc15_22.2: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc15_21.2: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_21.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc15_22.1: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc15_21.1: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_21.2 (constants.%Self)] // CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc15 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc15_22.1 +// CHECK:STDOUT: .Self = %Self.loc15_21.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -993,14 +993,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc15, @Foo.loc15(%a.loc15_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)] -// CHECK:STDOUT: %Self.loc15_22.2: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc15_21.2: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_21.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc15_22.1: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc15_21.1: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_21.2 (constants.%Self)] // CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc15 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc15_22.1 +// CHECK:STDOUT: .Self = %Self.loc15_21.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1090,14 +1090,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc15, @Foo.loc15(%a.loc15_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)] -// CHECK:STDOUT: %Self.loc15_24.2: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_24.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc15_23.2: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_23.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc15_24.1: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_24.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc15_23.1: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_23.2 (constants.%Self)] // CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc15 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc15_24.1 +// CHECK:STDOUT: .Self = %Self.loc15_23.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1239,14 +1239,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc17, @Foo.loc17(%a.loc17_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)] -// CHECK:STDOUT: %Self.loc17_22.2: @Foo.loc17.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc17_22.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc17_21.2: @Foo.loc17.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc17_21.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc17_22.1: @Foo.loc17.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc17_22.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc17_21.1: @Foo.loc17.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc17_21.2 (constants.%Self)] // CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc17 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc17_22.1 +// CHECK:STDOUT: .Self = %Self.loc17_21.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1313,11 +1313,11 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Foo.decl.loc18: %Foo.type.bc6a25.2 = interface_decl @Foo.loc18 [concrete = constants.%Foo.generic.d3ea5a.2] { // CHECK:STDOUT: %a.patt.loc18_16.1: %pattern_type = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc18_16.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18: type = splice_block %const.loc18_19 [concrete = constants.%const] { +// CHECK:STDOUT: %.loc18: type = splice_block %const.loc18_18 [concrete = constants.%const] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %const.loc18_26: type = const_type %C.ref [concrete = constants.%const] -// CHECK:STDOUT: %const.loc18_19: type = const_type %const.loc18_26 [concrete = constants.%const] +// CHECK:STDOUT: %const.loc18_25: type = const_type %C.ref [concrete = constants.%const] +// CHECK:STDOUT: %const.loc18_18: type = const_type %const.loc18_25 [concrete = constants.%const] // CHECK:STDOUT: } // CHECK:STDOUT: %a.loc18_16.2: %const = symbolic_binding a, 0 [symbolic = %a.loc18_16.1 (constants.%a)] // CHECK:STDOUT: } @@ -1336,14 +1336,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc18, @Foo.loc18(%a.loc18_16.1)> [symbolic = %Foo.type (constants.%Foo.type.b25)] -// CHECK:STDOUT: %Self.loc18_36.2: @Foo.loc18.%Foo.type (%Foo.type.b25) = symbolic_binding Self, 1 [symbolic = %Self.loc18_36.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc18_35.2: @Foo.loc18.%Foo.type (%Foo.type.b25) = symbolic_binding Self, 1 [symbolic = %Self.loc18_35.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc18_36.1: @Foo.loc18.%Foo.type (%Foo.type.b25) = symbolic_binding Self, 1 [symbolic = %Self.loc18_36.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc18_35.1: @Foo.loc18.%Foo.type (%Foo.type.b25) = symbolic_binding Self, 1 [symbolic = %Self.loc18_35.2 (constants.%Self)] // CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc18 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc18_36.1 +// CHECK:STDOUT: .Self = %Self.loc18_35.1 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index f5a2ddcfdbb5..9756cb272409 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -19,8 +19,8 @@ interface I { // TODO: An associated constant with an initializer without `default` in an // interface should be rejected. - let T:! type = (i32, i32); - let N:! i32 = 42; + let T: type = (i32, i32); + let N: i32 = 42; } // CHECK:STDOUT: --- todo_define_not_default.carbon @@ -122,21 +122,21 @@ interface I { // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %I.WithSelf.G.decl [concrete = constants.%assoc1] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.WithSelf.%T [concrete = constants.%assoc2] -// CHECK:STDOUT: %i32.loc22_19: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %i32.loc22_24: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc22_27: %tuple.type.24b = tuple_literal (%i32.loc22_19, %i32.loc22_24) [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc22_28: type = converted %.loc22_27, constants.%tuple.type.e55 [concrete = constants.%tuple.type.e55] +// CHECK:STDOUT: %i32.loc22_18: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %i32.loc22_23: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc22_26: %tuple.type.24b = tuple_literal (%i32.loc22_18, %i32.loc22_23) [concrete = constants.%tuple] +// CHECK:STDOUT: %.loc22_27: type = converted %.loc22_26, constants.%tuple.type.e55 [concrete = constants.%tuple.type.e55] // CHECK:STDOUT: } // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] { // CHECK:STDOUT: %assoc3: %I.assoc_type = assoc_entity element3, @I.WithSelf.%N [concrete = constants.%assoc3] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] -// CHECK:STDOUT: %bound_method.loc23_19.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] +// CHECK:STDOUT: %bound_method.loc23_18.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc23_19.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc23_19.2(%int_42) [concrete = constants.%int_42.ac4] -// CHECK:STDOUT: %.loc23_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_42.ac4] -// CHECK:STDOUT: %.loc23_19.2: %i32 = converted %int_42, %.loc23_19.1 [concrete = constants.%int_42.ac4] +// CHECK:STDOUT: %bound_method.loc23_18.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc23_18.2(%int_42) [concrete = constants.%int_42.ac4] +// CHECK:STDOUT: %.loc23_18.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_42.ac4] +// CHECK:STDOUT: %.loc23_18.2: %i32 = converted %int_42, %.loc23_18.1 [concrete = constants.%int_42.ac4] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/interop/cpp/class/export/class.carbon b/toolchain/check/testdata/interop/cpp/class/export/class.carbon index ffe6ee17f1c1..8b4de376582e 100644 --- a/toolchain/check/testdata/interop/cpp/class/export/class.carbon +++ b/toolchain/check/testdata/interop/cpp/class/export/class.carbon @@ -78,7 +78,7 @@ library "[[@TEST_NAME]]"; import Cpp; -class B(N:! i32) { +class B(N: i32) { var a: array(i8, N); } diff --git a/toolchain/check/testdata/interop/cpp/class/import/class.carbon b/toolchain/check/testdata/interop/cpp/class/import/class.carbon index 4b76c9742709..abe3d660f775 100644 --- a/toolchain/check/testdata/interop/cpp/class/import/class.carbon +++ b/toolchain/check/testdata/interop/cpp/class/import/class.carbon @@ -232,7 +232,7 @@ import Cpp inline ''' class Class1; '''; -class Generic(x:! Core.Copy) { +class Generic(x: Core.Copy) { } // CHECK:STDERR: fail_copy_witness_of_incomplete_class.carbon:[[@LINE+14]]:19: error: argument to C++ call has incomplete type `Cpp.Class1` [IncompleteTypeInCopyWitness] @@ -242,8 +242,8 @@ class Generic(x:! Core.Copy) { // CHECK:STDERR: class Class1; // CHECK:STDERR: ^ // CHECK:STDERR: fail_copy_witness_of_incomplete_class.carbon:[[@LINE-9]]:15: note: initializing generic parameter `x` declared here [InitializingGenericParam] -// CHECK:STDERR: class Generic(x:! Core.Copy) { -// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: class Generic(x: Core.Copy) { +// CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_copy_witness_of_incomplete_class.carbon:[[@LINE+4]]:15: warning: binding `p2` unused [UnusedBinding] // CHECK:STDERR: fn GenericUse(p2: Generic(Cpp.Class1)) { diff --git a/toolchain/check/testdata/interop/cpp/class/import/constructor.carbon b/toolchain/check/testdata/interop/cpp/class/import/constructor.carbon index 65ef093e3dfd..de14b6da7a1d 100644 --- a/toolchain/check/testdata/interop/cpp/class/import/constructor.carbon +++ b/toolchain/check/testdata/interop/cpp/class/import/constructor.carbon @@ -49,7 +49,7 @@ fn F() { //@dump-sem-ir-end } -fn G(T:! Core.Default & Core.Destroy) { +fn G(generic T: Core.Default & Core.Destroy) { var unused x: T; } @@ -75,7 +75,7 @@ library "[[@TEST_NAME]]"; import Cpp library "default.h"; -fn G(T:! Core.Default & Core.Destroy) { +fn G(generic T: Core.Default & Core.Destroy) { var unused x: T; } @@ -83,9 +83,9 @@ fn CallG() { // CHECK:STDERR: fail_no_default.carbon:[[@LINE+7]]:3: error: cannot convert type `NoDefault` into type implementing `Core.Default & Core.Destroy` [ConversionFailureTypeToFacet] // CHECK:STDERR: G(Cpp.NoDefault); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_no_default.carbon:[[@LINE-8]]:6: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn G(T:! Core.Default & Core.Destroy) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_no_default.carbon:[[@LINE-8]]:14: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn G(generic T: Core.Default & Core.Destroy) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: G(Cpp.NoDefault); } diff --git a/toolchain/check/testdata/interop/cpp/enum/eq.carbon b/toolchain/check/testdata/interop/cpp/enum/eq.carbon index 0cece24baaa6..b126aee10886 100644 --- a/toolchain/check/testdata/interop/cpp/enum/eq.carbon +++ b/toolchain/check/testdata/interop/cpp/enum/eq.carbon @@ -32,7 +32,7 @@ library "[[@TEST_NAME]]"; import Cpp library "enum.h"; -fn CompareGeneric[U:! type, T:! Core.EqWith(U)](x: T, y: U) -> bool { +fn CompareGeneric[U: type, T: Core.EqWith(U)](x: T, y: U) -> bool { return x == y; } fn CompareUnscoped(x: Cpp.Unscoped, y: Cpp.Unscoped) -> bool { @@ -53,7 +53,7 @@ library "[[@TEST_NAME]]"; import Cpp library "overloaded.h"; -fn CompareGeneric[U:! type, T:! Core.EqWith(U)](x: T, y: U) -> bool { +fn CompareGeneric[U: type, T: Core.EqWith(U)](x: T, y: U) -> bool { return x == y; } @@ -71,7 +71,7 @@ library "[[@TEST_NAME]]"; import Cpp library "enum.h"; -fn CompareGeneric[U:! type, T:! Core.EqWith(U)](x: T, y: U) -> bool { +fn CompareGeneric[U: type, T: Core.EqWith(U)](x: T, y: U) -> bool { return x == y; } @@ -80,8 +80,8 @@ fn CompareHeterogeneousFail(x: Cpp.Scoped, y: Cpp.Unscoped) -> bool { // CHECK:STDERR: return CompareGeneric(x, y); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_heterogeneous.carbon:[[@LINE-8]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn CompareGeneric[U:! type, T:! Core.EqWith(U)](x: T, y: U) -> bool { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn CompareGeneric[U: type, T: Core.EqWith(U)](x: T, y: U) -> bool { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: return CompareGeneric(x, y); } diff --git a/toolchain/check/testdata/interop/cpp/function/export/function.carbon b/toolchain/check/testdata/interop/cpp/function/export/function.carbon index f1a95f049495..e711c09cfcb6 100644 --- a/toolchain/check/testdata/interop/cpp/function/export/function.carbon +++ b/toolchain/check/testdata/interop/cpp/function/export/function.carbon @@ -17,8 +17,8 @@ fn F1() {} fn F2() -> i32 { return 0; } fn F3(_: i32) {} -fn HasGenericArg(T:! type, a: T) { a; } -fn HasDeducedArg[T:! type](a: T) { a; } +fn HasGenericArg(generic T: type, a: T) { a; } +fn HasDeducedArg[T: type](a: T) { a; } // --- function.carbon @@ -87,12 +87,12 @@ library "[[@TEST_NAME]]"; // CHECK:STDERR: fail_todo_generic.carbon:[[@LINE+9]]:1: in import [InImport] // CHECK:STDERR: other.carbon:7:1: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch] -// CHECK:STDERR: fn HasGenericArg(T:! type, a: T) { a; } -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn HasGenericArg(generic T: type, a: T) { a; } +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_generic.carbon:[[@LINE+5]]:1: in import [InImport] // CHECK:STDERR: other.carbon:7:1: note: calling function declared here [InCallToEntity] -// CHECK:STDERR: fn HasGenericArg(T:! type, a: T) { a; } -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn HasGenericArg(generic T: type, a: T) { a; } +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: import Other; import Cpp inline ''' diff --git a/toolchain/check/testdata/interop/cpp/function/export/generic.carbon b/toolchain/check/testdata/interop/cpp/function/export/generic.carbon index fcbfe3f965d8..0988c51da093 100644 --- a/toolchain/check/testdata/interop/cpp/function/export/generic.carbon +++ b/toolchain/check/testdata/interop/cpp/function/export/generic.carbon @@ -30,7 +30,7 @@ class B { } } -fn F[T:! I](t: T) { +fn F[T: I](t: T) { t.Doit(); } @@ -49,10 +49,10 @@ library "[[@TEST_NAME]]"; import Cpp; // CHECK:STDERR: fail_todo_non_type_generic.carbon:[[@LINE+4]]:1: error: semantics TODO: `binding maps to a non-type template parameter` [SemanticsTodo] -// CHECK:STDERR: fn F[unused N:! i32]() {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn F[unused N: i32]() {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F[unused N:! i32]() {} +fn F[unused N: i32]() {} inline Cpp ''' void G() { @@ -72,7 +72,7 @@ void G() { library "[[@TEST_NAME]]"; import Cpp; -fn F[T:! type](unused t: T*) {} +fn F[T: type](unused t: T*) {} inline Cpp ''' void G() { @@ -81,9 +81,9 @@ void G() { // CHECK:STDERR: fail_todo_generic_pointer.carbon:[[@LINE+7]]:3: error: no matching function for call to 'F' [CppInteropParseError] // CHECK:STDERR: 17 | Carbon::F(p); // CHECK:STDERR: | ^~~~~~~~~ - // CHECK:STDERR: fail_todo_generic_pointer.carbon:[[@LINE-9]]:30: note: candidate template ignored: deduced type 'T * _Nonnull' of 1st parameter does not match adjusted type 'int * _Nonnull' of argument [with T = int] [CppInteropParseNote] - // CHECK:STDERR: 4 | fn F[T:! type](unused t: T*) {} - // CHECK:STDERR: | ^ + // CHECK:STDERR: fail_todo_generic_pointer.carbon:[[@LINE-9]]:29: note: candidate template ignored: deduced type 'T * _Nonnull' of 1st parameter does not match adjusted type 'int * _Nonnull' of argument [with T = int] [CppInteropParseNote] + // CHECK:STDERR: 4 | fn F[T: type](unused t: T*) {} + // CHECK:STDERR: | ^ // CHECK:STDERR: Carbon::F(p); } @@ -93,8 +93,8 @@ void G() { library "[[@TEST_NAME]]"; import Cpp; -class A(T:! type) { - fn F[U:! type](x: T, y: U); +class A(T: type) { + fn F[U: type](x: T, y: U); } alias B = A(i32); @@ -121,10 +121,10 @@ library "[[@TEST_NAME]]"; import Cpp; // CHECK:STDERR: fail_generic_unsupported_type.carbon:[[@LINE+4]]:1: error: semantics TODO: `failed to import C++ type` [SemanticsTodo] -// CHECK:STDERR: fn F[T:! type](unused t: T) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn F[T: type](unused t: T) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F[T:! type](unused t: T) {} +fn F[T: type](unused t: T) {} inline Cpp ''' void G() { @@ -132,9 +132,9 @@ void G() { // CHECK:STDERR: fail_generic_unsupported_type.carbon:[[@LINE+7]]:3: error: no matching function for call to 'F' [CppInteropParseError] // CHECK:STDERR: 20 | Carbon::F(x); // CHECK:STDERR: | ^~~~~~~~~ - // CHECK:STDERR: fail_generic_unsupported_type.carbon:[[@LINE-8]]:29: note: candidate template ignored: substitution failure [with T = volatile int] [CppInteropParseNote] - // CHECK:STDERR: 8 | fn F[T:! type](unused t: T) {} - // CHECK:STDERR: | ^ + // CHECK:STDERR: fail_generic_unsupported_type.carbon:[[@LINE-8]]:28: note: candidate template ignored: substitution failure [with T = volatile int] [CppInteropParseNote] + // CHECK:STDERR: 8 | fn F[T: type](unused t: T) {} + // CHECK:STDERR: | ^ // CHECK:STDERR: Carbon::F(x); } @@ -231,21 +231,21 @@ void G() { // CHECK:STDOUT: %B.decl: type = class_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt.loc20_7.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %t.param_patt.loc20_14.1: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %t.param_patt.loc20_14.2 (constants.%t.param_patt.5db)] -// CHECK:STDOUT: %t.patt.loc20_14.1: @F.%pattern_type (%pattern_type.b3a) = at_binding_pattern t, %t.param_patt.loc20_14.1 [symbolic = %t.patt.loc20_14.2 (constants.%t.patt.030)] +// CHECK:STDOUT: %t.param_patt.loc20_13.1: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %t.param_patt.loc20_13.2 (constants.%t.param_patt.5db)] +// CHECK:STDOUT: %t.patt.loc20_13.1: @F.%pattern_type (%pattern_type.b3a) = at_binding_pattern t, %t.param_patt.loc20_13.1 [symbolic = %t.patt.loc20_13.2 (constants.%t.patt.030)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_10: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %.loc20_9: type = splice_block %I.ref [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc20_7.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc20_7.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @F.%T.as_type.loc20_16.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc20_16.1: type = splice_block %.loc20_16.2 [symbolic = %T.as_type.loc20_16.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %t.param: @F.%T.as_type.loc20_15.1 (%T.as_type) = value_param call_param0 +// CHECK:STDOUT: %.loc20_15.1: type = splice_block %.loc20_15.2 [symbolic = %T.as_type.loc20_15.1 (constants.%T.as_type)] { // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc20_16.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc20_16.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc20_16.2: type = converted %T.ref, %T.as_type.loc20_16.2 [symbolic = %T.as_type.loc20_16.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc20_15.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc20_15.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc20_15.2: type = converted %T.ref, %T.as_type.loc20_15.2 [symbolic = %T.as_type.loc20_15.1 (constants.%T.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @F.%T.as_type.loc20_16.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @F.%T.as_type.loc20_15.1 (%T.as_type) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: inline_cpp "void G() {\n Carbon::A a;\n Carbon::B b;\n Carbon::F(a);\n Carbon::F(b);\n}\n" @@ -369,22 +369,22 @@ void G() { // CHECK:STDOUT: generic fn @F(%T.loc20_7.2: %I.type) { // CHECK:STDOUT: %T.patt.loc20_7.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_7.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc20_7.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc20_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc20_16.1: type = facet_access_type %T.loc20_7.1 [symbolic = %T.as_type.loc20_16.1 (constants.%T.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc20_16.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] -// CHECK:STDOUT: %t.param_patt.loc20_14.2: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %t.param_patt.loc20_14.2 (constants.%t.param_patt.5db)] -// CHECK:STDOUT: %t.patt.loc20_14.2: @F.%pattern_type (%pattern_type.b3a) = at_binding_pattern t, %t.param_patt.loc20_14.2 [symbolic = %t.patt.loc20_14.2 (constants.%t.patt.030)] +// CHECK:STDOUT: %T.as_type.loc20_15.1: type = facet_access_type %T.loc20_7.1 [symbolic = %T.as_type.loc20_15.1 (constants.%T.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc20_15.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] +// CHECK:STDOUT: %t.param_patt.loc20_13.2: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %t.param_patt.loc20_13.2 (constants.%t.param_patt.5db)] +// CHECK:STDOUT: %t.patt.loc20_13.2: @F.%pattern_type (%pattern_type.b3a) = at_binding_pattern t, %t.param_patt.loc20_13.2 [symbolic = %t.patt.loc20_13.2 (constants.%t.patt.030)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc20_16.1 [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc20_15.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %I.WithSelf.Doit.type: type = fn_type @I.WithSelf.Doit, @I.WithSelf(%T.loc20_7.1) [symbolic = %I.WithSelf.Doit.type (constants.%I.WithSelf.Doit.type.860)] // CHECK:STDOUT: %.loc21_4: type = fn_type_with_self_type %I.WithSelf.Doit.type, %T.loc20_7.1 [symbolic = %.loc21_4 (constants.%.8a9)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc20_7.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc21_4.2: @F.%.loc21_4 (%.8a9) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc21_4.2: = specific_impl_function %impl.elem0.loc21_4.2, @I.WithSelf.Doit(%T.loc20_7.1) [symbolic = %specific_impl_fn.loc21_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc20_16.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc20_15.1 (%T.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc20_16.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc20_15.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %Doit.ref: %I.assoc_type = name_ref Doit, @I.WithSelf.%assoc0 [concrete = constants.%assoc0.628] // CHECK:STDOUT: %impl.elem0.loc21_4.1: @F.%.loc21_4 (%.8a9) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc21_4: = bound_method %t.ref, %impl.elem0.loc21_4.1 @@ -438,13 +438,13 @@ void G() { // CHECK:STDOUT: fn @F__carbon_thunkinst64000035(%_.param: ref %A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F__carbon_thunkinst64000035.ref: %F.type = name_ref F__carbon_thunkinst64000035, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %I.facet.loc20_19.1: %I.type = facet_value constants.%A, (constants.%I.impl_witness.6ad) [concrete = constants.%I.facet.64b] -// CHECK:STDOUT: %.loc20_19.1: %I.type = converted constants.%A, %I.facet.loc20_19.1 [concrete = constants.%I.facet.64b] -// CHECK:STDOUT: %I.facet.loc20_19.2: %I.type = facet_value constants.%A, (constants.%I.impl_witness.6ad) [concrete = constants.%I.facet.64b] -// CHECK:STDOUT: %.loc20_19.2: %I.type = converted constants.%A, %I.facet.loc20_19.2 [concrete = constants.%I.facet.64b] +// CHECK:STDOUT: %I.facet.loc20_18.1: %I.type = facet_value constants.%A, (constants.%I.impl_witness.6ad) [concrete = constants.%I.facet.64b] +// CHECK:STDOUT: %.loc20_18.1: %I.type = converted constants.%A, %I.facet.loc20_18.1 [concrete = constants.%I.facet.64b] +// CHECK:STDOUT: %I.facet.loc20_18.2: %I.type = facet_value constants.%A, (constants.%I.impl_witness.6ad) [concrete = constants.%I.facet.64b] +// CHECK:STDOUT: %.loc20_18.2: %I.type = converted constants.%A, %I.facet.loc20_18.2 [concrete = constants.%I.facet.64b] // CHECK:STDOUT: %F.specific_fn: = specific_function %F__carbon_thunkinst64000035.ref, @F(constants.%I.facet.64b) [concrete = constants.%F.specific_fn.f33] -// CHECK:STDOUT: %.loc20_19.3: %A = acquire_value %_.param -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc20_19.3) +// CHECK:STDOUT: %.loc20_18.3: %A = acquire_value %_.param +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc20_18.3) // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -453,13 +453,13 @@ void G() { // CHECK:STDOUT: fn @F__carbon_thunkinst64000050(%_.param: ref %B) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F__carbon_thunkinst64000050.ref: %F.type = name_ref F__carbon_thunkinst64000050, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %I.facet.loc20_19.1: %I.type = facet_value constants.%B, (constants.%I.impl_witness.5b8) [concrete = constants.%I.facet.9f8] -// CHECK:STDOUT: %.loc20_19.1: %I.type = converted constants.%B, %I.facet.loc20_19.1 [concrete = constants.%I.facet.9f8] -// CHECK:STDOUT: %I.facet.loc20_19.2: %I.type = facet_value constants.%B, (constants.%I.impl_witness.5b8) [concrete = constants.%I.facet.9f8] -// CHECK:STDOUT: %.loc20_19.2: %I.type = converted constants.%B, %I.facet.loc20_19.2 [concrete = constants.%I.facet.9f8] +// CHECK:STDOUT: %I.facet.loc20_18.1: %I.type = facet_value constants.%B, (constants.%I.impl_witness.5b8) [concrete = constants.%I.facet.9f8] +// CHECK:STDOUT: %.loc20_18.1: %I.type = converted constants.%B, %I.facet.loc20_18.1 [concrete = constants.%I.facet.9f8] +// CHECK:STDOUT: %I.facet.loc20_18.2: %I.type = facet_value constants.%B, (constants.%I.impl_witness.5b8) [concrete = constants.%I.facet.9f8] +// CHECK:STDOUT: %.loc20_18.2: %I.type = converted constants.%B, %I.facet.loc20_18.2 [concrete = constants.%I.facet.9f8] // CHECK:STDOUT: %F.specific_fn: = specific_function %F__carbon_thunkinst64000050.ref, @F(constants.%I.facet.9f8) [concrete = constants.%F.specific_fn.db2] -// CHECK:STDOUT: %.loc20_19.3: %B = acquire_value %_.param -// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc20_19.3) +// CHECK:STDOUT: %.loc20_18.3: %B = acquire_value %_.param +// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc20_18.3) // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -513,10 +513,10 @@ void G() { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.patt.loc20_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc20_7.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc20_16.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc20_15.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a -// CHECK:STDOUT: %t.param_patt.loc20_14.2 => constants.%t.param_patt.5db -// CHECK:STDOUT: %t.patt.loc20_14.2 => constants.%t.patt.030 +// CHECK:STDOUT: %t.param_patt.loc20_13.2 => constants.%t.param_patt.5db +// CHECK:STDOUT: %t.patt.loc20_13.2 => constants.%t.patt.030 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%T) { @@ -537,10 +537,10 @@ void G() { // CHECK:STDOUT: specific @F(constants.%I.facet.64b) { // CHECK:STDOUT: %T.patt.loc20_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc20_7.1 => constants.%I.facet.64b -// CHECK:STDOUT: %T.as_type.loc20_16.1 => constants.%A +// CHECK:STDOUT: %T.as_type.loc20_15.1 => constants.%A // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9ef -// CHECK:STDOUT: %t.param_patt.loc20_14.2 => constants.%t.param_patt.169 -// CHECK:STDOUT: %t.patt.loc20_14.2 => constants.%t.patt.ee8 +// CHECK:STDOUT: %t.param_patt.loc20_13.2 => constants.%t.param_patt.169 +// CHECK:STDOUT: %t.patt.loc20_13.2 => constants.%t.patt.ee8 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type @@ -554,10 +554,10 @@ void G() { // CHECK:STDOUT: specific @F(constants.%I.facet.9f8) { // CHECK:STDOUT: %T.patt.loc20_7.2 => constants.%T.patt // CHECK:STDOUT: %T.loc20_7.1 => constants.%I.facet.9f8 -// CHECK:STDOUT: %T.as_type.loc20_16.1 => constants.%B +// CHECK:STDOUT: %T.as_type.loc20_15.1 => constants.%B // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e39 -// CHECK:STDOUT: %t.param_patt.loc20_14.2 => constants.%t.param_patt.267 -// CHECK:STDOUT: %t.patt.loc20_14.2 => constants.%t.patt.062 +// CHECK:STDOUT: %t.param_patt.loc20_13.2 => constants.%t.param_patt.267 +// CHECK:STDOUT: %t.patt.loc20_13.2 => constants.%t.patt.062 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type diff --git a/toolchain/check/testdata/interop/cpp/function/import/overloads.carbon b/toolchain/check/testdata/interop/cpp/function/import/overloads.carbon index 8dd3bbc061d3..6296ddf19b40 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/overloads.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/overloads.carbon @@ -777,15 +777,15 @@ import Cpp inline ''' interface I {} -fn EchoValue[ValueT:! I](unused value:! ValueT) {} +fn EchoValue[ValueT: I](unused generic value: ValueT) {} fn F() { // CHECK:STDERR: fail_missing_impl.carbon:[[@LINE+7]]:3: error: cannot convert type `` into type implementing `I` [ConversionFailureTypeToFacet] // CHECK:STDERR: EchoValue(Cpp.foo); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_missing_impl.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn EchoValue[ValueT:! I](unused value:! ValueT) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn EchoValue[ValueT: I](unused generic value: ValueT) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EchoValue(Cpp.foo); } @@ -4076,20 +4076,20 @@ fn F() { // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: %EchoValue.decl: %EchoValue.type = fn_decl @EchoValue [concrete = constants.%EchoValue] { // CHECK:STDOUT: %ValueT.patt.loc10_20.1: %pattern_type.6cb = symbolic_binding_pattern ValueT, 0 [symbolic = %ValueT.patt.loc10_20.2 (constants.%ValueT.patt)] -// CHECK:STDOUT: %value.patt.loc10_38.1: @EchoValue.%pattern_type (%pattern_type.b3a) = symbolic_binding_pattern value, 1 [symbolic = %value.patt.loc10_38.2 (constants.%value.patt)] +// CHECK:STDOUT: %value.patt.loc10_45.1: @EchoValue.%pattern_type (%pattern_type.b3a) = symbolic_binding_pattern value, 1 [symbolic = %value.patt.loc10_45.2 (constants.%value.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_23: type = splice_block %I.ref [concrete = constants.%I.type] { +// CHECK:STDOUT: %.loc10_22: type = splice_block %I.ref [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen.loc10_20: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %ValueT.loc10_20.2: %I.type = symbolic_binding ValueT, 0 [symbolic = %ValueT.loc10_20.1 (constants.%ValueT)] -// CHECK:STDOUT: %.loc10_41.1: type = splice_block %.loc10_41.2 [symbolic = %ValueT.as_type.loc10_41.1 (constants.%ValueT.as_type)] { -// CHECK:STDOUT: %.Self.frozen.loc10_38: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc10_47.1: type = splice_block %.loc10_47.2 [symbolic = %ValueT.as_type.loc10_47.1 (constants.%ValueT.as_type)] { +// CHECK:STDOUT: %.Self.frozen.loc10_45: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %ValueT.ref: %I.type = name_ref ValueT, %ValueT.loc10_20.2 [symbolic = %ValueT.loc10_20.1 (constants.%ValueT)] -// CHECK:STDOUT: %ValueT.as_type.loc10_41.2: type = facet_access_type %ValueT.ref [symbolic = %ValueT.as_type.loc10_41.1 (constants.%ValueT.as_type)] -// CHECK:STDOUT: %.loc10_41.2: type = converted %ValueT.ref, %ValueT.as_type.loc10_41.2 [symbolic = %ValueT.as_type.loc10_41.1 (constants.%ValueT.as_type)] +// CHECK:STDOUT: %ValueT.as_type.loc10_47.2: type = facet_access_type %ValueT.ref [symbolic = %ValueT.as_type.loc10_47.1 (constants.%ValueT.as_type)] +// CHECK:STDOUT: %.loc10_47.2: type = converted %ValueT.ref, %ValueT.as_type.loc10_47.2 [symbolic = %ValueT.as_type.loc10_47.1 (constants.%ValueT.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %value.loc10_38.2: @EchoValue.%ValueT.as_type.loc10_41.1 (%ValueT.as_type) = symbolic_binding value, 1 [symbolic = %value.loc10_38.1 (constants.%value)] +// CHECK:STDOUT: %value.loc10_45.2: @EchoValue.%ValueT.as_type.loc10_47.1 (%ValueT.as_type) = symbolic_binding value, 1 [symbolic = %value.loc10_45.1 (constants.%value)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } @@ -4107,13 +4107,13 @@ fn F() { // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @EchoValue(%ValueT.loc10_20.2: %I.type, %value.loc10_38.2: @EchoValue.%ValueT.as_type.loc10_41.1 (%ValueT.as_type)) { +// CHECK:STDOUT: generic fn @EchoValue(%ValueT.loc10_20.2: %I.type, %value.loc10_45.2: @EchoValue.%ValueT.as_type.loc10_47.1 (%ValueT.as_type)) { // CHECK:STDOUT: %ValueT.patt.loc10_20.2: %pattern_type.6cb = symbolic_binding_pattern ValueT, 0 [symbolic = %ValueT.patt.loc10_20.2 (constants.%ValueT.patt)] // CHECK:STDOUT: %ValueT.loc10_20.1: %I.type = symbolic_binding ValueT, 0 [symbolic = %ValueT.loc10_20.1 (constants.%ValueT)] -// CHECK:STDOUT: %ValueT.as_type.loc10_41.1: type = facet_access_type %ValueT.loc10_20.1 [symbolic = %ValueT.as_type.loc10_41.1 (constants.%ValueT.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %ValueT.as_type.loc10_41.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] -// CHECK:STDOUT: %value.patt.loc10_38.2: @EchoValue.%pattern_type (%pattern_type.b3a) = symbolic_binding_pattern value, 1 [symbolic = %value.patt.loc10_38.2 (constants.%value.patt)] -// CHECK:STDOUT: %value.loc10_38.1: @EchoValue.%ValueT.as_type.loc10_41.1 (%ValueT.as_type) = symbolic_binding value, 1 [symbolic = %value.loc10_38.1 (constants.%value)] +// CHECK:STDOUT: %ValueT.as_type.loc10_47.1: type = facet_access_type %ValueT.loc10_20.1 [symbolic = %ValueT.as_type.loc10_47.1 (constants.%ValueT.as_type)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %ValueT.as_type.loc10_47.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] +// CHECK:STDOUT: %value.patt.loc10_45.2: @EchoValue.%pattern_type (%pattern_type.b3a) = symbolic_binding_pattern value, 1 [symbolic = %value.patt.loc10_45.2 (constants.%value.patt)] +// CHECK:STDOUT: %value.loc10_45.1: @EchoValue.%ValueT.as_type.loc10_47.1 (%ValueT.as_type) = symbolic_binding value, 1 [symbolic = %value.loc10_45.1 (constants.%value)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -4142,9 +4142,9 @@ fn F() { // CHECK:STDOUT: specific @EchoValue(constants.%ValueT, constants.%value) { // CHECK:STDOUT: %ValueT.patt.loc10_20.2 => constants.%ValueT.patt // CHECK:STDOUT: %ValueT.loc10_20.1 => constants.%ValueT -// CHECK:STDOUT: %ValueT.as_type.loc10_41.1 => constants.%ValueT.as_type +// CHECK:STDOUT: %ValueT.as_type.loc10_47.1 => constants.%ValueT.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a -// CHECK:STDOUT: %value.patt.loc10_38.2 => constants.%value.patt -// CHECK:STDOUT: %value.loc10_38.1 => constants.%value +// CHECK:STDOUT: %value.patt.loc10_45.2 => constants.%value.patt +// CHECK:STDOUT: %value.loc10_45.1 => constants.%value // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/impls/copy.carbon b/toolchain/check/testdata/interop/cpp/impls/copy.carbon index 2b0b0d0307e5..b5f3896372b5 100644 --- a/toolchain/check/testdata/interop/cpp/impls/copy.carbon +++ b/toolchain/check/testdata/interop/cpp/impls/copy.carbon @@ -174,7 +174,7 @@ library "[[@TEST_NAME]]"; import Cpp library "types.h"; -fn Copy[T:! Core.Copy](c: T) -> T { +fn Copy[T: Core.Copy](c: T) -> T { return c; } @@ -184,7 +184,7 @@ fn DoCopy(c: Cpp.Copyable) -> Cpp.Copyable { //@dump-sem-ir-end } -class Wrap(T:! Core.Copy) {} +class Wrap(T: Core.Copy) {} fn EqualWitnesses(p: Wrap(Cpp.Copyable)*) -> Wrap(Cpp.Copyable)* { //@dump-sem-ir-begin diff --git a/toolchain/check/testdata/interop/cpp/impls/destroy.carbon b/toolchain/check/testdata/interop/cpp/impls/destroy.carbon index 47971bbb5401..3ee6c106906b 100644 --- a/toolchain/check/testdata/interop/cpp/impls/destroy.carbon +++ b/toolchain/check/testdata/interop/cpp/impls/destroy.carbon @@ -186,7 +186,7 @@ library "[[@TEST_NAME]]"; import Cpp library "types.h"; -fn Destroy[T:! Core.Copy & Core.Destroy](c: T) { +fn Destroy[T: Core.Copy & Core.Destroy](c: T) { var unused d: T = c; } @@ -194,7 +194,7 @@ fn DoDestroy() { Destroy({} as Cpp.PublicDestructor); } -class Wrap(T:! Core.Destroy) {} +class Wrap(T: Core.Destroy) {} fn EqualWitnesses(p: Wrap(Cpp.PublicDestructor)*) -> Wrap(Cpp.PublicDestructor)* { return p; diff --git a/toolchain/check/testdata/interop/cpp/operators/arithmetic_operators.carbon b/toolchain/check/testdata/interop/cpp/operators/arithmetic_operators.carbon index faf32c6f2481..6f36cbbedccb 100644 --- a/toolchain/check/testdata/interop/cpp/operators/arithmetic_operators.carbon +++ b/toolchain/check/testdata/interop/cpp/operators/arithmetic_operators.carbon @@ -115,12 +115,12 @@ public: // `Result` is a workaround for `.Result impls Core.Destroy`. This funciton // ought to be defined as // ``` -// AddWith[U:! type, T:! Core.AddWith(U) where .Result impls Core.Destroy](x: T, y: T) +// AddWith[U: type, T: Core.AddWith(U) where .Result impls Core.Destroy](x: T, y: T) // ``` fn AddWith[ - Result:! Core.Destroy, - U:! Core.Destroy, - T:! Core.Destroy & Core.AddWith(U) where .Result = Result + Result: Core.Destroy, + U: Core.Destroy, + T: Core.Destroy & Core.AddWith(U) where .Result = Result ](unused result: Result, x: T, y: U) { //@dump-sem-ir-begin x + y; @@ -129,9 +129,9 @@ fn AddWith[ // TODO: Refactor when `.Result impls Core.Destroy` is possible. fn SubWith[ - Result:! Core.Destroy, - U:! Core.Destroy, - T:! Core.Destroy & Core.SubWith(U) where .Result = Result + Result: Core.Destroy, + U: Core.Destroy, + T: Core.Destroy & Core.SubWith(U) where .Result = Result ](unused result: Result, x: T, y: U) { //@dump-sem-ir-begin x - y; @@ -140,9 +140,9 @@ fn SubWith[ // TODO: Refactor when `.Result impls Core.Destroy` is possible. fn MulWith[ - Result:! Core.Destroy, - U:! Core.Destroy, - T:! Core.Destroy & Core.MulWith(U) where .Result = Result + Result: Core.Destroy, + U: Core.Destroy, + T: Core.Destroy & Core.MulWith(U) where .Result = Result ](unused result: Result, x: T, y: U) { //@dump-sem-ir-begin x * y; @@ -151,9 +151,9 @@ fn MulWith[ // TODO: Refactor when `.Result impls Core.Destroy` is possible. fn DivWith[ - Result:! Core.Destroy, - U:! Core.Destroy, - T:! Core.Destroy & Core.DivWith(U) where .Result = Result + Result: Core.Destroy, + U: Core.Destroy, + T: Core.Destroy & Core.DivWith(U) where .Result = Result ](unused result: Result, x: T, y: U) { //@dump-sem-ir-begin x / y; @@ -162,9 +162,9 @@ fn DivWith[ // TODO: Refactor when `.Result impls Core.Destroy` is possible. fn ModWith[ - Result:! Core.Destroy, - U:! Core.Destroy, - T:! Core.Destroy & Core.ModWith(U) where .Result = Result + Result: Core.Destroy, + U: Core.Destroy, + T: Core.Destroy & Core.ModWith(U) where .Result = Result ](unused result: Result, x: T, y: U) { //@dump-sem-ir-begin x % y; @@ -222,31 +222,31 @@ fn TestOpWith(a: Cpp.Int16, b: Cpp.Int32, c: Cpp.Int32, d: Cpp.Int64, x: i16) { ModWith(Cpp.Int64.Int64(), d, c); } -fn AddAssignWith[U:! type, T:! Core.AddAssignWith(U)](var x: T, y: U) { +fn AddAssignWith[U: type, T: Core.AddAssignWith(U)](var x: T, y: U) { //@dump-sem-ir-begin x += y; //@dump-sem-ir-end } -fn SubAssignWith[U:! type, T:! Core.SubAssignWith(U)](var x: T, y: U) { +fn SubAssignWith[U: type, T: Core.SubAssignWith(U)](var x: T, y: U) { //@dump-sem-ir-begin x -= y; //@dump-sem-ir-end } -fn MulAssignWith[U:! type, T:! Core.MulAssignWith(U)](var x: T, y: U) { +fn MulAssignWith[U: type, T: Core.MulAssignWith(U)](var x: T, y: U) { //@dump-sem-ir-begin x *= y; //@dump-sem-ir-end } -fn DivAssignWith[U:! type, T:! Core.DivAssignWith(U)](var x: T, y: U) { +fn DivAssignWith[U: type, T: Core.DivAssignWith(U)](var x: T, y: U) { //@dump-sem-ir-begin x /= y; //@dump-sem-ir-end } -fn ModAssignWith[U:! type, T:! Core.ModAssignWith(U)](var x: T, y: U) { +fn ModAssignWith[U: type, T: Core.ModAssignWith(U)](var x: T, y: U) { //@dump-sem-ir-begin x %= y; //@dump-sem-ir-end @@ -275,13 +275,13 @@ fn TestOpAssignWith(int16: Cpp.Int16, int32: Cpp.Int32, int64: Cpp.Int64, x: i16 ModAssignWith(int64, int32); } -fn TestInc[T:! Core.Inc](var x: T) { +fn TestInc[T: Core.Inc](var x: T) { //@dump-sem-ir-begin ++x; //@dump-sem-ir-end } -fn TestDec[T:! Core.Dec](var x: T) { +fn TestDec[T: Core.Dec](var x: T) { //@dump-sem-ir-begin --x; //@dump-sem-ir-end @@ -289,8 +289,8 @@ fn TestDec[T:! Core.Dec](var x: T) { // TODO: Refactor when `.Result impls Core.Destroy` is possible. fn TestNegate[ - Result:! Core.Destroy, - T:! Core.Destroy & Core.Negate where .Result = Result + Result: Core.Destroy, + T: Core.Destroy & Core.Negate where .Result = Result ](unused y: Result, x: T) { //@dump-sem-ir-begin -x; @@ -1568,39 +1568,39 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Core.import_ref.d29 = import_ref Core//prelude/operators/arithmetic, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AddWith.loc124(%Result.loc121_9.2: %Destroy.type, %U.loc122_4.2: %Destroy.type, %T.loc123_4.2: @AddWith.loc124.%facet_type.loc123_38 (%facet_type.c2e)) { +// CHECK:STDOUT: generic fn @AddWith.loc124(%Result.loc121_9.2: %Destroy.type, %U.loc122_4.2: %Destroy.type, %T.loc123_4.2: @AddWith.loc124.%facet_type.loc123_37 (%facet_type.c2e)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc126: = require_complete_type %AddWith.type.loc123_36.1 [symbolic = %require_complete.loc126 (constants.%require_complete.15e)] +// CHECK:STDOUT: %require_complete.loc126: = require_complete_type %AddWith.type.loc123_35.1 [symbolic = %require_complete.loc126 (constants.%require_complete.15e)] // CHECK:STDOUT: %assoc1: @AddWith.loc124.%AddWith.assoc_type (%AddWith.assoc_type.bc8) = assoc_entity element1, imports.%Core.import_ref.3cf [symbolic = %assoc1 (constants.%assoc1.13e)] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc126: = lookup_impl_witness %T.loc123_4.1, @AddWith.1, @AddWith.1(%U.as_type.loc123_36.1) [symbolic = %AddWith.lookup_impl_witness.loc126 (constants.%AddWith.lookup_impl_witness.2b1)] -// CHECK:STDOUT: %AddWith.facet: @AddWith.loc124.%AddWith.type.loc123_36.1 (%AddWith.type.9da) = facet_value %T.as_type.loc124_29.1, (%AddWith.lookup_impl_witness.loc126) [symbolic = %AddWith.facet (constants.%AddWith.facet.fea)] -// CHECK:STDOUT: %AddWith.WithSelf.Op.type: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%U.as_type.loc123_36.1, %AddWith.facet) [symbolic = %AddWith.WithSelf.Op.type (constants.%AddWith.WithSelf.Op.type.977)] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc126: = lookup_impl_witness %T.loc123_4.1, @AddWith.1, @AddWith.1(%U.as_type.loc123_35.1) [symbolic = %AddWith.lookup_impl_witness.loc126 (constants.%AddWith.lookup_impl_witness.2b1)] +// CHECK:STDOUT: %AddWith.facet: @AddWith.loc124.%AddWith.type.loc123_35.1 (%AddWith.type.9da) = facet_value %T.as_type.loc124_29.1, (%AddWith.lookup_impl_witness.loc126) [symbolic = %AddWith.facet (constants.%AddWith.facet.fea)] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%U.as_type.loc123_35.1, %AddWith.facet) [symbolic = %AddWith.WithSelf.Op.type (constants.%AddWith.WithSelf.Op.type.977)] // CHECK:STDOUT: %.loc126_5.6: type = fn_type_with_self_type %AddWith.WithSelf.Op.type, %AddWith.facet [symbolic = %.loc126_5.6 (constants.%.a30)] // CHECK:STDOUT: %impl.elem1.loc126_5.2: @AddWith.loc124.%.loc126_5.6 (%.a30) = impl_witness_access %AddWith.lookup_impl_witness.loc126, element1 [symbolic = %impl.elem1.loc126_5.2 (constants.%impl.elem1.b05)] -// CHECK:STDOUT: %specific_impl_fn.loc126_5.3: = specific_impl_function %impl.elem1.loc126_5.2, @AddWith.WithSelf.Op(%U.as_type.loc123_36.1, %AddWith.facet) [symbolic = %specific_impl_fn.loc126_5.3 (constants.%specific_impl_fn.78d)] +// CHECK:STDOUT: %specific_impl_fn.loc126_5.3: = specific_impl_function %impl.elem1.loc126_5.2, @AddWith.WithSelf.Op(%U.as_type.loc123_35.1, %AddWith.facet) [symbolic = %specific_impl_fn.loc126_5.3 (constants.%specific_impl_fn.78d)] // CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Result.loc121_9.1) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.d3ece9.2)] // CHECK:STDOUT: %.loc126_5.7: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Result.loc121_9.1 [symbolic = %.loc126_5.7 (constants.%.53a)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Result.loc121_9.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc126_5.2: @AddWith.loc124.%.loc126_5.7 (%.53a) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc126_5.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %specific_impl_fn.loc126_5.4: = specific_impl_function %impl.elem0.loc126_5.2, @Destroy.WithSelf.Op(%Result.loc121_9.1) [symbolic = %specific_impl_fn.loc126_5.4 (constants.%specific_impl_fn.afc)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%result.param: @AddWith.loc124.%Result.as_type.loc123_54.1 (%Result.as_type), %x.param: @AddWith.loc124.%T.as_type.loc124_29.1 (%T.as_type.6fc), %y.param: @AddWith.loc124.%U.as_type.loc123_36.1 (%U.as_type.b61)) { +// CHECK:STDOUT: fn(%result.param: @AddWith.loc124.%Result.as_type.loc123_53.1 (%Result.as_type), %x.param: @AddWith.loc124.%T.as_type.loc124_29.1 (%T.as_type.6fc), %y.param: @AddWith.loc124.%U.as_type.loc123_35.1 (%U.as_type.b61)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @AddWith.loc124.%T.as_type.loc124_29.1 (%T.as_type.6fc) = name_ref x, %x -// CHECK:STDOUT: %y.ref: @AddWith.loc124.%U.as_type.loc123_36.1 (%U.as_type.b61) = name_ref y, %y -// CHECK:STDOUT: %AddWith.type.loc126: type = facet_type <@AddWith.1, @AddWith.1(constants.%U.as_type.b61)> [symbolic = %AddWith.type.loc123_36.1 (constants.%AddWith.type.9da)] +// CHECK:STDOUT: %y.ref: @AddWith.loc124.%U.as_type.loc123_35.1 (%U.as_type.b61) = name_ref y, %y +// CHECK:STDOUT: %AddWith.type.loc126: type = facet_type <@AddWith.1, @AddWith.1(constants.%U.as_type.b61)> [symbolic = %AddWith.type.loc123_35.1 (constants.%AddWith.type.9da)] // CHECK:STDOUT: %.loc126_5.1: @AddWith.loc124.%AddWith.assoc_type (%AddWith.assoc_type.bc8) = specific_constant imports.%Core.import_ref.5a1, @AddWith.WithSelf(constants.%U.as_type.b61, constants.%Self.96a) [symbolic = %assoc1 (constants.%assoc1.13e)] // CHECK:STDOUT: %Op.ref: @AddWith.loc124.%AddWith.assoc_type (%AddWith.assoc_type.bc8) = name_ref Op, %.loc126_5.1 [symbolic = %assoc1 (constants.%assoc1.13e)] // CHECK:STDOUT: %impl.elem1.loc126_5.1: @AddWith.loc124.%.loc126_5.6 (%.a30) = impl_witness_access constants.%AddWith.lookup_impl_witness.2b1, element1 [symbolic = %impl.elem1.loc126_5.2 (constants.%impl.elem1.b05)] // CHECK:STDOUT: %bound_method.loc126_5.1: = bound_method %x.ref, %impl.elem1.loc126_5.1 // CHECK:STDOUT: %specific_impl_fn.loc126_5.1: = specific_impl_function %impl.elem1.loc126_5.1, @AddWith.WithSelf.Op(constants.%U.as_type.b61, constants.%AddWith.facet.fea) [symbolic = %specific_impl_fn.loc126_5.3 (constants.%specific_impl_fn.78d)] // CHECK:STDOUT: %bound_method.loc126_5.2: = bound_method %x.ref, %specific_impl_fn.loc126_5.1 -// CHECK:STDOUT: %.loc126_5.2: ref @AddWith.loc124.%Result.as_type.loc123_54.1 (%Result.as_type) = temporary_storage -// CHECK:STDOUT: %AddWith.WithSelf.Op.call: init @AddWith.loc124.%Result.as_type.loc123_54.1 (%Result.as_type) to %.loc126_5.2 = call %bound_method.loc126_5.2(%x.ref, %y.ref) -// CHECK:STDOUT: %.loc126_5.3: ref @AddWith.loc124.%Result.as_type.loc123_54.1 (%Result.as_type) = temporary %.loc126_5.2, %AddWith.WithSelf.Op.call +// CHECK:STDOUT: %.loc126_5.2: ref @AddWith.loc124.%Result.as_type.loc123_53.1 (%Result.as_type) = temporary_storage +// CHECK:STDOUT: %AddWith.WithSelf.Op.call: init @AddWith.loc124.%Result.as_type.loc123_53.1 (%Result.as_type) to %.loc126_5.2 = call %bound_method.loc126_5.2(%x.ref, %y.ref) +// CHECK:STDOUT: %.loc126_5.3: ref @AddWith.loc124.%Result.as_type.loc123_53.1 (%Result.as_type) = temporary %.loc126_5.2, %AddWith.WithSelf.Op.call // CHECK:STDOUT: %impl.elem0.loc126_5.1: @AddWith.loc124.%.loc126_5.7 (%.53a) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc126_5.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %bound_method.loc126_5.3: = bound_method %.loc126_5.3, %impl.elem0.loc126_5.1 // CHECK:STDOUT: %.loc126_5.4: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc121_9.1 (constants.%Result)] @@ -1614,39 +1614,39 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @SubWith.loc135(%Result.loc132_9.2: %Destroy.type, %U.loc133_4.2: %Destroy.type, %T.loc134_4.2: @SubWith.loc135.%facet_type.loc134_38 (%facet_type.eeb)) { +// CHECK:STDOUT: generic fn @SubWith.loc135(%Result.loc132_9.2: %Destroy.type, %U.loc133_4.2: %Destroy.type, %T.loc134_4.2: @SubWith.loc135.%facet_type.loc134_37 (%facet_type.eeb)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc137: = require_complete_type %SubWith.type.loc134_36.1 [symbolic = %require_complete.loc137 (constants.%require_complete.6ff)] +// CHECK:STDOUT: %require_complete.loc137: = require_complete_type %SubWith.type.loc134_35.1 [symbolic = %require_complete.loc137 (constants.%require_complete.6ff)] // CHECK:STDOUT: %assoc1: @SubWith.loc135.%SubWith.assoc_type (%SubWith.assoc_type.3a1) = assoc_entity element1, imports.%Core.import_ref.3a4 [symbolic = %assoc1 (constants.%assoc1.8fd)] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc137: = lookup_impl_witness %T.loc134_4.1, @SubWith.1, @SubWith.1(%U.as_type.loc134_36.1) [symbolic = %SubWith.lookup_impl_witness.loc137 (constants.%SubWith.lookup_impl_witness.ce5)] -// CHECK:STDOUT: %SubWith.facet: @SubWith.loc135.%SubWith.type.loc134_36.1 (%SubWith.type.b5d) = facet_value %T.as_type.loc135_29.1, (%SubWith.lookup_impl_witness.loc137) [symbolic = %SubWith.facet (constants.%SubWith.facet.f6a)] -// CHECK:STDOUT: %SubWith.WithSelf.Op.type: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%U.as_type.loc134_36.1, %SubWith.facet) [symbolic = %SubWith.WithSelf.Op.type (constants.%SubWith.WithSelf.Op.type.4fe)] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc137: = lookup_impl_witness %T.loc134_4.1, @SubWith.1, @SubWith.1(%U.as_type.loc134_35.1) [symbolic = %SubWith.lookup_impl_witness.loc137 (constants.%SubWith.lookup_impl_witness.ce5)] +// CHECK:STDOUT: %SubWith.facet: @SubWith.loc135.%SubWith.type.loc134_35.1 (%SubWith.type.b5d) = facet_value %T.as_type.loc135_29.1, (%SubWith.lookup_impl_witness.loc137) [symbolic = %SubWith.facet (constants.%SubWith.facet.f6a)] +// CHECK:STDOUT: %SubWith.WithSelf.Op.type: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%U.as_type.loc134_35.1, %SubWith.facet) [symbolic = %SubWith.WithSelf.Op.type (constants.%SubWith.WithSelf.Op.type.4fe)] // CHECK:STDOUT: %.loc137_5.6: type = fn_type_with_self_type %SubWith.WithSelf.Op.type, %SubWith.facet [symbolic = %.loc137_5.6 (constants.%.a4a)] // CHECK:STDOUT: %impl.elem1.loc137_5.2: @SubWith.loc135.%.loc137_5.6 (%.a4a) = impl_witness_access %SubWith.lookup_impl_witness.loc137, element1 [symbolic = %impl.elem1.loc137_5.2 (constants.%impl.elem1.e4f)] -// CHECK:STDOUT: %specific_impl_fn.loc137_5.3: = specific_impl_function %impl.elem1.loc137_5.2, @SubWith.WithSelf.Op(%U.as_type.loc134_36.1, %SubWith.facet) [symbolic = %specific_impl_fn.loc137_5.3 (constants.%specific_impl_fn.46d)] +// CHECK:STDOUT: %specific_impl_fn.loc137_5.3: = specific_impl_function %impl.elem1.loc137_5.2, @SubWith.WithSelf.Op(%U.as_type.loc134_35.1, %SubWith.facet) [symbolic = %specific_impl_fn.loc137_5.3 (constants.%specific_impl_fn.46d)] // CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Result.loc132_9.1) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.d3ece9.2)] // CHECK:STDOUT: %.loc137_5.7: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Result.loc132_9.1 [symbolic = %.loc137_5.7 (constants.%.53a)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Result.loc132_9.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc137_5.2: @SubWith.loc135.%.loc137_5.7 (%.53a) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc137_5.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %specific_impl_fn.loc137_5.4: = specific_impl_function %impl.elem0.loc137_5.2, @Destroy.WithSelf.Op(%Result.loc132_9.1) [symbolic = %specific_impl_fn.loc137_5.4 (constants.%specific_impl_fn.afc)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%result.param: @SubWith.loc135.%Result.as_type.loc134_54.1 (%Result.as_type), %x.param: @SubWith.loc135.%T.as_type.loc135_29.1 (%T.as_type.58f), %y.param: @SubWith.loc135.%U.as_type.loc134_36.1 (%U.as_type.b61)) { +// CHECK:STDOUT: fn(%result.param: @SubWith.loc135.%Result.as_type.loc134_53.1 (%Result.as_type), %x.param: @SubWith.loc135.%T.as_type.loc135_29.1 (%T.as_type.58f), %y.param: @SubWith.loc135.%U.as_type.loc134_35.1 (%U.as_type.b61)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @SubWith.loc135.%T.as_type.loc135_29.1 (%T.as_type.58f) = name_ref x, %x -// CHECK:STDOUT: %y.ref: @SubWith.loc135.%U.as_type.loc134_36.1 (%U.as_type.b61) = name_ref y, %y -// CHECK:STDOUT: %SubWith.type.loc137: type = facet_type <@SubWith.1, @SubWith.1(constants.%U.as_type.b61)> [symbolic = %SubWith.type.loc134_36.1 (constants.%SubWith.type.b5d)] +// CHECK:STDOUT: %y.ref: @SubWith.loc135.%U.as_type.loc134_35.1 (%U.as_type.b61) = name_ref y, %y +// CHECK:STDOUT: %SubWith.type.loc137: type = facet_type <@SubWith.1, @SubWith.1(constants.%U.as_type.b61)> [symbolic = %SubWith.type.loc134_35.1 (constants.%SubWith.type.b5d)] // CHECK:STDOUT: %.loc137_5.1: @SubWith.loc135.%SubWith.assoc_type (%SubWith.assoc_type.3a1) = specific_constant imports.%Core.import_ref.0f33, @SubWith.WithSelf(constants.%U.as_type.b61, constants.%Self.d6b) [symbolic = %assoc1 (constants.%assoc1.8fd)] // CHECK:STDOUT: %Op.ref: @SubWith.loc135.%SubWith.assoc_type (%SubWith.assoc_type.3a1) = name_ref Op, %.loc137_5.1 [symbolic = %assoc1 (constants.%assoc1.8fd)] // CHECK:STDOUT: %impl.elem1.loc137_5.1: @SubWith.loc135.%.loc137_5.6 (%.a4a) = impl_witness_access constants.%SubWith.lookup_impl_witness.ce5, element1 [symbolic = %impl.elem1.loc137_5.2 (constants.%impl.elem1.e4f)] // CHECK:STDOUT: %bound_method.loc137_5.1: = bound_method %x.ref, %impl.elem1.loc137_5.1 // CHECK:STDOUT: %specific_impl_fn.loc137_5.1: = specific_impl_function %impl.elem1.loc137_5.1, @SubWith.WithSelf.Op(constants.%U.as_type.b61, constants.%SubWith.facet.f6a) [symbolic = %specific_impl_fn.loc137_5.3 (constants.%specific_impl_fn.46d)] // CHECK:STDOUT: %bound_method.loc137_5.2: = bound_method %x.ref, %specific_impl_fn.loc137_5.1 -// CHECK:STDOUT: %.loc137_5.2: ref @SubWith.loc135.%Result.as_type.loc134_54.1 (%Result.as_type) = temporary_storage -// CHECK:STDOUT: %SubWith.WithSelf.Op.call: init @SubWith.loc135.%Result.as_type.loc134_54.1 (%Result.as_type) to %.loc137_5.2 = call %bound_method.loc137_5.2(%x.ref, %y.ref) -// CHECK:STDOUT: %.loc137_5.3: ref @SubWith.loc135.%Result.as_type.loc134_54.1 (%Result.as_type) = temporary %.loc137_5.2, %SubWith.WithSelf.Op.call +// CHECK:STDOUT: %.loc137_5.2: ref @SubWith.loc135.%Result.as_type.loc134_53.1 (%Result.as_type) = temporary_storage +// CHECK:STDOUT: %SubWith.WithSelf.Op.call: init @SubWith.loc135.%Result.as_type.loc134_53.1 (%Result.as_type) to %.loc137_5.2 = call %bound_method.loc137_5.2(%x.ref, %y.ref) +// CHECK:STDOUT: %.loc137_5.3: ref @SubWith.loc135.%Result.as_type.loc134_53.1 (%Result.as_type) = temporary %.loc137_5.2, %SubWith.WithSelf.Op.call // CHECK:STDOUT: %impl.elem0.loc137_5.1: @SubWith.loc135.%.loc137_5.7 (%.53a) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc137_5.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %bound_method.loc137_5.3: = bound_method %.loc137_5.3, %impl.elem0.loc137_5.1 // CHECK:STDOUT: %.loc137_5.4: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc132_9.1 (constants.%Result)] @@ -1660,39 +1660,39 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @MulWith.loc146(%Result.loc143_9.2: %Destroy.type, %U.loc144_4.2: %Destroy.type, %T.loc145_4.2: @MulWith.loc146.%facet_type.loc145_38 (%facet_type.0e5)) { +// CHECK:STDOUT: generic fn @MulWith.loc146(%Result.loc143_9.2: %Destroy.type, %U.loc144_4.2: %Destroy.type, %T.loc145_4.2: @MulWith.loc146.%facet_type.loc145_37 (%facet_type.0e5)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc148: = require_complete_type %MulWith.type.loc145_36.1 [symbolic = %require_complete.loc148 (constants.%require_complete.861)] +// CHECK:STDOUT: %require_complete.loc148: = require_complete_type %MulWith.type.loc145_35.1 [symbolic = %require_complete.loc148 (constants.%require_complete.861)] // CHECK:STDOUT: %assoc1: @MulWith.loc146.%MulWith.assoc_type (%MulWith.assoc_type.a12) = assoc_entity element1, imports.%Core.import_ref.5a0 [symbolic = %assoc1 (constants.%assoc1.a0f)] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc148: = lookup_impl_witness %T.loc145_4.1, @MulWith.1, @MulWith.1(%U.as_type.loc145_36.1) [symbolic = %MulWith.lookup_impl_witness.loc148 (constants.%MulWith.lookup_impl_witness.444)] -// CHECK:STDOUT: %MulWith.facet: @MulWith.loc146.%MulWith.type.loc145_36.1 (%MulWith.type.f02) = facet_value %T.as_type.loc146_29.1, (%MulWith.lookup_impl_witness.loc148) [symbolic = %MulWith.facet (constants.%MulWith.facet.b99)] -// CHECK:STDOUT: %MulWith.WithSelf.Op.type: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%U.as_type.loc145_36.1, %MulWith.facet) [symbolic = %MulWith.WithSelf.Op.type (constants.%MulWith.WithSelf.Op.type.c95)] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc148: = lookup_impl_witness %T.loc145_4.1, @MulWith.1, @MulWith.1(%U.as_type.loc145_35.1) [symbolic = %MulWith.lookup_impl_witness.loc148 (constants.%MulWith.lookup_impl_witness.444)] +// CHECK:STDOUT: %MulWith.facet: @MulWith.loc146.%MulWith.type.loc145_35.1 (%MulWith.type.f02) = facet_value %T.as_type.loc146_29.1, (%MulWith.lookup_impl_witness.loc148) [symbolic = %MulWith.facet (constants.%MulWith.facet.b99)] +// CHECK:STDOUT: %MulWith.WithSelf.Op.type: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%U.as_type.loc145_35.1, %MulWith.facet) [symbolic = %MulWith.WithSelf.Op.type (constants.%MulWith.WithSelf.Op.type.c95)] // CHECK:STDOUT: %.loc148_5.6: type = fn_type_with_self_type %MulWith.WithSelf.Op.type, %MulWith.facet [symbolic = %.loc148_5.6 (constants.%.a49)] // CHECK:STDOUT: %impl.elem1.loc148_5.2: @MulWith.loc146.%.loc148_5.6 (%.a49) = impl_witness_access %MulWith.lookup_impl_witness.loc148, element1 [symbolic = %impl.elem1.loc148_5.2 (constants.%impl.elem1.a7b)] -// CHECK:STDOUT: %specific_impl_fn.loc148_5.3: = specific_impl_function %impl.elem1.loc148_5.2, @MulWith.WithSelf.Op(%U.as_type.loc145_36.1, %MulWith.facet) [symbolic = %specific_impl_fn.loc148_5.3 (constants.%specific_impl_fn.eab)] +// CHECK:STDOUT: %specific_impl_fn.loc148_5.3: = specific_impl_function %impl.elem1.loc148_5.2, @MulWith.WithSelf.Op(%U.as_type.loc145_35.1, %MulWith.facet) [symbolic = %specific_impl_fn.loc148_5.3 (constants.%specific_impl_fn.eab)] // CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Result.loc143_9.1) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.d3ece9.2)] // CHECK:STDOUT: %.loc148_5.7: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Result.loc143_9.1 [symbolic = %.loc148_5.7 (constants.%.53a)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Result.loc143_9.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc148_5.2: @MulWith.loc146.%.loc148_5.7 (%.53a) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc148_5.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %specific_impl_fn.loc148_5.4: = specific_impl_function %impl.elem0.loc148_5.2, @Destroy.WithSelf.Op(%Result.loc143_9.1) [symbolic = %specific_impl_fn.loc148_5.4 (constants.%specific_impl_fn.afc)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%result.param: @MulWith.loc146.%Result.as_type.loc145_54.1 (%Result.as_type), %x.param: @MulWith.loc146.%T.as_type.loc146_29.1 (%T.as_type.83f), %y.param: @MulWith.loc146.%U.as_type.loc145_36.1 (%U.as_type.b61)) { +// CHECK:STDOUT: fn(%result.param: @MulWith.loc146.%Result.as_type.loc145_53.1 (%Result.as_type), %x.param: @MulWith.loc146.%T.as_type.loc146_29.1 (%T.as_type.83f), %y.param: @MulWith.loc146.%U.as_type.loc145_35.1 (%U.as_type.b61)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @MulWith.loc146.%T.as_type.loc146_29.1 (%T.as_type.83f) = name_ref x, %x -// CHECK:STDOUT: %y.ref: @MulWith.loc146.%U.as_type.loc145_36.1 (%U.as_type.b61) = name_ref y, %y -// CHECK:STDOUT: %MulWith.type.loc148: type = facet_type <@MulWith.1, @MulWith.1(constants.%U.as_type.b61)> [symbolic = %MulWith.type.loc145_36.1 (constants.%MulWith.type.f02)] +// CHECK:STDOUT: %y.ref: @MulWith.loc146.%U.as_type.loc145_35.1 (%U.as_type.b61) = name_ref y, %y +// CHECK:STDOUT: %MulWith.type.loc148: type = facet_type <@MulWith.1, @MulWith.1(constants.%U.as_type.b61)> [symbolic = %MulWith.type.loc145_35.1 (constants.%MulWith.type.f02)] // CHECK:STDOUT: %.loc148_5.1: @MulWith.loc146.%MulWith.assoc_type (%MulWith.assoc_type.a12) = specific_constant imports.%Core.import_ref.8c1, @MulWith.WithSelf(constants.%U.as_type.b61, constants.%Self.941) [symbolic = %assoc1 (constants.%assoc1.a0f)] // CHECK:STDOUT: %Op.ref: @MulWith.loc146.%MulWith.assoc_type (%MulWith.assoc_type.a12) = name_ref Op, %.loc148_5.1 [symbolic = %assoc1 (constants.%assoc1.a0f)] // CHECK:STDOUT: %impl.elem1.loc148_5.1: @MulWith.loc146.%.loc148_5.6 (%.a49) = impl_witness_access constants.%MulWith.lookup_impl_witness.444, element1 [symbolic = %impl.elem1.loc148_5.2 (constants.%impl.elem1.a7b)] // CHECK:STDOUT: %bound_method.loc148_5.1: = bound_method %x.ref, %impl.elem1.loc148_5.1 // CHECK:STDOUT: %specific_impl_fn.loc148_5.1: = specific_impl_function %impl.elem1.loc148_5.1, @MulWith.WithSelf.Op(constants.%U.as_type.b61, constants.%MulWith.facet.b99) [symbolic = %specific_impl_fn.loc148_5.3 (constants.%specific_impl_fn.eab)] // CHECK:STDOUT: %bound_method.loc148_5.2: = bound_method %x.ref, %specific_impl_fn.loc148_5.1 -// CHECK:STDOUT: %.loc148_5.2: ref @MulWith.loc146.%Result.as_type.loc145_54.1 (%Result.as_type) = temporary_storage -// CHECK:STDOUT: %MulWith.WithSelf.Op.call: init @MulWith.loc146.%Result.as_type.loc145_54.1 (%Result.as_type) to %.loc148_5.2 = call %bound_method.loc148_5.2(%x.ref, %y.ref) -// CHECK:STDOUT: %.loc148_5.3: ref @MulWith.loc146.%Result.as_type.loc145_54.1 (%Result.as_type) = temporary %.loc148_5.2, %MulWith.WithSelf.Op.call +// CHECK:STDOUT: %.loc148_5.2: ref @MulWith.loc146.%Result.as_type.loc145_53.1 (%Result.as_type) = temporary_storage +// CHECK:STDOUT: %MulWith.WithSelf.Op.call: init @MulWith.loc146.%Result.as_type.loc145_53.1 (%Result.as_type) to %.loc148_5.2 = call %bound_method.loc148_5.2(%x.ref, %y.ref) +// CHECK:STDOUT: %.loc148_5.3: ref @MulWith.loc146.%Result.as_type.loc145_53.1 (%Result.as_type) = temporary %.loc148_5.2, %MulWith.WithSelf.Op.call // CHECK:STDOUT: %impl.elem0.loc148_5.1: @MulWith.loc146.%.loc148_5.7 (%.53a) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc148_5.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %bound_method.loc148_5.3: = bound_method %.loc148_5.3, %impl.elem0.loc148_5.1 // CHECK:STDOUT: %.loc148_5.4: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc143_9.1 (constants.%Result)] @@ -1706,39 +1706,39 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @DivWith.loc157(%Result.loc154_9.2: %Destroy.type, %U.loc155_4.2: %Destroy.type, %T.loc156_4.2: @DivWith.loc157.%facet_type.loc156_38 (%facet_type.ed9)) { +// CHECK:STDOUT: generic fn @DivWith.loc157(%Result.loc154_9.2: %Destroy.type, %U.loc155_4.2: %Destroy.type, %T.loc156_4.2: @DivWith.loc157.%facet_type.loc156_37 (%facet_type.ed9)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc159: = require_complete_type %DivWith.type.loc156_36.1 [symbolic = %require_complete.loc159 (constants.%require_complete.026)] +// CHECK:STDOUT: %require_complete.loc159: = require_complete_type %DivWith.type.loc156_35.1 [symbolic = %require_complete.loc159 (constants.%require_complete.026)] // CHECK:STDOUT: %assoc1: @DivWith.loc157.%DivWith.assoc_type (%DivWith.assoc_type.cf4) = assoc_entity element1, imports.%Core.import_ref.7845 [symbolic = %assoc1 (constants.%assoc1.4eb)] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc159: = lookup_impl_witness %T.loc156_4.1, @DivWith.1, @DivWith.1(%U.as_type.loc156_36.1) [symbolic = %DivWith.lookup_impl_witness.loc159 (constants.%DivWith.lookup_impl_witness.831)] -// CHECK:STDOUT: %DivWith.facet: @DivWith.loc157.%DivWith.type.loc156_36.1 (%DivWith.type.523) = facet_value %T.as_type.loc157_29.1, (%DivWith.lookup_impl_witness.loc159) [symbolic = %DivWith.facet (constants.%DivWith.facet.5f7)] -// CHECK:STDOUT: %DivWith.WithSelf.Op.type: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%U.as_type.loc156_36.1, %DivWith.facet) [symbolic = %DivWith.WithSelf.Op.type (constants.%DivWith.WithSelf.Op.type.1b2)] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc159: = lookup_impl_witness %T.loc156_4.1, @DivWith.1, @DivWith.1(%U.as_type.loc156_35.1) [symbolic = %DivWith.lookup_impl_witness.loc159 (constants.%DivWith.lookup_impl_witness.831)] +// CHECK:STDOUT: %DivWith.facet: @DivWith.loc157.%DivWith.type.loc156_35.1 (%DivWith.type.523) = facet_value %T.as_type.loc157_29.1, (%DivWith.lookup_impl_witness.loc159) [symbolic = %DivWith.facet (constants.%DivWith.facet.5f7)] +// CHECK:STDOUT: %DivWith.WithSelf.Op.type: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%U.as_type.loc156_35.1, %DivWith.facet) [symbolic = %DivWith.WithSelf.Op.type (constants.%DivWith.WithSelf.Op.type.1b2)] // CHECK:STDOUT: %.loc159_5.6: type = fn_type_with_self_type %DivWith.WithSelf.Op.type, %DivWith.facet [symbolic = %.loc159_5.6 (constants.%.6b1)] // CHECK:STDOUT: %impl.elem1.loc159_5.2: @DivWith.loc157.%.loc159_5.6 (%.6b1) = impl_witness_access %DivWith.lookup_impl_witness.loc159, element1 [symbolic = %impl.elem1.loc159_5.2 (constants.%impl.elem1.bfe)] -// CHECK:STDOUT: %specific_impl_fn.loc159_5.3: = specific_impl_function %impl.elem1.loc159_5.2, @DivWith.WithSelf.Op(%U.as_type.loc156_36.1, %DivWith.facet) [symbolic = %specific_impl_fn.loc159_5.3 (constants.%specific_impl_fn.e98)] +// CHECK:STDOUT: %specific_impl_fn.loc159_5.3: = specific_impl_function %impl.elem1.loc159_5.2, @DivWith.WithSelf.Op(%U.as_type.loc156_35.1, %DivWith.facet) [symbolic = %specific_impl_fn.loc159_5.3 (constants.%specific_impl_fn.e98)] // CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Result.loc154_9.1) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.d3ece9.2)] // CHECK:STDOUT: %.loc159_5.7: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Result.loc154_9.1 [symbolic = %.loc159_5.7 (constants.%.53a)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Result.loc154_9.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc159_5.2: @DivWith.loc157.%.loc159_5.7 (%.53a) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc159_5.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %specific_impl_fn.loc159_5.4: = specific_impl_function %impl.elem0.loc159_5.2, @Destroy.WithSelf.Op(%Result.loc154_9.1) [symbolic = %specific_impl_fn.loc159_5.4 (constants.%specific_impl_fn.afc)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%result.param: @DivWith.loc157.%Result.as_type.loc156_54.1 (%Result.as_type), %x.param: @DivWith.loc157.%T.as_type.loc157_29.1 (%T.as_type.a74), %y.param: @DivWith.loc157.%U.as_type.loc156_36.1 (%U.as_type.b61)) { +// CHECK:STDOUT: fn(%result.param: @DivWith.loc157.%Result.as_type.loc156_53.1 (%Result.as_type), %x.param: @DivWith.loc157.%T.as_type.loc157_29.1 (%T.as_type.a74), %y.param: @DivWith.loc157.%U.as_type.loc156_35.1 (%U.as_type.b61)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @DivWith.loc157.%T.as_type.loc157_29.1 (%T.as_type.a74) = name_ref x, %x -// CHECK:STDOUT: %y.ref: @DivWith.loc157.%U.as_type.loc156_36.1 (%U.as_type.b61) = name_ref y, %y -// CHECK:STDOUT: %DivWith.type.loc159: type = facet_type <@DivWith.1, @DivWith.1(constants.%U.as_type.b61)> [symbolic = %DivWith.type.loc156_36.1 (constants.%DivWith.type.523)] +// CHECK:STDOUT: %y.ref: @DivWith.loc157.%U.as_type.loc156_35.1 (%U.as_type.b61) = name_ref y, %y +// CHECK:STDOUT: %DivWith.type.loc159: type = facet_type <@DivWith.1, @DivWith.1(constants.%U.as_type.b61)> [symbolic = %DivWith.type.loc156_35.1 (constants.%DivWith.type.523)] // CHECK:STDOUT: %.loc159_5.1: @DivWith.loc157.%DivWith.assoc_type (%DivWith.assoc_type.cf4) = specific_constant imports.%Core.import_ref.ca2, @DivWith.WithSelf(constants.%U.as_type.b61, constants.%Self.16a) [symbolic = %assoc1 (constants.%assoc1.4eb)] // CHECK:STDOUT: %Op.ref: @DivWith.loc157.%DivWith.assoc_type (%DivWith.assoc_type.cf4) = name_ref Op, %.loc159_5.1 [symbolic = %assoc1 (constants.%assoc1.4eb)] // CHECK:STDOUT: %impl.elem1.loc159_5.1: @DivWith.loc157.%.loc159_5.6 (%.6b1) = impl_witness_access constants.%DivWith.lookup_impl_witness.831, element1 [symbolic = %impl.elem1.loc159_5.2 (constants.%impl.elem1.bfe)] // CHECK:STDOUT: %bound_method.loc159_5.1: = bound_method %x.ref, %impl.elem1.loc159_5.1 // CHECK:STDOUT: %specific_impl_fn.loc159_5.1: = specific_impl_function %impl.elem1.loc159_5.1, @DivWith.WithSelf.Op(constants.%U.as_type.b61, constants.%DivWith.facet.5f7) [symbolic = %specific_impl_fn.loc159_5.3 (constants.%specific_impl_fn.e98)] // CHECK:STDOUT: %bound_method.loc159_5.2: = bound_method %x.ref, %specific_impl_fn.loc159_5.1 -// CHECK:STDOUT: %.loc159_5.2: ref @DivWith.loc157.%Result.as_type.loc156_54.1 (%Result.as_type) = temporary_storage -// CHECK:STDOUT: %DivWith.WithSelf.Op.call: init @DivWith.loc157.%Result.as_type.loc156_54.1 (%Result.as_type) to %.loc159_5.2 = call %bound_method.loc159_5.2(%x.ref, %y.ref) -// CHECK:STDOUT: %.loc159_5.3: ref @DivWith.loc157.%Result.as_type.loc156_54.1 (%Result.as_type) = temporary %.loc159_5.2, %DivWith.WithSelf.Op.call +// CHECK:STDOUT: %.loc159_5.2: ref @DivWith.loc157.%Result.as_type.loc156_53.1 (%Result.as_type) = temporary_storage +// CHECK:STDOUT: %DivWith.WithSelf.Op.call: init @DivWith.loc157.%Result.as_type.loc156_53.1 (%Result.as_type) to %.loc159_5.2 = call %bound_method.loc159_5.2(%x.ref, %y.ref) +// CHECK:STDOUT: %.loc159_5.3: ref @DivWith.loc157.%Result.as_type.loc156_53.1 (%Result.as_type) = temporary %.loc159_5.2, %DivWith.WithSelf.Op.call // CHECK:STDOUT: %impl.elem0.loc159_5.1: @DivWith.loc157.%.loc159_5.7 (%.53a) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc159_5.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %bound_method.loc159_5.3: = bound_method %.loc159_5.3, %impl.elem0.loc159_5.1 // CHECK:STDOUT: %.loc159_5.4: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc154_9.1 (constants.%Result)] @@ -1752,39 +1752,39 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ModWith.loc168(%Result.loc165_9.2: %Destroy.type, %U.loc166_4.2: %Destroy.type, %T.loc167_4.2: @ModWith.loc168.%facet_type.loc167_38 (%facet_type.639)) { +// CHECK:STDOUT: generic fn @ModWith.loc168(%Result.loc165_9.2: %Destroy.type, %U.loc166_4.2: %Destroy.type, %T.loc167_4.2: @ModWith.loc168.%facet_type.loc167_37 (%facet_type.639)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc170: = require_complete_type %ModWith.type.loc167_36.1 [symbolic = %require_complete.loc170 (constants.%require_complete.a4a)] +// CHECK:STDOUT: %require_complete.loc170: = require_complete_type %ModWith.type.loc167_35.1 [symbolic = %require_complete.loc170 (constants.%require_complete.a4a)] // CHECK:STDOUT: %assoc1: @ModWith.loc168.%ModWith.assoc_type (%ModWith.assoc_type.626) = assoc_entity element1, imports.%Core.import_ref.b56 [symbolic = %assoc1 (constants.%assoc1.6d1)] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc170: = lookup_impl_witness %T.loc167_4.1, @ModWith.1, @ModWith.1(%U.as_type.loc167_36.1) [symbolic = %ModWith.lookup_impl_witness.loc170 (constants.%ModWith.lookup_impl_witness.e17)] -// CHECK:STDOUT: %ModWith.facet: @ModWith.loc168.%ModWith.type.loc167_36.1 (%ModWith.type.937) = facet_value %T.as_type.loc168_29.1, (%ModWith.lookup_impl_witness.loc170) [symbolic = %ModWith.facet (constants.%ModWith.facet.874)] -// CHECK:STDOUT: %ModWith.WithSelf.Op.type: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%U.as_type.loc167_36.1, %ModWith.facet) [symbolic = %ModWith.WithSelf.Op.type (constants.%ModWith.WithSelf.Op.type.314)] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc170: = lookup_impl_witness %T.loc167_4.1, @ModWith.1, @ModWith.1(%U.as_type.loc167_35.1) [symbolic = %ModWith.lookup_impl_witness.loc170 (constants.%ModWith.lookup_impl_witness.e17)] +// CHECK:STDOUT: %ModWith.facet: @ModWith.loc168.%ModWith.type.loc167_35.1 (%ModWith.type.937) = facet_value %T.as_type.loc168_29.1, (%ModWith.lookup_impl_witness.loc170) [symbolic = %ModWith.facet (constants.%ModWith.facet.874)] +// CHECK:STDOUT: %ModWith.WithSelf.Op.type: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%U.as_type.loc167_35.1, %ModWith.facet) [symbolic = %ModWith.WithSelf.Op.type (constants.%ModWith.WithSelf.Op.type.314)] // CHECK:STDOUT: %.loc170_5.6: type = fn_type_with_self_type %ModWith.WithSelf.Op.type, %ModWith.facet [symbolic = %.loc170_5.6 (constants.%.195)] // CHECK:STDOUT: %impl.elem1.loc170_5.2: @ModWith.loc168.%.loc170_5.6 (%.195) = impl_witness_access %ModWith.lookup_impl_witness.loc170, element1 [symbolic = %impl.elem1.loc170_5.2 (constants.%impl.elem1.715)] -// CHECK:STDOUT: %specific_impl_fn.loc170_5.3: = specific_impl_function %impl.elem1.loc170_5.2, @ModWith.WithSelf.Op(%U.as_type.loc167_36.1, %ModWith.facet) [symbolic = %specific_impl_fn.loc170_5.3 (constants.%specific_impl_fn.0b2)] +// CHECK:STDOUT: %specific_impl_fn.loc170_5.3: = specific_impl_function %impl.elem1.loc170_5.2, @ModWith.WithSelf.Op(%U.as_type.loc167_35.1, %ModWith.facet) [symbolic = %specific_impl_fn.loc170_5.3 (constants.%specific_impl_fn.0b2)] // CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Result.loc165_9.1) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.d3ece9.2)] // CHECK:STDOUT: %.loc170_5.7: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Result.loc165_9.1 [symbolic = %.loc170_5.7 (constants.%.53a)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Result.loc165_9.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc170_5.2: @ModWith.loc168.%.loc170_5.7 (%.53a) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc170_5.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %specific_impl_fn.loc170_5.4: = specific_impl_function %impl.elem0.loc170_5.2, @Destroy.WithSelf.Op(%Result.loc165_9.1) [symbolic = %specific_impl_fn.loc170_5.4 (constants.%specific_impl_fn.afc)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%result.param: @ModWith.loc168.%Result.as_type.loc167_54.1 (%Result.as_type), %x.param: @ModWith.loc168.%T.as_type.loc168_29.1 (%T.as_type.1c2), %y.param: @ModWith.loc168.%U.as_type.loc167_36.1 (%U.as_type.b61)) { +// CHECK:STDOUT: fn(%result.param: @ModWith.loc168.%Result.as_type.loc167_53.1 (%Result.as_type), %x.param: @ModWith.loc168.%T.as_type.loc168_29.1 (%T.as_type.1c2), %y.param: @ModWith.loc168.%U.as_type.loc167_35.1 (%U.as_type.b61)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @ModWith.loc168.%T.as_type.loc168_29.1 (%T.as_type.1c2) = name_ref x, %x -// CHECK:STDOUT: %y.ref: @ModWith.loc168.%U.as_type.loc167_36.1 (%U.as_type.b61) = name_ref y, %y -// CHECK:STDOUT: %ModWith.type.loc170: type = facet_type <@ModWith.1, @ModWith.1(constants.%U.as_type.b61)> [symbolic = %ModWith.type.loc167_36.1 (constants.%ModWith.type.937)] +// CHECK:STDOUT: %y.ref: @ModWith.loc168.%U.as_type.loc167_35.1 (%U.as_type.b61) = name_ref y, %y +// CHECK:STDOUT: %ModWith.type.loc170: type = facet_type <@ModWith.1, @ModWith.1(constants.%U.as_type.b61)> [symbolic = %ModWith.type.loc167_35.1 (constants.%ModWith.type.937)] // CHECK:STDOUT: %.loc170_5.1: @ModWith.loc168.%ModWith.assoc_type (%ModWith.assoc_type.626) = specific_constant imports.%Core.import_ref.ffe, @ModWith.WithSelf(constants.%U.as_type.b61, constants.%Self.0ef) [symbolic = %assoc1 (constants.%assoc1.6d1)] // CHECK:STDOUT: %Op.ref: @ModWith.loc168.%ModWith.assoc_type (%ModWith.assoc_type.626) = name_ref Op, %.loc170_5.1 [symbolic = %assoc1 (constants.%assoc1.6d1)] // CHECK:STDOUT: %impl.elem1.loc170_5.1: @ModWith.loc168.%.loc170_5.6 (%.195) = impl_witness_access constants.%ModWith.lookup_impl_witness.e17, element1 [symbolic = %impl.elem1.loc170_5.2 (constants.%impl.elem1.715)] // CHECK:STDOUT: %bound_method.loc170_5.1: = bound_method %x.ref, %impl.elem1.loc170_5.1 // CHECK:STDOUT: %specific_impl_fn.loc170_5.1: = specific_impl_function %impl.elem1.loc170_5.1, @ModWith.WithSelf.Op(constants.%U.as_type.b61, constants.%ModWith.facet.874) [symbolic = %specific_impl_fn.loc170_5.3 (constants.%specific_impl_fn.0b2)] // CHECK:STDOUT: %bound_method.loc170_5.2: = bound_method %x.ref, %specific_impl_fn.loc170_5.1 -// CHECK:STDOUT: %.loc170_5.2: ref @ModWith.loc168.%Result.as_type.loc167_54.1 (%Result.as_type) = temporary_storage -// CHECK:STDOUT: %ModWith.WithSelf.Op.call: init @ModWith.loc168.%Result.as_type.loc167_54.1 (%Result.as_type) to %.loc170_5.2 = call %bound_method.loc170_5.2(%x.ref, %y.ref) -// CHECK:STDOUT: %.loc170_5.3: ref @ModWith.loc168.%Result.as_type.loc167_54.1 (%Result.as_type) = temporary %.loc170_5.2, %ModWith.WithSelf.Op.call +// CHECK:STDOUT: %.loc170_5.2: ref @ModWith.loc168.%Result.as_type.loc167_53.1 (%Result.as_type) = temporary_storage +// CHECK:STDOUT: %ModWith.WithSelf.Op.call: init @ModWith.loc168.%Result.as_type.loc167_53.1 (%Result.as_type) to %.loc170_5.2 = call %bound_method.loc170_5.2(%x.ref, %y.ref) +// CHECK:STDOUT: %.loc170_5.3: ref @ModWith.loc168.%Result.as_type.loc167_53.1 (%Result.as_type) = temporary %.loc170_5.2, %ModWith.WithSelf.Op.call // CHECK:STDOUT: %impl.elem0.loc170_5.1: @ModWith.loc168.%.loc170_5.7 (%.53a) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc170_5.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %bound_method.loc170_5.3: = bound_method %.loc170_5.3, %impl.elem0.loc170_5.1 // CHECK:STDOUT: %.loc170_5.4: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc165_9.1 (constants.%Result)] @@ -1798,25 +1798,25 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AddAssignWith.loc225(%U.loc225_19.2: type, %T.loc225_29.2: @AddAssignWith.loc225.%AddAssignWith.type.loc225_52.1 (%AddAssignWith.type.2c8890.2)) { +// CHECK:STDOUT: generic fn @AddAssignWith.loc225(%U.loc225_19.2: type, %T.loc225_28.2: @AddAssignWith.loc225.%AddAssignWith.type.loc225_50.1 (%AddAssignWith.type.2c8890.2)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc227: = require_complete_type %AddAssignWith.type.loc225_52.1 [symbolic = %require_complete.loc227 (constants.%require_complete.2a8)] +// CHECK:STDOUT: %require_complete.loc227: = require_complete_type %AddAssignWith.type.loc225_50.1 [symbolic = %require_complete.loc227 (constants.%require_complete.2a8)] // CHECK:STDOUT: %AddAssignWith.assoc_type: type = assoc_entity_type @AddAssignWith.1, @AddAssignWith.1(%U.loc225_19.1) [symbolic = %AddAssignWith.assoc_type (constants.%AddAssignWith.assoc_type.8ddaf4.2)] // CHECK:STDOUT: %assoc0: @AddAssignWith.loc225.%AddAssignWith.assoc_type (%AddAssignWith.assoc_type.8ddaf4.2) = assoc_entity element0, imports.%Core.import_ref.3b2 [symbolic = %assoc0 (constants.%assoc0.8c5739.2)] -// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%U.loc225_19.1, %T.loc225_29.1) [symbolic = %AddAssignWith.WithSelf.Op.type (constants.%AddAssignWith.WithSelf.Op.type.cd574e.3)] -// CHECK:STDOUT: %.loc227_5.2: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type, %T.loc225_29.1 [symbolic = %.loc227_5.2 (constants.%.9b1)] -// CHECK:STDOUT: %AddAssignWith.lookup_impl_witness: = lookup_impl_witness %T.loc225_29.1, @AddAssignWith.1, @AddAssignWith.1(%U.loc225_19.1) [symbolic = %AddAssignWith.lookup_impl_witness (constants.%AddAssignWith.lookup_impl_witness)] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%U.loc225_19.1, %T.loc225_28.1) [symbolic = %AddAssignWith.WithSelf.Op.type (constants.%AddAssignWith.WithSelf.Op.type.cd574e.3)] +// CHECK:STDOUT: %.loc227_5.2: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type, %T.loc225_28.1 [symbolic = %.loc227_5.2 (constants.%.9b1)] +// CHECK:STDOUT: %AddAssignWith.lookup_impl_witness: = lookup_impl_witness %T.loc225_28.1, @AddAssignWith.1, @AddAssignWith.1(%U.loc225_19.1) [symbolic = %AddAssignWith.lookup_impl_witness (constants.%AddAssignWith.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc227_5.2: @AddAssignWith.loc225.%.loc227_5.2 (%.9b1) = impl_witness_access %AddAssignWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc227_5.2 (constants.%impl.elem0.985)] -// CHECK:STDOUT: %specific_impl_fn.loc227_5.2: = specific_impl_function %impl.elem0.loc227_5.2, @AddAssignWith.WithSelf.Op(%U.loc225_19.1, %T.loc225_29.1) [symbolic = %specific_impl_fn.loc227_5.2 (constants.%specific_impl_fn.d36)] +// CHECK:STDOUT: %specific_impl_fn.loc227_5.2: = specific_impl_function %impl.elem0.loc227_5.2, @AddAssignWith.WithSelf.Op(%U.loc225_19.1, %T.loc225_28.1) [symbolic = %specific_impl_fn.loc227_5.2 (constants.%specific_impl_fn.d36)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: ref @AddAssignWith.loc225.%T.as_type.loc225_62.1 (%T.as_type.50c), %y.param: @AddAssignWith.loc225.%U.loc225_19.1 (%U.67d)) { +// CHECK:STDOUT: fn(%x.param: ref @AddAssignWith.loc225.%T.as_type.loc225_60.1 (%T.as_type.50c), %y.param: @AddAssignWith.loc225.%U.loc225_19.1 (%U.67d)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: ref @AddAssignWith.loc225.%T.as_type.loc225_62.1 (%T.as_type.50c) = name_ref x, %x +// CHECK:STDOUT: %x.ref: ref @AddAssignWith.loc225.%T.as_type.loc225_60.1 (%T.as_type.50c) = name_ref x, %x // CHECK:STDOUT: %y.ref: @AddAssignWith.loc225.%U.loc225_19.1 (%U.67d) = name_ref y, %y -// CHECK:STDOUT: %AddAssignWith.type.loc227: type = facet_type <@AddAssignWith.1, @AddAssignWith.1(constants.%U.67d)> [symbolic = %AddAssignWith.type.loc225_52.1 (constants.%AddAssignWith.type.2c8890.2)] +// CHECK:STDOUT: %AddAssignWith.type.loc227: type = facet_type <@AddAssignWith.1, @AddAssignWith.1(constants.%U.67d)> [symbolic = %AddAssignWith.type.loc225_50.1 (constants.%AddAssignWith.type.2c8890.2)] // CHECK:STDOUT: %.loc227_5.1: @AddAssignWith.loc225.%AddAssignWith.assoc_type (%AddAssignWith.assoc_type.8ddaf4.2) = specific_constant imports.%Core.import_ref.bdd, @AddAssignWith.WithSelf(constants.%U.67d, constants.%Self.792732.1) [symbolic = %assoc0 (constants.%assoc0.8c5739.2)] // CHECK:STDOUT: %Op.ref: @AddAssignWith.loc225.%AddAssignWith.assoc_type (%AddAssignWith.assoc_type.8ddaf4.2) = name_ref Op, %.loc227_5.1 [symbolic = %assoc0 (constants.%assoc0.8c5739.2)] // CHECK:STDOUT: %impl.elem0.loc227_5.1: @AddAssignWith.loc225.%.loc227_5.2 (%.9b1) = impl_witness_access constants.%AddAssignWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc227_5.2 (constants.%impl.elem0.985)] @@ -1830,25 +1830,25 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @SubAssignWith.loc231(%U.loc231_19.2: type, %T.loc231_29.2: @SubAssignWith.loc231.%SubAssignWith.type.loc231_52.1 (%SubAssignWith.type.7e53cf.2)) { +// CHECK:STDOUT: generic fn @SubAssignWith.loc231(%U.loc231_19.2: type, %T.loc231_28.2: @SubAssignWith.loc231.%SubAssignWith.type.loc231_50.1 (%SubAssignWith.type.7e53cf.2)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc233: = require_complete_type %SubAssignWith.type.loc231_52.1 [symbolic = %require_complete.loc233 (constants.%require_complete.862)] +// CHECK:STDOUT: %require_complete.loc233: = require_complete_type %SubAssignWith.type.loc231_50.1 [symbolic = %require_complete.loc233 (constants.%require_complete.862)] // CHECK:STDOUT: %SubAssignWith.assoc_type: type = assoc_entity_type @SubAssignWith.1, @SubAssignWith.1(%U.loc231_19.1) [symbolic = %SubAssignWith.assoc_type (constants.%SubAssignWith.assoc_type.6e3877.2)] // CHECK:STDOUT: %assoc0: @SubAssignWith.loc231.%SubAssignWith.assoc_type (%SubAssignWith.assoc_type.6e3877.2) = assoc_entity element0, imports.%Core.import_ref.8f2 [symbolic = %assoc0 (constants.%assoc0.701e5f.2)] -// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith.WithSelf(%U.loc231_19.1, %T.loc231_29.1) [symbolic = %SubAssignWith.WithSelf.Op.type (constants.%SubAssignWith.WithSelf.Op.type.42f7cc.3)] -// CHECK:STDOUT: %.loc233_5.2: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type, %T.loc231_29.1 [symbolic = %.loc233_5.2 (constants.%.e56)] -// CHECK:STDOUT: %SubAssignWith.lookup_impl_witness: = lookup_impl_witness %T.loc231_29.1, @SubAssignWith.1, @SubAssignWith.1(%U.loc231_19.1) [symbolic = %SubAssignWith.lookup_impl_witness (constants.%SubAssignWith.lookup_impl_witness)] +// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith.WithSelf(%U.loc231_19.1, %T.loc231_28.1) [symbolic = %SubAssignWith.WithSelf.Op.type (constants.%SubAssignWith.WithSelf.Op.type.42f7cc.3)] +// CHECK:STDOUT: %.loc233_5.2: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type, %T.loc231_28.1 [symbolic = %.loc233_5.2 (constants.%.e56)] +// CHECK:STDOUT: %SubAssignWith.lookup_impl_witness: = lookup_impl_witness %T.loc231_28.1, @SubAssignWith.1, @SubAssignWith.1(%U.loc231_19.1) [symbolic = %SubAssignWith.lookup_impl_witness (constants.%SubAssignWith.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc233_5.2: @SubAssignWith.loc231.%.loc233_5.2 (%.e56) = impl_witness_access %SubAssignWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc233_5.2 (constants.%impl.elem0.dd3)] -// CHECK:STDOUT: %specific_impl_fn.loc233_5.2: = specific_impl_function %impl.elem0.loc233_5.2, @SubAssignWith.WithSelf.Op(%U.loc231_19.1, %T.loc231_29.1) [symbolic = %specific_impl_fn.loc233_5.2 (constants.%specific_impl_fn.5da)] +// CHECK:STDOUT: %specific_impl_fn.loc233_5.2: = specific_impl_function %impl.elem0.loc233_5.2, @SubAssignWith.WithSelf.Op(%U.loc231_19.1, %T.loc231_28.1) [symbolic = %specific_impl_fn.loc233_5.2 (constants.%specific_impl_fn.5da)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: ref @SubAssignWith.loc231.%T.as_type.loc231_62.1 (%T.as_type.3ff), %y.param: @SubAssignWith.loc231.%U.loc231_19.1 (%U.67d)) { +// CHECK:STDOUT: fn(%x.param: ref @SubAssignWith.loc231.%T.as_type.loc231_60.1 (%T.as_type.3ff), %y.param: @SubAssignWith.loc231.%U.loc231_19.1 (%U.67d)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: ref @SubAssignWith.loc231.%T.as_type.loc231_62.1 (%T.as_type.3ff) = name_ref x, %x +// CHECK:STDOUT: %x.ref: ref @SubAssignWith.loc231.%T.as_type.loc231_60.1 (%T.as_type.3ff) = name_ref x, %x // CHECK:STDOUT: %y.ref: @SubAssignWith.loc231.%U.loc231_19.1 (%U.67d) = name_ref y, %y -// CHECK:STDOUT: %SubAssignWith.type.loc233: type = facet_type <@SubAssignWith.1, @SubAssignWith.1(constants.%U.67d)> [symbolic = %SubAssignWith.type.loc231_52.1 (constants.%SubAssignWith.type.7e53cf.2)] +// CHECK:STDOUT: %SubAssignWith.type.loc233: type = facet_type <@SubAssignWith.1, @SubAssignWith.1(constants.%U.67d)> [symbolic = %SubAssignWith.type.loc231_50.1 (constants.%SubAssignWith.type.7e53cf.2)] // CHECK:STDOUT: %.loc233_5.1: @SubAssignWith.loc231.%SubAssignWith.assoc_type (%SubAssignWith.assoc_type.6e3877.2) = specific_constant imports.%Core.import_ref.509, @SubAssignWith.WithSelf(constants.%U.67d, constants.%Self.f6c9aa.1) [symbolic = %assoc0 (constants.%assoc0.701e5f.2)] // CHECK:STDOUT: %Op.ref: @SubAssignWith.loc231.%SubAssignWith.assoc_type (%SubAssignWith.assoc_type.6e3877.2) = name_ref Op, %.loc233_5.1 [symbolic = %assoc0 (constants.%assoc0.701e5f.2)] // CHECK:STDOUT: %impl.elem0.loc233_5.1: @SubAssignWith.loc231.%.loc233_5.2 (%.e56) = impl_witness_access constants.%SubAssignWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc233_5.2 (constants.%impl.elem0.dd3)] @@ -1862,25 +1862,25 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @MulAssignWith.loc237(%U.loc237_19.2: type, %T.loc237_29.2: @MulAssignWith.loc237.%MulAssignWith.type.loc237_52.1 (%MulAssignWith.type.3a0e4d.2)) { +// CHECK:STDOUT: generic fn @MulAssignWith.loc237(%U.loc237_19.2: type, %T.loc237_28.2: @MulAssignWith.loc237.%MulAssignWith.type.loc237_50.1 (%MulAssignWith.type.3a0e4d.2)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc239: = require_complete_type %MulAssignWith.type.loc237_52.1 [symbolic = %require_complete.loc239 (constants.%require_complete.6b1)] +// CHECK:STDOUT: %require_complete.loc239: = require_complete_type %MulAssignWith.type.loc237_50.1 [symbolic = %require_complete.loc239 (constants.%require_complete.6b1)] // CHECK:STDOUT: %MulAssignWith.assoc_type: type = assoc_entity_type @MulAssignWith.1, @MulAssignWith.1(%U.loc237_19.1) [symbolic = %MulAssignWith.assoc_type (constants.%MulAssignWith.assoc_type.9aa18f.2)] // CHECK:STDOUT: %assoc0: @MulAssignWith.loc237.%MulAssignWith.assoc_type (%MulAssignWith.assoc_type.9aa18f.2) = assoc_entity element0, imports.%Core.import_ref.ba3 [symbolic = %assoc0 (constants.%assoc0.22264a.2)] -// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith.WithSelf(%U.loc237_19.1, %T.loc237_29.1) [symbolic = %MulAssignWith.WithSelf.Op.type (constants.%MulAssignWith.WithSelf.Op.type.5df5bd.3)] -// CHECK:STDOUT: %.loc239_5.2: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type, %T.loc237_29.1 [symbolic = %.loc239_5.2 (constants.%.2db)] -// CHECK:STDOUT: %MulAssignWith.lookup_impl_witness: = lookup_impl_witness %T.loc237_29.1, @MulAssignWith.1, @MulAssignWith.1(%U.loc237_19.1) [symbolic = %MulAssignWith.lookup_impl_witness (constants.%MulAssignWith.lookup_impl_witness)] +// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith.WithSelf(%U.loc237_19.1, %T.loc237_28.1) [symbolic = %MulAssignWith.WithSelf.Op.type (constants.%MulAssignWith.WithSelf.Op.type.5df5bd.3)] +// CHECK:STDOUT: %.loc239_5.2: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type, %T.loc237_28.1 [symbolic = %.loc239_5.2 (constants.%.2db)] +// CHECK:STDOUT: %MulAssignWith.lookup_impl_witness: = lookup_impl_witness %T.loc237_28.1, @MulAssignWith.1, @MulAssignWith.1(%U.loc237_19.1) [symbolic = %MulAssignWith.lookup_impl_witness (constants.%MulAssignWith.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc239_5.2: @MulAssignWith.loc237.%.loc239_5.2 (%.2db) = impl_witness_access %MulAssignWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc239_5.2 (constants.%impl.elem0.c0f)] -// CHECK:STDOUT: %specific_impl_fn.loc239_5.2: = specific_impl_function %impl.elem0.loc239_5.2, @MulAssignWith.WithSelf.Op(%U.loc237_19.1, %T.loc237_29.1) [symbolic = %specific_impl_fn.loc239_5.2 (constants.%specific_impl_fn.54d)] +// CHECK:STDOUT: %specific_impl_fn.loc239_5.2: = specific_impl_function %impl.elem0.loc239_5.2, @MulAssignWith.WithSelf.Op(%U.loc237_19.1, %T.loc237_28.1) [symbolic = %specific_impl_fn.loc239_5.2 (constants.%specific_impl_fn.54d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: ref @MulAssignWith.loc237.%T.as_type.loc237_62.1 (%T.as_type.1de), %y.param: @MulAssignWith.loc237.%U.loc237_19.1 (%U.67d)) { +// CHECK:STDOUT: fn(%x.param: ref @MulAssignWith.loc237.%T.as_type.loc237_60.1 (%T.as_type.1de), %y.param: @MulAssignWith.loc237.%U.loc237_19.1 (%U.67d)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: ref @MulAssignWith.loc237.%T.as_type.loc237_62.1 (%T.as_type.1de) = name_ref x, %x +// CHECK:STDOUT: %x.ref: ref @MulAssignWith.loc237.%T.as_type.loc237_60.1 (%T.as_type.1de) = name_ref x, %x // CHECK:STDOUT: %y.ref: @MulAssignWith.loc237.%U.loc237_19.1 (%U.67d) = name_ref y, %y -// CHECK:STDOUT: %MulAssignWith.type.loc239: type = facet_type <@MulAssignWith.1, @MulAssignWith.1(constants.%U.67d)> [symbolic = %MulAssignWith.type.loc237_52.1 (constants.%MulAssignWith.type.3a0e4d.2)] +// CHECK:STDOUT: %MulAssignWith.type.loc239: type = facet_type <@MulAssignWith.1, @MulAssignWith.1(constants.%U.67d)> [symbolic = %MulAssignWith.type.loc237_50.1 (constants.%MulAssignWith.type.3a0e4d.2)] // CHECK:STDOUT: %.loc239_5.1: @MulAssignWith.loc237.%MulAssignWith.assoc_type (%MulAssignWith.assoc_type.9aa18f.2) = specific_constant imports.%Core.import_ref.b6e, @MulAssignWith.WithSelf(constants.%U.67d, constants.%Self.64dcb0.1) [symbolic = %assoc0 (constants.%assoc0.22264a.2)] // CHECK:STDOUT: %Op.ref: @MulAssignWith.loc237.%MulAssignWith.assoc_type (%MulAssignWith.assoc_type.9aa18f.2) = name_ref Op, %.loc239_5.1 [symbolic = %assoc0 (constants.%assoc0.22264a.2)] // CHECK:STDOUT: %impl.elem0.loc239_5.1: @MulAssignWith.loc237.%.loc239_5.2 (%.2db) = impl_witness_access constants.%MulAssignWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc239_5.2 (constants.%impl.elem0.c0f)] @@ -1894,25 +1894,25 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @DivAssignWith.loc243(%U.loc243_19.2: type, %T.loc243_29.2: @DivAssignWith.loc243.%DivAssignWith.type.loc243_52.1 (%DivAssignWith.type.7e58ca.2)) { +// CHECK:STDOUT: generic fn @DivAssignWith.loc243(%U.loc243_19.2: type, %T.loc243_28.2: @DivAssignWith.loc243.%DivAssignWith.type.loc243_50.1 (%DivAssignWith.type.7e58ca.2)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc245: = require_complete_type %DivAssignWith.type.loc243_52.1 [symbolic = %require_complete.loc245 (constants.%require_complete.c5c)] +// CHECK:STDOUT: %require_complete.loc245: = require_complete_type %DivAssignWith.type.loc243_50.1 [symbolic = %require_complete.loc245 (constants.%require_complete.c5c)] // CHECK:STDOUT: %DivAssignWith.assoc_type: type = assoc_entity_type @DivAssignWith.1, @DivAssignWith.1(%U.loc243_19.1) [symbolic = %DivAssignWith.assoc_type (constants.%DivAssignWith.assoc_type.bb68ec.2)] // CHECK:STDOUT: %assoc0: @DivAssignWith.loc243.%DivAssignWith.assoc_type (%DivAssignWith.assoc_type.bb68ec.2) = assoc_entity element0, imports.%Core.import_ref.a5d [symbolic = %assoc0 (constants.%assoc0.32f100.2)] -// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith.WithSelf(%U.loc243_19.1, %T.loc243_29.1) [symbolic = %DivAssignWith.WithSelf.Op.type (constants.%DivAssignWith.WithSelf.Op.type.ff5775.3)] -// CHECK:STDOUT: %.loc245_5.2: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type, %T.loc243_29.1 [symbolic = %.loc245_5.2 (constants.%.754)] -// CHECK:STDOUT: %DivAssignWith.lookup_impl_witness: = lookup_impl_witness %T.loc243_29.1, @DivAssignWith.1, @DivAssignWith.1(%U.loc243_19.1) [symbolic = %DivAssignWith.lookup_impl_witness (constants.%DivAssignWith.lookup_impl_witness)] +// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith.WithSelf(%U.loc243_19.1, %T.loc243_28.1) [symbolic = %DivAssignWith.WithSelf.Op.type (constants.%DivAssignWith.WithSelf.Op.type.ff5775.3)] +// CHECK:STDOUT: %.loc245_5.2: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type, %T.loc243_28.1 [symbolic = %.loc245_5.2 (constants.%.754)] +// CHECK:STDOUT: %DivAssignWith.lookup_impl_witness: = lookup_impl_witness %T.loc243_28.1, @DivAssignWith.1, @DivAssignWith.1(%U.loc243_19.1) [symbolic = %DivAssignWith.lookup_impl_witness (constants.%DivAssignWith.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc245_5.2: @DivAssignWith.loc243.%.loc245_5.2 (%.754) = impl_witness_access %DivAssignWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc245_5.2 (constants.%impl.elem0.0c4)] -// CHECK:STDOUT: %specific_impl_fn.loc245_5.2: = specific_impl_function %impl.elem0.loc245_5.2, @DivAssignWith.WithSelf.Op(%U.loc243_19.1, %T.loc243_29.1) [symbolic = %specific_impl_fn.loc245_5.2 (constants.%specific_impl_fn.011)] +// CHECK:STDOUT: %specific_impl_fn.loc245_5.2: = specific_impl_function %impl.elem0.loc245_5.2, @DivAssignWith.WithSelf.Op(%U.loc243_19.1, %T.loc243_28.1) [symbolic = %specific_impl_fn.loc245_5.2 (constants.%specific_impl_fn.011)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: ref @DivAssignWith.loc243.%T.as_type.loc243_62.1 (%T.as_type.e57), %y.param: @DivAssignWith.loc243.%U.loc243_19.1 (%U.67d)) { +// CHECK:STDOUT: fn(%x.param: ref @DivAssignWith.loc243.%T.as_type.loc243_60.1 (%T.as_type.e57), %y.param: @DivAssignWith.loc243.%U.loc243_19.1 (%U.67d)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: ref @DivAssignWith.loc243.%T.as_type.loc243_62.1 (%T.as_type.e57) = name_ref x, %x +// CHECK:STDOUT: %x.ref: ref @DivAssignWith.loc243.%T.as_type.loc243_60.1 (%T.as_type.e57) = name_ref x, %x // CHECK:STDOUT: %y.ref: @DivAssignWith.loc243.%U.loc243_19.1 (%U.67d) = name_ref y, %y -// CHECK:STDOUT: %DivAssignWith.type.loc245: type = facet_type <@DivAssignWith.1, @DivAssignWith.1(constants.%U.67d)> [symbolic = %DivAssignWith.type.loc243_52.1 (constants.%DivAssignWith.type.7e58ca.2)] +// CHECK:STDOUT: %DivAssignWith.type.loc245: type = facet_type <@DivAssignWith.1, @DivAssignWith.1(constants.%U.67d)> [symbolic = %DivAssignWith.type.loc243_50.1 (constants.%DivAssignWith.type.7e58ca.2)] // CHECK:STDOUT: %.loc245_5.1: @DivAssignWith.loc243.%DivAssignWith.assoc_type (%DivAssignWith.assoc_type.bb68ec.2) = specific_constant imports.%Core.import_ref.988, @DivAssignWith.WithSelf(constants.%U.67d, constants.%Self.c33c81.1) [symbolic = %assoc0 (constants.%assoc0.32f100.2)] // CHECK:STDOUT: %Op.ref: @DivAssignWith.loc243.%DivAssignWith.assoc_type (%DivAssignWith.assoc_type.bb68ec.2) = name_ref Op, %.loc245_5.1 [symbolic = %assoc0 (constants.%assoc0.32f100.2)] // CHECK:STDOUT: %impl.elem0.loc245_5.1: @DivAssignWith.loc243.%.loc245_5.2 (%.754) = impl_witness_access constants.%DivAssignWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc245_5.2 (constants.%impl.elem0.0c4)] @@ -1926,25 +1926,25 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ModAssignWith.loc249(%U.loc249_19.2: type, %T.loc249_29.2: @ModAssignWith.loc249.%ModAssignWith.type.loc249_52.1 (%ModAssignWith.type.778d68.2)) { +// CHECK:STDOUT: generic fn @ModAssignWith.loc249(%U.loc249_19.2: type, %T.loc249_28.2: @ModAssignWith.loc249.%ModAssignWith.type.loc249_50.1 (%ModAssignWith.type.778d68.2)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc251: = require_complete_type %ModAssignWith.type.loc249_52.1 [symbolic = %require_complete.loc251 (constants.%require_complete.680)] +// CHECK:STDOUT: %require_complete.loc251: = require_complete_type %ModAssignWith.type.loc249_50.1 [symbolic = %require_complete.loc251 (constants.%require_complete.680)] // CHECK:STDOUT: %ModAssignWith.assoc_type: type = assoc_entity_type @ModAssignWith.1, @ModAssignWith.1(%U.loc249_19.1) [symbolic = %ModAssignWith.assoc_type (constants.%ModAssignWith.assoc_type.bc79ec.2)] // CHECK:STDOUT: %assoc0: @ModAssignWith.loc249.%ModAssignWith.assoc_type (%ModAssignWith.assoc_type.bc79ec.2) = assoc_entity element0, imports.%Core.import_ref.cf6 [symbolic = %assoc0 (constants.%assoc0.8c0719.2)] -// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith.WithSelf(%U.loc249_19.1, %T.loc249_29.1) [symbolic = %ModAssignWith.WithSelf.Op.type (constants.%ModAssignWith.WithSelf.Op.type.ec4109.3)] -// CHECK:STDOUT: %.loc251_5.2: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type, %T.loc249_29.1 [symbolic = %.loc251_5.2 (constants.%.965)] -// CHECK:STDOUT: %ModAssignWith.lookup_impl_witness: = lookup_impl_witness %T.loc249_29.1, @ModAssignWith.1, @ModAssignWith.1(%U.loc249_19.1) [symbolic = %ModAssignWith.lookup_impl_witness (constants.%ModAssignWith.lookup_impl_witness)] +// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith.WithSelf(%U.loc249_19.1, %T.loc249_28.1) [symbolic = %ModAssignWith.WithSelf.Op.type (constants.%ModAssignWith.WithSelf.Op.type.ec4109.3)] +// CHECK:STDOUT: %.loc251_5.2: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type, %T.loc249_28.1 [symbolic = %.loc251_5.2 (constants.%.965)] +// CHECK:STDOUT: %ModAssignWith.lookup_impl_witness: = lookup_impl_witness %T.loc249_28.1, @ModAssignWith.1, @ModAssignWith.1(%U.loc249_19.1) [symbolic = %ModAssignWith.lookup_impl_witness (constants.%ModAssignWith.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc251_5.2: @ModAssignWith.loc249.%.loc251_5.2 (%.965) = impl_witness_access %ModAssignWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc251_5.2 (constants.%impl.elem0.ec7)] -// CHECK:STDOUT: %specific_impl_fn.loc251_5.2: = specific_impl_function %impl.elem0.loc251_5.2, @ModAssignWith.WithSelf.Op(%U.loc249_19.1, %T.loc249_29.1) [symbolic = %specific_impl_fn.loc251_5.2 (constants.%specific_impl_fn.cf7)] +// CHECK:STDOUT: %specific_impl_fn.loc251_5.2: = specific_impl_function %impl.elem0.loc251_5.2, @ModAssignWith.WithSelf.Op(%U.loc249_19.1, %T.loc249_28.1) [symbolic = %specific_impl_fn.loc251_5.2 (constants.%specific_impl_fn.cf7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: ref @ModAssignWith.loc249.%T.as_type.loc249_62.1 (%T.as_type.ce6), %y.param: @ModAssignWith.loc249.%U.loc249_19.1 (%U.67d)) { +// CHECK:STDOUT: fn(%x.param: ref @ModAssignWith.loc249.%T.as_type.loc249_60.1 (%T.as_type.ce6), %y.param: @ModAssignWith.loc249.%U.loc249_19.1 (%U.67d)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: ref @ModAssignWith.loc249.%T.as_type.loc249_62.1 (%T.as_type.ce6) = name_ref x, %x +// CHECK:STDOUT: %x.ref: ref @ModAssignWith.loc249.%T.as_type.loc249_60.1 (%T.as_type.ce6) = name_ref x, %x // CHECK:STDOUT: %y.ref: @ModAssignWith.loc249.%U.loc249_19.1 (%U.67d) = name_ref y, %y -// CHECK:STDOUT: %ModAssignWith.type.loc251: type = facet_type <@ModAssignWith.1, @ModAssignWith.1(constants.%U.67d)> [symbolic = %ModAssignWith.type.loc249_52.1 (constants.%ModAssignWith.type.778d68.2)] +// CHECK:STDOUT: %ModAssignWith.type.loc251: type = facet_type <@ModAssignWith.1, @ModAssignWith.1(constants.%U.67d)> [symbolic = %ModAssignWith.type.loc249_50.1 (constants.%ModAssignWith.type.778d68.2)] // CHECK:STDOUT: %.loc251_5.1: @ModAssignWith.loc249.%ModAssignWith.assoc_type (%ModAssignWith.assoc_type.bc79ec.2) = specific_constant imports.%Core.import_ref.3ff, @ModAssignWith.WithSelf(constants.%U.67d, constants.%Self.bca00b.1) [symbolic = %assoc0 (constants.%assoc0.8c0719.2)] // CHECK:STDOUT: %Op.ref: @ModAssignWith.loc249.%ModAssignWith.assoc_type (%ModAssignWith.assoc_type.bc79ec.2) = name_ref Op, %.loc251_5.1 [symbolic = %assoc0 (constants.%assoc0.8c0719.2)] // CHECK:STDOUT: %impl.elem0.loc251_5.1: @ModAssignWith.loc249.%.loc251_5.2 (%.965) = impl_witness_access constants.%ModAssignWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc251_5.2 (constants.%impl.elem0.ec7)] @@ -1969,9 +1969,9 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %impl.elem0.loc280_3.2: @TestInc.%.loc280_3.3 (%.a08) = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc280_3.2 (constants.%impl.elem0.b92)] // CHECK:STDOUT: %specific_impl_fn.loc280_3.2: = specific_impl_function %impl.elem0.loc280_3.2, @Inc.WithSelf.Op(%T.loc278_13.1) [symbolic = %specific_impl_fn.loc280_3.2 (constants.%specific_impl_fn.855)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: ref @TestInc.%T.as_type.loc278_33.1 (%T.as_type.232)) { +// CHECK:STDOUT: fn(%x.param: ref @TestInc.%T.as_type.loc278_32.1 (%T.as_type.232)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: ref @TestInc.%T.as_type.loc278_33.1 (%T.as_type.232) = name_ref x, %x +// CHECK:STDOUT: %x.ref: ref @TestInc.%T.as_type.loc278_32.1 (%T.as_type.232) = name_ref x, %x // CHECK:STDOUT: %impl.elem0.loc280_3.1: @TestInc.%.loc280_3.3 (%.a08) = impl_witness_access constants.%Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc280_3.2 (constants.%impl.elem0.b92)] // CHECK:STDOUT: %bound_method.loc280_3.1: = bound_method %x.ref, %impl.elem0.loc280_3.1 // CHECK:STDOUT: %.loc280_3.1: %Inc.type = converted constants.%T.as_type.232, constants.%T.8f3 [symbolic = %T.loc278_13.1 (constants.%T.8f3)] @@ -1996,9 +1996,9 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %impl.elem0.loc286_3.2: @TestDec.%.loc286_3.3 (%.aae) = impl_witness_access %Dec.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc286_3.2 (constants.%impl.elem0.950)] // CHECK:STDOUT: %specific_impl_fn.loc286_3.2: = specific_impl_function %impl.elem0.loc286_3.2, @Dec.WithSelf.Op(%T.loc284_13.1) [symbolic = %specific_impl_fn.loc286_3.2 (constants.%specific_impl_fn.539)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: ref @TestDec.%T.as_type.loc284_33.1 (%T.as_type.c32)) { +// CHECK:STDOUT: fn(%x.param: ref @TestDec.%T.as_type.loc284_32.1 (%T.as_type.c32)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: ref @TestDec.%T.as_type.loc284_33.1 (%T.as_type.c32) = name_ref x, %x +// CHECK:STDOUT: %x.ref: ref @TestDec.%T.as_type.loc284_32.1 (%T.as_type.c32) = name_ref x, %x // CHECK:STDOUT: %impl.elem0.loc286_3.1: @TestDec.%.loc286_3.3 (%.aae) = impl_witness_access constants.%Dec.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc286_3.2 (constants.%impl.elem0.950)] // CHECK:STDOUT: %bound_method.loc286_3.1: = bound_method %x.ref, %impl.elem0.loc286_3.1 // CHECK:STDOUT: %.loc286_3.1: %Dec.type = converted constants.%T.as_type.c32, constants.%T.e8e [symbolic = %T.loc284_13.1 (constants.%T.e8e)] @@ -2029,7 +2029,7 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %impl.elem0.loc296_3.2: @TestNegate.%.loc296_3.8 (%.53a) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc296_3.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %specific_impl_fn.loc296_3.4: = specific_impl_function %impl.elem0.loc296_3.2, @Destroy.WithSelf.Op(%Result.loc292_9.1) [symbolic = %specific_impl_fn.loc296_3.4 (constants.%specific_impl_fn.afc)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%y.param: @TestNegate.%Result.as_type.loc293_50.1 (%Result.as_type), %x.param: @TestNegate.%T.as_type.loc294_24.1 (%T.as_type.684)) { +// CHECK:STDOUT: fn(%y.param: @TestNegate.%Result.as_type.loc293_49.1 (%Result.as_type), %x.param: @TestNegate.%T.as_type.loc294_24.1 (%T.as_type.684)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @TestNegate.%T.as_type.loc294_24.1 (%T.as_type.684) = name_ref x, %x // CHECK:STDOUT: %impl.elem1.loc296_3.1: @TestNegate.%.loc296_3.7 (%.16a) = impl_witness_access constants.%Negate.lookup_impl_witness.218, element1 [symbolic = %impl.elem1.loc296_3.2 (constants.%impl.elem1.ee9)] @@ -2040,9 +2040,9 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %.loc296_3.2: %Negate.type = converted constants.%T.as_type.684, %Negate.facet.loc296_3.2 [symbolic = %Negate.facet.loc296_3.3 (constants.%Negate.facet.5e5)] // CHECK:STDOUT: %specific_impl_fn.loc296_3.1: = specific_impl_function %impl.elem1.loc296_3.1, @Negate.WithSelf.Op(constants.%Negate.facet.5e5) [symbolic = %specific_impl_fn.loc296_3.3 (constants.%specific_impl_fn.923)] // CHECK:STDOUT: %bound_method.loc296_3.2: = bound_method %x.ref, %specific_impl_fn.loc296_3.1 -// CHECK:STDOUT: %.loc296_3.3: ref @TestNegate.%Result.as_type.loc293_50.1 (%Result.as_type) = temporary_storage -// CHECK:STDOUT: %Negate.WithSelf.Op.call: init @TestNegate.%Result.as_type.loc293_50.1 (%Result.as_type) to %.loc296_3.3 = call %bound_method.loc296_3.2(%x.ref) -// CHECK:STDOUT: %.loc296_3.4: ref @TestNegate.%Result.as_type.loc293_50.1 (%Result.as_type) = temporary %.loc296_3.3, %Negate.WithSelf.Op.call +// CHECK:STDOUT: %.loc296_3.3: ref @TestNegate.%Result.as_type.loc293_49.1 (%Result.as_type) = temporary_storage +// CHECK:STDOUT: %Negate.WithSelf.Op.call: init @TestNegate.%Result.as_type.loc293_49.1 (%Result.as_type) to %.loc296_3.3 = call %bound_method.loc296_3.2(%x.ref) +// CHECK:STDOUT: %.loc296_3.4: ref @TestNegate.%Result.as_type.loc293_49.1 (%Result.as_type) = temporary %.loc296_3.3, %Negate.WithSelf.Op.call // CHECK:STDOUT: %impl.elem0.loc296_3.1: @TestNegate.%.loc296_3.8 (%.53a) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc296_3.2 (constants.%impl.elem0.0f9)] // CHECK:STDOUT: %bound_method.loc296_3.3: = bound_method %.loc296_3.4, %impl.elem0.loc296_3.1 // CHECK:STDOUT: %.loc296_3.5: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc292_9.1 (constants.%Result)] @@ -2061,21 +2061,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc121_9.1 => constants.%Result // CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc122_4.1 => constants.%U.f40 -// CHECK:STDOUT: %U.as_type.loc123_36.1 => constants.%U.as_type.b61 -// CHECK:STDOUT: %AddWith.type.loc123_36.1 => constants.%AddWith.type.9da -// CHECK:STDOUT: %facet_type.loc123_20 => constants.%facet_type.b1e -// CHECK:STDOUT: %.Self.frozen.loc123_38.1 => constants.%.Self.frozen.1ea +// CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%U.as_type.b61 +// CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.9da +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.b1e +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.1ea // CHECK:STDOUT: %require_complete.loc123 => constants.%require_complete.c7d // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.015 // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.bc8 // CHECK:STDOUT: %assoc0 => constants.%assoc0.21f -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.1 => constants.%AddWith.lookup_impl_witness.2f6 -// CHECK:STDOUT: %impl.elem0.loc123_44.1 => constants.%impl.elem0.1c6 -// CHECK:STDOUT: %Result.as_type.loc123_54.1 => constants.%Result.as_type +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.2f6 +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.1c6 +// CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Result.as_type // CHECK:STDOUT: %.Self => constants.%.Self.014 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.2 => constants.%AddWith.lookup_impl_witness.0d5 -// CHECK:STDOUT: %impl.elem0.loc123_44.2 => constants.%impl.elem0.ea5 -// CHECK:STDOUT: %facet_type.loc123_38 => constants.%facet_type.c2e +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.0d5 +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.ea5 +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.c2e // CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.0a9 // CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.69e // CHECK:STDOUT: %T.loc123_4.1 => constants.%T.ceb @@ -2096,21 +2096,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc132_9.1 => constants.%Result // CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc133_4.1 => constants.%U.f40 -// CHECK:STDOUT: %U.as_type.loc134_36.1 => constants.%U.as_type.b61 -// CHECK:STDOUT: %SubWith.type.loc134_36.1 => constants.%SubWith.type.b5d -// CHECK:STDOUT: %facet_type.loc134_20 => constants.%facet_type.d46 -// CHECK:STDOUT: %.Self.frozen.loc134_38.1 => constants.%.Self.frozen.efa +// CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%U.as_type.b61 +// CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.b5d +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.d46 +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.efa // CHECK:STDOUT: %require_complete.loc134 => constants.%require_complete.cda // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.79f // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.3a1 // CHECK:STDOUT: %assoc0 => constants.%assoc0.729 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.1 => constants.%SubWith.lookup_impl_witness.acf -// CHECK:STDOUT: %impl.elem0.loc134_44.1 => constants.%impl.elem0.050 -// CHECK:STDOUT: %Result.as_type.loc134_54.1 => constants.%Result.as_type +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.acf +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.050 +// CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Result.as_type // CHECK:STDOUT: %.Self => constants.%.Self.d13 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.2 => constants.%SubWith.lookup_impl_witness.5d0 -// CHECK:STDOUT: %impl.elem0.loc134_44.2 => constants.%impl.elem0.e4e -// CHECK:STDOUT: %facet_type.loc134_38 => constants.%facet_type.eeb +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.5d0 +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.e4e +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.eeb // CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.502 // CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.cd4 // CHECK:STDOUT: %T.loc134_4.1 => constants.%T.bf6 @@ -2131,21 +2131,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc143_9.1 => constants.%Result // CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc144_4.1 => constants.%U.f40 -// CHECK:STDOUT: %U.as_type.loc145_36.1 => constants.%U.as_type.b61 -// CHECK:STDOUT: %MulWith.type.loc145_36.1 => constants.%MulWith.type.f02 -// CHECK:STDOUT: %facet_type.loc145_20 => constants.%facet_type.f87 -// CHECK:STDOUT: %.Self.frozen.loc145_38.1 => constants.%.Self.frozen.463 +// CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%U.as_type.b61 +// CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.f02 +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.f87 +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.463 // CHECK:STDOUT: %require_complete.loc145 => constants.%require_complete.0a3 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.e91 // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.a12 // CHECK:STDOUT: %assoc0 => constants.%assoc0.116 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.1 => constants.%MulWith.lookup_impl_witness.637 -// CHECK:STDOUT: %impl.elem0.loc145_44.1 => constants.%impl.elem0.132 -// CHECK:STDOUT: %Result.as_type.loc145_54.1 => constants.%Result.as_type +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.637 +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.132 +// CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Result.as_type // CHECK:STDOUT: %.Self => constants.%.Self.588 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.2 => constants.%MulWith.lookup_impl_witness.d4f -// CHECK:STDOUT: %impl.elem0.loc145_44.2 => constants.%impl.elem0.62f -// CHECK:STDOUT: %facet_type.loc145_38 => constants.%facet_type.0e5 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.d4f +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.62f +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.0e5 // CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.e8a // CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.dec // CHECK:STDOUT: %T.loc145_4.1 => constants.%T.9a2 @@ -2166,21 +2166,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc154_9.1 => constants.%Result // CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc155_4.1 => constants.%U.f40 -// CHECK:STDOUT: %U.as_type.loc156_36.1 => constants.%U.as_type.b61 -// CHECK:STDOUT: %DivWith.type.loc156_36.1 => constants.%DivWith.type.523 -// CHECK:STDOUT: %facet_type.loc156_20 => constants.%facet_type.86cd -// CHECK:STDOUT: %.Self.frozen.loc156_38.1 => constants.%.Self.frozen.1f9 +// CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%U.as_type.b61 +// CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.523 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.86cd +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.1f9 // CHECK:STDOUT: %require_complete.loc156 => constants.%require_complete.4d7 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.8ca // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.cf4 // CHECK:STDOUT: %assoc0 => constants.%assoc0.c57 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.1 => constants.%DivWith.lookup_impl_witness.154 -// CHECK:STDOUT: %impl.elem0.loc156_44.1 => constants.%impl.elem0.252 -// CHECK:STDOUT: %Result.as_type.loc156_54.1 => constants.%Result.as_type +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.154 +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.252 +// CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Result.as_type // CHECK:STDOUT: %.Self => constants.%.Self.862 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.2 => constants.%DivWith.lookup_impl_witness.d02 -// CHECK:STDOUT: %impl.elem0.loc156_44.2 => constants.%impl.elem0.606 -// CHECK:STDOUT: %facet_type.loc156_38 => constants.%facet_type.ed9 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.d02 +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.606 +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.ed9 // CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.07c // CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.869 // CHECK:STDOUT: %T.loc156_4.1 => constants.%T.4bb @@ -2201,21 +2201,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc165_9.1 => constants.%Result // CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc166_4.1 => constants.%U.f40 -// CHECK:STDOUT: %U.as_type.loc167_36.1 => constants.%U.as_type.b61 -// CHECK:STDOUT: %ModWith.type.loc167_36.1 => constants.%ModWith.type.937 -// CHECK:STDOUT: %facet_type.loc167_20 => constants.%facet_type.b18 -// CHECK:STDOUT: %.Self.frozen.loc167_38.1 => constants.%.Self.frozen.f70 +// CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%U.as_type.b61 +// CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.937 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.b18 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.f70 // CHECK:STDOUT: %require_complete.loc167 => constants.%require_complete.708 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.447 // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.626 // CHECK:STDOUT: %assoc0 => constants.%assoc0.56e -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.1 => constants.%ModWith.lookup_impl_witness.80e -// CHECK:STDOUT: %impl.elem0.loc167_44.1 => constants.%impl.elem0.523 -// CHECK:STDOUT: %Result.as_type.loc167_54.1 => constants.%Result.as_type +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.80e +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.523 +// CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Result.as_type // CHECK:STDOUT: %.Self => constants.%.Self.a68 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.2 => constants.%ModWith.lookup_impl_witness.569 -// CHECK:STDOUT: %impl.elem0.loc167_44.2 => constants.%impl.elem0.c51 -// CHECK:STDOUT: %facet_type.loc167_38 => constants.%facet_type.639 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.569 +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.c51 +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.639 // CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.d85 // CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.49b // CHECK:STDOUT: %T.loc167_4.1 => constants.%T.999 @@ -2236,21 +2236,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.2cc // CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.2cc -// CHECK:STDOUT: %U.as_type.loc123_36.1 => constants.%Int16 -// CHECK:STDOUT: %AddWith.type.loc123_36.1 => constants.%AddWith.type.b62 -// CHECK:STDOUT: %facet_type.loc123_20 => constants.%facet_type.297 -// CHECK:STDOUT: %.Self.frozen.loc123_38.1 => constants.%.Self.frozen.7e3 +// CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%Int16 +// CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.b62 +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.297 +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.7e3 // CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.a82 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.85e // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.c72 // CHECK:STDOUT: %assoc0 => constants.%assoc0.261 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.1 => constants.%AddWith.lookup_impl_witness.5b7 -// CHECK:STDOUT: %impl.elem0.loc123_44.1 => constants.%impl.elem0.d80 -// CHECK:STDOUT: %Result.as_type.loc123_54.1 => constants.%Int16 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.5b7 +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.d80 +// CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int16 // CHECK:STDOUT: %.Self => constants.%.Self.45a -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.2 => constants.%AddWith.lookup_impl_witness.131 -// CHECK:STDOUT: %impl.elem0.loc123_44.2 => constants.%impl.elem0.28c -// CHECK:STDOUT: %facet_type.loc123_38 => constants.%facet_type.225 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.131 +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.28c +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.225 // CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.34a // CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.3ec // CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.696 @@ -2289,21 +2289,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.2cc // CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.2cc -// CHECK:STDOUT: %U.as_type.loc134_36.1 => constants.%Int16 -// CHECK:STDOUT: %SubWith.type.loc134_36.1 => constants.%SubWith.type.b12 -// CHECK:STDOUT: %facet_type.loc134_20 => constants.%facet_type.b15 -// CHECK:STDOUT: %.Self.frozen.loc134_38.1 => constants.%.Self.frozen.581 +// CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%Int16 +// CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.b12 +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.b15 +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.581 // CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.647 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.092 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.eb8 // CHECK:STDOUT: %assoc0 => constants.%assoc0.a90 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.1 => constants.%SubWith.lookup_impl_witness.b30 -// CHECK:STDOUT: %impl.elem0.loc134_44.1 => constants.%impl.elem0.748 -// CHECK:STDOUT: %Result.as_type.loc134_54.1 => constants.%Int16 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.b30 +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.748 +// CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int16 // CHECK:STDOUT: %.Self => constants.%.Self.415 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.2 => constants.%SubWith.lookup_impl_witness.266 -// CHECK:STDOUT: %impl.elem0.loc134_44.2 => constants.%impl.elem0.4a0 -// CHECK:STDOUT: %facet_type.loc134_38 => constants.%facet_type.b71 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.266 +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.4a0 +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.b71 // CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.f54 // CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.842 // CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.031 @@ -2342,21 +2342,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.2cc // CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.2cc -// CHECK:STDOUT: %U.as_type.loc145_36.1 => constants.%Int16 -// CHECK:STDOUT: %MulWith.type.loc145_36.1 => constants.%MulWith.type.c18 -// CHECK:STDOUT: %facet_type.loc145_20 => constants.%facet_type.a64 -// CHECK:STDOUT: %.Self.frozen.loc145_38.1 => constants.%.Self.frozen.05e +// CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%Int16 +// CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.c18 +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.a64 +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.05e // CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.4d3 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.2d1 // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.f15 // CHECK:STDOUT: %assoc0 => constants.%assoc0.f8b -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.1 => constants.%MulWith.lookup_impl_witness.701 -// CHECK:STDOUT: %impl.elem0.loc145_44.1 => constants.%impl.elem0.381 -// CHECK:STDOUT: %Result.as_type.loc145_54.1 => constants.%Int16 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.701 +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.381 +// CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int16 // CHECK:STDOUT: %.Self => constants.%.Self.00f -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.2 => constants.%MulWith.lookup_impl_witness.782 -// CHECK:STDOUT: %impl.elem0.loc145_44.2 => constants.%impl.elem0.8de -// CHECK:STDOUT: %facet_type.loc145_38 => constants.%facet_type.662 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.782 +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.8de +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.662 // CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.90f // CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.8ad // CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.920 @@ -2395,21 +2395,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.2cc // CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.2cc -// CHECK:STDOUT: %U.as_type.loc156_36.1 => constants.%Int16 -// CHECK:STDOUT: %DivWith.type.loc156_36.1 => constants.%DivWith.type.6f9 -// CHECK:STDOUT: %facet_type.loc156_20 => constants.%facet_type.0b4 -// CHECK:STDOUT: %.Self.frozen.loc156_38.1 => constants.%.Self.frozen.ecc +// CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%Int16 +// CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.6f9 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.0b4 +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.ecc // CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.acc // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.851 // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.333 // CHECK:STDOUT: %assoc0 => constants.%assoc0.962 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.1 => constants.%DivWith.lookup_impl_witness.6fa -// CHECK:STDOUT: %impl.elem0.loc156_44.1 => constants.%impl.elem0.e0f -// CHECK:STDOUT: %Result.as_type.loc156_54.1 => constants.%Int16 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.6fa +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.e0f +// CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int16 // CHECK:STDOUT: %.Self => constants.%.Self.9b5 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.2 => constants.%DivWith.lookup_impl_witness.648 -// CHECK:STDOUT: %impl.elem0.loc156_44.2 => constants.%impl.elem0.36a -// CHECK:STDOUT: %facet_type.loc156_38 => constants.%facet_type.bd6 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.648 +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.36a +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.bd6 // CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.692 // CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.00c // CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.ce6 @@ -2448,21 +2448,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.2cc // CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.2cc -// CHECK:STDOUT: %U.as_type.loc167_36.1 => constants.%Int16 -// CHECK:STDOUT: %ModWith.type.loc167_36.1 => constants.%ModWith.type.763 -// CHECK:STDOUT: %facet_type.loc167_20 => constants.%facet_type.ee8 -// CHECK:STDOUT: %.Self.frozen.loc167_38.1 => constants.%.Self.frozen.9a7 +// CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%Int16 +// CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.763 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.ee8 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.9a7 // CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.8fc // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.954 // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.e6a // CHECK:STDOUT: %assoc0 => constants.%assoc0.2cc -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.1 => constants.%ModWith.lookup_impl_witness.689 -// CHECK:STDOUT: %impl.elem0.loc167_44.1 => constants.%impl.elem0.42c -// CHECK:STDOUT: %Result.as_type.loc167_54.1 => constants.%Int16 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.689 +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.42c +// CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int16 // CHECK:STDOUT: %.Self => constants.%.Self.67f -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.2 => constants.%ModWith.lookup_impl_witness.af3 -// CHECK:STDOUT: %impl.elem0.loc167_44.2 => constants.%impl.elem0.436 -// CHECK:STDOUT: %facet_type.loc167_38 => constants.%facet_type.a2b +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.af3 +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.436 +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.a2b // CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.61d // CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.a00 // CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.cde @@ -2501,21 +2501,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.2cc // CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.e5c -// CHECK:STDOUT: %U.as_type.loc123_36.1 => constants.%i16 -// CHECK:STDOUT: %AddWith.type.loc123_36.1 => constants.%AddWith.type.a36 -// CHECK:STDOUT: %facet_type.loc123_20 => constants.%facet_type.1cc -// CHECK:STDOUT: %.Self.frozen.loc123_38.1 => constants.%.Self.frozen.e5b +// CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%i16 +// CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.a36 +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.1cc +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.e5b // CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.5a6 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.b7c // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.6bf // CHECK:STDOUT: %assoc0 => constants.%assoc0.e6b -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.1 => constants.%AddWith.lookup_impl_witness.047 -// CHECK:STDOUT: %impl.elem0.loc123_44.1 => constants.%impl.elem0.f6a -// CHECK:STDOUT: %Result.as_type.loc123_54.1 => constants.%Int16 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.047 +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.f6a +// CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int16 // CHECK:STDOUT: %.Self => constants.%.Self.a82 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.2 => constants.%AddWith.lookup_impl_witness.e27 -// CHECK:STDOUT: %impl.elem0.loc123_44.2 => constants.%impl.elem0.115 -// CHECK:STDOUT: %facet_type.loc123_38 => constants.%facet_type.b7b +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.e27 +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.115 +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.b7b // CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.c51 // CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.5cb // CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.0c7 @@ -2554,21 +2554,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.2cc // CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.e5c -// CHECK:STDOUT: %U.as_type.loc134_36.1 => constants.%i16 -// CHECK:STDOUT: %SubWith.type.loc134_36.1 => constants.%SubWith.type.08b -// CHECK:STDOUT: %facet_type.loc134_20 => constants.%facet_type.cb2 -// CHECK:STDOUT: %.Self.frozen.loc134_38.1 => constants.%.Self.frozen.bbc +// CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%i16 +// CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.08b +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.cb2 +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.bbc // CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.090 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.ae6 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.077 // CHECK:STDOUT: %assoc0 => constants.%assoc0.465 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.1 => constants.%SubWith.lookup_impl_witness.596 -// CHECK:STDOUT: %impl.elem0.loc134_44.1 => constants.%impl.elem0.733 -// CHECK:STDOUT: %Result.as_type.loc134_54.1 => constants.%Int16 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.596 +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.733 +// CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int16 // CHECK:STDOUT: %.Self => constants.%.Self.a84 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.2 => constants.%SubWith.lookup_impl_witness.581 -// CHECK:STDOUT: %impl.elem0.loc134_44.2 => constants.%impl.elem0.a77 -// CHECK:STDOUT: %facet_type.loc134_38 => constants.%facet_type.a67 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.581 +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.a77 +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.a67 // CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.486 // CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.eb2 // CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.33e @@ -2607,21 +2607,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.2cc // CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.e5c -// CHECK:STDOUT: %U.as_type.loc145_36.1 => constants.%i16 -// CHECK:STDOUT: %MulWith.type.loc145_36.1 => constants.%MulWith.type.55d -// CHECK:STDOUT: %facet_type.loc145_20 => constants.%facet_type.67c -// CHECK:STDOUT: %.Self.frozen.loc145_38.1 => constants.%.Self.frozen.c15 +// CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%i16 +// CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.55d +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.67c +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.c15 // CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.a8b // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.225 // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.212 // CHECK:STDOUT: %assoc0 => constants.%assoc0.455 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.1 => constants.%MulWith.lookup_impl_witness.481 -// CHECK:STDOUT: %impl.elem0.loc145_44.1 => constants.%impl.elem0.574 -// CHECK:STDOUT: %Result.as_type.loc145_54.1 => constants.%Int16 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.481 +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.574 +// CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int16 // CHECK:STDOUT: %.Self => constants.%.Self.5dd -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.2 => constants.%MulWith.lookup_impl_witness.092 -// CHECK:STDOUT: %impl.elem0.loc145_44.2 => constants.%impl.elem0.163 -// CHECK:STDOUT: %facet_type.loc145_38 => constants.%facet_type.d40 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.092 +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.163 +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.d40 // CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.f6f // CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.dc7 // CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.ba4 @@ -2660,21 +2660,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.2cc // CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.e5c -// CHECK:STDOUT: %U.as_type.loc156_36.1 => constants.%i16 -// CHECK:STDOUT: %DivWith.type.loc156_36.1 => constants.%DivWith.type.ab0 -// CHECK:STDOUT: %facet_type.loc156_20 => constants.%facet_type.86c8 -// CHECK:STDOUT: %.Self.frozen.loc156_38.1 => constants.%.Self.frozen.128 +// CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%i16 +// CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.ab0 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.86c8 +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.128 // CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.1cb // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.ac3 // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.1f2 // CHECK:STDOUT: %assoc0 => constants.%assoc0.be2 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.1 => constants.%DivWith.lookup_impl_witness.a5b -// CHECK:STDOUT: %impl.elem0.loc156_44.1 => constants.%impl.elem0.4e9 -// CHECK:STDOUT: %Result.as_type.loc156_54.1 => constants.%Int16 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.a5b +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.4e9 +// CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int16 // CHECK:STDOUT: %.Self => constants.%.Self.d04 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.2 => constants.%DivWith.lookup_impl_witness.6ec -// CHECK:STDOUT: %impl.elem0.loc156_44.2 => constants.%impl.elem0.58b -// CHECK:STDOUT: %facet_type.loc156_38 => constants.%facet_type.541 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.6ec +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.58b +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.541 // CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.80a // CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.c06 // CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.521 @@ -2713,21 +2713,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.2cc // CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.e5c -// CHECK:STDOUT: %U.as_type.loc167_36.1 => constants.%i16 -// CHECK:STDOUT: %ModWith.type.loc167_36.1 => constants.%ModWith.type.0b2 -// CHECK:STDOUT: %facet_type.loc167_20 => constants.%facet_type.afdb -// CHECK:STDOUT: %.Self.frozen.loc167_38.1 => constants.%.Self.frozen.46c +// CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%i16 +// CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.0b2 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.afdb +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.46c // CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.1f9 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.12f // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.e06 // CHECK:STDOUT: %assoc0 => constants.%assoc0.b5a -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.1 => constants.%ModWith.lookup_impl_witness.5ab -// CHECK:STDOUT: %impl.elem0.loc167_44.1 => constants.%impl.elem0.172 -// CHECK:STDOUT: %Result.as_type.loc167_54.1 => constants.%Int16 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.5ab +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.172 +// CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int16 // CHECK:STDOUT: %.Self => constants.%.Self.69d -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.2 => constants.%ModWith.lookup_impl_witness.b3b -// CHECK:STDOUT: %impl.elem0.loc167_44.2 => constants.%impl.elem0.0f8 -// CHECK:STDOUT: %facet_type.loc167_38 => constants.%facet_type.ee6 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.b3b +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.0f8 +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.ee6 // CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.4d8 // CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.a7e // CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.ce1 @@ -2766,21 +2766,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc123_36.1 => constants.%Int32 -// CHECK:STDOUT: %AddWith.type.loc123_36.1 => constants.%AddWith.type.c71 -// CHECK:STDOUT: %facet_type.loc123_20 => constants.%facet_type.698 -// CHECK:STDOUT: %.Self.frozen.loc123_38.1 => constants.%.Self.frozen.f1e +// CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%Int32 +// CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.c71 +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.698 +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.f1e // CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.224 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.440 // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.72d // CHECK:STDOUT: %assoc0 => constants.%assoc0.c2b -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.1 => constants.%AddWith.lookup_impl_witness.7f6 -// CHECK:STDOUT: %impl.elem0.loc123_44.1 => constants.%impl.elem0.7a4 -// CHECK:STDOUT: %Result.as_type.loc123_54.1 => constants.%Int32 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.7f6 +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.7a4 +// CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.591 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.2 => constants.%AddWith.lookup_impl_witness.47a -// CHECK:STDOUT: %impl.elem0.loc123_44.2 => constants.%impl.elem0.6e6 -// CHECK:STDOUT: %facet_type.loc123_38 => constants.%facet_type.ecf +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.47a +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.6e6 +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.ecf // CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.c976 // CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.0a8 // CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.17e @@ -2819,21 +2819,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc134_36.1 => constants.%Int32 -// CHECK:STDOUT: %SubWith.type.loc134_36.1 => constants.%SubWith.type.c81 -// CHECK:STDOUT: %facet_type.loc134_20 => constants.%facet_type.44e -// CHECK:STDOUT: %.Self.frozen.loc134_38.1 => constants.%.Self.frozen.db8 +// CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%Int32 +// CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.c81 +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.44e +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.db8 // CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.63f // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.068 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.68f // CHECK:STDOUT: %assoc0 => constants.%assoc0.f11 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.1 => constants.%SubWith.lookup_impl_witness.32d -// CHECK:STDOUT: %impl.elem0.loc134_44.1 => constants.%impl.elem0.821 -// CHECK:STDOUT: %Result.as_type.loc134_54.1 => constants.%Int32 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.32d +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.821 +// CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.8ac -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.2 => constants.%SubWith.lookup_impl_witness.f41 -// CHECK:STDOUT: %impl.elem0.loc134_44.2 => constants.%impl.elem0.e31 -// CHECK:STDOUT: %facet_type.loc134_38 => constants.%facet_type.630 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.f41 +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.e31 +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.630 // CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.c58 // CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.315 // CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.9eb @@ -2872,21 +2872,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc145_36.1 => constants.%Int32 -// CHECK:STDOUT: %MulWith.type.loc145_36.1 => constants.%MulWith.type.eeb -// CHECK:STDOUT: %facet_type.loc145_20 => constants.%facet_type.ff6 -// CHECK:STDOUT: %.Self.frozen.loc145_38.1 => constants.%.Self.frozen.be6 +// CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%Int32 +// CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.eeb +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.ff6 +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.be6 // CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.3fe // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.aaf // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.083 // CHECK:STDOUT: %assoc0 => constants.%assoc0.fc0 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.1 => constants.%MulWith.lookup_impl_witness.4cf -// CHECK:STDOUT: %impl.elem0.loc145_44.1 => constants.%impl.elem0.167 -// CHECK:STDOUT: %Result.as_type.loc145_54.1 => constants.%Int32 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.4cf +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.167 +// CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.d4f -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.2 => constants.%MulWith.lookup_impl_witness.07b -// CHECK:STDOUT: %impl.elem0.loc145_44.2 => constants.%impl.elem0.0ea -// CHECK:STDOUT: %facet_type.loc145_38 => constants.%facet_type.26b +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.07b +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.0ea +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.26b // CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.354 // CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.4b7 // CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.9ae @@ -2925,21 +2925,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc156_36.1 => constants.%Int32 -// CHECK:STDOUT: %DivWith.type.loc156_36.1 => constants.%DivWith.type.fb1 -// CHECK:STDOUT: %facet_type.loc156_20 => constants.%facet_type.d41 -// CHECK:STDOUT: %.Self.frozen.loc156_38.1 => constants.%.Self.frozen.be1 +// CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%Int32 +// CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.fb1 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.d41 +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.be1 // CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.11b // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.88a // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.725 // CHECK:STDOUT: %assoc0 => constants.%assoc0.2da -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.1 => constants.%DivWith.lookup_impl_witness.385 -// CHECK:STDOUT: %impl.elem0.loc156_44.1 => constants.%impl.elem0.b42 -// CHECK:STDOUT: %Result.as_type.loc156_54.1 => constants.%Int32 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.385 +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.b42 +// CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.13f -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.2 => constants.%DivWith.lookup_impl_witness.abd -// CHECK:STDOUT: %impl.elem0.loc156_44.2 => constants.%impl.elem0.1a6 -// CHECK:STDOUT: %facet_type.loc156_38 => constants.%facet_type.1a8 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.abd +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.1a6 +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.1a8 // CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.761 // CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.f94 // CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.38c @@ -2978,21 +2978,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc167_36.1 => constants.%Int32 -// CHECK:STDOUT: %ModWith.type.loc167_36.1 => constants.%ModWith.type.253 -// CHECK:STDOUT: %facet_type.loc167_20 => constants.%facet_type.ea8 -// CHECK:STDOUT: %.Self.frozen.loc167_38.1 => constants.%.Self.frozen.4b6 +// CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%Int32 +// CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.253 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.ea8 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.4b6 // CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.2aa // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.080 // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.47d // CHECK:STDOUT: %assoc0 => constants.%assoc0.45c -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.1 => constants.%ModWith.lookup_impl_witness.fe2 -// CHECK:STDOUT: %impl.elem0.loc167_44.1 => constants.%impl.elem0.e60 -// CHECK:STDOUT: %Result.as_type.loc167_54.1 => constants.%Int32 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.fe2 +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.e60 +// CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.008 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.2 => constants.%ModWith.lookup_impl_witness.557 -// CHECK:STDOUT: %impl.elem0.loc167_44.2 => constants.%impl.elem0.cdb -// CHECK:STDOUT: %facet_type.loc167_38 => constants.%facet_type.c8c +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.557 +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.cdb +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.c8c // CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.c9a // CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.b4d // CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.68d @@ -3031,21 +3031,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.2cc -// CHECK:STDOUT: %U.as_type.loc123_36.1 => constants.%Int16 -// CHECK:STDOUT: %AddWith.type.loc123_36.1 => constants.%AddWith.type.b62 -// CHECK:STDOUT: %facet_type.loc123_20 => constants.%facet_type.297 -// CHECK:STDOUT: %.Self.frozen.loc123_38.1 => constants.%.Self.frozen.7e3 +// CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%Int16 +// CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.b62 +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.297 +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.7e3 // CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.a82 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.85e // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.c72 // CHECK:STDOUT: %assoc0 => constants.%assoc0.261 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.1 => constants.%AddWith.lookup_impl_witness.5b7 -// CHECK:STDOUT: %impl.elem0.loc123_44.1 => constants.%impl.elem0.d80 -// CHECK:STDOUT: %Result.as_type.loc123_54.1 => constants.%Int32 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.5b7 +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.d80 +// CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.45a -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.2 => constants.%AddWith.lookup_impl_witness.131 -// CHECK:STDOUT: %impl.elem0.loc123_44.2 => constants.%impl.elem0.28c -// CHECK:STDOUT: %facet_type.loc123_38 => constants.%facet_type.37e +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.131 +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.28c +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.37e // CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.363 // CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.ccd // CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.6ea @@ -3084,21 +3084,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.2cc -// CHECK:STDOUT: %U.as_type.loc134_36.1 => constants.%Int16 -// CHECK:STDOUT: %SubWith.type.loc134_36.1 => constants.%SubWith.type.b12 -// CHECK:STDOUT: %facet_type.loc134_20 => constants.%facet_type.b15 -// CHECK:STDOUT: %.Self.frozen.loc134_38.1 => constants.%.Self.frozen.581 +// CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%Int16 +// CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.b12 +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.b15 +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.581 // CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.647 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.092 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.eb8 // CHECK:STDOUT: %assoc0 => constants.%assoc0.a90 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.1 => constants.%SubWith.lookup_impl_witness.b30 -// CHECK:STDOUT: %impl.elem0.loc134_44.1 => constants.%impl.elem0.748 -// CHECK:STDOUT: %Result.as_type.loc134_54.1 => constants.%Int32 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.b30 +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.748 +// CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.415 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.2 => constants.%SubWith.lookup_impl_witness.266 -// CHECK:STDOUT: %impl.elem0.loc134_44.2 => constants.%impl.elem0.4a0 -// CHECK:STDOUT: %facet_type.loc134_38 => constants.%facet_type.983 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.266 +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.4a0 +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.983 // CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.af3 // CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.14c // CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.bcc @@ -3137,21 +3137,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.2cc -// CHECK:STDOUT: %U.as_type.loc145_36.1 => constants.%Int16 -// CHECK:STDOUT: %MulWith.type.loc145_36.1 => constants.%MulWith.type.c18 -// CHECK:STDOUT: %facet_type.loc145_20 => constants.%facet_type.a64 -// CHECK:STDOUT: %.Self.frozen.loc145_38.1 => constants.%.Self.frozen.05e +// CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%Int16 +// CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.c18 +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.a64 +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.05e // CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.4d3 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.2d1 // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.f15 // CHECK:STDOUT: %assoc0 => constants.%assoc0.f8b -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.1 => constants.%MulWith.lookup_impl_witness.701 -// CHECK:STDOUT: %impl.elem0.loc145_44.1 => constants.%impl.elem0.381 -// CHECK:STDOUT: %Result.as_type.loc145_54.1 => constants.%Int32 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.701 +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.381 +// CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.00f -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.2 => constants.%MulWith.lookup_impl_witness.782 -// CHECK:STDOUT: %impl.elem0.loc145_44.2 => constants.%impl.elem0.8de -// CHECK:STDOUT: %facet_type.loc145_38 => constants.%facet_type.f48 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.782 +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.8de +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.f48 // CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.02f // CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.a9e // CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.795 @@ -3190,21 +3190,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.2cc -// CHECK:STDOUT: %U.as_type.loc156_36.1 => constants.%Int16 -// CHECK:STDOUT: %DivWith.type.loc156_36.1 => constants.%DivWith.type.6f9 -// CHECK:STDOUT: %facet_type.loc156_20 => constants.%facet_type.0b4 -// CHECK:STDOUT: %.Self.frozen.loc156_38.1 => constants.%.Self.frozen.ecc +// CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%Int16 +// CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.6f9 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.0b4 +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.ecc // CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.acc // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.851 // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.333 // CHECK:STDOUT: %assoc0 => constants.%assoc0.962 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.1 => constants.%DivWith.lookup_impl_witness.6fa -// CHECK:STDOUT: %impl.elem0.loc156_44.1 => constants.%impl.elem0.e0f -// CHECK:STDOUT: %Result.as_type.loc156_54.1 => constants.%Int32 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.6fa +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.e0f +// CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.9b5 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.2 => constants.%DivWith.lookup_impl_witness.648 -// CHECK:STDOUT: %impl.elem0.loc156_44.2 => constants.%impl.elem0.36a -// CHECK:STDOUT: %facet_type.loc156_38 => constants.%facet_type.50d +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.648 +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.36a +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.50d // CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.9af // CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.dfa // CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.c8d @@ -3243,21 +3243,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.2cc -// CHECK:STDOUT: %U.as_type.loc167_36.1 => constants.%Int16 -// CHECK:STDOUT: %ModWith.type.loc167_36.1 => constants.%ModWith.type.763 -// CHECK:STDOUT: %facet_type.loc167_20 => constants.%facet_type.ee8 -// CHECK:STDOUT: %.Self.frozen.loc167_38.1 => constants.%.Self.frozen.9a7 +// CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%Int16 +// CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.763 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.ee8 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.9a7 // CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.8fc // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.954 // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.e6a // CHECK:STDOUT: %assoc0 => constants.%assoc0.2cc -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.1 => constants.%ModWith.lookup_impl_witness.689 -// CHECK:STDOUT: %impl.elem0.loc167_44.1 => constants.%impl.elem0.42c -// CHECK:STDOUT: %Result.as_type.loc167_54.1 => constants.%Int32 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.689 +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.42c +// CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.67f -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.2 => constants.%ModWith.lookup_impl_witness.af3 -// CHECK:STDOUT: %impl.elem0.loc167_44.2 => constants.%impl.elem0.436 -// CHECK:STDOUT: %facet_type.loc167_38 => constants.%facet_type.b37 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.af3 +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.436 +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.b37 // CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.448 // CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.528 // CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.da8 @@ -3296,21 +3296,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc123_36.1 => constants.%Int32 -// CHECK:STDOUT: %AddWith.type.loc123_36.1 => constants.%AddWith.type.c71 -// CHECK:STDOUT: %facet_type.loc123_20 => constants.%facet_type.698 -// CHECK:STDOUT: %.Self.frozen.loc123_38.1 => constants.%.Self.frozen.f1e +// CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%Int32 +// CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.c71 +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.698 +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.f1e // CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.224 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.440 // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.72d // CHECK:STDOUT: %assoc0 => constants.%assoc0.c2b -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.1 => constants.%AddWith.lookup_impl_witness.7f6 -// CHECK:STDOUT: %impl.elem0.loc123_44.1 => constants.%impl.elem0.7a4 -// CHECK:STDOUT: %Result.as_type.loc123_54.1 => constants.%Int32 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.7f6 +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.7a4 +// CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.591 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.2 => constants.%AddWith.lookup_impl_witness.47a -// CHECK:STDOUT: %impl.elem0.loc123_44.2 => constants.%impl.elem0.6e6 -// CHECK:STDOUT: %facet_type.loc123_38 => constants.%facet_type.ecf +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.47a +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.6e6 +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.ecf // CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.c976 // CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.0a8 // CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.f1a @@ -3349,21 +3349,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc134_36.1 => constants.%Int32 -// CHECK:STDOUT: %SubWith.type.loc134_36.1 => constants.%SubWith.type.c81 -// CHECK:STDOUT: %facet_type.loc134_20 => constants.%facet_type.44e -// CHECK:STDOUT: %.Self.frozen.loc134_38.1 => constants.%.Self.frozen.db8 +// CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%Int32 +// CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.c81 +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.44e +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.db8 // CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.63f // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.068 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.68f // CHECK:STDOUT: %assoc0 => constants.%assoc0.f11 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.1 => constants.%SubWith.lookup_impl_witness.32d -// CHECK:STDOUT: %impl.elem0.loc134_44.1 => constants.%impl.elem0.821 -// CHECK:STDOUT: %Result.as_type.loc134_54.1 => constants.%Int32 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.32d +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.821 +// CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.8ac -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.2 => constants.%SubWith.lookup_impl_witness.f41 -// CHECK:STDOUT: %impl.elem0.loc134_44.2 => constants.%impl.elem0.e31 -// CHECK:STDOUT: %facet_type.loc134_38 => constants.%facet_type.630 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.f41 +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.e31 +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.630 // CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.c58 // CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.315 // CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.6fc @@ -3402,21 +3402,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc145_36.1 => constants.%Int32 -// CHECK:STDOUT: %MulWith.type.loc145_36.1 => constants.%MulWith.type.eeb -// CHECK:STDOUT: %facet_type.loc145_20 => constants.%facet_type.ff6 -// CHECK:STDOUT: %.Self.frozen.loc145_38.1 => constants.%.Self.frozen.be6 +// CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%Int32 +// CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.eeb +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.ff6 +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.be6 // CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.3fe // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.aaf // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.083 // CHECK:STDOUT: %assoc0 => constants.%assoc0.fc0 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.1 => constants.%MulWith.lookup_impl_witness.4cf -// CHECK:STDOUT: %impl.elem0.loc145_44.1 => constants.%impl.elem0.167 -// CHECK:STDOUT: %Result.as_type.loc145_54.1 => constants.%Int32 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.4cf +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.167 +// CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.d4f -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.2 => constants.%MulWith.lookup_impl_witness.07b -// CHECK:STDOUT: %impl.elem0.loc145_44.2 => constants.%impl.elem0.0ea -// CHECK:STDOUT: %facet_type.loc145_38 => constants.%facet_type.26b +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.07b +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.0ea +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.26b // CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.354 // CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.4b7 // CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.c80 @@ -3455,21 +3455,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc156_36.1 => constants.%Int32 -// CHECK:STDOUT: %DivWith.type.loc156_36.1 => constants.%DivWith.type.fb1 -// CHECK:STDOUT: %facet_type.loc156_20 => constants.%facet_type.d41 -// CHECK:STDOUT: %.Self.frozen.loc156_38.1 => constants.%.Self.frozen.be1 +// CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%Int32 +// CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.fb1 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.d41 +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.be1 // CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.11b // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.88a // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.725 // CHECK:STDOUT: %assoc0 => constants.%assoc0.2da -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.1 => constants.%DivWith.lookup_impl_witness.385 -// CHECK:STDOUT: %impl.elem0.loc156_44.1 => constants.%impl.elem0.b42 -// CHECK:STDOUT: %Result.as_type.loc156_54.1 => constants.%Int32 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.385 +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.b42 +// CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.13f -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.2 => constants.%DivWith.lookup_impl_witness.abd -// CHECK:STDOUT: %impl.elem0.loc156_44.2 => constants.%impl.elem0.1a6 -// CHECK:STDOUT: %facet_type.loc156_38 => constants.%facet_type.1a8 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.abd +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.1a6 +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.1a8 // CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.761 // CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.f94 // CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.b2c @@ -3508,21 +3508,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.099 // CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc167_36.1 => constants.%Int32 -// CHECK:STDOUT: %ModWith.type.loc167_36.1 => constants.%ModWith.type.253 -// CHECK:STDOUT: %facet_type.loc167_20 => constants.%facet_type.ea8 -// CHECK:STDOUT: %.Self.frozen.loc167_38.1 => constants.%.Self.frozen.4b6 +// CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%Int32 +// CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.253 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.ea8 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.4b6 // CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.2aa // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.080 // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.47d // CHECK:STDOUT: %assoc0 => constants.%assoc0.45c -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.1 => constants.%ModWith.lookup_impl_witness.fe2 -// CHECK:STDOUT: %impl.elem0.loc167_44.1 => constants.%impl.elem0.e60 -// CHECK:STDOUT: %Result.as_type.loc167_54.1 => constants.%Int32 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.fe2 +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.e60 +// CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int32 // CHECK:STDOUT: %.Self => constants.%.Self.008 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.2 => constants.%ModWith.lookup_impl_witness.557 -// CHECK:STDOUT: %impl.elem0.loc167_44.2 => constants.%impl.elem0.cdb -// CHECK:STDOUT: %facet_type.loc167_38 => constants.%facet_type.c8c +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.557 +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.cdb +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.c8c // CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.c9a // CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.b4d // CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.7ec @@ -3561,21 +3561,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.191 // CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.191 -// CHECK:STDOUT: %U.as_type.loc123_36.1 => constants.%Int64 -// CHECK:STDOUT: %AddWith.type.loc123_36.1 => constants.%AddWith.type.b5b -// CHECK:STDOUT: %facet_type.loc123_20 => constants.%facet_type.afd1 -// CHECK:STDOUT: %.Self.frozen.loc123_38.1 => constants.%.Self.frozen.2e1 +// CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%Int64 +// CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.b5b +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.afd1 +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.2e1 // CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.412 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.d9c // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.0c5 // CHECK:STDOUT: %assoc0 => constants.%assoc0.947 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.1 => constants.%AddWith.lookup_impl_witness.bc7 -// CHECK:STDOUT: %impl.elem0.loc123_44.1 => constants.%impl.elem0.a41 -// CHECK:STDOUT: %Result.as_type.loc123_54.1 => constants.%Int64 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.bc7 +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.a41 +// CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int64 // CHECK:STDOUT: %.Self => constants.%.Self.d7b -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.2 => constants.%AddWith.lookup_impl_witness.085 -// CHECK:STDOUT: %impl.elem0.loc123_44.2 => constants.%impl.elem0.7e8 -// CHECK:STDOUT: %facet_type.loc123_38 => constants.%facet_type.522 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.085 +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.7e8 +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.522 // CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.613 // CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.f5c // CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.178 @@ -3614,21 +3614,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.191 // CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.191 -// CHECK:STDOUT: %U.as_type.loc134_36.1 => constants.%Int64 -// CHECK:STDOUT: %SubWith.type.loc134_36.1 => constants.%SubWith.type.a46 -// CHECK:STDOUT: %facet_type.loc134_20 => constants.%facet_type.502 -// CHECK:STDOUT: %.Self.frozen.loc134_38.1 => constants.%.Self.frozen.da7 +// CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%Int64 +// CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.a46 +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.502 +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.da7 // CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.181 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.436 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.e16 // CHECK:STDOUT: %assoc0 => constants.%assoc0.88a -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.1 => constants.%SubWith.lookup_impl_witness.362 -// CHECK:STDOUT: %impl.elem0.loc134_44.1 => constants.%impl.elem0.f3a -// CHECK:STDOUT: %Result.as_type.loc134_54.1 => constants.%Int64 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.362 +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.f3a +// CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int64 // CHECK:STDOUT: %.Self => constants.%.Self.074 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.2 => constants.%SubWith.lookup_impl_witness.0c4 -// CHECK:STDOUT: %impl.elem0.loc134_44.2 => constants.%impl.elem0.68d -// CHECK:STDOUT: %facet_type.loc134_38 => constants.%facet_type.e5e +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.0c4 +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.68d +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.e5e // CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.41a // CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.282 // CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.c78 @@ -3667,21 +3667,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.191 // CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.191 -// CHECK:STDOUT: %U.as_type.loc145_36.1 => constants.%Int64 -// CHECK:STDOUT: %MulWith.type.loc145_36.1 => constants.%MulWith.type.76f -// CHECK:STDOUT: %facet_type.loc145_20 => constants.%facet_type.770 -// CHECK:STDOUT: %.Self.frozen.loc145_38.1 => constants.%.Self.frozen.f85 +// CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%Int64 +// CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.76f +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.770 +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.f85 // CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.16e // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f77 // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.a37 // CHECK:STDOUT: %assoc0 => constants.%assoc0.210 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.1 => constants.%MulWith.lookup_impl_witness.472 -// CHECK:STDOUT: %impl.elem0.loc145_44.1 => constants.%impl.elem0.c8c -// CHECK:STDOUT: %Result.as_type.loc145_54.1 => constants.%Int64 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.472 +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.c8c +// CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int64 // CHECK:STDOUT: %.Self => constants.%.Self.4e1 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.2 => constants.%MulWith.lookup_impl_witness.55a -// CHECK:STDOUT: %impl.elem0.loc145_44.2 => constants.%impl.elem0.641 -// CHECK:STDOUT: %facet_type.loc145_38 => constants.%facet_type.9a3 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.55a +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.641 +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.9a3 // CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.346 // CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.6f8 // CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.34a @@ -3720,21 +3720,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.191 // CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.191 -// CHECK:STDOUT: %U.as_type.loc156_36.1 => constants.%Int64 -// CHECK:STDOUT: %DivWith.type.loc156_36.1 => constants.%DivWith.type.095 -// CHECK:STDOUT: %facet_type.loc156_20 => constants.%facet_type.c98 -// CHECK:STDOUT: %.Self.frozen.loc156_38.1 => constants.%.Self.frozen.8cb +// CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%Int64 +// CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.095 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.c98 +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.8cb // CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.621 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.bdb // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.8a4 // CHECK:STDOUT: %assoc0 => constants.%assoc0.982 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.1 => constants.%DivWith.lookup_impl_witness.a82 -// CHECK:STDOUT: %impl.elem0.loc156_44.1 => constants.%impl.elem0.709 -// CHECK:STDOUT: %Result.as_type.loc156_54.1 => constants.%Int64 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.a82 +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.709 +// CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int64 // CHECK:STDOUT: %.Self => constants.%.Self.f70 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.2 => constants.%DivWith.lookup_impl_witness.4c3 -// CHECK:STDOUT: %impl.elem0.loc156_44.2 => constants.%impl.elem0.622 -// CHECK:STDOUT: %facet_type.loc156_38 => constants.%facet_type.641 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.4c3 +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.622 +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.641 // CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.719 // CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.e0b // CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.dd9 @@ -3773,21 +3773,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.191 // CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.191 -// CHECK:STDOUT: %U.as_type.loc167_36.1 => constants.%Int64 -// CHECK:STDOUT: %ModWith.type.loc167_36.1 => constants.%ModWith.type.204 -// CHECK:STDOUT: %facet_type.loc167_20 => constants.%facet_type.f26 -// CHECK:STDOUT: %.Self.frozen.loc167_38.1 => constants.%.Self.frozen.ac6 +// CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%Int64 +// CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.204 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.f26 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.ac6 // CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.359 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.17a // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.1f7 // CHECK:STDOUT: %assoc0 => constants.%assoc0.0a6 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.1 => constants.%ModWith.lookup_impl_witness.072 -// CHECK:STDOUT: %impl.elem0.loc167_44.1 => constants.%impl.elem0.220 -// CHECK:STDOUT: %Result.as_type.loc167_54.1 => constants.%Int64 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.072 +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.220 +// CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int64 // CHECK:STDOUT: %.Self => constants.%.Self.494 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.2 => constants.%ModWith.lookup_impl_witness.103 -// CHECK:STDOUT: %impl.elem0.loc167_44.2 => constants.%impl.elem0.ffb -// CHECK:STDOUT: %facet_type.loc167_38 => constants.%facet_type.096 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.103 +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.ffb +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.096 // CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.df3 // CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.c87 // CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.ea3 @@ -3826,21 +3826,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.191 // CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc123_36.1 => constants.%Int32 -// CHECK:STDOUT: %AddWith.type.loc123_36.1 => constants.%AddWith.type.c71 -// CHECK:STDOUT: %facet_type.loc123_20 => constants.%facet_type.698 -// CHECK:STDOUT: %.Self.frozen.loc123_38.1 => constants.%.Self.frozen.f1e +// CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%Int32 +// CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.c71 +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.698 +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.f1e // CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.224 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.440 // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.72d // CHECK:STDOUT: %assoc0 => constants.%assoc0.c2b -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.1 => constants.%AddWith.lookup_impl_witness.7f6 -// CHECK:STDOUT: %impl.elem0.loc123_44.1 => constants.%impl.elem0.7a4 -// CHECK:STDOUT: %Result.as_type.loc123_54.1 => constants.%Int64 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.7f6 +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.7a4 +// CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int64 // CHECK:STDOUT: %.Self => constants.%.Self.591 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_44.2 => constants.%AddWith.lookup_impl_witness.47a -// CHECK:STDOUT: %impl.elem0.loc123_44.2 => constants.%impl.elem0.6e6 -// CHECK:STDOUT: %facet_type.loc123_38 => constants.%facet_type.840 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.47a +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.6e6 +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.840 // CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.46d // CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.211 // CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.393 @@ -3879,21 +3879,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.191 // CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc134_36.1 => constants.%Int32 -// CHECK:STDOUT: %SubWith.type.loc134_36.1 => constants.%SubWith.type.c81 -// CHECK:STDOUT: %facet_type.loc134_20 => constants.%facet_type.44e -// CHECK:STDOUT: %.Self.frozen.loc134_38.1 => constants.%.Self.frozen.db8 +// CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%Int32 +// CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.c81 +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.44e +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.db8 // CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.63f // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.068 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.68f // CHECK:STDOUT: %assoc0 => constants.%assoc0.f11 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.1 => constants.%SubWith.lookup_impl_witness.32d -// CHECK:STDOUT: %impl.elem0.loc134_44.1 => constants.%impl.elem0.821 -// CHECK:STDOUT: %Result.as_type.loc134_54.1 => constants.%Int64 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.32d +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.821 +// CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int64 // CHECK:STDOUT: %.Self => constants.%.Self.8ac -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_44.2 => constants.%SubWith.lookup_impl_witness.f41 -// CHECK:STDOUT: %impl.elem0.loc134_44.2 => constants.%impl.elem0.e31 -// CHECK:STDOUT: %facet_type.loc134_38 => constants.%facet_type.99d +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.f41 +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.e31 +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.99d // CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.b19 // CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.e50 // CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.e02 @@ -3932,21 +3932,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.191 // CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc145_36.1 => constants.%Int32 -// CHECK:STDOUT: %MulWith.type.loc145_36.1 => constants.%MulWith.type.eeb -// CHECK:STDOUT: %facet_type.loc145_20 => constants.%facet_type.ff6 -// CHECK:STDOUT: %.Self.frozen.loc145_38.1 => constants.%.Self.frozen.be6 +// CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%Int32 +// CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.eeb +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.ff6 +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.be6 // CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.3fe // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.aaf // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.083 // CHECK:STDOUT: %assoc0 => constants.%assoc0.fc0 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.1 => constants.%MulWith.lookup_impl_witness.4cf -// CHECK:STDOUT: %impl.elem0.loc145_44.1 => constants.%impl.elem0.167 -// CHECK:STDOUT: %Result.as_type.loc145_54.1 => constants.%Int64 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.4cf +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.167 +// CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int64 // CHECK:STDOUT: %.Self => constants.%.Self.d4f -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_44.2 => constants.%MulWith.lookup_impl_witness.07b -// CHECK:STDOUT: %impl.elem0.loc145_44.2 => constants.%impl.elem0.0ea -// CHECK:STDOUT: %facet_type.loc145_38 => constants.%facet_type.5e8 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.07b +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.0ea +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.5e8 // CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.d24 // CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.54a // CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.dda @@ -3985,21 +3985,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.191 // CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc156_36.1 => constants.%Int32 -// CHECK:STDOUT: %DivWith.type.loc156_36.1 => constants.%DivWith.type.fb1 -// CHECK:STDOUT: %facet_type.loc156_20 => constants.%facet_type.d41 -// CHECK:STDOUT: %.Self.frozen.loc156_38.1 => constants.%.Self.frozen.be1 +// CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%Int32 +// CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.fb1 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.d41 +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.be1 // CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.11b // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.88a // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.725 // CHECK:STDOUT: %assoc0 => constants.%assoc0.2da -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.1 => constants.%DivWith.lookup_impl_witness.385 -// CHECK:STDOUT: %impl.elem0.loc156_44.1 => constants.%impl.elem0.b42 -// CHECK:STDOUT: %Result.as_type.loc156_54.1 => constants.%Int64 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.385 +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.b42 +// CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int64 // CHECK:STDOUT: %.Self => constants.%.Self.13f -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_44.2 => constants.%DivWith.lookup_impl_witness.abd -// CHECK:STDOUT: %impl.elem0.loc156_44.2 => constants.%impl.elem0.1a6 -// CHECK:STDOUT: %facet_type.loc156_38 => constants.%facet_type.97b +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.abd +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.1a6 +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.97b // CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.6b7 // CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.0b0 // CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.886 @@ -4038,21 +4038,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.191 // CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 // CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %U.as_type.loc167_36.1 => constants.%Int32 -// CHECK:STDOUT: %ModWith.type.loc167_36.1 => constants.%ModWith.type.253 -// CHECK:STDOUT: %facet_type.loc167_20 => constants.%facet_type.ea8 -// CHECK:STDOUT: %.Self.frozen.loc167_38.1 => constants.%.Self.frozen.4b6 +// CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%Int32 +// CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.253 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.ea8 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.4b6 // CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.2aa // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.080 // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.47d // CHECK:STDOUT: %assoc0 => constants.%assoc0.45c -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.1 => constants.%ModWith.lookup_impl_witness.fe2 -// CHECK:STDOUT: %impl.elem0.loc167_44.1 => constants.%impl.elem0.e60 -// CHECK:STDOUT: %Result.as_type.loc167_54.1 => constants.%Int64 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.fe2 +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.e60 +// CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int64 // CHECK:STDOUT: %.Self => constants.%.Self.008 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_44.2 => constants.%ModWith.lookup_impl_witness.557 -// CHECK:STDOUT: %impl.elem0.loc167_44.2 => constants.%impl.elem0.cdb -// CHECK:STDOUT: %facet_type.loc167_38 => constants.%facet_type.546 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.557 +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.cdb +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.546 // CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.5db // CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.ed0 // CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.20a @@ -4089,101 +4089,101 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @AddAssignWith.loc225(constants.%U.67d, constants.%T.792) { // CHECK:STDOUT: %U.patt.loc225_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc225_19.1 => constants.%U.67d -// CHECK:STDOUT: %AddAssignWith.type.loc225_52.1 => constants.%AddAssignWith.type.2c8890.2 -// CHECK:STDOUT: %pattern_type.loc225_29 => constants.%pattern_type.82d -// CHECK:STDOUT: %T.patt.loc225_29.2 => constants.%T.patt.a22 -// CHECK:STDOUT: %T.loc225_29.1 => constants.%T.792 -// CHECK:STDOUT: %T.as_type.loc225_62.1 => constants.%T.as_type.50c -// CHECK:STDOUT: %pattern_type.loc225_60 => constants.%pattern_type.643306.2 -// CHECK:STDOUT: %x.patt.loc225_60.2 => constants.%x.patt.227 -// CHECK:STDOUT: %x.param_patt.loc225_55.2 => constants.%x.param_patt.343 -// CHECK:STDOUT: %pattern_type.loc225_66 => constants.%pattern_type.51d1c4.4 -// CHECK:STDOUT: %y.param_patt.loc225_66.2 => constants.%y.param_patt.be3 -// CHECK:STDOUT: %y.patt.loc225_66.2 => constants.%y.patt.b85 +// CHECK:STDOUT: %AddAssignWith.type.loc225_50.1 => constants.%AddAssignWith.type.2c8890.2 +// CHECK:STDOUT: %pattern_type.loc225_28 => constants.%pattern_type.82d +// CHECK:STDOUT: %T.patt.loc225_28.2 => constants.%T.patt.a22 +// CHECK:STDOUT: %T.loc225_28.1 => constants.%T.792 +// CHECK:STDOUT: %T.as_type.loc225_60.1 => constants.%T.as_type.50c +// CHECK:STDOUT: %pattern_type.loc225_58 => constants.%pattern_type.643306.2 +// CHECK:STDOUT: %x.patt.loc225_58.2 => constants.%x.patt.227 +// CHECK:STDOUT: %x.param_patt.loc225_53.2 => constants.%x.param_patt.343 +// CHECK:STDOUT: %pattern_type.loc225_64 => constants.%pattern_type.51d1c4.4 +// CHECK:STDOUT: %y.param_patt.loc225_64.2 => constants.%y.param_patt.be3 +// CHECK:STDOUT: %y.patt.loc225_64.2 => constants.%y.patt.b85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @SubAssignWith.loc231(constants.%U.67d, constants.%T.f6c) { // CHECK:STDOUT: %U.patt.loc231_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc231_19.1 => constants.%U.67d -// CHECK:STDOUT: %SubAssignWith.type.loc231_52.1 => constants.%SubAssignWith.type.7e53cf.2 -// CHECK:STDOUT: %pattern_type.loc231_29 => constants.%pattern_type.260 -// CHECK:STDOUT: %T.patt.loc231_29.2 => constants.%T.patt.f45 -// CHECK:STDOUT: %T.loc231_29.1 => constants.%T.f6c -// CHECK:STDOUT: %T.as_type.loc231_62.1 => constants.%T.as_type.3ff -// CHECK:STDOUT: %pattern_type.loc231_60 => constants.%pattern_type.f08ed5.2 -// CHECK:STDOUT: %x.patt.loc231_60.2 => constants.%x.patt.95a -// CHECK:STDOUT: %x.param_patt.loc231_55.2 => constants.%x.param_patt.a45 -// CHECK:STDOUT: %pattern_type.loc231_66 => constants.%pattern_type.51d1c4.4 -// CHECK:STDOUT: %y.param_patt.loc231_66.2 => constants.%y.param_patt.be3 -// CHECK:STDOUT: %y.patt.loc231_66.2 => constants.%y.patt.b85 +// CHECK:STDOUT: %SubAssignWith.type.loc231_50.1 => constants.%SubAssignWith.type.7e53cf.2 +// CHECK:STDOUT: %pattern_type.loc231_28 => constants.%pattern_type.260 +// CHECK:STDOUT: %T.patt.loc231_28.2 => constants.%T.patt.f45 +// CHECK:STDOUT: %T.loc231_28.1 => constants.%T.f6c +// CHECK:STDOUT: %T.as_type.loc231_60.1 => constants.%T.as_type.3ff +// CHECK:STDOUT: %pattern_type.loc231_58 => constants.%pattern_type.f08ed5.2 +// CHECK:STDOUT: %x.patt.loc231_58.2 => constants.%x.patt.95a +// CHECK:STDOUT: %x.param_patt.loc231_53.2 => constants.%x.param_patt.a45 +// CHECK:STDOUT: %pattern_type.loc231_64 => constants.%pattern_type.51d1c4.4 +// CHECK:STDOUT: %y.param_patt.loc231_64.2 => constants.%y.param_patt.be3 +// CHECK:STDOUT: %y.patt.loc231_64.2 => constants.%y.patt.b85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @MulAssignWith.loc237(constants.%U.67d, constants.%T.64d) { // CHECK:STDOUT: %U.patt.loc237_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc237_19.1 => constants.%U.67d -// CHECK:STDOUT: %MulAssignWith.type.loc237_52.1 => constants.%MulAssignWith.type.3a0e4d.2 -// CHECK:STDOUT: %pattern_type.loc237_29 => constants.%pattern_type.8c2 -// CHECK:STDOUT: %T.patt.loc237_29.2 => constants.%T.patt.db5 -// CHECK:STDOUT: %T.loc237_29.1 => constants.%T.64d -// CHECK:STDOUT: %T.as_type.loc237_62.1 => constants.%T.as_type.1de -// CHECK:STDOUT: %pattern_type.loc237_60 => constants.%pattern_type.8bf366.2 -// CHECK:STDOUT: %x.patt.loc237_60.2 => constants.%x.patt.4e9 -// CHECK:STDOUT: %x.param_patt.loc237_55.2 => constants.%x.param_patt.6c8 -// CHECK:STDOUT: %pattern_type.loc237_66 => constants.%pattern_type.51d1c4.4 -// CHECK:STDOUT: %y.param_patt.loc237_66.2 => constants.%y.param_patt.be3 -// CHECK:STDOUT: %y.patt.loc237_66.2 => constants.%y.patt.b85 +// CHECK:STDOUT: %MulAssignWith.type.loc237_50.1 => constants.%MulAssignWith.type.3a0e4d.2 +// CHECK:STDOUT: %pattern_type.loc237_28 => constants.%pattern_type.8c2 +// CHECK:STDOUT: %T.patt.loc237_28.2 => constants.%T.patt.db5 +// CHECK:STDOUT: %T.loc237_28.1 => constants.%T.64d +// CHECK:STDOUT: %T.as_type.loc237_60.1 => constants.%T.as_type.1de +// CHECK:STDOUT: %pattern_type.loc237_58 => constants.%pattern_type.8bf366.2 +// CHECK:STDOUT: %x.patt.loc237_58.2 => constants.%x.patt.4e9 +// CHECK:STDOUT: %x.param_patt.loc237_53.2 => constants.%x.param_patt.6c8 +// CHECK:STDOUT: %pattern_type.loc237_64 => constants.%pattern_type.51d1c4.4 +// CHECK:STDOUT: %y.param_patt.loc237_64.2 => constants.%y.param_patt.be3 +// CHECK:STDOUT: %y.patt.loc237_64.2 => constants.%y.patt.b85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @DivAssignWith.loc243(constants.%U.67d, constants.%T.c33) { // CHECK:STDOUT: %U.patt.loc243_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc243_19.1 => constants.%U.67d -// CHECK:STDOUT: %DivAssignWith.type.loc243_52.1 => constants.%DivAssignWith.type.7e58ca.2 -// CHECK:STDOUT: %pattern_type.loc243_29 => constants.%pattern_type.f74 -// CHECK:STDOUT: %T.patt.loc243_29.2 => constants.%T.patt.9a5 -// CHECK:STDOUT: %T.loc243_29.1 => constants.%T.c33 -// CHECK:STDOUT: %T.as_type.loc243_62.1 => constants.%T.as_type.e57 -// CHECK:STDOUT: %pattern_type.loc243_60 => constants.%pattern_type.da303b.2 -// CHECK:STDOUT: %x.patt.loc243_60.2 => constants.%x.patt.cf6 -// CHECK:STDOUT: %x.param_patt.loc243_55.2 => constants.%x.param_patt.660 -// CHECK:STDOUT: %pattern_type.loc243_66 => constants.%pattern_type.51d1c4.4 -// CHECK:STDOUT: %y.param_patt.loc243_66.2 => constants.%y.param_patt.be3 -// CHECK:STDOUT: %y.patt.loc243_66.2 => constants.%y.patt.b85 +// CHECK:STDOUT: %DivAssignWith.type.loc243_50.1 => constants.%DivAssignWith.type.7e58ca.2 +// CHECK:STDOUT: %pattern_type.loc243_28 => constants.%pattern_type.f74 +// CHECK:STDOUT: %T.patt.loc243_28.2 => constants.%T.patt.9a5 +// CHECK:STDOUT: %T.loc243_28.1 => constants.%T.c33 +// CHECK:STDOUT: %T.as_type.loc243_60.1 => constants.%T.as_type.e57 +// CHECK:STDOUT: %pattern_type.loc243_58 => constants.%pattern_type.da303b.2 +// CHECK:STDOUT: %x.patt.loc243_58.2 => constants.%x.patt.cf6 +// CHECK:STDOUT: %x.param_patt.loc243_53.2 => constants.%x.param_patt.660 +// CHECK:STDOUT: %pattern_type.loc243_64 => constants.%pattern_type.51d1c4.4 +// CHECK:STDOUT: %y.param_patt.loc243_64.2 => constants.%y.param_patt.be3 +// CHECK:STDOUT: %y.patt.loc243_64.2 => constants.%y.patt.b85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ModAssignWith.loc249(constants.%U.67d, constants.%T.bca) { // CHECK:STDOUT: %U.patt.loc249_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc249_19.1 => constants.%U.67d -// CHECK:STDOUT: %ModAssignWith.type.loc249_52.1 => constants.%ModAssignWith.type.778d68.2 -// CHECK:STDOUT: %pattern_type.loc249_29 => constants.%pattern_type.fb8 -// CHECK:STDOUT: %T.patt.loc249_29.2 => constants.%T.patt.c29 -// CHECK:STDOUT: %T.loc249_29.1 => constants.%T.bca -// CHECK:STDOUT: %T.as_type.loc249_62.1 => constants.%T.as_type.ce6 -// CHECK:STDOUT: %pattern_type.loc249_60 => constants.%pattern_type.1d5f30.2 -// CHECK:STDOUT: %x.patt.loc249_60.2 => constants.%x.patt.fa4 -// CHECK:STDOUT: %x.param_patt.loc249_55.2 => constants.%x.param_patt.749 -// CHECK:STDOUT: %pattern_type.loc249_66 => constants.%pattern_type.51d1c4.4 -// CHECK:STDOUT: %y.param_patt.loc249_66.2 => constants.%y.param_patt.be3 -// CHECK:STDOUT: %y.patt.loc249_66.2 => constants.%y.patt.b85 +// CHECK:STDOUT: %ModAssignWith.type.loc249_50.1 => constants.%ModAssignWith.type.778d68.2 +// CHECK:STDOUT: %pattern_type.loc249_28 => constants.%pattern_type.fb8 +// CHECK:STDOUT: %T.patt.loc249_28.2 => constants.%T.patt.c29 +// CHECK:STDOUT: %T.loc249_28.1 => constants.%T.bca +// CHECK:STDOUT: %T.as_type.loc249_60.1 => constants.%T.as_type.ce6 +// CHECK:STDOUT: %pattern_type.loc249_58 => constants.%pattern_type.1d5f30.2 +// CHECK:STDOUT: %x.patt.loc249_58.2 => constants.%x.patt.fa4 +// CHECK:STDOUT: %x.param_patt.loc249_53.2 => constants.%x.param_patt.749 +// CHECK:STDOUT: %pattern_type.loc249_64 => constants.%pattern_type.51d1c4.4 +// CHECK:STDOUT: %y.param_patt.loc249_64.2 => constants.%y.param_patt.be3 +// CHECK:STDOUT: %y.patt.loc249_64.2 => constants.%y.patt.b85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddAssignWith.loc225(constants.%i16, constants.%AddAssignWith.facet.e34) { // CHECK:STDOUT: %U.patt.loc225_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc225_19.1 => constants.%i16 -// CHECK:STDOUT: %AddAssignWith.type.loc225_52.1 => constants.%AddAssignWith.type.2a0 -// CHECK:STDOUT: %pattern_type.loc225_29 => constants.%pattern_type.b256 -// CHECK:STDOUT: %T.patt.loc225_29.2 => constants.%T.patt.d2a -// CHECK:STDOUT: %T.loc225_29.1 => constants.%AddAssignWith.facet.e34 -// CHECK:STDOUT: %T.as_type.loc225_62.1 => constants.%Int16 -// CHECK:STDOUT: %pattern_type.loc225_60 => constants.%pattern_type.785 -// CHECK:STDOUT: %x.patt.loc225_60.2 => constants.%x.patt.49e -// CHECK:STDOUT: %x.param_patt.loc225_55.2 => constants.%x.param_patt.69a -// CHECK:STDOUT: %pattern_type.loc225_66 => constants.%pattern_type.203 -// CHECK:STDOUT: %y.param_patt.loc225_66.2 => constants.%y.param_patt.4b4 -// CHECK:STDOUT: %y.patt.loc225_66.2 => constants.%y.patt.dd3 +// CHECK:STDOUT: %AddAssignWith.type.loc225_50.1 => constants.%AddAssignWith.type.2a0 +// CHECK:STDOUT: %pattern_type.loc225_28 => constants.%pattern_type.b256 +// CHECK:STDOUT: %T.patt.loc225_28.2 => constants.%T.patt.d2a +// CHECK:STDOUT: %T.loc225_28.1 => constants.%AddAssignWith.facet.e34 +// CHECK:STDOUT: %T.as_type.loc225_60.1 => constants.%Int16 +// CHECK:STDOUT: %pattern_type.loc225_58 => constants.%pattern_type.785 +// CHECK:STDOUT: %x.patt.loc225_58.2 => constants.%x.patt.49e +// CHECK:STDOUT: %x.param_patt.loc225_53.2 => constants.%x.param_patt.69a +// CHECK:STDOUT: %pattern_type.loc225_64 => constants.%pattern_type.203 +// CHECK:STDOUT: %y.param_patt.loc225_64.2 => constants.%y.param_patt.4b4 +// CHECK:STDOUT: %y.patt.loc225_64.2 => constants.%y.patt.dd3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc225_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc225_66 => constants.%complete_type.2da +// CHECK:STDOUT: %require_complete.loc225_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc225_64 => constants.%complete_type.2da // CHECK:STDOUT: %require_complete.loc227 => constants.%complete_type.a21 // CHECK:STDOUT: %AddAssignWith.assoc_type => constants.%AddAssignWith.assoc_type.1bb // CHECK:STDOUT: %assoc0 => constants.%assoc0.24b @@ -4197,21 +4197,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @SubAssignWith.loc231(constants.%i16, constants.%SubAssignWith.facet.a52) { // CHECK:STDOUT: %U.patt.loc231_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc231_19.1 => constants.%i16 -// CHECK:STDOUT: %SubAssignWith.type.loc231_52.1 => constants.%SubAssignWith.type.e8b -// CHECK:STDOUT: %pattern_type.loc231_29 => constants.%pattern_type.c22 -// CHECK:STDOUT: %T.patt.loc231_29.2 => constants.%T.patt.0f1 -// CHECK:STDOUT: %T.loc231_29.1 => constants.%SubAssignWith.facet.a52 -// CHECK:STDOUT: %T.as_type.loc231_62.1 => constants.%Int16 -// CHECK:STDOUT: %pattern_type.loc231_60 => constants.%pattern_type.785 -// CHECK:STDOUT: %x.patt.loc231_60.2 => constants.%x.patt.49e -// CHECK:STDOUT: %x.param_patt.loc231_55.2 => constants.%x.param_patt.69a -// CHECK:STDOUT: %pattern_type.loc231_66 => constants.%pattern_type.203 -// CHECK:STDOUT: %y.param_patt.loc231_66.2 => constants.%y.param_patt.4b4 -// CHECK:STDOUT: %y.patt.loc231_66.2 => constants.%y.patt.dd3 +// CHECK:STDOUT: %SubAssignWith.type.loc231_50.1 => constants.%SubAssignWith.type.e8b +// CHECK:STDOUT: %pattern_type.loc231_28 => constants.%pattern_type.c22 +// CHECK:STDOUT: %T.patt.loc231_28.2 => constants.%T.patt.0f1 +// CHECK:STDOUT: %T.loc231_28.1 => constants.%SubAssignWith.facet.a52 +// CHECK:STDOUT: %T.as_type.loc231_60.1 => constants.%Int16 +// CHECK:STDOUT: %pattern_type.loc231_58 => constants.%pattern_type.785 +// CHECK:STDOUT: %x.patt.loc231_58.2 => constants.%x.patt.49e +// CHECK:STDOUT: %x.param_patt.loc231_53.2 => constants.%x.param_patt.69a +// CHECK:STDOUT: %pattern_type.loc231_64 => constants.%pattern_type.203 +// CHECK:STDOUT: %y.param_patt.loc231_64.2 => constants.%y.param_patt.4b4 +// CHECK:STDOUT: %y.patt.loc231_64.2 => constants.%y.patt.dd3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc231_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc231_66 => constants.%complete_type.2da +// CHECK:STDOUT: %require_complete.loc231_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc231_64 => constants.%complete_type.2da // CHECK:STDOUT: %require_complete.loc233 => constants.%complete_type.002 // CHECK:STDOUT: %SubAssignWith.assoc_type => constants.%SubAssignWith.assoc_type.e13 // CHECK:STDOUT: %assoc0 => constants.%assoc0.47c @@ -4225,21 +4225,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @MulAssignWith.loc237(constants.%i16, constants.%MulAssignWith.facet.201) { // CHECK:STDOUT: %U.patt.loc237_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc237_19.1 => constants.%i16 -// CHECK:STDOUT: %MulAssignWith.type.loc237_52.1 => constants.%MulAssignWith.type.7d4 -// CHECK:STDOUT: %pattern_type.loc237_29 => constants.%pattern_type.a24 -// CHECK:STDOUT: %T.patt.loc237_29.2 => constants.%T.patt.f71 -// CHECK:STDOUT: %T.loc237_29.1 => constants.%MulAssignWith.facet.201 -// CHECK:STDOUT: %T.as_type.loc237_62.1 => constants.%Int16 -// CHECK:STDOUT: %pattern_type.loc237_60 => constants.%pattern_type.785 -// CHECK:STDOUT: %x.patt.loc237_60.2 => constants.%x.patt.49e -// CHECK:STDOUT: %x.param_patt.loc237_55.2 => constants.%x.param_patt.69a -// CHECK:STDOUT: %pattern_type.loc237_66 => constants.%pattern_type.203 -// CHECK:STDOUT: %y.param_patt.loc237_66.2 => constants.%y.param_patt.4b4 -// CHECK:STDOUT: %y.patt.loc237_66.2 => constants.%y.patt.dd3 +// CHECK:STDOUT: %MulAssignWith.type.loc237_50.1 => constants.%MulAssignWith.type.7d4 +// CHECK:STDOUT: %pattern_type.loc237_28 => constants.%pattern_type.a24 +// CHECK:STDOUT: %T.patt.loc237_28.2 => constants.%T.patt.f71 +// CHECK:STDOUT: %T.loc237_28.1 => constants.%MulAssignWith.facet.201 +// CHECK:STDOUT: %T.as_type.loc237_60.1 => constants.%Int16 +// CHECK:STDOUT: %pattern_type.loc237_58 => constants.%pattern_type.785 +// CHECK:STDOUT: %x.patt.loc237_58.2 => constants.%x.patt.49e +// CHECK:STDOUT: %x.param_patt.loc237_53.2 => constants.%x.param_patt.69a +// CHECK:STDOUT: %pattern_type.loc237_64 => constants.%pattern_type.203 +// CHECK:STDOUT: %y.param_patt.loc237_64.2 => constants.%y.param_patt.4b4 +// CHECK:STDOUT: %y.patt.loc237_64.2 => constants.%y.patt.dd3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc237_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc237_66 => constants.%complete_type.2da +// CHECK:STDOUT: %require_complete.loc237_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc237_64 => constants.%complete_type.2da // CHECK:STDOUT: %require_complete.loc239 => constants.%complete_type.60a // CHECK:STDOUT: %MulAssignWith.assoc_type => constants.%MulAssignWith.assoc_type.aa8 // CHECK:STDOUT: %assoc0 => constants.%assoc0.137 @@ -4253,21 +4253,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @DivAssignWith.loc243(constants.%i16, constants.%DivAssignWith.facet.a72) { // CHECK:STDOUT: %U.patt.loc243_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc243_19.1 => constants.%i16 -// CHECK:STDOUT: %DivAssignWith.type.loc243_52.1 => constants.%DivAssignWith.type.081 -// CHECK:STDOUT: %pattern_type.loc243_29 => constants.%pattern_type.c970 -// CHECK:STDOUT: %T.patt.loc243_29.2 => constants.%T.patt.35e -// CHECK:STDOUT: %T.loc243_29.1 => constants.%DivAssignWith.facet.a72 -// CHECK:STDOUT: %T.as_type.loc243_62.1 => constants.%Int16 -// CHECK:STDOUT: %pattern_type.loc243_60 => constants.%pattern_type.785 -// CHECK:STDOUT: %x.patt.loc243_60.2 => constants.%x.patt.49e -// CHECK:STDOUT: %x.param_patt.loc243_55.2 => constants.%x.param_patt.69a -// CHECK:STDOUT: %pattern_type.loc243_66 => constants.%pattern_type.203 -// CHECK:STDOUT: %y.param_patt.loc243_66.2 => constants.%y.param_patt.4b4 -// CHECK:STDOUT: %y.patt.loc243_66.2 => constants.%y.patt.dd3 +// CHECK:STDOUT: %DivAssignWith.type.loc243_50.1 => constants.%DivAssignWith.type.081 +// CHECK:STDOUT: %pattern_type.loc243_28 => constants.%pattern_type.c970 +// CHECK:STDOUT: %T.patt.loc243_28.2 => constants.%T.patt.35e +// CHECK:STDOUT: %T.loc243_28.1 => constants.%DivAssignWith.facet.a72 +// CHECK:STDOUT: %T.as_type.loc243_60.1 => constants.%Int16 +// CHECK:STDOUT: %pattern_type.loc243_58 => constants.%pattern_type.785 +// CHECK:STDOUT: %x.patt.loc243_58.2 => constants.%x.patt.49e +// CHECK:STDOUT: %x.param_patt.loc243_53.2 => constants.%x.param_patt.69a +// CHECK:STDOUT: %pattern_type.loc243_64 => constants.%pattern_type.203 +// CHECK:STDOUT: %y.param_patt.loc243_64.2 => constants.%y.param_patt.4b4 +// CHECK:STDOUT: %y.patt.loc243_64.2 => constants.%y.patt.dd3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc243_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc243_66 => constants.%complete_type.2da +// CHECK:STDOUT: %require_complete.loc243_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc243_64 => constants.%complete_type.2da // CHECK:STDOUT: %require_complete.loc245 => constants.%complete_type.531 // CHECK:STDOUT: %DivAssignWith.assoc_type => constants.%DivAssignWith.assoc_type.791 // CHECK:STDOUT: %assoc0 => constants.%assoc0.a3b @@ -4281,21 +4281,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @ModAssignWith.loc249(constants.%i16, constants.%ModAssignWith.facet.4a2) { // CHECK:STDOUT: %U.patt.loc249_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc249_19.1 => constants.%i16 -// CHECK:STDOUT: %ModAssignWith.type.loc249_52.1 => constants.%ModAssignWith.type.1ea -// CHECK:STDOUT: %pattern_type.loc249_29 => constants.%pattern_type.6ef -// CHECK:STDOUT: %T.patt.loc249_29.2 => constants.%T.patt.dbe -// CHECK:STDOUT: %T.loc249_29.1 => constants.%ModAssignWith.facet.4a2 -// CHECK:STDOUT: %T.as_type.loc249_62.1 => constants.%Int16 -// CHECK:STDOUT: %pattern_type.loc249_60 => constants.%pattern_type.785 -// CHECK:STDOUT: %x.patt.loc249_60.2 => constants.%x.patt.49e -// CHECK:STDOUT: %x.param_patt.loc249_55.2 => constants.%x.param_patt.69a -// CHECK:STDOUT: %pattern_type.loc249_66 => constants.%pattern_type.203 -// CHECK:STDOUT: %y.param_patt.loc249_66.2 => constants.%y.param_patt.4b4 -// CHECK:STDOUT: %y.patt.loc249_66.2 => constants.%y.patt.dd3 +// CHECK:STDOUT: %ModAssignWith.type.loc249_50.1 => constants.%ModAssignWith.type.1ea +// CHECK:STDOUT: %pattern_type.loc249_28 => constants.%pattern_type.6ef +// CHECK:STDOUT: %T.patt.loc249_28.2 => constants.%T.patt.dbe +// CHECK:STDOUT: %T.loc249_28.1 => constants.%ModAssignWith.facet.4a2 +// CHECK:STDOUT: %T.as_type.loc249_60.1 => constants.%Int16 +// CHECK:STDOUT: %pattern_type.loc249_58 => constants.%pattern_type.785 +// CHECK:STDOUT: %x.patt.loc249_58.2 => constants.%x.patt.49e +// CHECK:STDOUT: %x.param_patt.loc249_53.2 => constants.%x.param_patt.69a +// CHECK:STDOUT: %pattern_type.loc249_64 => constants.%pattern_type.203 +// CHECK:STDOUT: %y.param_patt.loc249_64.2 => constants.%y.param_patt.4b4 +// CHECK:STDOUT: %y.patt.loc249_64.2 => constants.%y.patt.dd3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc249_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc249_66 => constants.%complete_type.2da +// CHECK:STDOUT: %require_complete.loc249_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc249_64 => constants.%complete_type.2da // CHECK:STDOUT: %require_complete.loc251 => constants.%complete_type.450 // CHECK:STDOUT: %ModAssignWith.assoc_type => constants.%ModAssignWith.assoc_type.91d // CHECK:STDOUT: %assoc0 => constants.%assoc0.b7f @@ -4309,21 +4309,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @AddAssignWith.loc225(constants.%Int32, constants.%AddAssignWith.facet.348) { // CHECK:STDOUT: %U.patt.loc225_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc225_19.1 => constants.%Int32 -// CHECK:STDOUT: %AddAssignWith.type.loc225_52.1 => constants.%AddAssignWith.type.23a -// CHECK:STDOUT: %pattern_type.loc225_29 => constants.%pattern_type.5ad -// CHECK:STDOUT: %T.patt.loc225_29.2 => constants.%T.patt.96c -// CHECK:STDOUT: %T.loc225_29.1 => constants.%AddAssignWith.facet.348 -// CHECK:STDOUT: %T.as_type.loc225_62.1 => constants.%Int32 -// CHECK:STDOUT: %pattern_type.loc225_60 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %x.patt.loc225_60.2 => constants.%x.patt.d79 -// CHECK:STDOUT: %x.param_patt.loc225_55.2 => constants.%x.param_patt.0c7 -// CHECK:STDOUT: %pattern_type.loc225_66 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %y.param_patt.loc225_66.2 => constants.%y.param_patt.e0c -// CHECK:STDOUT: %y.patt.loc225_66.2 => constants.%y.patt.0a3 +// CHECK:STDOUT: %AddAssignWith.type.loc225_50.1 => constants.%AddAssignWith.type.23a +// CHECK:STDOUT: %pattern_type.loc225_28 => constants.%pattern_type.5ad +// CHECK:STDOUT: %T.patt.loc225_28.2 => constants.%T.patt.96c +// CHECK:STDOUT: %T.loc225_28.1 => constants.%AddAssignWith.facet.348 +// CHECK:STDOUT: %T.as_type.loc225_60.1 => constants.%Int32 +// CHECK:STDOUT: %pattern_type.loc225_58 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %x.patt.loc225_58.2 => constants.%x.patt.d79 +// CHECK:STDOUT: %x.param_patt.loc225_53.2 => constants.%x.param_patt.0c7 +// CHECK:STDOUT: %pattern_type.loc225_64 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %y.param_patt.loc225_64.2 => constants.%y.param_patt.e0c +// CHECK:STDOUT: %y.patt.loc225_64.2 => constants.%y.patt.0a3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc225_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc225_66 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc225_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc225_64 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc227 => constants.%complete_type.e1b // CHECK:STDOUT: %AddAssignWith.assoc_type => constants.%AddAssignWith.assoc_type.4c7 // CHECK:STDOUT: %assoc0 => constants.%assoc0.114 @@ -4337,21 +4337,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @SubAssignWith.loc231(constants.%Int32, constants.%SubAssignWith.facet.e0e) { // CHECK:STDOUT: %U.patt.loc231_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc231_19.1 => constants.%Int32 -// CHECK:STDOUT: %SubAssignWith.type.loc231_52.1 => constants.%SubAssignWith.type.4fc -// CHECK:STDOUT: %pattern_type.loc231_29 => constants.%pattern_type.190 -// CHECK:STDOUT: %T.patt.loc231_29.2 => constants.%T.patt.a39 -// CHECK:STDOUT: %T.loc231_29.1 => constants.%SubAssignWith.facet.e0e -// CHECK:STDOUT: %T.as_type.loc231_62.1 => constants.%Int32 -// CHECK:STDOUT: %pattern_type.loc231_60 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %x.patt.loc231_60.2 => constants.%x.patt.d79 -// CHECK:STDOUT: %x.param_patt.loc231_55.2 => constants.%x.param_patt.0c7 -// CHECK:STDOUT: %pattern_type.loc231_66 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %y.param_patt.loc231_66.2 => constants.%y.param_patt.e0c -// CHECK:STDOUT: %y.patt.loc231_66.2 => constants.%y.patt.0a3 +// CHECK:STDOUT: %SubAssignWith.type.loc231_50.1 => constants.%SubAssignWith.type.4fc +// CHECK:STDOUT: %pattern_type.loc231_28 => constants.%pattern_type.190 +// CHECK:STDOUT: %T.patt.loc231_28.2 => constants.%T.patt.a39 +// CHECK:STDOUT: %T.loc231_28.1 => constants.%SubAssignWith.facet.e0e +// CHECK:STDOUT: %T.as_type.loc231_60.1 => constants.%Int32 +// CHECK:STDOUT: %pattern_type.loc231_58 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %x.patt.loc231_58.2 => constants.%x.patt.d79 +// CHECK:STDOUT: %x.param_patt.loc231_53.2 => constants.%x.param_patt.0c7 +// CHECK:STDOUT: %pattern_type.loc231_64 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %y.param_patt.loc231_64.2 => constants.%y.param_patt.e0c +// CHECK:STDOUT: %y.patt.loc231_64.2 => constants.%y.patt.0a3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc231_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc231_66 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc231_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc231_64 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc233 => constants.%complete_type.1eb // CHECK:STDOUT: %SubAssignWith.assoc_type => constants.%SubAssignWith.assoc_type.ac6 // CHECK:STDOUT: %assoc0 => constants.%assoc0.c2a @@ -4365,21 +4365,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @MulAssignWith.loc237(constants.%Int32, constants.%MulAssignWith.facet.13c) { // CHECK:STDOUT: %U.patt.loc237_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc237_19.1 => constants.%Int32 -// CHECK:STDOUT: %MulAssignWith.type.loc237_52.1 => constants.%MulAssignWith.type.5fb -// CHECK:STDOUT: %pattern_type.loc237_29 => constants.%pattern_type.f3b -// CHECK:STDOUT: %T.patt.loc237_29.2 => constants.%T.patt.f66 -// CHECK:STDOUT: %T.loc237_29.1 => constants.%MulAssignWith.facet.13c -// CHECK:STDOUT: %T.as_type.loc237_62.1 => constants.%Int32 -// CHECK:STDOUT: %pattern_type.loc237_60 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %x.patt.loc237_60.2 => constants.%x.patt.d79 -// CHECK:STDOUT: %x.param_patt.loc237_55.2 => constants.%x.param_patt.0c7 -// CHECK:STDOUT: %pattern_type.loc237_66 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %y.param_patt.loc237_66.2 => constants.%y.param_patt.e0c -// CHECK:STDOUT: %y.patt.loc237_66.2 => constants.%y.patt.0a3 +// CHECK:STDOUT: %MulAssignWith.type.loc237_50.1 => constants.%MulAssignWith.type.5fb +// CHECK:STDOUT: %pattern_type.loc237_28 => constants.%pattern_type.f3b +// CHECK:STDOUT: %T.patt.loc237_28.2 => constants.%T.patt.f66 +// CHECK:STDOUT: %T.loc237_28.1 => constants.%MulAssignWith.facet.13c +// CHECK:STDOUT: %T.as_type.loc237_60.1 => constants.%Int32 +// CHECK:STDOUT: %pattern_type.loc237_58 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %x.patt.loc237_58.2 => constants.%x.patt.d79 +// CHECK:STDOUT: %x.param_patt.loc237_53.2 => constants.%x.param_patt.0c7 +// CHECK:STDOUT: %pattern_type.loc237_64 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %y.param_patt.loc237_64.2 => constants.%y.param_patt.e0c +// CHECK:STDOUT: %y.patt.loc237_64.2 => constants.%y.patt.0a3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc237_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc237_66 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc237_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc237_64 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc239 => constants.%complete_type.ef7 // CHECK:STDOUT: %MulAssignWith.assoc_type => constants.%MulAssignWith.assoc_type.c04 // CHECK:STDOUT: %assoc0 => constants.%assoc0.2db @@ -4393,21 +4393,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @DivAssignWith.loc243(constants.%Int32, constants.%DivAssignWith.facet.e59) { // CHECK:STDOUT: %U.patt.loc243_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc243_19.1 => constants.%Int32 -// CHECK:STDOUT: %DivAssignWith.type.loc243_52.1 => constants.%DivAssignWith.type.3ea -// CHECK:STDOUT: %pattern_type.loc243_29 => constants.%pattern_type.8f3 -// CHECK:STDOUT: %T.patt.loc243_29.2 => constants.%T.patt.316 -// CHECK:STDOUT: %T.loc243_29.1 => constants.%DivAssignWith.facet.e59 -// CHECK:STDOUT: %T.as_type.loc243_62.1 => constants.%Int32 -// CHECK:STDOUT: %pattern_type.loc243_60 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %x.patt.loc243_60.2 => constants.%x.patt.d79 -// CHECK:STDOUT: %x.param_patt.loc243_55.2 => constants.%x.param_patt.0c7 -// CHECK:STDOUT: %pattern_type.loc243_66 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %y.param_patt.loc243_66.2 => constants.%y.param_patt.e0c -// CHECK:STDOUT: %y.patt.loc243_66.2 => constants.%y.patt.0a3 +// CHECK:STDOUT: %DivAssignWith.type.loc243_50.1 => constants.%DivAssignWith.type.3ea +// CHECK:STDOUT: %pattern_type.loc243_28 => constants.%pattern_type.8f3 +// CHECK:STDOUT: %T.patt.loc243_28.2 => constants.%T.patt.316 +// CHECK:STDOUT: %T.loc243_28.1 => constants.%DivAssignWith.facet.e59 +// CHECK:STDOUT: %T.as_type.loc243_60.1 => constants.%Int32 +// CHECK:STDOUT: %pattern_type.loc243_58 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %x.patt.loc243_58.2 => constants.%x.patt.d79 +// CHECK:STDOUT: %x.param_patt.loc243_53.2 => constants.%x.param_patt.0c7 +// CHECK:STDOUT: %pattern_type.loc243_64 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %y.param_patt.loc243_64.2 => constants.%y.param_patt.e0c +// CHECK:STDOUT: %y.patt.loc243_64.2 => constants.%y.patt.0a3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc243_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc243_66 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc243_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc243_64 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc245 => constants.%complete_type.502 // CHECK:STDOUT: %DivAssignWith.assoc_type => constants.%DivAssignWith.assoc_type.ccd // CHECK:STDOUT: %assoc0 => constants.%assoc0.d23 @@ -4421,21 +4421,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @ModAssignWith.loc249(constants.%Int32, constants.%ModAssignWith.facet.dac) { // CHECK:STDOUT: %U.patt.loc249_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc249_19.1 => constants.%Int32 -// CHECK:STDOUT: %ModAssignWith.type.loc249_52.1 => constants.%ModAssignWith.type.567 -// CHECK:STDOUT: %pattern_type.loc249_29 => constants.%pattern_type.9ff -// CHECK:STDOUT: %T.patt.loc249_29.2 => constants.%T.patt.6f1 -// CHECK:STDOUT: %T.loc249_29.1 => constants.%ModAssignWith.facet.dac -// CHECK:STDOUT: %T.as_type.loc249_62.1 => constants.%Int32 -// CHECK:STDOUT: %pattern_type.loc249_60 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %x.patt.loc249_60.2 => constants.%x.patt.d79 -// CHECK:STDOUT: %x.param_patt.loc249_55.2 => constants.%x.param_patt.0c7 -// CHECK:STDOUT: %pattern_type.loc249_66 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %y.param_patt.loc249_66.2 => constants.%y.param_patt.e0c -// CHECK:STDOUT: %y.patt.loc249_66.2 => constants.%y.patt.0a3 +// CHECK:STDOUT: %ModAssignWith.type.loc249_50.1 => constants.%ModAssignWith.type.567 +// CHECK:STDOUT: %pattern_type.loc249_28 => constants.%pattern_type.9ff +// CHECK:STDOUT: %T.patt.loc249_28.2 => constants.%T.patt.6f1 +// CHECK:STDOUT: %T.loc249_28.1 => constants.%ModAssignWith.facet.dac +// CHECK:STDOUT: %T.as_type.loc249_60.1 => constants.%Int32 +// CHECK:STDOUT: %pattern_type.loc249_58 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %x.patt.loc249_58.2 => constants.%x.patt.d79 +// CHECK:STDOUT: %x.param_patt.loc249_53.2 => constants.%x.param_patt.0c7 +// CHECK:STDOUT: %pattern_type.loc249_64 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %y.param_patt.loc249_64.2 => constants.%y.param_patt.e0c +// CHECK:STDOUT: %y.patt.loc249_64.2 => constants.%y.patt.0a3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc249_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc249_66 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc249_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc249_64 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc251 => constants.%complete_type.446 // CHECK:STDOUT: %ModAssignWith.assoc_type => constants.%ModAssignWith.assoc_type.fc5 // CHECK:STDOUT: %assoc0 => constants.%assoc0.1c63 @@ -4449,21 +4449,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @AddAssignWith.loc225(constants.%Int32, constants.%AddAssignWith.facet.144) { // CHECK:STDOUT: %U.patt.loc225_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc225_19.1 => constants.%Int32 -// CHECK:STDOUT: %AddAssignWith.type.loc225_52.1 => constants.%AddAssignWith.type.23a -// CHECK:STDOUT: %pattern_type.loc225_29 => constants.%pattern_type.5ad -// CHECK:STDOUT: %T.patt.loc225_29.2 => constants.%T.patt.96c -// CHECK:STDOUT: %T.loc225_29.1 => constants.%AddAssignWith.facet.144 -// CHECK:STDOUT: %T.as_type.loc225_62.1 => constants.%Int64 -// CHECK:STDOUT: %pattern_type.loc225_60 => constants.%pattern_type.4aa -// CHECK:STDOUT: %x.patt.loc225_60.2 => constants.%x.patt.ace -// CHECK:STDOUT: %x.param_patt.loc225_55.2 => constants.%x.param_patt.b33 -// CHECK:STDOUT: %pattern_type.loc225_66 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %y.param_patt.loc225_66.2 => constants.%y.param_patt.e0c -// CHECK:STDOUT: %y.patt.loc225_66.2 => constants.%y.patt.0a3 +// CHECK:STDOUT: %AddAssignWith.type.loc225_50.1 => constants.%AddAssignWith.type.23a +// CHECK:STDOUT: %pattern_type.loc225_28 => constants.%pattern_type.5ad +// CHECK:STDOUT: %T.patt.loc225_28.2 => constants.%T.patt.96c +// CHECK:STDOUT: %T.loc225_28.1 => constants.%AddAssignWith.facet.144 +// CHECK:STDOUT: %T.as_type.loc225_60.1 => constants.%Int64 +// CHECK:STDOUT: %pattern_type.loc225_58 => constants.%pattern_type.4aa +// CHECK:STDOUT: %x.patt.loc225_58.2 => constants.%x.patt.ace +// CHECK:STDOUT: %x.param_patt.loc225_53.2 => constants.%x.param_patt.b33 +// CHECK:STDOUT: %pattern_type.loc225_64 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %y.param_patt.loc225_64.2 => constants.%y.param_patt.e0c +// CHECK:STDOUT: %y.patt.loc225_64.2 => constants.%y.patt.0a3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc225_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc225_66 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc225_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc225_64 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc227 => constants.%complete_type.e1b // CHECK:STDOUT: %AddAssignWith.assoc_type => constants.%AddAssignWith.assoc_type.4c7 // CHECK:STDOUT: %assoc0 => constants.%assoc0.114 @@ -4477,21 +4477,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @SubAssignWith.loc231(constants.%Int32, constants.%SubAssignWith.facet.a7e) { // CHECK:STDOUT: %U.patt.loc231_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc231_19.1 => constants.%Int32 -// CHECK:STDOUT: %SubAssignWith.type.loc231_52.1 => constants.%SubAssignWith.type.4fc -// CHECK:STDOUT: %pattern_type.loc231_29 => constants.%pattern_type.190 -// CHECK:STDOUT: %T.patt.loc231_29.2 => constants.%T.patt.a39 -// CHECK:STDOUT: %T.loc231_29.1 => constants.%SubAssignWith.facet.a7e -// CHECK:STDOUT: %T.as_type.loc231_62.1 => constants.%Int64 -// CHECK:STDOUT: %pattern_type.loc231_60 => constants.%pattern_type.4aa -// CHECK:STDOUT: %x.patt.loc231_60.2 => constants.%x.patt.ace -// CHECK:STDOUT: %x.param_patt.loc231_55.2 => constants.%x.param_patt.b33 -// CHECK:STDOUT: %pattern_type.loc231_66 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %y.param_patt.loc231_66.2 => constants.%y.param_patt.e0c -// CHECK:STDOUT: %y.patt.loc231_66.2 => constants.%y.patt.0a3 +// CHECK:STDOUT: %SubAssignWith.type.loc231_50.1 => constants.%SubAssignWith.type.4fc +// CHECK:STDOUT: %pattern_type.loc231_28 => constants.%pattern_type.190 +// CHECK:STDOUT: %T.patt.loc231_28.2 => constants.%T.patt.a39 +// CHECK:STDOUT: %T.loc231_28.1 => constants.%SubAssignWith.facet.a7e +// CHECK:STDOUT: %T.as_type.loc231_60.1 => constants.%Int64 +// CHECK:STDOUT: %pattern_type.loc231_58 => constants.%pattern_type.4aa +// CHECK:STDOUT: %x.patt.loc231_58.2 => constants.%x.patt.ace +// CHECK:STDOUT: %x.param_patt.loc231_53.2 => constants.%x.param_patt.b33 +// CHECK:STDOUT: %pattern_type.loc231_64 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %y.param_patt.loc231_64.2 => constants.%y.param_patt.e0c +// CHECK:STDOUT: %y.patt.loc231_64.2 => constants.%y.patt.0a3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc231_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc231_66 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc231_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc231_64 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc233 => constants.%complete_type.1eb // CHECK:STDOUT: %SubAssignWith.assoc_type => constants.%SubAssignWith.assoc_type.ac6 // CHECK:STDOUT: %assoc0 => constants.%assoc0.c2a @@ -4505,21 +4505,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @MulAssignWith.loc237(constants.%Int32, constants.%MulAssignWith.facet.b35) { // CHECK:STDOUT: %U.patt.loc237_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc237_19.1 => constants.%Int32 -// CHECK:STDOUT: %MulAssignWith.type.loc237_52.1 => constants.%MulAssignWith.type.5fb -// CHECK:STDOUT: %pattern_type.loc237_29 => constants.%pattern_type.f3b -// CHECK:STDOUT: %T.patt.loc237_29.2 => constants.%T.patt.f66 -// CHECK:STDOUT: %T.loc237_29.1 => constants.%MulAssignWith.facet.b35 -// CHECK:STDOUT: %T.as_type.loc237_62.1 => constants.%Int64 -// CHECK:STDOUT: %pattern_type.loc237_60 => constants.%pattern_type.4aa -// CHECK:STDOUT: %x.patt.loc237_60.2 => constants.%x.patt.ace -// CHECK:STDOUT: %x.param_patt.loc237_55.2 => constants.%x.param_patt.b33 -// CHECK:STDOUT: %pattern_type.loc237_66 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %y.param_patt.loc237_66.2 => constants.%y.param_patt.e0c -// CHECK:STDOUT: %y.patt.loc237_66.2 => constants.%y.patt.0a3 +// CHECK:STDOUT: %MulAssignWith.type.loc237_50.1 => constants.%MulAssignWith.type.5fb +// CHECK:STDOUT: %pattern_type.loc237_28 => constants.%pattern_type.f3b +// CHECK:STDOUT: %T.patt.loc237_28.2 => constants.%T.patt.f66 +// CHECK:STDOUT: %T.loc237_28.1 => constants.%MulAssignWith.facet.b35 +// CHECK:STDOUT: %T.as_type.loc237_60.1 => constants.%Int64 +// CHECK:STDOUT: %pattern_type.loc237_58 => constants.%pattern_type.4aa +// CHECK:STDOUT: %x.patt.loc237_58.2 => constants.%x.patt.ace +// CHECK:STDOUT: %x.param_patt.loc237_53.2 => constants.%x.param_patt.b33 +// CHECK:STDOUT: %pattern_type.loc237_64 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %y.param_patt.loc237_64.2 => constants.%y.param_patt.e0c +// CHECK:STDOUT: %y.patt.loc237_64.2 => constants.%y.patt.0a3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc237_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc237_66 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc237_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc237_64 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc239 => constants.%complete_type.ef7 // CHECK:STDOUT: %MulAssignWith.assoc_type => constants.%MulAssignWith.assoc_type.c04 // CHECK:STDOUT: %assoc0 => constants.%assoc0.2db @@ -4533,21 +4533,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @DivAssignWith.loc243(constants.%Int32, constants.%DivAssignWith.facet.b1e) { // CHECK:STDOUT: %U.patt.loc243_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc243_19.1 => constants.%Int32 -// CHECK:STDOUT: %DivAssignWith.type.loc243_52.1 => constants.%DivAssignWith.type.3ea -// CHECK:STDOUT: %pattern_type.loc243_29 => constants.%pattern_type.8f3 -// CHECK:STDOUT: %T.patt.loc243_29.2 => constants.%T.patt.316 -// CHECK:STDOUT: %T.loc243_29.1 => constants.%DivAssignWith.facet.b1e -// CHECK:STDOUT: %T.as_type.loc243_62.1 => constants.%Int64 -// CHECK:STDOUT: %pattern_type.loc243_60 => constants.%pattern_type.4aa -// CHECK:STDOUT: %x.patt.loc243_60.2 => constants.%x.patt.ace -// CHECK:STDOUT: %x.param_patt.loc243_55.2 => constants.%x.param_patt.b33 -// CHECK:STDOUT: %pattern_type.loc243_66 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %y.param_patt.loc243_66.2 => constants.%y.param_patt.e0c -// CHECK:STDOUT: %y.patt.loc243_66.2 => constants.%y.patt.0a3 +// CHECK:STDOUT: %DivAssignWith.type.loc243_50.1 => constants.%DivAssignWith.type.3ea +// CHECK:STDOUT: %pattern_type.loc243_28 => constants.%pattern_type.8f3 +// CHECK:STDOUT: %T.patt.loc243_28.2 => constants.%T.patt.316 +// CHECK:STDOUT: %T.loc243_28.1 => constants.%DivAssignWith.facet.b1e +// CHECK:STDOUT: %T.as_type.loc243_60.1 => constants.%Int64 +// CHECK:STDOUT: %pattern_type.loc243_58 => constants.%pattern_type.4aa +// CHECK:STDOUT: %x.patt.loc243_58.2 => constants.%x.patt.ace +// CHECK:STDOUT: %x.param_patt.loc243_53.2 => constants.%x.param_patt.b33 +// CHECK:STDOUT: %pattern_type.loc243_64 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %y.param_patt.loc243_64.2 => constants.%y.param_patt.e0c +// CHECK:STDOUT: %y.patt.loc243_64.2 => constants.%y.patt.0a3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc243_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc243_66 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc243_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc243_64 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc245 => constants.%complete_type.502 // CHECK:STDOUT: %DivAssignWith.assoc_type => constants.%DivAssignWith.assoc_type.ccd // CHECK:STDOUT: %assoc0 => constants.%assoc0.d23 @@ -4561,21 +4561,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @ModAssignWith.loc249(constants.%Int32, constants.%ModAssignWith.facet.342) { // CHECK:STDOUT: %U.patt.loc249_19.2 => constants.%U.patt.d47 // CHECK:STDOUT: %U.loc249_19.1 => constants.%Int32 -// CHECK:STDOUT: %ModAssignWith.type.loc249_52.1 => constants.%ModAssignWith.type.567 -// CHECK:STDOUT: %pattern_type.loc249_29 => constants.%pattern_type.9ff -// CHECK:STDOUT: %T.patt.loc249_29.2 => constants.%T.patt.6f1 -// CHECK:STDOUT: %T.loc249_29.1 => constants.%ModAssignWith.facet.342 -// CHECK:STDOUT: %T.as_type.loc249_62.1 => constants.%Int64 -// CHECK:STDOUT: %pattern_type.loc249_60 => constants.%pattern_type.4aa -// CHECK:STDOUT: %x.patt.loc249_60.2 => constants.%x.patt.ace -// CHECK:STDOUT: %x.param_patt.loc249_55.2 => constants.%x.param_patt.b33 -// CHECK:STDOUT: %pattern_type.loc249_66 => constants.%pattern_type.8b4 -// CHECK:STDOUT: %y.param_patt.loc249_66.2 => constants.%y.param_patt.e0c -// CHECK:STDOUT: %y.patt.loc249_66.2 => constants.%y.patt.0a3 +// CHECK:STDOUT: %ModAssignWith.type.loc249_50.1 => constants.%ModAssignWith.type.567 +// CHECK:STDOUT: %pattern_type.loc249_28 => constants.%pattern_type.9ff +// CHECK:STDOUT: %T.patt.loc249_28.2 => constants.%T.patt.6f1 +// CHECK:STDOUT: %T.loc249_28.1 => constants.%ModAssignWith.facet.342 +// CHECK:STDOUT: %T.as_type.loc249_60.1 => constants.%Int64 +// CHECK:STDOUT: %pattern_type.loc249_58 => constants.%pattern_type.4aa +// CHECK:STDOUT: %x.patt.loc249_58.2 => constants.%x.patt.ace +// CHECK:STDOUT: %x.param_patt.loc249_53.2 => constants.%x.param_patt.b33 +// CHECK:STDOUT: %pattern_type.loc249_64 => constants.%pattern_type.8b4 +// CHECK:STDOUT: %y.param_patt.loc249_64.2 => constants.%y.param_patt.e0c +// CHECK:STDOUT: %y.patt.loc249_64.2 => constants.%y.patt.0a3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc249_55 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc249_66 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc249_53 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc249_64 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc251 => constants.%complete_type.446 // CHECK:STDOUT: %ModAssignWith.assoc_type => constants.%ModAssignWith.assoc_type.fc5 // CHECK:STDOUT: %assoc0 => constants.%assoc0.1c63 @@ -4589,25 +4589,25 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @TestInc(constants.%T.8f3) { // CHECK:STDOUT: %T.patt.loc278_13.2 => constants.%T.patt.eab // CHECK:STDOUT: %T.loc278_13.1 => constants.%T.8f3 -// CHECK:STDOUT: %T.as_type.loc278_33.1 => constants.%T.as_type.232 +// CHECK:STDOUT: %T.as_type.loc278_32.1 => constants.%T.as_type.232 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.427bfc.2 -// CHECK:STDOUT: %x.patt.loc278_31.2 => constants.%x.patt.a75 -// CHECK:STDOUT: %x.param_patt.loc278_26.2 => constants.%x.param_patt.5da +// CHECK:STDOUT: %x.patt.loc278_30.2 => constants.%x.patt.a75 +// CHECK:STDOUT: %x.param_patt.loc278_25.2 => constants.%x.param_patt.5da // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TestDec(constants.%T.e8e) { // CHECK:STDOUT: %T.patt.loc284_13.2 => constants.%T.patt.de9 // CHECK:STDOUT: %T.loc284_13.1 => constants.%T.e8e -// CHECK:STDOUT: %T.as_type.loc284_33.1 => constants.%T.as_type.c32 +// CHECK:STDOUT: %T.as_type.loc284_32.1 => constants.%T.as_type.c32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2754f0.2 -// CHECK:STDOUT: %x.patt.loc284_31.2 => constants.%x.patt.08b -// CHECK:STDOUT: %x.param_patt.loc284_26.2 => constants.%x.param_patt.678 +// CHECK:STDOUT: %x.patt.loc284_30.2 => constants.%x.patt.08b +// CHECK:STDOUT: %x.param_patt.loc284_25.2 => constants.%x.param_patt.678 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TestNegate(constants.%Result, constants.%T.e01) { // CHECK:STDOUT: %Result.patt.loc292_9.2 => constants.%Result.patt // CHECK:STDOUT: %Result.loc292_9.1 => constants.%Result -// CHECK:STDOUT: %Result.as_type.loc293_50.1 => constants.%Result.as_type +// CHECK:STDOUT: %Result.as_type.loc293_49.1 => constants.%Result.as_type // CHECK:STDOUT: %facet_type => constants.%facet_type.352 // CHECK:STDOUT: %pattern_type.loc293 => constants.%pattern_type.4c2 // CHECK:STDOUT: %T.patt.loc293_4.2 => constants.%T.patt.c5b @@ -4624,10 +4624,10 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @TestInc(constants.%Inc.facet.dd2) { // CHECK:STDOUT: %T.patt.loc278_13.2 => constants.%T.patt.eab // CHECK:STDOUT: %T.loc278_13.1 => constants.%Inc.facet.dd2 -// CHECK:STDOUT: %T.as_type.loc278_33.1 => constants.%Int32 +// CHECK:STDOUT: %T.as_type.loc278_32.1 => constants.%Int32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.8b4 -// CHECK:STDOUT: %x.patt.loc278_31.2 => constants.%x.patt.d79 -// CHECK:STDOUT: %x.param_patt.loc278_26.2 => constants.%x.param_patt.0c7 +// CHECK:STDOUT: %x.patt.loc278_30.2 => constants.%x.patt.d79 +// CHECK:STDOUT: %x.param_patt.loc278_25.2 => constants.%x.param_patt.0c7 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.357 @@ -4641,10 +4641,10 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @TestDec(constants.%Dec.facet.e1b) { // CHECK:STDOUT: %T.patt.loc284_13.2 => constants.%T.patt.de9 // CHECK:STDOUT: %T.loc284_13.1 => constants.%Dec.facet.e1b -// CHECK:STDOUT: %T.as_type.loc284_33.1 => constants.%Int32 +// CHECK:STDOUT: %T.as_type.loc284_32.1 => constants.%Int32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.8b4 -// CHECK:STDOUT: %x.patt.loc284_31.2 => constants.%x.patt.d79 -// CHECK:STDOUT: %x.param_patt.loc284_26.2 => constants.%x.param_patt.0c7 +// CHECK:STDOUT: %x.patt.loc284_30.2 => constants.%x.patt.d79 +// CHECK:STDOUT: %x.param_patt.loc284_25.2 => constants.%x.param_patt.0c7 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.357 @@ -4658,7 +4658,7 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @TestNegate(constants.%Destroy.facet.191, constants.%facet_value.9cc) { // CHECK:STDOUT: %Result.patt.loc292_9.2 => constants.%Result.patt // CHECK:STDOUT: %Result.loc292_9.1 => constants.%Destroy.facet.191 -// CHECK:STDOUT: %Result.as_type.loc293_50.1 => constants.%Int64 +// CHECK:STDOUT: %Result.as_type.loc293_49.1 => constants.%Int64 // CHECK:STDOUT: %facet_type => constants.%facet_type.d8c // CHECK:STDOUT: %pattern_type.loc293 => constants.%pattern_type.54c // CHECK:STDOUT: %T.patt.loc293_4.2 => constants.%T.patt.16f @@ -4690,7 +4690,7 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: specific @TestNegate(constants.%Destroy.facet.099, constants.%facet_value.dcd) { // CHECK:STDOUT: %Result.patt.loc292_9.2 => constants.%Result.patt // CHECK:STDOUT: %Result.loc292_9.1 => constants.%Destroy.facet.099 -// CHECK:STDOUT: %Result.as_type.loc293_50.1 => constants.%Int32 +// CHECK:STDOUT: %Result.as_type.loc293_49.1 => constants.%Int32 // CHECK:STDOUT: %facet_type => constants.%facet_type.021 // CHECK:STDOUT: %pattern_type.loc293 => constants.%pattern_type.4cd // CHECK:STDOUT: %T.patt.loc293_4.2 => constants.%T.patt.d74 diff --git a/toolchain/check/testdata/interop/cpp/operators/eq_with.carbon b/toolchain/check/testdata/interop/cpp/operators/eq_with.carbon index 37ebf981f078..043b68e6ce2c 100644 --- a/toolchain/check/testdata/interop/cpp/operators/eq_with.carbon +++ b/toolchain/check/testdata/interop/cpp/operators/eq_with.carbon @@ -22,7 +22,7 @@ struct EqualityComparable { }; '''; -fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { +fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { //@dump-sem-ir-begin x == y; x != y; @@ -67,7 +67,7 @@ struct B3 { }; '''; -fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { +fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { //@dump-sem-ir-begin x == y; x != y; @@ -121,8 +121,8 @@ struct BothBoolish { '''; // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+43]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-18]]:8: error: cannot implicitly convert expression of type `Core.Optional(i32* as Core.OptionalStorage)` to `bool` [ConversionFailure] // CHECK:STDERR: auto operator==(EqBoolish) const -> int*; @@ -134,8 +134,8 @@ struct BothBoolish { // CHECK:STDERR: fn Equal(self, other: Other) -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+30]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-22]]:8: error: cannot implicitly convert expression of type `Cpp.Result` to `bool` [ConversionFailure] // CHECK:STDERR: auto operator==(BothBoolish) const -> Result; @@ -147,8 +147,8 @@ struct BothBoolish { // CHECK:STDERR: fn Equal(self, other: Other) -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+17]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-34]]:8: error: cannot implicitly convert expression of type `Cpp.Result` to `bool` [ConversionFailure] // CHECK:STDERR: auto operator!=(BothBoolish) const -> Result; @@ -160,10 +160,10 @@ struct BothBoolish { // CHECK:STDERR: fn NotEqual(self, other: Other) -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+4]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { +fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { x == y; x != y; } @@ -194,7 +194,7 @@ public: }; '''; -fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { +fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { x == y; x != y; } @@ -210,8 +210,8 @@ fn Test(default_eq_only: Cpp.DefaultEqOnly, // CHECK:STDERR: EqWith(default_eq_only, default_eq_only); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_comparison_rewrites.carbon:[[@LINE-15]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EqWith(default_eq_only, default_eq_only); @@ -221,8 +221,8 @@ fn Test(default_eq_only: Cpp.DefaultEqOnly, // CHECK:STDERR: EqWith(only_eq_declared, only_eq_declared); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_comparison_rewrites.carbon:[[@LINE-26]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EqWith(only_eq_declared, only_eq_declared); } @@ -265,7 +265,7 @@ struct B2 { }; '''; -fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { +fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { x == y; x != y; } @@ -281,8 +281,8 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDERR: EqWith(only_neq, only_neq); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-15]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EqWith(only_neq, only_neq); @@ -300,8 +300,8 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDERR: EqWith(no_relevant_members, no_relevant_members); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-34]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EqWith(no_relevant_members, no_relevant_members); @@ -309,8 +309,8 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDERR: EqWith(eq_returns_void, eq_returns_void); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-43]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EqWith(eq_returns_void, eq_returns_void); @@ -318,8 +318,8 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDERR: EqWith(neq_returns_void, neq_returns_void); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-52]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EqWith(neq_returns_void, neq_returns_void); @@ -333,8 +333,8 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDERR: 23 | auto operator!=(DeletedNeq) const -> bool = delete; // CHECK:STDERR: | ^ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-67]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EqWith(deleted_neq, deleted_neq); @@ -342,8 +342,8 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDERR: EqWith(non_const_eq, non_const_eq); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-76]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EqWith(non_const_eq, non_const_eq); @@ -351,8 +351,8 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDERR: EqWith(a2, b2); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-85]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EqWith(a2, b2); } @@ -433,30 +433,30 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDOUT: %Core.import_ref.b78 = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @EqWith.loc11(%U.loc11_12.2: type, %T.loc11_22.2: @EqWith.loc11.%EqWith.type.loc11_38.1 (%EqWith.type.98ea86.2)) { +// CHECK:STDOUT: generic fn @EqWith.loc11(%U.loc11_12.2: type, %T.loc11_21.2: @EqWith.loc11.%EqWith.type.loc11_36.1 (%EqWith.type.98ea86.2)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc13: = require_complete_type %EqWith.type.loc11_38.1 [symbolic = %require_complete.loc13 (constants.%require_complete.fb5)] +// CHECK:STDOUT: %require_complete.loc13: = require_complete_type %EqWith.type.loc11_36.1 [symbolic = %require_complete.loc13 (constants.%require_complete.fb5)] // CHECK:STDOUT: %EqWith.assoc_type: type = assoc_entity_type @EqWith.1, @EqWith.1(%U.loc11_12.1) [symbolic = %EqWith.assoc_type (constants.%EqWith.assoc_type.85b122.2)] // CHECK:STDOUT: %assoc0: @EqWith.loc11.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = assoc_entity element0, imports.%Core.import_ref.5ba [symbolic = %assoc0 (constants.%assoc0.eee873.2)] -// CHECK:STDOUT: %EqWith.WithSelf.Equal.type: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%U.loc11_12.1, %T.loc11_22.1) [symbolic = %EqWith.WithSelf.Equal.type (constants.%EqWith.WithSelf.Equal.type.b82ec7.3)] -// CHECK:STDOUT: %.loc13_5.2: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type, %T.loc11_22.1 [symbolic = %.loc13_5.2 (constants.%.74c)] -// CHECK:STDOUT: %EqWith.lookup_impl_witness: = lookup_impl_witness %T.loc11_22.1, @EqWith.1, @EqWith.1(%U.loc11_12.1) [symbolic = %EqWith.lookup_impl_witness (constants.%EqWith.lookup_impl_witness)] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%U.loc11_12.1, %T.loc11_21.1) [symbolic = %EqWith.WithSelf.Equal.type (constants.%EqWith.WithSelf.Equal.type.b82ec7.3)] +// CHECK:STDOUT: %.loc13_5.2: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type, %T.loc11_21.1 [symbolic = %.loc13_5.2 (constants.%.74c)] +// CHECK:STDOUT: %EqWith.lookup_impl_witness: = lookup_impl_witness %T.loc11_21.1, @EqWith.1, @EqWith.1(%U.loc11_12.1) [symbolic = %EqWith.lookup_impl_witness (constants.%EqWith.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc13_5.2: @EqWith.loc11.%.loc13_5.2 (%.74c) = impl_witness_access %EqWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_5.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc13_5.2: = specific_impl_function %impl.elem0.loc13_5.2, @EqWith.WithSelf.Equal(%U.loc11_12.1, %T.loc11_22.1) [symbolic = %specific_impl_fn.loc13_5.2 (constants.%specific_impl_fn.67a)] +// CHECK:STDOUT: %specific_impl_fn.loc13_5.2: = specific_impl_function %impl.elem0.loc13_5.2, @EqWith.WithSelf.Equal(%U.loc11_12.1, %T.loc11_21.1) [symbolic = %specific_impl_fn.loc13_5.2 (constants.%specific_impl_fn.67a)] // CHECK:STDOUT: %assoc1: @EqWith.loc11.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = assoc_entity element1, imports.%Core.import_ref.03f [symbolic = %assoc1 (constants.%assoc1.0ffc88.2)] -// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%U.loc11_12.1, %T.loc11_22.1) [symbolic = %EqWith.WithSelf.NotEqual.type (constants.%EqWith.WithSelf.NotEqual.type.c5b45a.3)] -// CHECK:STDOUT: %.loc14_5.2: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type, %T.loc11_22.1 [symbolic = %.loc14_5.2 (constants.%.8ed)] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%U.loc11_12.1, %T.loc11_21.1) [symbolic = %EqWith.WithSelf.NotEqual.type (constants.%EqWith.WithSelf.NotEqual.type.c5b45a.3)] +// CHECK:STDOUT: %.loc14_5.2: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type, %T.loc11_21.1 [symbolic = %.loc14_5.2 (constants.%.8ed)] // CHECK:STDOUT: %impl.elem1.loc14_5.2: @EqWith.loc11.%.loc14_5.2 (%.8ed) = impl_witness_access %EqWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc14_5.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc14_5.2: = specific_impl_function %impl.elem1.loc14_5.2, @EqWith.WithSelf.NotEqual(%U.loc11_12.1, %T.loc11_22.1) [symbolic = %specific_impl_fn.loc14_5.2 (constants.%specific_impl_fn.81f)] +// CHECK:STDOUT: %specific_impl_fn.loc14_5.2: = specific_impl_function %impl.elem1.loc14_5.2, @EqWith.WithSelf.NotEqual(%U.loc11_12.1, %T.loc11_21.1) [symbolic = %specific_impl_fn.loc14_5.2 (constants.%specific_impl_fn.81f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @EqWith.loc11.%T.as_type.loc11_44.1 (%T.as_type), %y.param: @EqWith.loc11.%U.loc11_12.1 (%U)) { +// CHECK:STDOUT: fn(%x.param: @EqWith.loc11.%T.as_type.loc11_42.1 (%T.as_type), %y.param: @EqWith.loc11.%U.loc11_12.1 (%U)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref.loc13: @EqWith.loc11.%T.as_type.loc11_44.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc13: @EqWith.loc11.%T.as_type.loc11_42.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc13: @EqWith.loc11.%U.loc11_12.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %EqWith.type.loc13: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc11_38.1 (constants.%EqWith.type.98ea86.2)] +// CHECK:STDOUT: %EqWith.type.loc13: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc11_36.1 (constants.%EqWith.type.98ea86.2)] // CHECK:STDOUT: %.loc13_5.1: @EqWith.loc11.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = specific_constant imports.%Core.import_ref.725, @EqWith.WithSelf(constants.%U, constants.%Self.d94ae0.1) [symbolic = %assoc0 (constants.%assoc0.eee873.2)] // CHECK:STDOUT: %Equal.ref: @EqWith.loc11.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = name_ref Equal, %.loc13_5.1 [symbolic = %assoc0 (constants.%assoc0.eee873.2)] // CHECK:STDOUT: %impl.elem0.loc13_5.1: @EqWith.loc11.%.loc13_5.2 (%.74c) = impl_witness_access constants.%EqWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_5.2 (constants.%impl.elem0)] @@ -464,9 +464,9 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDOUT: %specific_impl_fn.loc13_5.1: = specific_impl_function %impl.elem0.loc13_5.1, @EqWith.WithSelf.Equal(constants.%U, constants.%T) [symbolic = %specific_impl_fn.loc13_5.2 (constants.%specific_impl_fn.67a)] // CHECK:STDOUT: %bound_method.loc13_5.2: = bound_method %x.ref.loc13, %specific_impl_fn.loc13_5.1 // CHECK:STDOUT: %EqWith.WithSelf.Equal.call: init bool = call %bound_method.loc13_5.2(%x.ref.loc13, %y.ref.loc13) -// CHECK:STDOUT: %x.ref.loc14: @EqWith.loc11.%T.as_type.loc11_44.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc14: @EqWith.loc11.%T.as_type.loc11_42.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc14: @EqWith.loc11.%U.loc11_12.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %EqWith.type.loc14: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc11_38.1 (constants.%EqWith.type.98ea86.2)] +// CHECK:STDOUT: %EqWith.type.loc14: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc11_36.1 (constants.%EqWith.type.98ea86.2)] // CHECK:STDOUT: %.loc14_5.1: @EqWith.loc11.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = specific_constant imports.%Core.import_ref.8d7, @EqWith.WithSelf(constants.%U, constants.%Self.d94ae0.1) [symbolic = %assoc1 (constants.%assoc1.0ffc88.2)] // CHECK:STDOUT: %NotEqual.ref: @EqWith.loc11.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = name_ref NotEqual, %.loc14_5.1 [symbolic = %assoc1 (constants.%assoc1.0ffc88.2)] // CHECK:STDOUT: %impl.elem1.loc14_5.1: @EqWith.loc11.%.loc14_5.2 (%.8ed) = impl_witness_access constants.%EqWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc14_5.2 (constants.%impl.elem1)] @@ -483,37 +483,37 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDOUT: specific @EqWith.loc11(constants.%U, constants.%T) { // CHECK:STDOUT: %U.patt.loc11_12.2 => constants.%U.patt // CHECK:STDOUT: %U.loc11_12.1 => constants.%U -// CHECK:STDOUT: %EqWith.type.loc11_38.1 => constants.%EqWith.type.98ea86.2 -// CHECK:STDOUT: %pattern_type.loc11_22 => constants.%pattern_type.3d4 -// CHECK:STDOUT: %T.patt.loc11_22.2 => constants.%T.patt.6b9 -// CHECK:STDOUT: %T.loc11_22.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc11_44.1 => constants.%T.as_type -// CHECK:STDOUT: %pattern_type.loc11_42 => constants.%pattern_type.e6374a.2 -// CHECK:STDOUT: %x.param_patt.loc11_42.2 => constants.%x.param_patt.aa2 -// CHECK:STDOUT: %x.patt.loc11_42.2 => constants.%x.patt.4e4 -// CHECK:STDOUT: %pattern_type.loc11_48 => constants.%pattern_type.51d1c4.2 -// CHECK:STDOUT: %y.param_patt.loc11_48.2 => constants.%y.param_patt.be3 -// CHECK:STDOUT: %y.patt.loc11_48.2 => constants.%y.patt.b85 +// CHECK:STDOUT: %EqWith.type.loc11_36.1 => constants.%EqWith.type.98ea86.2 +// CHECK:STDOUT: %pattern_type.loc11_21 => constants.%pattern_type.3d4 +// CHECK:STDOUT: %T.patt.loc11_21.2 => constants.%T.patt.6b9 +// CHECK:STDOUT: %T.loc11_21.1 => constants.%T +// CHECK:STDOUT: %T.as_type.loc11_42.1 => constants.%T.as_type +// CHECK:STDOUT: %pattern_type.loc11_40 => constants.%pattern_type.e6374a.2 +// CHECK:STDOUT: %x.param_patt.loc11_40.2 => constants.%x.param_patt.aa2 +// CHECK:STDOUT: %x.patt.loc11_40.2 => constants.%x.patt.4e4 +// CHECK:STDOUT: %pattern_type.loc11_46 => constants.%pattern_type.51d1c4.2 +// CHECK:STDOUT: %y.param_patt.loc11_46.2 => constants.%y.param_patt.be3 +// CHECK:STDOUT: %y.patt.loc11_46.2 => constants.%y.patt.b85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @EqWith.loc11(constants.%EqualityComparable, constants.%EqWith.facet.b15) { // CHECK:STDOUT: %U.patt.loc11_12.2 => constants.%U.patt // CHECK:STDOUT: %U.loc11_12.1 => constants.%EqualityComparable -// CHECK:STDOUT: %EqWith.type.loc11_38.1 => constants.%EqWith.type.6a7 -// CHECK:STDOUT: %pattern_type.loc11_22 => constants.%pattern_type.876 -// CHECK:STDOUT: %T.patt.loc11_22.2 => constants.%T.patt.d6d -// CHECK:STDOUT: %T.loc11_22.1 => constants.%EqWith.facet.b15 -// CHECK:STDOUT: %T.as_type.loc11_44.1 => constants.%EqualityComparable -// CHECK:STDOUT: %pattern_type.loc11_42 => constants.%pattern_type.73b -// CHECK:STDOUT: %x.param_patt.loc11_42.2 => constants.%x.param_patt.427 -// CHECK:STDOUT: %x.patt.loc11_42.2 => constants.%x.patt.570 -// CHECK:STDOUT: %pattern_type.loc11_48 => constants.%pattern_type.73b -// CHECK:STDOUT: %y.param_patt.loc11_48.2 => constants.%y.param_patt.464 -// CHECK:STDOUT: %y.patt.loc11_48.2 => constants.%y.patt.d34 +// CHECK:STDOUT: %EqWith.type.loc11_36.1 => constants.%EqWith.type.6a7 +// CHECK:STDOUT: %pattern_type.loc11_21 => constants.%pattern_type.876 +// CHECK:STDOUT: %T.patt.loc11_21.2 => constants.%T.patt.d6d +// CHECK:STDOUT: %T.loc11_21.1 => constants.%EqWith.facet.b15 +// CHECK:STDOUT: %T.as_type.loc11_42.1 => constants.%EqualityComparable +// CHECK:STDOUT: %pattern_type.loc11_40 => constants.%pattern_type.73b +// CHECK:STDOUT: %x.param_patt.loc11_40.2 => constants.%x.param_patt.427 +// CHECK:STDOUT: %x.patt.loc11_40.2 => constants.%x.patt.570 +// CHECK:STDOUT: %pattern_type.loc11_46 => constants.%pattern_type.73b +// CHECK:STDOUT: %y.param_patt.loc11_46.2 => constants.%y.param_patt.464 +// CHECK:STDOUT: %y.patt.loc11_46.2 => constants.%y.patt.d34 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc11_42 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc11_48 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc11_40 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc11_46 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc13 => constants.%complete_type.c86 // CHECK:STDOUT: %EqWith.assoc_type => constants.%EqWith.assoc_type.ecd // CHECK:STDOUT: %assoc0 => constants.%assoc0.fab @@ -699,30 +699,30 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDOUT: %Core.import_ref.b78 = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @EqWith.loc34(%U.loc34_12.2: type, %T.loc34_22.2: @EqWith.loc34.%EqWith.type.loc34_38.1 (%EqWith.type.98ea86.2)) { +// CHECK:STDOUT: generic fn @EqWith.loc34(%U.loc34_12.2: type, %T.loc34_21.2: @EqWith.loc34.%EqWith.type.loc34_36.1 (%EqWith.type.98ea86.2)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc36: = require_complete_type %EqWith.type.loc34_38.1 [symbolic = %require_complete.loc36 (constants.%require_complete.fb5)] +// CHECK:STDOUT: %require_complete.loc36: = require_complete_type %EqWith.type.loc34_36.1 [symbolic = %require_complete.loc36 (constants.%require_complete.fb5)] // CHECK:STDOUT: %EqWith.assoc_type: type = assoc_entity_type @EqWith.1, @EqWith.1(%U.loc34_12.1) [symbolic = %EqWith.assoc_type (constants.%EqWith.assoc_type.85b122.2)] // CHECK:STDOUT: %assoc0: @EqWith.loc34.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = assoc_entity element0, imports.%Core.import_ref.5ba [symbolic = %assoc0 (constants.%assoc0.eee873.2)] -// CHECK:STDOUT: %EqWith.WithSelf.Equal.type: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%U.loc34_12.1, %T.loc34_22.1) [symbolic = %EqWith.WithSelf.Equal.type (constants.%EqWith.WithSelf.Equal.type.b82ec7.3)] -// CHECK:STDOUT: %.loc36_5.2: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type, %T.loc34_22.1 [symbolic = %.loc36_5.2 (constants.%.74c)] -// CHECK:STDOUT: %EqWith.lookup_impl_witness: = lookup_impl_witness %T.loc34_22.1, @EqWith.1, @EqWith.1(%U.loc34_12.1) [symbolic = %EqWith.lookup_impl_witness (constants.%EqWith.lookup_impl_witness)] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%U.loc34_12.1, %T.loc34_21.1) [symbolic = %EqWith.WithSelf.Equal.type (constants.%EqWith.WithSelf.Equal.type.b82ec7.3)] +// CHECK:STDOUT: %.loc36_5.2: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type, %T.loc34_21.1 [symbolic = %.loc36_5.2 (constants.%.74c)] +// CHECK:STDOUT: %EqWith.lookup_impl_witness: = lookup_impl_witness %T.loc34_21.1, @EqWith.1, @EqWith.1(%U.loc34_12.1) [symbolic = %EqWith.lookup_impl_witness (constants.%EqWith.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc36_5.2: @EqWith.loc34.%.loc36_5.2 (%.74c) = impl_witness_access %EqWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc36_5.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc36_5.2: = specific_impl_function %impl.elem0.loc36_5.2, @EqWith.WithSelf.Equal(%U.loc34_12.1, %T.loc34_22.1) [symbolic = %specific_impl_fn.loc36_5.2 (constants.%specific_impl_fn.67a)] +// CHECK:STDOUT: %specific_impl_fn.loc36_5.2: = specific_impl_function %impl.elem0.loc36_5.2, @EqWith.WithSelf.Equal(%U.loc34_12.1, %T.loc34_21.1) [symbolic = %specific_impl_fn.loc36_5.2 (constants.%specific_impl_fn.67a)] // CHECK:STDOUT: %assoc1: @EqWith.loc34.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = assoc_entity element1, imports.%Core.import_ref.03f [symbolic = %assoc1 (constants.%assoc1.0ffc88.2)] -// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%U.loc34_12.1, %T.loc34_22.1) [symbolic = %EqWith.WithSelf.NotEqual.type (constants.%EqWith.WithSelf.NotEqual.type.c5b45a.3)] -// CHECK:STDOUT: %.loc37_5.2: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type, %T.loc34_22.1 [symbolic = %.loc37_5.2 (constants.%.8ed)] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%U.loc34_12.1, %T.loc34_21.1) [symbolic = %EqWith.WithSelf.NotEqual.type (constants.%EqWith.WithSelf.NotEqual.type.c5b45a.3)] +// CHECK:STDOUT: %.loc37_5.2: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type, %T.loc34_21.1 [symbolic = %.loc37_5.2 (constants.%.8ed)] // CHECK:STDOUT: %impl.elem1.loc37_5.2: @EqWith.loc34.%.loc37_5.2 (%.8ed) = impl_witness_access %EqWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc37_5.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc37_5.2: = specific_impl_function %impl.elem1.loc37_5.2, @EqWith.WithSelf.NotEqual(%U.loc34_12.1, %T.loc34_22.1) [symbolic = %specific_impl_fn.loc37_5.2 (constants.%specific_impl_fn.81f)] +// CHECK:STDOUT: %specific_impl_fn.loc37_5.2: = specific_impl_function %impl.elem1.loc37_5.2, @EqWith.WithSelf.NotEqual(%U.loc34_12.1, %T.loc34_21.1) [symbolic = %specific_impl_fn.loc37_5.2 (constants.%specific_impl_fn.81f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @EqWith.loc34.%T.as_type.loc34_44.1 (%T.as_type), %y.param: @EqWith.loc34.%U.loc34_12.1 (%U)) { +// CHECK:STDOUT: fn(%x.param: @EqWith.loc34.%T.as_type.loc34_42.1 (%T.as_type), %y.param: @EqWith.loc34.%U.loc34_12.1 (%U)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref.loc36: @EqWith.loc34.%T.as_type.loc34_44.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc36: @EqWith.loc34.%T.as_type.loc34_42.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc36: @EqWith.loc34.%U.loc34_12.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %EqWith.type.loc36: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc34_38.1 (constants.%EqWith.type.98ea86.2)] +// CHECK:STDOUT: %EqWith.type.loc36: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc34_36.1 (constants.%EqWith.type.98ea86.2)] // CHECK:STDOUT: %.loc36_5.1: @EqWith.loc34.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = specific_constant imports.%Core.import_ref.725, @EqWith.WithSelf(constants.%U, constants.%Self.d94ae0.1) [symbolic = %assoc0 (constants.%assoc0.eee873.2)] // CHECK:STDOUT: %Equal.ref: @EqWith.loc34.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = name_ref Equal, %.loc36_5.1 [symbolic = %assoc0 (constants.%assoc0.eee873.2)] // CHECK:STDOUT: %impl.elem0.loc36_5.1: @EqWith.loc34.%.loc36_5.2 (%.74c) = impl_witness_access constants.%EqWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc36_5.2 (constants.%impl.elem0)] @@ -730,9 +730,9 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDOUT: %specific_impl_fn.loc36_5.1: = specific_impl_function %impl.elem0.loc36_5.1, @EqWith.WithSelf.Equal(constants.%U, constants.%T) [symbolic = %specific_impl_fn.loc36_5.2 (constants.%specific_impl_fn.67a)] // CHECK:STDOUT: %bound_method.loc36_5.2: = bound_method %x.ref.loc36, %specific_impl_fn.loc36_5.1 // CHECK:STDOUT: %EqWith.WithSelf.Equal.call: init bool = call %bound_method.loc36_5.2(%x.ref.loc36, %y.ref.loc36) -// CHECK:STDOUT: %x.ref.loc37: @EqWith.loc34.%T.as_type.loc34_44.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc37: @EqWith.loc34.%T.as_type.loc34_42.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc37: @EqWith.loc34.%U.loc34_12.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %EqWith.type.loc37: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc34_38.1 (constants.%EqWith.type.98ea86.2)] +// CHECK:STDOUT: %EqWith.type.loc37: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc34_36.1 (constants.%EqWith.type.98ea86.2)] // CHECK:STDOUT: %.loc37_5.1: @EqWith.loc34.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = specific_constant imports.%Core.import_ref.8d7, @EqWith.WithSelf(constants.%U, constants.%Self.d94ae0.1) [symbolic = %assoc1 (constants.%assoc1.0ffc88.2)] // CHECK:STDOUT: %NotEqual.ref: @EqWith.loc34.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = name_ref NotEqual, %.loc37_5.1 [symbolic = %assoc1 (constants.%assoc1.0ffc88.2)] // CHECK:STDOUT: %impl.elem1.loc37_5.1: @EqWith.loc34.%.loc37_5.2 (%.8ed) = impl_witness_access constants.%EqWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc37_5.2 (constants.%impl.elem1)] @@ -749,37 +749,37 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDOUT: specific @EqWith.loc34(constants.%U, constants.%T) { // CHECK:STDOUT: %U.patt.loc34_12.2 => constants.%U.patt // CHECK:STDOUT: %U.loc34_12.1 => constants.%U -// CHECK:STDOUT: %EqWith.type.loc34_38.1 => constants.%EqWith.type.98ea86.2 -// CHECK:STDOUT: %pattern_type.loc34_22 => constants.%pattern_type.3d4 -// CHECK:STDOUT: %T.patt.loc34_22.2 => constants.%T.patt.6b9 -// CHECK:STDOUT: %T.loc34_22.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc34_44.1 => constants.%T.as_type -// CHECK:STDOUT: %pattern_type.loc34_42 => constants.%pattern_type.e6374a.2 -// CHECK:STDOUT: %x.param_patt.loc34_42.2 => constants.%x.param_patt.aa2 -// CHECK:STDOUT: %x.patt.loc34_42.2 => constants.%x.patt.4e4 -// CHECK:STDOUT: %pattern_type.loc34_48 => constants.%pattern_type.51d1c4.2 -// CHECK:STDOUT: %y.param_patt.loc34_48.2 => constants.%y.param_patt.be3 -// CHECK:STDOUT: %y.patt.loc34_48.2 => constants.%y.patt.b85 +// CHECK:STDOUT: %EqWith.type.loc34_36.1 => constants.%EqWith.type.98ea86.2 +// CHECK:STDOUT: %pattern_type.loc34_21 => constants.%pattern_type.3d4 +// CHECK:STDOUT: %T.patt.loc34_21.2 => constants.%T.patt.6b9 +// CHECK:STDOUT: %T.loc34_21.1 => constants.%T +// CHECK:STDOUT: %T.as_type.loc34_42.1 => constants.%T.as_type +// CHECK:STDOUT: %pattern_type.loc34_40 => constants.%pattern_type.e6374a.2 +// CHECK:STDOUT: %x.param_patt.loc34_40.2 => constants.%x.param_patt.aa2 +// CHECK:STDOUT: %x.patt.loc34_40.2 => constants.%x.patt.4e4 +// CHECK:STDOUT: %pattern_type.loc34_46 => constants.%pattern_type.51d1c4.2 +// CHECK:STDOUT: %y.param_patt.loc34_46.2 => constants.%y.param_patt.be3 +// CHECK:STDOUT: %y.patt.loc34_46.2 => constants.%y.patt.b85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @EqWith.loc34(constants.%B1, constants.%EqWith.facet.2d3) { // CHECK:STDOUT: %U.patt.loc34_12.2 => constants.%U.patt // CHECK:STDOUT: %U.loc34_12.1 => constants.%B1 -// CHECK:STDOUT: %EqWith.type.loc34_38.1 => constants.%EqWith.type.6ed -// CHECK:STDOUT: %pattern_type.loc34_22 => constants.%pattern_type.e16 -// CHECK:STDOUT: %T.patt.loc34_22.2 => constants.%T.patt.869 -// CHECK:STDOUT: %T.loc34_22.1 => constants.%EqWith.facet.2d3 -// CHECK:STDOUT: %T.as_type.loc34_44.1 => constants.%A1 -// CHECK:STDOUT: %pattern_type.loc34_42 => constants.%pattern_type.3b4 -// CHECK:STDOUT: %x.param_patt.loc34_42.2 => constants.%x.param_patt.c7f -// CHECK:STDOUT: %x.patt.loc34_42.2 => constants.%x.patt.4ff -// CHECK:STDOUT: %pattern_type.loc34_48 => constants.%pattern_type.5b2 -// CHECK:STDOUT: %y.param_patt.loc34_48.2 => constants.%y.param_patt.9d7 -// CHECK:STDOUT: %y.patt.loc34_48.2 => constants.%y.patt.979 +// CHECK:STDOUT: %EqWith.type.loc34_36.1 => constants.%EqWith.type.6ed +// CHECK:STDOUT: %pattern_type.loc34_21 => constants.%pattern_type.e16 +// CHECK:STDOUT: %T.patt.loc34_21.2 => constants.%T.patt.869 +// CHECK:STDOUT: %T.loc34_21.1 => constants.%EqWith.facet.2d3 +// CHECK:STDOUT: %T.as_type.loc34_42.1 => constants.%A1 +// CHECK:STDOUT: %pattern_type.loc34_40 => constants.%pattern_type.3b4 +// CHECK:STDOUT: %x.param_patt.loc34_40.2 => constants.%x.param_patt.c7f +// CHECK:STDOUT: %x.patt.loc34_40.2 => constants.%x.patt.4ff +// CHECK:STDOUT: %pattern_type.loc34_46 => constants.%pattern_type.5b2 +// CHECK:STDOUT: %y.param_patt.loc34_46.2 => constants.%y.param_patt.9d7 +// CHECK:STDOUT: %y.patt.loc34_46.2 => constants.%y.patt.979 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc34_42 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc34_48 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc34_40 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc34_46 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc36 => constants.%complete_type.1d5 // CHECK:STDOUT: %EqWith.assoc_type => constants.%EqWith.assoc_type.b38 // CHECK:STDOUT: %assoc0 => constants.%assoc0.a48 @@ -798,21 +798,21 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDOUT: specific @EqWith.loc34(constants.%A1, constants.%EqWith.facet.b94) { // CHECK:STDOUT: %U.patt.loc34_12.2 => constants.%U.patt // CHECK:STDOUT: %U.loc34_12.1 => constants.%A1 -// CHECK:STDOUT: %EqWith.type.loc34_38.1 => constants.%EqWith.type.dda -// CHECK:STDOUT: %pattern_type.loc34_22 => constants.%pattern_type.a95 -// CHECK:STDOUT: %T.patt.loc34_22.2 => constants.%T.patt.b7f -// CHECK:STDOUT: %T.loc34_22.1 => constants.%EqWith.facet.b94 -// CHECK:STDOUT: %T.as_type.loc34_44.1 => constants.%B1 -// CHECK:STDOUT: %pattern_type.loc34_42 => constants.%pattern_type.5b2 -// CHECK:STDOUT: %x.param_patt.loc34_42.2 => constants.%x.param_patt.bff -// CHECK:STDOUT: %x.patt.loc34_42.2 => constants.%x.patt.f3d -// CHECK:STDOUT: %pattern_type.loc34_48 => constants.%pattern_type.3b4 -// CHECK:STDOUT: %y.param_patt.loc34_48.2 => constants.%y.param_patt.257 -// CHECK:STDOUT: %y.patt.loc34_48.2 => constants.%y.patt.774 +// CHECK:STDOUT: %EqWith.type.loc34_36.1 => constants.%EqWith.type.dda +// CHECK:STDOUT: %pattern_type.loc34_21 => constants.%pattern_type.a95 +// CHECK:STDOUT: %T.patt.loc34_21.2 => constants.%T.patt.b7f +// CHECK:STDOUT: %T.loc34_21.1 => constants.%EqWith.facet.b94 +// CHECK:STDOUT: %T.as_type.loc34_42.1 => constants.%B1 +// CHECK:STDOUT: %pattern_type.loc34_40 => constants.%pattern_type.5b2 +// CHECK:STDOUT: %x.param_patt.loc34_40.2 => constants.%x.param_patt.bff +// CHECK:STDOUT: %x.patt.loc34_40.2 => constants.%x.patt.f3d +// CHECK:STDOUT: %pattern_type.loc34_46 => constants.%pattern_type.3b4 +// CHECK:STDOUT: %y.param_patt.loc34_46.2 => constants.%y.param_patt.257 +// CHECK:STDOUT: %y.patt.loc34_46.2 => constants.%y.patt.774 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc34_42 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc34_48 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc34_40 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc34_46 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc36 => constants.%complete_type.f84 // CHECK:STDOUT: %EqWith.assoc_type => constants.%EqWith.assoc_type.5ce // CHECK:STDOUT: %assoc0 => constants.%assoc0.7c8 @@ -831,21 +831,21 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDOUT: specific @EqWith.loc34(constants.%A2, constants.%EqWith.facet.fe0) { // CHECK:STDOUT: %U.patt.loc34_12.2 => constants.%U.patt // CHECK:STDOUT: %U.loc34_12.1 => constants.%A2 -// CHECK:STDOUT: %EqWith.type.loc34_38.1 => constants.%EqWith.type.c63 -// CHECK:STDOUT: %pattern_type.loc34_22 => constants.%pattern_type.cbd -// CHECK:STDOUT: %T.patt.loc34_22.2 => constants.%T.patt.aaf -// CHECK:STDOUT: %T.loc34_22.1 => constants.%EqWith.facet.fe0 -// CHECK:STDOUT: %T.as_type.loc34_44.1 => constants.%B2 -// CHECK:STDOUT: %pattern_type.loc34_42 => constants.%pattern_type.d1e -// CHECK:STDOUT: %x.param_patt.loc34_42.2 => constants.%x.param_patt.0e6 -// CHECK:STDOUT: %x.patt.loc34_42.2 => constants.%x.patt.94e -// CHECK:STDOUT: %pattern_type.loc34_48 => constants.%pattern_type.9f0 -// CHECK:STDOUT: %y.param_patt.loc34_48.2 => constants.%y.param_patt.a4f -// CHECK:STDOUT: %y.patt.loc34_48.2 => constants.%y.patt.912 +// CHECK:STDOUT: %EqWith.type.loc34_36.1 => constants.%EqWith.type.c63 +// CHECK:STDOUT: %pattern_type.loc34_21 => constants.%pattern_type.cbd +// CHECK:STDOUT: %T.patt.loc34_21.2 => constants.%T.patt.aaf +// CHECK:STDOUT: %T.loc34_21.1 => constants.%EqWith.facet.fe0 +// CHECK:STDOUT: %T.as_type.loc34_42.1 => constants.%B2 +// CHECK:STDOUT: %pattern_type.loc34_40 => constants.%pattern_type.d1e +// CHECK:STDOUT: %x.param_patt.loc34_40.2 => constants.%x.param_patt.0e6 +// CHECK:STDOUT: %x.patt.loc34_40.2 => constants.%x.patt.94e +// CHECK:STDOUT: %pattern_type.loc34_46 => constants.%pattern_type.9f0 +// CHECK:STDOUT: %y.param_patt.loc34_46.2 => constants.%y.param_patt.a4f +// CHECK:STDOUT: %y.patt.loc34_46.2 => constants.%y.patt.912 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc34_42 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc34_48 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc34_40 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc34_46 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc36 => constants.%complete_type.f0c // CHECK:STDOUT: %EqWith.assoc_type => constants.%EqWith.assoc_type.2ca // CHECK:STDOUT: %assoc0 => constants.%assoc0.878 @@ -864,21 +864,21 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDOUT: specific @EqWith.loc34(constants.%B3, constants.%EqWith.facet.34d) { // CHECK:STDOUT: %U.patt.loc34_12.2 => constants.%U.patt // CHECK:STDOUT: %U.loc34_12.1 => constants.%B3 -// CHECK:STDOUT: %EqWith.type.loc34_38.1 => constants.%EqWith.type.2e6 -// CHECK:STDOUT: %pattern_type.loc34_22 => constants.%pattern_type.2b2 -// CHECK:STDOUT: %T.patt.loc34_22.2 => constants.%T.patt.7d5 -// CHECK:STDOUT: %T.loc34_22.1 => constants.%EqWith.facet.34d -// CHECK:STDOUT: %T.as_type.loc34_44.1 => constants.%A3 -// CHECK:STDOUT: %pattern_type.loc34_42 => constants.%pattern_type.7fe -// CHECK:STDOUT: %x.param_patt.loc34_42.2 => constants.%x.param_patt.429 -// CHECK:STDOUT: %x.patt.loc34_42.2 => constants.%x.patt.6e2 -// CHECK:STDOUT: %pattern_type.loc34_48 => constants.%pattern_type.2dd -// CHECK:STDOUT: %y.param_patt.loc34_48.2 => constants.%y.param_patt.b51 -// CHECK:STDOUT: %y.patt.loc34_48.2 => constants.%y.patt.7b8 +// CHECK:STDOUT: %EqWith.type.loc34_36.1 => constants.%EqWith.type.2e6 +// CHECK:STDOUT: %pattern_type.loc34_21 => constants.%pattern_type.2b2 +// CHECK:STDOUT: %T.patt.loc34_21.2 => constants.%T.patt.7d5 +// CHECK:STDOUT: %T.loc34_21.1 => constants.%EqWith.facet.34d +// CHECK:STDOUT: %T.as_type.loc34_42.1 => constants.%A3 +// CHECK:STDOUT: %pattern_type.loc34_40 => constants.%pattern_type.7fe +// CHECK:STDOUT: %x.param_patt.loc34_40.2 => constants.%x.param_patt.429 +// CHECK:STDOUT: %x.patt.loc34_40.2 => constants.%x.patt.6e2 +// CHECK:STDOUT: %pattern_type.loc34_46 => constants.%pattern_type.2dd +// CHECK:STDOUT: %y.param_patt.loc34_46.2 => constants.%y.param_patt.b51 +// CHECK:STDOUT: %y.patt.loc34_46.2 => constants.%y.patt.7b8 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc34_42 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc34_48 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc34_40 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc34_46 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc36 => constants.%complete_type.777 // CHECK:STDOUT: %EqWith.assoc_type => constants.%EqWith.assoc_type.eda // CHECK:STDOUT: %assoc0 => constants.%assoc0.34f @@ -897,21 +897,21 @@ fn Test(only_neq: Cpp.OnlyNeq, // CHECK:STDOUT: specific @EqWith.loc34(constants.%A3, constants.%EqWith.facet.2a4) { // CHECK:STDOUT: %U.patt.loc34_12.2 => constants.%U.patt // CHECK:STDOUT: %U.loc34_12.1 => constants.%A3 -// CHECK:STDOUT: %EqWith.type.loc34_38.1 => constants.%EqWith.type.831 -// CHECK:STDOUT: %pattern_type.loc34_22 => constants.%pattern_type.9c8 -// CHECK:STDOUT: %T.patt.loc34_22.2 => constants.%T.patt.fcb -// CHECK:STDOUT: %T.loc34_22.1 => constants.%EqWith.facet.2a4 -// CHECK:STDOUT: %T.as_type.loc34_44.1 => constants.%B3 -// CHECK:STDOUT: %pattern_type.loc34_42 => constants.%pattern_type.2dd -// CHECK:STDOUT: %x.param_patt.loc34_42.2 => constants.%x.param_patt.074 -// CHECK:STDOUT: %x.patt.loc34_42.2 => constants.%x.patt.234 -// CHECK:STDOUT: %pattern_type.loc34_48 => constants.%pattern_type.7fe -// CHECK:STDOUT: %y.param_patt.loc34_48.2 => constants.%y.param_patt.d86 -// CHECK:STDOUT: %y.patt.loc34_48.2 => constants.%y.patt.fd9 +// CHECK:STDOUT: %EqWith.type.loc34_36.1 => constants.%EqWith.type.831 +// CHECK:STDOUT: %pattern_type.loc34_21 => constants.%pattern_type.9c8 +// CHECK:STDOUT: %T.patt.loc34_21.2 => constants.%T.patt.fcb +// CHECK:STDOUT: %T.loc34_21.1 => constants.%EqWith.facet.2a4 +// CHECK:STDOUT: %T.as_type.loc34_42.1 => constants.%B3 +// CHECK:STDOUT: %pattern_type.loc34_40 => constants.%pattern_type.2dd +// CHECK:STDOUT: %x.param_patt.loc34_40.2 => constants.%x.param_patt.074 +// CHECK:STDOUT: %x.patt.loc34_40.2 => constants.%x.patt.234 +// CHECK:STDOUT: %pattern_type.loc34_46 => constants.%pattern_type.7fe +// CHECK:STDOUT: %y.param_patt.loc34_46.2 => constants.%y.param_patt.d86 +// CHECK:STDOUT: %y.patt.loc34_46.2 => constants.%y.patt.fd9 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc34_42 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc34_48 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc34_40 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc34_46 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc36 => constants.%complete_type.94e // CHECK:STDOUT: %EqWith.assoc_type => constants.%EqWith.assoc_type.d85 // CHECK:STDOUT: %assoc0 => constants.%assoc0.b7b diff --git a/toolchain/check/testdata/interop/cpp/operators/ordered_with.carbon b/toolchain/check/testdata/interop/cpp/operators/ordered_with.carbon index 8313e21b3cf9..f28112861279 100644 --- a/toolchain/check/testdata/interop/cpp/operators/ordered_with.carbon +++ b/toolchain/check/testdata/interop/cpp/operators/ordered_with.carbon @@ -24,7 +24,7 @@ struct Ordered { }; '''; -fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { +fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { //@dump-sem-ir-begin x < y; x <= y; @@ -91,7 +91,7 @@ struct B3 { }; '''; -fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { +fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { //@dump-sem-ir-begin x < y; x <= y; @@ -168,8 +168,8 @@ struct AllReturnBoolish { '''; // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+82]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-36]]:8: error: cannot implicitly convert expression of type `Core.Optional(i32* as Core.OptionalStorage)` to `bool` [ConversionFailure] // CHECK:STDERR: auto operator<=(LessEqualReturnsBoolish) const -> int*; @@ -181,8 +181,8 @@ struct AllReturnBoolish { // CHECK:STDERR: fn LessOrEquivalent(self, other: Other) -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+69]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-39]]:8: error: cannot implicitly convert expression of type `Cpp.Result` to `bool` [ConversionFailure] // CHECK:STDERR: auto operator>=(GreaterEqualReturnsBoolish) const -> Result; @@ -194,8 +194,8 @@ struct AllReturnBoolish { // CHECK:STDERR: fn GreaterOrEquivalent(self, other: Other) -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+56]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-37]]:8: error: cannot implicitly convert expression of type `f64` to `bool` [ConversionFailure] // CHECK:STDERR: auto operator<(AllReturnBoolish) const -> double; @@ -207,8 +207,8 @@ struct AllReturnBoolish { // CHECK:STDERR: fn Less(self, other: Other) -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+43]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-49]]:8: error: cannot implicitly convert expression of type `f64` to `bool` [ConversionFailure] // CHECK:STDERR: auto operator<=(AllReturnBoolish) const -> double; @@ -220,8 +220,8 @@ struct AllReturnBoolish { // CHECK:STDERR: fn LessOrEquivalent(self, other: Other) -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+30]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-61]]:8: error: cannot implicitly convert expression of type `f64` to `bool` [ConversionFailure] // CHECK:STDERR: auto operator>(AllReturnBoolish) const -> double; @@ -233,8 +233,8 @@ struct AllReturnBoolish { // CHECK:STDERR: fn Greater(self, other: Other) -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+17]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-73]]:8: error: cannot implicitly convert expression of type `f64` to `bool` [ConversionFailure] // CHECK:STDERR: auto operator>=(AllReturnBoolish) const -> double; @@ -246,10 +246,10 @@ struct AllReturnBoolish { // CHECK:STDERR: fn GreaterOrEquivalent(self, other: Other) -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+4]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] -// CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { +fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { x < y; x <= y; x > y; @@ -318,7 +318,7 @@ struct LessNonConst { }; '''; -fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { +fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { x < y; x <= y; x > y; @@ -336,8 +336,8 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDERR: OrderedWith(missing_less, missing_less); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-17]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: OrderedWith(missing_less, missing_less); @@ -345,8 +345,8 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDERR: OrderedWith(missing_less_equal, missing_less_equal); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-26]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: OrderedWith(missing_less_equal, missing_less_equal); @@ -354,8 +354,8 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDERR: OrderedWith(missing_greater, missing_greater); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-35]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: OrderedWith(missing_greater, missing_greater); @@ -363,8 +363,8 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDERR: OrderedWith(missing_greater_equal, missing_greater_equal); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-44]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: OrderedWith(missing_greater_equal, missing_greater_equal); @@ -372,8 +372,8 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDERR: OrderedWith(no_relevant_members, no_relevant_members); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-53]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: OrderedWith(no_relevant_members, no_relevant_members); @@ -381,8 +381,8 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDERR: OrderedWith(less_returns_void, less_returns_void); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-62]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: OrderedWith(less_returns_void, less_returns_void); @@ -497,40 +497,40 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: %Core.import_ref.6c6 = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @OrderedWith.loc13(%U.loc13_17.2: type, %T.loc13_27.2: @OrderedWith.loc13.%OrderedWith.type.loc13_48.1 (%OrderedWith.type.32ae87.2)) { +// CHECK:STDOUT: generic fn @OrderedWith.loc13(%U.loc13_17.2: type, %T.loc13_26.2: @OrderedWith.loc13.%OrderedWith.type.loc13_46.1 (%OrderedWith.type.32ae87.2)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc15: = require_complete_type %OrderedWith.type.loc13_48.1 [symbolic = %require_complete.loc15 (constants.%require_complete.3c0)] +// CHECK:STDOUT: %require_complete.loc15: = require_complete_type %OrderedWith.type.loc13_46.1 [symbolic = %require_complete.loc15 (constants.%require_complete.3c0)] // CHECK:STDOUT: %OrderedWith.assoc_type: type = assoc_entity_type @OrderedWith.1, @OrderedWith.1(%U.loc13_17.1) [symbolic = %OrderedWith.assoc_type (constants.%OrderedWith.assoc_type.1d2e6f.2)] // CHECK:STDOUT: %assoc0: @OrderedWith.loc13.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = assoc_entity element0, imports.%Core.import_ref.e7a [symbolic = %assoc0 (constants.%assoc0.c0023b.2)] -// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%U.loc13_17.1, %T.loc13_27.1) [symbolic = %OrderedWith.WithSelf.Less.type (constants.%OrderedWith.WithSelf.Less.type.b87f4b.3)] -// CHECK:STDOUT: %.loc15_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type, %T.loc13_27.1 [symbolic = %.loc15_5.2 (constants.%.6ec)] -// CHECK:STDOUT: %OrderedWith.lookup_impl_witness: = lookup_impl_witness %T.loc13_27.1, @OrderedWith.1, @OrderedWith.1(%U.loc13_17.1) [symbolic = %OrderedWith.lookup_impl_witness (constants.%OrderedWith.lookup_impl_witness)] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%U.loc13_17.1, %T.loc13_26.1) [symbolic = %OrderedWith.WithSelf.Less.type (constants.%OrderedWith.WithSelf.Less.type.b87f4b.3)] +// CHECK:STDOUT: %.loc15_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type, %T.loc13_26.1 [symbolic = %.loc15_5.2 (constants.%.6ec)] +// CHECK:STDOUT: %OrderedWith.lookup_impl_witness: = lookup_impl_witness %T.loc13_26.1, @OrderedWith.1, @OrderedWith.1(%U.loc13_17.1) [symbolic = %OrderedWith.lookup_impl_witness (constants.%OrderedWith.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc15_5.2: @OrderedWith.loc13.%.loc15_5.2 (%.6ec) = impl_witness_access %OrderedWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_5.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc15_5.2: = specific_impl_function %impl.elem0.loc15_5.2, @OrderedWith.WithSelf.Less(%U.loc13_17.1, %T.loc13_27.1) [symbolic = %specific_impl_fn.loc15_5.2 (constants.%specific_impl_fn.527)] +// CHECK:STDOUT: %specific_impl_fn.loc15_5.2: = specific_impl_function %impl.elem0.loc15_5.2, @OrderedWith.WithSelf.Less(%U.loc13_17.1, %T.loc13_26.1) [symbolic = %specific_impl_fn.loc15_5.2 (constants.%specific_impl_fn.527)] // CHECK:STDOUT: %assoc1: @OrderedWith.loc13.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = assoc_entity element1, imports.%Core.import_ref.3f7 [symbolic = %assoc1 (constants.%assoc1.3efd77.2)] -// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%U.loc13_17.1, %T.loc13_27.1) [symbolic = %OrderedWith.WithSelf.LessOrEquivalent.type (constants.%OrderedWith.WithSelf.LessOrEquivalent.type.13d375.3)] -// CHECK:STDOUT: %.loc16_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type, %T.loc13_27.1 [symbolic = %.loc16_5.2 (constants.%.02d)] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%U.loc13_17.1, %T.loc13_26.1) [symbolic = %OrderedWith.WithSelf.LessOrEquivalent.type (constants.%OrderedWith.WithSelf.LessOrEquivalent.type.13d375.3)] +// CHECK:STDOUT: %.loc16_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type, %T.loc13_26.1 [symbolic = %.loc16_5.2 (constants.%.02d)] // CHECK:STDOUT: %impl.elem1.loc16_5.2: @OrderedWith.loc13.%.loc16_5.2 (%.02d) = impl_witness_access %OrderedWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc16_5.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc16_5.2: = specific_impl_function %impl.elem1.loc16_5.2, @OrderedWith.WithSelf.LessOrEquivalent(%U.loc13_17.1, %T.loc13_27.1) [symbolic = %specific_impl_fn.loc16_5.2 (constants.%specific_impl_fn.001)] +// CHECK:STDOUT: %specific_impl_fn.loc16_5.2: = specific_impl_function %impl.elem1.loc16_5.2, @OrderedWith.WithSelf.LessOrEquivalent(%U.loc13_17.1, %T.loc13_26.1) [symbolic = %specific_impl_fn.loc16_5.2 (constants.%specific_impl_fn.001)] // CHECK:STDOUT: %assoc2: @OrderedWith.loc13.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = assoc_entity element2, imports.%Core.import_ref.385 [symbolic = %assoc2 (constants.%assoc2.48eff0.2)] -// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%U.loc13_17.1, %T.loc13_27.1) [symbolic = %OrderedWith.WithSelf.Greater.type (constants.%OrderedWith.WithSelf.Greater.type.9ce25c.3)] -// CHECK:STDOUT: %.loc17_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type, %T.loc13_27.1 [symbolic = %.loc17_5.2 (constants.%.666)] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%U.loc13_17.1, %T.loc13_26.1) [symbolic = %OrderedWith.WithSelf.Greater.type (constants.%OrderedWith.WithSelf.Greater.type.9ce25c.3)] +// CHECK:STDOUT: %.loc17_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type, %T.loc13_26.1 [symbolic = %.loc17_5.2 (constants.%.666)] // CHECK:STDOUT: %impl.elem2.loc17_5.2: @OrderedWith.loc13.%.loc17_5.2 (%.666) = impl_witness_access %OrderedWith.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc17_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc17_5.2: = specific_impl_function %impl.elem2.loc17_5.2, @OrderedWith.WithSelf.Greater(%U.loc13_17.1, %T.loc13_27.1) [symbolic = %specific_impl_fn.loc17_5.2 (constants.%specific_impl_fn.735)] +// CHECK:STDOUT: %specific_impl_fn.loc17_5.2: = specific_impl_function %impl.elem2.loc17_5.2, @OrderedWith.WithSelf.Greater(%U.loc13_17.1, %T.loc13_26.1) [symbolic = %specific_impl_fn.loc17_5.2 (constants.%specific_impl_fn.735)] // CHECK:STDOUT: %assoc3: @OrderedWith.loc13.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = assoc_entity element3, imports.%Core.import_ref.39b [symbolic = %assoc3 (constants.%assoc3.5d53f7.2)] -// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%U.loc13_17.1, %T.loc13_27.1) [symbolic = %OrderedWith.WithSelf.GreaterOrEquivalent.type (constants.%OrderedWith.WithSelf.GreaterOrEquivalent.type.7dedb2.3)] -// CHECK:STDOUT: %.loc18_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type, %T.loc13_27.1 [symbolic = %.loc18_5.2 (constants.%.73b)] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%U.loc13_17.1, %T.loc13_26.1) [symbolic = %OrderedWith.WithSelf.GreaterOrEquivalent.type (constants.%OrderedWith.WithSelf.GreaterOrEquivalent.type.7dedb2.3)] +// CHECK:STDOUT: %.loc18_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type, %T.loc13_26.1 [symbolic = %.loc18_5.2 (constants.%.73b)] // CHECK:STDOUT: %impl.elem3.loc18_5.2: @OrderedWith.loc13.%.loc18_5.2 (%.73b) = impl_witness_access %OrderedWith.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc18_5.2 (constants.%impl.elem3)] -// CHECK:STDOUT: %specific_impl_fn.loc18_5.2: = specific_impl_function %impl.elem3.loc18_5.2, @OrderedWith.WithSelf.GreaterOrEquivalent(%U.loc13_17.1, %T.loc13_27.1) [symbolic = %specific_impl_fn.loc18_5.2 (constants.%specific_impl_fn.418)] +// CHECK:STDOUT: %specific_impl_fn.loc18_5.2: = specific_impl_function %impl.elem3.loc18_5.2, @OrderedWith.WithSelf.GreaterOrEquivalent(%U.loc13_17.1, %T.loc13_26.1) [symbolic = %specific_impl_fn.loc18_5.2 (constants.%specific_impl_fn.418)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @OrderedWith.loc13.%T.as_type.loc13_54.1 (%T.as_type), %y.param: @OrderedWith.loc13.%U.loc13_17.1 (%U)) { +// CHECK:STDOUT: fn(%x.param: @OrderedWith.loc13.%T.as_type.loc13_52.1 (%T.as_type), %y.param: @OrderedWith.loc13.%U.loc13_17.1 (%U)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref.loc15: @OrderedWith.loc13.%T.as_type.loc13_54.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc15: @OrderedWith.loc13.%T.as_type.loc13_52.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc15: @OrderedWith.loc13.%U.loc13_17.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %OrderedWith.type.loc15: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc13_48.1 (constants.%OrderedWith.type.32ae87.2)] +// CHECK:STDOUT: %OrderedWith.type.loc15: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc13_46.1 (constants.%OrderedWith.type.32ae87.2)] // CHECK:STDOUT: %.loc15_5.1: @OrderedWith.loc13.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = specific_constant imports.%Core.import_ref.ef7, @OrderedWith.WithSelf(constants.%U, constants.%Self.7df555.1) [symbolic = %assoc0 (constants.%assoc0.c0023b.2)] // CHECK:STDOUT: %Less.ref: @OrderedWith.loc13.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = name_ref Less, %.loc15_5.1 [symbolic = %assoc0 (constants.%assoc0.c0023b.2)] // CHECK:STDOUT: %impl.elem0.loc15_5.1: @OrderedWith.loc13.%.loc15_5.2 (%.6ec) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_5.2 (constants.%impl.elem0)] @@ -538,9 +538,9 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: %specific_impl_fn.loc15_5.1: = specific_impl_function %impl.elem0.loc15_5.1, @OrderedWith.WithSelf.Less(constants.%U, constants.%T) [symbolic = %specific_impl_fn.loc15_5.2 (constants.%specific_impl_fn.527)] // CHECK:STDOUT: %bound_method.loc15_5.2: = bound_method %x.ref.loc15, %specific_impl_fn.loc15_5.1 // CHECK:STDOUT: %OrderedWith.WithSelf.Less.call: init bool = call %bound_method.loc15_5.2(%x.ref.loc15, %y.ref.loc15) -// CHECK:STDOUT: %x.ref.loc16: @OrderedWith.loc13.%T.as_type.loc13_54.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc16: @OrderedWith.loc13.%T.as_type.loc13_52.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc16: @OrderedWith.loc13.%U.loc13_17.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %OrderedWith.type.loc16: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc13_48.1 (constants.%OrderedWith.type.32ae87.2)] +// CHECK:STDOUT: %OrderedWith.type.loc16: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc13_46.1 (constants.%OrderedWith.type.32ae87.2)] // CHECK:STDOUT: %.loc16_5.1: @OrderedWith.loc13.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = specific_constant imports.%Core.import_ref.878, @OrderedWith.WithSelf(constants.%U, constants.%Self.7df555.1) [symbolic = %assoc1 (constants.%assoc1.3efd77.2)] // CHECK:STDOUT: %LessOrEquivalent.ref: @OrderedWith.loc13.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = name_ref LessOrEquivalent, %.loc16_5.1 [symbolic = %assoc1 (constants.%assoc1.3efd77.2)] // CHECK:STDOUT: %impl.elem1.loc16_5.1: @OrderedWith.loc13.%.loc16_5.2 (%.02d) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc16_5.2 (constants.%impl.elem1)] @@ -548,9 +548,9 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: %specific_impl_fn.loc16_5.1: = specific_impl_function %impl.elem1.loc16_5.1, @OrderedWith.WithSelf.LessOrEquivalent(constants.%U, constants.%T) [symbolic = %specific_impl_fn.loc16_5.2 (constants.%specific_impl_fn.001)] // CHECK:STDOUT: %bound_method.loc16_5.2: = bound_method %x.ref.loc16, %specific_impl_fn.loc16_5.1 // CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.call: init bool = call %bound_method.loc16_5.2(%x.ref.loc16, %y.ref.loc16) -// CHECK:STDOUT: %x.ref.loc17: @OrderedWith.loc13.%T.as_type.loc13_54.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc17: @OrderedWith.loc13.%T.as_type.loc13_52.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc17: @OrderedWith.loc13.%U.loc13_17.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %OrderedWith.type.loc17: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc13_48.1 (constants.%OrderedWith.type.32ae87.2)] +// CHECK:STDOUT: %OrderedWith.type.loc17: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc13_46.1 (constants.%OrderedWith.type.32ae87.2)] // CHECK:STDOUT: %.loc17_5.1: @OrderedWith.loc13.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = specific_constant imports.%Core.import_ref.d4f, @OrderedWith.WithSelf(constants.%U, constants.%Self.7df555.1) [symbolic = %assoc2 (constants.%assoc2.48eff0.2)] // CHECK:STDOUT: %Greater.ref: @OrderedWith.loc13.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = name_ref Greater, %.loc17_5.1 [symbolic = %assoc2 (constants.%assoc2.48eff0.2)] // CHECK:STDOUT: %impl.elem2.loc17_5.1: @OrderedWith.loc13.%.loc17_5.2 (%.666) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc17_5.2 (constants.%impl.elem2)] @@ -558,9 +558,9 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: %specific_impl_fn.loc17_5.1: = specific_impl_function %impl.elem2.loc17_5.1, @OrderedWith.WithSelf.Greater(constants.%U, constants.%T) [symbolic = %specific_impl_fn.loc17_5.2 (constants.%specific_impl_fn.735)] // CHECK:STDOUT: %bound_method.loc17_5.2: = bound_method %x.ref.loc17, %specific_impl_fn.loc17_5.1 // CHECK:STDOUT: %OrderedWith.WithSelf.Greater.call: init bool = call %bound_method.loc17_5.2(%x.ref.loc17, %y.ref.loc17) -// CHECK:STDOUT: %x.ref.loc18: @OrderedWith.loc13.%T.as_type.loc13_54.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc18: @OrderedWith.loc13.%T.as_type.loc13_52.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc18: @OrderedWith.loc13.%U.loc13_17.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %OrderedWith.type.loc18: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc13_48.1 (constants.%OrderedWith.type.32ae87.2)] +// CHECK:STDOUT: %OrderedWith.type.loc18: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc13_46.1 (constants.%OrderedWith.type.32ae87.2)] // CHECK:STDOUT: %.loc18_5.1: @OrderedWith.loc13.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = specific_constant imports.%Core.import_ref.b87, @OrderedWith.WithSelf(constants.%U, constants.%Self.7df555.1) [symbolic = %assoc3 (constants.%assoc3.5d53f7.2)] // CHECK:STDOUT: %GreaterOrEquivalent.ref: @OrderedWith.loc13.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = name_ref GreaterOrEquivalent, %.loc18_5.1 [symbolic = %assoc3 (constants.%assoc3.5d53f7.2)] // CHECK:STDOUT: %impl.elem3.loc18_5.1: @OrderedWith.loc13.%.loc18_5.2 (%.73b) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc18_5.2 (constants.%impl.elem3)] @@ -577,37 +577,37 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: specific @OrderedWith.loc13(constants.%U, constants.%T) { // CHECK:STDOUT: %U.patt.loc13_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc13_17.1 => constants.%U -// CHECK:STDOUT: %OrderedWith.type.loc13_48.1 => constants.%OrderedWith.type.32ae87.2 -// CHECK:STDOUT: %pattern_type.loc13_27 => constants.%pattern_type.ebc -// CHECK:STDOUT: %T.patt.loc13_27.2 => constants.%T.patt.aaa -// CHECK:STDOUT: %T.loc13_27.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc13_54.1 => constants.%T.as_type -// CHECK:STDOUT: %pattern_type.loc13_52 => constants.%pattern_type.f6ec4f.2 -// CHECK:STDOUT: %x.param_patt.loc13_52.2 => constants.%x.param_patt.a58 -// CHECK:STDOUT: %x.patt.loc13_52.2 => constants.%x.patt.140 -// CHECK:STDOUT: %pattern_type.loc13_58 => constants.%pattern_type.51d1c4.2 -// CHECK:STDOUT: %y.param_patt.loc13_58.2 => constants.%y.param_patt.be3 -// CHECK:STDOUT: %y.patt.loc13_58.2 => constants.%y.patt.b85 +// CHECK:STDOUT: %OrderedWith.type.loc13_46.1 => constants.%OrderedWith.type.32ae87.2 +// CHECK:STDOUT: %pattern_type.loc13_26 => constants.%pattern_type.ebc +// CHECK:STDOUT: %T.patt.loc13_26.2 => constants.%T.patt.aaa +// CHECK:STDOUT: %T.loc13_26.1 => constants.%T +// CHECK:STDOUT: %T.as_type.loc13_52.1 => constants.%T.as_type +// CHECK:STDOUT: %pattern_type.loc13_50 => constants.%pattern_type.f6ec4f.2 +// CHECK:STDOUT: %x.param_patt.loc13_50.2 => constants.%x.param_patt.a58 +// CHECK:STDOUT: %x.patt.loc13_50.2 => constants.%x.patt.140 +// CHECK:STDOUT: %pattern_type.loc13_56 => constants.%pattern_type.51d1c4.2 +// CHECK:STDOUT: %y.param_patt.loc13_56.2 => constants.%y.param_patt.be3 +// CHECK:STDOUT: %y.patt.loc13_56.2 => constants.%y.patt.b85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @OrderedWith.loc13(constants.%Ordered, constants.%OrderedWith.facet.517) { // CHECK:STDOUT: %U.patt.loc13_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc13_17.1 => constants.%Ordered -// CHECK:STDOUT: %OrderedWith.type.loc13_48.1 => constants.%OrderedWith.type.39d -// CHECK:STDOUT: %pattern_type.loc13_27 => constants.%pattern_type.d57 -// CHECK:STDOUT: %T.patt.loc13_27.2 => constants.%T.patt.67e -// CHECK:STDOUT: %T.loc13_27.1 => constants.%OrderedWith.facet.517 -// CHECK:STDOUT: %T.as_type.loc13_54.1 => constants.%Ordered -// CHECK:STDOUT: %pattern_type.loc13_52 => constants.%pattern_type.e66 -// CHECK:STDOUT: %x.param_patt.loc13_52.2 => constants.%x.param_patt.e3d -// CHECK:STDOUT: %x.patt.loc13_52.2 => constants.%x.patt.51a -// CHECK:STDOUT: %pattern_type.loc13_58 => constants.%pattern_type.e66 -// CHECK:STDOUT: %y.param_patt.loc13_58.2 => constants.%y.param_patt.4a3 -// CHECK:STDOUT: %y.patt.loc13_58.2 => constants.%y.patt.397 +// CHECK:STDOUT: %OrderedWith.type.loc13_46.1 => constants.%OrderedWith.type.39d +// CHECK:STDOUT: %pattern_type.loc13_26 => constants.%pattern_type.d57 +// CHECK:STDOUT: %T.patt.loc13_26.2 => constants.%T.patt.67e +// CHECK:STDOUT: %T.loc13_26.1 => constants.%OrderedWith.facet.517 +// CHECK:STDOUT: %T.as_type.loc13_52.1 => constants.%Ordered +// CHECK:STDOUT: %pattern_type.loc13_50 => constants.%pattern_type.e66 +// CHECK:STDOUT: %x.param_patt.loc13_50.2 => constants.%x.param_patt.e3d +// CHECK:STDOUT: %x.patt.loc13_50.2 => constants.%x.patt.51a +// CHECK:STDOUT: %pattern_type.loc13_56 => constants.%pattern_type.e66 +// CHECK:STDOUT: %y.param_patt.loc13_56.2 => constants.%y.param_patt.4a3 +// CHECK:STDOUT: %y.patt.loc13_56.2 => constants.%y.patt.397 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc13_52 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc13_58 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc13_50 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc13_56 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc15 => constants.%complete_type.e48 // CHECK:STDOUT: %OrderedWith.assoc_type => constants.%OrderedWith.assoc_type.e83 // CHECK:STDOUT: %assoc0 => constants.%assoc0.621 @@ -875,40 +875,40 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: %Core.import_ref.6c6 = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @OrderedWith.loc54(%U.loc54_17.2: type, %T.loc54_27.2: @OrderedWith.loc54.%OrderedWith.type.loc54_48.1 (%OrderedWith.type.32ae87.2)) { +// CHECK:STDOUT: generic fn @OrderedWith.loc54(%U.loc54_17.2: type, %T.loc54_26.2: @OrderedWith.loc54.%OrderedWith.type.loc54_46.1 (%OrderedWith.type.32ae87.2)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc56: = require_complete_type %OrderedWith.type.loc54_48.1 [symbolic = %require_complete.loc56 (constants.%require_complete.3c0)] +// CHECK:STDOUT: %require_complete.loc56: = require_complete_type %OrderedWith.type.loc54_46.1 [symbolic = %require_complete.loc56 (constants.%require_complete.3c0)] // CHECK:STDOUT: %OrderedWith.assoc_type: type = assoc_entity_type @OrderedWith.1, @OrderedWith.1(%U.loc54_17.1) [symbolic = %OrderedWith.assoc_type (constants.%OrderedWith.assoc_type.1d2e6f.2)] // CHECK:STDOUT: %assoc0: @OrderedWith.loc54.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = assoc_entity element0, imports.%Core.import_ref.e7a [symbolic = %assoc0 (constants.%assoc0.c0023b.2)] -// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%U.loc54_17.1, %T.loc54_27.1) [symbolic = %OrderedWith.WithSelf.Less.type (constants.%OrderedWith.WithSelf.Less.type.b87f4b.3)] -// CHECK:STDOUT: %.loc56_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type, %T.loc54_27.1 [symbolic = %.loc56_5.2 (constants.%.6ec)] -// CHECK:STDOUT: %OrderedWith.lookup_impl_witness: = lookup_impl_witness %T.loc54_27.1, @OrderedWith.1, @OrderedWith.1(%U.loc54_17.1) [symbolic = %OrderedWith.lookup_impl_witness (constants.%OrderedWith.lookup_impl_witness)] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%U.loc54_17.1, %T.loc54_26.1) [symbolic = %OrderedWith.WithSelf.Less.type (constants.%OrderedWith.WithSelf.Less.type.b87f4b.3)] +// CHECK:STDOUT: %.loc56_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type, %T.loc54_26.1 [symbolic = %.loc56_5.2 (constants.%.6ec)] +// CHECK:STDOUT: %OrderedWith.lookup_impl_witness: = lookup_impl_witness %T.loc54_26.1, @OrderedWith.1, @OrderedWith.1(%U.loc54_17.1) [symbolic = %OrderedWith.lookup_impl_witness (constants.%OrderedWith.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc56_5.2: @OrderedWith.loc54.%.loc56_5.2 (%.6ec) = impl_witness_access %OrderedWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc56_5.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc56_5.2: = specific_impl_function %impl.elem0.loc56_5.2, @OrderedWith.WithSelf.Less(%U.loc54_17.1, %T.loc54_27.1) [symbolic = %specific_impl_fn.loc56_5.2 (constants.%specific_impl_fn.527)] +// CHECK:STDOUT: %specific_impl_fn.loc56_5.2: = specific_impl_function %impl.elem0.loc56_5.2, @OrderedWith.WithSelf.Less(%U.loc54_17.1, %T.loc54_26.1) [symbolic = %specific_impl_fn.loc56_5.2 (constants.%specific_impl_fn.527)] // CHECK:STDOUT: %assoc1: @OrderedWith.loc54.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = assoc_entity element1, imports.%Core.import_ref.3f7 [symbolic = %assoc1 (constants.%assoc1.3efd77.2)] -// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%U.loc54_17.1, %T.loc54_27.1) [symbolic = %OrderedWith.WithSelf.LessOrEquivalent.type (constants.%OrderedWith.WithSelf.LessOrEquivalent.type.13d375.3)] -// CHECK:STDOUT: %.loc57_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type, %T.loc54_27.1 [symbolic = %.loc57_5.2 (constants.%.02db)] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%U.loc54_17.1, %T.loc54_26.1) [symbolic = %OrderedWith.WithSelf.LessOrEquivalent.type (constants.%OrderedWith.WithSelf.LessOrEquivalent.type.13d375.3)] +// CHECK:STDOUT: %.loc57_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type, %T.loc54_26.1 [symbolic = %.loc57_5.2 (constants.%.02db)] // CHECK:STDOUT: %impl.elem1.loc57_5.2: @OrderedWith.loc54.%.loc57_5.2 (%.02db) = impl_witness_access %OrderedWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc57_5.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc57_5.2: = specific_impl_function %impl.elem1.loc57_5.2, @OrderedWith.WithSelf.LessOrEquivalent(%U.loc54_17.1, %T.loc54_27.1) [symbolic = %specific_impl_fn.loc57_5.2 (constants.%specific_impl_fn.001)] +// CHECK:STDOUT: %specific_impl_fn.loc57_5.2: = specific_impl_function %impl.elem1.loc57_5.2, @OrderedWith.WithSelf.LessOrEquivalent(%U.loc54_17.1, %T.loc54_26.1) [symbolic = %specific_impl_fn.loc57_5.2 (constants.%specific_impl_fn.001)] // CHECK:STDOUT: %assoc2: @OrderedWith.loc54.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = assoc_entity element2, imports.%Core.import_ref.385 [symbolic = %assoc2 (constants.%assoc2.48eff0.2)] -// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%U.loc54_17.1, %T.loc54_27.1) [symbolic = %OrderedWith.WithSelf.Greater.type (constants.%OrderedWith.WithSelf.Greater.type.9ce25c.3)] -// CHECK:STDOUT: %.loc58_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type, %T.loc54_27.1 [symbolic = %.loc58_5.2 (constants.%.666)] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%U.loc54_17.1, %T.loc54_26.1) [symbolic = %OrderedWith.WithSelf.Greater.type (constants.%OrderedWith.WithSelf.Greater.type.9ce25c.3)] +// CHECK:STDOUT: %.loc58_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type, %T.loc54_26.1 [symbolic = %.loc58_5.2 (constants.%.666)] // CHECK:STDOUT: %impl.elem2.loc58_5.2: @OrderedWith.loc54.%.loc58_5.2 (%.666) = impl_witness_access %OrderedWith.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc58_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc58_5.2: = specific_impl_function %impl.elem2.loc58_5.2, @OrderedWith.WithSelf.Greater(%U.loc54_17.1, %T.loc54_27.1) [symbolic = %specific_impl_fn.loc58_5.2 (constants.%specific_impl_fn.735)] +// CHECK:STDOUT: %specific_impl_fn.loc58_5.2: = specific_impl_function %impl.elem2.loc58_5.2, @OrderedWith.WithSelf.Greater(%U.loc54_17.1, %T.loc54_26.1) [symbolic = %specific_impl_fn.loc58_5.2 (constants.%specific_impl_fn.735)] // CHECK:STDOUT: %assoc3: @OrderedWith.loc54.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = assoc_entity element3, imports.%Core.import_ref.39b [symbolic = %assoc3 (constants.%assoc3.5d53f7.2)] -// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%U.loc54_17.1, %T.loc54_27.1) [symbolic = %OrderedWith.WithSelf.GreaterOrEquivalent.type (constants.%OrderedWith.WithSelf.GreaterOrEquivalent.type.7dedb2.3)] -// CHECK:STDOUT: %.loc59_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type, %T.loc54_27.1 [symbolic = %.loc59_5.2 (constants.%.73b)] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%U.loc54_17.1, %T.loc54_26.1) [symbolic = %OrderedWith.WithSelf.GreaterOrEquivalent.type (constants.%OrderedWith.WithSelf.GreaterOrEquivalent.type.7dedb2.3)] +// CHECK:STDOUT: %.loc59_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type, %T.loc54_26.1 [symbolic = %.loc59_5.2 (constants.%.73b)] // CHECK:STDOUT: %impl.elem3.loc59_5.2: @OrderedWith.loc54.%.loc59_5.2 (%.73b) = impl_witness_access %OrderedWith.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc59_5.2 (constants.%impl.elem3)] -// CHECK:STDOUT: %specific_impl_fn.loc59_5.2: = specific_impl_function %impl.elem3.loc59_5.2, @OrderedWith.WithSelf.GreaterOrEquivalent(%U.loc54_17.1, %T.loc54_27.1) [symbolic = %specific_impl_fn.loc59_5.2 (constants.%specific_impl_fn.418)] +// CHECK:STDOUT: %specific_impl_fn.loc59_5.2: = specific_impl_function %impl.elem3.loc59_5.2, @OrderedWith.WithSelf.GreaterOrEquivalent(%U.loc54_17.1, %T.loc54_26.1) [symbolic = %specific_impl_fn.loc59_5.2 (constants.%specific_impl_fn.418)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @OrderedWith.loc54.%T.as_type.loc54_54.1 (%T.as_type), %y.param: @OrderedWith.loc54.%U.loc54_17.1 (%U)) { +// CHECK:STDOUT: fn(%x.param: @OrderedWith.loc54.%T.as_type.loc54_52.1 (%T.as_type), %y.param: @OrderedWith.loc54.%U.loc54_17.1 (%U)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref.loc56: @OrderedWith.loc54.%T.as_type.loc54_54.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc56: @OrderedWith.loc54.%T.as_type.loc54_52.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc56: @OrderedWith.loc54.%U.loc54_17.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %OrderedWith.type.loc56: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc54_48.1 (constants.%OrderedWith.type.32ae87.2)] +// CHECK:STDOUT: %OrderedWith.type.loc56: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc54_46.1 (constants.%OrderedWith.type.32ae87.2)] // CHECK:STDOUT: %.loc56_5.1: @OrderedWith.loc54.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = specific_constant imports.%Core.import_ref.ef7, @OrderedWith.WithSelf(constants.%U, constants.%Self.7df555.1) [symbolic = %assoc0 (constants.%assoc0.c0023b.2)] // CHECK:STDOUT: %Less.ref: @OrderedWith.loc54.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = name_ref Less, %.loc56_5.1 [symbolic = %assoc0 (constants.%assoc0.c0023b.2)] // CHECK:STDOUT: %impl.elem0.loc56_5.1: @OrderedWith.loc54.%.loc56_5.2 (%.6ec) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc56_5.2 (constants.%impl.elem0)] @@ -916,9 +916,9 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: %specific_impl_fn.loc56_5.1: = specific_impl_function %impl.elem0.loc56_5.1, @OrderedWith.WithSelf.Less(constants.%U, constants.%T) [symbolic = %specific_impl_fn.loc56_5.2 (constants.%specific_impl_fn.527)] // CHECK:STDOUT: %bound_method.loc56_5.2: = bound_method %x.ref.loc56, %specific_impl_fn.loc56_5.1 // CHECK:STDOUT: %OrderedWith.WithSelf.Less.call: init bool = call %bound_method.loc56_5.2(%x.ref.loc56, %y.ref.loc56) -// CHECK:STDOUT: %x.ref.loc57: @OrderedWith.loc54.%T.as_type.loc54_54.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc57: @OrderedWith.loc54.%T.as_type.loc54_52.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc57: @OrderedWith.loc54.%U.loc54_17.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %OrderedWith.type.loc57: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc54_48.1 (constants.%OrderedWith.type.32ae87.2)] +// CHECK:STDOUT: %OrderedWith.type.loc57: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc54_46.1 (constants.%OrderedWith.type.32ae87.2)] // CHECK:STDOUT: %.loc57_5.1: @OrderedWith.loc54.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = specific_constant imports.%Core.import_ref.878, @OrderedWith.WithSelf(constants.%U, constants.%Self.7df555.1) [symbolic = %assoc1 (constants.%assoc1.3efd77.2)] // CHECK:STDOUT: %LessOrEquivalent.ref: @OrderedWith.loc54.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = name_ref LessOrEquivalent, %.loc57_5.1 [symbolic = %assoc1 (constants.%assoc1.3efd77.2)] // CHECK:STDOUT: %impl.elem1.loc57_5.1: @OrderedWith.loc54.%.loc57_5.2 (%.02db) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc57_5.2 (constants.%impl.elem1)] @@ -926,9 +926,9 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: %specific_impl_fn.loc57_5.1: = specific_impl_function %impl.elem1.loc57_5.1, @OrderedWith.WithSelf.LessOrEquivalent(constants.%U, constants.%T) [symbolic = %specific_impl_fn.loc57_5.2 (constants.%specific_impl_fn.001)] // CHECK:STDOUT: %bound_method.loc57_5.2: = bound_method %x.ref.loc57, %specific_impl_fn.loc57_5.1 // CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.call: init bool = call %bound_method.loc57_5.2(%x.ref.loc57, %y.ref.loc57) -// CHECK:STDOUT: %x.ref.loc58: @OrderedWith.loc54.%T.as_type.loc54_54.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc58: @OrderedWith.loc54.%T.as_type.loc54_52.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc58: @OrderedWith.loc54.%U.loc54_17.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %OrderedWith.type.loc58: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc54_48.1 (constants.%OrderedWith.type.32ae87.2)] +// CHECK:STDOUT: %OrderedWith.type.loc58: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc54_46.1 (constants.%OrderedWith.type.32ae87.2)] // CHECK:STDOUT: %.loc58_5.1: @OrderedWith.loc54.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = specific_constant imports.%Core.import_ref.d4f, @OrderedWith.WithSelf(constants.%U, constants.%Self.7df555.1) [symbolic = %assoc2 (constants.%assoc2.48eff0.2)] // CHECK:STDOUT: %Greater.ref: @OrderedWith.loc54.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = name_ref Greater, %.loc58_5.1 [symbolic = %assoc2 (constants.%assoc2.48eff0.2)] // CHECK:STDOUT: %impl.elem2.loc58_5.1: @OrderedWith.loc54.%.loc58_5.2 (%.666) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc58_5.2 (constants.%impl.elem2)] @@ -936,9 +936,9 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: %specific_impl_fn.loc58_5.1: = specific_impl_function %impl.elem2.loc58_5.1, @OrderedWith.WithSelf.Greater(constants.%U, constants.%T) [symbolic = %specific_impl_fn.loc58_5.2 (constants.%specific_impl_fn.735)] // CHECK:STDOUT: %bound_method.loc58_5.2: = bound_method %x.ref.loc58, %specific_impl_fn.loc58_5.1 // CHECK:STDOUT: %OrderedWith.WithSelf.Greater.call: init bool = call %bound_method.loc58_5.2(%x.ref.loc58, %y.ref.loc58) -// CHECK:STDOUT: %x.ref.loc59: @OrderedWith.loc54.%T.as_type.loc54_54.1 (%T.as_type) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc59: @OrderedWith.loc54.%T.as_type.loc54_52.1 (%T.as_type) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc59: @OrderedWith.loc54.%U.loc54_17.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %OrderedWith.type.loc59: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc54_48.1 (constants.%OrderedWith.type.32ae87.2)] +// CHECK:STDOUT: %OrderedWith.type.loc59: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc54_46.1 (constants.%OrderedWith.type.32ae87.2)] // CHECK:STDOUT: %.loc59_5.1: @OrderedWith.loc54.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = specific_constant imports.%Core.import_ref.b87, @OrderedWith.WithSelf(constants.%U, constants.%Self.7df555.1) [symbolic = %assoc3 (constants.%assoc3.5d53f7.2)] // CHECK:STDOUT: %GreaterOrEquivalent.ref: @OrderedWith.loc54.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = name_ref GreaterOrEquivalent, %.loc59_5.1 [symbolic = %assoc3 (constants.%assoc3.5d53f7.2)] // CHECK:STDOUT: %impl.elem3.loc59_5.1: @OrderedWith.loc54.%.loc59_5.2 (%.73b) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc59_5.2 (constants.%impl.elem3)] @@ -955,37 +955,37 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: specific @OrderedWith.loc54(constants.%U, constants.%T) { // CHECK:STDOUT: %U.patt.loc54_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc54_17.1 => constants.%U -// CHECK:STDOUT: %OrderedWith.type.loc54_48.1 => constants.%OrderedWith.type.32ae87.2 -// CHECK:STDOUT: %pattern_type.loc54_27 => constants.%pattern_type.ebc -// CHECK:STDOUT: %T.patt.loc54_27.2 => constants.%T.patt.aaa -// CHECK:STDOUT: %T.loc54_27.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc54_54.1 => constants.%T.as_type -// CHECK:STDOUT: %pattern_type.loc54_52 => constants.%pattern_type.f6ec4f.2 -// CHECK:STDOUT: %x.param_patt.loc54_52.2 => constants.%x.param_patt.a58 -// CHECK:STDOUT: %x.patt.loc54_52.2 => constants.%x.patt.140 -// CHECK:STDOUT: %pattern_type.loc54_58 => constants.%pattern_type.51d1c4.2 -// CHECK:STDOUT: %y.param_patt.loc54_58.2 => constants.%y.param_patt.be3 -// CHECK:STDOUT: %y.patt.loc54_58.2 => constants.%y.patt.b85 +// CHECK:STDOUT: %OrderedWith.type.loc54_46.1 => constants.%OrderedWith.type.32ae87.2 +// CHECK:STDOUT: %pattern_type.loc54_26 => constants.%pattern_type.ebc +// CHECK:STDOUT: %T.patt.loc54_26.2 => constants.%T.patt.aaa +// CHECK:STDOUT: %T.loc54_26.1 => constants.%T +// CHECK:STDOUT: %T.as_type.loc54_52.1 => constants.%T.as_type +// CHECK:STDOUT: %pattern_type.loc54_50 => constants.%pattern_type.f6ec4f.2 +// CHECK:STDOUT: %x.param_patt.loc54_50.2 => constants.%x.param_patt.a58 +// CHECK:STDOUT: %x.patt.loc54_50.2 => constants.%x.patt.140 +// CHECK:STDOUT: %pattern_type.loc54_56 => constants.%pattern_type.51d1c4.2 +// CHECK:STDOUT: %y.param_patt.loc54_56.2 => constants.%y.param_patt.be3 +// CHECK:STDOUT: %y.patt.loc54_56.2 => constants.%y.patt.b85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @OrderedWith.loc54(constants.%B1, constants.%OrderedWith.facet.370) { // CHECK:STDOUT: %U.patt.loc54_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc54_17.1 => constants.%B1 -// CHECK:STDOUT: %OrderedWith.type.loc54_48.1 => constants.%OrderedWith.type.4d9 -// CHECK:STDOUT: %pattern_type.loc54_27 => constants.%pattern_type.53b -// CHECK:STDOUT: %T.patt.loc54_27.2 => constants.%T.patt.8c1 -// CHECK:STDOUT: %T.loc54_27.1 => constants.%OrderedWith.facet.370 -// CHECK:STDOUT: %T.as_type.loc54_54.1 => constants.%A1 -// CHECK:STDOUT: %pattern_type.loc54_52 => constants.%pattern_type.3b4 -// CHECK:STDOUT: %x.param_patt.loc54_52.2 => constants.%x.param_patt.c7f -// CHECK:STDOUT: %x.patt.loc54_52.2 => constants.%x.patt.4ff -// CHECK:STDOUT: %pattern_type.loc54_58 => constants.%pattern_type.5b2 -// CHECK:STDOUT: %y.param_patt.loc54_58.2 => constants.%y.param_patt.9d7 -// CHECK:STDOUT: %y.patt.loc54_58.2 => constants.%y.patt.979 +// CHECK:STDOUT: %OrderedWith.type.loc54_46.1 => constants.%OrderedWith.type.4d9 +// CHECK:STDOUT: %pattern_type.loc54_26 => constants.%pattern_type.53b +// CHECK:STDOUT: %T.patt.loc54_26.2 => constants.%T.patt.8c1 +// CHECK:STDOUT: %T.loc54_26.1 => constants.%OrderedWith.facet.370 +// CHECK:STDOUT: %T.as_type.loc54_52.1 => constants.%A1 +// CHECK:STDOUT: %pattern_type.loc54_50 => constants.%pattern_type.3b4 +// CHECK:STDOUT: %x.param_patt.loc54_50.2 => constants.%x.param_patt.c7f +// CHECK:STDOUT: %x.patt.loc54_50.2 => constants.%x.patt.4ff +// CHECK:STDOUT: %pattern_type.loc54_56 => constants.%pattern_type.5b2 +// CHECK:STDOUT: %y.param_patt.loc54_56.2 => constants.%y.param_patt.9d7 +// CHECK:STDOUT: %y.patt.loc54_56.2 => constants.%y.patt.979 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc54_52 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc54_58 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc54_50 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc54_56 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc56 => constants.%complete_type.f5b // CHECK:STDOUT: %OrderedWith.assoc_type => constants.%OrderedWith.assoc_type.993 // CHECK:STDOUT: %assoc0 => constants.%assoc0.9a4 @@ -1014,21 +1014,21 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: specific @OrderedWith.loc54(constants.%A1, constants.%OrderedWith.facet.288) { // CHECK:STDOUT: %U.patt.loc54_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc54_17.1 => constants.%A1 -// CHECK:STDOUT: %OrderedWith.type.loc54_48.1 => constants.%OrderedWith.type.fe8 -// CHECK:STDOUT: %pattern_type.loc54_27 => constants.%pattern_type.280 -// CHECK:STDOUT: %T.patt.loc54_27.2 => constants.%T.patt.5de -// CHECK:STDOUT: %T.loc54_27.1 => constants.%OrderedWith.facet.288 -// CHECK:STDOUT: %T.as_type.loc54_54.1 => constants.%B1 -// CHECK:STDOUT: %pattern_type.loc54_52 => constants.%pattern_type.5b2 -// CHECK:STDOUT: %x.param_patt.loc54_52.2 => constants.%x.param_patt.bff -// CHECK:STDOUT: %x.patt.loc54_52.2 => constants.%x.patt.f3d -// CHECK:STDOUT: %pattern_type.loc54_58 => constants.%pattern_type.3b4 -// CHECK:STDOUT: %y.param_patt.loc54_58.2 => constants.%y.param_patt.257 -// CHECK:STDOUT: %y.patt.loc54_58.2 => constants.%y.patt.774 +// CHECK:STDOUT: %OrderedWith.type.loc54_46.1 => constants.%OrderedWith.type.fe8 +// CHECK:STDOUT: %pattern_type.loc54_26 => constants.%pattern_type.280 +// CHECK:STDOUT: %T.patt.loc54_26.2 => constants.%T.patt.5de +// CHECK:STDOUT: %T.loc54_26.1 => constants.%OrderedWith.facet.288 +// CHECK:STDOUT: %T.as_type.loc54_52.1 => constants.%B1 +// CHECK:STDOUT: %pattern_type.loc54_50 => constants.%pattern_type.5b2 +// CHECK:STDOUT: %x.param_patt.loc54_50.2 => constants.%x.param_patt.bff +// CHECK:STDOUT: %x.patt.loc54_50.2 => constants.%x.patt.f3d +// CHECK:STDOUT: %pattern_type.loc54_56 => constants.%pattern_type.3b4 +// CHECK:STDOUT: %y.param_patt.loc54_56.2 => constants.%y.param_patt.257 +// CHECK:STDOUT: %y.patt.loc54_56.2 => constants.%y.patt.774 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc54_52 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc54_58 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc54_50 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc54_56 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc56 => constants.%complete_type.9ae // CHECK:STDOUT: %OrderedWith.assoc_type => constants.%OrderedWith.assoc_type.31d // CHECK:STDOUT: %assoc0 => constants.%assoc0.a34 @@ -1057,21 +1057,21 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: specific @OrderedWith.loc54(constants.%A2, constants.%OrderedWith.facet.2ea) { // CHECK:STDOUT: %U.patt.loc54_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc54_17.1 => constants.%A2 -// CHECK:STDOUT: %OrderedWith.type.loc54_48.1 => constants.%OrderedWith.type.9ee -// CHECK:STDOUT: %pattern_type.loc54_27 => constants.%pattern_type.a96 -// CHECK:STDOUT: %T.patt.loc54_27.2 => constants.%T.patt.e0a -// CHECK:STDOUT: %T.loc54_27.1 => constants.%OrderedWith.facet.2ea -// CHECK:STDOUT: %T.as_type.loc54_54.1 => constants.%B2 -// CHECK:STDOUT: %pattern_type.loc54_52 => constants.%pattern_type.d1e -// CHECK:STDOUT: %x.param_patt.loc54_52.2 => constants.%x.param_patt.0e6 -// CHECK:STDOUT: %x.patt.loc54_52.2 => constants.%x.patt.94e -// CHECK:STDOUT: %pattern_type.loc54_58 => constants.%pattern_type.9f0 -// CHECK:STDOUT: %y.param_patt.loc54_58.2 => constants.%y.param_patt.a4f -// CHECK:STDOUT: %y.patt.loc54_58.2 => constants.%y.patt.912 +// CHECK:STDOUT: %OrderedWith.type.loc54_46.1 => constants.%OrderedWith.type.9ee +// CHECK:STDOUT: %pattern_type.loc54_26 => constants.%pattern_type.a96 +// CHECK:STDOUT: %T.patt.loc54_26.2 => constants.%T.patt.e0a +// CHECK:STDOUT: %T.loc54_26.1 => constants.%OrderedWith.facet.2ea +// CHECK:STDOUT: %T.as_type.loc54_52.1 => constants.%B2 +// CHECK:STDOUT: %pattern_type.loc54_50 => constants.%pattern_type.d1e +// CHECK:STDOUT: %x.param_patt.loc54_50.2 => constants.%x.param_patt.0e6 +// CHECK:STDOUT: %x.patt.loc54_50.2 => constants.%x.patt.94e +// CHECK:STDOUT: %pattern_type.loc54_56 => constants.%pattern_type.9f0 +// CHECK:STDOUT: %y.param_patt.loc54_56.2 => constants.%y.param_patt.a4f +// CHECK:STDOUT: %y.patt.loc54_56.2 => constants.%y.patt.912 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc54_52 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc54_58 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc54_50 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc54_56 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc56 => constants.%complete_type.674 // CHECK:STDOUT: %OrderedWith.assoc_type => constants.%OrderedWith.assoc_type.941 // CHECK:STDOUT: %assoc0 => constants.%assoc0.73a @@ -1100,21 +1100,21 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: specific @OrderedWith.loc54(constants.%B3, constants.%OrderedWith.facet.d6b) { // CHECK:STDOUT: %U.patt.loc54_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc54_17.1 => constants.%B3 -// CHECK:STDOUT: %OrderedWith.type.loc54_48.1 => constants.%OrderedWith.type.cc8 -// CHECK:STDOUT: %pattern_type.loc54_27 => constants.%pattern_type.edf -// CHECK:STDOUT: %T.patt.loc54_27.2 => constants.%T.patt.8a7 -// CHECK:STDOUT: %T.loc54_27.1 => constants.%OrderedWith.facet.d6b -// CHECK:STDOUT: %T.as_type.loc54_54.1 => constants.%A3 -// CHECK:STDOUT: %pattern_type.loc54_52 => constants.%pattern_type.7fe -// CHECK:STDOUT: %x.param_patt.loc54_52.2 => constants.%x.param_patt.429 -// CHECK:STDOUT: %x.patt.loc54_52.2 => constants.%x.patt.6e2 -// CHECK:STDOUT: %pattern_type.loc54_58 => constants.%pattern_type.2dd -// CHECK:STDOUT: %y.param_patt.loc54_58.2 => constants.%y.param_patt.b51 -// CHECK:STDOUT: %y.patt.loc54_58.2 => constants.%y.patt.7b8 +// CHECK:STDOUT: %OrderedWith.type.loc54_46.1 => constants.%OrderedWith.type.cc8 +// CHECK:STDOUT: %pattern_type.loc54_26 => constants.%pattern_type.edf +// CHECK:STDOUT: %T.patt.loc54_26.2 => constants.%T.patt.8a7 +// CHECK:STDOUT: %T.loc54_26.1 => constants.%OrderedWith.facet.d6b +// CHECK:STDOUT: %T.as_type.loc54_52.1 => constants.%A3 +// CHECK:STDOUT: %pattern_type.loc54_50 => constants.%pattern_type.7fe +// CHECK:STDOUT: %x.param_patt.loc54_50.2 => constants.%x.param_patt.429 +// CHECK:STDOUT: %x.patt.loc54_50.2 => constants.%x.patt.6e2 +// CHECK:STDOUT: %pattern_type.loc54_56 => constants.%pattern_type.2dd +// CHECK:STDOUT: %y.param_patt.loc54_56.2 => constants.%y.param_patt.b51 +// CHECK:STDOUT: %y.patt.loc54_56.2 => constants.%y.patt.7b8 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc54_52 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc54_58 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc54_50 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc54_56 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc56 => constants.%complete_type.672 // CHECK:STDOUT: %OrderedWith.assoc_type => constants.%OrderedWith.assoc_type.45f // CHECK:STDOUT: %assoc0 => constants.%assoc0.2c4 @@ -1143,21 +1143,21 @@ fn Test(missing_less: Cpp.MissingLess, // CHECK:STDOUT: specific @OrderedWith.loc54(constants.%A3, constants.%OrderedWith.facet.52f) { // CHECK:STDOUT: %U.patt.loc54_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc54_17.1 => constants.%A3 -// CHECK:STDOUT: %OrderedWith.type.loc54_48.1 => constants.%OrderedWith.type.30a -// CHECK:STDOUT: %pattern_type.loc54_27 => constants.%pattern_type.5db -// CHECK:STDOUT: %T.patt.loc54_27.2 => constants.%T.patt.36b -// CHECK:STDOUT: %T.loc54_27.1 => constants.%OrderedWith.facet.52f -// CHECK:STDOUT: %T.as_type.loc54_54.1 => constants.%B3 -// CHECK:STDOUT: %pattern_type.loc54_52 => constants.%pattern_type.2dd -// CHECK:STDOUT: %x.param_patt.loc54_52.2 => constants.%x.param_patt.074 -// CHECK:STDOUT: %x.patt.loc54_52.2 => constants.%x.patt.234 -// CHECK:STDOUT: %pattern_type.loc54_58 => constants.%pattern_type.7fe -// CHECK:STDOUT: %y.param_patt.loc54_58.2 => constants.%y.param_patt.d86 -// CHECK:STDOUT: %y.patt.loc54_58.2 => constants.%y.patt.fd9 +// CHECK:STDOUT: %OrderedWith.type.loc54_46.1 => constants.%OrderedWith.type.30a +// CHECK:STDOUT: %pattern_type.loc54_26 => constants.%pattern_type.5db +// CHECK:STDOUT: %T.patt.loc54_26.2 => constants.%T.patt.36b +// CHECK:STDOUT: %T.loc54_26.1 => constants.%OrderedWith.facet.52f +// CHECK:STDOUT: %T.as_type.loc54_52.1 => constants.%B3 +// CHECK:STDOUT: %pattern_type.loc54_50 => constants.%pattern_type.2dd +// CHECK:STDOUT: %x.param_patt.loc54_50.2 => constants.%x.param_patt.074 +// CHECK:STDOUT: %x.patt.loc54_50.2 => constants.%x.patt.234 +// CHECK:STDOUT: %pattern_type.loc54_56 => constants.%pattern_type.7fe +// CHECK:STDOUT: %y.param_patt.loc54_56.2 => constants.%y.param_patt.d86 +// CHECK:STDOUT: %y.patt.loc54_56.2 => constants.%y.patt.fd9 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc54_52 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc54_58 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc54_50 => constants.%complete_type.357 +// CHECK:STDOUT: %require_complete.loc54_56 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc56 => constants.%complete_type.04a // CHECK:STDOUT: %OrderedWith.assoc_type => constants.%OrderedWith.assoc_type.18e // CHECK:STDOUT: %assoc0 => constants.%assoc0.d97 diff --git a/toolchain/check/testdata/interop/cpp/operators/spaceship.carbon b/toolchain/check/testdata/interop/cpp/operators/spaceship.carbon index 9d79f0928983..93f4a5ec62a3 100644 --- a/toolchain/check/testdata/interop/cpp/operators/spaceship.carbon +++ b/toolchain/check/testdata/interop/cpp/operators/spaceship.carbon @@ -130,14 +130,14 @@ struct CrossTypeRhs { import Cpp library "three_way_comparable_types.h"; -fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { +fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { //@dump-sem-ir-begin x == y; x != y; //@dump-sem-ir-end } -fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { +fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { //@dump-sem-ir-begin x < y; x <= y; @@ -156,8 +156,8 @@ fn Test(default_spaceship_only: Cpp.DefaultSpaceshipOnly, // CHECK:STDERR: EqWith(default_spaceship_only, default_spaceship_only); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-25]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EqWith(default_spaceship_only, default_spaceship_only); @@ -165,40 +165,40 @@ fn Test(default_spaceship_only: Cpp.DefaultSpaceshipOnly, // CHECK:STDERR: OrderedWith(default_spaceship_only, default_spaceship_only); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-27]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: OrderedWith(default_spaceship_only, default_spaceship_only); // CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE+7]]:3: error: semantics TODO: `Rewriting operator< using operator<=> is not supported` [SemanticsTodo] // CHECK:STDERR: OrderedWith(returns_strong_ordering, returns_strong_ordering); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-35]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: OrderedWith(returns_strong_ordering, returns_strong_ordering); // CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE+7]]:3: error: semantics TODO: `Rewriting operator< using operator<=> is not supported` [SemanticsTodo] // CHECK:STDERR: OrderedWith(returns_partial_ordering, returns_partial_ordering); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-43]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: OrderedWith(returns_partial_ordering, returns_partial_ordering); // CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE+7]]:3: error: semantics TODO: `Rewriting operator< using operator<=> is not supported` [SemanticsTodo] // CHECK:STDERR: OrderedWith(cross_type_lhs, cross_type_rhs); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-51]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: OrderedWith(cross_type_lhs, cross_type_rhs); // CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE+11]]:3: error: semantics TODO: `Rewriting operator< using operator<=> is not supported` [SemanticsTodo] // CHECK:STDERR: OrderedWith(cross_type_rhs, cross_type_lhs); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-59]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn OrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-52]]:9: warning: binding `returns_weak_ordering` unused [UnusedBinding] // CHECK:STDERR: returns_weak_ordering: Cpp.ReturnsWeakOrdering, @@ -213,15 +213,15 @@ fn Test(default_spaceship_only: Cpp.DefaultSpaceshipOnly, import Cpp library "three_way_comparable_types.h"; -fn EqWith[U:! type, T:! Core.EqWith(U)](unused x: T, unused y: U) {} +fn EqWith[U: type, T: Core.EqWith(U)](unused x: T, unused y: U) {} fn Test(returns_strong_ordering: Cpp.ReturnsStrongOrdering) { // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.ReturnsStrongOrdering` into type implementing `Core.EqWith(Cpp.ReturnsStrongOrdering)` [ConversionFailureTypeToFacet] // CHECK:STDERR: EqWith(returns_strong_ordering, returns_strong_ordering); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](unused x: T, unused y: U) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn EqWith[U: type, T: Core.EqWith(U)](unused x: T, unused y: U) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EqWith(returns_strong_ordering, returns_strong_ordering); } @@ -373,30 +373,30 @@ fn Test(returns_strong_ordering: Cpp.ReturnsStrongOrdering) { // CHECK:STDOUT: %Core.import_ref.6c6 = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @EqWith.loc4(%U.loc4_12.2: type, %T.loc4_22.2: @EqWith.loc4.%EqWith.type.loc4_38.1 (%EqWith.type.98ea86.2)) { +// CHECK:STDOUT: generic fn @EqWith.loc4(%U.loc4_12.2: type, %T.loc4_21.2: @EqWith.loc4.%EqWith.type.loc4_36.1 (%EqWith.type.98ea86.2)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc6: = require_complete_type %EqWith.type.loc4_38.1 [symbolic = %require_complete.loc6 (constants.%require_complete.fb5)] +// CHECK:STDOUT: %require_complete.loc6: = require_complete_type %EqWith.type.loc4_36.1 [symbolic = %require_complete.loc6 (constants.%require_complete.fb5)] // CHECK:STDOUT: %EqWith.assoc_type: type = assoc_entity_type @EqWith.1, @EqWith.1(%U.loc4_12.1) [symbolic = %EqWith.assoc_type (constants.%EqWith.assoc_type.85b122.2)] // CHECK:STDOUT: %assoc0: @EqWith.loc4.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = assoc_entity element0, imports.%Core.import_ref.5ba [symbolic = %assoc0 (constants.%assoc0.eee873.2)] -// CHECK:STDOUT: %EqWith.WithSelf.Equal.type: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%U.loc4_12.1, %T.loc4_22.1) [symbolic = %EqWith.WithSelf.Equal.type (constants.%EqWith.WithSelf.Equal.type.b82ec7.3)] -// CHECK:STDOUT: %.loc6_5.2: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type, %T.loc4_22.1 [symbolic = %.loc6_5.2 (constants.%.74c)] -// CHECK:STDOUT: %EqWith.lookup_impl_witness: = lookup_impl_witness %T.loc4_22.1, @EqWith.1, @EqWith.1(%U.loc4_12.1) [symbolic = %EqWith.lookup_impl_witness (constants.%EqWith.lookup_impl_witness)] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%U.loc4_12.1, %T.loc4_21.1) [symbolic = %EqWith.WithSelf.Equal.type (constants.%EqWith.WithSelf.Equal.type.b82ec7.3)] +// CHECK:STDOUT: %.loc6_5.2: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type, %T.loc4_21.1 [symbolic = %.loc6_5.2 (constants.%.74c)] +// CHECK:STDOUT: %EqWith.lookup_impl_witness: = lookup_impl_witness %T.loc4_21.1, @EqWith.1, @EqWith.1(%U.loc4_12.1) [symbolic = %EqWith.lookup_impl_witness (constants.%EqWith.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc6_5.2: @EqWith.loc4.%.loc6_5.2 (%.74c) = impl_witness_access %EqWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_5.2 (constants.%impl.elem0.cab)] -// CHECK:STDOUT: %specific_impl_fn.loc6_5.2: = specific_impl_function %impl.elem0.loc6_5.2, @EqWith.WithSelf.Equal(%U.loc4_12.1, %T.loc4_22.1) [symbolic = %specific_impl_fn.loc6_5.2 (constants.%specific_impl_fn.67a)] +// CHECK:STDOUT: %specific_impl_fn.loc6_5.2: = specific_impl_function %impl.elem0.loc6_5.2, @EqWith.WithSelf.Equal(%U.loc4_12.1, %T.loc4_21.1) [symbolic = %specific_impl_fn.loc6_5.2 (constants.%specific_impl_fn.67a)] // CHECK:STDOUT: %assoc1: @EqWith.loc4.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = assoc_entity element1, imports.%Core.import_ref.03f [symbolic = %assoc1 (constants.%assoc1.0ffc88.2)] -// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%U.loc4_12.1, %T.loc4_22.1) [symbolic = %EqWith.WithSelf.NotEqual.type (constants.%EqWith.WithSelf.NotEqual.type.c5b45a.3)] -// CHECK:STDOUT: %.loc7_5.2: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type, %T.loc4_22.1 [symbolic = %.loc7_5.2 (constants.%.8ed)] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%U.loc4_12.1, %T.loc4_21.1) [symbolic = %EqWith.WithSelf.NotEqual.type (constants.%EqWith.WithSelf.NotEqual.type.c5b45a.3)] +// CHECK:STDOUT: %.loc7_5.2: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type, %T.loc4_21.1 [symbolic = %.loc7_5.2 (constants.%.8ed)] // CHECK:STDOUT: %impl.elem1.loc7_5.2: @EqWith.loc4.%.loc7_5.2 (%.8ed) = impl_witness_access %EqWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc7_5.2 (constants.%impl.elem1.dab)] -// CHECK:STDOUT: %specific_impl_fn.loc7_5.2: = specific_impl_function %impl.elem1.loc7_5.2, @EqWith.WithSelf.NotEqual(%U.loc4_12.1, %T.loc4_22.1) [symbolic = %specific_impl_fn.loc7_5.2 (constants.%specific_impl_fn.81f)] +// CHECK:STDOUT: %specific_impl_fn.loc7_5.2: = specific_impl_function %impl.elem1.loc7_5.2, @EqWith.WithSelf.NotEqual(%U.loc4_12.1, %T.loc4_21.1) [symbolic = %specific_impl_fn.loc7_5.2 (constants.%specific_impl_fn.81f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @EqWith.loc4.%T.as_type.loc4_44.1 (%T.as_type.93d), %y.param: @EqWith.loc4.%U.loc4_12.1 (%U)) { +// CHECK:STDOUT: fn(%x.param: @EqWith.loc4.%T.as_type.loc4_42.1 (%T.as_type.93d), %y.param: @EqWith.loc4.%U.loc4_12.1 (%U)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref.loc6: @EqWith.loc4.%T.as_type.loc4_44.1 (%T.as_type.93d) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc6: @EqWith.loc4.%T.as_type.loc4_42.1 (%T.as_type.93d) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc6: @EqWith.loc4.%U.loc4_12.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %EqWith.type.loc6: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc4_38.1 (constants.%EqWith.type.98ea86.2)] +// CHECK:STDOUT: %EqWith.type.loc6: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc4_36.1 (constants.%EqWith.type.98ea86.2)] // CHECK:STDOUT: %.loc6_5.1: @EqWith.loc4.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = specific_constant imports.%Core.import_ref.725, @EqWith.WithSelf(constants.%U, constants.%Self.d94ae0.1) [symbolic = %assoc0 (constants.%assoc0.eee873.2)] // CHECK:STDOUT: %Equal.ref: @EqWith.loc4.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = name_ref Equal, %.loc6_5.1 [symbolic = %assoc0 (constants.%assoc0.eee873.2)] // CHECK:STDOUT: %impl.elem0.loc6_5.1: @EqWith.loc4.%.loc6_5.2 (%.74c) = impl_witness_access constants.%EqWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_5.2 (constants.%impl.elem0.cab)] @@ -404,9 +404,9 @@ fn Test(returns_strong_ordering: Cpp.ReturnsStrongOrdering) { // CHECK:STDOUT: %specific_impl_fn.loc6_5.1: = specific_impl_function %impl.elem0.loc6_5.1, @EqWith.WithSelf.Equal(constants.%U, constants.%T.d94) [symbolic = %specific_impl_fn.loc6_5.2 (constants.%specific_impl_fn.67a)] // CHECK:STDOUT: %bound_method.loc6_5.2: = bound_method %x.ref.loc6, %specific_impl_fn.loc6_5.1 // CHECK:STDOUT: %EqWith.WithSelf.Equal.call: init bool = call %bound_method.loc6_5.2(%x.ref.loc6, %y.ref.loc6) -// CHECK:STDOUT: %x.ref.loc7: @EqWith.loc4.%T.as_type.loc4_44.1 (%T.as_type.93d) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc7: @EqWith.loc4.%T.as_type.loc4_42.1 (%T.as_type.93d) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc7: @EqWith.loc4.%U.loc4_12.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %EqWith.type.loc7: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc4_38.1 (constants.%EqWith.type.98ea86.2)] +// CHECK:STDOUT: %EqWith.type.loc7: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc4_36.1 (constants.%EqWith.type.98ea86.2)] // CHECK:STDOUT: %.loc7_5.1: @EqWith.loc4.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = specific_constant imports.%Core.import_ref.8d7, @EqWith.WithSelf(constants.%U, constants.%Self.d94ae0.1) [symbolic = %assoc1 (constants.%assoc1.0ffc88.2)] // CHECK:STDOUT: %NotEqual.ref: @EqWith.loc4.%EqWith.assoc_type (%EqWith.assoc_type.85b122.2) = name_ref NotEqual, %.loc7_5.1 [symbolic = %assoc1 (constants.%assoc1.0ffc88.2)] // CHECK:STDOUT: %impl.elem1.loc7_5.1: @EqWith.loc4.%.loc7_5.2 (%.8ed) = impl_witness_access constants.%EqWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc7_5.2 (constants.%impl.elem1.dab)] @@ -420,40 +420,40 @@ fn Test(returns_strong_ordering: Cpp.ReturnsStrongOrdering) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @OrderedWith.loc11(%U.loc11_17.2: type, %T.loc11_27.2: @OrderedWith.loc11.%OrderedWith.type.loc11_48.1 (%OrderedWith.type.32ae87.2)) { +// CHECK:STDOUT: generic fn @OrderedWith.loc11(%U.loc11_17.2: type, %T.loc11_26.2: @OrderedWith.loc11.%OrderedWith.type.loc11_46.1 (%OrderedWith.type.32ae87.2)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc13: = require_complete_type %OrderedWith.type.loc11_48.1 [symbolic = %require_complete.loc13 (constants.%require_complete.3c0)] +// CHECK:STDOUT: %require_complete.loc13: = require_complete_type %OrderedWith.type.loc11_46.1 [symbolic = %require_complete.loc13 (constants.%require_complete.3c0)] // CHECK:STDOUT: %OrderedWith.assoc_type: type = assoc_entity_type @OrderedWith.1, @OrderedWith.1(%U.loc11_17.1) [symbolic = %OrderedWith.assoc_type (constants.%OrderedWith.assoc_type.1d2e6f.2)] // CHECK:STDOUT: %assoc0: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = assoc_entity element0, imports.%Core.import_ref.e7a [symbolic = %assoc0 (constants.%assoc0.c0023b.2)] -// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %OrderedWith.WithSelf.Less.type (constants.%OrderedWith.WithSelf.Less.type.b87f4b.3)] -// CHECK:STDOUT: %.loc13_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type, %T.loc11_27.1 [symbolic = %.loc13_5.2 (constants.%.6ec)] -// CHECK:STDOUT: %OrderedWith.lookup_impl_witness: = lookup_impl_witness %T.loc11_27.1, @OrderedWith.1, @OrderedWith.1(%U.loc11_17.1) [symbolic = %OrderedWith.lookup_impl_witness (constants.%OrderedWith.lookup_impl_witness)] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%U.loc11_17.1, %T.loc11_26.1) [symbolic = %OrderedWith.WithSelf.Less.type (constants.%OrderedWith.WithSelf.Less.type.b87f4b.3)] +// CHECK:STDOUT: %.loc13_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type, %T.loc11_26.1 [symbolic = %.loc13_5.2 (constants.%.6ec)] +// CHECK:STDOUT: %OrderedWith.lookup_impl_witness: = lookup_impl_witness %T.loc11_26.1, @OrderedWith.1, @OrderedWith.1(%U.loc11_17.1) [symbolic = %OrderedWith.lookup_impl_witness (constants.%OrderedWith.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc13_5.2: @OrderedWith.loc11.%.loc13_5.2 (%.6ec) = impl_witness_access %OrderedWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_5.2 (constants.%impl.elem0.6b1)] -// CHECK:STDOUT: %specific_impl_fn.loc13_5.2: = specific_impl_function %impl.elem0.loc13_5.2, @OrderedWith.WithSelf.Less(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %specific_impl_fn.loc13_5.2 (constants.%specific_impl_fn.527)] +// CHECK:STDOUT: %specific_impl_fn.loc13_5.2: = specific_impl_function %impl.elem0.loc13_5.2, @OrderedWith.WithSelf.Less(%U.loc11_17.1, %T.loc11_26.1) [symbolic = %specific_impl_fn.loc13_5.2 (constants.%specific_impl_fn.527)] // CHECK:STDOUT: %assoc1: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = assoc_entity element1, imports.%Core.import_ref.3f7 [symbolic = %assoc1 (constants.%assoc1.3efd77.2)] -// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %OrderedWith.WithSelf.LessOrEquivalent.type (constants.%OrderedWith.WithSelf.LessOrEquivalent.type.13d375.3)] -// CHECK:STDOUT: %.loc14_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type, %T.loc11_27.1 [symbolic = %.loc14_5.2 (constants.%.02d)] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%U.loc11_17.1, %T.loc11_26.1) [symbolic = %OrderedWith.WithSelf.LessOrEquivalent.type (constants.%OrderedWith.WithSelf.LessOrEquivalent.type.13d375.3)] +// CHECK:STDOUT: %.loc14_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type, %T.loc11_26.1 [symbolic = %.loc14_5.2 (constants.%.02d)] // CHECK:STDOUT: %impl.elem1.loc14_5.2: @OrderedWith.loc11.%.loc14_5.2 (%.02d) = impl_witness_access %OrderedWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc14_5.2 (constants.%impl.elem1.ff9)] -// CHECK:STDOUT: %specific_impl_fn.loc14_5.2: = specific_impl_function %impl.elem1.loc14_5.2, @OrderedWith.WithSelf.LessOrEquivalent(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %specific_impl_fn.loc14_5.2 (constants.%specific_impl_fn.001)] +// CHECK:STDOUT: %specific_impl_fn.loc14_5.2: = specific_impl_function %impl.elem1.loc14_5.2, @OrderedWith.WithSelf.LessOrEquivalent(%U.loc11_17.1, %T.loc11_26.1) [symbolic = %specific_impl_fn.loc14_5.2 (constants.%specific_impl_fn.001)] // CHECK:STDOUT: %assoc2: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = assoc_entity element2, imports.%Core.import_ref.385 [symbolic = %assoc2 (constants.%assoc2.48eff0.2)] -// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %OrderedWith.WithSelf.Greater.type (constants.%OrderedWith.WithSelf.Greater.type.9ce25c.3)] -// CHECK:STDOUT: %.loc15_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type, %T.loc11_27.1 [symbolic = %.loc15_5.2 (constants.%.666)] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%U.loc11_17.1, %T.loc11_26.1) [symbolic = %OrderedWith.WithSelf.Greater.type (constants.%OrderedWith.WithSelf.Greater.type.9ce25c.3)] +// CHECK:STDOUT: %.loc15_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type, %T.loc11_26.1 [symbolic = %.loc15_5.2 (constants.%.666)] // CHECK:STDOUT: %impl.elem2.loc15_5.2: @OrderedWith.loc11.%.loc15_5.2 (%.666) = impl_witness_access %OrderedWith.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc15_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc15_5.2: = specific_impl_function %impl.elem2.loc15_5.2, @OrderedWith.WithSelf.Greater(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %specific_impl_fn.loc15_5.2 (constants.%specific_impl_fn.735)] +// CHECK:STDOUT: %specific_impl_fn.loc15_5.2: = specific_impl_function %impl.elem2.loc15_5.2, @OrderedWith.WithSelf.Greater(%U.loc11_17.1, %T.loc11_26.1) [symbolic = %specific_impl_fn.loc15_5.2 (constants.%specific_impl_fn.735)] // CHECK:STDOUT: %assoc3: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = assoc_entity element3, imports.%Core.import_ref.39b [symbolic = %assoc3 (constants.%assoc3.5d53f7.2)] -// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %OrderedWith.WithSelf.GreaterOrEquivalent.type (constants.%OrderedWith.WithSelf.GreaterOrEquivalent.type.7dedb2.3)] -// CHECK:STDOUT: %.loc16_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type, %T.loc11_27.1 [symbolic = %.loc16_5.2 (constants.%.73b)] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%U.loc11_17.1, %T.loc11_26.1) [symbolic = %OrderedWith.WithSelf.GreaterOrEquivalent.type (constants.%OrderedWith.WithSelf.GreaterOrEquivalent.type.7dedb2.3)] +// CHECK:STDOUT: %.loc16_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type, %T.loc11_26.1 [symbolic = %.loc16_5.2 (constants.%.73b)] // CHECK:STDOUT: %impl.elem3.loc16_5.2: @OrderedWith.loc11.%.loc16_5.2 (%.73b) = impl_witness_access %OrderedWith.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc16_5.2 (constants.%impl.elem3)] -// CHECK:STDOUT: %specific_impl_fn.loc16_5.2: = specific_impl_function %impl.elem3.loc16_5.2, @OrderedWith.WithSelf.GreaterOrEquivalent(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %specific_impl_fn.loc16_5.2 (constants.%specific_impl_fn.418)] +// CHECK:STDOUT: %specific_impl_fn.loc16_5.2: = specific_impl_function %impl.elem3.loc16_5.2, @OrderedWith.WithSelf.GreaterOrEquivalent(%U.loc11_17.1, %T.loc11_26.1) [symbolic = %specific_impl_fn.loc16_5.2 (constants.%specific_impl_fn.418)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @OrderedWith.loc11.%T.as_type.loc11_54.1 (%T.as_type.262), %y.param: @OrderedWith.loc11.%U.loc11_17.1 (%U)) { +// CHECK:STDOUT: fn(%x.param: @OrderedWith.loc11.%T.as_type.loc11_52.1 (%T.as_type.262), %y.param: @OrderedWith.loc11.%U.loc11_17.1 (%U)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref.loc13: @OrderedWith.loc11.%T.as_type.loc11_54.1 (%T.as_type.262) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc13: @OrderedWith.loc11.%T.as_type.loc11_52.1 (%T.as_type.262) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc13: @OrderedWith.loc11.%U.loc11_17.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %OrderedWith.type.loc13: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc11_48.1 (constants.%OrderedWith.type.32ae87.2)] +// CHECK:STDOUT: %OrderedWith.type.loc13: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc11_46.1 (constants.%OrderedWith.type.32ae87.2)] // CHECK:STDOUT: %.loc13_5.1: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = specific_constant imports.%Core.import_ref.ef7, @OrderedWith.WithSelf(constants.%U, constants.%Self.7df555.1) [symbolic = %assoc0 (constants.%assoc0.c0023b.2)] // CHECK:STDOUT: %Less.ref: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = name_ref Less, %.loc13_5.1 [symbolic = %assoc0 (constants.%assoc0.c0023b.2)] // CHECK:STDOUT: %impl.elem0.loc13_5.1: @OrderedWith.loc11.%.loc13_5.2 (%.6ec) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_5.2 (constants.%impl.elem0.6b1)] @@ -461,9 +461,9 @@ fn Test(returns_strong_ordering: Cpp.ReturnsStrongOrdering) { // CHECK:STDOUT: %specific_impl_fn.loc13_5.1: = specific_impl_function %impl.elem0.loc13_5.1, @OrderedWith.WithSelf.Less(constants.%U, constants.%T.7df) [symbolic = %specific_impl_fn.loc13_5.2 (constants.%specific_impl_fn.527)] // CHECK:STDOUT: %bound_method.loc13_5.2: = bound_method %x.ref.loc13, %specific_impl_fn.loc13_5.1 // CHECK:STDOUT: %OrderedWith.WithSelf.Less.call: init bool = call %bound_method.loc13_5.2(%x.ref.loc13, %y.ref.loc13) -// CHECK:STDOUT: %x.ref.loc14: @OrderedWith.loc11.%T.as_type.loc11_54.1 (%T.as_type.262) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc14: @OrderedWith.loc11.%T.as_type.loc11_52.1 (%T.as_type.262) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc14: @OrderedWith.loc11.%U.loc11_17.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %OrderedWith.type.loc14: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc11_48.1 (constants.%OrderedWith.type.32ae87.2)] +// CHECK:STDOUT: %OrderedWith.type.loc14: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc11_46.1 (constants.%OrderedWith.type.32ae87.2)] // CHECK:STDOUT: %.loc14_5.1: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = specific_constant imports.%Core.import_ref.878, @OrderedWith.WithSelf(constants.%U, constants.%Self.7df555.1) [symbolic = %assoc1 (constants.%assoc1.3efd77.2)] // CHECK:STDOUT: %LessOrEquivalent.ref: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = name_ref LessOrEquivalent, %.loc14_5.1 [symbolic = %assoc1 (constants.%assoc1.3efd77.2)] // CHECK:STDOUT: %impl.elem1.loc14_5.1: @OrderedWith.loc11.%.loc14_5.2 (%.02d) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc14_5.2 (constants.%impl.elem1.ff9)] @@ -471,9 +471,9 @@ fn Test(returns_strong_ordering: Cpp.ReturnsStrongOrdering) { // CHECK:STDOUT: %specific_impl_fn.loc14_5.1: = specific_impl_function %impl.elem1.loc14_5.1, @OrderedWith.WithSelf.LessOrEquivalent(constants.%U, constants.%T.7df) [symbolic = %specific_impl_fn.loc14_5.2 (constants.%specific_impl_fn.001)] // CHECK:STDOUT: %bound_method.loc14_5.2: = bound_method %x.ref.loc14, %specific_impl_fn.loc14_5.1 // CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.call: init bool = call %bound_method.loc14_5.2(%x.ref.loc14, %y.ref.loc14) -// CHECK:STDOUT: %x.ref.loc15: @OrderedWith.loc11.%T.as_type.loc11_54.1 (%T.as_type.262) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc15: @OrderedWith.loc11.%T.as_type.loc11_52.1 (%T.as_type.262) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc15: @OrderedWith.loc11.%U.loc11_17.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %OrderedWith.type.loc15: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc11_48.1 (constants.%OrderedWith.type.32ae87.2)] +// CHECK:STDOUT: %OrderedWith.type.loc15: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc11_46.1 (constants.%OrderedWith.type.32ae87.2)] // CHECK:STDOUT: %.loc15_5.1: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = specific_constant imports.%Core.import_ref.d4f, @OrderedWith.WithSelf(constants.%U, constants.%Self.7df555.1) [symbolic = %assoc2 (constants.%assoc2.48eff0.2)] // CHECK:STDOUT: %Greater.ref: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = name_ref Greater, %.loc15_5.1 [symbolic = %assoc2 (constants.%assoc2.48eff0.2)] // CHECK:STDOUT: %impl.elem2.loc15_5.1: @OrderedWith.loc11.%.loc15_5.2 (%.666) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc15_5.2 (constants.%impl.elem2)] @@ -481,9 +481,9 @@ fn Test(returns_strong_ordering: Cpp.ReturnsStrongOrdering) { // CHECK:STDOUT: %specific_impl_fn.loc15_5.1: = specific_impl_function %impl.elem2.loc15_5.1, @OrderedWith.WithSelf.Greater(constants.%U, constants.%T.7df) [symbolic = %specific_impl_fn.loc15_5.2 (constants.%specific_impl_fn.735)] // CHECK:STDOUT: %bound_method.loc15_5.2: = bound_method %x.ref.loc15, %specific_impl_fn.loc15_5.1 // CHECK:STDOUT: %OrderedWith.WithSelf.Greater.call: init bool = call %bound_method.loc15_5.2(%x.ref.loc15, %y.ref.loc15) -// CHECK:STDOUT: %x.ref.loc16: @OrderedWith.loc11.%T.as_type.loc11_54.1 (%T.as_type.262) = name_ref x, %x +// CHECK:STDOUT: %x.ref.loc16: @OrderedWith.loc11.%T.as_type.loc11_52.1 (%T.as_type.262) = name_ref x, %x // CHECK:STDOUT: %y.ref.loc16: @OrderedWith.loc11.%U.loc11_17.1 (%U) = name_ref y, %y -// CHECK:STDOUT: %OrderedWith.type.loc16: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc11_48.1 (constants.%OrderedWith.type.32ae87.2)] +// CHECK:STDOUT: %OrderedWith.type.loc16: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc11_46.1 (constants.%OrderedWith.type.32ae87.2)] // CHECK:STDOUT: %.loc16_5.1: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = specific_constant imports.%Core.import_ref.b87, @OrderedWith.WithSelf(constants.%U, constants.%Self.7df555.1) [symbolic = %assoc3 (constants.%assoc3.5d53f7.2)] // CHECK:STDOUT: %GreaterOrEquivalent.ref: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.1d2e6f.2) = name_ref GreaterOrEquivalent, %.loc16_5.1 [symbolic = %assoc3 (constants.%assoc3.5d53f7.2)] // CHECK:STDOUT: %impl.elem3.loc16_5.1: @OrderedWith.loc11.%.loc16_5.2 (%.73b) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc16_5.2 (constants.%impl.elem3)] @@ -500,128 +500,128 @@ fn Test(returns_strong_ordering: Cpp.ReturnsStrongOrdering) { // CHECK:STDOUT: specific @EqWith.loc4(constants.%U, constants.%T.d94) { // CHECK:STDOUT: %U.patt.loc4_12.2 => constants.%U.patt // CHECK:STDOUT: %U.loc4_12.1 => constants.%U -// CHECK:STDOUT: %EqWith.type.loc4_38.1 => constants.%EqWith.type.98ea86.2 -// CHECK:STDOUT: %pattern_type.loc4_22 => constants.%pattern_type.3d4 -// CHECK:STDOUT: %T.patt.loc4_22.2 => constants.%T.patt.6b9 -// CHECK:STDOUT: %T.loc4_22.1 => constants.%T.d94 -// CHECK:STDOUT: %T.as_type.loc4_44.1 => constants.%T.as_type.93d -// CHECK:STDOUT: %pattern_type.loc4_42 => constants.%pattern_type.e6374a.2 -// CHECK:STDOUT: %x.param_patt.loc4_42.2 => constants.%x.param_patt.aa2 -// CHECK:STDOUT: %x.patt.loc4_42.2 => constants.%x.patt.4e4 -// CHECK:STDOUT: %pattern_type.loc4_48 => constants.%pattern_type.51d1c4.2 -// CHECK:STDOUT: %y.param_patt.loc4_48.2 => constants.%y.param_patt.be3 -// CHECK:STDOUT: %y.patt.loc4_48.2 => constants.%y.patt.b85 +// CHECK:STDOUT: %EqWith.type.loc4_36.1 => constants.%EqWith.type.98ea86.2 +// CHECK:STDOUT: %pattern_type.loc4_21 => constants.%pattern_type.3d4 +// CHECK:STDOUT: %T.patt.loc4_21.2 => constants.%T.patt.6b9 +// CHECK:STDOUT: %T.loc4_21.1 => constants.%T.d94 +// CHECK:STDOUT: %T.as_type.loc4_42.1 => constants.%T.as_type.93d +// CHECK:STDOUT: %pattern_type.loc4_40 => constants.%pattern_type.e6374a.2 +// CHECK:STDOUT: %x.param_patt.loc4_40.2 => constants.%x.param_patt.aa2 +// CHECK:STDOUT: %x.patt.loc4_40.2 => constants.%x.patt.4e4 +// CHECK:STDOUT: %pattern_type.loc4_46 => constants.%pattern_type.51d1c4.2 +// CHECK:STDOUT: %y.param_patt.loc4_46.2 => constants.%y.param_patt.be3 +// CHECK:STDOUT: %y.patt.loc4_46.2 => constants.%y.patt.b85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @OrderedWith.loc11(constants.%U, constants.%T.7df) { // CHECK:STDOUT: %U.patt.loc11_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc11_17.1 => constants.%U -// CHECK:STDOUT: %OrderedWith.type.loc11_48.1 => constants.%OrderedWith.type.32ae87.2 -// CHECK:STDOUT: %pattern_type.loc11_27 => constants.%pattern_type.ebc -// CHECK:STDOUT: %T.patt.loc11_27.2 => constants.%T.patt.aaa -// CHECK:STDOUT: %T.loc11_27.1 => constants.%T.7df -// CHECK:STDOUT: %T.as_type.loc11_54.1 => constants.%T.as_type.262 -// CHECK:STDOUT: %pattern_type.loc11_52 => constants.%pattern_type.f6ec4f.2 -// CHECK:STDOUT: %x.param_patt.loc11_52.2 => constants.%x.param_patt.a58 -// CHECK:STDOUT: %x.patt.loc11_52.2 => constants.%x.patt.140 -// CHECK:STDOUT: %pattern_type.loc11_58 => constants.%pattern_type.51d1c4.2 -// CHECK:STDOUT: %y.param_patt.loc11_58.2 => constants.%y.param_patt.be3 -// CHECK:STDOUT: %y.patt.loc11_58.2 => constants.%y.patt.b85 +// CHECK:STDOUT: %OrderedWith.type.loc11_46.1 => constants.%OrderedWith.type.32ae87.2 +// CHECK:STDOUT: %pattern_type.loc11_26 => constants.%pattern_type.ebc +// CHECK:STDOUT: %T.patt.loc11_26.2 => constants.%T.patt.aaa +// CHECK:STDOUT: %T.loc11_26.1 => constants.%T.7df +// CHECK:STDOUT: %T.as_type.loc11_52.1 => constants.%T.as_type.262 +// CHECK:STDOUT: %pattern_type.loc11_50 => constants.%pattern_type.f6ec4f.2 +// CHECK:STDOUT: %x.param_patt.loc11_50.2 => constants.%x.param_patt.a58 +// CHECK:STDOUT: %x.patt.loc11_50.2 => constants.%x.patt.140 +// CHECK:STDOUT: %pattern_type.loc11_56 => constants.%pattern_type.51d1c4.2 +// CHECK:STDOUT: %y.param_patt.loc11_56.2 => constants.%y.param_patt.be3 +// CHECK:STDOUT: %y.patt.loc11_56.2 => constants.%y.patt.b85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @EqWith.loc4(constants.%DefaultSpaceshipOnly, ) { // CHECK:STDOUT: %U.patt.loc4_12.2 => constants.%U.patt // CHECK:STDOUT: %U.loc4_12.1 => constants.%DefaultSpaceshipOnly -// CHECK:STDOUT: %EqWith.type.loc4_38.1 => constants.%EqWith.type.bf2 -// CHECK:STDOUT: %pattern_type.loc4_22 => constants.%pattern_type.062 -// CHECK:STDOUT: %T.patt.loc4_22.2 => constants.%T.patt.107 -// CHECK:STDOUT: %T.loc4_22.1 => -// CHECK:STDOUT: %T.as_type.loc4_44.1 => -// CHECK:STDOUT: %pattern_type.loc4_42 => -// CHECK:STDOUT: %x.param_patt.loc4_42.2 => -// CHECK:STDOUT: %x.patt.loc4_42.2 => -// CHECK:STDOUT: %pattern_type.loc4_48 => constants.%pattern_type.80f -// CHECK:STDOUT: %y.param_patt.loc4_48.2 => constants.%y.param_patt.62b -// CHECK:STDOUT: %y.patt.loc4_48.2 => constants.%y.patt.e91 +// CHECK:STDOUT: %EqWith.type.loc4_36.1 => constants.%EqWith.type.bf2 +// CHECK:STDOUT: %pattern_type.loc4_21 => constants.%pattern_type.062 +// CHECK:STDOUT: %T.patt.loc4_21.2 => constants.%T.patt.107 +// CHECK:STDOUT: %T.loc4_21.1 => +// CHECK:STDOUT: %T.as_type.loc4_42.1 => +// CHECK:STDOUT: %pattern_type.loc4_40 => +// CHECK:STDOUT: %x.param_patt.loc4_40.2 => +// CHECK:STDOUT: %x.patt.loc4_40.2 => +// CHECK:STDOUT: %pattern_type.loc4_46 => constants.%pattern_type.80f +// CHECK:STDOUT: %y.param_patt.loc4_46.2 => constants.%y.param_patt.62b +// CHECK:STDOUT: %y.patt.loc4_46.2 => constants.%y.patt.e91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @OrderedWith.loc11(constants.%DefaultSpaceshipOnly, ) { // CHECK:STDOUT: %U.patt.loc11_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc11_17.1 => constants.%DefaultSpaceshipOnly -// CHECK:STDOUT: %OrderedWith.type.loc11_48.1 => constants.%OrderedWith.type.33f -// CHECK:STDOUT: %pattern_type.loc11_27 => constants.%pattern_type.7f2 -// CHECK:STDOUT: %T.patt.loc11_27.2 => constants.%T.patt.84b -// CHECK:STDOUT: %T.loc11_27.1 => -// CHECK:STDOUT: %T.as_type.loc11_54.1 => -// CHECK:STDOUT: %pattern_type.loc11_52 => -// CHECK:STDOUT: %x.param_patt.loc11_52.2 => -// CHECK:STDOUT: %x.patt.loc11_52.2 => -// CHECK:STDOUT: %pattern_type.loc11_58 => constants.%pattern_type.80f -// CHECK:STDOUT: %y.param_patt.loc11_58.2 => constants.%y.param_patt.62b -// CHECK:STDOUT: %y.patt.loc11_58.2 => constants.%y.patt.e91 +// CHECK:STDOUT: %OrderedWith.type.loc11_46.1 => constants.%OrderedWith.type.33f +// CHECK:STDOUT: %pattern_type.loc11_26 => constants.%pattern_type.7f2 +// CHECK:STDOUT: %T.patt.loc11_26.2 => constants.%T.patt.84b +// CHECK:STDOUT: %T.loc11_26.1 => +// CHECK:STDOUT: %T.as_type.loc11_52.1 => +// CHECK:STDOUT: %pattern_type.loc11_50 => +// CHECK:STDOUT: %x.param_patt.loc11_50.2 => +// CHECK:STDOUT: %x.patt.loc11_50.2 => +// CHECK:STDOUT: %pattern_type.loc11_56 => constants.%pattern_type.80f +// CHECK:STDOUT: %y.param_patt.loc11_56.2 => constants.%y.param_patt.62b +// CHECK:STDOUT: %y.patt.loc11_56.2 => constants.%y.patt.e91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @OrderedWith.loc11(constants.%ReturnsStrongOrdering, ) { // CHECK:STDOUT: %U.patt.loc11_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc11_17.1 => constants.%ReturnsStrongOrdering -// CHECK:STDOUT: %OrderedWith.type.loc11_48.1 => constants.%OrderedWith.type.0fb -// CHECK:STDOUT: %pattern_type.loc11_27 => constants.%pattern_type.623 -// CHECK:STDOUT: %T.patt.loc11_27.2 => constants.%T.patt.62e -// CHECK:STDOUT: %T.loc11_27.1 => -// CHECK:STDOUT: %T.as_type.loc11_54.1 => -// CHECK:STDOUT: %pattern_type.loc11_52 => -// CHECK:STDOUT: %x.param_patt.loc11_52.2 => -// CHECK:STDOUT: %x.patt.loc11_52.2 => -// CHECK:STDOUT: %pattern_type.loc11_58 => constants.%pattern_type.37f -// CHECK:STDOUT: %y.param_patt.loc11_58.2 => constants.%y.param_patt.794 -// CHECK:STDOUT: %y.patt.loc11_58.2 => constants.%y.patt.e01 +// CHECK:STDOUT: %OrderedWith.type.loc11_46.1 => constants.%OrderedWith.type.0fb +// CHECK:STDOUT: %pattern_type.loc11_26 => constants.%pattern_type.623 +// CHECK:STDOUT: %T.patt.loc11_26.2 => constants.%T.patt.62e +// CHECK:STDOUT: %T.loc11_26.1 => +// CHECK:STDOUT: %T.as_type.loc11_52.1 => +// CHECK:STDOUT: %pattern_type.loc11_50 => +// CHECK:STDOUT: %x.param_patt.loc11_50.2 => +// CHECK:STDOUT: %x.patt.loc11_50.2 => +// CHECK:STDOUT: %pattern_type.loc11_56 => constants.%pattern_type.37f +// CHECK:STDOUT: %y.param_patt.loc11_56.2 => constants.%y.param_patt.794 +// CHECK:STDOUT: %y.patt.loc11_56.2 => constants.%y.patt.e01 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @OrderedWith.loc11(constants.%ReturnsPartialOrdering, ) { // CHECK:STDOUT: %U.patt.loc11_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc11_17.1 => constants.%ReturnsPartialOrdering -// CHECK:STDOUT: %OrderedWith.type.loc11_48.1 => constants.%OrderedWith.type.5f1 -// CHECK:STDOUT: %pattern_type.loc11_27 => constants.%pattern_type.53d -// CHECK:STDOUT: %T.patt.loc11_27.2 => constants.%T.patt.d27 -// CHECK:STDOUT: %T.loc11_27.1 => -// CHECK:STDOUT: %T.as_type.loc11_54.1 => -// CHECK:STDOUT: %pattern_type.loc11_52 => -// CHECK:STDOUT: %x.param_patt.loc11_52.2 => -// CHECK:STDOUT: %x.patt.loc11_52.2 => -// CHECK:STDOUT: %pattern_type.loc11_58 => constants.%pattern_type.9ae -// CHECK:STDOUT: %y.param_patt.loc11_58.2 => constants.%y.param_patt.301 -// CHECK:STDOUT: %y.patt.loc11_58.2 => constants.%y.patt.e76 +// CHECK:STDOUT: %OrderedWith.type.loc11_46.1 => constants.%OrderedWith.type.5f1 +// CHECK:STDOUT: %pattern_type.loc11_26 => constants.%pattern_type.53d +// CHECK:STDOUT: %T.patt.loc11_26.2 => constants.%T.patt.d27 +// CHECK:STDOUT: %T.loc11_26.1 => +// CHECK:STDOUT: %T.as_type.loc11_52.1 => +// CHECK:STDOUT: %pattern_type.loc11_50 => +// CHECK:STDOUT: %x.param_patt.loc11_50.2 => +// CHECK:STDOUT: %x.patt.loc11_50.2 => +// CHECK:STDOUT: %pattern_type.loc11_56 => constants.%pattern_type.9ae +// CHECK:STDOUT: %y.param_patt.loc11_56.2 => constants.%y.param_patt.301 +// CHECK:STDOUT: %y.patt.loc11_56.2 => constants.%y.patt.e76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @OrderedWith.loc11(constants.%CrossTypeRhs, ) { // CHECK:STDOUT: %U.patt.loc11_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc11_17.1 => constants.%CrossTypeRhs -// CHECK:STDOUT: %OrderedWith.type.loc11_48.1 => constants.%OrderedWith.type.8cb -// CHECK:STDOUT: %pattern_type.loc11_27 => constants.%pattern_type.935 -// CHECK:STDOUT: %T.patt.loc11_27.2 => constants.%T.patt.d75 -// CHECK:STDOUT: %T.loc11_27.1 => -// CHECK:STDOUT: %T.as_type.loc11_54.1 => -// CHECK:STDOUT: %pattern_type.loc11_52 => -// CHECK:STDOUT: %x.param_patt.loc11_52.2 => -// CHECK:STDOUT: %x.patt.loc11_52.2 => -// CHECK:STDOUT: %pattern_type.loc11_58 => constants.%pattern_type.aac -// CHECK:STDOUT: %y.param_patt.loc11_58.2 => constants.%y.param_patt.da2 -// CHECK:STDOUT: %y.patt.loc11_58.2 => constants.%y.patt.ac7 +// CHECK:STDOUT: %OrderedWith.type.loc11_46.1 => constants.%OrderedWith.type.8cb +// CHECK:STDOUT: %pattern_type.loc11_26 => constants.%pattern_type.935 +// CHECK:STDOUT: %T.patt.loc11_26.2 => constants.%T.patt.d75 +// CHECK:STDOUT: %T.loc11_26.1 => +// CHECK:STDOUT: %T.as_type.loc11_52.1 => +// CHECK:STDOUT: %pattern_type.loc11_50 => +// CHECK:STDOUT: %x.param_patt.loc11_50.2 => +// CHECK:STDOUT: %x.patt.loc11_50.2 => +// CHECK:STDOUT: %pattern_type.loc11_56 => constants.%pattern_type.aac +// CHECK:STDOUT: %y.param_patt.loc11_56.2 => constants.%y.param_patt.da2 +// CHECK:STDOUT: %y.patt.loc11_56.2 => constants.%y.patt.ac7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @OrderedWith.loc11(constants.%CrossTypeLhs, ) { // CHECK:STDOUT: %U.patt.loc11_17.2 => constants.%U.patt // CHECK:STDOUT: %U.loc11_17.1 => constants.%CrossTypeLhs -// CHECK:STDOUT: %OrderedWith.type.loc11_48.1 => constants.%OrderedWith.type.c6c -// CHECK:STDOUT: %pattern_type.loc11_27 => constants.%pattern_type.b4e -// CHECK:STDOUT: %T.patt.loc11_27.2 => constants.%T.patt.6f6 -// CHECK:STDOUT: %T.loc11_27.1 => -// CHECK:STDOUT: %T.as_type.loc11_54.1 => -// CHECK:STDOUT: %pattern_type.loc11_52 => -// CHECK:STDOUT: %x.param_patt.loc11_52.2 => -// CHECK:STDOUT: %x.patt.loc11_52.2 => -// CHECK:STDOUT: %pattern_type.loc11_58 => constants.%pattern_type.eb5 -// CHECK:STDOUT: %y.param_patt.loc11_58.2 => constants.%y.param_patt.65d -// CHECK:STDOUT: %y.patt.loc11_58.2 => constants.%y.patt.6a4 +// CHECK:STDOUT: %OrderedWith.type.loc11_46.1 => constants.%OrderedWith.type.c6c +// CHECK:STDOUT: %pattern_type.loc11_26 => constants.%pattern_type.b4e +// CHECK:STDOUT: %T.patt.loc11_26.2 => constants.%T.patt.6f6 +// CHECK:STDOUT: %T.loc11_26.1 => +// CHECK:STDOUT: %T.as_type.loc11_52.1 => +// CHECK:STDOUT: %pattern_type.loc11_50 => +// CHECK:STDOUT: %x.param_patt.loc11_50.2 => +// CHECK:STDOUT: %x.patt.loc11_50.2 => +// CHECK:STDOUT: %pattern_type.loc11_56 => constants.%pattern_type.eb5 +// CHECK:STDOUT: %y.param_patt.loc11_56.2 => constants.%y.param_patt.65d +// CHECK:STDOUT: %y.patt.loc11_56.2 => constants.%y.patt.6a4 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon index 261ab532c01c..2345150ff81d 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon @@ -256,7 +256,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn ArithmeticHeterogeneousLongLeftSide() { let b: i32 = 1; @@ -281,7 +281,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn ArithmeticHeterogeneousLongRightSide() { let b: i32 = 1; @@ -305,7 +305,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn ArithmeticHeterogeneousLongAndI64() { let x: Cpp.long = 1; @@ -320,7 +320,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn ArithmeticHeterogeneousLongAndI16() { let x: Cpp.long = 1; @@ -344,7 +344,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn ArithmeticHeterogeneousLongAndI128() { let x: Cpp.long = 1; @@ -368,7 +368,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn BitWiseHomogeneousLong() { let a: Cpp.long = 1; @@ -389,7 +389,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn BitWiseHeterogeneousLongLeftSide() { let b: i32 = 1; @@ -414,7 +414,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn BitWiseHeterogeneousLongRightSide() { let b: i32 = 1; @@ -439,7 +439,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn BitWiseHeterogeneousLongAndI64() { let a: Cpp.long = 1; @@ -455,7 +455,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn BitWiseHeterogeneousLongAndI16() { let a: Cpp.long = 1; @@ -479,7 +479,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn BitWiseHeterogeneousLongAndI128() { let a: Cpp.long = 1; diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon index 89aa7e483570..6176f6bf7f5d 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon @@ -233,7 +233,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn ArithmeticHomogeneousLongLong() { let x: Cpp.long_long = 1; @@ -253,7 +253,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn ArithmeticHeterogeneousLongLongLeftSide() { let b: i64 = 1; @@ -278,7 +278,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn ArithmeticHeterogeneousLongLongRightSide() { let b: i64 = 1; @@ -302,7 +302,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn ArithmeticHeterogeneousLongLongAndI32() { let x: Cpp.long_long = 1; @@ -326,7 +326,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn ArithmeticHeterogeneousLongLongAndI128() { let x: Cpp.long_long = 1; @@ -341,7 +341,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn BitWiseHomogeneousLongLong() { let a: Cpp.long_long = 1; @@ -361,7 +361,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn BitWiseHeterogeneousLongLongLeftSide() { let b: i64 = 1; @@ -386,7 +386,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn BitWiseHeterogeneousLongLongRightSide() { let b: i64 = 1; @@ -411,7 +411,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn BitWiseHeterogeneousLongLongAndI32() { let a: Cpp.long_long = 1; @@ -435,7 +435,7 @@ library "[[@TEST_NAME]]"; import Cpp; -fn AssertSameType[T:! type](unused a: T, unused b: T) {} +fn AssertSameType[T: type](unused a: T, unused b: T) {} fn BitWiseHeterogeneousLongLongAndI128() { let a: Cpp.long_long = 1; diff --git a/toolchain/check/testdata/interop/cpp/range_for.carbon b/toolchain/check/testdata/interop/cpp/range_for.carbon index c96ae368a551..7fb86c7c18fa 100644 --- a/toolchain/check/testdata/interop/cpp/range_for.carbon +++ b/toolchain/check/testdata/interop/cpp/range_for.carbon @@ -42,7 +42,7 @@ public: }; '''; -fn TestIterate[R:! Core.Iterate where .ElementType = i32](r: R) { +fn TestIterate[R: Core.Iterate where .ElementType = i32](r: R) { var sum: i32 = 0; //@dump-sem-ir-begin @@ -113,7 +113,7 @@ public: }; '''; -fn TestIterate[R:! Core.Iterate where .ElementType = Cpp.ValueType](var r: R) { +fn TestIterate[R: Core.Iterate where .ElementType = Cpp.ValueType](var r: R) { var sum: Cpp.ValueType = Cpp.ValueType.ValueType(); //@dump-sem-ir-begin @@ -162,7 +162,7 @@ public: } // namespace N '''; -fn TestIterate[R:! Core.Iterate where .ElementType = f64](r: R) { +fn TestIterate[R: Core.Iterate where .ElementType = f64](r: R) { var sum: f64 = 0.0; //@dump-sem-ir-begin @@ -208,7 +208,7 @@ public: } // namespace N '''; -fn TestIterate[R:! Core.Iterate where .ElementType = f64](r: R) { +fn TestIterate[R: Core.Iterate where .ElementType = f64](r: R) { var sum: f64 = 0.0; //@dump-sem-ir-begin @@ -230,8 +230,8 @@ fn TestIterateDriver(var m: Cpp.N.MutableRange) { // CHECK:STDERR: fn Begin(self) -> Iterator; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE-21]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn TestIterate[R:! Core.Iterate where .ElementType = f64](r: R) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = f64](r: R) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE+14]]:3: error: facet type `Core.CppRangeForIterate where .(Core.CppRangeForIterate.Iterator) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator) impls Core.Copy and .(Core.CppRangeForIterate.Iterator) impls Core.CppUnsafeDeref and .(Core.CppRangeForIterate.Iterator) impls Core.EqWith(.(Core.CppRangeForIterate.Sentinel)) and .(Core.CppRangeForIterate.Iterator) impls Core.Inc and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy and .(Core.CppRangeForIterate.Sentinel) impls Core.Destroy and .(Core.CppRangeForIterate.Sentinel) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] // CHECK:STDERR: TestIterate(m); @@ -244,8 +244,8 @@ fn TestIterateDriver(var m: Cpp.N.MutableRange) { // CHECK:STDERR: fn End(self) -> Sentinel; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE-35]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn TestIterate[R:! Core.Iterate where .ElementType = f64](r: R) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = f64](r: R) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: TestIterate(m); } @@ -287,7 +287,7 @@ public: } // namespace N '''; -fn TestIterate[R:! Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { +fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { var sum: Cpp.N.ValueType = Cpp.N.ValueType.ValueType(); //@dump-sem-ir-begin @@ -338,7 +338,7 @@ public: } '''; -fn TestIterate[R:! Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { +fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { var sum: Cpp.N.ValueType = Cpp.N.ValueType.ValueType(); //@dump-sem-ir-begin @@ -360,8 +360,8 @@ fn TestIterateDriver(var m: Cpp.N.MutableRange) { // CHECK:STDERR: fn Begin(self) -> Iterator; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-21]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn TestIterate[R:! Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+28]]:3: error: facet type `Core.CppRangeForIterate where .(Core.CppRangeForIterate.Iterator) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator) impls Core.Copy and .(Core.CppRangeForIterate.Iterator) impls Core.CppUnsafeDeref and .(Core.CppRangeForIterate.Iterator) impls Core.EqWith(.(Core.CppRangeForIterate.Sentinel)) and .(Core.CppRangeForIterate.Iterator) impls Core.Inc and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy and .(Core.CppRangeForIterate.Sentinel) impls Core.Destroy and .(Core.CppRangeForIterate.Sentinel) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] // CHECK:STDERR: TestIterate(m); @@ -374,22 +374,22 @@ fn TestIterateDriver(var m: Cpp.N.MutableRange) { // CHECK:STDERR: fn End(self) -> Sentinel; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-35]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn TestIterate[R:! Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+14]]:3: error: semantics TODO: `Rewriting operator== using operator== is not supported` [SemanticsTodo] // CHECK:STDERR: TestIterate(m); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-42]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn TestIterate[R:! Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.N.MutableRange` into type implementing `Core.Iterate where .(Core.Iterate.ElementType) = Cpp.N.ValueType as Core.Destroy & Core.Copy` [ConversionFailureTypeToFacet] // CHECK:STDERR: TestIterate(m); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-49]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn TestIterate[R:! Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: TestIterate(m); } @@ -446,7 +446,7 @@ class MutableAndConstRange { } '''; -fn TestIterate[R:! Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { +fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { var sum: Cpp.N.ValueType = Cpp.N.ValueType.ValueType(); //@dump-sem-ir-begin @@ -468,8 +468,8 @@ fn TestIterateDriver(var mc: Cpp.N.MutableAndConstRange) { // CHECK:STDERR: fn Begin(self) -> Iterator; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE-21]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn TestIterate[R:! Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE+14]]:3: error: facet type `Core.CppRangeForIterate where .(Core.CppRangeForIterate.Iterator) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator) impls Core.Copy and .(Core.CppRangeForIterate.Iterator) impls Core.CppUnsafeDeref and .(Core.CppRangeForIterate.Iterator) impls Core.EqWith(.(Core.CppRangeForIterate.Sentinel)) and .(Core.CppRangeForIterate.Iterator) impls Core.Inc and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy and .(Core.CppRangeForIterate.Sentinel) impls Core.Destroy and .(Core.CppRangeForIterate.Sentinel) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] // CHECK:STDERR: TestIterate(mc); @@ -482,8 +482,8 @@ fn TestIterateDriver(var mc: Cpp.N.MutableAndConstRange) { // CHECK:STDERR: fn End(self) -> Sentinel; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE-35]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn TestIterate[R:! Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: TestIterate(mc); } @@ -564,7 +564,7 @@ struct EndFunctionDeleted { // We deliberately use `Core.CppRangeForIterate` here, since we want to confirm // that types don't implement this interface. -fn Test[R:! Core.CppRangeForIterate](unused r: R) {} +fn Test[R: Core.CppRangeForIterate](unused r: R) {} fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, var no_begin_method: Cpp.NoBeginMethod, @@ -584,8 +584,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: Test(no_begin_end); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-19]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(no_begin_end); @@ -593,8 +593,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: Test(no_begin_method); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-28]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(no_begin_method); @@ -602,8 +602,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: Test(no_end_method); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-37]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(no_end_method); @@ -611,8 +611,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: Test(no_begin_adl); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-46]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(no_begin_adl); @@ -620,8 +620,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: Test(no_end_adl); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-55]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(no_end_adl); @@ -629,8 +629,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: Test(begin_method_end_adl); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-64]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(begin_method_end_adl); @@ -638,8 +638,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: Test(begin_adl_end_method); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-73]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(begin_adl_end_method); @@ -647,8 +647,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: Test(begin_field_end_method); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-82]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(begin_field_end_method); @@ -656,8 +656,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: Test(begin_method_end_field); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-91]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(begin_method_end_field); @@ -668,8 +668,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: 44 | auto begin() = delete; // CHECK:STDERR: | ^ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-103]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(begin_method_deleted); @@ -680,8 +680,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: 50 | auto end() = delete; // CHECK:STDERR: | ^ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-115]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(end_method_deleted); @@ -692,8 +692,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: 54 | friend auto begin(const BeginFunctionDeleted&) = delete; // CHECK:STDERR: | ^ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-127]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(begin_function_deleted); @@ -704,8 +704,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDERR: 60 | friend auto end(const EndFunctionDeleted&) = delete; // CHECK:STDERR: | ^ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-139]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R:! Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(end_function_deleted); } @@ -769,7 +769,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.49a: %R.as_type.as.Iterate.impl.Next.type.c6a = struct_value () [symbolic] // CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.2e2: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] // CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.71b: %R.as_type.as.Iterate.impl.NewCursor.type.2e2 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.Op.type.1d8f74.3: type = fn_type @Destroy.Op.loc30_54.2 [concrete] +// CHECK:STDOUT: %Destroy.Op.type.1d8f74.3: type = fn_type @Destroy.Op.loc30_53.2 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.3: %Destroy.Op.type.1d8f74.3 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.3: = custom_witness (%Destroy.Op.1a2547.3), @Destroy [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] @@ -985,7 +985,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc30_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.18b)] -// CHECK:STDOUT: %Iterate.facet.loc34_19.5: %Iterate.type = facet_value %R.as_type.loc30_62.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] +// CHECK:STDOUT: %Iterate.facet.loc34_19.5: %Iterate.type = facet_value %R.as_type.loc30_61.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc34_19.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.8fb)] // CHECK:STDOUT: %.loc34_19.19: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc34_19.5 [symbolic = %.loc34_19.19 (constants.%.985)] // CHECK:STDOUT: %impl.elem2.loc34_19.2: @TestIterate.%.loc34_19.19 (%.985) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc34_19.2 (constants.%impl.elem2.8ec)] @@ -1002,13 +1002,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %impl.elem0.loc34_19.2: @TestIterate.%.loc34_19.21 (%.fa0) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_19.2 (constants.%impl.elem0.544)] // CHECK:STDOUT: %specific_impl_fn.loc34_19.6: = specific_impl_function %impl.elem0.loc34_19.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc34_19.6 (constants.%specific_impl_fn.fa9)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc30_62.1 (%R.as_type.a02)) { +// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc30_61.1 (%R.as_type.a02)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.6b6 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc30_62.1 (%R.as_type.a02) = name_ref r, %r +// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc30_61.1 (%R.as_type.a02) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc34_19.1: @TestIterate.%.loc34_19.19 (%.985) = impl_witness_access constants.%Iterate.lookup_impl_witness.18b, element2 [symbolic = %impl.elem2.loc34_19.2 (constants.%impl.elem2.8ec)] // CHECK:STDOUT: %bound_method.loc34_19.1: = bound_method %r.ref, %impl.elem2.loc34_19.1 // CHECK:STDOUT: %Iterate.facet.loc34_19.1: %Iterate.type = facet_value constants.%R.as_type.a02, (constants.%Iterate.lookup_impl_witness.18b) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] @@ -1284,19 +1284,19 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: specific @TestIterate(constants.%R.869) { // CHECK:STDOUT: %R.patt.loc30_17.2 => constants.%R.patt.bbc // CHECK:STDOUT: %R.loc30_17.1 => constants.%R.869 -// CHECK:STDOUT: %R.as_type.loc30_62.1 => constants.%R.as_type.a02 +// CHECK:STDOUT: %R.as_type.loc30_61.1 => constants.%R.as_type.a02 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b2da -// CHECK:STDOUT: %r.param_patt.loc30_60.2 => constants.%r.param_patt.774 -// CHECK:STDOUT: %r.patt.loc30_60.2 => constants.%r.patt.54b +// CHECK:STDOUT: %r.param_patt.loc30_59.2 => constants.%r.param_patt.774 +// CHECK:STDOUT: %r.patt.loc30_59.2 => constants.%r.patt.54b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TestIterate(constants.%facet_value.04f) { // CHECK:STDOUT: %R.patt.loc30_17.2 => constants.%R.patt.bbc // CHECK:STDOUT: %R.loc30_17.1 => constants.%facet_value.04f -// CHECK:STDOUT: %R.as_type.loc30_62.1 => constants.%MutableRange +// CHECK:STDOUT: %R.as_type.loc30_61.1 => constants.%MutableRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e635 -// CHECK:STDOUT: %r.param_patt.loc30_60.2 => constants.%r.param_patt.c79 -// CHECK:STDOUT: %r.patt.loc30_60.2 => constants.%r.patt.16f +// CHECK:STDOUT: %r.param_patt.loc30_59.2 => constants.%r.param_patt.c79 +// CHECK:STDOUT: %r.patt.loc30_59.2 => constants.%r.patt.16f // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc30 => constants.%complete_type.357 @@ -1324,10 +1324,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: specific @TestIterate(constants.%facet_value.f37) { // CHECK:STDOUT: %R.patt.loc30_17.2 => constants.%R.patt.bbc // CHECK:STDOUT: %R.loc30_17.1 => constants.%facet_value.f37 -// CHECK:STDOUT: %R.as_type.loc30_62.1 => constants.%ConstRange +// CHECK:STDOUT: %R.as_type.loc30_61.1 => constants.%ConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.0ba -// CHECK:STDOUT: %r.param_patt.loc30_60.2 => constants.%r.param_patt.83e -// CHECK:STDOUT: %r.patt.loc30_60.2 => constants.%r.patt.116 +// CHECK:STDOUT: %r.param_patt.loc30_59.2 => constants.%r.param_patt.83e +// CHECK:STDOUT: %r.patt.loc30_59.2 => constants.%r.patt.116 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc30 => constants.%complete_type.357 @@ -1621,7 +1621,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc40_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.06b)] -// CHECK:STDOUT: %Iterate.facet.loc44_29.5: %Iterate.type = facet_value %R.as_type.loc40_76.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] +// CHECK:STDOUT: %Iterate.facet.loc44_29.5: %Iterate.type = facet_value %R.as_type.loc40_75.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc44_29.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.1b1)] // CHECK:STDOUT: %.loc44_29.20: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc44_29.5 [symbolic = %.loc44_29.20 (constants.%.1c2)] // CHECK:STDOUT: %impl.elem2.loc44_29.2: @TestIterate.%.loc44_29.20 (%.1c2) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc44_29.2 (constants.%impl.elem2.49b)] @@ -1638,13 +1638,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %impl.elem0.loc44_29.2: @TestIterate.%.loc44_29.22 (%.98a) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc44_29.2 (constants.%impl.elem0.81b)] // CHECK:STDOUT: %specific_impl_fn.loc44_29.6: = specific_impl_function %impl.elem0.loc44_29.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc44_29.6 (constants.%specific_impl_fn.bf3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: ref @TestIterate.%R.as_type.loc40_76.1 (%R.as_type.f55)) { +// CHECK:STDOUT: fn(%r.param: ref @TestIterate.%R.as_type.loc40_75.1 (%R.as_type.f55)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.e9f = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: ref @TestIterate.%R.as_type.loc40_76.1 (%R.as_type.f55) = name_ref r, %r +// CHECK:STDOUT: %r.ref: ref @TestIterate.%R.as_type.loc40_75.1 (%R.as_type.f55) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc44_29.1: @TestIterate.%.loc44_29.20 (%.1c2) = impl_witness_access constants.%Iterate.lookup_impl_witness.06b, element2 [symbolic = %impl.elem2.loc44_29.2 (constants.%impl.elem2.49b)] // CHECK:STDOUT: %bound_method.loc44_29.1: = bound_method %r.ref, %impl.elem2.loc44_29.1 // CHECK:STDOUT: %Iterate.facet.loc44_29.1: %Iterate.type = facet_value constants.%R.as_type.f55, (constants.%Iterate.lookup_impl_witness.06b) [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] @@ -1654,7 +1654,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %specific_impl_fn.loc44_29.1: = specific_impl_function %impl.elem2.loc44_29.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.dbf) [symbolic = %specific_impl_fn.loc44_29.4 (constants.%specific_impl_fn.6f3)] // CHECK:STDOUT: %bound_method.loc44_29.2: = bound_method %r.ref, %specific_impl_fn.loc44_29.1 // CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.dbb) = var_storage invalid -// CHECK:STDOUT: %.loc44_28.1: @TestIterate.%R.as_type.loc40_76.1 (%R.as_type.f55) = acquire_value %r.ref +// CHECK:STDOUT: %.loc44_28.1: @TestIterate.%R.as_type.loc40_75.1 (%R.as_type.f55) = acquire_value %r.ref // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.dbb) to %var = call %bound_method.loc44_29.2(%.loc44_28.1) // CHECK:STDOUT: assign %var, %Iterate.WithSelf.NewCursor.call // CHECK:STDOUT: br !for.next @@ -1672,7 +1672,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %specific_impl_fn.loc44_29.2: = specific_impl_function %impl.elem3.loc44_29.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.dbf) [symbolic = %specific_impl_fn.loc44_29.5 (constants.%specific_impl_fn.fca)] // CHECK:STDOUT: %bound_method.loc44_29.4: = bound_method %r.ref, %specific_impl_fn.loc44_29.2 // CHECK:STDOUT: %.loc44_29.7: ref %Optional.f2f = temporary_storage -// CHECK:STDOUT: %.loc44_28.2: @TestIterate.%R.as_type.loc40_76.1 (%R.as_type.f55) = acquire_value %r.ref +// CHECK:STDOUT: %.loc44_28.2: @TestIterate.%R.as_type.loc40_75.1 (%R.as_type.f55) = acquire_value %r.ref // CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.f2f to %.loc44_29.7 = call %bound_method.loc44_29.4(%.loc44_28.2, %addr.loc44) // CHECK:STDOUT: %.loc44_29.8: ref %Optional.f2f = temporary %.loc44_29.7, %Iterate.WithSelf.Next.call // CHECK:STDOUT: %.loc44_29.9: %Optional.HasValue.type.436 = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.HasValue.fbf] @@ -1931,19 +1931,19 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: specific @TestIterate(constants.%R.0bd) { // CHECK:STDOUT: %R.patt.loc40_17.2 => constants.%R.patt.35d // CHECK:STDOUT: %R.loc40_17.1 => constants.%R.0bd -// CHECK:STDOUT: %R.as_type.loc40_76.1 => constants.%R.as_type.f55 +// CHECK:STDOUT: %R.as_type.loc40_75.1 => constants.%R.as_type.f55 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d2d -// CHECK:STDOUT: %r.patt.loc40_74.2 => constants.%r.patt.d27 -// CHECK:STDOUT: %r.param_patt.loc40_69.2 => constants.%r.param_patt.a41 +// CHECK:STDOUT: %r.patt.loc40_73.2 => constants.%r.patt.d27 +// CHECK:STDOUT: %r.param_patt.loc40_68.2 => constants.%r.param_patt.a41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TestIterate(constants.%facet_value.82d) { // CHECK:STDOUT: %R.patt.loc40_17.2 => constants.%R.patt.35d // CHECK:STDOUT: %R.loc40_17.1 => constants.%facet_value.82d -// CHECK:STDOUT: %R.as_type.loc40_76.1 => constants.%MutableRange +// CHECK:STDOUT: %R.as_type.loc40_75.1 => constants.%MutableRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e635 -// CHECK:STDOUT: %r.patt.loc40_74.2 => constants.%r.patt.f69 -// CHECK:STDOUT: %r.param_patt.loc40_69.2 => constants.%r.param_patt.91e +// CHECK:STDOUT: %r.patt.loc40_73.2 => constants.%r.patt.f69 +// CHECK:STDOUT: %r.param_patt.loc40_68.2 => constants.%r.param_patt.91e // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc40 => constants.%complete_type.357 @@ -1971,10 +1971,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: specific @TestIterate(constants.%facet_value.915) { // CHECK:STDOUT: %R.patt.loc40_17.2 => constants.%R.patt.35d // CHECK:STDOUT: %R.loc40_17.1 => constants.%facet_value.915 -// CHECK:STDOUT: %R.as_type.loc40_76.1 => constants.%ConstRange +// CHECK:STDOUT: %R.as_type.loc40_75.1 => constants.%ConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.0ba -// CHECK:STDOUT: %r.patt.loc40_74.2 => constants.%r.patt.36a -// CHECK:STDOUT: %r.param_patt.loc40_69.2 => constants.%r.param_patt.501 +// CHECK:STDOUT: %r.patt.loc40_73.2 => constants.%r.patt.36a +// CHECK:STDOUT: %r.param_patt.loc40_68.2 => constants.%r.param_patt.501 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc40 => constants.%complete_type.357 @@ -2053,7 +2053,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %f64.dc1: type = class_type @Float, @Float(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.fb7: type = pattern_type %f64.dc1 [concrete] -// CHECK:STDOUT: %Destroy.Op.type.1d8f74.3: type = fn_type @Destroy.Op.loc20_54.2 [concrete] +// CHECK:STDOUT: %Destroy.Op.type.1d8f74.3: type = fn_type @Destroy.Op.loc20_53.2 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.3: %Destroy.Op.type.1d8f74.3 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.3: = custom_witness (%Destroy.Op.1a2547.3), @Destroy [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.ff3: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N.fe9) [symbolic] @@ -2194,7 +2194,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc20_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.93c)] -// CHECK:STDOUT: %Iterate.facet.loc24_19.5: %Iterate.type = facet_value %R.as_type.loc20_62.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %Iterate.facet.loc24_19.5: %Iterate.type = facet_value %R.as_type.loc20_61.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc24_19.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.4c7)] // CHECK:STDOUT: %.loc24_19.19: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc24_19.5 [symbolic = %.loc24_19.19 (constants.%.a62)] // CHECK:STDOUT: %impl.elem2.loc24_19.2: @TestIterate.%.loc24_19.19 (%.a62) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc24_19.2 (constants.%impl.elem2.c7b)] @@ -2211,13 +2211,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %impl.elem0.loc24_19.2: @TestIterate.%.loc24_19.21 (%.148) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc24_19.2 (constants.%impl.elem0.461)] // CHECK:STDOUT: %specific_impl_fn.loc24_19.6: = specific_impl_function %impl.elem0.loc24_19.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc24_19.6 (constants.%specific_impl_fn.095)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc20_62.1 (%R.as_type.087)) { +// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc20_61.1 (%R.as_type.087)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.fb7 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc20_62.1 (%R.as_type.087) = name_ref r, %r +// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc20_61.1 (%R.as_type.087) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc24_19.1: @TestIterate.%.loc24_19.19 (%.a62) = impl_witness_access constants.%Iterate.lookup_impl_witness.93c, element2 [symbolic = %impl.elem2.loc24_19.2 (constants.%impl.elem2.c7b)] // CHECK:STDOUT: %bound_method.loc24_19.1: = bound_method %r.ref, %impl.elem2.loc24_19.1 // CHECK:STDOUT: %Iterate.facet.loc24_19.1: %Iterate.type = facet_value constants.%R.as_type.087, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] @@ -2409,19 +2409,19 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: specific @TestIterate(constants.%R.c6e) { // CHECK:STDOUT: %R.patt.loc20_17.2 => constants.%R.patt.ae1 // CHECK:STDOUT: %R.loc20_17.1 => constants.%R.c6e -// CHECK:STDOUT: %R.as_type.loc20_62.1 => constants.%R.as_type.087 +// CHECK:STDOUT: %R.as_type.loc20_61.1 => constants.%R.as_type.087 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3d7 -// CHECK:STDOUT: %r.param_patt.loc20_60.2 => constants.%r.param_patt.03a -// CHECK:STDOUT: %r.patt.loc20_60.2 => constants.%r.patt.b86 +// CHECK:STDOUT: %r.param_patt.loc20_59.2 => constants.%r.param_patt.03a +// CHECK:STDOUT: %r.patt.loc20_59.2 => constants.%r.patt.b86 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TestIterate(constants.%facet_value.098) { // CHECK:STDOUT: %R.patt.loc20_17.2 => constants.%R.patt.ae1 // CHECK:STDOUT: %R.loc20_17.1 => constants.%facet_value.098 -// CHECK:STDOUT: %R.as_type.loc20_62.1 => constants.%ConstRange +// CHECK:STDOUT: %R.as_type.loc20_61.1 => constants.%ConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.025 -// CHECK:STDOUT: %r.param_patt.loc20_60.2 => constants.%r.param_patt.a73 -// CHECK:STDOUT: %r.patt.loc20_60.2 => constants.%r.patt.0e2 +// CHECK:STDOUT: %r.param_patt.loc20_59.2 => constants.%r.param_patt.a73 +// CHECK:STDOUT: %r.patt.loc20_59.2 => constants.%r.patt.0e2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc20 => constants.%complete_type.357 @@ -2500,7 +2500,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %f64.dc1: type = class_type @Float, @Float(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.fb7: type = pattern_type %f64.dc1 [concrete] -// CHECK:STDOUT: %Destroy.Op.type.1d8f74.3: type = fn_type @Destroy.Op.loc22_54.2 [concrete] +// CHECK:STDOUT: %Destroy.Op.type.1d8f74.3: type = fn_type @Destroy.Op.loc22_53.2 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.3: %Destroy.Op.type.1d8f74.3 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.3: = custom_witness (%Destroy.Op.1a2547.3), @Destroy [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.ff3: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N.fe9) [symbolic] @@ -2641,7 +2641,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc22_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.93c)] -// CHECK:STDOUT: %Iterate.facet.loc26_19.5: %Iterate.type = facet_value %R.as_type.loc22_62.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %Iterate.facet.loc26_19.5: %Iterate.type = facet_value %R.as_type.loc22_61.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc26_19.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.4c7)] // CHECK:STDOUT: %.loc26_19.19: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc26_19.5 [symbolic = %.loc26_19.19 (constants.%.a62)] // CHECK:STDOUT: %impl.elem2.loc26_19.2: @TestIterate.%.loc26_19.19 (%.a62) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc26_19.2 (constants.%impl.elem2.c7b)] @@ -2658,13 +2658,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %impl.elem0.loc26_19.2: @TestIterate.%.loc26_19.21 (%.148) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_19.2 (constants.%impl.elem0.461)] // CHECK:STDOUT: %specific_impl_fn.loc26_19.6: = specific_impl_function %impl.elem0.loc26_19.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc26_19.6 (constants.%specific_impl_fn.095)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc22_62.1 (%R.as_type.087)) { +// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc22_61.1 (%R.as_type.087)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.fb7 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc22_62.1 (%R.as_type.087) = name_ref r, %r +// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc22_61.1 (%R.as_type.087) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc26_19.1: @TestIterate.%.loc26_19.19 (%.a62) = impl_witness_access constants.%Iterate.lookup_impl_witness.93c, element2 [symbolic = %impl.elem2.loc26_19.2 (constants.%impl.elem2.c7b)] // CHECK:STDOUT: %bound_method.loc26_19.1: = bound_method %r.ref, %impl.elem2.loc26_19.1 // CHECK:STDOUT: %Iterate.facet.loc26_19.1: %Iterate.type = facet_value constants.%R.as_type.087, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] @@ -2858,19 +2858,19 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: specific @TestIterate(constants.%R.c6e) { // CHECK:STDOUT: %R.patt.loc22_17.2 => constants.%R.patt.ae1 // CHECK:STDOUT: %R.loc22_17.1 => constants.%R.c6e -// CHECK:STDOUT: %R.as_type.loc22_62.1 => constants.%R.as_type.087 +// CHECK:STDOUT: %R.as_type.loc22_61.1 => constants.%R.as_type.087 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3d7 -// CHECK:STDOUT: %r.param_patt.loc22_60.2 => constants.%r.param_patt.03a -// CHECK:STDOUT: %r.patt.loc22_60.2 => constants.%r.patt.b86 +// CHECK:STDOUT: %r.param_patt.loc22_59.2 => constants.%r.param_patt.03a +// CHECK:STDOUT: %r.patt.loc22_59.2 => constants.%r.patt.b86 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TestIterate(constants.%facet_value.a73) { // CHECK:STDOUT: %R.patt.loc22_17.2 => constants.%R.patt.ae1 // CHECK:STDOUT: %R.loc22_17.1 => constants.%facet_value.a73 -// CHECK:STDOUT: %R.as_type.loc22_62.1 => constants.%MutableRange +// CHECK:STDOUT: %R.as_type.loc22_61.1 => constants.%MutableRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.992 -// CHECK:STDOUT: %r.param_patt.loc22_60.2 => constants.%r.param_patt.aeb -// CHECK:STDOUT: %r.patt.loc22_60.2 => constants.%r.patt.fe7 +// CHECK:STDOUT: %r.param_patt.loc22_59.2 => constants.%r.param_patt.aeb +// CHECK:STDOUT: %r.patt.loc22_59.2 => constants.%r.patt.fe7 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc22 => constants.%complete_type.357 @@ -3109,7 +3109,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc27_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.173)] -// CHECK:STDOUT: %Iterate.facet.loc31_31.5: %Iterate.type = facet_value %R.as_type.loc27_74.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %Iterate.facet.loc31_31.5: %Iterate.type = facet_value %R.as_type.loc27_73.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc31_31.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.5cd)] // CHECK:STDOUT: %.loc31_31.20: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc31_31.5 [symbolic = %.loc31_31.20 (constants.%.592)] // CHECK:STDOUT: %impl.elem2.loc31_31.2: @TestIterate.%.loc31_31.20 (%.592) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc31_31.2 (constants.%impl.elem2.ae2)] @@ -3126,13 +3126,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %impl.elem0.loc31_31.2: @TestIterate.%.loc31_31.22 (%.57c) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc31_31.2 (constants.%impl.elem0.152)] // CHECK:STDOUT: %specific_impl_fn.loc31_31.6: = specific_impl_function %impl.elem0.loc31_31.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc31_31.6 (constants.%specific_impl_fn.9fb)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc27_74.1 (%R.as_type.c37)) { +// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc27_73.1 (%R.as_type.c37)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.e41 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc27_74.1 (%R.as_type.c37) = name_ref r, %r +// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc27_73.1 (%R.as_type.c37) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc31_31.1: @TestIterate.%.loc31_31.20 (%.592) = impl_witness_access constants.%Iterate.lookup_impl_witness.173, element2 [symbolic = %impl.elem2.loc31_31.2 (constants.%impl.elem2.ae2)] // CHECK:STDOUT: %bound_method.loc31_31.1: = bound_method %r.ref, %impl.elem2.loc31_31.1 // CHECK:STDOUT: %Iterate.facet.loc31_31.1: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] @@ -3342,19 +3342,19 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: specific @TestIterate(constants.%R.db4) { // CHECK:STDOUT: %R.patt.loc27_17.2 => constants.%R.patt.81e // CHECK:STDOUT: %R.loc27_17.1 => constants.%R.db4 -// CHECK:STDOUT: %R.as_type.loc27_74.1 => constants.%R.as_type.c37 +// CHECK:STDOUT: %R.as_type.loc27_73.1 => constants.%R.as_type.c37 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.17d -// CHECK:STDOUT: %r.param_patt.loc27_72.2 => constants.%r.param_patt.90c -// CHECK:STDOUT: %r.patt.loc27_72.2 => constants.%r.patt.d6c +// CHECK:STDOUT: %r.param_patt.loc27_71.2 => constants.%r.param_patt.90c +// CHECK:STDOUT: %r.patt.loc27_71.2 => constants.%r.patt.d6c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TestIterate(constants.%facet_value.19f) { // CHECK:STDOUT: %R.patt.loc27_17.2 => constants.%R.patt.81e // CHECK:STDOUT: %R.loc27_17.1 => constants.%facet_value.19f -// CHECK:STDOUT: %R.as_type.loc27_74.1 => constants.%ConstRange +// CHECK:STDOUT: %R.as_type.loc27_73.1 => constants.%ConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.025 -// CHECK:STDOUT: %r.param_patt.loc27_72.2 => constants.%r.param_patt.a73 -// CHECK:STDOUT: %r.patt.loc27_72.2 => constants.%r.patt.0e2 +// CHECK:STDOUT: %r.param_patt.loc27_71.2 => constants.%r.param_patt.a73 +// CHECK:STDOUT: %r.patt.loc27_71.2 => constants.%r.patt.0e2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc27 => constants.%complete_type.357 @@ -3502,7 +3502,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc27_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.173)] -// CHECK:STDOUT: %Iterate.facet.loc31_31.5: %Iterate.type = facet_value %R.as_type.loc27_74.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet)] +// CHECK:STDOUT: %Iterate.facet.loc31_31.5: %Iterate.type = facet_value %R.as_type.loc27_73.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet)] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc31_31.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.5cd)] // CHECK:STDOUT: %.loc31_31.20: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc31_31.5 [symbolic = %.loc31_31.20 (constants.%.592)] // CHECK:STDOUT: %impl.elem2.loc31_31.2: @TestIterate.%.loc31_31.20 (%.592) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc31_31.2 (constants.%impl.elem2.ae2)] @@ -3519,13 +3519,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %impl.elem0.loc31_31.2: @TestIterate.%.loc31_31.22 (%.57c) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc31_31.2 (constants.%impl.elem0.152)] // CHECK:STDOUT: %specific_impl_fn.loc31_31.6: = specific_impl_function %impl.elem0.loc31_31.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc31_31.6 (constants.%specific_impl_fn.9fb)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc27_74.1 (%R.as_type.c37)) { +// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc27_73.1 (%R.as_type.c37)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.e41 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc27_74.1 (%R.as_type.c37) = name_ref r, %r +// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc27_73.1 (%R.as_type.c37) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc31_31.1: @TestIterate.%.loc31_31.20 (%.592) = impl_witness_access constants.%Iterate.lookup_impl_witness.173, element2 [symbolic = %impl.elem2.loc31_31.2 (constants.%impl.elem2.ae2)] // CHECK:STDOUT: %bound_method.loc31_31.1: = bound_method %r.ref, %impl.elem2.loc31_31.1 // CHECK:STDOUT: %Iterate.facet.loc31_31.1: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet)] @@ -3685,10 +3685,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: specific @TestIterate(constants.%R.db4) { // CHECK:STDOUT: %R.patt.loc27_17.2 => constants.%R.patt.81e // CHECK:STDOUT: %R.loc27_17.1 => constants.%R.db4 -// CHECK:STDOUT: %R.as_type.loc27_74.1 => constants.%R.as_type.c37 +// CHECK:STDOUT: %R.as_type.loc27_73.1 => constants.%R.as_type.c37 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.17d -// CHECK:STDOUT: %r.param_patt.loc27_72.2 => constants.%r.param_patt -// CHECK:STDOUT: %r.patt.loc27_72.2 => constants.%r.patt +// CHECK:STDOUT: %r.param_patt.loc27_71.2 => constants.%r.param_patt +// CHECK:STDOUT: %r.patt.loc27_71.2 => constants.%r.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_adl_overloads.carbon @@ -3898,7 +3898,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc34_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.173)] -// CHECK:STDOUT: %Iterate.facet.loc38_31.5: %Iterate.type = facet_value %R.as_type.loc34_74.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %Iterate.facet.loc38_31.5: %Iterate.type = facet_value %R.as_type.loc34_73.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc38_31.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.5cd)] // CHECK:STDOUT: %.loc38_31.20: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc38_31.5 [symbolic = %.loc38_31.20 (constants.%.592)] // CHECK:STDOUT: %impl.elem2.loc38_31.2: @TestIterate.%.loc38_31.20 (%.592) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc38_31.2 (constants.%impl.elem2.ae2)] @@ -3915,13 +3915,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %impl.elem0.loc38_31.2: @TestIterate.%.loc38_31.22 (%.57c) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc38_31.2 (constants.%impl.elem0.152)] // CHECK:STDOUT: %specific_impl_fn.loc38_31.6: = specific_impl_function %impl.elem0.loc38_31.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc38_31.6 (constants.%specific_impl_fn.9fb)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc34_74.1 (%R.as_type.c37)) { +// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc34_73.1 (%R.as_type.c37)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.e41 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc34_74.1 (%R.as_type.c37) = name_ref r, %r +// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc34_73.1 (%R.as_type.c37) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc38_31.1: @TestIterate.%.loc38_31.20 (%.592) = impl_witness_access constants.%Iterate.lookup_impl_witness.173, element2 [symbolic = %impl.elem2.loc38_31.2 (constants.%impl.elem2.ae2)] // CHECK:STDOUT: %bound_method.loc38_31.1: = bound_method %r.ref, %impl.elem2.loc38_31.1 // CHECK:STDOUT: %Iterate.facet.loc38_31.1: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] @@ -4133,19 +4133,19 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: specific @TestIterate(constants.%R.db4) { // CHECK:STDOUT: %R.patt.loc34_17.2 => constants.%R.patt.81e // CHECK:STDOUT: %R.loc34_17.1 => constants.%R.db4 -// CHECK:STDOUT: %R.as_type.loc34_74.1 => constants.%R.as_type.c37 +// CHECK:STDOUT: %R.as_type.loc34_73.1 => constants.%R.as_type.c37 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.17d -// CHECK:STDOUT: %r.param_patt.loc34_72.2 => constants.%r.param_patt.90c -// CHECK:STDOUT: %r.patt.loc34_72.2 => constants.%r.patt.d6c +// CHECK:STDOUT: %r.param_patt.loc34_71.2 => constants.%r.param_patt.90c +// CHECK:STDOUT: %r.patt.loc34_71.2 => constants.%r.patt.d6c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TestIterate(constants.%facet_value.fb9) { // CHECK:STDOUT: %R.patt.loc34_17.2 => constants.%R.patt.81e // CHECK:STDOUT: %R.loc34_17.1 => constants.%facet_value.fb9 -// CHECK:STDOUT: %R.as_type.loc34_74.1 => constants.%MutableAndConstRange +// CHECK:STDOUT: %R.as_type.loc34_73.1 => constants.%MutableAndConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.394 -// CHECK:STDOUT: %r.param_patt.loc34_72.2 => constants.%r.param_patt.8bb -// CHECK:STDOUT: %r.patt.loc34_72.2 => constants.%r.patt.ac4 +// CHECK:STDOUT: %r.param_patt.loc34_71.2 => constants.%r.param_patt.8bb +// CHECK:STDOUT: %r.patt.loc34_71.2 => constants.%r.patt.ac4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc34 => constants.%complete_type.357 diff --git a/toolchain/check/testdata/interop/cpp/template/concept.carbon b/toolchain/check/testdata/interop/cpp/template/concept.carbon index 1e9fdc93ef91..aa18900b4b83 100644 --- a/toolchain/check/testdata/interop/cpp/template/concept.carbon +++ b/toolchain/check/testdata/interop/cpp/template/concept.carbon @@ -24,7 +24,7 @@ library "[[@TEST_NAME]]"; import Cpp library "concept.h"; -class X(B:! bool) { +class X(B: bool) { fn Make() -> Self { return {}; } } diff --git a/toolchain/check/testdata/interop/cpp/template/generic_call.carbon b/toolchain/check/testdata/interop/cpp/template/generic_call.carbon index b646132e06ff..78a7f4f199f7 100644 --- a/toolchain/check/testdata/interop/cpp/template/generic_call.carbon +++ b/toolchain/check/testdata/interop/cpp/template/generic_call.carbon @@ -23,7 +23,7 @@ library "[[@TEST_NAME]]"; import Cpp library "header.h"; -fn F[T:! type](unused x: T) { +fn F[T: type](unused x: T) { // TODO: This should be treated as being template-dependent on T, // and we should perform the call during monomorphization. // CHECK:STDERR: fail_todo_generic_call.carbon:[[@LINE+4]]:23: error: semantics TODO: `unsupported type used as template argument` [SemanticsTodo] diff --git a/toolchain/check/testdata/interop/cpp/var/import/constexpr.carbon b/toolchain/check/testdata/interop/cpp/var/import/constexpr.carbon index 48d47f00086f..1a082dc1b1ad 100644 --- a/toolchain/check/testdata/interop/cpp/var/import/constexpr.carbon +++ b/toolchain/check/testdata/interop/cpp/var/import/constexpr.carbon @@ -19,7 +19,7 @@ import Cpp inline ''' constexpr bool b = true; '''; -class C(B:! bool) {} +class C(B: bool) {} fn F() -> C(Cpp.b); let x: C(true) = F(); @@ -31,7 +31,7 @@ import Cpp inline ''' constexpr int i = 123; '''; -class C(I:! i32) {} +class C(I: i32) {} fn F() -> C(Cpp.i); let x: C(123) = F(); @@ -43,7 +43,7 @@ import Cpp inline ''' constexpr float flt = 123.5; '''; -class C(V:! f32) {} +class C(V: f32) {} fn F() -> C(Cpp.flt); let x: C(123.5) = F(); @@ -56,6 +56,6 @@ int i = 123; constexpr int* _Nonnull ptr = &i; '''; -class C(V:! i32*) {} +class C(V: i32*) {} fn F() -> C(Cpp.ptr); let x: C(&Cpp.i) = F(); diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index d82a39ff015b..af7f6e9f0698 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -22,11 +22,11 @@ library "[[@TEST_NAME]]"; class C { fn F() -> () { return x; } - // CHECK:STDERR: fail_let_after.carbon:[[@LINE+4]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] - // CHECK:STDERR: let x:! () = (); - // CHECK:STDERR: ^~~~~~ + // CHECK:STDERR: fail_let_after.carbon:[[@LINE+4]]:15: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] + // CHECK:STDERR: let generic x: () = (); + // CHECK:STDERR: ^~~~~ // CHECK:STDERR: - let x:! () = (); + let generic x: () = (); } // --- fail_let_before.carbon @@ -34,11 +34,11 @@ class C { library "[[@TEST_NAME]]"; class C { - // CHECK:STDERR: fail_let_before.carbon:[[@LINE+4]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] - // CHECK:STDERR: let x:! () = (); - // CHECK:STDERR: ^~~~~~ + // CHECK:STDERR: fail_let_before.carbon:[[@LINE+4]]:15: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] + // CHECK:STDERR: let generic x: () = (); + // CHECK:STDERR: ^~~~~ // CHECK:STDERR: - let x:! () = (); + let generic x: () = (); fn F() -> () { return x; } } @@ -47,28 +47,28 @@ class C { library "[[@TEST_NAME]]"; class C { - // CHECK:STDERR: fail_multiple_lets.carbon:[[@LINE+4]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] - // CHECK:STDERR: let a:! () = (); - // CHECK:STDERR: ^~~~~~ + // CHECK:STDERR: fail_multiple_lets.carbon:[[@LINE+4]]:15: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] + // CHECK:STDERR: let generic a: () = (); + // CHECK:STDERR: ^~~~~ // CHECK:STDERR: - let a:! () = (); - fn F(b:! ((),)) { - let c:! ((), ()) = ((), ()); + let generic a: () = (); + fn F(generic b: ((),)) { + let generic c: ((), ()) = ((), ()); var unused a1: () = a; var unused b1: ((),) = b; var unused c1: ((), ()) = c; var unused d1: ((), (), ()) = d; } - // CHECK:STDERR: fail_multiple_lets.carbon:[[@LINE+8]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] - // CHECK:STDERR: let d:! ((), (), ()) = ((), (), ()); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_multiple_lets.carbon:[[@LINE+8]]:15: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] + // CHECK:STDERR: let generic d: ((), (), ()) = ((), (), ()); + // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_multiple_lets.carbon:[[@LINE-11]]:9: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let c:! ((), ()) = ((), ()); - // CHECK:STDERR: ^~~~~~~~~~~~ + // CHECK:STDERR: fail_multiple_lets.carbon:[[@LINE-11]]:17: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic c: ((), ()) = ((), ()); + // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: - let d:! ((), (), ()) = ((), (), ()); + let generic d: ((), (), ()) = ((), (), ()); } // --- fail_invalid_let_after.carbon @@ -77,15 +77,15 @@ library "[[@TEST_NAME]]"; class C { fn F() -> () { return x; } - // CHECK:STDERR: fail_invalid_let_after.carbon:[[@LINE+8]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] - // CHECK:STDERR: let x:! (); - // CHECK:STDERR: ^~~~~~ + // CHECK:STDERR: fail_invalid_let_after.carbon:[[@LINE+8]]:15: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] + // CHECK:STDERR: let generic x: (); + // CHECK:STDERR: ^~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_invalid_let_after.carbon:[[@LINE+4]]:13: error: expected `=`; `let` declaration must have an initializer [ExpectedInitializerAfterLet] - // CHECK:STDERR: let x:! (); - // CHECK:STDERR: ^ + // CHECK:STDERR: fail_invalid_let_after.carbon:[[@LINE+4]]:20: error: expected `=`; `let` declaration must have an initializer [ExpectedInitializerAfterLet] + // CHECK:STDERR: let generic x: (); + // CHECK:STDERR: ^ // CHECK:STDERR: - let x:! (); + let generic x: (); } // --- fail_todo_use_in_function.carbon @@ -93,11 +93,11 @@ class C { library "[[@TEST_NAME]]"; fn F() -> i32 { - // CHECK:STDERR: fail_todo_use_in_function.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let Zero:! i32 = 0; - // CHECK:STDERR: ^~~~~~~~~~ + // CHECK:STDERR: fail_todo_use_in_function.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic Zero: i32 = 0; + // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: - let Zero:! i32 = 0; + let generic Zero: i32 = 0; return Zero; } @@ -107,11 +107,11 @@ library "[[@TEST_NAME]]"; fn F() -> i32 { if (true) { - // CHECK:STDERR: fail_todo_use_in_block.carbon:[[@LINE+4]]:9: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let Zero:! i32 = 0; - // CHECK:STDERR: ^~~~~~~~~~ + // CHECK:STDERR: fail_todo_use_in_block.carbon:[[@LINE+4]]:17: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic Zero: i32 = 0; + // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: - let Zero:! i32 = 0; + let generic Zero: i32 = 0; return Zero; } return 1; @@ -122,7 +122,7 @@ fn F() -> i32 { library "[[@TEST_NAME]]"; interface I { - let T:! type = i32; + let T: type = i32; fn F() -> T; } @@ -131,11 +131,11 @@ interface I { library "[[@TEST_NAME]]"; class I { - // CHECK:STDERR: fail_return_in_class.carbon:[[@LINE+4]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] - // CHECK:STDERR: let T:! type = i32; - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_return_in_class.carbon:[[@LINE+4]]:15: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] + // CHECK:STDERR: let generic T: type = i32; + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - let T:! type = i32; + let generic T: type = i32; // CHECK:STDERR: fail_return_in_class.carbon:[[@LINE+4]]:13: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: fn F() -> T; // CHECK:STDERR: ^ @@ -147,11 +147,11 @@ class I { library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_return_in_package_scope.carbon:[[@LINE+4]]:5: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] -// CHECK:STDERR: let T:! type = i32; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_return_in_package_scope.carbon:[[@LINE+4]]:13: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] +// CHECK:STDERR: let generic T: type = i32; +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -let T:! type = i32; +let generic T: type = i32; // CHECK:STDERR: fail_return_in_package_scope.carbon:[[@LINE+4]]:11: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: fn F() -> T; // CHECK:STDERR: ^ @@ -165,11 +165,11 @@ library "[[@TEST_NAME]]"; interface Empty {} impl i32 as Empty { - // CHECK:STDERR: fail_use_in_impl.carbon:[[@LINE+4]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] - // CHECK:STDERR: let Zero:! i32 = 0; - // CHECK:STDERR: ^~~~~~~~~~ + // CHECK:STDERR: fail_use_in_impl.carbon:[[@LINE+4]]:15: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] + // CHECK:STDERR: let generic Zero: i32 = 0; + // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: - let Zero:! i32 = 0; + let generic Zero: i32 = 0; } // CHECK:STDOUT: --- fail_let_after.carbon @@ -218,15 +218,15 @@ impl i32 as Empty { // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_17.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc10_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc10_17.2: %empty_tuple.type = converted %.loc10_17.1, %empty_tuple [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc10_12.1: type = splice_block %.loc10_12.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc10_24.2: %empty_tuple.type = converted %.loc10_24.1, %empty_tuple [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc10_19.1: type = splice_block %.loc10_19.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc10_12.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc10_12.3: type = converted %.loc10_12.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc10_19.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc10_19.3: type = converted %.loc10_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, %.loc10_17.2 +// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, %.loc10_24.2 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: %pattern_type = value_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: } @@ -285,15 +285,15 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc9_17.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_17.2: %empty_tuple.type = converted %.loc9_17.1, %empty_tuple [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_12.1: type = splice_block %.loc9_12.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc9_24.2: %empty_tuple.type = converted %.loc9_24.1, %empty_tuple [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_19.1: type = splice_block %.loc9_19.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_12.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_12.3: type = converted %.loc9_12.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc9_19.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_19.3: type = converted %.loc9_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, %.loc9_17.2 +// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, %.loc9_24.2 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: %pattern_type = value_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: } @@ -352,54 +352,54 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc9_17.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %empty_tuple.loc9: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_17.2: %empty_tuple.type = converted %.loc9_17.1, %empty_tuple.loc9 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_12.1: type = splice_block %.loc9_12.3 [concrete = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc9_24.2: %empty_tuple.type = converted %.loc9_24.1, %empty_tuple.loc9 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_19.1: type = splice_block %.loc9_19.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.Self.frozen.loc9: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_12.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc9_12.3: type = converted %.loc9_12.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc9_19.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc9_19.3: type = converted %.loc9_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, %.loc9_17.2 +// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, %.loc9_24.2 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %a.patt: %pattern_type.cb1 = value_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %C.F.decl: %C.F.type = fn_decl @C.F [concrete = constants.%C.F] { -// CHECK:STDOUT: %b.patt.loc10_9.1: %pattern_type.559 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_9.2 (constants.%b.patt)] +// CHECK:STDOUT: %b.patt.loc10_17.1: %pattern_type.559 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_17.2 (constants.%b.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_16.1: type = splice_block %.loc10_16.4 [concrete = constants.%tuple.type.9fb] { +// CHECK:STDOUT: %.loc10_23.1: type = splice_block %.loc10_23.4 [concrete = constants.%tuple.type.9fb] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc10_14: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc10_16.2: %tuple.type.9fb = tuple_literal (%.loc10_14) [concrete = constants.%tuple.f41] -// CHECK:STDOUT: %.loc10_16.3: type = converted constants.%empty_tuple, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc10_16.4: type = converted %.loc10_16.2, constants.%tuple.type.9fb [concrete = constants.%tuple.type.9fb] +// CHECK:STDOUT: %.loc10_21: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc10_23.2: %tuple.type.9fb = tuple_literal (%.loc10_21) [concrete = constants.%tuple.f41] +// CHECK:STDOUT: %.loc10_23.3: type = converted constants.%empty_tuple, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc10_23.4: type = converted %.loc10_23.2, constants.%tuple.type.9fb [concrete = constants.%tuple.type.9fb] // CHECK:STDOUT: } -// CHECK:STDOUT: %b.loc10_9.2: %tuple.type.9fb = symbolic_binding b, 0 [symbolic = %b.loc10_9.1 (constants.%b)] +// CHECK:STDOUT: %b.loc10_17.2: %tuple.type.9fb = symbolic_binding b, 0 [symbolic = %b.loc10_17.1 (constants.%b)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc26_28: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_32: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_36: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_37.1: %tuple.type.2d5 = tuple_literal (%.loc26_28, %.loc26_32, %.loc26_36) [concrete = constants.%tuple.7e4] -// CHECK:STDOUT: %empty_tuple.loc26_28: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_37.2: %empty_tuple.type = converted %.loc26_28, %empty_tuple.loc26_28 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %empty_tuple.loc26_32: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_37.3: %empty_tuple.type = converted %.loc26_32, %empty_tuple.loc26_32 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %empty_tuple.loc26_36: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_37.4: %empty_tuple.type = converted %.loc26_36, %empty_tuple.loc26_36 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %tuple: %tuple.type.2d5 = tuple_value (%.loc26_37.2, %.loc26_37.3, %.loc26_37.4) [concrete = constants.%tuple.7e4] -// CHECK:STDOUT: %.loc26_37.5: %tuple.type.2d5 = converted %.loc26_37.1, %tuple [concrete = constants.%tuple.7e4] -// CHECK:STDOUT: %.loc26_22.1: type = splice_block %.loc26_22.6 [concrete = constants.%tuple.type.2d5] { +// CHECK:STDOUT: %.loc26_35: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc26_39: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc26_43: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc26_44.1: %tuple.type.2d5 = tuple_literal (%.loc26_35, %.loc26_39, %.loc26_43) [concrete = constants.%tuple.7e4] +// CHECK:STDOUT: %empty_tuple.loc26_35: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc26_44.2: %empty_tuple.type = converted %.loc26_35, %empty_tuple.loc26_35 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %empty_tuple.loc26_39: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc26_44.3: %empty_tuple.type = converted %.loc26_39, %empty_tuple.loc26_39 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %empty_tuple.loc26_43: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc26_44.4: %empty_tuple.type = converted %.loc26_43, %empty_tuple.loc26_43 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %tuple: %tuple.type.2d5 = tuple_value (%.loc26_44.2, %.loc26_44.3, %.loc26_44.4) [concrete = constants.%tuple.7e4] +// CHECK:STDOUT: %.loc26_44.5: %tuple.type.2d5 = converted %.loc26_44.1, %tuple [concrete = constants.%tuple.7e4] +// CHECK:STDOUT: %.loc26_29.1: type = splice_block %.loc26_29.6 [concrete = constants.%tuple.type.2d5] { // CHECK:STDOUT: %.Self.frozen.loc26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc26_13: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_17: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_21: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_22.2: %tuple.type.2d5 = tuple_literal (%.loc26_13, %.loc26_17, %.loc26_21) [concrete = constants.%tuple.7e4] -// CHECK:STDOUT: %.loc26_22.3: type = converted constants.%empty_tuple, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc26_22.4: type = converted constants.%empty_tuple, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc26_22.5: type = converted constants.%empty_tuple, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc26_22.6: type = converted %.loc26_22.2, constants.%tuple.type.2d5 [concrete = constants.%tuple.type.2d5] +// CHECK:STDOUT: %.loc26_20: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc26_24: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc26_28: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc26_29.2: %tuple.type.2d5 = tuple_literal (%.loc26_20, %.loc26_24, %.loc26_28) [concrete = constants.%tuple.7e4] +// CHECK:STDOUT: %.loc26_29.3: type = converted constants.%empty_tuple, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc26_29.4: type = converted constants.%empty_tuple, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc26_29.5: type = converted constants.%empty_tuple, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc26_29.6: type = converted %.loc26_29.2, constants.%tuple.type.2d5 [concrete = constants.%tuple.type.2d5] // CHECK:STDOUT: } -// CHECK:STDOUT: %d: %tuple.type.2d5 = wrapper_binding d, %.loc26_37.5 +// CHECK:STDOUT: %d: %tuple.type.2d5 = wrapper_binding d, %.loc26_44.5 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %d.patt: %pattern_type.8c1 = value_binding_pattern d [concrete = constants.%d.patt] // CHECK:STDOUT: } @@ -413,16 +413,16 @@ impl i32 as Empty { // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @C.F(%b.loc10_9.2: %tuple.type.9fb) { -// CHECK:STDOUT: %b.patt.loc10_9.2: %pattern_type.559 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_9.2 (constants.%b.patt)] -// CHECK:STDOUT: %b.loc10_9.1: %tuple.type.9fb = symbolic_binding b, 0 [symbolic = %b.loc10_9.1 (constants.%b)] +// CHECK:STDOUT: generic fn @C.F(%b.loc10_17.2: %tuple.type.9fb) { +// CHECK:STDOUT: %b.patt.loc10_17.2: %pattern_type.559 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_17.2 (constants.%b.patt)] +// CHECK:STDOUT: %b.loc10_17.1: %tuple.type.9fb = symbolic_binding b, 0 [symbolic = %b.loc10_17.1 (constants.%b)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.F(constants.%b) { -// CHECK:STDOUT: %b.patt.loc10_9.2 => constants.%b.patt -// CHECK:STDOUT: %b.loc10_9.1 => constants.%b +// CHECK:STDOUT: %b.patt.loc10_17.2 => constants.%b.patt +// CHECK:STDOUT: %b.loc10_17.1 => constants.%b // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_invalid_let_after.carbon @@ -478,12 +478,12 @@ impl i32 as Empty { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %C.F.decl -// CHECK:STDOUT: .x = .inst{{[0-9A-F]+}}.loc14_8 +// CHECK:STDOUT: .x = .inst{{[0-9A-F]+}}.loc14_16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.F() -> out %return.param: %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, .inst{{[0-9A-F]+}}.loc14_8 +// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, .inst{{[0-9A-F]+}}.loc14_16 // CHECK:STDOUT: %.loc5_25: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_26: init %empty_tuple.type = converted %x.ref, %.loc5_25 [concrete = constants.%empty_tuple] // CHECK:STDOUT: return %.loc5_26 @@ -643,9 +643,9 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: class @I { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.2 [concrete = type] { +// CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_11.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T: type = wrapper_binding T, %i32 // CHECK:STDOUT: name_binding_decl { @@ -699,9 +699,9 @@ impl i32 as Empty { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc8_9.1: type = splice_block %.loc8_9.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_16.1: type = splice_block %.loc8_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_9.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T: type = wrapper_binding T, @__global_init.%i32 // CHECK:STDOUT: name_binding_decl { @@ -801,17 +801,17 @@ impl i32 as Empty { // CHECK:STDOUT: impl @i32.as.Empty.impl: %i32.loc6 as %Empty.ref { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] -// CHECK:STDOUT: %bound_method.loc11_20.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] +// CHECK:STDOUT: %bound_method.loc11_27.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_20.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc11_20.2(%int_0) [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc11_20.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc11_20.2: %i32 = converted %int_0, %.loc11_20.1 [concrete = constants.%int_0.3c0] -// CHECK:STDOUT: %.loc11_14: type = splice_block %i32.loc11 [concrete = constants.%i32] { +// CHECK:STDOUT: %bound_method.loc11_27.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc11_27.2(%int_0) [concrete = constants.%int_0.3c0] +// CHECK:STDOUT: %.loc11_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.3c0] +// CHECK:STDOUT: %.loc11_27.2: %i32 = converted %int_0, %.loc11_27.1 [concrete = constants.%int_0.3c0] +// CHECK:STDOUT: %.loc11_21: type = splice_block %i32.loc11 [concrete = constants.%i32] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %i32.loc11: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %Zero: %i32 = wrapper_binding Zero, %.loc11_20.2 +// CHECK:STDOUT: %Zero: %i32 = wrapper_binding Zero, %.loc11_27.2 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %Zero.patt: %pattern_type.6b6 = value_binding_pattern Zero [concrete = constants.%Zero.patt] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/fail_generic.carbon b/toolchain/check/testdata/let/fail_generic.carbon index 81cc6163b21d..ed432b7c1f76 100644 --- a/toolchain/check/testdata/let/fail_generic.carbon +++ b/toolchain/check/testdata/let/fail_generic.carbon @@ -14,11 +14,11 @@ // TODO: Should this be valid? fn F(unused a: i32) -> i32 { - // CHECK:STDERR: fail_generic.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let T:! type = i32; - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_generic.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic T: type = i32; + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - let T:! type = i32; + let generic T: type = i32; let x: T = 5; return x; } diff --git a/toolchain/check/testdata/let/fail_generic_import.carbon b/toolchain/check/testdata/let/fail_generic_import.carbon index fb839df9f0ca..ffff5fcb4962 100644 --- a/toolchain/check/testdata/let/fail_generic_import.carbon +++ b/toolchain/check/testdata/let/fail_generic_import.carbon @@ -16,11 +16,11 @@ package Implicit; -// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:5: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] -// CHECK:STDERR: let T:! type = i32; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:13: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] +// CHECK:STDERR: let generic T: type = i32; +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -let T:! type = i32; +let generic T: type = i32; // --- fail_implicit.impl.carbon @@ -61,9 +61,9 @@ let a: T = 0; // CHECK:STDOUT: .T = %T // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc8_9.1: type = splice_block %.loc8_9.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_16.1: type = splice_block %.loc8_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_9.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T: type = wrapper_binding T, @__global_init.%i32 // CHECK:STDOUT: name_binding_decl { diff --git a/toolchain/check/testdata/let/generic.carbon b/toolchain/check/testdata/let/generic.carbon index 294a0048b138..a81ce32e7556 100644 --- a/toolchain/check/testdata/let/generic.carbon +++ b/toolchain/check/testdata/let/generic.carbon @@ -16,11 +16,11 @@ library "[[@TEST_NAME]]"; fn F() { - // CHECK:STDERR: fail_todo_type.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let T:! type = i32; - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_todo_type.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic T: type = i32; + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - let T:! type = i32; + let generic T: type = i32; var p: T*; let unused a: T = *p; } @@ -29,11 +29,11 @@ fn F() { library "[[@TEST_NAME]]"; fn F(a: i32) -> i32 { - // CHECK:STDERR: fail_todo_assignment.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let T:! type = i32; - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_todo_assignment.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic T: type = i32; + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - let T:! type = i32; + let generic T: type = i32; let x: T = 5; return x; } diff --git a/toolchain/check/testdata/let/generic_import.carbon b/toolchain/check/testdata/let/generic_import.carbon index 5f7948f93a41..12b525919090 100644 --- a/toolchain/check/testdata/let/generic_import.carbon +++ b/toolchain/check/testdata/let/generic_import.carbon @@ -16,11 +16,11 @@ package Implicit; -// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:5: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] -// CHECK:STDERR: let T:! type = i32; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:13: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] +// CHECK:STDERR: let generic T: type = i32; +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -let T:! type = i32; +let generic T: type = i32; // --- fail_implicit.impl.carbon @@ -65,9 +65,9 @@ var b: T = *a; // CHECK:STDOUT: .T = %T // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc8_9.1: type = splice_block %.loc8_9.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_16.1: type = splice_block %.loc8_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_9.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T: type = wrapper_binding T, @__global_init.%i32 // CHECK:STDOUT: name_binding_decl { diff --git a/toolchain/check/testdata/let/local.carbon b/toolchain/check/testdata/let/local.carbon index 2f5bb6f4e7e4..947c30ab21c9 100644 --- a/toolchain/check/testdata/let/local.carbon +++ b/toolchain/check/testdata/let/local.carbon @@ -29,11 +29,11 @@ fn F(_: C) {} fn CallF() { //@dump-sem-ir-begin - // CHECK:STDERR: fail_todo_symbolic.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let c:! C = {}; - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: fail_todo_symbolic.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic c: C = {}; + // CHECK:STDERR: ^~~~ // CHECK:STDERR: - let c:! C = {}; + let generic c: C = {}; F(c); //@dump-sem-ir-end } diff --git a/toolchain/check/testdata/named_constraint/convert.carbon b/toolchain/check/testdata/named_constraint/convert.carbon index 7da248d2e528..6b2584b22c12 100644 --- a/toolchain/check/testdata/named_constraint/convert.carbon +++ b/toolchain/check/testdata/named_constraint/convert.carbon @@ -15,10 +15,10 @@ library "[[@TEST_NAME]]"; constraint E {} -fn F(unused T:! E) {} +fn F(unused generic T: E) {} //@dump-sem-ir-begin -fn G(T:! E & E) { +fn G(generic T: E & E) { F(T); } //@dump-sem-ir-end @@ -29,10 +29,10 @@ library "[[@TEST_NAME]]"; constraint E1 {} constraint E2 {} -fn F(unused T:! E1) {} +fn F(unused generic T: E1) {} //@dump-sem-ir-begin -fn G(T:! E2) { +fn G(generic T: E2) { F(T); } //@dump-sem-ir-end @@ -46,12 +46,12 @@ constraint E { require impls Z; } -fn F(unused T:! E) {} +fn F(unused generic T: E) {} class C {} impl C as Z {} -fn G(T:! Z) { +fn G(generic T: Z) { // Anything that impls Z also impls E, since that's all it requires. Nothing // needs to specify that T impls E. F(T); @@ -91,33 +91,33 @@ fn G(T:! Z) { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc8_7.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt.3a0592.2)] +// CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt.3a0592.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.3 [concrete = constants.%E.type] { +// CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.3 [concrete = constants.%E.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %E.ref.loc8_10: type = name_ref E, file.%E.decl [concrete = constants.%E.type] -// CHECK:STDOUT: %E.ref.loc8_14: type = name_ref E, file.%E.decl [concrete = constants.%E.type] +// CHECK:STDOUT: %E.ref.loc8_17: type = name_ref E, file.%E.decl [concrete = constants.%E.type] +// CHECK:STDOUT: %E.ref.loc8_21: type = name_ref E, file.%E.decl [concrete = constants.%E.type] // CHECK:STDOUT: %impl.elem0: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method: = bound_method %E.ref.loc8_10, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%E.ref.loc8_10, %E.ref.loc8_14) [concrete = constants.%E.type] -// CHECK:STDOUT: %.loc8_12.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%E.type] -// CHECK:STDOUT: %.loc8_12.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc8_12.2 [concrete = constants.%E.type] +// CHECK:STDOUT: %bound_method: = bound_method %E.ref.loc8_17, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%E.ref.loc8_17, %E.ref.loc8_21) [concrete = constants.%E.type] +// CHECK:STDOUT: %.loc8_19.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%E.type] +// CHECK:STDOUT: %.loc8_19.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc8_19.2 [concrete = constants.%E.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_7.2: %E.type = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T.f45530.2)] +// CHECK:STDOUT: %T.loc8_15.2: %E.type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T.f45530.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc8_7.2: %E.type) { -// CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt.3a0592.2)] -// CHECK:STDOUT: %T.loc8_7.1: %E.type = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T.f45530.2)] +// CHECK:STDOUT: generic fn @G(%T.loc8_15.2: %E.type) { +// CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt.3a0592.2)] +// CHECK:STDOUT: %T.loc8_15.1: %E.type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T.f45530.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %F.specific_fn.loc9_3.2: = specific_function constants.%F, @F(%T.loc8_7.1) [symbolic = %F.specific_fn.loc9_3.2 (constants.%F.specific_fn)] +// CHECK:STDOUT: %F.specific_fn.loc9_3.2: = specific_function constants.%F, @F(%T.loc8_15.1) [symbolic = %F.specific_fn.loc9_3.2 (constants.%F.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref: %E.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T.f45530.2)] +// CHECK:STDOUT: %T.ref: %E.type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T.f45530.2)] // CHECK:STDOUT: %F.specific_fn.loc9_3.1: = specific_function %F.ref, @F(constants.%T.f45530.2) [symbolic = %F.specific_fn.loc9_3.2 (constants.%F.specific_fn)] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn.loc9_3.1() // CHECK:STDOUT: return @@ -127,8 +127,8 @@ fn G(T:! Z) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T.f45530.2) { -// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt.3a0592.2 -// CHECK:STDOUT: %T.loc8_7.1 => constants.%T.f45530.2 +// CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt.3a0592.2 +// CHECK:STDOUT: %T.loc8_15.1 => constants.%T.f45530.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- compatible_constraints.carbon @@ -153,29 +153,29 @@ fn G(T:! Z) { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc9_7.1: %pattern_type.9a587c.2 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.3a0592.2)] +// CHECK:STDOUT: %T.patt.loc9_15.1: %pattern_type.9a587c.2 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt.3a0592.2)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9: type = splice_block %E2.ref [concrete = constants.%E2.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %E2.ref: type = name_ref E2, file.%E2.decl [concrete = constants.%E2.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc9_7.2: %E2.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.f45530.2)] +// CHECK:STDOUT: %T.loc9_15.2: %E2.type = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T.f45530.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc9_7.2: %E2.type) { -// CHECK:STDOUT: %T.patt.loc9_7.2: %pattern_type.9a587c.2 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.3a0592.2)] -// CHECK:STDOUT: %T.loc9_7.1: %E2.type = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.f45530.2)] +// CHECK:STDOUT: generic fn @G(%T.loc9_15.2: %E2.type) { +// CHECK:STDOUT: %T.patt.loc9_15.2: %pattern_type.9a587c.2 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt.3a0592.2)] +// CHECK:STDOUT: %T.loc9_15.1: %E2.type = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T.f45530.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc10_6.2: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc10_6.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc10_6.2: type = facet_access_type %T.loc9_15.1 [symbolic = %T.as_type.loc10_6.2 (constants.%T.as_type)] // CHECK:STDOUT: %E1.facet.loc10_6.2: %E1.type = facet_value %T.as_type.loc10_6.2, () [symbolic = %E1.facet.loc10_6.2 (constants.%E1.facet)] // CHECK:STDOUT: %F.specific_fn.loc10_3.2: = specific_function constants.%F, @F(%E1.facet.loc10_6.2) [symbolic = %F.specific_fn.loc10_3.2 (constants.%F.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref: %E2.type = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.f45530.2)] +// CHECK:STDOUT: %T.ref: %E2.type = name_ref T, %T.loc9_15.2 [symbolic = %T.loc9_15.1 (constants.%T.f45530.2)] // CHECK:STDOUT: %T.as_type.loc10_6.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc10_6.2 (constants.%T.as_type)] // CHECK:STDOUT: %E1.facet.loc10_6.1: %E1.type = facet_value %T.as_type.loc10_6.1, () [symbolic = %E1.facet.loc10_6.2 (constants.%E1.facet)] // CHECK:STDOUT: %.loc10: %E1.type = converted %T.ref, %E1.facet.loc10_6.1 [symbolic = %E1.facet.loc10_6.2 (constants.%E1.facet)] @@ -188,7 +188,7 @@ fn G(T:! Z) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T.f45530.2) { -// CHECK:STDOUT: %T.patt.loc9_7.2 => constants.%T.patt.3a0592.2 -// CHECK:STDOUT: %T.loc9_7.1 => constants.%T.f45530.2 +// CHECK:STDOUT: %T.patt.loc9_15.2 => constants.%T.patt.3a0592.2 +// CHECK:STDOUT: %T.loc9_15.1 => constants.%T.f45530.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/named_constraint/empty.carbon b/toolchain/check/testdata/named_constraint/empty.carbon index 4bfdee9a2796..60a3cf61baca 100644 --- a/toolchain/check/testdata/named_constraint/empty.carbon +++ b/toolchain/check/testdata/named_constraint/empty.carbon @@ -16,13 +16,13 @@ constraint Empty {} // Like `type`. // //@dump-sem-ir-begin -fn F(unused T:! Empty) {} +fn F(unused generic T: Empty) {} //@dump-sem-ir-end interface Z {} //@dump-sem-ir-begin -fn G(T:! Z, U:! type, V:! Empty) { +fn G(generic T: Z, generic U: type, generic V: Empty) { F({}); F(type); F(T); @@ -70,40 +70,40 @@ fn G(T:! Z, U:! type, V:! Empty) { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc19_14.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_14.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc19_22.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_22.2 (constants.%T.patt.3a0)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc19: type = splice_block %Empty.ref [concrete = constants.%Empty.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc19_14.2: %Empty.type = symbolic_binding T, 0 [symbolic = %T.loc19_14.1 (constants.%T.f45)] +// CHECK:STDOUT: %T.loc19_22.2: %Empty.type = symbolic_binding T, 0 [symbolic = %T.loc19_22.1 (constants.%T.f45)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc25_7.1: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_7.2 (constants.%T.patt.4a7)] -// CHECK:STDOUT: %U.patt.loc25_14.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc25_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %V.patt.loc25_24.1: %pattern_type.9a5 = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc25_24.2 (constants.%V.patt)] +// CHECK:STDOUT: %T.patt.loc25_15.1: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_15.2 (constants.%T.patt.4a7)] +// CHECK:STDOUT: %U.patt.loc25_29.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc25_29.2 (constants.%U.patt)] +// CHECK:STDOUT: %V.patt.loc25_46.1: %pattern_type.9a5 = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc25_46.2 (constants.%V.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc25_10: type = splice_block %Z.ref [concrete = constants.%Z.type] { -// CHECK:STDOUT: %.Self.frozen.loc25_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc25_17: type = splice_block %Z.ref [concrete = constants.%Z.type] { +// CHECK:STDOUT: %.Self.frozen.loc25_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc25_7.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc25_7.1 (constants.%T.013)] -// CHECK:STDOUT: %.loc25_17.1: type = splice_block %.loc25_17.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc25_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc25_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %T.loc25_15.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc25_15.1 (constants.%T.013)] +// CHECK:STDOUT: %.loc25_31.1: type = splice_block %.loc25_31.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc25_29: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc25_31.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc25_14.2: type = symbolic_binding U, 1 [symbolic = %U.loc25_14.1 (constants.%U)] -// CHECK:STDOUT: %.loc25_27: type = splice_block %Empty.ref [concrete = constants.%Empty.type] { -// CHECK:STDOUT: %.Self.frozen.loc25_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %U.loc25_29.2: type = symbolic_binding U, 1 [symbolic = %U.loc25_29.1 (constants.%U)] +// CHECK:STDOUT: %.loc25_48: type = splice_block %Empty.ref [concrete = constants.%Empty.type] { +// CHECK:STDOUT: %.Self.frozen.loc25_46: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %V.loc25_24.2: %Empty.type = symbolic_binding V, 2 [symbolic = %V.loc25_24.1 (constants.%V)] +// CHECK:STDOUT: %V.loc25_46.2: %Empty.type = symbolic_binding V, 2 [symbolic = %V.loc25_46.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc19_14.2: %Empty.type) { -// CHECK:STDOUT: %T.patt.loc19_14.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_14.2 (constants.%T.patt.3a0)] -// CHECK:STDOUT: %T.loc19_14.1: %Empty.type = symbolic_binding T, 0 [symbolic = %T.loc19_14.1 (constants.%T.f45)] +// CHECK:STDOUT: generic fn @F(%T.loc19_22.2: %Empty.type) { +// CHECK:STDOUT: %T.patt.loc19_22.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_22.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.loc19_22.1: %Empty.type = symbolic_binding T, 0 [symbolic = %T.loc19_22.1 (constants.%T.f45)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -115,21 +115,21 @@ fn G(T:! Z, U:! type, V:! Empty) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc25_7.2: %Z.type, %U.loc25_14.2: type, %V.loc25_24.2: %Empty.type) { -// CHECK:STDOUT: %T.patt.loc25_7.2: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_7.2 (constants.%T.patt.4a7)] -// CHECK:STDOUT: %T.loc25_7.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc25_7.1 (constants.%T.013)] -// CHECK:STDOUT: %U.patt.loc25_14.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc25_14.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc25_14.1: type = symbolic_binding U, 1 [symbolic = %U.loc25_14.1 (constants.%U)] -// CHECK:STDOUT: %V.patt.loc25_24.2: %pattern_type.9a5 = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc25_24.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.loc25_24.1: %Empty.type = symbolic_binding V, 2 [symbolic = %V.loc25_24.1 (constants.%V)] +// CHECK:STDOUT: generic fn @G(%T.loc25_15.2: %Z.type, %U.loc25_29.2: type, %V.loc25_46.2: %Empty.type) { +// CHECK:STDOUT: %T.patt.loc25_15.2: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_15.2 (constants.%T.patt.4a7)] +// CHECK:STDOUT: %T.loc25_15.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc25_15.1 (constants.%T.013)] +// CHECK:STDOUT: %U.patt.loc25_29.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc25_29.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc25_29.1: type = symbolic_binding U, 1 [symbolic = %U.loc25_29.1 (constants.%U)] +// CHECK:STDOUT: %V.patt.loc25_46.2: %pattern_type.9a5 = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc25_46.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.loc25_46.1: %Empty.type = symbolic_binding V, 2 [symbolic = %V.loc25_46.1 (constants.%V)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc28_6.2: type = facet_access_type %T.loc25_7.1 [symbolic = %T.as_type.loc28_6.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc28_6.2: type = facet_access_type %T.loc25_15.1 [symbolic = %T.as_type.loc28_6.2 (constants.%T.as_type)] // CHECK:STDOUT: %Empty.facet.loc28_6.2: %Empty.type = facet_value %T.as_type.loc28_6.2, () [symbolic = %Empty.facet.loc28_6.2 (constants.%Empty.facet.aa1)] // CHECK:STDOUT: %F.specific_fn.loc28_3.2: = specific_function constants.%F, @F(%Empty.facet.loc28_6.2) [symbolic = %F.specific_fn.loc28_3.2 (constants.%F.specific_fn.40a)] -// CHECK:STDOUT: %Empty.facet.loc29_6.2: %Empty.type = facet_value %U.loc25_14.1, () [symbolic = %Empty.facet.loc29_6.2 (constants.%Empty.facet.380)] +// CHECK:STDOUT: %Empty.facet.loc29_6.2: %Empty.type = facet_value %U.loc25_29.1, () [symbolic = %Empty.facet.loc29_6.2 (constants.%Empty.facet.380)] // CHECK:STDOUT: %F.specific_fn.loc29_3.2: = specific_function constants.%F, @F(%Empty.facet.loc29_6.2) [symbolic = %F.specific_fn.loc29_3.2 (constants.%F.specific_fn.10e)] -// CHECK:STDOUT: %F.specific_fn.loc30_3.2: = specific_function constants.%F, @F(%V.loc25_24.1) [symbolic = %F.specific_fn.loc30_3.2 (constants.%F.specific_fn.b7e)] +// CHECK:STDOUT: %F.specific_fn.loc30_3.2: = specific_function constants.%F, @F(%V.loc25_46.1) [symbolic = %F.specific_fn.loc30_3.2 (constants.%F.specific_fn.b7e)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -146,20 +146,20 @@ fn G(T:! Z, U:! type, V:! Empty) { // CHECK:STDOUT: %F.specific_fn.loc27: = specific_function %F.ref.loc27, @F(constants.%Empty.facet.2cb) [concrete = constants.%F.specific_fn.3c6] // CHECK:STDOUT: %F.call.loc27: init %empty_tuple.type = call %F.specific_fn.loc27() // CHECK:STDOUT: %F.ref.loc28: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref: %Z.type = name_ref T, %T.loc25_7.2 [symbolic = %T.loc25_7.1 (constants.%T.013)] +// CHECK:STDOUT: %T.ref: %Z.type = name_ref T, %T.loc25_15.2 [symbolic = %T.loc25_15.1 (constants.%T.013)] // CHECK:STDOUT: %T.as_type.loc28_6.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc28_6.2 (constants.%T.as_type)] // CHECK:STDOUT: %Empty.facet.loc28_6.1: %Empty.type = facet_value %T.as_type.loc28_6.1, () [symbolic = %Empty.facet.loc28_6.2 (constants.%Empty.facet.aa1)] // CHECK:STDOUT: %.loc28: %Empty.type = converted %T.ref, %Empty.facet.loc28_6.1 [symbolic = %Empty.facet.loc28_6.2 (constants.%Empty.facet.aa1)] // CHECK:STDOUT: %F.specific_fn.loc28_3.1: = specific_function %F.ref.loc28, @F(constants.%Empty.facet.aa1) [symbolic = %F.specific_fn.loc28_3.2 (constants.%F.specific_fn.40a)] // CHECK:STDOUT: %F.call.loc28: init %empty_tuple.type = call %F.specific_fn.loc28_3.1() // CHECK:STDOUT: %F.ref.loc29: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc25_14.2 [symbolic = %U.loc25_14.1 (constants.%U)] +// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc25_29.2 [symbolic = %U.loc25_29.1 (constants.%U)] // CHECK:STDOUT: %Empty.facet.loc29_6.1: %Empty.type = facet_value %U.ref, () [symbolic = %Empty.facet.loc29_6.2 (constants.%Empty.facet.380)] // CHECK:STDOUT: %.loc29: %Empty.type = converted %U.ref, %Empty.facet.loc29_6.1 [symbolic = %Empty.facet.loc29_6.2 (constants.%Empty.facet.380)] // CHECK:STDOUT: %F.specific_fn.loc29_3.1: = specific_function %F.ref.loc29, @F(constants.%Empty.facet.380) [symbolic = %F.specific_fn.loc29_3.2 (constants.%F.specific_fn.10e)] // CHECK:STDOUT: %F.call.loc29: init %empty_tuple.type = call %F.specific_fn.loc29_3.1() // CHECK:STDOUT: %F.ref.loc30: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %V.ref: %Empty.type = name_ref V, %V.loc25_24.2 [symbolic = %V.loc25_24.1 (constants.%V)] +// CHECK:STDOUT: %V.ref: %Empty.type = name_ref V, %V.loc25_46.2 [symbolic = %V.loc25_46.1 (constants.%V)] // CHECK:STDOUT: %F.specific_fn.loc30_3.1: = specific_function %F.ref.loc30, @F(constants.%V) [symbolic = %F.specific_fn.loc30_3.2 (constants.%F.specific_fn.b7e)] // CHECK:STDOUT: %F.call.loc30: init %empty_tuple.type = call %F.specific_fn.loc30_3.1() // CHECK:STDOUT: return @@ -169,50 +169,50 @@ fn G(T:! Z, U:! type, V:! Empty) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.f45) { -// CHECK:STDOUT: %T.patt.loc19_14.2 => constants.%T.patt.3a0 -// CHECK:STDOUT: %T.loc19_14.1 => constants.%T.f45 +// CHECK:STDOUT: %T.patt.loc19_22.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc19_22.1 => constants.%T.f45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T.013, constants.%U, constants.%V) { -// CHECK:STDOUT: %T.patt.loc25_7.2 => constants.%T.patt.4a7 -// CHECK:STDOUT: %T.loc25_7.1 => constants.%T.013 -// CHECK:STDOUT: %U.patt.loc25_14.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc25_14.1 => constants.%U -// CHECK:STDOUT: %V.patt.loc25_24.2 => constants.%V.patt -// CHECK:STDOUT: %V.loc25_24.1 => constants.%V +// CHECK:STDOUT: %T.patt.loc25_15.2 => constants.%T.patt.4a7 +// CHECK:STDOUT: %T.loc25_15.1 => constants.%T.013 +// CHECK:STDOUT: %U.patt.loc25_29.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc25_29.1 => constants.%U +// CHECK:STDOUT: %V.patt.loc25_46.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc25_46.1 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Empty.facet.76f) { -// CHECK:STDOUT: %T.patt.loc19_14.2 => constants.%T.patt.3a0 -// CHECK:STDOUT: %T.loc19_14.1 => constants.%Empty.facet.76f +// CHECK:STDOUT: %T.patt.loc19_22.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc19_22.1 => constants.%Empty.facet.76f // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Empty.facet.2cb) { -// CHECK:STDOUT: %T.patt.loc19_14.2 => constants.%T.patt.3a0 -// CHECK:STDOUT: %T.loc19_14.1 => constants.%Empty.facet.2cb +// CHECK:STDOUT: %T.patt.loc19_22.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc19_22.1 => constants.%Empty.facet.2cb // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Empty.facet.aa1) { -// CHECK:STDOUT: %T.patt.loc19_14.2 => constants.%T.patt.3a0 -// CHECK:STDOUT: %T.loc19_14.1 => constants.%Empty.facet.aa1 +// CHECK:STDOUT: %T.patt.loc19_22.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc19_22.1 => constants.%Empty.facet.aa1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Empty.facet.380) { -// CHECK:STDOUT: %T.patt.loc19_14.2 => constants.%T.patt.3a0 -// CHECK:STDOUT: %T.loc19_14.1 => constants.%Empty.facet.380 +// CHECK:STDOUT: %T.patt.loc19_22.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc19_22.1 => constants.%Empty.facet.380 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%V) { -// CHECK:STDOUT: %T.patt.loc19_14.2 => constants.%T.patt.3a0 -// CHECK:STDOUT: %T.loc19_14.1 => constants.%V +// CHECK:STDOUT: %T.patt.loc19_22.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc19_22.1 => constants.%V // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/named_constraint/empty_generic.carbon b/toolchain/check/testdata/named_constraint/empty_generic.carbon index c8a237d0ada1..775088da5f34 100644 --- a/toolchain/check/testdata/named_constraint/empty_generic.carbon +++ b/toolchain/check/testdata/named_constraint/empty_generic.carbon @@ -13,11 +13,11 @@ interface Z {} //@dump-sem-ir-begin -constraint Empty(T:! type) {} +constraint Empty(T: type) {} -fn F(T:! type, unused U:! Empty(T)) {} +fn F(generic T: type, unused generic U: Empty(T)) {} -fn G(T:! Z, U:! Empty(T), V:! type) { +fn G(generic T: Z, generic U: Empty(T), generic V: type) { F(T, {} as type); F(T, type); F(T, T); @@ -79,53 +79,53 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: %Empty.decl: %Empty.type.f30 = constraint_decl @Empty [concrete = constants.%empty_struct.26b] { // CHECK:STDOUT: %T.patt.loc16_19.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_19.2 (constants.%T.patt.d47)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_22.1: type = splice_block %.loc16_22.2 [concrete = type] { +// CHECK:STDOUT: %.loc16_21.1: type = splice_block %.loc16_21.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc16_22.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc16_21.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc16_19.2: type = symbolic_binding T, 0 [symbolic = %T.loc16_19.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc18_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_7.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %U.patt.loc18_24.1: @F.%pattern_type (%pattern_type.9a587c.1) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc18_24.2 (constants.%U.patt.cb839c.1)] +// CHECK:STDOUT: %T.patt.loc18_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_15.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %U.patt.loc18_39.1: @F.%pattern_type (%pattern_type.9a587c.1) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc18_39.2 (constants.%U.patt.cb839c.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_10.1: type = splice_block %.loc18_10.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc18_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc18_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc18_17.1: type = splice_block %.loc18_17.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc18_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc18_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc18_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc18_7.1 (constants.%T.67d)] -// CHECK:STDOUT: %.loc18_34: type = splice_block %Empty.type.loc18_34.2 [symbolic = %Empty.type.loc18_34.1 (constants.%Empty.type.d682d6.1)] { -// CHECK:STDOUT: %.Self.frozen.loc18_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %T.loc18_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc18_15.1 (constants.%T.67d)] +// CHECK:STDOUT: %.loc18_48: type = splice_block %Empty.type.loc18_48.2 [symbolic = %Empty.type.loc18_48.1 (constants.%Empty.type.d682d6.1)] { +// CHECK:STDOUT: %.Self.frozen.loc18_39: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Empty.ref: %Empty.type.f30 = name_ref Empty, file.%Empty.decl [concrete = constants.%empty_struct.26b] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc18_7.2 [symbolic = %T.loc18_7.1 (constants.%T.67d)] -// CHECK:STDOUT: %Empty.type.loc18_34.2: type = facet_type <@Empty, @Empty(constants.%T.67d)> [symbolic = %Empty.type.loc18_34.1 (constants.%Empty.type.d682d6.1)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc18_15.2 [symbolic = %T.loc18_15.1 (constants.%T.67d)] +// CHECK:STDOUT: %Empty.type.loc18_48.2: type = facet_type <@Empty, @Empty(constants.%T.67d)> [symbolic = %Empty.type.loc18_48.1 (constants.%Empty.type.d682d6.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc18_24.2: @F.%Empty.type.loc18_34.1 (%Empty.type.d682d6.1) = symbolic_binding U, 1 [symbolic = %U.loc18_24.1 (constants.%U.e1f642.1)] +// CHECK:STDOUT: %U.loc18_39.2: @F.%Empty.type.loc18_48.1 (%Empty.type.d682d6.1) = symbolic_binding U, 1 [symbolic = %U.loc18_39.1 (constants.%U.e1f642.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc20_7.1: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_7.2 (constants.%T.patt.4a7)] -// CHECK:STDOUT: %U.patt.loc20_14.1: @G.%pattern_type (%pattern_type.9a587c.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc20_14.2 (constants.%U.patt.cb839c.2)] -// CHECK:STDOUT: %V.patt.loc20_28.1: %pattern_type.98f = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc20_28.2 (constants.%V.patt)] +// CHECK:STDOUT: %T.patt.loc20_15.1: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_15.2 (constants.%T.patt.4a7)] +// CHECK:STDOUT: %U.patt.loc20_29.1: @G.%pattern_type (%pattern_type.9a587c.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc20_29.2 (constants.%U.patt.cb839c.2)] +// CHECK:STDOUT: %V.patt.loc20_50.1: %pattern_type.98f = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc20_50.2 (constants.%V.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_10: type = splice_block %Z.ref [concrete = constants.%Z.type] { -// CHECK:STDOUT: %.Self.frozen.loc20_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc20_17: type = splice_block %Z.ref [concrete = constants.%Z.type] { +// CHECK:STDOUT: %.Self.frozen.loc20_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc20_7.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc20_7.1 (constants.%T.013)] -// CHECK:STDOUT: %.loc20_24.1: type = splice_block %Empty.type.loc20_24.2 [symbolic = %Empty.type.loc20_24.1 (constants.%Empty.type.d682d6.2)] { -// CHECK:STDOUT: %.Self.frozen.loc20_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %T.loc20_15.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc20_15.1 (constants.%T.013)] +// CHECK:STDOUT: %.loc20_38.1: type = splice_block %Empty.type.loc20_38.2 [symbolic = %Empty.type.loc20_38.1 (constants.%Empty.type.d682d6.2)] { +// CHECK:STDOUT: %.Self.frozen.loc20_29: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Empty.ref: %Empty.type.f30 = name_ref Empty, file.%Empty.decl [concrete = constants.%empty_struct.26b] -// CHECK:STDOUT: %T.ref.loc20: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.013)] -// CHECK:STDOUT: %T.as_type.loc20_24.2: type = facet_access_type %T.ref.loc20 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc20_24.2: type = converted %T.ref.loc20, %T.as_type.loc20_24.2 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %Empty.type.loc20_24.2: type = facet_type <@Empty, @Empty(constants.%T.as_type)> [symbolic = %Empty.type.loc20_24.1 (constants.%Empty.type.d682d6.2)] +// CHECK:STDOUT: %T.ref.loc20: %Z.type = name_ref T, %T.loc20_15.2 [symbolic = %T.loc20_15.1 (constants.%T.013)] +// CHECK:STDOUT: %T.as_type.loc20_38.2: type = facet_access_type %T.ref.loc20 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc20_38.2: type = converted %T.ref.loc20, %T.as_type.loc20_38.2 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %Empty.type.loc20_38.2: type = facet_type <@Empty, @Empty(constants.%T.as_type)> [symbolic = %Empty.type.loc20_38.1 (constants.%Empty.type.d682d6.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc20_14.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = symbolic_binding U, 1 [symbolic = %U.loc20_14.1 (constants.%U.e1f642.2)] -// CHECK:STDOUT: %.loc20_31.1: type = splice_block %.loc20_31.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc20_28: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc20_31.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %U.loc20_29.2: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = symbolic_binding U, 1 [symbolic = %U.loc20_29.1 (constants.%U.e1f642.2)] +// CHECK:STDOUT: %.loc20_52.1: type = splice_block %.loc20_52.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc20_50: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc20_52.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %V.loc20_28.2: type = symbolic_binding V, 2 [symbolic = %V.loc20_28.1 (constants.%V)] +// CHECK:STDOUT: %V.loc20_50.2: type = symbolic_binding V, 2 [symbolic = %V.loc20_50.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -135,26 +135,26 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Empty.type: type = facet_type <@Empty, @Empty(%T.loc16_19.1)> [symbolic = %Empty.type (constants.%Empty.type.d682d6.1)] -// CHECK:STDOUT: %Self.loc16_28.2: @Empty.%Empty.type (%Empty.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self.loc16_28.2 (constants.%Self.22bbf7.1)] +// CHECK:STDOUT: %Self.loc16_27.2: @Empty.%Empty.type (%Empty.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self.loc16_27.2 (constants.%Self.22bbf7.1)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { -// CHECK:STDOUT: %Self.loc16_28.1: @Empty.%Empty.type (%Empty.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self.loc16_28.2 (constants.%Self.22bbf7.1)] +// CHECK:STDOUT: %Self.loc16_27.1: @Empty.%Empty.type (%Empty.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self.loc16_27.2 (constants.%Self.22bbf7.1)] // CHECK:STDOUT: %Empty.WithSelf.decl = constraint_with_self_decl @Empty [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc16_28.1 +// CHECK:STDOUT: .Self = %Self.loc16_27.1 // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc18_7.2: type, %U.loc18_24.2: @F.%Empty.type.loc18_34.1 (%Empty.type.d682d6.1)) { -// CHECK:STDOUT: %T.patt.loc18_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_7.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %T.loc18_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc18_7.1 (constants.%T.67d)] -// CHECK:STDOUT: %Empty.type.loc18_34.1: type = facet_type <@Empty, @Empty(%T.loc18_7.1)> [symbolic = %Empty.type.loc18_34.1 (constants.%Empty.type.d682d6.1)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Empty.type.loc18_34.1 [symbolic = %pattern_type (constants.%pattern_type.9a587c.1)] -// CHECK:STDOUT: %U.patt.loc18_24.2: @F.%pattern_type (%pattern_type.9a587c.1) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc18_24.2 (constants.%U.patt.cb839c.1)] -// CHECK:STDOUT: %U.loc18_24.1: @F.%Empty.type.loc18_34.1 (%Empty.type.d682d6.1) = symbolic_binding U, 1 [symbolic = %U.loc18_24.1 (constants.%U.e1f642.1)] +// CHECK:STDOUT: generic fn @F(%T.loc18_15.2: type, %U.loc18_39.2: @F.%Empty.type.loc18_48.1 (%Empty.type.d682d6.1)) { +// CHECK:STDOUT: %T.patt.loc18_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_15.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %T.loc18_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc18_15.1 (constants.%T.67d)] +// CHECK:STDOUT: %Empty.type.loc18_48.1: type = facet_type <@Empty, @Empty(%T.loc18_15.1)> [symbolic = %Empty.type.loc18_48.1 (constants.%Empty.type.d682d6.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Empty.type.loc18_48.1 [symbolic = %pattern_type (constants.%pattern_type.9a587c.1)] +// CHECK:STDOUT: %U.patt.loc18_39.2: @F.%pattern_type (%pattern_type.9a587c.1) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc18_39.2 (constants.%U.patt.cb839c.1)] +// CHECK:STDOUT: %U.loc18_39.1: @F.%Empty.type.loc18_48.1 (%Empty.type.d682d6.1) = symbolic_binding U, 1 [symbolic = %U.loc18_39.1 (constants.%U.e1f642.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -166,74 +166,74 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc20_7.2: %Z.type, %U.loc20_14.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2), %V.loc20_28.2: type) { -// CHECK:STDOUT: %T.patt.loc20_7.2: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_7.2 (constants.%T.patt.4a7)] -// CHECK:STDOUT: %T.loc20_7.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc20_7.1 (constants.%T.013)] -// CHECK:STDOUT: %T.as_type.loc20_24.1: type = facet_access_type %T.loc20_7.1 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %Empty.type.loc20_24.1: type = facet_type <@Empty, @Empty(%T.as_type.loc20_24.1)> [symbolic = %Empty.type.loc20_24.1 (constants.%Empty.type.d682d6.2)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Empty.type.loc20_24.1 [symbolic = %pattern_type (constants.%pattern_type.9a587c.2)] -// CHECK:STDOUT: %U.patt.loc20_14.2: @G.%pattern_type (%pattern_type.9a587c.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc20_14.2 (constants.%U.patt.cb839c.2)] -// CHECK:STDOUT: %U.loc20_14.1: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = symbolic_binding U, 1 [symbolic = %U.loc20_14.1 (constants.%U.e1f642.2)] -// CHECK:STDOUT: %V.patt.loc20_28.2: %pattern_type.98f = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc20_28.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.loc20_28.1: type = symbolic_binding V, 2 [symbolic = %V.loc20_28.1 (constants.%V)] +// CHECK:STDOUT: generic fn @G(%T.loc20_15.2: %Z.type, %U.loc20_29.2: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2), %V.loc20_50.2: type) { +// CHECK:STDOUT: %T.patt.loc20_15.2: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_15.2 (constants.%T.patt.4a7)] +// CHECK:STDOUT: %T.loc20_15.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc20_15.1 (constants.%T.013)] +// CHECK:STDOUT: %T.as_type.loc20_38.1: type = facet_access_type %T.loc20_15.1 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %Empty.type.loc20_38.1: type = facet_type <@Empty, @Empty(%T.as_type.loc20_38.1)> [symbolic = %Empty.type.loc20_38.1 (constants.%Empty.type.d682d6.2)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %Empty.type.loc20_38.1 [symbolic = %pattern_type (constants.%pattern_type.9a587c.2)] +// CHECK:STDOUT: %U.patt.loc20_29.2: @G.%pattern_type (%pattern_type.9a587c.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc20_29.2 (constants.%U.patt.cb839c.2)] +// CHECK:STDOUT: %U.loc20_29.1: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = symbolic_binding U, 1 [symbolic = %U.loc20_29.1 (constants.%U.e1f642.2)] +// CHECK:STDOUT: %V.patt.loc20_50.2: %pattern_type.98f = symbolic_binding_pattern V, 2 [symbolic = %V.patt.loc20_50.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.loc20_50.1: type = symbolic_binding V, 2 [symbolic = %V.loc20_50.1 (constants.%V)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Empty.facet.loc21_18.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value constants.%empty_struct_type, () [symbolic = %Empty.facet.loc21_18.2 (constants.%Empty.facet.76f)] -// CHECK:STDOUT: %F.specific_fn.loc21_3.2: = specific_function constants.%F, @F(%T.as_type.loc20_24.1, %Empty.facet.loc21_18.2) [symbolic = %F.specific_fn.loc21_3.2 (constants.%F.specific_fn.eb3)] -// CHECK:STDOUT: %Empty.facet.loc22_12.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value type, () [symbolic = %Empty.facet.loc22_12.2 (constants.%Empty.facet.2cb)] -// CHECK:STDOUT: %F.specific_fn.loc22_3.2: = specific_function constants.%F, @F(%T.as_type.loc20_24.1, %Empty.facet.loc22_12.2) [symbolic = %F.specific_fn.loc22_3.2 (constants.%F.specific_fn.d75)] -// CHECK:STDOUT: %Empty.facet.loc23_9.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value %T.as_type.loc20_24.1, () [symbolic = %Empty.facet.loc23_9.2 (constants.%Empty.facet.aa1)] -// CHECK:STDOUT: %F.specific_fn.loc23_3.2: = specific_function constants.%F, @F(%T.as_type.loc20_24.1, %Empty.facet.loc23_9.2) [symbolic = %F.specific_fn.loc23_3.2 (constants.%F.specific_fn.7a2)] -// CHECK:STDOUT: %F.specific_fn.loc24_3.2: = specific_function constants.%F, @F(%T.as_type.loc20_24.1, %U.loc20_14.1) [symbolic = %F.specific_fn.loc24_3.2 (constants.%F.specific_fn.ff9)] -// CHECK:STDOUT: %Empty.facet.loc25_9.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value %V.loc20_28.1, () [symbolic = %Empty.facet.loc25_9.2 (constants.%Empty.facet.ed5)] -// CHECK:STDOUT: %F.specific_fn.loc25_3.2: = specific_function constants.%F, @F(%T.as_type.loc20_24.1, %Empty.facet.loc25_9.2) [symbolic = %F.specific_fn.loc25_3.2 (constants.%F.specific_fn.67d)] +// CHECK:STDOUT: %Empty.facet.loc21_18.2: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = facet_value constants.%empty_struct_type, () [symbolic = %Empty.facet.loc21_18.2 (constants.%Empty.facet.76f)] +// CHECK:STDOUT: %F.specific_fn.loc21_3.2: = specific_function constants.%F, @F(%T.as_type.loc20_38.1, %Empty.facet.loc21_18.2) [symbolic = %F.specific_fn.loc21_3.2 (constants.%F.specific_fn.eb3)] +// CHECK:STDOUT: %Empty.facet.loc22_12.2: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = facet_value type, () [symbolic = %Empty.facet.loc22_12.2 (constants.%Empty.facet.2cb)] +// CHECK:STDOUT: %F.specific_fn.loc22_3.2: = specific_function constants.%F, @F(%T.as_type.loc20_38.1, %Empty.facet.loc22_12.2) [symbolic = %F.specific_fn.loc22_3.2 (constants.%F.specific_fn.d75)] +// CHECK:STDOUT: %Empty.facet.loc23_9.2: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = facet_value %T.as_type.loc20_38.1, () [symbolic = %Empty.facet.loc23_9.2 (constants.%Empty.facet.aa1)] +// CHECK:STDOUT: %F.specific_fn.loc23_3.2: = specific_function constants.%F, @F(%T.as_type.loc20_38.1, %Empty.facet.loc23_9.2) [symbolic = %F.specific_fn.loc23_3.2 (constants.%F.specific_fn.7a2)] +// CHECK:STDOUT: %F.specific_fn.loc24_3.2: = specific_function constants.%F, @F(%T.as_type.loc20_38.1, %U.loc20_29.1) [symbolic = %F.specific_fn.loc24_3.2 (constants.%F.specific_fn.ff9)] +// CHECK:STDOUT: %Empty.facet.loc25_9.2: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = facet_value %V.loc20_50.1, () [symbolic = %Empty.facet.loc25_9.2 (constants.%Empty.facet.ed5)] +// CHECK:STDOUT: %F.specific_fn.loc25_3.2: = specific_function constants.%F, @F(%T.as_type.loc20_38.1, %Empty.facet.loc25_9.2) [symbolic = %F.specific_fn.loc25_3.2 (constants.%F.specific_fn.67d)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref.loc21: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref.loc21: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.013)] +// CHECK:STDOUT: %T.ref.loc21: %Z.type = name_ref T, %T.loc20_15.2 [symbolic = %T.loc20_15.1 (constants.%T.013)] // CHECK:STDOUT: %.loc21_9: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct.a40] // CHECK:STDOUT: %.loc21_14: type = type_literal type [concrete = type] // CHECK:STDOUT: %.loc21_11: type = converted %.loc21_9, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %T.as_type.loc21: type = facet_access_type %T.ref.loc21 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc21_18.1: type = converted %T.ref.loc21, %T.as_type.loc21 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %Empty.facet.loc21_18.1: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value constants.%empty_struct_type, () [symbolic = %Empty.facet.loc21_18.2 (constants.%Empty.facet.76f)] -// CHECK:STDOUT: %.loc21_18.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = converted constants.%empty_struct_type, %Empty.facet.loc21_18.1 [symbolic = %Empty.facet.loc21_18.2 (constants.%Empty.facet.76f)] +// CHECK:STDOUT: %T.as_type.loc21: type = facet_access_type %T.ref.loc21 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc21_18.1: type = converted %T.ref.loc21, %T.as_type.loc21 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %Empty.facet.loc21_18.1: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = facet_value constants.%empty_struct_type, () [symbolic = %Empty.facet.loc21_18.2 (constants.%Empty.facet.76f)] +// CHECK:STDOUT: %.loc21_18.2: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = converted constants.%empty_struct_type, %Empty.facet.loc21_18.1 [symbolic = %Empty.facet.loc21_18.2 (constants.%Empty.facet.76f)] // CHECK:STDOUT: %F.specific_fn.loc21_3.1: = specific_function %F.ref.loc21, @F(constants.%T.as_type, constants.%Empty.facet.76f) [symbolic = %F.specific_fn.loc21_3.2 (constants.%F.specific_fn.eb3)] // CHECK:STDOUT: %F.call.loc21: init %empty_tuple.type = call %F.specific_fn.loc21_3.1() // CHECK:STDOUT: %F.ref.loc22: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref.loc22: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.013)] +// CHECK:STDOUT: %T.ref.loc22: %Z.type = name_ref T, %T.loc20_15.2 [symbolic = %T.loc20_15.1 (constants.%T.013)] // CHECK:STDOUT: %.loc22_8: type = type_literal type [concrete = type] -// CHECK:STDOUT: %T.as_type.loc22: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc22_12.1: type = converted %T.ref.loc22, %T.as_type.loc22 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %Empty.facet.loc22_12.1: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value type, () [symbolic = %Empty.facet.loc22_12.2 (constants.%Empty.facet.2cb)] -// CHECK:STDOUT: %.loc22_12.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = converted type, %Empty.facet.loc22_12.1 [symbolic = %Empty.facet.loc22_12.2 (constants.%Empty.facet.2cb)] +// CHECK:STDOUT: %T.as_type.loc22: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc22_12.1: type = converted %T.ref.loc22, %T.as_type.loc22 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %Empty.facet.loc22_12.1: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = facet_value type, () [symbolic = %Empty.facet.loc22_12.2 (constants.%Empty.facet.2cb)] +// CHECK:STDOUT: %.loc22_12.2: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = converted type, %Empty.facet.loc22_12.1 [symbolic = %Empty.facet.loc22_12.2 (constants.%Empty.facet.2cb)] // CHECK:STDOUT: %F.specific_fn.loc22_3.1: = specific_function %F.ref.loc22, @F(constants.%T.as_type, constants.%Empty.facet.2cb) [symbolic = %F.specific_fn.loc22_3.2 (constants.%F.specific_fn.d75)] // CHECK:STDOUT: %F.call.loc22: init %empty_tuple.type = call %F.specific_fn.loc22_3.1() // CHECK:STDOUT: %F.ref.loc23: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref.loc23_5: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.013)] -// CHECK:STDOUT: %T.ref.loc23_8: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.013)] -// CHECK:STDOUT: %T.as_type.loc23_9.1: type = facet_access_type %T.ref.loc23_5 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc23_9.1: type = converted %T.ref.loc23_5, %T.as_type.loc23_9.1 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %T.as_type.loc23_9.2: type = facet_access_type constants.%T.013 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %Empty.facet.loc23_9.1: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value %T.as_type.loc23_9.2, () [symbolic = %Empty.facet.loc23_9.2 (constants.%Empty.facet.aa1)] -// CHECK:STDOUT: %.loc23_9.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = converted constants.%T.013, %Empty.facet.loc23_9.1 [symbolic = %Empty.facet.loc23_9.2 (constants.%Empty.facet.aa1)] +// CHECK:STDOUT: %T.ref.loc23_5: %Z.type = name_ref T, %T.loc20_15.2 [symbolic = %T.loc20_15.1 (constants.%T.013)] +// CHECK:STDOUT: %T.ref.loc23_8: %Z.type = name_ref T, %T.loc20_15.2 [symbolic = %T.loc20_15.1 (constants.%T.013)] +// CHECK:STDOUT: %T.as_type.loc23_9.1: type = facet_access_type %T.ref.loc23_5 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc23_9.1: type = converted %T.ref.loc23_5, %T.as_type.loc23_9.1 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc23_9.2: type = facet_access_type constants.%T.013 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %Empty.facet.loc23_9.1: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = facet_value %T.as_type.loc23_9.2, () [symbolic = %Empty.facet.loc23_9.2 (constants.%Empty.facet.aa1)] +// CHECK:STDOUT: %.loc23_9.2: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = converted constants.%T.013, %Empty.facet.loc23_9.1 [symbolic = %Empty.facet.loc23_9.2 (constants.%Empty.facet.aa1)] // CHECK:STDOUT: %F.specific_fn.loc23_3.1: = specific_function %F.ref.loc23, @F(constants.%T.as_type, constants.%Empty.facet.aa1) [symbolic = %F.specific_fn.loc23_3.2 (constants.%F.specific_fn.7a2)] // CHECK:STDOUT: %F.call.loc23: init %empty_tuple.type = call %F.specific_fn.loc23_3.1() // CHECK:STDOUT: %F.ref.loc24: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref.loc24: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.013)] -// CHECK:STDOUT: %U.ref: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = name_ref U, %U.loc20_14.2 [symbolic = %U.loc20_14.1 (constants.%U.e1f642.2)] -// CHECK:STDOUT: %T.as_type.loc24: type = facet_access_type %T.ref.loc24 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc24: type = converted %T.ref.loc24, %T.as_type.loc24 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.ref.loc24: %Z.type = name_ref T, %T.loc20_15.2 [symbolic = %T.loc20_15.1 (constants.%T.013)] +// CHECK:STDOUT: %U.ref: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = name_ref U, %U.loc20_29.2 [symbolic = %U.loc20_29.1 (constants.%U.e1f642.2)] +// CHECK:STDOUT: %T.as_type.loc24: type = facet_access_type %T.ref.loc24 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc24: type = converted %T.ref.loc24, %T.as_type.loc24 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] // CHECK:STDOUT: %F.specific_fn.loc24_3.1: = specific_function %F.ref.loc24, @F(constants.%T.as_type, constants.%U.e1f642.2) [symbolic = %F.specific_fn.loc24_3.2 (constants.%F.specific_fn.ff9)] // CHECK:STDOUT: %F.call.loc24: init %empty_tuple.type = call %F.specific_fn.loc24_3.1() // CHECK:STDOUT: %F.ref.loc25: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %T.ref.loc25: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.013)] -// CHECK:STDOUT: %V.ref: type = name_ref V, %V.loc20_28.2 [symbolic = %V.loc20_28.1 (constants.%V)] -// CHECK:STDOUT: %T.as_type.loc25: type = facet_access_type %T.ref.loc25 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc25_9.1: type = converted %T.ref.loc25, %T.as_type.loc25 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)] -// CHECK:STDOUT: %Empty.facet.loc25_9.1: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value constants.%V, () [symbolic = %Empty.facet.loc25_9.2 (constants.%Empty.facet.ed5)] -// CHECK:STDOUT: %.loc25_9.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = converted constants.%V, %Empty.facet.loc25_9.1 [symbolic = %Empty.facet.loc25_9.2 (constants.%Empty.facet.ed5)] +// CHECK:STDOUT: %T.ref.loc25: %Z.type = name_ref T, %T.loc20_15.2 [symbolic = %T.loc20_15.1 (constants.%T.013)] +// CHECK:STDOUT: %V.ref: type = name_ref V, %V.loc20_50.2 [symbolic = %V.loc20_50.1 (constants.%V)] +// CHECK:STDOUT: %T.as_type.loc25: type = facet_access_type %T.ref.loc25 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc25_9.1: type = converted %T.ref.loc25, %T.as_type.loc25 [symbolic = %T.as_type.loc20_38.1 (constants.%T.as_type)] +// CHECK:STDOUT: %Empty.facet.loc25_9.1: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = facet_value constants.%V, () [symbolic = %Empty.facet.loc25_9.2 (constants.%Empty.facet.ed5)] +// CHECK:STDOUT: %.loc25_9.2: @G.%Empty.type.loc20_38.1 (%Empty.type.d682d6.2) = converted constants.%V, %Empty.facet.loc25_9.1 [symbolic = %Empty.facet.loc25_9.2 (constants.%Empty.facet.ed5)] // CHECK:STDOUT: %F.specific_fn.loc25_3.1: = specific_function %F.ref.loc25, @F(constants.%T.as_type, constants.%Empty.facet.ed5) [symbolic = %F.specific_fn.loc25_3.2 (constants.%F.specific_fn.67d)] // CHECK:STDOUT: %F.call.loc25: init %empty_tuple.type = call %F.specific_fn.loc25_3.1() // CHECK:STDOUT: return @@ -250,12 +250,12 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: specific @Empty.WithSelf(constants.%T.67d, constants.%Self.22bbf7.1) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.67d, constants.%U.e1f642.1) { -// CHECK:STDOUT: %T.patt.loc18_7.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc18_7.1 => constants.%T.67d -// CHECK:STDOUT: %Empty.type.loc18_34.1 => constants.%Empty.type.d682d6.1 +// CHECK:STDOUT: %T.patt.loc18_15.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc18_15.1 => constants.%T.67d +// CHECK:STDOUT: %Empty.type.loc18_48.1 => constants.%Empty.type.d682d6.1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.1 -// CHECK:STDOUT: %U.patt.loc18_24.2 => constants.%U.patt.cb839c.1 -// CHECK:STDOUT: %U.loc18_24.1 => constants.%U.e1f642.1 +// CHECK:STDOUT: %U.patt.loc18_39.2 => constants.%U.patt.cb839c.1 +// CHECK:STDOUT: %U.loc18_39.1 => constants.%U.e1f642.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Empty(constants.%T.as_type) { @@ -264,19 +264,19 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Empty.type => constants.%Empty.type.d682d6.2 -// CHECK:STDOUT: %Self.loc16_28.2 => constants.%Self.22bbf7.2 +// CHECK:STDOUT: %Self.loc16_27.2 => constants.%Self.22bbf7.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T.013, constants.%U.e1f642.2, constants.%V) { -// CHECK:STDOUT: %T.patt.loc20_7.2 => constants.%T.patt.4a7 -// CHECK:STDOUT: %T.loc20_7.1 => constants.%T.013 -// CHECK:STDOUT: %T.as_type.loc20_24.1 => constants.%T.as_type -// CHECK:STDOUT: %Empty.type.loc20_24.1 => constants.%Empty.type.d682d6.2 +// CHECK:STDOUT: %T.patt.loc20_15.2 => constants.%T.patt.4a7 +// CHECK:STDOUT: %T.loc20_15.1 => constants.%T.013 +// CHECK:STDOUT: %T.as_type.loc20_38.1 => constants.%T.as_type +// CHECK:STDOUT: %Empty.type.loc20_38.1 => constants.%Empty.type.d682d6.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.2 -// CHECK:STDOUT: %U.patt.loc20_14.2 => constants.%U.patt.cb839c.2 -// CHECK:STDOUT: %U.loc20_14.1 => constants.%U.e1f642.2 -// CHECK:STDOUT: %V.patt.loc20_28.2 => constants.%V.patt -// CHECK:STDOUT: %V.loc20_28.1 => constants.%V +// CHECK:STDOUT: %U.patt.loc20_29.2 => constants.%U.patt.cb839c.2 +// CHECK:STDOUT: %U.loc20_29.1 => constants.%U.e1f642.2 +// CHECK:STDOUT: %V.patt.loc20_50.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc20_50.1 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Empty.WithSelf(constants.%T.as_type, constants.%empty_struct.type.facet) { @@ -284,12 +284,12 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.as_type, constants.%Empty.facet.76f) { -// CHECK:STDOUT: %T.patt.loc18_7.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc18_7.1 => constants.%T.as_type -// CHECK:STDOUT: %Empty.type.loc18_34.1 => constants.%Empty.type.d682d6.2 +// CHECK:STDOUT: %T.patt.loc18_15.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc18_15.1 => constants.%T.as_type +// CHECK:STDOUT: %Empty.type.loc18_48.1 => constants.%Empty.type.d682d6.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.2 -// CHECK:STDOUT: %U.patt.loc18_24.2 => constants.%U.patt.cb839c.3 -// CHECK:STDOUT: %U.loc18_24.1 => constants.%Empty.facet.76f +// CHECK:STDOUT: %U.patt.loc18_39.2 => constants.%U.patt.cb839c.3 +// CHECK:STDOUT: %U.loc18_39.1 => constants.%Empty.facet.76f // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -299,12 +299,12 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.as_type, constants.%Empty.facet.2cb) { -// CHECK:STDOUT: %T.patt.loc18_7.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc18_7.1 => constants.%T.as_type -// CHECK:STDOUT: %Empty.type.loc18_34.1 => constants.%Empty.type.d682d6.2 +// CHECK:STDOUT: %T.patt.loc18_15.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc18_15.1 => constants.%T.as_type +// CHECK:STDOUT: %Empty.type.loc18_48.1 => constants.%Empty.type.d682d6.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.2 -// CHECK:STDOUT: %U.patt.loc18_24.2 => constants.%U.patt.cb839c.3 -// CHECK:STDOUT: %U.loc18_24.1 => constants.%Empty.facet.2cb +// CHECK:STDOUT: %U.patt.loc18_39.2 => constants.%U.patt.cb839c.3 +// CHECK:STDOUT: %U.loc18_39.1 => constants.%Empty.facet.2cb // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -314,12 +314,12 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.as_type, constants.%Empty.facet.aa1) { -// CHECK:STDOUT: %T.patt.loc18_7.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc18_7.1 => constants.%T.as_type -// CHECK:STDOUT: %Empty.type.loc18_34.1 => constants.%Empty.type.d682d6.2 +// CHECK:STDOUT: %T.patt.loc18_15.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc18_15.1 => constants.%T.as_type +// CHECK:STDOUT: %Empty.type.loc18_48.1 => constants.%Empty.type.d682d6.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.2 -// CHECK:STDOUT: %U.patt.loc18_24.2 => constants.%U.patt.cb839c.3 -// CHECK:STDOUT: %U.loc18_24.1 => constants.%Empty.facet.aa1 +// CHECK:STDOUT: %U.patt.loc18_39.2 => constants.%U.patt.cb839c.3 +// CHECK:STDOUT: %U.loc18_39.1 => constants.%Empty.facet.aa1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -329,12 +329,12 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.as_type, constants.%U.e1f642.2) { -// CHECK:STDOUT: %T.patt.loc18_7.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc18_7.1 => constants.%T.as_type -// CHECK:STDOUT: %Empty.type.loc18_34.1 => constants.%Empty.type.d682d6.2 +// CHECK:STDOUT: %T.patt.loc18_15.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc18_15.1 => constants.%T.as_type +// CHECK:STDOUT: %Empty.type.loc18_48.1 => constants.%Empty.type.d682d6.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.2 -// CHECK:STDOUT: %U.patt.loc18_24.2 => constants.%U.patt.cb839c.3 -// CHECK:STDOUT: %U.loc18_24.1 => constants.%U.e1f642.2 +// CHECK:STDOUT: %U.patt.loc18_39.2 => constants.%U.patt.cb839c.3 +// CHECK:STDOUT: %U.loc18_39.1 => constants.%U.e1f642.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -344,12 +344,12 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.as_type, constants.%Empty.facet.ed5) { -// CHECK:STDOUT: %T.patt.loc18_7.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc18_7.1 => constants.%T.as_type -// CHECK:STDOUT: %Empty.type.loc18_34.1 => constants.%Empty.type.d682d6.2 +// CHECK:STDOUT: %T.patt.loc18_15.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc18_15.1 => constants.%T.as_type +// CHECK:STDOUT: %Empty.type.loc18_48.1 => constants.%Empty.type.d682d6.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.2 -// CHECK:STDOUT: %U.patt.loc18_24.2 => constants.%U.patt.cb839c.3 -// CHECK:STDOUT: %U.loc18_24.1 => constants.%Empty.facet.ed5 +// CHECK:STDOUT: %U.patt.loc18_39.2 => constants.%U.patt.cb839c.3 +// CHECK:STDOUT: %U.loc18_39.1 => constants.%Empty.facet.ed5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/named_constraint/extend_name_lookup.carbon b/toolchain/check/testdata/named_constraint/extend_name_lookup.carbon index 4430fba67317..c8ef3d4cb767 100644 --- a/toolchain/check/testdata/named_constraint/extend_name_lookup.carbon +++ b/toolchain/check/testdata/named_constraint/extend_name_lookup.carbon @@ -22,7 +22,7 @@ constraint W { } //@dump-sem-ir-begin -fn F(T:! W) { +fn F(generic T: W) { // Extends Z. T.ZF(); // Does not extend Y. @@ -39,7 +39,7 @@ constraint W { require impls Z; } -fn F(T:! W) { +fn F(generic T: W) { // Does not extend Z. interface Y { fn YF(); } // CHECK:STDERR: fail_name_lookup_in_constraint_does_not_extend.carbon:[[@LINE+4]]:3: error: member name `ZF` not found in `W` [MemberNameNotFoundInSpecificScope] @@ -61,7 +61,7 @@ constraint W { } //@dump-sem-ir-begin -fn F(T:! type where .Self impls W) { +fn F(generic T: type where .Self impls W) { // T does not extend Z. T.(Z.ZF)(); // T does not extend Y. @@ -80,7 +80,7 @@ constraint W { require impls Y; } -fn F(T:! type where .Self impls W) { +fn F(generic T: type where .Self impls W) { // T does not extend Z. // CHECK:STDERR: fail_name_lookup_in_facet_type_does_not_extend.carbon:[[@LINE+4]]:3: error: member name `ZF` not found [MemberNameNotFound] // CHECK:STDERR: T.ZF(); @@ -130,29 +130,29 @@ fn F(T:! type where .Self impls W) { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc12_7.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc12: type = splice_block %W.ref [concrete = constants.%W.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %W.ref: type = name_ref W, file.%W.decl [concrete = constants.%W.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc12_7.2: %W.type = symbolic_binding T, 0 [symbolic = %T.loc12_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc12_15.2: %W.type = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc12_7.2: %W.type) { -// CHECK:STDOUT: %T.patt.loc12_7.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc12_7.1: %W.type = symbolic_binding T, 0 [symbolic = %T.loc12_7.1 (constants.%T)] +// CHECK:STDOUT: generic fn @F(%T.loc12_15.2: %W.type) { +// CHECK:STDOUT: %T.patt.loc12_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc12_15.1: %W.type = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc14_4.2: type = facet_access_type %T.loc12_7.1 [symbolic = %T.as_type.loc14_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc12_7.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] +// CHECK:STDOUT: %T.as_type.loc14_4.2: type = facet_access_type %T.loc12_15.1 [symbolic = %T.as_type.loc14_4.2 (constants.%T.as_type)] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc12_15.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] // CHECK:STDOUT: %Z.facet: %Z.type = facet_value %T.as_type.loc14_4.2, (%Z.lookup_impl_witness) [symbolic = %Z.facet (constants.%Z.facet)] // CHECK:STDOUT: %Z.WithSelf.ZF.type: type = fn_type @Z.WithSelf.ZF, @Z.WithSelf(%Z.facet) [symbolic = %Z.WithSelf.ZF.type (constants.%Z.WithSelf.ZF.type.560)] // CHECK:STDOUT: %.loc14_4.2: type = fn_type_with_self_type %Z.WithSelf.ZF.type, %Z.facet [symbolic = %.loc14_4.2 (constants.%.891)] // CHECK:STDOUT: %impl.elem0.loc14_4.2: @F.%.loc14_4.2 (%.891) = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.39f)] // CHECK:STDOUT: %specific_impl_fn.loc14_4.2: = specific_impl_function %impl.elem0.loc14_4.2, @Z.WithSelf.ZF(%Z.facet) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.301)] -// CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %T.loc12_7.1, @Y [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)] +// CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %T.loc12_15.1, @Y [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)] // CHECK:STDOUT: %Y.facet.loc16_4.2: %Y.type = facet_value %T.as_type.loc14_4.2, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc16_4.2 (constants.%Y.facet)] // CHECK:STDOUT: %Y.WithSelf.YF.type: type = fn_type @Y.WithSelf.YF, @Y.WithSelf(%Y.facet.loc16_4.2) [symbolic = %Y.WithSelf.YF.type (constants.%Y.WithSelf.YF.type.c42)] // CHECK:STDOUT: %.loc16_4.2: type = fn_type_with_self_type %Y.WithSelf.YF.type, %Y.facet.loc16_4.2 [symbolic = %.loc16_4.2 (constants.%.74b)] @@ -161,14 +161,14 @@ fn F(T:! type where .Self impls W) { // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref.loc14: %W.type = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc14: %W.type = name_ref T, %T.loc12_15.2 [symbolic = %T.loc12_15.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc14_4.1: type = facet_access_type %T.ref.loc14 [symbolic = %T.as_type.loc14_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc14_4.1: type = converted %T.ref.loc14, %T.as_type.loc14_4.1 [symbolic = %T.as_type.loc14_4.2 (constants.%T.as_type)] // CHECK:STDOUT: %ZF.ref: %Z.assoc_type = name_ref ZF, @Z.WithSelf.%assoc0 [concrete = constants.%assoc0.9c1] // CHECK:STDOUT: %impl.elem0.loc14_4.1: @F.%.loc14_4.2 (%.891) = impl_witness_access constants.%Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.39f)] // CHECK:STDOUT: %specific_impl_fn.loc14_4.1: = specific_impl_function %impl.elem0.loc14_4.1, @Z.WithSelf.ZF(constants.%Z.facet) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.301)] // CHECK:STDOUT: %Z.WithSelf.ZF.call: init %empty_tuple.type = call %specific_impl_fn.loc14_4.1() -// CHECK:STDOUT: %T.ref.loc16: %W.type = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc16: %W.type = name_ref T, %T.loc12_15.2 [symbolic = %T.loc12_15.1 (constants.%T)] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] // CHECK:STDOUT: %YF.ref: %Y.assoc_type = name_ref YF, @Y.WithSelf.%assoc0 [concrete = constants.%assoc0.359] // CHECK:STDOUT: %T.as_type.loc16: type = facet_access_type %T.ref.loc16 [symbolic = %T.as_type.loc14_4.2 (constants.%T.as_type)] @@ -184,8 +184,8 @@ fn F(T:! type where .Self impls W) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc12_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc12_7.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc12_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- facet_type_does_not_extend_and_constraint_extends.carbon @@ -227,45 +227,45 @@ fn F(T:! type where .Self impls W) { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc12_7.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_15.1: type = splice_block %.loc12_15.2 [concrete = constants.%type_where] { -// CHECK:STDOUT: %.Self.frozen.loc12_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_10: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_22.1: type = splice_block %.loc12_22.2 [concrete = constants.%type_where] { // CHECK:STDOUT: %.Self.frozen.loc12_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc12_10 [concrete] -// CHECK:STDOUT: %.Self.ref.loc12_21.1: %type = name_ref .Self, %.Self.frozen.loc12_15 [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc12_17: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.frozen.loc12_22: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc12_17 [concrete] +// CHECK:STDOUT: %.Self.ref.loc12_28.1: %type = name_ref .Self, %.Self.frozen.loc12_22 [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %W.ref: type = name_ref W, file.%W.decl [concrete = constants.%W.type] -// CHECK:STDOUT: %.Self.as_type.loc12_21.1: type = facet_access_type %.Self.ref.loc12_21.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc12_21.1: type = converted %.Self.ref.loc12_21.1, %.Self.as_type.loc12_21.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %impls.loc12_27.1 = requirement_impls %.loc12_21.1, %W.ref [concrete] +// CHECK:STDOUT: %.Self.as_type.loc12_28.1: type = facet_access_type %.Self.ref.loc12_28.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc12_28.1: type = converted %.Self.ref.loc12_28.1, %.Self.as_type.loc12_28.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %impls.loc12_34.1 = requirement_impls %.loc12_28.1, %W.ref [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc12_21.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type.loc12_21.2: type = facet_access_type %.Self.ref.loc12_21.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc12_21.2: type = converted %.Self.ref.loc12_21.1, %.Self.as_type.loc12_21.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impls.loc12_27.2 = requirement_impls %.loc12_21.2, %W.ref [concrete] -// CHECK:STDOUT: %.loc12_15.2: type = where_expr [concrete = constants.%type_where] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc12_10 [concrete] -// CHECK:STDOUT: %impls.loc12_27.2 = requirement_impls %.loc12_21.2, %W.ref [concrete] +// CHECK:STDOUT: %.Self.ref.loc12_28.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.as_type.loc12_28.2: type = facet_access_type %.Self.ref.loc12_28.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc12_28.2: type = converted %.Self.ref.loc12_28.1, %.Self.as_type.loc12_28.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impls.loc12_34.2 = requirement_impls %.loc12_28.2, %W.ref [concrete] +// CHECK:STDOUT: %.loc12_22.2: type = where_expr [concrete = constants.%type_where] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc12_17 [concrete] +// CHECK:STDOUT: %impls.loc12_34.2 = requirement_impls %.loc12_28.2, %W.ref [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc12_7.2: %type_where = symbolic_binding T, 0 [symbolic = %T.loc12_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc12_15.2: %type_where = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc12_7.2: %type_where) { -// CHECK:STDOUT: %T.patt.loc12_7.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc12_7.1: %type_where = symbolic_binding T, 0 [symbolic = %T.loc12_7.1 (constants.%T)] +// CHECK:STDOUT: generic fn @F(%T.loc12_15.2: %type_where) { +// CHECK:STDOUT: %T.patt.loc12_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc12_15.1: %type_where = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc14_4.2: type = facet_access_type %T.loc12_7.1 [symbolic = %T.as_type.loc14_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc12_7.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] +// CHECK:STDOUT: %T.as_type.loc14_4.2: type = facet_access_type %T.loc12_15.1 [symbolic = %T.as_type.loc14_4.2 (constants.%T.as_type)] +// CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %T.loc12_15.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] // CHECK:STDOUT: %Z.facet.loc14_4.2: %Z.type = facet_value %T.as_type.loc14_4.2, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc14_4.2 (constants.%Z.facet)] // CHECK:STDOUT: %Z.WithSelf.ZF.type: type = fn_type @Z.WithSelf.ZF, @Z.WithSelf(%Z.facet.loc14_4.2) [symbolic = %Z.WithSelf.ZF.type (constants.%Z.WithSelf.ZF.type.560)] // CHECK:STDOUT: %.loc14_4.2: type = fn_type_with_self_type %Z.WithSelf.ZF.type, %Z.facet.loc14_4.2 [symbolic = %.loc14_4.2 (constants.%.891)] // CHECK:STDOUT: %impl.elem0.loc14_4.2: @F.%.loc14_4.2 (%.891) = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.39f)] // CHECK:STDOUT: %specific_impl_fn.loc14_4.2: = specific_impl_function %impl.elem0.loc14_4.2, @Z.WithSelf.ZF(%Z.facet.loc14_4.2) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.301)] -// CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %T.loc12_7.1, @Y [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)] +// CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %T.loc12_15.1, @Y [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)] // CHECK:STDOUT: %Y.facet.loc16_4.2: %Y.type = facet_value %T.as_type.loc14_4.2, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc16_4.2 (constants.%Y.facet)] // CHECK:STDOUT: %Y.WithSelf.YF.type: type = fn_type @Y.WithSelf.YF, @Y.WithSelf(%Y.facet.loc16_4.2) [symbolic = %Y.WithSelf.YF.type (constants.%Y.WithSelf.YF.type.c42)] // CHECK:STDOUT: %.loc16_4.2: type = fn_type_with_self_type %Y.WithSelf.YF.type, %Y.facet.loc16_4.2 [symbolic = %.loc16_4.2 (constants.%.74b)] @@ -274,7 +274,7 @@ fn F(T:! type where .Self impls W) { // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref.loc14: %type_where = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc14: %type_where = name_ref T, %T.loc12_15.2 [symbolic = %T.loc12_15.1 (constants.%T)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: %ZF.ref: %Z.assoc_type = name_ref ZF, @Z.WithSelf.%assoc0 [concrete = constants.%assoc0.9c1] // CHECK:STDOUT: %T.as_type.loc14_4.1: type = facet_access_type %T.ref.loc14 [symbolic = %T.as_type.loc14_4.2 (constants.%T.as_type)] @@ -283,7 +283,7 @@ fn F(T:! type where .Self impls W) { // CHECK:STDOUT: %impl.elem0.loc14_4.1: @F.%.loc14_4.2 (%.891) = impl_witness_access constants.%Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.39f)] // CHECK:STDOUT: %specific_impl_fn.loc14_4.1: = specific_impl_function %impl.elem0.loc14_4.1, @Z.WithSelf.ZF(constants.%Z.facet) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.301)] // CHECK:STDOUT: %Z.WithSelf.ZF.call: init %empty_tuple.type = call %specific_impl_fn.loc14_4.1() -// CHECK:STDOUT: %T.ref.loc16: %type_where = name_ref T, %T.loc12_7.2 [symbolic = %T.loc12_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc16: %type_where = name_ref T, %T.loc12_15.2 [symbolic = %T.loc12_15.1 (constants.%T)] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] // CHECK:STDOUT: %YF.ref: %Y.assoc_type = name_ref YF, @Y.WithSelf.%assoc0 [concrete = constants.%assoc0.359] // CHECK:STDOUT: %T.as_type.loc16: type = facet_access_type %T.ref.loc16 [symbolic = %T.as_type.loc14_4.2 (constants.%T.as_type)] @@ -299,7 +299,7 @@ fn F(T:! type where .Self impls W) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc12_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc12_7.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc12_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/named_constraint/generic.carbon b/toolchain/check/testdata/named_constraint/generic.carbon index bbb571d26c0a..29f0d4245280 100644 --- a/toolchain/check/testdata/named_constraint/generic.carbon +++ b/toolchain/check/testdata/named_constraint/generic.carbon @@ -14,66 +14,66 @@ library "[[@TEST_NAME]]"; //@include-in-dumps -constraint GenericType(T:! type) {} +constraint GenericType(T: type) {} interface Z {} -constraint GenericZ(U:! Z) {} +constraint GenericZ(U: Z) {} -constraint ForwardDeclaredGeneric(T:! type); -constraint ForwardDeclaredGeneric(T:! type) {} +constraint ForwardDeclaredGeneric(T: type); +constraint ForwardDeclaredGeneric(T: type) {} // --- fail_mismatched_generic_param_types.carbon library "[[@TEST_NAME]]"; -constraint ForwardDeclaredGeneric(T:! ()); +constraint ForwardDeclaredGeneric(T: ()); // CHECK:STDERR: fail_mismatched_generic_param_types.carbon:[[@LINE+7]]:35: error: type `` of parameter 1 in redeclaration differs from previous parameter type `` [RedeclParamDiffersType] -// CHECK:STDERR: constraint ForwardDeclaredGeneric(T:! type) {} -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: constraint ForwardDeclaredGeneric(T: type) {} +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_mismatched_generic_param_types.carbon:[[@LINE-4]]:35: note: previous declaration's corresponding parameter here [RedeclParamPrevious] -// CHECK:STDERR: constraint ForwardDeclaredGeneric(T:! ()); -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: constraint ForwardDeclaredGeneric(T: ()); +// CHECK:STDERR: ^~~~~ // CHECK:STDERR: -constraint ForwardDeclaredGeneric(T:! type) {} +constraint ForwardDeclaredGeneric(T: type) {} // --- fail_mismatched_generic_param_arity.carbon library "[[@TEST_NAME]]"; -constraint ForwardDeclaredGeneric(T:! type, U:! type); +constraint ForwardDeclaredGeneric(T: type, U: type); // CHECK:STDERR: fail_mismatched_generic_param_arity.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter count of 1 [RedeclParamCountDiffers] -// CHECK:STDERR: constraint ForwardDeclaredGeneric(T:! type) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: constraint ForwardDeclaredGeneric(T: type) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_mismatched_generic_param_arity.carbon:[[@LINE-4]]:1: note: previously declared with parameter count of 2 [RedeclParamCountPrevious] -// CHECK:STDERR: constraint ForwardDeclaredGeneric(T:! type, U:! type); -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: constraint ForwardDeclaredGeneric(T: type, U: type); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -constraint ForwardDeclaredGeneric(T:! type) {} +constraint ForwardDeclaredGeneric(T: type) {} // --- fail_inside_definition.carbon library "[[@TEST_NAME]]"; -constraint Generic(T:! type) {} +constraint Generic(T: type) {} // CHECK:STDERR: fail_inside_definition.carbon:[[@LINE+7]]:1: error: redefinition of `constraint Generic` [RedeclRedef] -// CHECK:STDERR: constraint Generic(T:! type) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: constraint Generic(T: type) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_inside_definition.carbon:[[@LINE-4]]:1: note: previously defined here [RedeclPrevDef] -// CHECK:STDERR: constraint Generic(T:! type) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: constraint Generic(T: type) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -constraint Generic(T:! type) {} +constraint Generic(T: type) {} // --- fail_args_count_mismatch.carbon library "[[@TEST_NAME]]"; -constraint Generic(T:! type) {} +constraint Generic(T: type) {} -// CHECK:STDERR: fail_args_count_mismatch.carbon:[[@LINE+7]]:17: error: 2 arguments passed to generic constraint expecting 1 argument [CallArgCountMismatch] -// CHECK:STDERR: fn F(unused T:! Generic((), ())) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_args_count_mismatch.carbon:[[@LINE+7]]:24: error: 2 arguments passed to generic constraint expecting 1 argument [CallArgCountMismatch] +// CHECK:STDERR: fn F(unused generic T: Generic((), ())) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: fail_args_count_mismatch.carbon:[[@LINE-5]]:1: note: calling generic constraint declared here [InCallToEntity] -// CHECK:STDERR: constraint Generic(T:! type) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: constraint Generic(T: type) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! Generic((), ())) {} +fn F(unused generic T: Generic((), ())) {} // CHECK:STDOUT: --- generic.carbon // CHECK:STDOUT: @@ -112,9 +112,9 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %GenericType.decl: %GenericType.type.d1d = constraint_decl @GenericType [concrete = constants.%empty_struct.b7e] { // CHECK:STDOUT: %T.patt.loc4_25.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_25.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_28.1: type = splice_block %.loc4_28.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_27.1: type = splice_block %.loc4_27.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_28.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_27.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_25.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_25.1 (constants.%T)] // CHECK:STDOUT: } @@ -131,18 +131,18 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: %ForwardDeclaredGeneric.decl.loc9: %ForwardDeclaredGeneric.type.650 = constraint_decl @ForwardDeclaredGeneric [concrete = constants.%empty_struct.43d] { // CHECK:STDOUT: %T.patt.loc9_36.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_36.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_39.1: type = splice_block %.loc9_39.2 [concrete = type] { +// CHECK:STDOUT: %.loc9_38.1: type = splice_block %.loc9_38.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc9: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_39.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_38.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_36.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_36.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %ForwardDeclaredGeneric.decl.loc10: %ForwardDeclaredGeneric.type.650 = constraint_decl @ForwardDeclaredGeneric [concrete = constants.%empty_struct.43d] { // CHECK:STDOUT: %T.patt.loc9_36.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_36.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_39.1: type = splice_block %.loc10_39.2 [concrete = type] { +// CHECK:STDOUT: %.loc10_38.1: type = splice_block %.loc10_38.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc10: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc10_39.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc10_38.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc10: type = symbolic_binding T, 0 [symbolic = %T.loc9_36.1 (constants.%T)] // CHECK:STDOUT: } @@ -167,14 +167,14 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GenericType.type: type = facet_type <@GenericType, @GenericType(%T.loc4_25.1)> [symbolic = %GenericType.type (constants.%GenericType.type.d68)] -// CHECK:STDOUT: %Self.loc4_34.2: @GenericType.%GenericType.type (%GenericType.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.22bbf7.1)] +// CHECK:STDOUT: %Self.loc4_33.2: @GenericType.%GenericType.type (%GenericType.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.22bbf7.1)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { -// CHECK:STDOUT: %Self.loc4_34.1: @GenericType.%GenericType.type (%GenericType.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.22bbf7.1)] +// CHECK:STDOUT: %Self.loc4_33.1: @GenericType.%GenericType.type (%GenericType.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.22bbf7.1)] // CHECK:STDOUT: %GenericType.WithSelf.decl = constraint_with_self_decl @GenericType [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_34.1 +// CHECK:STDOUT: .Self = %Self.loc4_33.1 // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -186,14 +186,14 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %GenericZ.type: type = facet_type <@GenericZ, @GenericZ(%U.loc7_22.1)> [symbolic = %GenericZ.type (constants.%GenericZ.type.d68)] -// CHECK:STDOUT: %Self.loc7_28.2: @GenericZ.%GenericZ.type (%GenericZ.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_28.2 (constants.%Self.22bbf7.2)] +// CHECK:STDOUT: %Self.loc7_27.2: @GenericZ.%GenericZ.type (%GenericZ.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_27.2 (constants.%Self.22bbf7.2)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { -// CHECK:STDOUT: %Self.loc7_28.1: @GenericZ.%GenericZ.type (%GenericZ.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_28.2 (constants.%Self.22bbf7.2)] +// CHECK:STDOUT: %Self.loc7_27.1: @GenericZ.%GenericZ.type (%GenericZ.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_27.2 (constants.%Self.22bbf7.2)] // CHECK:STDOUT: %GenericZ.WithSelf.decl = constraint_with_self_decl @GenericZ [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc7_28.1 +// CHECK:STDOUT: .Self = %Self.loc7_27.1 // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -205,14 +205,14 @@ fn F(unused T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ForwardDeclaredGeneric.type: type = facet_type <@ForwardDeclaredGeneric, @ForwardDeclaredGeneric(%T.loc9_36.1)> [symbolic = %ForwardDeclaredGeneric.type (constants.%ForwardDeclaredGeneric.type.d68)] -// CHECK:STDOUT: %Self.loc10_45.2: @ForwardDeclaredGeneric.%ForwardDeclaredGeneric.type (%ForwardDeclaredGeneric.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc10_45.2 (constants.%Self.22bbf7.3)] +// CHECK:STDOUT: %Self.loc10_44.2: @ForwardDeclaredGeneric.%ForwardDeclaredGeneric.type (%ForwardDeclaredGeneric.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc10_44.2 (constants.%Self.22bbf7.3)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { -// CHECK:STDOUT: %Self.loc10_45.1: @ForwardDeclaredGeneric.%ForwardDeclaredGeneric.type (%ForwardDeclaredGeneric.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc10_45.2 (constants.%Self.22bbf7.3)] +// CHECK:STDOUT: %Self.loc10_44.1: @ForwardDeclaredGeneric.%ForwardDeclaredGeneric.type (%ForwardDeclaredGeneric.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc10_44.2 (constants.%Self.22bbf7.3)] // CHECK:STDOUT: %ForwardDeclaredGeneric.WithSelf.decl = constraint_with_self_decl @ForwardDeclaredGeneric [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc10_45.1 +// CHECK:STDOUT: .Self = %Self.loc10_44.1 // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/named_constraint/import_constraint_decl.carbon b/toolchain/check/testdata/named_constraint/import_constraint_decl.carbon index 28eec053a6b9..4de1e65ce67a 100644 --- a/toolchain/check/testdata/named_constraint/import_constraint_decl.carbon +++ b/toolchain/check/testdata/named_constraint/import_constraint_decl.carbon @@ -31,7 +31,7 @@ constraint B { //@include-in-dumps impl library "[[@TEST_NAME]]"; -fn F(unused T:! B) {} +fn F(unused generic T: B) {} // --- fail_import_not_identified.carbon library "[[@TEST_NAME]]"; @@ -113,13 +113,13 @@ impl C as B {} // CHECK:STDOUT: %default.import.loc2_17.1 = import // CHECK:STDOUT: %default.import.loc2_17.2 = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc4_22.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_22.2 (constants.%T.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4: type = splice_block %B.ref [concrete = constants.%B.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %B.ref: type = name_ref B, imports.%Main.B [concrete = constants.%B.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_14.2: %B.type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] +// CHECK:STDOUT: %T.loc4_22.2: %B.type = symbolic_binding T, 0 [symbolic = %T.loc4_22.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -149,9 +149,9 @@ impl C as B {} // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc4_14.2: %B.type) { -// CHECK:STDOUT: %T.patt.loc4_14.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc4_14.1: %B.type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] +// CHECK:STDOUT: generic fn @F(%T.loc4_22.2: %B.type) { +// CHECK:STDOUT: %T.patt.loc4_22.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_22.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc4_22.1: %B.type = symbolic_binding T, 0 [symbolic = %T.loc4_22.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -175,7 +175,7 @@ impl C as B {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc4_14.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc4_22.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc4_22.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/named_constraint/import_type_and.carbon b/toolchain/check/testdata/named_constraint/import_type_and.carbon index 8c62a49461db..e8f9c55fae61 100644 --- a/toolchain/check/testdata/named_constraint/import_type_and.carbon +++ b/toolchain/check/testdata/named_constraint/import_type_and.carbon @@ -27,7 +27,7 @@ impl library "[[@TEST_NAME]]"; //@include-in-dumps -fn F(_:! N) {} +fn F(generic _: N) {} // CHECK:STDOUT: --- import.carbon // CHECK:STDOUT: @@ -195,13 +195,13 @@ fn F(_:! N) {} // CHECK:STDOUT: %default.import.loc1_22.2 = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %_.patt.loc5_7.1: %pattern_type.9a5 = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc5_7.2 (constants.%_.patt)] +// CHECK:STDOUT: %_.patt.loc5_15.1: %pattern_type.9a5 = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc5_15.2 (constants.%_.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc5: type = splice_block %N.ref [concrete = constants.%N.type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %N.ref: type = name_ref N, imports.%Main.N [concrete = constants.%N.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %_.loc5_7.2: %N.type = symbolic_binding _, 0 [symbolic = %_.loc5_7.1 (constants.%_)] +// CHECK:STDOUT: %_.loc5_15.2: %N.type = symbolic_binding _, 0 [symbolic = %_.loc5_15.1 (constants.%_)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -240,9 +240,9 @@ fn F(_:! N) {} // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.190)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%_.loc5_7.2: %N.type) { -// CHECK:STDOUT: %_.patt.loc5_7.2: %pattern_type.9a5 = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc5_7.2 (constants.%_.patt)] -// CHECK:STDOUT: %_.loc5_7.1: %N.type = symbolic_binding _, 0 [symbolic = %_.loc5_7.1 (constants.%_)] +// CHECK:STDOUT: generic fn @F(%_.loc5_15.2: %N.type) { +// CHECK:STDOUT: %_.patt.loc5_15.2: %pattern_type.9a5 = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc5_15.2 (constants.%_.patt)] +// CHECK:STDOUT: %_.loc5_15.1: %N.type = symbolic_binding _, 0 [symbolic = %_.loc5_15.1 (constants.%_)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -266,7 +266,7 @@ fn F(_:! N) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%_) { -// CHECK:STDOUT: %_.patt.loc5_7.2 => constants.%_.patt -// CHECK:STDOUT: %_.loc5_7.1 => constants.%_ +// CHECK:STDOUT: %_.patt.loc5_15.2 => constants.%_.patt +// CHECK:STDOUT: %_.loc5_15.1 => constants.%_ // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/named_constraint/incomplete.carbon b/toolchain/check/testdata/named_constraint/incomplete.carbon index f8f6acc919b9..5e74c3b7574e 100644 --- a/toolchain/check/testdata/named_constraint/incomplete.carbon +++ b/toolchain/check/testdata/named_constraint/incomplete.carbon @@ -18,7 +18,7 @@ interface Z {} // An incomplete constraint is a valid type for a symbolic facet, and is just // not able to provide any witness for an impl lookup on that facet. constraint N; -fn F(T:! N) { +fn F(generic T: N) { // CHECK:STDERR: fail_incomplete_constraint_in_impl_lookup.carbon:[[@LINE+4]]:3: error: cannot convert type `T` that implements `N` into type implementing `Z` [ConversionFailureFacetToFacet] // CHECK:STDERR: T as Z; // CHECK:STDERR: ^~~~~~ @@ -35,7 +35,7 @@ interface Z {} // Since N is an incomplete constraint, it can not be identified as a target for // impl lookup to determine if C implements N. No diagnostic is attached to the // impl when the lookup fails, we simply fail to convert. -impl forall [T:! N] T as Z {} +impl forall [T: N] T as Z {} class C; @@ -55,7 +55,7 @@ constraint N; interface Z {} // N is incomplete here, but that's okay. We don't need it to be identified // until a lookup tries to use this impl. -impl forall [T:! N] T as Z {} +impl forall [T: N] T as Z {} class C; @@ -72,7 +72,7 @@ library "[[@TEST_NAME]]"; constraint Z; -fn AsZ(unused T:! Z) {} +fn AsZ(unused generic T: Z) {} fn F() { // Converting to facet type `Z` requires `Z` to be identified. @@ -82,9 +82,9 @@ fn F() { // CHECK:STDERR: fail_impl_lookup_target_not_identified.carbon:[[@LINE-9]]:1: note: constraint was forward declared here [NamedConstraintForwardDeclaredHere] // CHECK:STDERR: constraint Z; // CHECK:STDERR: ^~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_lookup_target_not_identified.carbon:[[@LINE-10]]:15: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn AsZ(unused T:! Z) {} - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: fail_impl_lookup_target_not_identified.carbon:[[@LINE-10]]:23: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn AsZ(unused generic T: Z) {} + // CHECK:STDERR: ^~~~ // CHECK:STDERR: AsZ(()); } @@ -96,15 +96,15 @@ library "[[@TEST_NAME]]"; // being defined where this is called. This causes an error diagnostic at the // call. // -// TODO: Define the function to `return U` once we can write `T:! Core.Copy`. +// TODO: Define the function to `return U` once we can write `T: Core.Copy`. // Right now, due to #5750, facets are not seen to implement `Core.Copy`. -eval fn ReturnFacet[T:! type](U:! T) -> T; +eval fn ReturnFacet[T: type](generic U: T) -> T; -interface Y { let YT:! type; } +interface Y { let YT: type; } interface Z {} -interface X { let XZ:! Z; } +interface X { let XZ: Z; } constraint W { require impls Z; // CHECK:STDERR: fail_incomplete_self.carbon:[[@LINE+17]]:31: error: function returns incomplete type `W` [IncompleteTypeInFunctionReturnType] @@ -113,16 +113,16 @@ constraint W { // CHECK:STDERR: fail_incomplete_self.carbon:[[@LINE-5]]:1: note: constraint is currently being defined [NamedConstraintIncompleteWithinDefinition] // CHECK:STDERR: constraint W { // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete_self.carbon:[[@LINE-15]]:38: note: return type declared here [IncompleteReturnTypeHere] - // CHECK:STDERR: eval fn ReturnFacet[T:! type](U:! T) -> T; - // CHECK:STDERR: ^~~~ + // CHECK:STDERR: fail_incomplete_self.carbon:[[@LINE-15]]:44: note: return type declared here [IncompleteReturnTypeHere] + // CHECK:STDERR: eval fn ReturnFacet[T: type](generic U: T) -> T; + // CHECK:STDERR: ^~~~ // CHECK:STDERR: // CHECK:STDERR: fail_incomplete_self.carbon:[[@LINE+7]]:31: error: use of undefined generic function [MissingGenericFunctionDefinition] // CHECK:STDERR: require impls X where .XZ = ReturnFacet(Self); // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: fail_incomplete_self.carbon:[[@LINE-22]]:1: note: generic function declared here [MissingGenericFunctionDefinitionHere] - // CHECK:STDERR: eval fn ReturnFacet[T:! type](U:! T) -> T; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: eval fn ReturnFacet[T: type](generic U: T) -> T; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: require impls X where .XZ = ReturnFacet(Self); } diff --git a/toolchain/check/testdata/named_constraint/require.carbon b/toolchain/check/testdata/named_constraint/require.carbon index f4b6a2014000..5401b10d657f 100644 --- a/toolchain/check/testdata/named_constraint/require.carbon +++ b/toolchain/check/testdata/named_constraint/require.carbon @@ -23,7 +23,7 @@ constraint Z { } //@dump-sem-ir-end -fn F(T:! Z, t: T) { +fn F(generic T: Z, t: T) { //@dump-sem-ir-begin T.YY(); T.(Y.YY)(); @@ -35,7 +35,7 @@ fn F(T:! Z, t: T) { // --- extend_with_self.carbon library "[[@TEST_NAME]]"; -interface Y(T:! type) { +interface Y(T: type) { fn YY(); } @@ -45,7 +45,7 @@ constraint Z { } //@dump-sem-ir-end -fn F(T:! Z, t: T) { +fn F(generic T: Z, t: T) { //@dump-sem-ir-begin T.YY(); T.(Y(T).YY)(); @@ -67,7 +67,7 @@ constraint Z { } //@dump-sem-ir-end -fn F(T:! Z) { +fn F(generic T: Z) { T.(Y.YY)(); } @@ -84,7 +84,7 @@ constraint Z { } //@dump-sem-ir-end -fn F(T:! Z) { +fn F(generic T: Z) { T.(Y.YY)(); } @@ -99,7 +99,7 @@ constraint Z { require impls Y; } -fn F(T:! Z) { +fn F(generic T: Z) { // This should fail name lookup since Z does not extend Y. // // CHECK:STDERR: fail_implicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInSpecificScope] @@ -120,7 +120,7 @@ constraint Z { require Self impls Y; } -fn F(T:! Z) { +fn F(generic T: Z) { // This should fail name lookup since Z does not extend Y. // // CHECK:STDERR: fail_explicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInSpecificScope] @@ -135,7 +135,7 @@ library "[[@TEST_NAME]]"; interface Y {} -class C(T:! type); +class C(T: type); //@dump-sem-ir-begin constraint Z { @@ -146,7 +146,7 @@ constraint Z { // --- require_impls_where.carbon library "[[@TEST_NAME]]"; -interface Y { let Y1:! type; } +interface Y { let Y1: type; } //@dump-sem-ir-begin constraint Z { @@ -224,7 +224,7 @@ constraint Z { // --- fail_require_impls_incomplete_self_in_class_impls.carbon library "[[@TEST_NAME]]"; -class C(T:! type); +class C(T: type); constraint Z { // CHECK:STDERR: fail_require_impls_incomplete_self_in_class_impls.carbon:[[@LINE+4]]:17: error: facet type in `require` declaration refers to the named constraint `Z` from within its definition [RequireImplsReferenceCycle] // CHECK:STDERR: require impls type where C(.Self) impls Z; @@ -256,7 +256,7 @@ constraint Z { // --- fail_require_impls_incomplete_self_specific.carbon library "[[@TEST_NAME]]"; -constraint Z(T:! type) { +constraint Z(T: type) { // CHECK:STDERR: fail_require_impls_incomplete_self_specific.carbon:[[@LINE+4]]:19: error: facet type in `require` declaration refers to the named constraint `Z` from within its definition [RequireImplsReferenceCycle] // CHECK:STDERR: require T impls Z(Self); // CHECK:STDERR: ^~~~~~~ @@ -268,11 +268,11 @@ constraint Z(T:! type) { library "[[@TEST_NAME]]"; interface Y { - let Y1:! type; + let Y1: type; } //@dump-sem-ir-begin -constraint Z(T:! type) { +constraint Z(T: type) { // Either the type `T` or the facet type `Y` must mention `Self` in a way that // it would appear in the type structure used for impl lookup (so inside a // `where` does not count). But they don't. @@ -288,9 +288,9 @@ constraint Z(T:! type) { // --- fail_require_impls_without_self_in_one_interface.carbon library "[[@TEST_NAME]]"; -interface Y(T:! type) {} +interface Y(T: type) {} -constraint Z(T:! type) { +constraint Z(T: type) { // Self is in one interface but not the other. // // CHECK:STDERR: fail_require_impls_without_self_in_one_interface.carbon:[[@LINE+4]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but found interface `Y({})` without a `Self` argument [RequireImplsMissingSelf] @@ -303,9 +303,9 @@ constraint Z(T:! type) { // --- fail_require_impls_without_self_in_multiple_interfaces.carbon library "[[@TEST_NAME]]"; -interface Y(T:! type) {} +interface Y(T: type) {} -constraint Z(T:! type) { +constraint Z(T: type) { // Self does not appear in either interface, we should get an error for each. // // CHECK:STDERR: fail_require_impls_without_self_in_multiple_interfaces.carbon:[[@LINE+8]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but found interface `Y(())` without a `Self` argument [RequireImplsMissingSelf] @@ -322,7 +322,7 @@ constraint Z(T:! type) { // --- fail_self_impls_self.carbon library "[[@TEST_NAME]]"; -constraint Z(T:! type) { +constraint Z(T: type) { // CHECK:STDERR: fail_self_impls_self.carbon:[[@LINE+4]]:17: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType] // CHECK:STDERR: require impls Self; // CHECK:STDERR: ^~~~ @@ -333,9 +333,9 @@ constraint Z(T:! type) { // --- fail_impls_type.carbon library "[[@TEST_NAME]]"; -class C(T:! type) {} +class C(T: type) {} -constraint Z(T:! type) { +constraint Z(T: type) { // CHECK:STDERR: fail_impls_type.carbon:[[@LINE+4]]:19: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType] // CHECK:STDERR: require T impls C(Self); // CHECK:STDERR: ^~~~~~~ @@ -348,7 +348,7 @@ library "[[@TEST_NAME]]"; interface Y {} -constraint Z(T:! type) { +constraint Z(T: type) { // CHECK:STDERR: fail_non_type_impls.carbon:[[@LINE+7]]:11: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet] // CHECK:STDERR: require 1 impls Y; // CHECK:STDERR: ^ @@ -364,7 +364,7 @@ library "[[@TEST_NAME]]"; interface Y {} -constraint Z(T:! type) { +constraint Z(T: type) { // CHECK:STDERR: fail_impls_non_type.carbon:[[@LINE+4]]:17: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType] // CHECK:STDERR: require impls 1; // CHECK:STDERR: ^ @@ -376,7 +376,7 @@ constraint Z(T:! type) { library "[[@TEST_NAME]]"; interface Y { - let Y1:! type; + let Y1: type; } //@dump-sem-ir-begin @@ -389,7 +389,7 @@ constraint Z { // --- require_self.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} constraint N { require impls Z(Self); @@ -404,7 +404,7 @@ fn F() { // --- fail_require_different_self.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} constraint N { require impls Z(Self); @@ -426,7 +426,7 @@ fn F() { // --- fail_require_different_parameter.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} constraint N { require impls Z({}); @@ -447,7 +447,7 @@ fn F() { // --- require_different_type_impls.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} constraint N { require {} impls Z(Self); @@ -462,9 +462,9 @@ fn F() { // --- require_different_type_impls_nested_constraint.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} -constraint M(T:! type) { +constraint M(T: type) { extend require impls Z(T); } @@ -481,9 +481,9 @@ fn F() { // --- fail_require_different_type_impls_nested_constraint_without_reference_to_outer_self.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} -constraint M(T:! type) { +constraint M(T: type) { extend require impls Z(Self); } @@ -501,7 +501,7 @@ constraint N { // --- fail_require_different_type_impls_nested_constraint_empty.carbon library "[[@TEST_NAME]]"; -constraint M(T:! type) {} +constraint M(T: type) {} constraint N { // `M(T)` does not make use of the `T`, which is assigned `Self`, so we end up @@ -517,7 +517,7 @@ constraint N { // --- fail_require_different_type_impls_different_parameter.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} constraint N { require {} impls Z(Self); @@ -539,8 +539,8 @@ fn F() { // --- require_with_rewrite_constraint.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } constraint N { @@ -557,11 +557,11 @@ fn F() { // --- require_with_rewrite_constraint_period_self.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } -constraint N(T:! type) { +constraint N(T: type) { require T impls Z(Self) where .X = .Self; } @@ -575,8 +575,8 @@ fn F() { // --- todo_fail_require_with_mismatching_rewrite_constraint.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } constraint N { @@ -596,11 +596,11 @@ fn F() { // --- todo_fail_require_with_mismatching_rewrite_constraint_period_self.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let X:! type; +interface Z(T: type) { + let X: type; } -constraint N(T:! type) { +constraint N(T: type) { require T impls Z(Self) where .X = .Self; } @@ -618,17 +618,17 @@ fn F() { library "[[@TEST_NAME]]"; interface Z {} -interface Y(T:! type) {} +interface Y(T: type) {} -class C(T:! type); +class C(T: type); constraint N { require impls Z where .Self impls Y(.Self); } -fn F(_:! N) {} +fn F(generic _: N) {} -fn G(T:! Z) { +fn G(generic T: Z) { // CHECK:STDERR: fail_require_with_period_self_impls_not_satisfied.carbon:[[@LINE+4]]:3: error: cannot convert type `T` that implements `Z` into type implementing `N` [ConversionFailureFacetToFacet] // CHECK:STDERR: T as N; // CHECK:STDERR: ^~~~~~ @@ -640,9 +640,9 @@ fn G(T:! Z) { library "[[@TEST_NAME]]"; interface Z {} -interface Y(T:! type) {} +interface Y(T: type) {} -class C(T:! type); +class C(T: type); //@dump-sem-ir-begin constraint N { @@ -650,9 +650,9 @@ constraint N { } //@dump-sem-ir-end -fn F(_:! N) {} +fn F(generic _: N) {} -fn G(T:! Z & Y(.Self)) { +fn G(generic T: Z & Y(.Self)) { T as N; } @@ -660,17 +660,17 @@ fn G(T:! Z & Y(.Self)) { library "[[@TEST_NAME]]"; interface Z {} -interface Y(T:! type) {} +interface Y(T: type) {} -class C(T:! type); +class C(T: type); constraint N { require impls Z where C(.Self) impls Y(.Self); } -fn F(_:! N) {} +fn F(generic _: N) {} -fn G(T:! Z) { +fn G(generic T: Z) { // CHECK:STDERR: fail_require_with_specific_period_self_not_satisfied.carbon:[[@LINE+4]]:3: error: cannot convert type `T` that implements `Z` into type implementing `N` [ConversionFailureFacetToFacet] // CHECK:STDERR: T as N; // CHECK:STDERR: ^~~~~~ @@ -682,9 +682,9 @@ fn G(T:! Z) { library "[[@TEST_NAME]]"; interface Z {} -interface Y(T:! type) {} +interface Y(T: type) {} -class C(T:! type); +class C(T: type); //@dump-sem-ir-begin constraint N { @@ -692,9 +692,9 @@ constraint N { } //@dump-sem-ir-end -fn F(_:! N) {} +fn F(generic _: N) {} -fn G(T:! Z) { +fn G(generic T: Z) { impl C(T) as Y(T) {} T as N; } @@ -702,10 +702,10 @@ fn G(T:! Z) { // --- partially_identified_witness_from_self_in_lookup_facet_type.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let Z1:! type; +interface Z(T: type) { + let Z1: type; } -interface Y(T:! type) {} +interface Y(T: type) {} class C {} @@ -719,8 +719,8 @@ constraint N { // --- fail_self_in_compound_member_access_is_not_in_type_structure.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) { - let Z1:! type; +interface Z(T: type) { + let Z1: type; } interface Y {} @@ -743,8 +743,8 @@ constraint N { library "[[@TEST_NAME]]"; interface Z { - let Z1:! type; - let Z2:! type; + let Z1: type; + let Z2: type; } constraint N { @@ -815,37 +815,37 @@ constraint N { // CHECK:STDOUT: %Self.as_type.loc9_18.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_18.2 (constants.%Self.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc13_7.2: %Z.type) { +// CHECK:STDOUT: generic fn @F(%T.loc13_15.2: %Z.type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %T.loc13_7.1, @Y [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)] -// CHECK:STDOUT: %Y.facet.loc15: %Y.type = facet_value %T.as_type.loc13_16.1, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)] +// CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %T.loc13_15.1, @Y [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)] +// CHECK:STDOUT: %Y.facet.loc15: %Y.type = facet_value %T.as_type.loc13_23.1, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)] // CHECK:STDOUT: %Y.WithSelf.YY.type: type = fn_type @Y.WithSelf.YY, @Y.WithSelf(%Y.facet.loc15) [symbolic = %Y.WithSelf.YY.type (constants.%Y.WithSelf.YY.type.0e8)] // CHECK:STDOUT: %.loc15_4.2: type = fn_type_with_self_type %Y.WithSelf.YY.type, %Y.facet.loc15 [symbolic = %.loc15_4.2 (constants.%.43c)] // CHECK:STDOUT: %impl.elem0.loc15_4.2: @F.%.loc15_4.2 (%.43c) = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc15_4.2: = specific_impl_function %impl.elem0.loc15_4.2, @Y.WithSelf.YY(%Y.facet.loc15) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc13_16.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc13_23.1 (%T.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref.loc15: %Z.type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc13_16.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc15_4.1: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc13_16.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.ref.loc15: %Z.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc15_4.1: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)] // CHECK:STDOUT: %YY.ref.loc15: %Y.assoc_type = name_ref YY, @Y.WithSelf.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc15_4.1: @F.%.loc15_4.2 (%.43c) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc15_4.1: = specific_impl_function %impl.elem0.loc15_4.1, @Y.WithSelf.YY(constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %Y.WithSelf.YY.call.loc15: init %empty_tuple.type = call %specific_impl_fn.loc15_4.1() -// CHECK:STDOUT: %T.ref.loc16: %Z.type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc16: %Z.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T)] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] // CHECK:STDOUT: %YY.ref.loc16: %Y.assoc_type = name_ref YY, @Y.WithSelf.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %T.as_type.loc16: type = facet_access_type %T.ref.loc16 [symbolic = %T.as_type.loc13_16.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc16: type = facet_access_type %T.ref.loc16 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)] // CHECK:STDOUT: %Y.facet.loc16: %Y.type = facet_value %T.as_type.loc16, (constants.%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)] // CHECK:STDOUT: %.loc16: %Y.type = converted %T.ref.loc16, %Y.facet.loc16 [symbolic = %Y.facet.loc15 (constants.%Y.facet)] // CHECK:STDOUT: %impl.elem0.loc16: @F.%.loc15_4.2 (%.43c) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc16: = specific_impl_function %impl.elem0.loc16, @Y.WithSelf.YY(constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %Y.WithSelf.YY.call.loc16: init %empty_tuple.type = call %specific_impl_fn.loc16() -// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc13_16.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc13_23.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %YY.ref.loc18: %Y.assoc_type = name_ref YY, @Y.WithSelf.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc18: @F.%.loc15_4.2 (%.43c) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc18: = specific_impl_function %impl.elem0.loc18, @Y.WithSelf.YY(constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] @@ -866,12 +866,12 @@ constraint N { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc13_7.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc13_16.1 => constants.%T.as_type +// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc13_15.1 => constants.%T +// CHECK:STDOUT: %T.as_type.loc13_23.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.86a -// CHECK:STDOUT: %t.param_patt.loc13_14.2 => constants.%t.param_patt -// CHECK:STDOUT: %t.patt.loc13_14.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc13_21.2 => constants.%t.param_patt +// CHECK:STDOUT: %t.patt.loc13_21.2 => constants.%t.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%T) { @@ -956,47 +956,47 @@ constraint N { // CHECK:STDOUT: %Y.type.loc9_30.2: type = facet_type <@Y, @Y(%Self.as_type.loc9_18.2)> [symbolic = %Y.type.loc9_30.2 (constants.%Y.type.f41)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc13_7.2: %Z.type) { +// CHECK:STDOUT: generic fn @F(%T.loc13_15.2: %Z.type) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%T.as_type.loc13_16.1) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.0ce)] +// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%T.as_type.loc13_23.1) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.0ce)] // CHECK:STDOUT: %assoc0: @F.%Y.assoc_type (%Y.assoc_type.0ce) = assoc_entity element0, @Y.WithSelf.%Y.WithSelf.YY.decl [symbolic = %assoc0 (constants.%assoc0.cc2)] -// CHECK:STDOUT: %Y.type.loc15: type = facet_type <@Y, @Y(%T.as_type.loc13_16.1)> [symbolic = %Y.type.loc15 (constants.%Y.type.40d)] -// CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %T.loc13_7.1, @Y, @Y(%T.as_type.loc13_16.1) [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)] -// CHECK:STDOUT: %Y.facet.loc15: @F.%Y.type.loc15 (%Y.type.40d) = facet_value %T.as_type.loc13_16.1, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)] -// CHECK:STDOUT: %Y.WithSelf.YY.type: type = fn_type @Y.WithSelf.YY, @Y.WithSelf(%T.as_type.loc13_16.1, %Y.facet.loc15) [symbolic = %Y.WithSelf.YY.type (constants.%Y.WithSelf.YY.type.5a5)] +// CHECK:STDOUT: %Y.type.loc15: type = facet_type <@Y, @Y(%T.as_type.loc13_23.1)> [symbolic = %Y.type.loc15 (constants.%Y.type.40d)] +// CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %T.loc13_15.1, @Y, @Y(%T.as_type.loc13_23.1) [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)] +// CHECK:STDOUT: %Y.facet.loc15: @F.%Y.type.loc15 (%Y.type.40d) = facet_value %T.as_type.loc13_23.1, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)] +// CHECK:STDOUT: %Y.WithSelf.YY.type: type = fn_type @Y.WithSelf.YY, @Y.WithSelf(%T.as_type.loc13_23.1, %Y.facet.loc15) [symbolic = %Y.WithSelf.YY.type (constants.%Y.WithSelf.YY.type.5a5)] // CHECK:STDOUT: %.loc15_4.3: type = fn_type_with_self_type %Y.WithSelf.YY.type, %Y.facet.loc15 [symbolic = %.loc15_4.3 (constants.%.44d)] // CHECK:STDOUT: %impl.elem0.loc15_4.2: @F.%.loc15_4.3 (%.44d) = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc15_4.2: = specific_impl_function %impl.elem0.loc15_4.2, @Y.WithSelf.YY(%T.as_type.loc13_16.1, %Y.facet.loc15) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc15_4.2: = specific_impl_function %impl.elem0.loc15_4.2, @Y.WithSelf.YY(%T.as_type.loc13_23.1, %Y.facet.loc15) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %require_complete.loc16: = require_complete_type %Y.type.loc15 [symbolic = %require_complete.loc16 (constants.%require_complete.4ae)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc13_16.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc13_23.1 (%T.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref.loc15: %Z.type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T.f45)] -// CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc13_16.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc15_4.1: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc13_16.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.ref.loc15: %Z.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T.f45)] +// CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc15_4.1: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)] // CHECK:STDOUT: %.loc15_4.2: @F.%Y.assoc_type (%Y.assoc_type.0ce) = specific_constant @Y.WithSelf.%assoc0.loc4_10.1, @Y.WithSelf(constants.%T.as_type, constants.%T.f45) [symbolic = %assoc0 (constants.%assoc0.cc2)] // CHECK:STDOUT: %YY.ref.loc15: @F.%Y.assoc_type (%Y.assoc_type.0ce) = name_ref YY, %.loc15_4.2 [symbolic = %assoc0 (constants.%assoc0.cc2)] // CHECK:STDOUT: %impl.elem0.loc15_4.1: @F.%.loc15_4.3 (%.44d) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc15_4.1: = specific_impl_function %impl.elem0.loc15_4.1, @Y.WithSelf.YY(constants.%T.as_type, constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %Y.WithSelf.YY.call.loc15: init %empty_tuple.type = call %specific_impl_fn.loc15_4.1() -// CHECK:STDOUT: %T.ref.loc16_3: %Z.type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T.f45)] +// CHECK:STDOUT: %T.ref.loc16_3: %Z.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T.f45)] // CHECK:STDOUT: %Y.ref: %Y.type.cb4 = name_ref Y, file.%Y.decl [concrete = constants.%Y.generic] -// CHECK:STDOUT: %T.ref.loc16_8: %Z.type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T.f45)] -// CHECK:STDOUT: %T.as_type.loc16_9: type = facet_access_type %T.ref.loc16_8 [symbolic = %T.as_type.loc13_16.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc16_9: type = converted %T.ref.loc16_8, %T.as_type.loc16_9 [symbolic = %T.as_type.loc13_16.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.ref.loc16_8: %Z.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T.f45)] +// CHECK:STDOUT: %T.as_type.loc16_9: type = facet_access_type %T.ref.loc16_8 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc16_9: type = converted %T.ref.loc16_8, %T.as_type.loc16_9 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)] // CHECK:STDOUT: %Y.type.loc16: type = facet_type <@Y, @Y(constants.%T.as_type)> [symbolic = %Y.type.loc15 (constants.%Y.type.40d)] // CHECK:STDOUT: %.loc16_10: @F.%Y.assoc_type (%Y.assoc_type.0ce) = specific_constant @Y.WithSelf.%assoc0.loc4_10.1, @Y.WithSelf(constants.%T.as_type, constants.%Self.624) [symbolic = %assoc0 (constants.%assoc0.cc2)] // CHECK:STDOUT: %YY.ref.loc16: @F.%Y.assoc_type (%Y.assoc_type.0ce) = name_ref YY, %.loc16_10 [symbolic = %assoc0 (constants.%assoc0.cc2)] -// CHECK:STDOUT: %T.as_type.loc16_4: type = facet_access_type %T.ref.loc16_3 [symbolic = %T.as_type.loc13_16.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc16_4: type = facet_access_type %T.ref.loc16_3 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)] // CHECK:STDOUT: %Y.facet.loc16: @F.%Y.type.loc15 (%Y.type.40d) = facet_value %T.as_type.loc16_4, (constants.%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)] // CHECK:STDOUT: %.loc16_4: @F.%Y.type.loc15 (%Y.type.40d) = converted %T.ref.loc16_3, %Y.facet.loc16 [symbolic = %Y.facet.loc15 (constants.%Y.facet)] // CHECK:STDOUT: %impl.elem0.loc16: @F.%.loc15_4.3 (%.44d) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc16: = specific_impl_function %impl.elem0.loc16, @Y.WithSelf.YY(constants.%T.as_type, constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %Y.WithSelf.YY.call.loc16: init %empty_tuple.type = call %specific_impl_fn.loc16() -// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc13_16.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc13_23.1 (%T.as_type) = name_ref t, %t // CHECK:STDOUT: %.loc18: @F.%Y.assoc_type (%Y.assoc_type.0ce) = specific_constant @Y.WithSelf.%assoc0.loc4_10.1, @Y.WithSelf(constants.%T.as_type, constants.%T.f45) [symbolic = %assoc0 (constants.%assoc0.cc2)] // CHECK:STDOUT: %YY.ref.loc18: @F.%Y.assoc_type (%Y.assoc_type.0ce) = name_ref YY, %.loc18 [symbolic = %assoc0 (constants.%assoc0.cc2)] // CHECK:STDOUT: %impl.elem0.loc18: @F.%.loc15_4.3 (%.44d) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] @@ -1023,12 +1023,12 @@ constraint N { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.f45) { -// CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt.3a0 -// CHECK:STDOUT: %T.loc13_7.1 => constants.%T.f45 -// CHECK:STDOUT: %T.as_type.loc13_16.1 => constants.%T.as_type +// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.loc13_15.1 => constants.%T.f45 +// CHECK:STDOUT: %T.as_type.loc13_23.1 => constants.%T.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.86a -// CHECK:STDOUT: %t.param_patt.loc13_14.2 => constants.%t.param_patt -// CHECK:STDOUT: %t.patt.loc13_14.2 => constants.%t.patt +// CHECK:STDOUT: %t.param_patt.loc13_21.2 => constants.%t.param_patt +// CHECK:STDOUT: %t.patt.loc13_21.2 => constants.%t.patt // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%T.f45) { @@ -1347,9 +1347,9 @@ constraint N { // CHECK:STDOUT: %Z.decl: %Z.type.8e1 = constraint_decl @Z [concrete = constants.%empty_struct] { // CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)] // CHECK:STDOUT: } @@ -1361,14 +1361,14 @@ constraint N { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc8_15.1)> [symbolic = %Z.type (constants.%Z.type.d68)] -// CHECK:STDOUT: %Self.loc8_24.2: @Z.%Z.type (%Z.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc8_24.2 (constants.%Self.22b)] +// CHECK:STDOUT: %Self.loc8_23.2: @Z.%Z.type (%Z.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc8_23.2 (constants.%Self.22b)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { -// CHECK:STDOUT: %Self.loc8_24.1: @Z.%Z.type (%Z.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc8_24.2 (constants.%Self.22b)] +// CHECK:STDOUT: %Self.loc8_23.1: @Z.%Z.type (%Z.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc8_23.2 (constants.%Self.22b)] // CHECK:STDOUT: %Z.WithSelf.decl = constraint_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc8_24.1 +// CHECK:STDOUT: .Self = %Self.loc8_23.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .Y = // CHECK:STDOUT: .T = diff --git a/toolchain/check/testdata/namespace/fail_params.carbon b/toolchain/check/testdata/namespace/fail_params.carbon index 0000d5d9a458..a34852c65968 100644 --- a/toolchain/check/testdata/namespace/fail_params.carbon +++ b/toolchain/check/testdata/namespace/fail_params.carbon @@ -21,31 +21,29 @@ namespace A(); // Parameters are ignored for error recovery. fn A.F() {} -// CHECK:STDERR: fail_params.carbon:[[@LINE+8]]:16: error: name `Core.Int` implicitly referenced here, but not found [CoreNameNotFound] -// CHECK:STDERR: namespace B(n: i32); -// CHECK:STDERR: ^~~ -// CHECK:STDERR: // CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:12: error: `namespace` declaration cannot have parameters [UnexpectedDeclNameParams] -// CHECK:STDERR: namespace B(n: i32); -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: namespace B(T: type); +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -namespace B(n: i32); +namespace B(T: type); + +interface I(T: type) {} // CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:12: error: `namespace` declaration cannot have parameters [UnexpectedDeclNameParams] -// CHECK:STDERR: namespace C[T:! type](x: T); -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: namespace C[T: type](U: I(T)); +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -namespace C[T:! type](x: T); +namespace C[T: type](U: I(T)); namespace D; // CHECK:STDERR: fail_params.carbon:[[@LINE+7]]:4: error: redeclaration differs because of parameter list [RedeclParamListDiffers] -// CHECK:STDERR: fn D(unused T:! type).F() {} +// CHECK:STDERR: fn D(unused T: type).F() {} // CHECK:STDERR: ^ // CHECK:STDERR: fail_params.carbon:[[@LINE-4]]:1: note: previously declared without parameter list [RedeclParamListPrevious] // CHECK:STDERR: namespace D; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: -fn D(unused T:! type).F() {} +fn D(unused T: type).F() {} // CHECK:STDOUT: --- fail_params.carbon // CHECK:STDOUT: @@ -57,14 +55,18 @@ fn D(unused T:! type).F() {} // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.67db0b.1: 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.3fe: type = facet_type <@I, @I(%T.67db0b.1)> [symbolic] +// CHECK:STDOUT: %Self: %I.type.3fe = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %U: %I.type.3fe = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %T.67db0b.2: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %F.type.eb3: type = fn_type @F.loc48 [concrete] +// CHECK:STDOUT: %F.type.eb3: type = fn_type @F.loc46 [concrete] // CHECK:STDOUT: %F.708: %F.type.eb3 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Int = // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -75,6 +77,7 @@ fn D(unused T:! type).F() {} // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .A = %A // CHECK:STDOUT: .B = %B +// CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: .C = %C // CHECK:STDOUT: .D = %D // CHECK:STDOUT: } @@ -83,26 +86,63 @@ fn D(unused T:! type).F() {} // CHECK:STDOUT: .F = %F.decl.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl.loc22: %F.type.14e = fn_decl @F.loc22 [concrete = constants.%F.19f] {} {} -// CHECK:STDOUT: %n.param: = value_param call_param0 -// CHECK:STDOUT: %.loc32: type = type_literal [concrete = ] -// CHECK:STDOUT: %n: = wrapper_binding n, [concrete = ] -// CHECK:STDOUT: %B: = namespace [concrete] {} -// CHECK:STDOUT: %.loc38_17.1: type = splice_block %.loc38_17.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc38_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc28_16.1: type = splice_block %.loc28_16.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc28: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc28_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = constants.%T.67db0b.1] -// CHECK:STDOUT: %x.param: %T.67db0b.1 = value_param call_param0 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T.67db0b.1] -// CHECK:STDOUT: %x: %T.67db0b.1 = wrapper_binding x, %x.param +// CHECK:STDOUT: %T.loc28: type = symbolic_binding T, 0 [symbolic = constants.%T.67db0b.1] +// CHECK:STDOUT: %B: = namespace [concrete] {} +// CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { +// CHECK:STDOUT: %T.patt.loc30_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc30_14.2 (constants.%T.patt)] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %.loc30_16.1: type = splice_block %.loc30_16.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc30_16.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: } +// CHECK:STDOUT: %T.loc30_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc30_14.1 (constants.%T.67db0b.1)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %.loc36_16.1: type = splice_block %.loc36_16.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc36_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc36_16.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: } +// CHECK:STDOUT: %T.loc36: type = symbolic_binding T, 0 [symbolic = constants.%T.67db0b.1] +// CHECK:STDOUT: %.loc36_28: type = splice_block %I.type [symbolic = constants.%I.type.3fe] { +// CHECK:STDOUT: %.Self.frozen.loc36_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, %I.decl [concrete = constants.%I.generic] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc36 [symbolic = constants.%T.67db0b.1] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%T.67db0b.1)> [symbolic = constants.%I.type.3fe] +// CHECK:STDOUT: } +// CHECK:STDOUT: %U: %I.type.3fe = symbolic_binding U, 1 [symbolic = constants.%U] // CHECK:STDOUT: %C: = namespace [concrete] {} // CHECK:STDOUT: %D: = namespace [concrete] {} -// CHECK:STDOUT: %F.decl.loc48: %F.type.eb3 = fn_decl @F.loc48 [concrete = constants.%F.708] {} { -// CHECK:STDOUT: %.loc48_17.1: type = splice_block %.loc48_17.2 [concrete = type] { +// CHECK:STDOUT: %F.decl.loc46: %F.type.eb3 = fn_decl @F.loc46 [concrete = constants.%F.708] {} { +// CHECK:STDOUT: %.loc46_16.1: type = splice_block %.loc46_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc48_17.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc46_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc48_14.3: type = symbolic_binding T, 0 [symbolic = %T.loc48_14.2 (constants.%T.67db0b.2)] +// CHECK:STDOUT: %T.loc46_14.3: type = symbolic_binding T, 0 [symbolic = %T.loc46_14.2 (constants.%T.67db0b.2)] +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic interface @I(%T.loc30_14.2: type) { +// CHECK:STDOUT: %T.patt.loc30_14.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc30_14.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc30_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc30_14.1 (constants.%T.67db0b.1)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc30_14.1)> [symbolic = %I.type (constants.%I.type.3fe)] +// CHECK:STDOUT: %Self.loc30_22.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc30_22.2 (constants.%Self)] +// CHECK:STDOUT: +// CHECK:STDOUT: interface { +// CHECK:STDOUT: %Self.loc30_22.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc30_22.2 (constants.%Self)] +// CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = %Self.loc30_22.1 +// CHECK:STDOUT: witness = () +// CHECK:STDOUT: +// CHECK:STDOUT: !requires: +// CHECK:STDOUT: +// CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -113,10 +153,10 @@ fn D(unused T:! type).F() {} // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F.loc48(%T.loc48_14.3: type) { +// CHECK:STDOUT: generic fn @F.loc46(%T.loc46_14.3: type) { // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %T.loc48_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc48_14.1 (constants.%T.67db0b.1)] -// CHECK:STDOUT: %T.loc48_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc48_14.2 (constants.%T.67db0b.2)] +// CHECK:STDOUT: %T.loc46_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc46_14.1 (constants.%T.67db0b.1)] +// CHECK:STDOUT: %T.loc46_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc46_14.2 (constants.%T.67db0b.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -128,9 +168,16 @@ fn D(unused T:! type).F() {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.loc48(constants.%T.67db0b.2) { +// CHECK:STDOUT: specific @I(constants.%T.67db0b.1) { +// CHECK:STDOUT: %T.patt.loc30_14.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc30_14.1 => constants.%T.67db0b.1 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf(constants.%T.67db0b.1, constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F.loc46(constants.%T.67db0b.2) { // CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %T.loc48_14.1 => constants.%T.67db0b.2 -// CHECK:STDOUT: %T.loc48_14.2 => constants.%T.67db0b.2 +// CHECK:STDOUT: %T.loc46_14.1 => constants.%T.67db0b.2 +// CHECK:STDOUT: %T.loc46_14.2 => constants.%T.67db0b.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/bit_and.carbon b/toolchain/check/testdata/operators/builtin/bit_and.carbon index 09105bc98d29..21b1507e3cbf 100644 --- a/toolchain/check/testdata/operators/builtin/bit_and.carbon +++ b/toolchain/check/testdata/operators/builtin/bit_and.carbon @@ -16,8 +16,8 @@ library "[[@TEST_NAME]]"; interface I {} interface J {} -fn F1[T:! I & J](unused t: T) {} -fn F2[T:! I & I](unused t: T) {} +fn F1[T: I & J](unused t: T) {} +fn F2[T: I & I](unused t: T) {} // --- fail_bit_and_non_facet_types.carbon library "[[@TEST_NAME]]"; @@ -26,25 +26,25 @@ interface I {} class J {} class K {} -// CHECK:STDERR: fail_bit_and_non_facet_types.carbon:[[@LINE+4]]:11: error: non-facet type `J` combined with `&` operator [FacetTypeRequiredForTypeAndOperator] -// CHECK:STDERR: fn F1[T:! I & J](unused t: T) {} -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fail_bit_and_non_facet_types.carbon:[[@LINE+4]]:10: error: non-facet type `J` combined with `&` operator [FacetTypeRequiredForTypeAndOperator] +// CHECK:STDERR: fn F1[T: I & J](unused t: T) {} +// CHECK:STDERR: ^~~~~ // CHECK:STDERR: -fn F1[T:! I & J](unused t: T) {} -// CHECK:STDERR: fail_bit_and_non_facet_types.carbon:[[@LINE+4]]:11: error: non-facet type `J` combined with `&` operator [FacetTypeRequiredForTypeAndOperator] -// CHECK:STDERR: fn F2[T:! J & I](unused t: T) {} -// CHECK:STDERR: ^~~~~ +fn F1[T: I & J](unused t: T) {} +// CHECK:STDERR: fail_bit_and_non_facet_types.carbon:[[@LINE+4]]:10: error: non-facet type `J` combined with `&` operator [FacetTypeRequiredForTypeAndOperator] +// CHECK:STDERR: fn F2[T: J & I](unused t: T) {} +// CHECK:STDERR: ^~~~~ // CHECK:STDERR: -fn F2[T:! J & I](unused t: T) {} -// CHECK:STDERR: fail_bit_and_non_facet_types.carbon:[[@LINE+8]]:11: error: non-facet type `J` combined with `&` operator [FacetTypeRequiredForTypeAndOperator] -// CHECK:STDERR: fn F3[T:! J & K](unused t: T) {} -// CHECK:STDERR: ^~~~~ +fn F2[T: J & I](unused t: T) {} +// CHECK:STDERR: fail_bit_and_non_facet_types.carbon:[[@LINE+8]]:10: error: non-facet type `J` combined with `&` operator [FacetTypeRequiredForTypeAndOperator] +// CHECK:STDERR: fn F3[T: J & K](unused t: T) {} +// CHECK:STDERR: ^~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_bit_and_non_facet_types.carbon:[[@LINE+4]]:11: error: non-facet type `K` combined with `&` operator [FacetTypeRequiredForTypeAndOperator] -// CHECK:STDERR: fn F3[T:! J & K](unused t: T) {} -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fail_bit_and_non_facet_types.carbon:[[@LINE+4]]:10: error: non-facet type `K` combined with `&` operator [FacetTypeRequiredForTypeAndOperator] +// CHECK:STDERR: fn F3[T: J & K](unused t: T) {} +// CHECK:STDERR: ^~~~~ // CHECK:STDERR: -fn F3[T:! J & K](unused t: T) {} +fn F3[T: J & K](unused t: T) {} // --- bit_and_values_with_impl.carbon library "[[@TEST_NAME]]"; diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon index c12a9990ff4c..529ef1863814 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon @@ -75,7 +75,7 @@ var or_val: bool = true or true; library "[[@TEST_NAME]]"; -base class C(B:! bool) {} +base class C(B: bool) {} fn F() { class B { @@ -201,7 +201,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst{{[0-9A-F]+}}.loc4_24 [concrete = constants.%C.generic] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst{{[0-9A-F]+}}.loc4_23 [concrete = constants.%C.generic] // CHECK:STDOUT: %true.loc12_20: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %.loc12: bool = not %true.loc12_20 [concrete = constants.%false] // CHECK:STDOUT: %true.loc12_25: bool = bool_literal true [concrete = constants.%true] diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index f72a52b0a901..86da5928d6aa 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -24,11 +24,11 @@ impl X as Core.ImplicitAs(i32) { fn Convert(self: X) -> i32 { return self.n; } } -// TODO: fn Sink(T:! type, x: T); +// TODO: fn Sink(generic T: type, x: T); // ... once we stop deducing `T` from the type of the second argument in this case. fn Sink_i32(n: i32); fn Sink_X(x: X); -fn Source(T:! type) -> T { return Source(T); } +fn Source(generic T: type) -> T { return Source(T); } fn Test() { Sink_i32(Source(X)); @@ -178,19 +178,19 @@ fn Test() { // CHECK:STDOUT: %x: %X = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %Source.decl: %Source.type = fn_decl @Source [concrete = constants.%Source] { -// CHECK:STDOUT: %T.patt.loc31_12.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc31_12.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %return.param_patt.loc31_24.1: @Source.%pattern_type (%pattern_type.51d1c4.2) = out_param_pattern [symbolic = %return.param_patt.loc31_24.2 (constants.%return.param_patt.41d2d9.2)] -// CHECK:STDOUT: %return.patt.loc31_21.1: @Source.%pattern_type (%pattern_type.51d1c4.2) = return_slot_pattern %return.param_patt.loc31_24.1, %T.ref.loc31_24 [symbolic = %return.patt.loc31_21.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: %T.patt.loc31_20.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc31_20.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %return.param_patt.loc31_31.1: @Source.%pattern_type (%pattern_type.51d1c4.2) = out_param_pattern [symbolic = %return.param_patt.loc31_31.2 (constants.%return.param_patt.41d2d9.2)] +// CHECK:STDOUT: %return.patt.loc31_28.1: @Source.%pattern_type (%pattern_type.51d1c4.2) = return_slot_pattern %return.param_patt.loc31_31.1, %T.ref.loc31_31 [symbolic = %return.patt.loc31_28.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc31_24: type = name_ref T, %T.loc31_12.2 [symbolic = %T.loc31_12.1 (constants.%T.67d)] -// CHECK:STDOUT: %.loc31_24.3: Core.Form = init_form %T.ref.loc31_24 [symbolic = %.loc31_24.2 (constants.%.184347.2)] -// CHECK:STDOUT: %.loc31_15.1: type = splice_block %.loc31_15.2 [concrete = type] { +// CHECK:STDOUT: %T.ref.loc31_31: type = name_ref T, %T.loc31_20.2 [symbolic = %T.loc31_20.1 (constants.%T.67d)] +// CHECK:STDOUT: %.loc31_31.3: Core.Form = init_form %T.ref.loc31_31 [symbolic = %.loc31_31.2 (constants.%.184347.2)] +// CHECK:STDOUT: %.loc31_22.1: type = splice_block %.loc31_22.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc31_15.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc31_22.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc31_12.2: type = symbolic_binding T, 0 [symbolic = %T.loc31_12.1 (constants.%T.67d)] -// CHECK:STDOUT: %return.param: ref @Source.%T.loc31_12.1 (%T.67d) = out_param call_param0 -// CHECK:STDOUT: %return: ref @Source.%T.loc31_12.1 (%T.67d) = return_slot %return.param +// CHECK:STDOUT: %T.loc31_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc31_20.1 (constants.%T.67d)] +// CHECK:STDOUT: %return.param: ref @Source.%T.loc31_20.1 (%T.67d) = out_param call_param0 +// CHECK:STDOUT: %return: ref @Source.%T.loc31_20.1 (%T.67d) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [concrete = constants.%Test] {} {} // CHECK:STDOUT: } @@ -293,25 +293,25 @@ fn Test() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Sink_X(%x.param: %X); // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Source(%T.loc31_12.2: type) { -// CHECK:STDOUT: %T.patt.loc31_12.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc31_12.2 (constants.%T.patt.d47)] -// CHECK:STDOUT: %T.loc31_12.1: type = symbolic_binding T, 0 [symbolic = %T.loc31_12.1 (constants.%T.67d)] -// CHECK:STDOUT: %.loc31_24.2: Core.Form = init_form %T.loc31_12.1 [symbolic = %.loc31_24.2 (constants.%.184347.2)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc31_12.1 [symbolic = %pattern_type (constants.%pattern_type.51d1c4.2)] -// CHECK:STDOUT: %return.param_patt.loc31_24.2: @Source.%pattern_type (%pattern_type.51d1c4.2) = out_param_pattern [symbolic = %return.param_patt.loc31_24.2 (constants.%return.param_patt.41d2d9.2)] -// CHECK:STDOUT: %return.patt.loc31_21.2: @Source.%pattern_type (%pattern_type.51d1c4.2) = return_slot_pattern %return.param_patt.loc31_24.2, %T.loc31_12.1 [symbolic = %return.patt.loc31_21.2 (constants.%return.patt.b39)] +// CHECK:STDOUT: generic fn @Source(%T.loc31_20.2: type) { +// CHECK:STDOUT: %T.patt.loc31_20.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc31_20.2 (constants.%T.patt.d47)] +// CHECK:STDOUT: %T.loc31_20.1: type = symbolic_binding T, 0 [symbolic = %T.loc31_20.1 (constants.%T.67d)] +// CHECK:STDOUT: %.loc31_31.2: Core.Form = init_form %T.loc31_20.1 [symbolic = %.loc31_31.2 (constants.%.184347.2)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc31_20.1 [symbolic = %pattern_type (constants.%pattern_type.51d1c4.2)] +// CHECK:STDOUT: %return.param_patt.loc31_31.2: @Source.%pattern_type (%pattern_type.51d1c4.2) = out_param_pattern [symbolic = %return.param_patt.loc31_31.2 (constants.%return.param_patt.41d2d9.2)] +// CHECK:STDOUT: %return.patt.loc31_28.2: @Source.%pattern_type (%pattern_type.51d1c4.2) = return_slot_pattern %return.param_patt.loc31_31.2, %T.loc31_20.1 [symbolic = %return.patt.loc31_28.2 (constants.%return.patt.b39)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc31_12.1 [symbolic = %require_complete (constants.%require_complete.944)] -// CHECK:STDOUT: %Source.specific_fn.loc31_35.2: = specific_function constants.%Source, @Source(%T.loc31_12.1) [symbolic = %Source.specific_fn.loc31_35.2 (constants.%Source.specific_fn.104)] +// CHECK:STDOUT: %require_complete: = require_complete_type %T.loc31_20.1 [symbolic = %require_complete (constants.%require_complete.944)] +// CHECK:STDOUT: %Source.specific_fn.loc31_42.2: = specific_function constants.%Source, @Source(%T.loc31_20.1) [symbolic = %Source.specific_fn.loc31_42.2 (constants.%Source.specific_fn.104)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @Source.%T.loc31_12.1 (%T.67d) { +// CHECK:STDOUT: fn() -> out %return.param: @Source.%T.loc31_20.1 (%T.67d) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Source.ref: %Source.type = name_ref Source, file.%Source.decl [concrete = constants.%Source] -// CHECK:STDOUT: %T.ref.loc31_42: type = name_ref T, %T.loc31_12.2 [symbolic = %T.loc31_12.1 (constants.%T.67d)] -// CHECK:STDOUT: %Source.specific_fn.loc31_35.1: = specific_function %Source.ref, @Source(constants.%T.67d) [symbolic = %Source.specific_fn.loc31_35.2 (constants.%Source.specific_fn.104)] -// CHECK:STDOUT: %.loc31_24.1: ref @Source.%T.loc31_12.1 (%T.67d) = splice_block %return.param {} -// CHECK:STDOUT: %Source.call: init @Source.%T.loc31_12.1 (%T.67d) to %.loc31_24.1 = call %Source.specific_fn.loc31_35.1() +// CHECK:STDOUT: %T.ref.loc31_49: type = name_ref T, %T.loc31_20.2 [symbolic = %T.loc31_20.1 (constants.%T.67d)] +// CHECK:STDOUT: %Source.specific_fn.loc31_42.1: = specific_function %Source.ref, @Source(constants.%T.67d) [symbolic = %Source.specific_fn.loc31_42.2 (constants.%Source.specific_fn.104)] +// CHECK:STDOUT: %.loc31_31.1: ref @Source.%T.loc31_20.1 (%T.67d) = splice_block %return.param {} +// CHECK:STDOUT: %Source.call: init @Source.%T.loc31_20.1 (%T.67d) to %.loc31_31.1 = call %Source.specific_fn.loc31_42.1() // CHECK:STDOUT: return %Source.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: @@ -382,41 +382,41 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Source(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc31_12.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc31_12.1 => constants.%T.67d -// CHECK:STDOUT: %.loc31_24.2 => constants.%.184347.2 +// CHECK:STDOUT: %T.patt.loc31_20.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc31_20.1 => constants.%T.67d +// CHECK:STDOUT: %.loc31_31.2 => constants.%.184347.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.2 -// CHECK:STDOUT: %return.param_patt.loc31_24.2 => constants.%return.param_patt.41d2d9.2 -// CHECK:STDOUT: %return.patt.loc31_21.2 => constants.%return.patt.b39 +// CHECK:STDOUT: %return.param_patt.loc31_31.2 => constants.%return.param_patt.41d2d9.2 +// CHECK:STDOUT: %return.patt.loc31_28.2 => constants.%return.patt.b39 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.944 -// CHECK:STDOUT: %Source.specific_fn.loc31_35.2 => constants.%Source.specific_fn.104 +// CHECK:STDOUT: %Source.specific_fn.loc31_42.2 => constants.%Source.specific_fn.104 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Source(constants.%X) { -// CHECK:STDOUT: %T.patt.loc31_12.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc31_12.1 => constants.%X -// CHECK:STDOUT: %.loc31_24.2 => constants.%.325 +// CHECK:STDOUT: %T.patt.loc31_20.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc31_20.1 => constants.%X +// CHECK:STDOUT: %.loc31_31.2 => constants.%.325 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6cb -// CHECK:STDOUT: %return.param_patt.loc31_24.2 => constants.%return.param_patt.2e8 -// CHECK:STDOUT: %return.patt.loc31_21.2 => constants.%return.patt.d8e +// CHECK:STDOUT: %return.param_patt.loc31_31.2 => constants.%return.param_patt.2e8 +// CHECK:STDOUT: %return.patt.loc31_28.2 => constants.%return.patt.d8e // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.cdf -// CHECK:STDOUT: %Source.specific_fn.loc31_35.2 => constants.%Source.specific_fn.ca6 +// CHECK:STDOUT: %Source.specific_fn.loc31_42.2 => constants.%Source.specific_fn.ca6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Source(constants.%i32) { -// CHECK:STDOUT: %T.patt.loc31_12.2 => constants.%T.patt.d47 -// CHECK:STDOUT: %T.loc31_12.1 => constants.%i32 -// CHECK:STDOUT: %.loc31_24.2 => constants.%.795 +// CHECK:STDOUT: %T.patt.loc31_20.2 => constants.%T.patt.d47 +// CHECK:STDOUT: %T.loc31_20.1 => constants.%i32 +// CHECK:STDOUT: %.loc31_31.2 => constants.%.795 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6 -// CHECK:STDOUT: %return.param_patt.loc31_24.2 => constants.%return.param_patt.a9a -// CHECK:STDOUT: %return.patt.loc31_21.2 => constants.%return.patt.e1b +// CHECK:STDOUT: %return.param_patt.loc31_31.2 => constants.%return.param_patt.a9a +// CHECK:STDOUT: %return.patt.loc31_28.2 => constants.%return.patt.e1b // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a -// CHECK:STDOUT: %Source.specific_fn.loc31_35.2 => constants.%Source.specific_fn.75e +// CHECK:STDOUT: %Source.specific_fn.loc31_42.2 => constants.%Source.specific_fn.75e // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index 433254f24744..23c189468e94 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -44,7 +44,7 @@ fn F() { 0[1]; } package Core library "[[@TEST_NAME]]"; -interface IndexWith(SubscriptType:! type, ElementType:! type) { +interface IndexWith(SubscriptType: type, ElementType: type) { fn At(self, subscript: SubscriptType) -> ElementType; } @@ -69,8 +69,8 @@ fn F() { // CHECK:STDERR: c[()]; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: core_wrong_arg_count.carbon:4:1: note: calling generic interface declared here [InCallToEntity] - // CHECK:STDERR: interface IndexWith(SubscriptType:! type, ElementType:! type) { - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: interface IndexWith(SubscriptType: type, ElementType: type) { + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: c[()]; } @@ -220,33 +220,33 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %IndexWith.decl: %IndexWith.type.df6 = interface_decl @IndexWith [concrete = constants.%IndexWith.generic] { // CHECK:STDOUT: %SubscriptType.patt.loc4_34.1: %pattern_type.98f = symbolic_binding_pattern SubscriptType, 0 [symbolic = %SubscriptType.patt.loc4_34.2 (constants.%SubscriptType.patt)] -// CHECK:STDOUT: %ElementType.patt.loc4_54.1: %pattern_type.98f = symbolic_binding_pattern ElementType, 1 [symbolic = %ElementType.patt.loc4_54.2 (constants.%ElementType.patt)] +// CHECK:STDOUT: %ElementType.patt.loc4_53.1: %pattern_type.98f = symbolic_binding_pattern ElementType, 1 [symbolic = %ElementType.patt.loc4_53.2 (constants.%ElementType.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_37.1: type = splice_block %.loc4_37.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_36.1: type = splice_block %.loc4_36.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc4_34: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_37.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_36.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %SubscriptType.loc4_34.2: type = symbolic_binding SubscriptType, 0 [symbolic = %SubscriptType.loc4_34.1 (constants.%SubscriptType)] -// CHECK:STDOUT: %.loc4_57.1: type = splice_block %.loc4_57.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc4_54: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_57.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_55.1: type = splice_block %.loc4_55.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc4_53: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc4_55.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %ElementType.loc4_54.2: type = symbolic_binding ElementType, 1 [symbolic = %ElementType.loc4_54.1 (constants.%ElementType)] +// CHECK:STDOUT: %ElementType.loc4_53.2: type = symbolic_binding ElementType, 1 [symbolic = %ElementType.loc4_53.1 (constants.%ElementType)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @IndexWith(%SubscriptType.loc4_34.2: type, %ElementType.loc4_54.2: type) { +// CHECK:STDOUT: generic interface @IndexWith(%SubscriptType.loc4_34.2: type, %ElementType.loc4_53.2: type) { // CHECK:STDOUT: %SubscriptType.patt.loc4_34.2: %pattern_type.98f = symbolic_binding_pattern SubscriptType, 0 [symbolic = %SubscriptType.patt.loc4_34.2 (constants.%SubscriptType.patt)] // CHECK:STDOUT: %SubscriptType.loc4_34.1: type = symbolic_binding SubscriptType, 0 [symbolic = %SubscriptType.loc4_34.1 (constants.%SubscriptType)] -// CHECK:STDOUT: %ElementType.patt.loc4_54.2: %pattern_type.98f = symbolic_binding_pattern ElementType, 1 [symbolic = %ElementType.patt.loc4_54.2 (constants.%ElementType.patt)] -// CHECK:STDOUT: %ElementType.loc4_54.1: type = symbolic_binding ElementType, 1 [symbolic = %ElementType.loc4_54.1 (constants.%ElementType)] +// CHECK:STDOUT: %ElementType.patt.loc4_53.2: %pattern_type.98f = symbolic_binding_pattern ElementType, 1 [symbolic = %ElementType.patt.loc4_53.2 (constants.%ElementType.patt)] +// CHECK:STDOUT: %ElementType.loc4_53.1: type = symbolic_binding ElementType, 1 [symbolic = %ElementType.loc4_53.1 (constants.%ElementType)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.loc4_34.1, %ElementType.loc4_54.1)> [symbolic = %IndexWith.type (constants.%IndexWith.type.a54)] -// CHECK:STDOUT: %Self.loc4_63.2: @IndexWith.%IndexWith.type (%IndexWith.type.a54) = symbolic_binding Self, 2 [symbolic = %Self.loc4_63.2 (constants.%Self)] +// CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.loc4_34.1, %ElementType.loc4_53.1)> [symbolic = %IndexWith.type (constants.%IndexWith.type.a54)] +// CHECK:STDOUT: %Self.loc4_61.2: @IndexWith.%IndexWith.type (%IndexWith.type.a54) = symbolic_binding Self, 2 [symbolic = %Self.loc4_61.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_63.1: @IndexWith.%IndexWith.type (%IndexWith.type.a54) = symbolic_binding Self, 2 [symbolic = %Self.loc4_63.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc4_61.1: @IndexWith.%IndexWith.type (%IndexWith.type.a54) = symbolic_binding Self, 2 [symbolic = %Self.loc4_61.2 (constants.%Self)] // CHECK:STDOUT: %IndexWith.WithSelf.decl = interface_with_self_decl @IndexWith [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -258,11 +258,11 @@ fn F() { // CHECK:STDOUT: %return.param_patt.loc5_44.1: @IndexWith.WithSelf.At.%pattern_type.loc5_44 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc5_44.2 (constants.%return.param_patt)] // CHECK:STDOUT: %return.patt.loc5_41.1: @IndexWith.WithSelf.At.%pattern_type.loc5_44 (%pattern_type.946) = return_slot_pattern %return.param_patt.loc5_44.1, %ElementType.ref [symbolic = %return.patt.loc5_41.2 (constants.%return.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, @IndexWith.%ElementType.loc4_54.2 [symbolic = %ElementType (constants.%ElementType)] +// CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, @IndexWith.%ElementType.loc4_53.2 [symbolic = %ElementType (constants.%ElementType)] // CHECK:STDOUT: %.loc5_44.2: Core.Form = init_form %ElementType.ref [symbolic = %.loc5_44.1 (constants.%.822)] // CHECK:STDOUT: %self.param: @IndexWith.WithSelf.At.%Self.as_type.loc5_9.1 (%Self.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_9.1: type = splice_block %.loc5_9.3 [symbolic = %Self.as_type.loc5_9.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc5_9.2: @IndexWith.WithSelf.At.%IndexWith.type (%IndexWith.type.a54) = specific_constant @IndexWith.%Self.loc4_63.1, @IndexWith(constants.%SubscriptType, constants.%ElementType) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc5_9.2: @IndexWith.WithSelf.At.%IndexWith.type (%IndexWith.type.a54) = specific_constant @IndexWith.%Self.loc4_61.1, @IndexWith(constants.%SubscriptType, constants.%ElementType) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref: @IndexWith.WithSelf.At.%IndexWith.type (%IndexWith.type.a54) = name_ref Self, %.loc5_9.2 [symbolic = %Self (constants.%Self)] // 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.3: type = converted %Self.ref, %Self.as_type.loc5_9.2 [symbolic = %Self.as_type.loc5_9.1 (constants.%Self.as_type)] @@ -277,7 +277,7 @@ fn F() { // CHECK:STDOUT: %assoc0.loc5_55.1: @IndexWith.WithSelf.%IndexWith.assoc_type (%IndexWith.assoc_type) = assoc_entity element0, %IndexWith.WithSelf.At.decl [symbolic = %assoc0.loc5_55.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc4_63.1 +// CHECK:STDOUT: .Self = %Self.loc4_61.1 // CHECK:STDOUT: .SubscriptType = // CHECK:STDOUT: .ElementType = // CHECK:STDOUT: .SubscriptType = @@ -291,7 +291,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @IndexWith.WithSelf.At(@IndexWith.%SubscriptType.loc4_34.2: type, @IndexWith.%ElementType.loc4_54.2: type, @IndexWith.%Self.loc4_63.1: @IndexWith.%IndexWith.type (%IndexWith.type.a54)) { +// CHECK:STDOUT: generic fn @IndexWith.WithSelf.At(@IndexWith.%SubscriptType.loc4_34.2: type, @IndexWith.%ElementType.loc4_53.2: type, @IndexWith.%Self.loc4_61.1: @IndexWith.%IndexWith.type (%IndexWith.type.a54)) { // CHECK:STDOUT: %SubscriptType: type = symbolic_binding SubscriptType, 0 [symbolic = %SubscriptType (constants.%SubscriptType)] // CHECK:STDOUT: %ElementType: type = symbolic_binding ElementType, 1 [symbolic = %ElementType (constants.%ElementType)] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(%SubscriptType, %ElementType)> [symbolic = %IndexWith.type (constants.%IndexWith.type.a54)] @@ -314,8 +314,8 @@ fn F() { // CHECK:STDOUT: specific @IndexWith(constants.%SubscriptType, constants.%ElementType) { // CHECK:STDOUT: %SubscriptType.patt.loc4_34.2 => constants.%SubscriptType.patt // CHECK:STDOUT: %SubscriptType.loc4_34.1 => constants.%SubscriptType -// CHECK:STDOUT: %ElementType.patt.loc4_54.2 => constants.%ElementType.patt -// CHECK:STDOUT: %ElementType.loc4_54.1 => constants.%ElementType +// CHECK:STDOUT: %ElementType.patt.loc4_53.2 => constants.%ElementType.patt +// CHECK:STDOUT: %ElementType.loc4_53.1 => constants.%ElementType // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @IndexWith.WithSelf(constants.%SubscriptType, constants.%ElementType, constants.%Self) {} diff --git a/toolchain/check/testdata/packages/fail_export_name_params.carbon b/toolchain/check/testdata/packages/fail_export_name_params.carbon index 318ee20d467c..74c2400565ea 100644 --- a/toolchain/check/testdata/packages/fail_export_name_params.carbon +++ b/toolchain/check/testdata/packages/fail_export_name_params.carbon @@ -16,8 +16,8 @@ package Foo library "[[@TEST_NAME]]"; -class C1(T:! type); -class C2(T:! type); +class C1(T: type); +class C2(T: type); // --- fail_b.carbon @@ -28,10 +28,10 @@ import library "a"; export C1; // CHECK:STDERR: fail_b.carbon:[[@LINE+4]]:10: error: `export` declaration cannot have parameters [UnexpectedDeclNameParams] -// CHECK:STDERR: export C2(T:! type); -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: export C2(T: type); +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -export C2(T:! type); +export C2(T: type); // CHECK:STDOUT: --- a.carbon // CHECK:STDOUT: @@ -55,18 +55,18 @@ export C2(T:! type); // CHECK:STDOUT: %C1.decl: %C1.type = class_decl @C1 [concrete = constants.%C1.generic] { // CHECK:STDOUT: %T.patt.loc4_11.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_11.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_14.1: type = splice_block %.loc4_14.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_13.1: type = splice_block %.loc4_13.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_14.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_13.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc4_11.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_11.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %C2.decl: %C2.type = class_decl @C2 [concrete = constants.%C2.generic] { // CHECK:STDOUT: %T.patt.loc5_11.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_11.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [concrete = type] { +// CHECK:STDOUT: %.loc5_13.1: type = splice_block %.loc5_13.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc5_14.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc5_13.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc5_11.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_11.1 (constants.%T)] // CHECK:STDOUT: } @@ -124,9 +124,9 @@ export C2(T:! type); // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %C1: %C1.type = export C1, imports.%Foo.C1 [concrete = constants.%C1.generic] -// CHECK:STDOUT: %.loc12_15.1: type = splice_block %.loc12_15.2 [concrete = type] { +// CHECK:STDOUT: %.loc12_14.1: type = splice_block %.loc12_14.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc12_15.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc12_14.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = constants.%T] // CHECK:STDOUT: %C2: %C2.type = export C2, imports.%Foo.C2 [concrete = constants.%C2.generic] diff --git a/toolchain/check/testdata/packages/missing_prelude.carbon b/toolchain/check/testdata/packages/missing_prelude.carbon index d4b88dec82df..bdf4f1191e9b 100644 --- a/toolchain/check/testdata/packages/missing_prelude.carbon +++ b/toolchain/check/testdata/packages/missing_prelude.carbon @@ -44,9 +44,9 @@ package Core library "[[@TEST_NAME]]"; class X {} -fn Int[T:! type](unused N:! T) -> X { return {}; } +fn Int[T: type](unused generic N: T) -> X { return {}; } -interface ImplicitAs(T:! type) { +interface ImplicitAs(T: type) { fn Convert(self) -> T; } @@ -79,7 +79,7 @@ package Core library "[[@TEST_NAME]]"; // Core is not an imported package here. -class Int[T:! type](unused N:! T) {} +class Int[T: type](unused N: T) {} let n: i32 = {}; @@ -98,10 +98,10 @@ library "[[@TEST_NAME]]"; namespace Core; // CHECK:STDERR: fail_prelude_as_namespace.carbon:[[@LINE+4]]:4: error: `fn` introducer should be followed by a name [ExpectedDeclName] -// CHECK:STDERR: fn Core.Int[T:! type](N:! T) -> {} { return {}; } +// CHECK:STDERR: fn Core.Int[T: type](generic N: T) -> {} { return {}; } // CHECK:STDERR: ^~~~ // CHECK:STDERR: -fn Core.Int[T:! type](N:! T) -> {} { return {}; } +fn Core.Int[T: type](generic N: T) -> {} { return {}; } // Make sure use of `i32` doesn't crash after above errors. let n: type = i32; @@ -119,7 +119,7 @@ library "[[@TEST_NAME]]"; // CHECK:STDERR: ^~~~ // CHECK:STDERR: class Core { - fn Int[T:! type](N:! T) -> {} { return {}; } + fn Int[T: type](generic N: T) -> {} { return {}; } } let n: type = i32; @@ -234,31 +234,31 @@ let n: type = i32; // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {} // CHECK:STDOUT: %Int.decl: %Int.type = fn_decl @Int [concrete = constants.%Int] { // CHECK:STDOUT: %T.patt.loc6_9.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_9.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc6_26.1: @Int.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_26.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.patt.loc6_33.1: @Int.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_33.2 (constants.%N.patt)] // CHECK:STDOUT: %return.param_patt: %pattern_type.e00 = out_param_pattern [concrete = constants.%return.param_patt.cb6] // CHECK:STDOUT: %return.patt: %pattern_type.e00 = return_slot_pattern %return.param_patt, %X.ref [concrete = constants.%return.patt.88a] // CHECK:STDOUT: } { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] -// CHECK:STDOUT: %.loc6_35: Core.Form = init_form %X.ref [concrete = constants.%.7b0] -// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_41: Core.Form = init_form %X.ref [concrete = constants.%.7b0] +// CHECK:STDOUT: %.loc6_11.1: type = splice_block %.loc6_11.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc6_9: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_11.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_9.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_9.1 (constants.%T)] -// CHECK:STDOUT: %.loc6_29: type = splice_block %T.ref [symbolic = %T.loc6_9.1 (constants.%T)] { -// CHECK:STDOUT: %.Self.frozen.loc6_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc6_35: type = splice_block %T.ref [symbolic = %T.loc6_9.1 (constants.%T)] { +// CHECK:STDOUT: %.Self.frozen.loc6_33: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_9.2 [symbolic = %T.loc6_9.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc6_26.2: @Int.%T.loc6_9.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc6_26.1 (constants.%N)] +// CHECK:STDOUT: %N.loc6_33.2: @Int.%T.loc6_9.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc6_33.1 (constants.%N)] // CHECK:STDOUT: %return.param: ref %X = out_param call_param0 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.0ff = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] { // CHECK:STDOUT: %T.patt.loc8_23.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_23.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_26.1: type = splice_block %.loc8_26.2 [concrete = type] { +// CHECK:STDOUT: %.loc8_25.1: type = splice_block %.loc8_25.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc8_26.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc8_25.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_23.1 (constants.%T)] // CHECK:STDOUT: } @@ -270,10 +270,10 @@ let n: type = i32; // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc8_23.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)] -// CHECK:STDOUT: %Self.loc8_32.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc8_32.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc8_31.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc8_31.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc8_32.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc8_32.2 (constants.%Self)] +// CHECK:STDOUT: %Self.loc8_31.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc8_31.2 (constants.%Self)] // CHECK:STDOUT: %ImplicitAs.WithSelf.decl = interface_with_self_decl @ImplicitAs [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: @@ -287,7 +287,7 @@ let n: type = i32; // CHECK:STDOUT: %.loc9_23.2: Core.Form = init_form %T.ref [symbolic = %.loc9_23.1 (constants.%.184)] // CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc9_14.1 (%Self.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc9_14.1: type = splice_block %.loc9_14.3 [symbolic = %Self.as_type.loc9_14.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc9_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc8_32.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc9_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc8_31.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = name_ref Self, %.loc9_14.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc9_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc9_14.3: type = converted %Self.ref, %Self.as_type.loc9_14.2 [symbolic = %Self.as_type.loc9_14.1 (constants.%Self.as_type)] @@ -299,7 +299,7 @@ let n: type = i32; // CHECK:STDOUT: %assoc0.loc9_24.1: @ImplicitAs.WithSelf.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc9_24.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc8_32.1 +// CHECK:STDOUT: .Self = %Self.loc8_31.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .T = // CHECK:STDOUT: .Convert = @ImplicitAs.WithSelf.%assoc0.loc9_24.1 @@ -319,27 +319,27 @@ let n: type = i32; // CHECK:STDOUT: .Self = constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Int(%T.loc6_9.2: type, %N.loc6_26.2: @Int.%T.loc6_9.1 (%T)) { +// CHECK:STDOUT: generic fn @Int(%T.loc6_9.2: type, %N.loc6_33.2: @Int.%T.loc6_9.1 (%T)) { // CHECK:STDOUT: %T.patt.loc6_9.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_9.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_9.1 (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc6_9.1 [symbolic = %pattern_type (constants.%pattern_type.51d)] -// CHECK:STDOUT: %N.patt.loc6_26.2: @Int.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_26.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.loc6_26.1: @Int.%T.loc6_9.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc6_26.1 (constants.%N)] +// CHECK:STDOUT: %N.patt.loc6_33.2: @Int.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_33.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.loc6_33.1: @Int.%T.loc6_9.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc6_33.1 (constants.%N)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: %X { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6_47.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc6_47.2: init %X to %return.param = class_init () [concrete = constants.%X.val] -// CHECK:STDOUT: %.loc6_48: init %X = converted %.loc6_47.1, %.loc6_47.2 [concrete = constants.%X.val] -// CHECK:STDOUT: return %.loc6_48 to %return.param +// CHECK:STDOUT: %.loc6_53.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc6_53.2: init %X to %return.param = class_init () [concrete = constants.%X.val] +// CHECK:STDOUT: %.loc6_54: init %X = converted %.loc6_53.1, %.loc6_53.2 [concrete = constants.%X.val] +// CHECK:STDOUT: return %.loc6_54 to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%T.loc8_23.2: type, @ImplicitAs.%Self.loc8_32.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) { +// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%T.loc8_23.2: type, @ImplicitAs.%Self.loc8_31.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)] // CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] @@ -359,8 +359,8 @@ let n: type = i32; // CHECK:STDOUT: %T.patt.loc6_9.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_9.1 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %N.patt.loc6_26.2 => constants.%N.patt -// CHECK:STDOUT: %N.loc6_26.1 => constants.%N +// CHECK:STDOUT: %N.patt.loc6_33.2 => constants.%N.patt +// CHECK:STDOUT: %N.loc6_33.1 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%T) { @@ -654,18 +654,18 @@ let n: type = i32; // CHECK:STDOUT: } // CHECK:STDOUT: %Int.decl: %Int.type = class_decl @Int [concrete = constants.%Int.generic] { // CHECK:STDOUT: %T.patt.loc6_12.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_12.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc6_29.1: @Int.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_29.2 (constants.%N.patt.9f0)] +// CHECK:STDOUT: %N.patt.loc6_28.1: @Int.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_28.2 (constants.%N.patt.9f0)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_15.1: type = splice_block %.loc6_15.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc6_12: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_15.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_14.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc6_12.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_12.1 (constants.%T)] -// CHECK:STDOUT: %.loc6_32: type = splice_block %T.ref [symbolic = %T.loc6_12.1 (constants.%T)] { -// CHECK:STDOUT: %.Self.frozen.loc6_29: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc6_30: type = splice_block %T.ref [symbolic = %T.loc6_12.1 (constants.%T)] { +// CHECK:STDOUT: %.Self.frozen.loc6_28: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_12.2 [symbolic = %T.loc6_12.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc6_29.2: @Int.%T.loc6_12.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc6_29.1 (constants.%N)] +// CHECK:STDOUT: %N.loc6_28.2: @Int.%T.loc6_12.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc6_28.1 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc8_15.1: ref %Int.382 = temporary_storage // CHECK:STDOUT: %.loc8_15.2: init %Int.382 to %.loc8_15.1 = class_init () [concrete = constants.%Int.val] @@ -679,12 +679,12 @@ let n: type = i32; // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @Int(%T.loc6_12.2: type, %N.loc6_29.2: @Int.%T.loc6_12.1 (%T)) { +// CHECK:STDOUT: generic class @Int(%T.loc6_12.2: type, %N.loc6_28.2: @Int.%T.loc6_12.1 (%T)) { // CHECK:STDOUT: %T.patt.loc6_12.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_12.2 (constants.%T.patt)] // CHECK:STDOUT: %T.loc6_12.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_12.1 (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc6_12.1 [symbolic = %pattern_type (constants.%pattern_type.51d)] -// CHECK:STDOUT: %N.patt.loc6_29.2: @Int.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_29.2 (constants.%N.patt.9f0)] -// CHECK:STDOUT: %N.loc6_29.1: @Int.%T.loc6_12.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc6_29.1 (constants.%N)] +// CHECK:STDOUT: %N.patt.loc6_28.2: @Int.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_28.2 (constants.%N.patt.9f0)] +// CHECK:STDOUT: %N.loc6_28.1: @Int.%T.loc6_12.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc6_28.1 (constants.%N)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -709,16 +709,16 @@ let n: type = i32; // CHECK:STDOUT: %T.patt.loc6_12.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_12.1 => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d -// CHECK:STDOUT: %N.patt.loc6_29.2 => constants.%N.patt.9f0 -// CHECK:STDOUT: %N.loc6_29.1 => constants.%N +// CHECK:STDOUT: %N.patt.loc6_28.2 => constants.%N.patt.9f0 +// CHECK:STDOUT: %N.loc6_28.1 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Int(Core.IntLiteral, constants.%int_32) { // CHECK:STDOUT: %T.patt.loc6_12.2 => constants.%T.patt // CHECK:STDOUT: %T.loc6_12.1 => Core.IntLiteral // CHECK:STDOUT: %pattern_type => constants.%pattern_type.dc0 -// CHECK:STDOUT: %N.patt.loc6_29.2 => constants.%N.patt.94a -// CHECK:STDOUT: %N.loc6_29.1 => constants.%int_32 +// CHECK:STDOUT: %N.patt.loc6_28.2 => constants.%N.patt.94a +// CHECK:STDOUT: %N.loc6_28.1 => constants.%int_32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/patterns/underscore.carbon b/toolchain/check/testdata/patterns/underscore.carbon index c5c7ad77b14d..3d033aea1fb4 100644 --- a/toolchain/check/testdata/patterns/underscore.carbon +++ b/toolchain/check/testdata/patterns/underscore.carbon @@ -43,7 +43,7 @@ fn H() { library "[[@TEST_NAME]]"; -fn F(_:! type) {}; +fn F(generic _: type) {}; fn G() { F({}); @@ -53,15 +53,15 @@ fn G() { library "[[@TEST_NAME]]"; -fn F(_:! type); +fn F(generic _: type); fn G() { // CHECK:STDERR: fail_function_generic_undefined.carbon:[[@LINE+7]]:3: error: use of undefined generic function [MissingGenericFunctionDefinition] // CHECK:STDERR: F({}); // CHECK:STDERR: ^ // CHECK:STDERR: fail_function_generic_undefined.carbon:[[@LINE-6]]:1: note: generic function declared here [MissingGenericFunctionDefinitionHere] - // CHECK:STDERR: fn F(_:! type); - // CHECK:STDERR: ^~~~~~~~~~~~~~~ + // CHECK:STDERR: fn F(generic _: type); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: F({}); } @@ -70,9 +70,9 @@ fn G() { library "[[@TEST_NAME]]"; -fn F[_:! type](); +fn F[_: type](); -fn G[_:! type]() {} +fn G[_: type]() {} // --- fail_class.carbon @@ -322,20 +322,20 @@ fn F() -> {} { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %_.patt.loc4_7.1: %pattern_type = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc4_7.2 (constants.%_.patt)] +// CHECK:STDOUT: %_.patt.loc4_15.1: %pattern_type = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc4_15.2 (constants.%_.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_10.1: type = splice_block %.loc4_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %_.loc4_7.2: type = symbolic_binding _, 0 [symbolic = %_.loc4_7.1 (constants.%_)] +// CHECK:STDOUT: %_.loc4_15.2: type = symbolic_binding _, 0 [symbolic = %_.loc4_15.1 (constants.%_)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%_.loc4_7.2: type) { -// CHECK:STDOUT: %_.patt.loc4_7.2: %pattern_type = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc4_7.2 (constants.%_.patt)] -// CHECK:STDOUT: %_.loc4_7.1: type = symbolic_binding _, 0 [symbolic = %_.loc4_7.1 (constants.%_)] +// CHECK:STDOUT: generic fn @F(%_.loc4_15.2: type) { +// CHECK:STDOUT: %_.patt.loc4_15.2: %pattern_type = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc4_15.2 (constants.%_.patt)] +// CHECK:STDOUT: %_.loc4_15.1: type = symbolic_binding _, 0 [symbolic = %_.loc4_15.1 (constants.%_)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -360,13 +360,13 @@ fn F() -> {} { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%_) { -// CHECK:STDOUT: %_.patt.loc4_7.2 => constants.%_.patt -// CHECK:STDOUT: %_.loc4_7.1 => constants.%_ +// CHECK:STDOUT: %_.patt.loc4_15.2 => constants.%_.patt +// CHECK:STDOUT: %_.loc4_15.1 => constants.%_ // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%empty_struct_type) { -// CHECK:STDOUT: %_.patt.loc4_7.2 => constants.%_.patt -// CHECK:STDOUT: %_.loc4_7.1 => constants.%empty_struct_type +// CHECK:STDOUT: %_.patt.loc4_15.2 => constants.%_.patt +// CHECK:STDOUT: %_.loc4_15.1 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -404,20 +404,20 @@ fn F() -> {} { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %_.patt.loc4_7.1: %pattern_type = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc4_7.2 (constants.%_.patt)] +// CHECK:STDOUT: %_.patt.loc4_15.1: %pattern_type = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc4_15.2 (constants.%_.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_10.1: type = splice_block %.loc4_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %_.loc4_7.2: type = symbolic_binding _, 0 [symbolic = %_.loc4_7.1 (constants.%_)] +// CHECK:STDOUT: %_.loc4_15.2: type = symbolic_binding _, 0 [symbolic = %_.loc4_15.1 (constants.%_)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%_.loc4_7.2: type) { -// CHECK:STDOUT: %_.patt.loc4_7.2: %pattern_type = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc4_7.2 (constants.%_.patt)] -// CHECK:STDOUT: %_.loc4_7.1: type = symbolic_binding _, 0 [symbolic = %_.loc4_7.1 (constants.%_)] +// CHECK:STDOUT: generic fn @F(%_.loc4_15.2: type) { +// CHECK:STDOUT: %_.patt.loc4_15.2: %pattern_type = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc4_15.2 (constants.%_.patt)] +// CHECK:STDOUT: %_.loc4_15.1: type = symbolic_binding _, 0 [symbolic = %_.loc4_15.1 (constants.%_)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } @@ -435,13 +435,13 @@ fn F() -> {} { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%_) { -// CHECK:STDOUT: %_.patt.loc4_7.2 => constants.%_.patt -// CHECK:STDOUT: %_.loc4_7.1 => constants.%_ +// CHECK:STDOUT: %_.patt.loc4_15.2 => constants.%_.patt +// CHECK:STDOUT: %_.loc4_15.1 => constants.%_ // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%empty_struct_type) { -// CHECK:STDOUT: %_.patt.loc4_7.2 => constants.%_.patt -// CHECK:STDOUT: %_.loc4_7.1 => constants.%empty_struct_type +// CHECK:STDOUT: %_.patt.loc4_15.2 => constants.%_.patt +// CHECK:STDOUT: %_.loc4_15.1 => constants.%empty_struct_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- function_implict.carbon @@ -475,18 +475,18 @@ fn F() -> {} { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %_.patt.loc4_7.1: %pattern_type = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc4_7.2 (constants.%_.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_10.1: type = splice_block %.loc4_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc4_9.1: type = splice_block %.loc4_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc4_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc4_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %_.loc4_7.2: type = symbolic_binding _, 0 [symbolic = %_.loc4_7.1 (constants.%_)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %_.patt.loc6_7.1: %pattern_type = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc6_7.2 (constants.%_.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] { +// CHECK:STDOUT: %.loc6_9.1: type = splice_block %.loc6_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %_.loc6_7.2: type = symbolic_binding _, 0 [symbolic = %_.loc6_7.1 (constants.%_)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/patterns/unused.carbon b/toolchain/check/testdata/patterns/unused.carbon index 3f7e87456b04..9b1ca5bf2524 100644 --- a/toolchain/check/testdata/patterns/unused.carbon +++ b/toolchain/check/testdata/patterns/unused.carbon @@ -202,10 +202,10 @@ library "[[@TEST_NAME]]"; // parameter, both a compile-time binding and `self`. // CHECK:STDERR: fail_unused_implicit_param_decl.carbon:[[@LINE+4]]:13: error: `unused` modifier without a definition [UnusedModifierWithoutDefinition] -// CHECK:STDERR: fn F[unused T:! type](); -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fn F[unused T: type](); +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -fn F[unused T:! type](); +fn F[unused T: type](); class C { // CHECK:STDERR: fail_unused_implicit_param_decl.carbon:[[@LINE+8]]:15: error: `self` must be declared in the explicit parameter list [SelfInImplicitParamList] @@ -272,21 +272,21 @@ fn H(ref x: i32) { // --- fail_todo_unused_generic.carbon library "[[@TEST_NAME]]"; -fn F(T:! type); +fn F(generic T: type); -// CHECK:STDERR: fail_todo_unused_generic.carbon:[[@LINE+4]]:13: error: semantics TODO: `generic redeclaration differs from previous declaration` [SemanticsTodo] -// CHECK:STDERR: fn F(unused T:! type) {} -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_todo_unused_generic.carbon:[[@LINE+4]]:21: error: semantics TODO: `generic redeclaration differs from previous declaration` [SemanticsTodo] +// CHECK:STDERR: fn F(unused generic T: type) {} +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -fn F(unused T:! type) {} +fn F(unused generic T: type) {} -class C(T:! type); +class C(T: type); // CHECK:STDERR: fail_todo_unused_generic.carbon:[[@LINE+4]]:16: error: semantics TODO: `generic redeclaration differs from previous declaration` [SemanticsTodo] -// CHECK:STDERR: class C(unused T:! type) {} -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: class C(unused T: type) {} +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -class C(unused T:! type) {} +class C(unused T: type) {} // --- fail_unused_let_multiple_uses.carbon library "[[@TEST_NAME]]"; diff --git a/toolchain/check/testdata/primitives/float_conversions.carbon b/toolchain/check/testdata/primitives/float_conversions.carbon index 654483de2aa4..d4ec993d5dd7 100644 --- a/toolchain/check/testdata/primitives/float_conversions.carbon +++ b/toolchain/check/testdata/primitives/float_conversions.carbon @@ -13,8 +13,8 @@ // --- test_helpers.carbon library "[[@TEST_NAME]]"; -class Expect[T:! type](N:! T) {} -fn Test[T:! type](N:! T) -> Expect(N) { return {}; } +class Expect[T: type](N: T) {} +fn Test[T: type](generic N: T) -> Expect(N) { return {}; } // --- literal_conversions.carbon library "[[@TEST_NAME]]"; diff --git a/toolchain/check/testdata/primitives/import_symbolic.carbon b/toolchain/check/testdata/primitives/import_symbolic.carbon index 27d636a4c4fc..0dfdf4e8f54f 100644 --- a/toolchain/check/testdata/primitives/import_symbolic.carbon +++ b/toolchain/check/testdata/primitives/import_symbolic.carbon @@ -15,7 +15,7 @@ library "[[@TEST_NAME]]"; interface I { - let value:! bool; + let value: bool; } class C { @@ -38,7 +38,7 @@ fn F() -> bool { library "[[@TEST_NAME]]"; interface I { - let value:! Core.Char; + let value: Core.Char; } class C {} @@ -61,7 +61,7 @@ fn F() -> Core.Char { library "[[@TEST_NAME]]"; interface I { - let value:! Core.CharLiteral; + let value: Core.CharLiteral; } class C {} @@ -84,7 +84,7 @@ fn F() -> Core.CharLiteral { library "[[@TEST_NAME]]"; interface I { - let value:! f64; + let value: f64; } class C {} @@ -107,7 +107,7 @@ fn F() -> f64 { library "[[@TEST_NAME]]"; interface I { - let value:! Core.FloatLiteral; + let value: Core.FloatLiteral; } class C {} @@ -130,7 +130,7 @@ fn F() -> Core.FloatLiteral { library "[[@TEST_NAME]]"; interface I { - let value:! i32; + let value: i32; } class C {} @@ -153,7 +153,7 @@ fn F() -> i32 { library "[[@TEST_NAME]]"; interface I { - let value:! Core.IntLiteral; + let value: Core.IntLiteral; } class C {} @@ -176,7 +176,7 @@ fn F() -> Core.IntLiteral { library "[[@TEST_NAME]]"; interface I { - let value:! u32; + let value: u32; } class C {} diff --git a/toolchain/check/testdata/return/fail_let_in_type.carbon b/toolchain/check/testdata/return/fail_let_in_type.carbon index 40310094477f..76e890a3aedf 100644 --- a/toolchain/check/testdata/return/fail_let_in_type.carbon +++ b/toolchain/check/testdata/return/fail_let_in_type.carbon @@ -20,11 +20,11 @@ let x: type = i32; fn Six() -> x { return 6; } // TODO: This should probably work. -// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:5: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] -// CHECK:STDERR: let y:! type = i32; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:13: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] +// CHECK:STDERR: let generic y: type = i32; +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -let y:! type = i32; +let generic y: type = i32; // CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:19: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: fn HalfDozen() -> y { return 6; } // CHECK:STDERR: ^ @@ -33,10 +33,10 @@ fn HalfDozen() -> y { return 6; } // TODO: This should work. // CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:5: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] -// CHECK:STDERR: let template z:! type = i32; -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~ +// CHECK:STDERR: let template z: type = i32; +// CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: -let template z:! type = i32; +let template z: type = i32; // CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:28: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: fn FirstPerfectNumber() -> z { return 6; } // CHECK:STDERR: ^ @@ -96,9 +96,9 @@ fn FirstPerfectNumber() -> z { return 6; } // CHECK:STDOUT: %x.ref: type = name_ref x, file.%x // CHECK:STDOUT: %return: = return_slot // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc27_9.1: type = splice_block %.loc27_9.2 [concrete = type] { +// CHECK:STDOUT: %.loc27_16.1: type = splice_block %.loc27_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc27_9.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc27_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %y: type = wrapper_binding y, @__global_init.%i32.loc27 // CHECK:STDOUT: name_binding_decl { @@ -110,9 +110,9 @@ fn FirstPerfectNumber() -> z { return 6; } // CHECK:STDOUT: %y.ref: type = name_ref y, file.%y // CHECK:STDOUT: %return: = return_slot // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc39_18.1: type = splice_block %.loc39_18.2 [concrete = type] { +// CHECK:STDOUT: %.loc39_17.1: type = splice_block %.loc39_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc39: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc39_18.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc39_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } // CHECK:STDOUT: %z: type = wrapper_binding z, @__global_init.%i32.loc39 // CHECK:STDOUT: name_binding_decl { diff --git a/toolchain/check/testdata/return/import_convert_function.carbon b/toolchain/check/testdata/return/import_convert_function.carbon index bfbf6fffb313..e61cf57bcc1a 100644 --- a/toolchain/check/testdata/return/import_convert_function.carbon +++ b/toolchain/check/testdata/return/import_convert_function.carbon @@ -16,7 +16,7 @@ package P library "[[@TEST_NAME]]"; -class C(N:! i32) {} +class C(N: i32) {} class D { var n: i32; var m: i32; } fn Make() -> D { return {.n = 0, .m = 0}; } @@ -960,7 +960,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %P.import_ref.9f8 = import_ref P//library, loc5_16, unloaded // CHECK:STDOUT: %P.import_ref.0cb = import_ref P//library, loc5_28, unloaded // CHECK:STDOUT: %P.C: %C.type = import_ref P//library, C, loaded [concrete = constants.%C.generic] -// CHECK:STDOUT: %P.import_ref.8f2: = import_ref P//library, loc4_19, loaded [concrete = constants.%complete_type.357] +// CHECK:STDOUT: %P.import_ref.8f2: = import_ref P//library, loc4_18, loaded [concrete = constants.%complete_type.357] // CHECK:STDOUT: %P.import_ref.70e = import_ref P//library, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %P.import_ref.d2a: %i32 = import_ref P//library, loc4_10, loaded [symbolic = @C.%N (constants.%N.37f)] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index 6b16a376c457..f0c58a89ab6c 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -18,7 +18,7 @@ var a_ref: {.a: i32} = {.a = 0}; var b_ref: {.a: {.b: i32, .c: (i32,)}, .d: i32} = {.a = {.b = 0, .c = (0,)}, .d = 0}; -class C(S:! {.a: i32, .b: i32}) {} +class C(S: {.a: i32, .b: i32}) {} fn F() -> C({.a = 1, .b = 2}); // --- implicit.impl.carbon @@ -39,8 +39,8 @@ impl package Implicit; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-4]]:1: in import [InImport] // CHECK:STDERR: implicit.carbon:8:9: note: initializing generic parameter `S` declared here [InitializingGenericParam] -// CHECK:STDERR: class C(S:! {.a: i32, .b: i32}) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: class C(S: {.a: i32, .b: i32}) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var c_bad: C({.c = 1, .d = 2}) = F(); @@ -61,7 +61,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); library "[[@TEST_NAME]]"; interface I { - let value:! {.x: i32}; + let value: {.x: i32}; } class C {} diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index 89af69d3fa93..3acc189137e0 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -17,7 +17,7 @@ package Implicit; var a_ref: (i32,) = (0,); var b_ref: (((i32,), i32), (i32, i32)) = (((0,), 1), (2, 3)); -class C(X:! (i32, i32)) {} +class C(X: (i32, i32)) {} fn F() -> C((1, 2)); @@ -40,8 +40,8 @@ impl package Implicit; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-5]]:1: in import [InImport] // CHECK:STDERR: implicit.carbon:7:9: note: initializing generic parameter `X` declared here [InitializingGenericParam] -// CHECK:STDERR: class C(X:! (i32, i32)) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~ +// CHECK:STDERR: class C(X: (i32, i32)) {} +// CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: var c_bad: C((1, 2, 3)) = F(); @@ -63,7 +63,7 @@ var c_bad: C((3, 4)) = F(); library "[[@TEST_NAME]]"; interface I { - let value:! (i32,); + let value: (i32,); } class C {} diff --git a/toolchain/check/testdata/var/fail_generic.carbon b/toolchain/check/testdata/var/fail_generic.carbon index 0476ebc7962b..6168a499f692 100644 --- a/toolchain/check/testdata/var/fail_generic.carbon +++ b/toolchain/check/testdata/var/fail_generic.carbon @@ -13,15 +13,15 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/var/fail_generic.carbon fn Main() { - // CHECK:STDERR: fail_generic.carbon:[[@LINE+8]]:7: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] - // CHECK:STDERR: var x:! () = (); - // CHECK:STDERR: ^~~~~~ + // CHECK:STDERR: fail_generic.carbon:[[@LINE+8]]:15: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] + // CHECK:STDERR: var generic x: () = (); + // CHECK:STDERR: ^~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_generic.carbon:[[@LINE+4]]:14: error: found `:!` pattern inside `var` pattern [NonRegularBindingInVarDecl] - // CHECK:STDERR: var x:! () = (); - // CHECK:STDERR: ^ + // CHECK:STDERR: fail_generic.carbon:[[@LINE+4]]:21: error: found generic binding inside `var` pattern [NonRegularBindingInVarDecl] + // CHECK:STDERR: var generic x: () = (); + // CHECK:STDERR: ^ // CHECK:STDERR: - var x:! () = (); + var generic x: () = (); } // CHECK:STDOUT: --- fail_generic.carbon diff --git a/toolchain/check/testdata/var/var_pattern.carbon b/toolchain/check/testdata/var/var_pattern.carbon index 7f5d81aa232f..1af4a4b74c75 100644 --- a/toolchain/check/testdata/var/var_pattern.carbon +++ b/toolchain/check/testdata/var/var_pattern.carbon @@ -98,16 +98,16 @@ fn F() { library "[[@TEST_NAME]]"; fn f() { - // CHECK:STDERR: fail_compile_time.carbon:[[@LINE+8]]:7: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] - // CHECK:STDERR: var T:! type; - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: fail_compile_time.carbon:[[@LINE+8]]:15: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] + // CHECK:STDERR: var generic T: type; + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_compile_time.carbon:[[@LINE+4]]:15: error: found `:!` pattern inside `var` pattern [NonRegularBindingInVarDecl] - // CHECK:STDERR: var T:! type; - // CHECK:STDERR: ^ + // CHECK:STDERR: fail_compile_time.carbon:[[@LINE+4]]:22: error: found generic binding inside `var` pattern [NonRegularBindingInVarDecl] + // CHECK:STDERR: var generic T: type; + // CHECK:STDERR: ^ // CHECK:STDERR: - var T:! type; - let (x: (), T:! type) = ((), ()); + var generic T: type; + let (x: (), generic T: type) = ((), ()); } // --- fail_implicit.carbon @@ -120,15 +120,11 @@ library "[[@TEST_NAME]]"; // CHECK:STDERR: fn F[var u: ()](); -// CHECK:STDERR: fail_implicit.carbon:[[@LINE+8]]:10: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo] -// CHECK:STDERR: fn G[var T:! type](); -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:10: error: implicit parameters of functions must be constant [ImplictParamMustBeConstant] +// CHECK:STDERR: fn G[var T: type](); +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:18: error: found `:!` pattern inside `var` pattern [NonRegularBindingInVarDecl] -// CHECK:STDERR: fn G[var T:! type](); -// CHECK:STDERR: ^ -// CHECK:STDERR: -fn G[var T:! type](); +fn G[var T: type](); // --- var_self.carbon @@ -785,8 +781,35 @@ fn Call() { // CHECK:STDOUT: // CHECK:STDOUT: --- fail_implicit.carbon // CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %F.type: type = fn_type @F [concrete] +// CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %G.type: type = fn_type @G [concrete] +// CHECK:STDOUT: %G: %G.type = struct_value () [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: package: = namespace [concrete] { +// CHECK:STDOUT: .Core = imports.%Core +// CHECK:STDOUT: .F = %F.decl +// CHECK:STDOUT: .G = %G.decl +// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} +// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: fn @F(); // CHECK:STDOUT: +// CHECK:STDOUT: fn @G(); +// CHECK:STDOUT: // CHECK:STDOUT: --- var_self.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index f789308e3362..3abede4e8c35 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -17,13 +17,13 @@ library "[[@TEST_NAME]]"; interface I {} //@dump-sem-ir-begin -fn F(T:! I where .Self impls type); +fn F(generic T: I where .Self impls type); //@dump-sem-ir-end alias Type = type; //@dump-sem-ir-begin -fn G(T:! I where .Self impls Type); +fn G(generic T: I where .Self impls Type); //@dump-sem-ir-end // --- fail_self_impls_error.carbon @@ -36,11 +36,11 @@ interface I {} // Because there's an error inside the `where`, the constant value of the // `where` should be an error also. // -// CHECK:STDERR: fail_self_impls_error.carbon:[[@LINE+4]]:30: error: name `J` not found [NameNotFound] -// CHECK:STDERR: fn F(T:! I where .Self impls J); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_self_impls_error.carbon:[[@LINE+4]]:37: error: name `J` not found [NameNotFound] +// CHECK:STDERR: fn F(generic T: I where .Self impls J); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn F(T:! I where .Self impls J); +fn F(generic T: I where .Self impls J); //@dump-sem-ir-end // --- state_constraints.carbon @@ -50,16 +50,16 @@ library "[[@TEST_NAME]]"; interface J {} interface I { - let Member:! type; - let Second:! J; + let Member: type; + let Second: J; } //@dump-sem-ir-begin -fn EqualEqual(U:! I where .Self == ()); +fn EqualEqual(generic U: I where .Self == ()); -fn Impls(V:! J where .Self impls I); +fn Impls(generic V: J where .Self impls I); -fn And(W:! I where .Self impls J and .Member == ()); +fn And(generic W: I where .Self impls J and .Member == ()); //@dump-sem-ir-end // --- associated_type_impls.carbon @@ -70,48 +70,48 @@ interface L {} interface M {} interface K { - let Associated:! L; + let Associated: L; } //@dump-sem-ir-begin -fn AssociatedTypeImpls(W:! K where .Associated impls M); +fn AssociatedTypeImpls(generic W: K where .Associated impls M); //@dump-sem-ir-end // --- fail_left_of_impls_non_type.carbon library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_left_of_impls_non_type.carbon:[[@LINE+7]]:32: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet] -// CHECK:STDERR: fn NonTypeImpls(U:! type where 7 impls type); -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_left_of_impls_non_type.carbon:[[@LINE+4]]:32: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] -// CHECK:STDERR: fn NonTypeImpls(U:! type where 7 impls type); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_left_of_impls_non_type.carbon:[[@LINE+7]]:39: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet] +// CHECK:STDERR: fn NonTypeImpls(generic U: type where 7 impls type); +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_left_of_impls_non_type.carbon:[[@LINE+4]]:39: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] +// CHECK:STDERR: fn NonTypeImpls(generic U: type where 7 impls type); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn NonTypeImpls(U:! type where 7 impls type); +fn NonTypeImpls(generic U: type where 7 impls type); // --- fail_right_of_impls_non_type.carbon library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_right_of_impls_non_type.carbon:[[@LINE+7]]:44: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet] -// CHECK:STDERR: fn ImplsNonType(U:! type where .Self impls 7); -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_right_of_impls_non_type.carbon:[[@LINE+4]]:44: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] -// CHECK:STDERR: fn ImplsNonType(U:! type where .Self impls 7); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_right_of_impls_non_type.carbon:[[@LINE+7]]:51: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet] +// CHECK:STDERR: fn ImplsNonType(generic U: type where .Self impls 7); +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_right_of_impls_non_type.carbon:[[@LINE+4]]:51: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] +// CHECK:STDERR: fn ImplsNonType(generic U: type where .Self impls 7); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn ImplsNonType(U:! type where .Self impls 7); +fn ImplsNonType(generic U: type where .Self impls 7); // --- fail_right_of_impls_non_facet_type.carbon library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_right_of_impls_non_facet_type.carbon:[[@LINE+4]]:51: error: right argument of `impls` requirement must be a facet type [ImplsOnNonFacetType] -// CHECK:STDERR: fn ImplsOfNonFacetType(U:! type where .Self impls i32); -// CHECK:STDERR: ^~~ +// CHECK:STDERR: fail_right_of_impls_non_facet_type.carbon:[[@LINE+4]]:58: error: right argument of `impls` requirement must be a facet type [ImplsOnNonFacetType] +// CHECK:STDERR: fn ImplsOfNonFacetType(generic U: type where .Self impls i32); +// CHECK:STDERR: ^~~ // CHECK:STDERR: -fn ImplsOfNonFacetType(U:! type where .Self impls i32); +fn ImplsOfNonFacetType(generic U: type where .Self impls i32); // --- fail_enforce_impls_constraint.carbon @@ -128,9 +128,9 @@ fn DoesNotImplI() { // CHECK:STDERR: Impls(C); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_enforce_impls_constraint.carbon:[[@LINE-10]]:1: in import [InImport] - // CHECK:STDERR: state_constraints.carbon:14:10: note: initializing generic parameter `V` declared here [InitializingGenericParam] - // CHECK:STDERR: fn Impls(V:! J where .Self impls I); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: state_constraints.carbon:14:18: note: initializing generic parameter `V` declared here [InitializingGenericParam] + // CHECK:STDERR: fn Impls(generic V: J where .Self impls I); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Impls(C); } @@ -144,7 +144,7 @@ import library "state_constraints"; class C {} impl C as J {} -fn EmptyStruct(Y:! J where .Self == {}); +fn EmptyStruct(generic Y: J where .Self == {}); // TODO: Should report that `C` does not meeet the `==` constraint. Right // now there is no support for `==` constraints so it rejects it as an @@ -153,9 +153,9 @@ fn NotEmptyStruct() { // CHECK:STDERR: fail_todo_enforce_equality_constraint.carbon:[[@LINE+7]]:3: error: cannot convert type `C` into type implementing `J where...` [ConversionFailureTypeToFacet] // CHECK:STDERR: EmptyStruct(C); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_enforce_equality_constraint.carbon:[[@LINE-9]]:16: note: initializing generic parameter `Y` declared here [InitializingGenericParam] - // CHECK:STDERR: fn EmptyStruct(Y:! J where .Self == {}); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_enforce_equality_constraint.carbon:[[@LINE-9]]:24: note: initializing generic parameter `Y` declared here [InitializingGenericParam] + // CHECK:STDERR: fn EmptyStruct(generic Y: J where .Self == {}); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: EmptyStruct(C); } @@ -165,11 +165,11 @@ fn NotEmptyStruct() { library "[[@TEST_NAME]]"; //@dump-sem-ir-begin -// CHECK:STDERR: fail_error_in_constraint.carbon:[[@LINE+4]]:41: error: name `I` not found [NameNotFound] -// CHECK:STDERR: fn WithError(U:! type where .Self impls I); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_error_in_constraint.carbon:[[@LINE+4]]:48: error: name `I` not found [NameNotFound] +// CHECK:STDERR: fn WithError(generic U: type where .Self impls I); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn WithError(U:! type where .Self impls I); +fn WithError(generic U: type where .Self impls I); //@dump-sem-ir-end // --- import_error_in_constraint.carbon @@ -205,79 +205,79 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc7_7.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc7_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_12.1: type = splice_block %.loc7_12.2 [concrete = constants.%I.type] { -// CHECK:STDOUT: %.Self.frozen.loc7_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.2 [concrete = constants.%I.type] { +// CHECK:STDOUT: %.Self.frozen.loc7_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.frozen.loc7_12: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.frozen.loc7_19: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc7_18.1: %I.type = name_ref .Self, %.Self.frozen.loc7_12 [symbolic_self = constants.%.Self.frozen.3a0] -// CHECK:STDOUT: %.loc7_30: type = type_literal type [concrete = type] -// CHECK:STDOUT: %.Self.as_type.loc7_18.1: type = facet_access_type %.Self.ref.loc7_18.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc7_18.1: type = converted %.Self.ref.loc7_18.1, %.Self.as_type.loc7_18.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %impls.loc7_24.1 = requirement_impls %.loc7_18.1, %.loc7_30 [concrete] +// CHECK:STDOUT: %.Self.ref.loc7_25.1: %I.type = name_ref .Self, %.Self.frozen.loc7_19 [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.loc7_37: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.as_type.loc7_25.1: type = facet_access_type %.Self.ref.loc7_25.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc7_25.1: type = converted %.Self.ref.loc7_25.1, %.Self.as_type.loc7_25.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %impls.loc7_31.1 = requirement_impls %.loc7_25.1, %.loc7_37 [concrete] // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc7_18.2: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type.loc7_18.2: type = facet_access_type %.Self.ref.loc7_18.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc7_18.2: type = converted %.Self.ref.loc7_18.1, %.Self.as_type.loc7_18.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impls.loc7_24.2 = requirement_impls %.loc7_18.2, %.loc7_30 [concrete] -// CHECK:STDOUT: %.loc7_12.2: type = where_expr [concrete = constants.%I.type] { +// CHECK:STDOUT: %.Self.ref.loc7_25.2: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.as_type.loc7_25.2: type = facet_access_type %.Self.ref.loc7_25.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc7_25.2: type = converted %.Self.ref.loc7_25.1, %.Self.as_type.loc7_25.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impls.loc7_31.2 = requirement_impls %.loc7_25.2, %.loc7_37 [concrete] +// CHECK:STDOUT: %.loc7_19.2: type = where_expr [concrete = constants.%I.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %impls.loc7_24.2 = requirement_impls %.loc7_18.2, %.loc7_30 [concrete] +// CHECK:STDOUT: %impls.loc7_31.2 = requirement_impls %.loc7_25.2, %.loc7_37 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc7_7.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc7_15.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc7_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc13_7.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_12.1: type = splice_block %.loc13_12.2 [concrete = constants.%I.type] { -// CHECK:STDOUT: %.Self.frozen.loc13_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc13_19.1: type = splice_block %.loc13_19.2 [concrete = constants.%I.type] { +// CHECK:STDOUT: %.Self.frozen.loc13_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.frozen.loc13_12: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.frozen.loc13_19: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc13_18.1: %I.type = name_ref .Self, %.Self.frozen.loc13_12 [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.ref.loc13_25.1: %I.type = name_ref .Self, %.Self.frozen.loc13_19 [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %Type.ref: type = name_ref Type, file.%Type [concrete = type] -// CHECK:STDOUT: %.Self.as_type.loc13_18.1: type = facet_access_type %.Self.ref.loc13_18.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc13_18.1: type = converted %.Self.ref.loc13_18.1, %.Self.as_type.loc13_18.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %impls.loc13_24.1 = requirement_impls %.loc13_18.1, %Type.ref [concrete] +// CHECK:STDOUT: %.Self.as_type.loc13_25.1: type = facet_access_type %.Self.ref.loc13_25.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc13_25.1: type = converted %.Self.ref.loc13_25.1, %.Self.as_type.loc13_25.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %impls.loc13_31.1 = requirement_impls %.loc13_25.1, %Type.ref [concrete] // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc13_18.2: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type.loc13_18.2: type = facet_access_type %.Self.ref.loc13_18.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc13_18.2: type = converted %.Self.ref.loc13_18.1, %.Self.as_type.loc13_18.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impls.loc13_24.2 = requirement_impls %.loc13_18.2, %Type.ref [concrete] -// CHECK:STDOUT: %.loc13_12.2: type = where_expr [concrete = constants.%I.type] { +// CHECK:STDOUT: %.Self.ref.loc13_25.2: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.as_type.loc13_25.2: type = facet_access_type %.Self.ref.loc13_25.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc13_25.2: type = converted %.Self.ref.loc13_25.1, %.Self.as_type.loc13_25.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impls.loc13_31.2 = requirement_impls %.loc13_25.2, %Type.ref [concrete] +// CHECK:STDOUT: %.loc13_19.2: type = where_expr [concrete = constants.%I.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %impls.loc13_24.2 = requirement_impls %.loc13_18.2, %Type.ref [concrete] +// CHECK:STDOUT: %impls.loc13_31.2 = requirement_impls %.loc13_25.2, %Type.ref [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc13_7.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc13_15.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc7_7.2: %I.type) { -// CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc7_7.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T)] +// CHECK:STDOUT: generic fn @F(%T.loc7_15.2: %I.type) { +// CHECK:STDOUT: %T.patt.loc7_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc7_15.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc7_15.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @G(%T.loc13_7.2: %I.type) { -// CHECK:STDOUT: %T.patt.loc13_7.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc13_7.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)] +// CHECK:STDOUT: generic fn @G(%T.loc13_15.2: %I.type) { +// CHECK:STDOUT: %T.patt.loc13_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc13_15.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc7_7.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc7_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { -// CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc13_7.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc13_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_self_impls_error.carbon @@ -298,24 +298,24 @@ fn F() { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: = symbolic_binding_pattern T, 0 [concrete = ] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_12.1: type = splice_block %.loc14_12.2 [concrete = ] { -// CHECK:STDOUT: %.Self.frozen.loc14_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc14_19.1: type = splice_block %.loc14_19.2 [concrete = ] { +// CHECK:STDOUT: %.Self.frozen.loc14_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.frozen.loc14_12: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.frozen.loc14_19: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc14_18.1: %I.type = name_ref .Self, %.Self.frozen.loc14_12 [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.ref.loc14_25.1: %I.type = name_ref .Self, %.Self.frozen.loc14_19 [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %J.ref: = name_ref J, [concrete = ] -// CHECK:STDOUT: %.Self.as_type.loc14_18.1: type = facet_access_type %.Self.ref.loc14_18.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc14_18.1: type = converted %.Self.ref.loc14_18.1, %.Self.as_type.loc14_18.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %impls.loc14_24.1 = requirement_impls %.loc14_18.1, [concrete] +// CHECK:STDOUT: %.Self.as_type.loc14_25.1: type = facet_access_type %.Self.ref.loc14_25.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc14_25.1: type = converted %.Self.ref.loc14_25.1, %.Self.as_type.loc14_25.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %impls.loc14_31.1 = requirement_impls %.loc14_25.1, [concrete] // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc14_18.2: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type.loc14_18.2: type = facet_access_type %.Self.ref.loc14_18.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc14_18.2: type = converted %.Self.ref.loc14_18.1, %.Self.as_type.loc14_18.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impls.loc14_24.2 = requirement_impls %.loc14_18.2, [concrete] -// CHECK:STDOUT: %.loc14_12.2: type = where_expr [concrete = ] { +// CHECK:STDOUT: %.Self.ref.loc14_25.2: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.as_type.loc14_25.2: type = facet_access_type %.Self.ref.loc14_25.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc14_25.2: type = converted %.Self.ref.loc14_25.1, %.Self.as_type.loc14_25.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impls.loc14_31.2 = requirement_impls %.loc14_25.2, [concrete] +// CHECK:STDOUT: %.loc14_19.2: type = where_expr [concrete = ] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %impls.loc14_24.2 = requirement_impls %.loc14_18.2, [concrete] +// CHECK:STDOUT: %impls.loc14_31.2 = requirement_impls %.loc14_25.2, [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %T: = symbolic_binding T, 0 [concrete = ] @@ -373,122 +373,122 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %EqualEqual.decl: %EqualEqual.type = fn_decl @EqualEqual [concrete = constants.%EqualEqual] { -// CHECK:STDOUT: %U.patt.loc12_16.1: %pattern_type.603 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_16.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc12_24.1: %pattern_type.603 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_24.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_21.1: type = splice_block %.loc12_21.2 [concrete = constants.%I_where.type.267] { -// CHECK:STDOUT: %.Self.frozen.loc12_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc12_28.1: type = splice_block %.loc12_28.2 [concrete = constants.%I_where.type.267] { +// CHECK:STDOUT: %.Self.frozen.loc12_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.frozen.loc12_21: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.frozen.loc12_28: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc12_27.1: %I.type = name_ref .Self, %.Self.frozen.loc12_21 [symbolic_self = constants.%.Self.frozen.3a0] -// CHECK:STDOUT: %.loc12_37: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %equiv.loc12_33.1 = requirement_equivalent %.Self.ref.loc12_27.1, %.loc12_37 [concrete] +// CHECK:STDOUT: %.Self.ref.loc12_34.1: %I.type = name_ref .Self, %.Self.frozen.loc12_28 [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.loc12_44: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %equiv.loc12_40.1 = requirement_equivalent %.Self.ref.loc12_34.1, %.loc12_44 [concrete] // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.f73] -// CHECK:STDOUT: %.Self.ref.loc12_27.2: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.f73] -// CHECK:STDOUT: %equiv.loc12_33.2 = requirement_equivalent %.Self.ref.loc12_27.2, %.loc12_37 [concrete] -// CHECK:STDOUT: %.loc12_21.2: type = where_expr [concrete = constants.%I_where.type.267] { +// CHECK:STDOUT: %.Self.ref.loc12_34.2: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.f73] +// CHECK:STDOUT: %equiv.loc12_40.2 = requirement_equivalent %.Self.ref.loc12_34.2, %.loc12_44 [concrete] +// CHECK:STDOUT: %.loc12_28.2: type = where_expr [concrete = constants.%I_where.type.267] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %equiv.loc12_33.2 = requirement_equivalent %.Self.ref.loc12_27.2, %.loc12_37 [concrete] +// CHECK:STDOUT: %equiv.loc12_40.2 = requirement_equivalent %.Self.ref.loc12_34.2, %.loc12_44 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc12_16.2: %I_where.type.267 = symbolic_binding U, 0 [symbolic = %U.loc12_16.1 (constants.%U)] +// CHECK:STDOUT: %U.loc12_24.2: %I_where.type.267 = symbolic_binding U, 0 [symbolic = %U.loc12_24.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Impls.decl: %Impls.type = fn_decl @Impls [concrete = constants.%Impls] { -// CHECK:STDOUT: %V.patt.loc14_11.1: %pattern_type.17c = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc14_11.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.patt.loc14_19.1: %pattern_type.17c = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc14_19.2 (constants.%V.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_16.1: type = splice_block %.loc14_16.2 [concrete = constants.%J_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc14_11: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc14_23.1: type = splice_block %.loc14_23.2 [concrete = constants.%J_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc14_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self.frozen.loc14_16: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.99c] +// CHECK:STDOUT: %.Self.frozen.loc14_23: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.99c] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %J.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc14_22.1: %J.type = name_ref .Self, %.Self.frozen.loc14_16 [symbolic_self = constants.%.Self.frozen.99c] +// CHECK:STDOUT: %.Self.ref.loc14_29.1: %J.type = name_ref .Self, %.Self.frozen.loc14_23 [symbolic_self = constants.%.Self.frozen.99c] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.as_type.loc14_22.1: type = facet_access_type %.Self.ref.loc14_22.1 [symbolic_self = constants.%.Self.frozen.as_type.8c8] -// CHECK:STDOUT: %.loc14_22.1: type = converted %.Self.ref.loc14_22.1, %.Self.as_type.loc14_22.1 [symbolic_self = constants.%.Self.frozen.as_type.8c8] -// CHECK:STDOUT: %impls.loc14_28.1 = requirement_impls %.loc14_22.1, %I.ref [concrete] +// CHECK:STDOUT: %.Self.as_type.loc14_29.1: type = facet_access_type %.Self.ref.loc14_29.1 [symbolic_self = constants.%.Self.frozen.as_type.8c8] +// CHECK:STDOUT: %.loc14_29.1: type = converted %.Self.ref.loc14_29.1, %.Self.as_type.loc14_29.1 [symbolic_self = constants.%.Self.frozen.as_type.8c8] +// CHECK:STDOUT: %impls.loc14_35.1 = requirement_impls %.loc14_29.1, %I.ref [concrete] // CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.6ef] -// CHECK:STDOUT: %.Self.ref.loc14_22.2: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.6ef] -// CHECK:STDOUT: %.Self.as_type.loc14_22.2: type = facet_access_type %.Self.ref.loc14_22.2 [symbolic_self = constants.%.Self.as_type.8c4] -// CHECK:STDOUT: %.loc14_22.2: type = converted %.Self.ref.loc14_22.1, %.Self.as_type.loc14_22.2 [symbolic_self = constants.%.Self.as_type.8c4] -// CHECK:STDOUT: %impls.loc14_28.2 = requirement_impls %.loc14_22.2, %I.ref [concrete] -// CHECK:STDOUT: %.loc14_16.2: type = where_expr [concrete = constants.%J_where.type] { +// CHECK:STDOUT: %.Self.ref.loc14_29.2: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.6ef] +// CHECK:STDOUT: %.Self.as_type.loc14_29.2: type = facet_access_type %.Self.ref.loc14_29.2 [symbolic_self = constants.%.Self.as_type.8c4] +// CHECK:STDOUT: %.loc14_29.2: type = converted %.Self.ref.loc14_29.1, %.Self.as_type.loc14_29.2 [symbolic_self = constants.%.Self.as_type.8c4] +// CHECK:STDOUT: %impls.loc14_35.2 = requirement_impls %.loc14_29.2, %I.ref [concrete] +// CHECK:STDOUT: %.loc14_23.2: type = where_expr [concrete = constants.%J_where.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %J.ref [concrete] -// CHECK:STDOUT: %impls.loc14_28.2 = requirement_impls %.loc14_22.2, %I.ref [concrete] +// CHECK:STDOUT: %impls.loc14_35.2 = requirement_impls %.loc14_29.2, %I.ref [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %V.loc14_11.2: %J_where.type = symbolic_binding V, 0 [symbolic = %V.loc14_11.1 (constants.%V)] +// CHECK:STDOUT: %V.loc14_19.2: %J_where.type = symbolic_binding V, 0 [symbolic = %V.loc14_19.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: %And.decl: %And.type = fn_decl @And [concrete = constants.%And] { -// CHECK:STDOUT: %W.patt.loc16_9.1: %pattern_type.e37 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc16_9.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.patt.loc16_17.1: %pattern_type.e37 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc16_17.2 (constants.%W.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.2 [concrete = constants.%I_where.type.a1d] { -// CHECK:STDOUT: %.Self.frozen.loc16_9: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc16_21.1: type = splice_block %.loc16_21.2 [concrete = constants.%I_where.type.a1d] { +// CHECK:STDOUT: %.Self.frozen.loc16_17: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.frozen.loc16_14: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.frozen.loc16_21: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc16_20.1: %I.type = name_ref .Self, %.Self.frozen.loc16_14 [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.ref.loc16_27.1: %I.type = name_ref .Self, %.Self.frozen.loc16_21 [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self.as_type.loc16_20.1: type = facet_access_type %.Self.ref.loc16_20.1 [symbolic_self = constants.%.Self.frozen.as_type.e90] -// CHECK:STDOUT: %.loc16_20.1: type = converted %.Self.ref.loc16_20.1, %.Self.as_type.loc16_20.1 [symbolic_self = constants.%.Self.frozen.as_type.e90] -// CHECK:STDOUT: %impls.loc16_26.1 = requirement_impls %.loc16_20.1, %J.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc16_38: %I.type = name_ref .Self, %.Self.frozen.loc16_14 [symbolic_self = constants.%.Self.frozen.3a0] -// CHECK:STDOUT: %.Self.as_type.loc16_38: type = facet_access_type %.Self.ref.loc16_38 [symbolic_self = constants.%.Self.frozen.as_type.e90] -// CHECK:STDOUT: %.loc16_38: type = converted %.Self.ref.loc16_38, %.Self.as_type.loc16_38 [symbolic_self = constants.%.Self.frozen.as_type.e90] +// CHECK:STDOUT: %.Self.as_type.loc16_27.1: type = facet_access_type %.Self.ref.loc16_27.1 [symbolic_self = constants.%.Self.frozen.as_type.e90] +// CHECK:STDOUT: %.loc16_27.1: type = converted %.Self.ref.loc16_27.1, %.Self.as_type.loc16_27.1 [symbolic_self = constants.%.Self.frozen.as_type.e90] +// CHECK:STDOUT: %impls.loc16_33.1 = requirement_impls %.loc16_27.1, %J.ref [concrete] +// CHECK:STDOUT: %.Self.ref.loc16_45: %I.type = name_ref .Self, %.Self.frozen.loc16_21 [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.as_type.loc16_45: type = facet_access_type %.Self.ref.loc16_45 [symbolic_self = constants.%.Self.frozen.as_type.e90] +// CHECK:STDOUT: %.loc16_45: type = converted %.Self.ref.loc16_45, %.Self.as_type.loc16_45 [symbolic_self = constants.%.Self.frozen.as_type.e90] // CHECK:STDOUT: %Member.ref: %I.assoc_type = name_ref Member, @Member.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc16_38.1: type = impl_witness_access constants.%I.lookup_impl_witness.ced, element0 [symbolic_self = constants.%impl.elem0.125] -// CHECK:STDOUT: %.loc16_50: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %equiv.loc16_46.1 = requirement_equivalent %impl.elem0.loc16_38.1, %.loc16_50 [concrete] +// CHECK:STDOUT: %impl.elem0.loc16_45.1: type = impl_witness_access constants.%I.lookup_impl_witness.ced, element0 [symbolic_self = constants.%impl.elem0.125] +// CHECK:STDOUT: %.loc16_57: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %equiv.loc16_53.1 = requirement_equivalent %impl.elem0.loc16_45.1, %.loc16_57 [concrete] // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.f73] -// CHECK:STDOUT: %.Self.ref.loc16_20.2: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.f73] -// CHECK:STDOUT: %.Self.as_type.loc16_20.2: type = facet_access_type %.Self.ref.loc16_20.2 [symbolic_self = constants.%.Self.as_type.f7e] -// CHECK:STDOUT: %.loc16_20.2: type = converted %.Self.ref.loc16_20.1, %.Self.as_type.loc16_20.2 [symbolic_self = constants.%.Self.as_type.f7e] -// CHECK:STDOUT: %impls.loc16_26.2 = requirement_impls %.loc16_20.2, %J.ref [concrete] -// CHECK:STDOUT: %impl.elem0.loc16_38.2: type = impl_witness_access constants.%I.lookup_impl_witness.78b, element0 [symbolic_self = constants.%impl.elem0.e55] -// CHECK:STDOUT: %equiv.loc16_46.2 = requirement_equivalent %impl.elem0.loc16_38.2, %.loc16_50 [concrete] -// CHECK:STDOUT: %.loc16_14.2: type = where_expr [concrete = constants.%I_where.type.a1d] { +// CHECK:STDOUT: %.Self.ref.loc16_27.2: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.f73] +// CHECK:STDOUT: %.Self.as_type.loc16_27.2: type = facet_access_type %.Self.ref.loc16_27.2 [symbolic_self = constants.%.Self.as_type.f7e] +// CHECK:STDOUT: %.loc16_27.2: type = converted %.Self.ref.loc16_27.1, %.Self.as_type.loc16_27.2 [symbolic_self = constants.%.Self.as_type.f7e] +// CHECK:STDOUT: %impls.loc16_33.2 = requirement_impls %.loc16_27.2, %J.ref [concrete] +// CHECK:STDOUT: %impl.elem0.loc16_45.2: type = impl_witness_access constants.%I.lookup_impl_witness.78b, element0 [symbolic_self = constants.%impl.elem0.e55] +// CHECK:STDOUT: %equiv.loc16_53.2 = requirement_equivalent %impl.elem0.loc16_45.2, %.loc16_57 [concrete] +// CHECK:STDOUT: %.loc16_21.2: type = where_expr [concrete = constants.%I_where.type.a1d] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %impls.loc16_26.2 = requirement_impls %.loc16_20.2, %J.ref [concrete] -// CHECK:STDOUT: %equiv.loc16_46.2 = requirement_equivalent %impl.elem0.loc16_38.2, %.loc16_50 [concrete] +// CHECK:STDOUT: %impls.loc16_33.2 = requirement_impls %.loc16_27.2, %J.ref [concrete] +// CHECK:STDOUT: %equiv.loc16_53.2 = requirement_equivalent %impl.elem0.loc16_45.2, %.loc16_57 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %W.loc16_9.2: %I_where.type.a1d = symbolic_binding W, 0 [symbolic = %W.loc16_9.1 (constants.%W)] +// CHECK:STDOUT: %W.loc16_17.2: %I_where.type.a1d = symbolic_binding W, 0 [symbolic = %W.loc16_17.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @EqualEqual(%U.loc12_16.2: %I_where.type.267) { -// CHECK:STDOUT: %U.patt.loc12_16.2: %pattern_type.603 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_16.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc12_16.1: %I_where.type.267 = symbolic_binding U, 0 [symbolic = %U.loc12_16.1 (constants.%U)] +// CHECK:STDOUT: generic fn @EqualEqual(%U.loc12_24.2: %I_where.type.267) { +// CHECK:STDOUT: %U.patt.loc12_24.2: %pattern_type.603 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_24.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc12_24.1: %I_where.type.267 = symbolic_binding U, 0 [symbolic = %U.loc12_24.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Impls(%V.loc14_11.2: %J_where.type) { -// CHECK:STDOUT: %V.patt.loc14_11.2: %pattern_type.17c = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc14_11.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.loc14_11.1: %J_where.type = symbolic_binding V, 0 [symbolic = %V.loc14_11.1 (constants.%V)] +// CHECK:STDOUT: generic fn @Impls(%V.loc14_19.2: %J_where.type) { +// CHECK:STDOUT: %V.patt.loc14_19.2: %pattern_type.17c = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc14_19.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.loc14_19.1: %J_where.type = symbolic_binding V, 0 [symbolic = %V.loc14_19.1 (constants.%V)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @And(%W.loc16_9.2: %I_where.type.a1d) { -// CHECK:STDOUT: %W.patt.loc16_9.2: %pattern_type.e37 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc16_9.2 (constants.%W.patt)] -// CHECK:STDOUT: %W.loc16_9.1: %I_where.type.a1d = symbolic_binding W, 0 [symbolic = %W.loc16_9.1 (constants.%W)] +// CHECK:STDOUT: generic fn @And(%W.loc16_17.2: %I_where.type.a1d) { +// CHECK:STDOUT: %W.patt.loc16_17.2: %pattern_type.e37 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc16_17.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.loc16_17.1: %I_where.type.a1d = symbolic_binding W, 0 [symbolic = %W.loc16_17.1 (constants.%W)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @EqualEqual(constants.%U) { -// CHECK:STDOUT: %U.patt.loc12_16.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc12_16.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc12_24.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc12_24.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Impls(constants.%V) { -// CHECK:STDOUT: %V.patt.loc14_11.2 => constants.%V.patt -// CHECK:STDOUT: %V.loc14_11.1 => constants.%V +// CHECK:STDOUT: %V.patt.loc14_19.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc14_19.1 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @And(constants.%W) { -// CHECK:STDOUT: %W.patt.loc16_9.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc16_9.1 => constants.%W +// CHECK:STDOUT: %W.patt.loc16_17.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc16_17.1 => constants.%W // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- associated_type_impls.carbon @@ -520,45 +520,45 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %AssociatedTypeImpls.decl: %AssociatedTypeImpls.type = fn_decl @AssociatedTypeImpls [concrete = constants.%AssociatedTypeImpls] { -// CHECK:STDOUT: %W.patt.loc12_25.1: %pattern_type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc12_25.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.patt.loc12_33.1: %pattern_type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc12_33.2 (constants.%W.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_30.1: type = splice_block %.loc12_30.2 [concrete = constants.%K_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc12_25: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc12_37.1: type = splice_block %.loc12_37.2 [concrete = constants.%K_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc12_33: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [concrete = constants.%K.type] -// CHECK:STDOUT: %.Self.frozen.loc12_30: %K.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.b1d] +// CHECK:STDOUT: %.Self.frozen.loc12_37: %K.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.b1d] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %K.ref [concrete] -// CHECK:STDOUT: %.Self.ref: %K.type = name_ref .Self, %.Self.frozen.loc12_30 [symbolic_self = constants.%.Self.frozen.b1d] +// CHECK:STDOUT: %.Self.ref: %K.type = name_ref .Self, %.Self.frozen.loc12_37 [symbolic_self = constants.%.Self.frozen.b1d] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc12_36.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc12_43.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %Associated.ref: %K.assoc_type = name_ref Associated, @Associated.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc12_36.1: %L.type = impl_witness_access constants.%K.lookup_impl_witness.46f, element0 [symbolic_self = constants.%impl.elem0.c97] +// CHECK:STDOUT: %impl.elem0.loc12_43.1: %L.type = impl_witness_access constants.%K.lookup_impl_witness.46f, element0 [symbolic_self = constants.%impl.elem0.c97] // CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type] -// CHECK:STDOUT: %as_type.loc12_36.1: type = facet_access_type %impl.elem0.loc12_36.1 [symbolic_self = constants.%as_type.3da] -// CHECK:STDOUT: %.loc12_36.2: type = converted %impl.elem0.loc12_36.1, %as_type.loc12_36.1 [symbolic_self = constants.%as_type.3da] -// CHECK:STDOUT: %impls.loc12_48.1 = requirement_impls %.loc12_36.2, %M.ref [concrete] -// CHECK:STDOUT: %impl.elem0.loc12_36.2: %L.type = impl_witness_access constants.%K.lookup_impl_witness.4f0, element0 [symbolic_self = constants.%impl.elem0.819] -// CHECK:STDOUT: %as_type.loc12_36.2: type = facet_access_type %impl.elem0.loc12_36.2 [symbolic_self = constants.%as_type.75b] -// CHECK:STDOUT: %.loc12_36.3: type = converted %impl.elem0.loc12_36.1, %as_type.loc12_36.2 [symbolic_self = constants.%as_type.75b] -// CHECK:STDOUT: %impls.loc12_48.2 = requirement_impls %.loc12_36.3, %M.ref [concrete] -// CHECK:STDOUT: %.loc12_30.2: type = where_expr [concrete = constants.%K_where.type] { +// CHECK:STDOUT: %as_type.loc12_43.1: type = facet_access_type %impl.elem0.loc12_43.1 [symbolic_self = constants.%as_type.3da] +// CHECK:STDOUT: %.loc12_43.2: type = converted %impl.elem0.loc12_43.1, %as_type.loc12_43.1 [symbolic_self = constants.%as_type.3da] +// CHECK:STDOUT: %impls.loc12_55.1 = requirement_impls %.loc12_43.2, %M.ref [concrete] +// CHECK:STDOUT: %impl.elem0.loc12_43.2: %L.type = impl_witness_access constants.%K.lookup_impl_witness.4f0, element0 [symbolic_self = constants.%impl.elem0.819] +// CHECK:STDOUT: %as_type.loc12_43.2: type = facet_access_type %impl.elem0.loc12_43.2 [symbolic_self = constants.%as_type.75b] +// CHECK:STDOUT: %.loc12_43.3: type = converted %impl.elem0.loc12_43.1, %as_type.loc12_43.2 [symbolic_self = constants.%as_type.75b] +// CHECK:STDOUT: %impls.loc12_55.2 = requirement_impls %.loc12_43.3, %M.ref [concrete] +// CHECK:STDOUT: %.loc12_37.2: type = where_expr [concrete = constants.%K_where.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %K.ref [concrete] -// CHECK:STDOUT: %impls.loc12_48.2 = requirement_impls %.loc12_36.3, %M.ref [concrete] +// CHECK:STDOUT: %impls.loc12_55.2 = requirement_impls %.loc12_43.3, %M.ref [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %W.loc12_25.2: %K_where.type = symbolic_binding W, 0 [symbolic = %W.loc12_25.1 (constants.%W)] +// CHECK:STDOUT: %W.loc12_33.2: %K_where.type = symbolic_binding W, 0 [symbolic = %W.loc12_33.1 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AssociatedTypeImpls(%W.loc12_25.2: %K_where.type) { -// CHECK:STDOUT: %W.patt.loc12_25.2: %pattern_type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc12_25.2 (constants.%W.patt)] -// CHECK:STDOUT: %W.loc12_25.1: %K_where.type = symbolic_binding W, 0 [symbolic = %W.loc12_25.1 (constants.%W)] +// CHECK:STDOUT: generic fn @AssociatedTypeImpls(%W.loc12_33.2: %K_where.type) { +// CHECK:STDOUT: %W.patt.loc12_33.2: %pattern_type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc12_33.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.loc12_33.1: %K_where.type = symbolic_binding W, 0 [symbolic = %W.loc12_33.1 (constants.%W)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AssociatedTypeImpls(constants.%W) { -// CHECK:STDOUT: %W.patt.loc12_25.2 => constants.%W.patt -// CHECK:STDOUT: %W.loc12_25.1 => constants.%W +// CHECK:STDOUT: %W.patt.loc12_33.2 => constants.%W.patt +// CHECK:STDOUT: %W.loc12_33.1 => constants.%W // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_error_in_constraint.carbon @@ -577,24 +577,24 @@ fn F() { // CHECK:STDOUT: %WithError.decl: %WithError.type = fn_decl @WithError [concrete = constants.%WithError] { // CHECK:STDOUT: %U.patt: = symbolic_binding_pattern U, 0 [concrete = ] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.2 [concrete = ] { -// CHECK:STDOUT: %.Self.frozen.loc9_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc9_18: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc9_30.1: type = splice_block %.loc9_30.2 [concrete = ] { // CHECK:STDOUT: %.Self.frozen.loc9_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc9_18 [concrete] -// CHECK:STDOUT: %.Self.ref.loc9_29.1: %type = name_ref .Self, %.Self.frozen.loc9_23 [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %.loc9_25: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.frozen.loc9_30: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc9_25 [concrete] +// CHECK:STDOUT: %.Self.ref.loc9_36.1: %type = name_ref .Self, %.Self.frozen.loc9_30 [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: = name_ref I, [concrete = ] -// CHECK:STDOUT: %.Self.as_type.loc9_29.1: type = facet_access_type %.Self.ref.loc9_29.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc9_29.1: type = converted %.Self.ref.loc9_29.1, %.Self.as_type.loc9_29.1 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %impls.loc9_35.1 = requirement_impls %.loc9_29.1, [concrete] +// CHECK:STDOUT: %.Self.as_type.loc9_36.1: type = facet_access_type %.Self.ref.loc9_36.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc9_36.1: type = converted %.Self.ref.loc9_36.1, %.Self.as_type.loc9_36.1 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %impls.loc9_42.1 = requirement_impls %.loc9_36.1, [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc9_29.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] -// CHECK:STDOUT: %.Self.as_type.loc9_29.2: type = facet_access_type %.Self.ref.loc9_29.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc9_29.2: type = converted %.Self.ref.loc9_29.1, %.Self.as_type.loc9_29.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impls.loc9_35.2 = requirement_impls %.loc9_29.2, [concrete] -// CHECK:STDOUT: %.loc9_23.2: type = where_expr [concrete = ] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc9_18 [concrete] -// CHECK:STDOUT: %impls.loc9_35.2 = requirement_impls %.loc9_29.2, [concrete] +// CHECK:STDOUT: %.Self.ref.loc9_36.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] +// CHECK:STDOUT: %.Self.as_type.loc9_36.2: type = facet_access_type %.Self.ref.loc9_36.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc9_36.2: type = converted %.Self.ref.loc9_36.1, %.Self.as_type.loc9_36.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impls.loc9_42.2 = requirement_impls %.loc9_36.2, [concrete] +// CHECK:STDOUT: %.loc9_30.2: type = where_expr [concrete = ] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc9_25 [concrete] +// CHECK:STDOUT: %impls.loc9_42.2 = requirement_impls %.loc9_36.2, [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %U: = symbolic_binding U, 0 [concrete = ] diff --git a/toolchain/check/testdata/where_expr/designator.carbon b/toolchain/check/testdata/where_expr/designator.carbon index 38f3125600e4..5f02d9845867 100644 --- a/toolchain/check/testdata/where_expr/designator.carbon +++ b/toolchain/check/testdata/where_expr/designator.carbon @@ -15,15 +15,15 @@ library "[[@TEST_NAME]]"; interface I { - let Member:! type; + let Member: type; } //@dump-sem-ir-begin -fn PeriodSelf(T:! I where .Self == ()); +fn PeriodSelf(generic T: I where .Self == ()); -fn PeriodMember(U:! I where .Member == ()); +fn PeriodMember(generic U: I where .Member == ()); -fn TypeSelfImpls(V:! type where .Self impls I); +fn TypeSelfImpls(generic V: type where .Self impls I); //@dump-sem-ir-end // --- fail_wrong_member.carbon @@ -31,14 +31,14 @@ fn TypeSelfImpls(V:! type where .Self impls I); library "[[@TEST_NAME]]"; interface J { - let Member:! type; + let Member: type; } -// CHECK:STDERR: fail_wrong_member.carbon:[[@LINE+4]]:31: error: member name `Mismatch` not found in `J` [MemberNameNotFoundInSpecificScope] -// CHECK:STDERR: fn PeriodMismatch(W:! J where .Mismatch = {}); -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_wrong_member.carbon:[[@LINE+4]]:38: error: member name `Mismatch` not found in `J` [MemberNameNotFoundInSpecificScope] +// CHECK:STDERR: fn PeriodMismatch(generic W: J where .Mismatch = {}); +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -fn PeriodMismatch(W:! J where .Mismatch = {}); +fn PeriodMismatch(generic W: J where .Mismatch = {}); // --- fail_designator_matches_var.carbon @@ -96,179 +96,179 @@ library "[[@TEST_NAME]]"; interface I {} -// CHECK:STDERR: fail_impls_constraint_does_not_constrain_self.carbon:[[@LINE+4]]:38: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] -// CHECK:STDERR: fn F(U:! type, unused T:! type where U impls I) {} -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_impls_constraint_does_not_constrain_self.carbon:[[@LINE+4]]:52: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] +// CHECK:STDERR: fn F(generic U: type, unused generic T: type where U impls I) {} +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -fn F(U:! type, unused T:! type where U impls I) {} +fn F(generic U: type, unused generic T: type where U impls I) {} // --- fail_equality_constraint_does_not_constrain_self.carbon library "[[@TEST_NAME]]"; interface I { - let X:! type; + let X: type; } -// CHECK:STDERR: fail_equality_constraint_does_not_constrain_self.carbon:[[@LINE+4]]:35: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] -// CHECK:STDERR: fn F(U:! I, unused T:! type where U.X == ()) {} -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_equality_constraint_does_not_constrain_self.carbon:[[@LINE+4]]:49: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] +// CHECK:STDERR: fn F(generic U: I, unused generic T: type where U.X == ()) {} +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -fn F(U:! I, unused T:! type where U.X == ()) {} +fn F(generic U: I, unused generic T: type where U.X == ()) {} // --- fail_combined_constraint_does_not_constrain_self.carbon library "[[@TEST_NAME]]"; interface I { - let X:! type; + let X: type; } -// CHECK:STDERR: fail_combined_constraint_does_not_constrain_self.carbon:[[@LINE+8]]:35: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] -// CHECK:STDERR: fn F(U:! I, unused T:! type where U impls I and U.X == ()) {} -// CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: -// CHECK:STDERR: fail_combined_constraint_does_not_constrain_self.carbon:[[@LINE+4]]:49: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] -// CHECK:STDERR: fn F(U:! I, unused T:! type where U impls I and U.X == ()) {} +// CHECK:STDERR: fail_combined_constraint_does_not_constrain_self.carbon:[[@LINE+8]]:49: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] +// CHECK:STDERR: fn F(generic U: I, unused generic T: type where U impls I and U.X == ()) {} // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -fn F(U:! I, unused T:! type where U impls I and U.X == ()) {} +// CHECK:STDERR: fail_combined_constraint_does_not_constrain_self.carbon:[[@LINE+4]]:63: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] +// CHECK:STDERR: fn F(generic U: I, unused generic T: type where U impls I and U.X == ()) {} +// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: +fn F(generic U: I, unused generic T: type where U impls I and U.X == ()) {} // --- impls_constraint_does_constrain_self.carbon library "[[@TEST_NAME]]"; -interface I(T:! type) {} +interface I(T: type) {} -class C(T:! type); +class C(T: type); -fn F(unused T:! type where C(.Self) impls I(())) {} +fn F(unused generic T: type where C(.Self) impls I(())) {} -fn G(unused T:! type where C(()) impls I(.Self)) {} +fn G(unused generic T: type where C(()) impls I(.Self)) {} // --- fail_where_without_designator_in_one_equiv_constraint.carbon library "[[@TEST_NAME]]"; interface I {} -interface J(T:! type) {} -class A(T:! type); +interface J(T: type) {} +class A(T: type); class B; class C; -// CHECK:STDERR: fail_where_without_designator_in_one_equiv_constraint.carbon:[[@LINE+4]]:46: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] -// CHECK:STDERR: fn F(unused T:! type where A(.Self) == B and A(B) == B) {} -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_where_without_designator_in_one_equiv_constraint.carbon:[[@LINE+4]]:53: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] +// CHECK:STDERR: fn F(unused generic T: type where A(.Self) == B and A(B) == B) {} +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! type where A(.Self) == B and A(B) == B) {} +fn F(unused generic T: type where A(.Self) == B and A(B) == B) {} interface Z { - let Z0:! type; + let Z0: type; } -// CHECK:STDERR: fail_where_without_designator_in_one_equiv_constraint.carbon:[[@LINE+4]]:41: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] -// CHECK:STDERR: fn G(unused T:! Z where A(.Z0) == B and A(B) == B) {} -// CHECK:STDERR: ^~~~~~~~~ +// CHECK:STDERR: fail_where_without_designator_in_one_equiv_constraint.carbon:[[@LINE+4]]:48: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] +// CHECK:STDERR: fn G(unused generic T: Z where A(.Z0) == B and A(B) == B) {} +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -fn G(unused T:! Z where A(.Z0) == B and A(B) == B) {} +fn G(unused generic T: Z where A(.Z0) == B and A(B) == B) {} // --- fail_where_without_self_designator_in_one_impls_interface.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} +interface Z(T: type) {} interface I {} -interface J(T:! type) {} +interface J(T: type) {} class C; -// CHECK:STDERR: fail_where_without_self_designator_in_one_impls_interface.carbon:[[@LINE+4]]:28: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] -// CHECK:STDERR: fn F(unused T:! type where C impls (I & J(.Self))) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_where_without_self_designator_in_one_impls_interface.carbon:[[@LINE+4]]:35: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] +// CHECK:STDERR: fn F(unused generic T: type where C impls (I & J(.Self))) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! type where C impls (I & J(.Self))) {} +fn F(unused generic T: type where C impls (I & J(.Self))) {} // --- fail_where_without_member_designator_in_one_impls_interface.carbon library "[[@TEST_NAME]]"; interface Z { - let Z0:! type; + let Z0: type; } interface I {} -interface J(T:! type) {} +interface J(T: type) {} class C; -// CHECK:STDERR: fail_where_without_member_designator_in_one_impls_interface.carbon:[[@LINE+4]]:25: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] -// CHECK:STDERR: fn F(unused T:! Z where C impls (I & J(.Z0))) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_where_without_member_designator_in_one_impls_interface.carbon:[[@LINE+4]]:32: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] +// CHECK:STDERR: fn F(unused generic T: Z where C impls (I & J(.Z0))) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! Z where C impls (I & J(.Z0))) {} +fn F(unused generic T: Z where C impls (I & J(.Z0))) {} // --- fail_where_without_self_designator_in_one_impls_named_constraint.carbon library "[[@TEST_NAME]]"; interface Z {} constraint I {} -interface J(T:! type) {} -constraint K(T:! type) { +interface J(T: type) {} +constraint K(T: type) { require T impls J(Self); } class C; -// CHECK:STDERR: fail_where_without_self_designator_in_one_impls_named_constraint.carbon:[[@LINE+4]]:28: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] -// CHECK:STDERR: fn F(unused T:! type where C impls (I & K(.Self))) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_where_without_self_designator_in_one_impls_named_constraint.carbon:[[@LINE+4]]:35: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] +// CHECK:STDERR: fn F(unused generic T: type where C impls (I & K(.Self))) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! type where C impls (I & K(.Self))) {} +fn F(unused generic T: type where C impls (I & K(.Self))) {} // --- fail_where_without_member_designator_in_one_impls_named_constraint.carbon library "[[@TEST_NAME]]"; interface Z { - let Z0:! type; + let Z0: type; } constraint I {} -interface J(T:! type) {} -constraint K(T:! type) { +interface J(T: type) {} +constraint K(T: type) { require T impls J(Self); } class C; -// CHECK:STDERR: fail_where_without_member_designator_in_one_impls_named_constraint.carbon:[[@LINE+4]]:25: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] -// CHECK:STDERR: fn F(unused T:! Z where C impls (I & K(.Z0))) {} -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_where_without_member_designator_in_one_impls_named_constraint.carbon:[[@LINE+4]]:32: error: constraint in `where` clause without a designator; expected `.Self` or a member access like `.M` [WhereWithoutDesignator] +// CHECK:STDERR: fn F(unused generic T: Z where C impls (I & K(.Z0))) {} +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -fn F(unused T:! Z where C impls (I & K(.Z0))) {} +fn F(unused generic T: Z where C impls (I & K(.Z0))) {} // --- constraint_does_constrain_designator_as_self.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} -constraint N(T:! type) { +interface Z(T: type) {} +constraint N(T: type) { require T impls Z(Self); } class C; -fn F(unused T:! type where C impls N(.Self)) {} +fn F(unused generic T: type where C impls N(.Self)) {} // --- constraint_does_constrain_designator_as_specific.carbon library "[[@TEST_NAME]]"; -interface Z(T:! type) {} -constraint N(T:! type) { +interface Z(T: type) {} +constraint N(T: type) { require impls Z(T); } class C; -fn F(unused T:! type where C impls N(.Self)) {} +fn F(unused generic T: type where C impls N(.Self)) {} // --- todo_fail_constraint_does_not_constrain_designator.carbon library "[[@TEST_NAME]]"; interface Z {} -constraint N(T:! type) { +constraint N(T: type) { require impls Z; } class C; // TODO: This `.Self` is not actually constrained by `C impls N(.Self)`, so it // should fail. -fn F(unused T:! type where C impls N(.Self)) {} +fn F(unused generic T: type where C impls N(.Self)) {} // CHECK:STDOUT: --- success.carbon // CHECK:STDOUT: @@ -310,110 +310,110 @@ fn F(unused T:! type where C impls N(.Self)) {} // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %PeriodSelf.decl: %PeriodSelf.type = fn_decl @PeriodSelf [concrete = constants.%PeriodSelf] { -// CHECK:STDOUT: %T.patt.loc9_16.1: %pattern_type.603 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_16.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc9_24.1: %pattern_type.603 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_24.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_21.1: type = splice_block %.loc9_21.2 [concrete = constants.%I_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc9_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc9_28.1: type = splice_block %.loc9_28.2 [concrete = constants.%I_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc9_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.frozen.loc9_21: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.frozen.loc9_28: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc9_27.1: %I.type = name_ref .Self, %.Self.frozen.loc9_21 [symbolic_self = constants.%.Self.frozen.3a0] -// CHECK:STDOUT: %.loc9_37: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %equiv.loc9_33.1 = requirement_equivalent %.Self.ref.loc9_27.1, %.loc9_37 [concrete] +// CHECK:STDOUT: %.Self.ref.loc9_34.1: %I.type = name_ref .Self, %.Self.frozen.loc9_28 [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.loc9_44: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %equiv.loc9_40.1 = requirement_equivalent %.Self.ref.loc9_34.1, %.loc9_44 [concrete] // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.f73] -// CHECK:STDOUT: %.Self.ref.loc9_27.2: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.f73] -// CHECK:STDOUT: %equiv.loc9_33.2 = requirement_equivalent %.Self.ref.loc9_27.2, %.loc9_37 [concrete] -// CHECK:STDOUT: %.loc9_21.2: type = where_expr [concrete = constants.%I_where.type] { +// CHECK:STDOUT: %.Self.ref.loc9_34.2: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.f73] +// CHECK:STDOUT: %equiv.loc9_40.2 = requirement_equivalent %.Self.ref.loc9_34.2, %.loc9_44 [concrete] +// CHECK:STDOUT: %.loc9_28.2: type = where_expr [concrete = constants.%I_where.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %equiv.loc9_33.2 = requirement_equivalent %.Self.ref.loc9_27.2, %.loc9_37 [concrete] +// CHECK:STDOUT: %equiv.loc9_40.2 = requirement_equivalent %.Self.ref.loc9_34.2, %.loc9_44 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc9_16.2: %I_where.type = symbolic_binding T, 0 [symbolic = %T.loc9_16.1 (constants.%T)] +// CHECK:STDOUT: %T.loc9_24.2: %I_where.type = symbolic_binding T, 0 [symbolic = %T.loc9_24.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %PeriodMember.decl: %PeriodMember.type = fn_decl @PeriodMember [concrete = constants.%PeriodMember] { -// CHECK:STDOUT: %U.patt.loc11_18.1: %pattern_type.603 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_18.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc11_26.1: %pattern_type.603 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_26.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_23.1: type = splice_block %.loc11_23.2 [concrete = constants.%I_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc11_18: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc11_30.1: type = splice_block %.loc11_30.2 [concrete = constants.%I_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc11_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.frozen.loc11_23: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.frozen.loc11_30: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.frozen.loc11_23 [symbolic_self = constants.%.Self.frozen.3a0] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.frozen.loc11_30 [symbolic_self = constants.%.Self.frozen.3a0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type.e90] -// CHECK:STDOUT: %.loc11_29: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type.e90] +// CHECK:STDOUT: %.loc11_36: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type.e90] // CHECK:STDOUT: %Member.ref: %I.assoc_type = name_ref Member, @Member.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc11_29.1: type = impl_witness_access constants.%I.lookup_impl_witness.ced, element0 [symbolic_self = constants.%impl.elem0.125] -// CHECK:STDOUT: %.loc11_41: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %equiv.loc11_37.1 = requirement_equivalent %impl.elem0.loc11_29.1, %.loc11_41 [concrete] -// CHECK:STDOUT: %impl.elem0.loc11_29.2: type = impl_witness_access constants.%I.lookup_impl_witness.78b, element0 [symbolic_self = constants.%impl.elem0.e55] -// CHECK:STDOUT: %equiv.loc11_37.2 = requirement_equivalent %impl.elem0.loc11_29.2, %.loc11_41 [concrete] -// CHECK:STDOUT: %.loc11_23.2: type = where_expr [concrete = constants.%I_where.type] { +// CHECK:STDOUT: %impl.elem0.loc11_36.1: type = impl_witness_access constants.%I.lookup_impl_witness.ced, element0 [symbolic_self = constants.%impl.elem0.125] +// CHECK:STDOUT: %.loc11_48: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %equiv.loc11_44.1 = requirement_equivalent %impl.elem0.loc11_36.1, %.loc11_48 [concrete] +// CHECK:STDOUT: %impl.elem0.loc11_36.2: type = impl_witness_access constants.%I.lookup_impl_witness.78b, element0 [symbolic_self = constants.%impl.elem0.e55] +// CHECK:STDOUT: %equiv.loc11_44.2 = requirement_equivalent %impl.elem0.loc11_36.2, %.loc11_48 [concrete] +// CHECK:STDOUT: %.loc11_30.2: type = where_expr [concrete = constants.%I_where.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete] -// CHECK:STDOUT: %equiv.loc11_37.2 = requirement_equivalent %impl.elem0.loc11_29.2, %.loc11_41 [concrete] +// CHECK:STDOUT: %equiv.loc11_44.2 = requirement_equivalent %impl.elem0.loc11_36.2, %.loc11_48 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc11_18.2: %I_where.type = symbolic_binding U, 0 [symbolic = %U.loc11_18.1 (constants.%U)] +// CHECK:STDOUT: %U.loc11_26.2: %I_where.type = symbolic_binding U, 0 [symbolic = %U.loc11_26.1 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %TypeSelfImpls.decl: %TypeSelfImpls.type = fn_decl @TypeSelfImpls [concrete = constants.%TypeSelfImpls] { -// CHECK:STDOUT: %V.patt.loc13_19.1: %pattern_type.951 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_19.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.patt.loc13_27.1: %pattern_type.951 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_27.2 (constants.%V.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_27.1: type = splice_block %.loc13_27.2 [concrete = constants.%type_where] { -// CHECK:STDOUT: %.Self.frozen.loc13_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc13_22: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc13_34.1: type = splice_block %.loc13_34.2 [concrete = constants.%type_where] { // CHECK:STDOUT: %.Self.frozen.loc13_27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc13_22 [concrete] -// CHECK:STDOUT: %.Self.ref.loc13_33.1: %type = name_ref .Self, %.Self.frozen.loc13_27 [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc13_29: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.Self.frozen.loc13_34: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc13_29 [concrete] +// CHECK:STDOUT: %.Self.ref.loc13_40.1: %type = name_ref .Self, %.Self.frozen.loc13_34 [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %.Self.as_type.loc13_33.1: type = facet_access_type %.Self.ref.loc13_33.1 [symbolic_self = constants.%.Self.frozen.as_type.bce] -// CHECK:STDOUT: %.loc13_33.1: type = converted %.Self.ref.loc13_33.1, %.Self.as_type.loc13_33.1 [symbolic_self = constants.%.Self.frozen.as_type.bce] -// CHECK:STDOUT: %impls.loc13_39.1 = requirement_impls %.loc13_33.1, %I.ref [concrete] +// CHECK:STDOUT: %.Self.as_type.loc13_40.1: type = facet_access_type %.Self.ref.loc13_40.1 [symbolic_self = constants.%.Self.frozen.as_type.bce] +// CHECK:STDOUT: %.loc13_40.1: type = converted %.Self.ref.loc13_40.1, %.Self.as_type.loc13_40.1 [symbolic_self = constants.%.Self.frozen.as_type.bce] +// CHECK:STDOUT: %impls.loc13_46.1 = requirement_impls %.loc13_40.1, %I.ref [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.e0b] -// CHECK:STDOUT: %.Self.ref.loc13_33.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.e0b] -// CHECK:STDOUT: %.Self.as_type.loc13_33.2: type = facet_access_type %.Self.ref.loc13_33.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %.loc13_33.2: type = converted %.Self.ref.loc13_33.1, %.Self.as_type.loc13_33.2 [symbolic_self = constants.%.Self.as_type] -// CHECK:STDOUT: %impls.loc13_39.2 = requirement_impls %.loc13_33.2, %I.ref [concrete] -// CHECK:STDOUT: %.loc13_27.2: type = where_expr [concrete = constants.%type_where] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc13_22 [concrete] -// CHECK:STDOUT: %impls.loc13_39.2 = requirement_impls %.loc13_33.2, %I.ref [concrete] +// CHECK:STDOUT: %.Self.ref.loc13_40.2: %type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.e0b] +// CHECK:STDOUT: %.Self.as_type.loc13_40.2: type = facet_access_type %.Self.ref.loc13_40.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %.loc13_40.2: type = converted %.Self.ref.loc13_40.1, %.Self.as_type.loc13_40.2 [symbolic_self = constants.%.Self.as_type] +// CHECK:STDOUT: %impls.loc13_46.2 = requirement_impls %.loc13_40.2, %I.ref [concrete] +// CHECK:STDOUT: %.loc13_34.2: type = where_expr [concrete = constants.%type_where] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %.loc13_29 [concrete] +// CHECK:STDOUT: %impls.loc13_46.2 = requirement_impls %.loc13_40.2, %I.ref [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %V.loc13_19.2: %type_where = symbolic_binding V, 0 [symbolic = %V.loc13_19.1 (constants.%V)] +// CHECK:STDOUT: %V.loc13_27.2: %type_where = symbolic_binding V, 0 [symbolic = %V.loc13_27.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @PeriodSelf(%T.loc9_16.2: %I_where.type) { -// CHECK:STDOUT: %T.patt.loc9_16.2: %pattern_type.603 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc9_16.1: %I_where.type = symbolic_binding T, 0 [symbolic = %T.loc9_16.1 (constants.%T)] +// CHECK:STDOUT: generic fn @PeriodSelf(%T.loc9_24.2: %I_where.type) { +// CHECK:STDOUT: %T.patt.loc9_24.2: %pattern_type.603 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_24.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc9_24.1: %I_where.type = symbolic_binding T, 0 [symbolic = %T.loc9_24.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @PeriodMember(%U.loc11_18.2: %I_where.type) { -// CHECK:STDOUT: %U.patt.loc11_18.2: %pattern_type.603 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_18.2 (constants.%U.patt)] -// CHECK:STDOUT: %U.loc11_18.1: %I_where.type = symbolic_binding U, 0 [symbolic = %U.loc11_18.1 (constants.%U)] +// CHECK:STDOUT: generic fn @PeriodMember(%U.loc11_26.2: %I_where.type) { +// CHECK:STDOUT: %U.patt.loc11_26.2: %pattern_type.603 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_26.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.loc11_26.1: %I_where.type = symbolic_binding U, 0 [symbolic = %U.loc11_26.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TypeSelfImpls(%V.loc13_19.2: %type_where) { -// CHECK:STDOUT: %V.patt.loc13_19.2: %pattern_type.951 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_19.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.loc13_19.1: %type_where = symbolic_binding V, 0 [symbolic = %V.loc13_19.1 (constants.%V)] +// CHECK:STDOUT: generic fn @TypeSelfImpls(%V.loc13_27.2: %type_where) { +// CHECK:STDOUT: %V.patt.loc13_27.2: %pattern_type.951 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_27.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.loc13_27.1: %type_where = symbolic_binding V, 0 [symbolic = %V.loc13_27.1 (constants.%V)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @PeriodSelf(constants.%T) { -// CHECK:STDOUT: %T.patt.loc9_16.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc9_16.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc9_24.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc9_24.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @PeriodMember(constants.%U) { -// CHECK:STDOUT: %U.patt.loc11_18.2 => constants.%U.patt -// CHECK:STDOUT: %U.loc11_18.1 => constants.%U +// CHECK:STDOUT: %U.patt.loc11_26.2 => constants.%U.patt +// CHECK:STDOUT: %U.loc11_26.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TypeSelfImpls(constants.%V) { -// CHECK:STDOUT: %V.patt.loc13_19.2 => constants.%V.patt -// CHECK:STDOUT: %V.loc13_19.1 => constants.%V +// CHECK:STDOUT: %V.patt.loc13_27.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc13_27.1 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/where_expr/dot_self_impls.carbon b/toolchain/check/testdata/where_expr/dot_self_impls.carbon index 8413ba7777df..9be76d0545a4 100644 --- a/toolchain/check/testdata/where_expr/dot_self_impls.carbon +++ b/toolchain/check/testdata/where_expr/dot_self_impls.carbon @@ -23,7 +23,7 @@ interface J { fn GSelf(self); } -fn INotJ[T:! I where .Self impls J](x: T) { +fn INotJ[T: I where .Self impls J](x: T) { // Can access members of `I` using either kind of member access. T.FNonInstance(); T.(I.FNonInstance)(); @@ -39,7 +39,7 @@ fn INotJ[T:! I where .Self impls J](x: T) { x.(J.GSelf)(); } -fn TypeNotJ[T:! type where .Self impls J](x: T) { +fn TypeNotJ[T: type where .Self impls J](x: T) { T.(J.GNonInstance)(); x.(J.GSelf)(); } @@ -55,7 +55,7 @@ interface J { fn F() -> {}; } -fn INotJ(T:! I where .Self impls J) { +fn INotJ(generic T: I where .Self impls J) { // Gets `T.(I.F)`. Doesn't consider `T.(J.F)`, so no ambiguity. let unused x: () = T.F(); } @@ -71,7 +71,7 @@ interface J { fn G(); } -fn INotJ(T:! I where .Self impls J) { +fn INotJ(generic T: I where .Self impls J) { // CHECK:STDERR: fail_name_lookup_through_where_self_impls.carbon:[[@LINE+4]]:3: error: member name `G` not found in `I` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: T.G(); // CHECK:STDERR: ^~~ @@ -86,7 +86,7 @@ interface J { fn G(); } -fn TypeNotJ(T:! type where .Self impls J) { +fn TypeNotJ(generic T: type where .Self impls J) { // CHECK:STDERR: fail_name_lookup_with_type.carbon:[[@LINE+4]]:3: error: member name `G` not found [MemberNameNotFound] // CHECK:STDERR: T.G(); // CHECK:STDERR: ^~~ @@ -100,7 +100,7 @@ library "[[@TEST_NAME]]"; interface A {} interface B { fn Bfn(); } -fn F(T:! A & B) { +fn F(generic T: A & B) { // CHECK:STDERR: fail_facet_type_simple_member_access.carbon:[[@LINE+4]]:6: error: member name `Bfn` not found in `A` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: T.((A where .Self impls B).Bfn)(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -127,7 +127,7 @@ interface J { fn GSelf(self); } -fn INotJ[T:! I where .Self impls J](x: T) { +fn INotJ[T: I where .Self impls J](x: T) { // CHECK:STDERR: fail_name_lookup_instance.carbon:[[@LINE+4]]:3: error: member name `GNonInstance` not found in `I` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: x.GNonInstance(); // CHECK:STDERR: ^~~~~~~~~~~~~~ @@ -144,9 +144,9 @@ fn INotJ[T:! I where .Self impls J](x: T) { // --- compare_equal.carbon library "[[@TEST_NAME]]"; -class WrapType(T:! type) {} -fn AssertSame[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} -fn Type(T:! type) -> WrapType(T) { return {}; } +class WrapType(T: type) {} +fn AssertSame[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} +fn Type(generic T: type) -> WrapType(T) { return {}; } interface I; interface J; @@ -171,12 +171,12 @@ interface K {} // --- fail_todo_compare_equal_with_rewrite.carbon library "[[@TEST_NAME]]"; -class WrapType(T:! type) {} -fn AssertSame[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} -fn Type(T:! type) -> WrapType(T) { return {}; } +class WrapType(T: type) {} +fn AssertSame[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} +fn Type(generic T: type) -> WrapType(T) { return {}; } -interface I { let A:! type; } -interface J { let B:! type; } +interface I { let A: type; } +interface J { let B: type; } // TODO: The `.Self` implied in `.A` contains all of the extended interfaces, // which is different between these facet types at the point where `.A` is @@ -192,8 +192,8 @@ fn Test() { // CHECK:STDERR: AssertSame(Type((I where .A = ()) & J), // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_compare_equal_with_rewrite.carbon:[[@LINE-19]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn AssertSame[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn AssertSame[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: AssertSame(Type((I where .A = ()) & J), Type(I & J where .A = ())); @@ -202,8 +202,8 @@ fn Test() { // CHECK:STDERR: AssertSame(Type(I & (J where .B = {})), // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_compare_equal_with_rewrite.carbon:[[@LINE-29]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn AssertSame[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn AssertSame[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: AssertSame(Type(I & (J where .B = {})), Type(I & J where .B = {})); @@ -213,8 +213,8 @@ fn Test() { // CHECK:STDERR: AssertSame(Type((I where .A = ()) & (J where .B = {})), // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_compare_equal_with_rewrite.carbon:[[@LINE-40]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn AssertSame[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn AssertSame[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: AssertSame(Type((I where .A = ()) & (J where .B = {})), Type(I & J where .A = () and .B = {})); @@ -223,9 +223,9 @@ fn Test() { // --- fail_compare_not_equal.carbon library "[[@TEST_NAME]]"; -class WrapType(T:! type) {} -fn Same[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} -fn Type(T:! type) -> WrapType(T) { return {}; } +class WrapType(T: type) {} +fn Same[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} +fn Type(generic T: type) -> WrapType(T) { return {}; } interface I {} interface J {} @@ -235,8 +235,8 @@ fn Test() { // CHECK:STDERR: Same(Type(I where .Self impls J), Type(J where .Self impls I)); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_compare_not_equal.carbon:[[@LINE-10]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Same[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Same[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Same(Type(I where .Self impls J), Type(J where .Self impls I)); } @@ -244,12 +244,12 @@ fn Test() { // --- todo_fail_compare_not_equal_with_same_type.carbon library "[[@TEST_NAME]]"; -class WrapType(T:! type) {} -fn Same[T:! type](unused a: WrapType(T), unused b: WrapType(T)) {} -fn Type(T:! type) -> WrapType(T) { return {}; } +class WrapType(T: type) {} +fn Same[T: type](unused a: WrapType(T), unused b: WrapType(T)) {} +fn Type(generic T: type) -> WrapType(T) { return {}; } -interface I { let A:! type; } -interface J { let B:! type; } +interface I { let A: type; } +interface J { let B: type; } fn Test() { // The first `.A` has a `.Self` of type `I`. The second contains a `.Self` of @@ -266,7 +266,7 @@ library "[[@TEST_NAME]]"; class C {} interface I {} -interface J { let T:! type; } +interface J { let T: type; } // Interfaces to the right of the `where` don't interfere with the // "can only impl a facet type with a single interface" rule. Only @@ -278,8 +278,8 @@ impl {.b: C} as J where .Self impls I and .T = () {} // --- impl_with_rewrite_of_interface_not_being_implemented.carbon library "[[@TEST_NAME]]"; -interface I { let A:! type; } -interface J { let A:! type; } +interface I { let A: type; } +interface J { let A: type; } class C {} @@ -287,7 +287,7 @@ class C {} impl C as J where .A = {} {} // Requirement of implementing J with `.A = A`. -constraint NeedJ(A:! type) { +constraint NeedJ(A: type) { require impls J where .A = A; } diff --git a/toolchain/check/testdata/where_expr/dot_self_index.carbon b/toolchain/check/testdata/where_expr/dot_self_index.carbon index 9ec3fe7da828..685526488fca 100644 --- a/toolchain/check/testdata/where_expr/dot_self_index.carbon +++ b/toolchain/check/testdata/where_expr/dot_self_index.carbon @@ -10,15 +10,15 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/where_expr/dot_self_index.carbon -interface Empty(W:! type) { - let A:! type; +interface Empty(W: type) { + let A: type; } // T has index 0 // .Self has index invalid, not 1 // V has index 1, does not match .Self //@dump-sem-ir-begin -fn H(T:! type, unused U: Empty(T) where .A = T*, unused V:! type) {} +fn H(generic T: type, unused U: Empty(T) where .A = T*, unused generic V: type) {} //@dump-sem-ir-end fn G(U: Empty(i32) where .A = i32*) { @@ -79,72 +79,72 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] { -// CHECK:STDOUT: %T.patt.loc21_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %U.param_patt.loc21_24.1: @H.%pattern_type (%pattern_type.a0f) = value_param_pattern [symbolic = %U.param_patt.loc21_24.2 (constants.%U.param_patt.558)] -// CHECK:STDOUT: %U.patt.loc21_24.1: @H.%pattern_type (%pattern_type.a0f) = at_binding_pattern U, %U.param_patt.loc21_24.1 [symbolic = %U.patt.loc21_24.2 (constants.%U.patt.e03)] -// CHECK:STDOUT: %V.patt.loc21_58.1: %pattern_type.98f = symbolic_binding_pattern V, 1 [symbolic = %V.patt.loc21_58.2 (constants.%V.patt)] +// CHECK:STDOUT: %T.patt.loc21_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %U.param_patt.loc21_31.1: @H.%pattern_type (%pattern_type.a0f) = value_param_pattern [symbolic = %U.param_patt.loc21_31.2 (constants.%U.param_patt.558)] +// CHECK:STDOUT: %U.patt.loc21_31.1: @H.%pattern_type (%pattern_type.a0f) = at_binding_pattern U, %U.param_patt.loc21_31.1 [symbolic = %U.patt.loc21_31.2 (constants.%U.patt.e03)] +// CHECK:STDOUT: %V.patt.loc21_73.1: %pattern_type.98f = symbolic_binding_pattern V, 1 [symbolic = %V.patt.loc21_73.2 (constants.%V.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_10.1: type = splice_block %.loc21_10.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc21_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc21_10.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc21_17.1: type = splice_block %.loc21_17.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc21_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc21_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc21_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc21_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc21_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc21_15.1 (constants.%T)] // CHECK:STDOUT: %U.param: @H.%Empty_where.type (%Empty_where.type.696) = value_param call_param0 -// CHECK:STDOUT: %.loc21_35.1: type = splice_block %.loc21_35.2 [symbolic = %Empty_where.type (constants.%Empty_where.type.696)] { +// CHECK:STDOUT: %.loc21_42.1: type = splice_block %.loc21_42.2 [symbolic = %Empty_where.type (constants.%Empty_where.type.696)] { // CHECK:STDOUT: %Empty.ref: %Empty.type.c52 = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.generic] -// CHECK:STDOUT: %T.ref.loc21_32: type = name_ref T, %T.loc21_7.2 [symbolic = %T.loc21_7.1 (constants.%T)] -// CHECK:STDOUT: %Empty.type.loc21_33.2: type = facet_type <@Empty, @Empty(constants.%T)> [symbolic = %Empty.type.loc21_33.1 (constants.%Empty.type.95d624.2)] -// CHECK:STDOUT: %.Self.frozen.loc21_35.2: @H.%Empty.type.loc21_33.1 (%Empty.type.95d624.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc21_35.1 (constants.%.Self.frozen.063)] -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Empty.type.loc21_33.2 [concrete] -// CHECK:STDOUT: %.Self.ref: @H.%Empty.type.loc21_33.1 (%Empty.type.95d624.2) = name_ref .Self, %.Self.frozen.loc21_35.2 [symbolic = %.Self.frozen.loc21_35.1 (constants.%.Self.frozen.063)] +// CHECK:STDOUT: %T.ref.loc21_39: type = name_ref T, %T.loc21_15.2 [symbolic = %T.loc21_15.1 (constants.%T)] +// CHECK:STDOUT: %Empty.type.loc21_40.2: type = facet_type <@Empty, @Empty(constants.%T)> [symbolic = %Empty.type.loc21_40.1 (constants.%Empty.type.95d624.2)] +// CHECK:STDOUT: %.Self.frozen.loc21_42.2: @H.%Empty.type.loc21_40.1 (%Empty.type.95d624.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc21_42.1 (constants.%.Self.frozen.063)] +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Empty.type.loc21_40.2 [concrete] +// CHECK:STDOUT: %.Self.ref: @H.%Empty.type.loc21_40.1 (%Empty.type.95d624.2) = name_ref .Self, %.Self.frozen.loc21_42.2 [symbolic = %.Self.frozen.loc21_42.1 (constants.%.Self.frozen.063)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.f3f)] -// CHECK:STDOUT: %.loc21_41.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.f3f)] -// CHECK:STDOUT: %.loc21_41.2: @H.%Empty.assoc_type (%Empty.assoc_type.c44b55.2) = specific_constant @A.%assoc0, @Empty.WithSelf(constants.%T, constants.%.Self.frozen.063) [symbolic = %assoc0 (constants.%assoc0.3a7cb1.2)] -// CHECK:STDOUT: %A.ref: @H.%Empty.assoc_type (%Empty.assoc_type.c44b55.2) = name_ref A, %.loc21_41.2 [symbolic = %assoc0 (constants.%assoc0.3a7cb1.2)] -// CHECK:STDOUT: %impl.elem0.loc21_41.3: type = impl_witness_access constants.%Empty.lookup_impl_witness.88a, element0 [symbolic = %impl.elem0.loc21_41.1 (constants.%impl.elem0.c2e)] -// CHECK:STDOUT: %T.ref.loc21_46: type = name_ref T, %T.loc21_7.2 [symbolic = %T.loc21_7.1 (constants.%T)] -// CHECK:STDOUT: %ptr.loc21_47.2: type = ptr_type %T.ref.loc21_46 [symbolic = %ptr.loc21_47.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %rewrite.loc21_44.1 = requirement_rewrite %impl.elem0.loc21_41.3, %ptr.loc21_47.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc21_41.4: type = impl_witness_access constants.%Empty.lookup_impl_witness.67b, element0 [symbolic = %impl.elem0.loc21_41.2 (constants.%impl.elem0.d8a)] -// CHECK:STDOUT: %rewrite.loc21_44.2 = requirement_rewrite %impl.elem0.loc21_41.4, %ptr.loc21_47.2 [concrete] -// CHECK:STDOUT: %.loc21_35.2: type = where_expr [symbolic = %Empty_where.type (constants.%Empty_where.type.696)] { -// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Empty.type.loc21_33.2 [concrete] -// CHECK:STDOUT: %rewrite.loc21_44.2 = requirement_rewrite %impl.elem0.loc21_41.4, %ptr.loc21_47.2 [concrete] +// CHECK:STDOUT: %.loc21_48.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.f3f)] +// CHECK:STDOUT: %.loc21_48.2: @H.%Empty.assoc_type (%Empty.assoc_type.c44b55.2) = specific_constant @A.%assoc0, @Empty.WithSelf(constants.%T, constants.%.Self.frozen.063) [symbolic = %assoc0 (constants.%assoc0.3a7cb1.2)] +// CHECK:STDOUT: %A.ref: @H.%Empty.assoc_type (%Empty.assoc_type.c44b55.2) = name_ref A, %.loc21_48.2 [symbolic = %assoc0 (constants.%assoc0.3a7cb1.2)] +// CHECK:STDOUT: %impl.elem0.loc21_48.3: type = impl_witness_access constants.%Empty.lookup_impl_witness.88a, element0 [symbolic = %impl.elem0.loc21_48.1 (constants.%impl.elem0.c2e)] +// CHECK:STDOUT: %T.ref.loc21_53: type = name_ref T, %T.loc21_15.2 [symbolic = %T.loc21_15.1 (constants.%T)] +// CHECK:STDOUT: %ptr.loc21_54.2: type = ptr_type %T.ref.loc21_53 [symbolic = %ptr.loc21_54.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %rewrite.loc21_51.1 = requirement_rewrite %impl.elem0.loc21_48.3, %ptr.loc21_54.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc21_48.4: type = impl_witness_access constants.%Empty.lookup_impl_witness.67b, element0 [symbolic = %impl.elem0.loc21_48.2 (constants.%impl.elem0.d8a)] +// CHECK:STDOUT: %rewrite.loc21_51.2 = requirement_rewrite %impl.elem0.loc21_48.4, %ptr.loc21_54.2 [concrete] +// CHECK:STDOUT: %.loc21_42.2: type = where_expr [symbolic = %Empty_where.type (constants.%Empty_where.type.696)] { +// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Empty.type.loc21_40.2 [concrete] +// CHECK:STDOUT: %rewrite.loc21_51.2 = requirement_rewrite %impl.elem0.loc21_48.4, %ptr.loc21_54.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %U: @H.%Empty_where.type (%Empty_where.type.696) = wrapper_binding U, %U.param -// CHECK:STDOUT: %.loc21_61.1: type = splice_block %.loc21_61.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen.loc21_58: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] -// CHECK:STDOUT: %.loc21_61.2: type = type_literal type [concrete = type] +// CHECK:STDOUT: %.loc21_75.1: type = splice_block %.loc21_75.2 [concrete = type] { +// CHECK:STDOUT: %.Self.frozen.loc21_73: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc21_75.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %V.loc21_58.2: type = symbolic_binding V, 1 [symbolic = %V.loc21_58.1 (constants.%V)] +// CHECK:STDOUT: %V.loc21_73.2: type = symbolic_binding V, 1 [symbolic = %V.loc21_73.1 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @H(%T.loc21_7.2: type, %V.loc21_58.2: type) { -// CHECK:STDOUT: %T.patt.loc21_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc21_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc21_7.1 (constants.%T)] -// CHECK:STDOUT: %Empty.type.loc21_33.1: type = facet_type <@Empty, @Empty(%T.loc21_7.1)> [symbolic = %Empty.type.loc21_33.1 (constants.%Empty.type.95d624.2)] -// CHECK:STDOUT: %.Self.frozen.loc21_35.1: @H.%Empty.type.loc21_33.1 (%Empty.type.95d624.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc21_35.1 (constants.%.Self.frozen.063)] -// CHECK:STDOUT: %require_complete.loc21_41: = require_complete_type %Empty.type.loc21_33.1 [symbolic = %require_complete.loc21_41 (constants.%require_complete.a43)] -// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc21_35.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.f3f)] -// CHECK:STDOUT: %Empty.assoc_type: type = assoc_entity_type @Empty, @Empty(%T.loc21_7.1) [symbolic = %Empty.assoc_type (constants.%Empty.assoc_type.c44b55.2)] +// CHECK:STDOUT: generic fn @H(%T.loc21_15.2: type, %V.loc21_73.2: type) { +// CHECK:STDOUT: %T.patt.loc21_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc21_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc21_15.1 (constants.%T)] +// CHECK:STDOUT: %Empty.type.loc21_40.1: type = facet_type <@Empty, @Empty(%T.loc21_15.1)> [symbolic = %Empty.type.loc21_40.1 (constants.%Empty.type.95d624.2)] +// CHECK:STDOUT: %.Self.frozen.loc21_42.1: @H.%Empty.type.loc21_40.1 (%Empty.type.95d624.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc21_42.1 (constants.%.Self.frozen.063)] +// CHECK:STDOUT: %require_complete.loc21_48: = require_complete_type %Empty.type.loc21_40.1 [symbolic = %require_complete.loc21_48 (constants.%require_complete.a43)] +// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc21_42.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.f3f)] +// CHECK:STDOUT: %Empty.assoc_type: type = assoc_entity_type @Empty, @Empty(%T.loc21_15.1) [symbolic = %Empty.assoc_type (constants.%Empty.assoc_type.c44b55.2)] // CHECK:STDOUT: %assoc0: @H.%Empty.assoc_type (%Empty.assoc_type.c44b55.2) = assoc_entity element0, @Empty.WithSelf.%A [symbolic = %assoc0 (constants.%assoc0.3a7cb1.2)] -// CHECK:STDOUT: %Empty.lookup_impl_witness.loc21_41.1: = lookup_impl_witness %.Self.frozen.loc21_35.1, @Empty, @Empty(%T.loc21_7.1) [symbolic = %Empty.lookup_impl_witness.loc21_41.1 (constants.%Empty.lookup_impl_witness.88a)] -// CHECK:STDOUT: %impl.elem0.loc21_41.1: type = impl_witness_access %Empty.lookup_impl_witness.loc21_41.1, element0 [symbolic = %impl.elem0.loc21_41.1 (constants.%impl.elem0.c2e)] -// CHECK:STDOUT: %ptr.loc21_47.1: type = ptr_type %T.loc21_7.1 [symbolic = %ptr.loc21_47.1 (constants.%ptr.e8f)] -// CHECK:STDOUT: %.Self: @H.%Empty.type.loc21_33.1 (%Empty.type.95d624.2) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.913)] -// CHECK:STDOUT: %Empty.lookup_impl_witness.loc21_41.2: = lookup_impl_witness %.Self, @Empty, @Empty(%T.loc21_7.1) [symbolic = %Empty.lookup_impl_witness.loc21_41.2 (constants.%Empty.lookup_impl_witness.67b)] -// CHECK:STDOUT: %impl.elem0.loc21_41.2: type = impl_witness_access %Empty.lookup_impl_witness.loc21_41.2, element0 [symbolic = %impl.elem0.loc21_41.2 (constants.%impl.elem0.d8a)] -// CHECK:STDOUT: %Empty_where.type: type = facet_type <@Empty, @Empty(%T.loc21_7.1) where %impl.elem0.loc21_41.2 = %ptr.loc21_47.1> [symbolic = %Empty_where.type (constants.%Empty_where.type.696)] +// CHECK:STDOUT: %Empty.lookup_impl_witness.loc21_48.1: = lookup_impl_witness %.Self.frozen.loc21_42.1, @Empty, @Empty(%T.loc21_15.1) [symbolic = %Empty.lookup_impl_witness.loc21_48.1 (constants.%Empty.lookup_impl_witness.88a)] +// CHECK:STDOUT: %impl.elem0.loc21_48.1: type = impl_witness_access %Empty.lookup_impl_witness.loc21_48.1, element0 [symbolic = %impl.elem0.loc21_48.1 (constants.%impl.elem0.c2e)] +// CHECK:STDOUT: %ptr.loc21_54.1: type = ptr_type %T.loc21_15.1 [symbolic = %ptr.loc21_54.1 (constants.%ptr.e8f)] +// CHECK:STDOUT: %.Self: @H.%Empty.type.loc21_40.1 (%Empty.type.95d624.2) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.913)] +// CHECK:STDOUT: %Empty.lookup_impl_witness.loc21_48.2: = lookup_impl_witness %.Self, @Empty, @Empty(%T.loc21_15.1) [symbolic = %Empty.lookup_impl_witness.loc21_48.2 (constants.%Empty.lookup_impl_witness.67b)] +// CHECK:STDOUT: %impl.elem0.loc21_48.2: type = impl_witness_access %Empty.lookup_impl_witness.loc21_48.2, element0 [symbolic = %impl.elem0.loc21_48.2 (constants.%impl.elem0.d8a)] +// CHECK:STDOUT: %Empty_where.type: type = facet_type <@Empty, @Empty(%T.loc21_15.1) where %impl.elem0.loc21_48.2 = %ptr.loc21_54.1> [symbolic = %Empty_where.type (constants.%Empty_where.type.696)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Empty_where.type [symbolic = %pattern_type (constants.%pattern_type.a0f)] -// CHECK:STDOUT: %U.param_patt.loc21_24.2: @H.%pattern_type (%pattern_type.a0f) = value_param_pattern [symbolic = %U.param_patt.loc21_24.2 (constants.%U.param_patt.558)] -// CHECK:STDOUT: %U.patt.loc21_24.2: @H.%pattern_type (%pattern_type.a0f) = at_binding_pattern U, %U.param_patt.loc21_24.2 [symbolic = %U.patt.loc21_24.2 (constants.%U.patt.e03)] -// CHECK:STDOUT: %V.patt.loc21_58.2: %pattern_type.98f = symbolic_binding_pattern V, 1 [symbolic = %V.patt.loc21_58.2 (constants.%V.patt)] -// CHECK:STDOUT: %V.loc21_58.1: type = symbolic_binding V, 1 [symbolic = %V.loc21_58.1 (constants.%V)] +// CHECK:STDOUT: %U.param_patt.loc21_31.2: @H.%pattern_type (%pattern_type.a0f) = value_param_pattern [symbolic = %U.param_patt.loc21_31.2 (constants.%U.param_patt.558)] +// CHECK:STDOUT: %U.patt.loc21_31.2: @H.%pattern_type (%pattern_type.a0f) = at_binding_pattern U, %U.param_patt.loc21_31.2 [symbolic = %U.patt.loc21_31.2 (constants.%U.patt.e03)] +// CHECK:STDOUT: %V.patt.loc21_73.2: %pattern_type.98f = symbolic_binding_pattern V, 1 [symbolic = %V.patt.loc21_73.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.loc21_73.1: type = symbolic_binding V, 1 [symbolic = %V.loc21_73.1 (constants.%V)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc21_24: = require_complete_type %Empty_where.type [symbolic = %require_complete.loc21_24 (constants.%require_complete.e98)] +// CHECK:STDOUT: %require_complete.loc21_31: = require_complete_type %Empty_where.type [symbolic = %require_complete.loc21_31 (constants.%require_complete.e98)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%U.param: @H.%Empty_where.type (%Empty_where.type.696)) { // CHECK:STDOUT: !entry: @@ -155,51 +155,51 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @H(constants.%T, constants.%V) { -// CHECK:STDOUT: %T.patt.loc21_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc21_7.1 => constants.%T -// CHECK:STDOUT: %Empty.type.loc21_33.1 => constants.%Empty.type.95d624.2 -// CHECK:STDOUT: %.Self.frozen.loc21_35.1 => constants.%.Self.frozen.063 -// CHECK:STDOUT: %require_complete.loc21_41 => constants.%require_complete.a43 +// CHECK:STDOUT: %T.patt.loc21_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc21_15.1 => constants.%T +// CHECK:STDOUT: %Empty.type.loc21_40.1 => constants.%Empty.type.95d624.2 +// CHECK:STDOUT: %.Self.frozen.loc21_42.1 => constants.%.Self.frozen.063 +// CHECK:STDOUT: %require_complete.loc21_48 => constants.%require_complete.a43 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f3f // CHECK:STDOUT: %Empty.assoc_type => constants.%Empty.assoc_type.c44b55.2 // CHECK:STDOUT: %assoc0 => constants.%assoc0.3a7cb1.2 -// CHECK:STDOUT: %Empty.lookup_impl_witness.loc21_41.1 => constants.%Empty.lookup_impl_witness.88a -// CHECK:STDOUT: %impl.elem0.loc21_41.1 => constants.%impl.elem0.c2e -// CHECK:STDOUT: %ptr.loc21_47.1 => constants.%ptr.e8f +// CHECK:STDOUT: %Empty.lookup_impl_witness.loc21_48.1 => constants.%Empty.lookup_impl_witness.88a +// CHECK:STDOUT: %impl.elem0.loc21_48.1 => constants.%impl.elem0.c2e +// CHECK:STDOUT: %ptr.loc21_54.1 => constants.%ptr.e8f // CHECK:STDOUT: %.Self => constants.%.Self.913 -// CHECK:STDOUT: %Empty.lookup_impl_witness.loc21_41.2 => constants.%Empty.lookup_impl_witness.67b -// CHECK:STDOUT: %impl.elem0.loc21_41.2 => constants.%impl.elem0.d8a +// CHECK:STDOUT: %Empty.lookup_impl_witness.loc21_48.2 => constants.%Empty.lookup_impl_witness.67b +// CHECK:STDOUT: %impl.elem0.loc21_48.2 => constants.%impl.elem0.d8a // CHECK:STDOUT: %Empty_where.type => constants.%Empty_where.type.696 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a0f -// CHECK:STDOUT: %U.param_patt.loc21_24.2 => constants.%U.param_patt.558 -// CHECK:STDOUT: %U.patt.loc21_24.2 => constants.%U.patt.e03 -// CHECK:STDOUT: %V.patt.loc21_58.2 => constants.%V.patt -// CHECK:STDOUT: %V.loc21_58.1 => constants.%V +// CHECK:STDOUT: %U.param_patt.loc21_31.2 => constants.%U.param_patt.558 +// CHECK:STDOUT: %U.patt.loc21_31.2 => constants.%U.patt.e03 +// CHECK:STDOUT: %V.patt.loc21_73.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc21_73.1 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @H(constants.%i32, bool) { -// CHECK:STDOUT: %T.patt.loc21_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc21_7.1 => constants.%i32 -// CHECK:STDOUT: %Empty.type.loc21_33.1 => constants.%Empty.type.39c -// CHECK:STDOUT: %.Self.frozen.loc21_35.1 => constants.%.Self.frozen.869 -// CHECK:STDOUT: %require_complete.loc21_41 => constants.%complete_type.c56 +// CHECK:STDOUT: %T.patt.loc21_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc21_15.1 => constants.%i32 +// CHECK:STDOUT: %Empty.type.loc21_40.1 => constants.%Empty.type.39c +// CHECK:STDOUT: %.Self.frozen.loc21_42.1 => constants.%.Self.frozen.869 +// CHECK:STDOUT: %require_complete.loc21_48 => constants.%complete_type.c56 // CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.941 // CHECK:STDOUT: %Empty.assoc_type => constants.%Empty.assoc_type.22b // CHECK:STDOUT: %assoc0 => constants.%assoc0.023 -// CHECK:STDOUT: %Empty.lookup_impl_witness.loc21_41.1 => constants.%Empty.lookup_impl_witness.635 -// CHECK:STDOUT: %impl.elem0.loc21_41.1 => constants.%impl.elem0.31d -// CHECK:STDOUT: %ptr.loc21_47.1 => constants.%ptr.d08 +// CHECK:STDOUT: %Empty.lookup_impl_witness.loc21_48.1 => constants.%Empty.lookup_impl_witness.635 +// CHECK:STDOUT: %impl.elem0.loc21_48.1 => constants.%impl.elem0.31d +// CHECK:STDOUT: %ptr.loc21_54.1 => constants.%ptr.d08 // CHECK:STDOUT: %.Self => constants.%.Self.98b -// CHECK:STDOUT: %Empty.lookup_impl_witness.loc21_41.2 => constants.%Empty.lookup_impl_witness.4f6 -// CHECK:STDOUT: %impl.elem0.loc21_41.2 => constants.%impl.elem0.f25 +// CHECK:STDOUT: %Empty.lookup_impl_witness.loc21_48.2 => constants.%Empty.lookup_impl_witness.4f6 +// CHECK:STDOUT: %impl.elem0.loc21_48.2 => constants.%impl.elem0.f25 // CHECK:STDOUT: %Empty_where.type => constants.%Empty_where.type.944 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.12c -// CHECK:STDOUT: %U.param_patt.loc21_24.2 => constants.%U.param_patt.a6a -// CHECK:STDOUT: %U.patt.loc21_24.2 => constants.%U.patt.616e51.2 -// CHECK:STDOUT: %V.patt.loc21_58.2 => constants.%V.patt -// CHECK:STDOUT: %V.loc21_58.1 => bool +// CHECK:STDOUT: %U.param_patt.loc21_31.2 => constants.%U.param_patt.a6a +// CHECK:STDOUT: %U.patt.loc21_31.2 => constants.%U.patt.616e51.2 +// CHECK:STDOUT: %V.patt.loc21_73.2 => constants.%V.patt +// CHECK:STDOUT: %V.loc21_73.1 => bool // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc21_24 => constants.%complete_type.c21 +// CHECK:STDOUT: %require_complete.loc21_31 => constants.%complete_type.c21 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/where_expr/equal_rewrite.carbon b/toolchain/check/testdata/where_expr/equal_rewrite.carbon index 64ad855ad22f..1704b766ee40 100644 --- a/toolchain/check/testdata/where_expr/equal_rewrite.carbon +++ b/toolchain/check/testdata/where_expr/equal_rewrite.carbon @@ -15,11 +15,11 @@ library "[[@TEST_NAME]]"; interface N { - let P:! type; + let P: type; } //@dump-sem-ir-begin -fn Equal(T:! N where .P = {}); +fn Equal(generic T: N where .P = {}); //@dump-sem-ir-end // --- nested_rewrites.carbon @@ -27,12 +27,12 @@ fn Equal(T:! N where .P = {}); library "[[@TEST_NAME]]"; interface A { - let B:! type; - let C:! type; + let B: type; + let C: type; } //@dump-sem-ir-begin -fn NestedRewrite(D:! (A where .B = bool) where .C = ()); +fn NestedRewrite(generic D: (A where .B = bool) where .C = ()); //@dump-sem-ir-end // --- repeated_rewrite.carbon @@ -40,18 +40,18 @@ fn NestedRewrite(D:! (A where .B = bool) where .C = ()); library "[[@TEST_NAME]]"; interface E { - let F:! type; + let F: type; } //@dump-sem-ir-begin -fn OneRewrite(unused G:! E where .F = i32) {} +fn OneRewrite(unused generic G: E where .F = i32) {} -fn RepeatedRewrite(H:! E where .F = i32 and .F = i32) { +fn RepeatedRewrite(generic H: E where .F = i32 and .F = i32) { //@dump-sem-ir-end OneRewrite(H); } -fn OneRewriteAgain(I:! E where .F = i32) { +fn OneRewriteAgain(generic I: E where .F = i32) { RepeatedRewrite(I); } @@ -60,14 +60,14 @@ fn OneRewriteAgain(I:! E where .F = i32) { library "[[@TEST_NAME]]"; interface J { - let K:! type; - let L:! type; + let K: type; + let L: type; } //@dump-sem-ir-begin -fn Alphabetical(unused M:! J where .K = () and .L = bool) {} +fn Alphabetical(unused generic M: J where .K = () and .L = bool) {} -fn Reversed(N:! J where .L = bool and .K = ()) { +fn Reversed(generic N: J where .L = bool and .K = ()) { //@dump-sem-ir-end Alphabetical(N); } @@ -77,18 +77,18 @@ fn Reversed(N:! J where .L = bool and .K = ()) { library "[[@TEST_NAME]]"; interface O { - let P:! type; + let P: type; } -fn WithInteger(unused Q:! O where .P = i32) {} +fn WithInteger(unused generic Q: O where .P = i32) {} -fn WithBool(R:! O where .P = bool) { +fn WithBool(generic R: O where .P = bool) { // CHECK:STDERR: fail_rewrites_mismatch_right.carbon:[[@LINE+7]]:3: error: cannot convert type `R` that implements `O where .(O.P) = bool` into type implementing `O where .(O.P) = i32` [ConversionFailureFacetToFacet] // CHECK:STDERR: WithInteger(R); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_rewrites_mismatch_right.carbon:[[@LINE-6]]:23: note: initializing generic parameter `Q` declared here [InitializingGenericParam] - // CHECK:STDERR: fn WithInteger(unused Q:! O where .P = i32) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrites_mismatch_right.carbon:[[@LINE-6]]:31: note: initializing generic parameter `Q` declared here [InitializingGenericParam] + // CHECK:STDERR: fn WithInteger(unused generic Q: O where .P = i32) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: WithInteger(R); } @@ -98,19 +98,19 @@ fn WithBool(R:! O where .P = bool) { library "[[@TEST_NAME]]"; interface S { - let T:! type; - let U:! type; + let T: type; + let U: type; } -fn WithT(unused V:! S where .T = ()) {} +fn WithT(unused generic V: S where .T = ()) {} -fn WithU(W:! S where .U = ()) { +fn WithU(generic W: S where .U = ()) { // CHECK:STDERR: fail_rewrites_mismatch_left.carbon:[[@LINE+7]]:3: error: cannot convert type `W` that implements `S where .(S.U) = ()` into type implementing `S where .(S.T) = ()` [ConversionFailureFacetToFacet] // CHECK:STDERR: WithT(W); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_rewrites_mismatch_left.carbon:[[@LINE-6]]:17: note: initializing generic parameter `V` declared here [InitializingGenericParam] - // CHECK:STDERR: fn WithT(unused V:! S where .T = ()) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_rewrites_mismatch_left.carbon:[[@LINE-6]]:25: note: initializing generic parameter `V` declared here [InitializingGenericParam] + // CHECK:STDERR: fn WithT(unused generic V: S where .T = ()) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: WithT(W); } @@ -127,9 +127,9 @@ fn Calls() { // CHECK:STDERR: Equal(bool); // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: fail_import_rewrites.carbon:[[@LINE-7]]:1: in import [InImport] - // CHECK:STDERR: equal_constraint.carbon:9:10: note: initializing generic parameter `T` declared here [InitializingGenericParam] - // CHECK:STDERR: fn Equal(T:! N where .P = {}); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: equal_constraint.carbon:9:18: note: initializing generic parameter `T` declared here [InitializingGenericParam] + // CHECK:STDERR: fn Equal(generic T: N where .P = {}); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Equal(bool); @@ -137,9 +137,9 @@ fn Calls() { // CHECK:STDERR: NestedRewrite(i32); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_import_rewrites.carbon:[[@LINE-17]]:1: in import [InImport] - // CHECK:STDERR: nested_rewrites.carbon:10:18: note: initializing generic parameter `D` declared here [InitializingGenericParam] - // CHECK:STDERR: fn NestedRewrite(D:! (A where .B = bool) where .C = ()); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: nested_rewrites.carbon:10:26: note: initializing generic parameter `D` declared here [InitializingGenericParam] + // CHECK:STDERR: fn NestedRewrite(generic D: (A where .B = bool) where .C = ()); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: NestedRewrite(i32); } @@ -149,18 +149,18 @@ fn Calls() { library "[[@TEST_NAME]]"; interface I { - let Member:! type; + let Member: type; } // `2` can't be converted to the type of `I.Member` -// CHECK:STDERR: fail_check_rewrite_constraints.carbon:[[@LINE+7]]:46: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet] -// CHECK:STDERR: fn RewriteTypeMismatch(X:! I where .Member = 2); -// CHECK:STDERR: ^ -// CHECK:STDERR: fail_check_rewrite_constraints.carbon:[[@LINE+4]]:46: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] -// CHECK:STDERR: fn RewriteTypeMismatch(X:! I where .Member = 2); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_check_rewrite_constraints.carbon:[[@LINE+7]]:53: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet] +// CHECK:STDERR: fn RewriteTypeMismatch(generic X: I where .Member = 2); +// CHECK:STDERR: ^ +// CHECK:STDERR: fail_check_rewrite_constraints.carbon:[[@LINE+4]]:53: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext] +// CHECK:STDERR: fn RewriteTypeMismatch(generic X: I where .Member = 2); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn RewriteTypeMismatch(X:! I where .Member = 2); +fn RewriteTypeMismatch(generic X: I where .Member = 2); // --- fail_todo_let.carbon @@ -171,11 +171,11 @@ class D {} impl D as A {} fn F() { - // CHECK:STDERR: fail_todo_let.carbon:[[@LINE+4]]:7: error: semantics TODO: `local `let :!` bindings are currently unsupported` [SemanticsTodo] - // CHECK:STDERR: let E:! type where .Self impls A = D; - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_let.carbon:[[@LINE+4]]:15: error: semantics TODO: `local generic `let` bindings are currently unsupported` [SemanticsTodo] + // CHECK:STDERR: let generic E: type where .Self impls A = D; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - let E:! type where .Self impls A = D; + let generic E: type where .Self impls A = D; } // --- fail_todo_let_compile_time.carbon @@ -186,19 +186,19 @@ interface A {} class D {} impl D as A {} // TODO: Compile-time binding are not yet supported at file scope. -// CHECK:STDERR: fail_todo_let_compile_time.carbon:[[@LINE+4]]:5: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] -// CHECK:STDERR: let B:! type where .Self impls A = D; -// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_todo_let_compile_time.carbon:[[@LINE+4]]:13: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] +// CHECK:STDERR: let generic B: type where .Self impls A = D; +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -let B:! type where .Self impls A = D; +let generic B: type where .Self impls A = D; // --- fail_type_does_not_implement_where.carbon library "[[@TEST_NAME]]"; interface E { - let F:! type; - let G:! type; + let F: type; + let G: type; } // Testing how these types get stringified in error messages. @@ -248,42 +248,42 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %Equal.decl: %Equal.type = fn_decl @Equal [concrete = constants.%Equal] { -// CHECK:STDOUT: %T.patt.loc9_11.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_11.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc9_19.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_19.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_16.1: type = splice_block %.loc9_16.2 [concrete = constants.%N_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc9_11: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.2 [concrete = constants.%N_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc9_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %N.ref: type = name_ref N, file.%N.decl [concrete = constants.%N.type] -// CHECK:STDOUT: %.Self.frozen.loc9_16: %N.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.098] +// CHECK:STDOUT: %.Self.frozen.loc9_23: %N.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.098] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %N.ref [concrete] -// CHECK:STDOUT: %.Self.ref: %N.type = name_ref .Self, %.Self.frozen.loc9_16 [symbolic_self = constants.%.Self.frozen.098] +// CHECK:STDOUT: %.Self.ref: %N.type = name_ref .Self, %.Self.frozen.loc9_23 [symbolic_self = constants.%.Self.frozen.098] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc9_22: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc9_29: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %P.ref: %N.assoc_type = name_ref P, @P.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc9_22.1: type = impl_witness_access constants.%N.lookup_impl_witness.e97, element0 [symbolic_self = constants.%impl.elem0.892] -// CHECK:STDOUT: %.loc9_28.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc9_28.2: type = converted %.loc9_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] -// CHECK:STDOUT: %rewrite.loc9_25.1 = requirement_rewrite %impl.elem0.loc9_22.1, %.loc9_28.2 [concrete] -// CHECK:STDOUT: %impl.elem0.loc9_22.2: type = impl_witness_access constants.%N.lookup_impl_witness.98e, element0 [symbolic_self = constants.%impl.elem0.48c] -// CHECK:STDOUT: %rewrite.loc9_25.2 = requirement_rewrite %impl.elem0.loc9_22.2, %.loc9_28.2 [concrete] -// CHECK:STDOUT: %.loc9_16.2: type = where_expr [concrete = constants.%N_where.type] { +// CHECK:STDOUT: %impl.elem0.loc9_29.1: type = impl_witness_access constants.%N.lookup_impl_witness.e97, element0 [symbolic_self = constants.%impl.elem0.892] +// CHECK:STDOUT: %.loc9_35.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc9_35.2: type = converted %.loc9_35.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %rewrite.loc9_32.1 = requirement_rewrite %impl.elem0.loc9_29.1, %.loc9_35.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc9_29.2: type = impl_witness_access constants.%N.lookup_impl_witness.98e, element0 [symbolic_self = constants.%impl.elem0.48c] +// CHECK:STDOUT: %rewrite.loc9_32.2 = requirement_rewrite %impl.elem0.loc9_29.2, %.loc9_35.2 [concrete] +// CHECK:STDOUT: %.loc9_23.2: type = where_expr [concrete = constants.%N_where.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %N.ref [concrete] -// CHECK:STDOUT: %rewrite.loc9_25.2 = requirement_rewrite %impl.elem0.loc9_22.2, %.loc9_28.2 [concrete] +// CHECK:STDOUT: %rewrite.loc9_32.2 = requirement_rewrite %impl.elem0.loc9_29.2, %.loc9_35.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc9_11.2: %N_where.type = symbolic_binding T, 0 [symbolic = %T.loc9_11.1 (constants.%T)] +// CHECK:STDOUT: %T.loc9_19.2: %N_where.type = symbolic_binding T, 0 [symbolic = %T.loc9_19.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Equal(%T.loc9_11.2: %N_where.type) { -// CHECK:STDOUT: %T.patt.loc9_11.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_11.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc9_11.1: %N_where.type = symbolic_binding T, 0 [symbolic = %T.loc9_11.1 (constants.%T)] +// CHECK:STDOUT: generic fn @Equal(%T.loc9_19.2: %N_where.type) { +// CHECK:STDOUT: %T.patt.loc9_19.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_19.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.loc9_19.1: %N_where.type = symbolic_binding T, 0 [symbolic = %T.loc9_19.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Equal(constants.%T) { -// CHECK:STDOUT: %T.patt.loc9_11.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc9_11.1 => constants.%T +// CHECK:STDOUT: %T.patt.loc9_19.2 => constants.%T.patt +// CHECK:STDOUT: %T.loc9_19.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- nested_rewrites.carbon @@ -317,57 +317,57 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %NestedRewrite.decl: %NestedRewrite.type = fn_decl @NestedRewrite [concrete = constants.%NestedRewrite] { -// CHECK:STDOUT: %D.patt.loc10_19.1: %pattern_type = symbolic_binding_pattern D, 0 [symbolic = %D.patt.loc10_19.2 (constants.%D.patt)] +// CHECK:STDOUT: %D.patt.loc10_27.1: %pattern_type = symbolic_binding_pattern D, 0 [symbolic = %D.patt.loc10_27.2 (constants.%D.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_42.1: type = splice_block %.loc10_42.2 [concrete = constants.%A_where.type.0ba] { -// CHECK:STDOUT: %.Self.frozen.loc10_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc10_49.1: type = splice_block %.loc10_49.2 [concrete = constants.%A_where.type.0ba] { +// CHECK:STDOUT: %.Self.frozen.loc10_27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %.Self.frozen.loc10_25: %A.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.d4e] -// CHECK:STDOUT: %base_facet_type.loc10_25 = requirement_base_facet_type %A.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc10_31: %A.type = name_ref .Self, %.Self.frozen.loc10_25 [symbolic_self = constants.%.Self.frozen.d4e] -// CHECK:STDOUT: %.Self.as_type.loc10_31: type = facet_access_type %.Self.ref.loc10_31 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc10_31: type = converted %.Self.ref.loc10_31, %.Self.as_type.loc10_31 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.Self.frozen.loc10_32: %A.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.d4e] +// CHECK:STDOUT: %base_facet_type.loc10_32 = requirement_base_facet_type %A.ref [concrete] +// CHECK:STDOUT: %.Self.ref.loc10_38: %A.type = name_ref .Self, %.Self.frozen.loc10_32 [symbolic_self = constants.%.Self.frozen.d4e] +// CHECK:STDOUT: %.Self.as_type.loc10_38: type = facet_access_type %.Self.ref.loc10_38 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc10_38: type = converted %.Self.ref.loc10_38, %.Self.as_type.loc10_38 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %B.ref: %A.assoc_type = name_ref B, @B.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc10_31.1: type = impl_witness_access constants.%A.lookup_impl_witness.5db, element0 [symbolic_self = constants.%impl.elem0.6ea] -// CHECK:STDOUT: %.loc10_36: type = type_literal bool [concrete = bool] -// CHECK:STDOUT: %rewrite.loc10_34.1 = requirement_rewrite %impl.elem0.loc10_31.1, %.loc10_36 [concrete] -// CHECK:STDOUT: %impl.elem0.loc10_31.2: type = impl_witness_access constants.%A.lookup_impl_witness.937, element0 [symbolic_self = constants.%impl.elem0.0e0] -// CHECK:STDOUT: %rewrite.loc10_34.2 = requirement_rewrite %impl.elem0.loc10_31.2, %.loc10_36 [concrete] -// CHECK:STDOUT: %.loc10_25: type = where_expr [concrete = constants.%A_where.type.beb] { -// CHECK:STDOUT: %base_facet_type.loc10_25 = requirement_base_facet_type %A.ref [concrete] -// CHECK:STDOUT: %rewrite.loc10_34.2 = requirement_rewrite %impl.elem0.loc10_31.2, %.loc10_36 [concrete] +// CHECK:STDOUT: %impl.elem0.loc10_38.1: type = impl_witness_access constants.%A.lookup_impl_witness.5db, element0 [symbolic_self = constants.%impl.elem0.6ea] +// CHECK:STDOUT: %.loc10_43: type = type_literal bool [concrete = bool] +// CHECK:STDOUT: %rewrite.loc10_41.1 = requirement_rewrite %impl.elem0.loc10_38.1, %.loc10_43 [concrete] +// CHECK:STDOUT: %impl.elem0.loc10_38.2: type = impl_witness_access constants.%A.lookup_impl_witness.937, element0 [symbolic_self = constants.%impl.elem0.0e0] +// CHECK:STDOUT: %rewrite.loc10_41.2 = requirement_rewrite %impl.elem0.loc10_38.2, %.loc10_43 [concrete] +// CHECK:STDOUT: %.loc10_32: type = where_expr [concrete = constants.%A_where.type.beb] { +// CHECK:STDOUT: %base_facet_type.loc10_32 = requirement_base_facet_type %A.ref [concrete] +// CHECK:STDOUT: %rewrite.loc10_41.2 = requirement_rewrite %impl.elem0.loc10_38.2, %.loc10_43 [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %.Self.frozen.loc10_42: %A.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.d4e] -// CHECK:STDOUT: %base_facet_type.loc10_42 = requirement_base_facet_type %.loc10_25 [concrete] -// CHECK:STDOUT: %.Self.ref.loc10_48: %A.type = name_ref .Self, %.Self.frozen.loc10_42 [symbolic_self = constants.%.Self.frozen.d4e] -// CHECK:STDOUT: %.Self.as_type.loc10_48: type = facet_access_type %.Self.ref.loc10_48 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc10_48: type = converted %.Self.ref.loc10_48, %.Self.as_type.loc10_48 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.Self.frozen.loc10_49: %A.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.d4e] +// CHECK:STDOUT: %base_facet_type.loc10_49 = requirement_base_facet_type %.loc10_32 [concrete] +// CHECK:STDOUT: %.Self.ref.loc10_55: %A.type = name_ref .Self, %.Self.frozen.loc10_49 [symbolic_self = constants.%.Self.frozen.d4e] +// CHECK:STDOUT: %.Self.as_type.loc10_55: type = facet_access_type %.Self.ref.loc10_55 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc10_55: type = converted %.Self.ref.loc10_55, %.Self.as_type.loc10_55 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %C.ref: %A.assoc_type = name_ref C, @C.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc10_48.1: type = impl_witness_access constants.%A.lookup_impl_witness.5db, element1 [symbolic_self = constants.%impl.elem1.06a] -// CHECK:STDOUT: %.loc10_54.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc10_54.2: type = converted %.loc10_54.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %rewrite.loc10_51.1 = requirement_rewrite %impl.elem1.loc10_48.1, %.loc10_54.2 [concrete] -// CHECK:STDOUT: %impl.elem1.loc10_48.2: type = impl_witness_access constants.%A.lookup_impl_witness.937, element1 [symbolic_self = constants.%impl.elem1.844] -// CHECK:STDOUT: %rewrite.loc10_51.2 = requirement_rewrite %impl.elem1.loc10_48.2, %.loc10_54.2 [concrete] -// CHECK:STDOUT: %.loc10_42.2: type = where_expr [concrete = constants.%A_where.type.0ba] { -// CHECK:STDOUT: %base_facet_type.loc10_42 = requirement_base_facet_type %.loc10_25 [concrete] -// CHECK:STDOUT: %rewrite.loc10_51.2 = requirement_rewrite %impl.elem1.loc10_48.2, %.loc10_54.2 [concrete] +// CHECK:STDOUT: %impl.elem1.loc10_55.1: type = impl_witness_access constants.%A.lookup_impl_witness.5db, element1 [symbolic_self = constants.%impl.elem1.06a] +// CHECK:STDOUT: %.loc10_61.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc10_61.2: type = converted %.loc10_61.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %rewrite.loc10_58.1 = requirement_rewrite %impl.elem1.loc10_55.1, %.loc10_61.2 [concrete] +// CHECK:STDOUT: %impl.elem1.loc10_55.2: type = impl_witness_access constants.%A.lookup_impl_witness.937, element1 [symbolic_self = constants.%impl.elem1.844] +// CHECK:STDOUT: %rewrite.loc10_58.2 = requirement_rewrite %impl.elem1.loc10_55.2, %.loc10_61.2 [concrete] +// CHECK:STDOUT: %.loc10_49.2: type = where_expr [concrete = constants.%A_where.type.0ba] { +// CHECK:STDOUT: %base_facet_type.loc10_49 = requirement_base_facet_type %.loc10_32 [concrete] +// CHECK:STDOUT: %rewrite.loc10_58.2 = requirement_rewrite %impl.elem1.loc10_55.2, %.loc10_61.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %D.loc10_19.2: %A_where.type.0ba = symbolic_binding D, 0 [symbolic = %D.loc10_19.1 (constants.%D)] +// CHECK:STDOUT: %D.loc10_27.2: %A_where.type.0ba = symbolic_binding D, 0 [symbolic = %D.loc10_27.1 (constants.%D)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NestedRewrite(%D.loc10_19.2: %A_where.type.0ba) { -// CHECK:STDOUT: %D.patt.loc10_19.2: %pattern_type = symbolic_binding_pattern D, 0 [symbolic = %D.patt.loc10_19.2 (constants.%D.patt)] -// CHECK:STDOUT: %D.loc10_19.1: %A_where.type.0ba = symbolic_binding D, 0 [symbolic = %D.loc10_19.1 (constants.%D)] +// CHECK:STDOUT: generic fn @NestedRewrite(%D.loc10_27.2: %A_where.type.0ba) { +// CHECK:STDOUT: %D.patt.loc10_27.2: %pattern_type = symbolic_binding_pattern D, 0 [symbolic = %D.patt.loc10_27.2 (constants.%D.patt)] +// CHECK:STDOUT: %D.loc10_27.1: %A_where.type.0ba = symbolic_binding D, 0 [symbolic = %D.loc10_27.1 (constants.%D)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @NestedRewrite(constants.%D) { -// CHECK:STDOUT: %D.patt.loc10_19.2 => constants.%D.patt -// CHECK:STDOUT: %D.loc10_19.1 => constants.%D +// CHECK:STDOUT: %D.patt.loc10_27.2 => constants.%D.patt +// CHECK:STDOUT: %D.loc10_27.1 => constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- repeated_rewrite.carbon @@ -403,70 +403,70 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %OneRewrite.decl: %OneRewrite.type = fn_decl @OneRewrite [concrete = constants.%OneRewrite] { -// CHECK:STDOUT: %G.patt.loc9_23.1: %pattern_type.b73 = symbolic_binding_pattern G, 0 [symbolic = %G.patt.loc9_23.2 (constants.%G.patt)] +// CHECK:STDOUT: %G.patt.loc9_31.1: %pattern_type.b73 = symbolic_binding_pattern G, 0 [symbolic = %G.patt.loc9_31.2 (constants.%G.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_28.1: type = splice_block %.loc9_28.2 [concrete = constants.%E_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc9_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc9_35.1: type = splice_block %.loc9_35.2 [concrete = constants.%E_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc9_31: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [concrete = constants.%E.type] -// CHECK:STDOUT: %.Self.frozen.loc9_28: %E.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.64b] +// CHECK:STDOUT: %.Self.frozen.loc9_35: %E.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.64b] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %E.ref [concrete] -// CHECK:STDOUT: %.Self.ref: %E.type = name_ref .Self, %.Self.frozen.loc9_28 [symbolic_self = constants.%.Self.frozen.64b] +// CHECK:STDOUT: %.Self.ref: %E.type = name_ref .Self, %.Self.frozen.loc9_35 [symbolic_self = constants.%.Self.frozen.64b] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc9_34: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc9_41: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %F.ref: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc9_34.1: type = impl_witness_access constants.%E.lookup_impl_witness.b1b, element0 [symbolic_self = constants.%impl.elem0.efe] +// CHECK:STDOUT: %impl.elem0.loc9_41.1: type = impl_witness_access constants.%E.lookup_impl_witness.b1b, element0 [symbolic_self = constants.%impl.elem0.efe] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %rewrite.loc9_37.1 = requirement_rewrite %impl.elem0.loc9_34.1, %i32 [concrete] -// CHECK:STDOUT: %impl.elem0.loc9_34.2: type = impl_witness_access constants.%E.lookup_impl_witness.8bd, element0 [symbolic_self = constants.%impl.elem0.554] -// CHECK:STDOUT: %rewrite.loc9_37.2 = requirement_rewrite %impl.elem0.loc9_34.2, %i32 [concrete] -// CHECK:STDOUT: %.loc9_28.2: type = where_expr [concrete = constants.%E_where.type] { +// CHECK:STDOUT: %rewrite.loc9_44.1 = requirement_rewrite %impl.elem0.loc9_41.1, %i32 [concrete] +// CHECK:STDOUT: %impl.elem0.loc9_41.2: type = impl_witness_access constants.%E.lookup_impl_witness.8bd, element0 [symbolic_self = constants.%impl.elem0.554] +// CHECK:STDOUT: %rewrite.loc9_44.2 = requirement_rewrite %impl.elem0.loc9_41.2, %i32 [concrete] +// CHECK:STDOUT: %.loc9_35.2: type = where_expr [concrete = constants.%E_where.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %E.ref [concrete] -// CHECK:STDOUT: %rewrite.loc9_37.2 = requirement_rewrite %impl.elem0.loc9_34.2, %i32 [concrete] +// CHECK:STDOUT: %rewrite.loc9_44.2 = requirement_rewrite %impl.elem0.loc9_41.2, %i32 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %G.loc9_23.2: %E_where.type = symbolic_binding G, 0 [symbolic = %G.loc9_23.1 (constants.%G)] +// CHECK:STDOUT: %G.loc9_31.2: %E_where.type = symbolic_binding G, 0 [symbolic = %G.loc9_31.1 (constants.%G)] // CHECK:STDOUT: } // CHECK:STDOUT: %RepeatedRewrite.decl: %RepeatedRewrite.type = fn_decl @RepeatedRewrite [concrete = constants.%RepeatedRewrite] { -// CHECK:STDOUT: %H.patt.loc11_21.1: %pattern_type.b73 = symbolic_binding_pattern H, 0 [symbolic = %H.patt.loc11_21.2 (constants.%H.patt)] +// CHECK:STDOUT: %H.patt.loc11_29.1: %pattern_type.b73 = symbolic_binding_pattern H, 0 [symbolic = %H.patt.loc11_29.2 (constants.%H.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_26.1: type = splice_block %.loc11_26.2 [concrete = constants.%E_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc11_21: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc11_33.1: type = splice_block %.loc11_33.2 [concrete = constants.%E_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc11_29: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [concrete = constants.%E.type] -// CHECK:STDOUT: %.Self.frozen.loc11_26: %E.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.64b] +// CHECK:STDOUT: %.Self.frozen.loc11_33: %E.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.64b] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %E.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc11_32: %E.type = name_ref .Self, %.Self.frozen.loc11_26 [symbolic_self = constants.%.Self.frozen.64b] -// CHECK:STDOUT: %.Self.as_type.loc11_32: type = facet_access_type %.Self.ref.loc11_32 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc11_32: type = converted %.Self.ref.loc11_32, %.Self.as_type.loc11_32 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %F.ref.loc11_32: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc11_32.1: type = impl_witness_access constants.%E.lookup_impl_witness.b1b, element0 [symbolic_self = constants.%impl.elem0.efe] -// CHECK:STDOUT: %i32.loc11_37: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %rewrite.loc11_35.1 = requirement_rewrite %impl.elem0.loc11_32.1, %i32.loc11_37 [concrete] -// CHECK:STDOUT: %.Self.ref.loc11_45: %E.type = name_ref .Self, %.Self.frozen.loc11_26 [symbolic_self = constants.%.Self.frozen.64b] -// CHECK:STDOUT: %.Self.as_type.loc11_45: type = facet_access_type %.Self.ref.loc11_45 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc11_45: type = converted %.Self.ref.loc11_45, %.Self.as_type.loc11_45 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %F.ref.loc11_45: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc11_45.1: type = impl_witness_access constants.%E.lookup_impl_witness.b1b, element0 [symbolic_self = constants.%impl.elem0.efe] -// CHECK:STDOUT: %impl.elem0.subst.loc11_45.1: type = impl_witness_access_substituted %impl.elem0.loc11_45.1, %i32.loc11_37 [concrete = constants.%i32] -// CHECK:STDOUT: %i32.loc11_50: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %rewrite.loc11_48.1 = requirement_rewrite %impl.elem0.subst.loc11_45.1, %i32.loc11_50 [concrete] -// CHECK:STDOUT: %impl.elem0.loc11_32.2: type = impl_witness_access constants.%E.lookup_impl_witness.8bd, element0 [symbolic_self = constants.%impl.elem0.554] -// CHECK:STDOUT: %rewrite.loc11_35.2 = requirement_rewrite %impl.elem0.loc11_32.2, %i32.loc11_37 [concrete] -// CHECK:STDOUT: %impl.elem0.loc11_45.2: type = impl_witness_access constants.%E.lookup_impl_witness.8bd, element0 [symbolic_self = constants.%impl.elem0.554] -// CHECK:STDOUT: %impl.elem0.subst.loc11_45.2: type = impl_witness_access_substituted %impl.elem0.loc11_45.2, %i32.loc11_37 [concrete = constants.%i32] -// CHECK:STDOUT: %rewrite.loc11_48.2 = requirement_rewrite %impl.elem0.subst.loc11_45.2, %i32.loc11_50 [concrete] -// CHECK:STDOUT: %.loc11_26.2: type = where_expr [concrete = constants.%E_where.type] { +// CHECK:STDOUT: %.Self.ref.loc11_39: %E.type = name_ref .Self, %.Self.frozen.loc11_33 [symbolic_self = constants.%.Self.frozen.64b] +// CHECK:STDOUT: %.Self.as_type.loc11_39: type = facet_access_type %.Self.ref.loc11_39 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc11_39: type = converted %.Self.ref.loc11_39, %.Self.as_type.loc11_39 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %F.ref.loc11_39: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc11_39.1: type = impl_witness_access constants.%E.lookup_impl_witness.b1b, element0 [symbolic_self = constants.%impl.elem0.efe] +// CHECK:STDOUT: %i32.loc11_44: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %rewrite.loc11_42.1 = requirement_rewrite %impl.elem0.loc11_39.1, %i32.loc11_44 [concrete] +// CHECK:STDOUT: %.Self.ref.loc11_52: %E.type = name_ref .Self, %.Self.frozen.loc11_33 [symbolic_self = constants.%.Self.frozen.64b] +// CHECK:STDOUT: %.Self.as_type.loc11_52: type = facet_access_type %.Self.ref.loc11_52 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc11_52: type = converted %.Self.ref.loc11_52, %.Self.as_type.loc11_52 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %F.ref.loc11_52: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc11_52.1: type = impl_witness_access constants.%E.lookup_impl_witness.b1b, element0 [symbolic_self = constants.%impl.elem0.efe] +// CHECK:STDOUT: %impl.elem0.subst.loc11_52.1: type = impl_witness_access_substituted %impl.elem0.loc11_52.1, %i32.loc11_44 [concrete = constants.%i32] +// CHECK:STDOUT: %i32.loc11_57: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %rewrite.loc11_55.1 = requirement_rewrite %impl.elem0.subst.loc11_52.1, %i32.loc11_57 [concrete] +// CHECK:STDOUT: %impl.elem0.loc11_39.2: type = impl_witness_access constants.%E.lookup_impl_witness.8bd, element0 [symbolic_self = constants.%impl.elem0.554] +// CHECK:STDOUT: %rewrite.loc11_42.2 = requirement_rewrite %impl.elem0.loc11_39.2, %i32.loc11_44 [concrete] +// CHECK:STDOUT: %impl.elem0.loc11_52.2: type = impl_witness_access constants.%E.lookup_impl_witness.8bd, element0 [symbolic_self = constants.%impl.elem0.554] +// CHECK:STDOUT: %impl.elem0.subst.loc11_52.2: type = impl_witness_access_substituted %impl.elem0.loc11_52.2, %i32.loc11_44 [concrete = constants.%i32] +// CHECK:STDOUT: %rewrite.loc11_55.2 = requirement_rewrite %impl.elem0.subst.loc11_52.2, %i32.loc11_57 [concrete] +// CHECK:STDOUT: %.loc11_33.2: type = where_expr [concrete = constants.%E_where.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %E.ref [concrete] -// CHECK:STDOUT: %rewrite.loc11_35.2 = requirement_rewrite %impl.elem0.loc11_32.2, %i32.loc11_37 [concrete] -// CHECK:STDOUT: %rewrite.loc11_48.2 = requirement_rewrite %impl.elem0.subst.loc11_45.2, %i32.loc11_50 [concrete] +// CHECK:STDOUT: %rewrite.loc11_42.2 = requirement_rewrite %impl.elem0.loc11_39.2, %i32.loc11_44 [concrete] +// CHECK:STDOUT: %rewrite.loc11_55.2 = requirement_rewrite %impl.elem0.subst.loc11_52.2, %i32.loc11_57 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %H.loc11_21.2: %E_where.type = symbolic_binding H, 0 [symbolic = %H.loc11_21.1 (constants.%H)] +// CHECK:STDOUT: %H.loc11_29.2: %E_where.type = symbolic_binding H, 0 [symbolic = %H.loc11_29.1 (constants.%H)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @OneRewrite(%G.loc9_23.2: %E_where.type) { -// CHECK:STDOUT: %G.patt.loc9_23.2: %pattern_type.b73 = symbolic_binding_pattern G, 0 [symbolic = %G.patt.loc9_23.2 (constants.%G.patt)] -// CHECK:STDOUT: %G.loc9_23.1: %E_where.type = symbolic_binding G, 0 [symbolic = %G.loc9_23.1 (constants.%G)] +// CHECK:STDOUT: generic fn @OneRewrite(%G.loc9_31.2: %E_where.type) { +// CHECK:STDOUT: %G.patt.loc9_31.2: %pattern_type.b73 = symbolic_binding_pattern G, 0 [symbolic = %G.patt.loc9_31.2 (constants.%G.patt)] +// CHECK:STDOUT: %G.loc9_31.1: %E_where.type = symbolic_binding G, 0 [symbolic = %G.loc9_31.1 (constants.%G)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -478,9 +478,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @RepeatedRewrite(%H.loc11_21.2: %E_where.type) { -// CHECK:STDOUT: %H.patt.loc11_21.2: %pattern_type.b73 = symbolic_binding_pattern H, 0 [symbolic = %H.patt.loc11_21.2 (constants.%H.patt)] -// CHECK:STDOUT: %H.loc11_21.1: %E_where.type = symbolic_binding H, 0 [symbolic = %H.loc11_21.1 (constants.%H)] +// CHECK:STDOUT: generic fn @RepeatedRewrite(%H.loc11_29.2: %E_where.type) { +// CHECK:STDOUT: %H.patt.loc11_29.2: %pattern_type.b73 = symbolic_binding_pattern H, 0 [symbolic = %H.patt.loc11_29.2 (constants.%H.patt)] +// CHECK:STDOUT: %H.loc11_29.1: %E_where.type = symbolic_binding H, 0 [symbolic = %H.loc11_29.1 (constants.%H)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -494,33 +494,33 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @OneRewrite(constants.%G) { -// CHECK:STDOUT: %G.patt.loc9_23.2 => constants.%G.patt -// CHECK:STDOUT: %G.loc9_23.1 => constants.%G +// CHECK:STDOUT: %G.patt.loc9_31.2 => constants.%G.patt +// CHECK:STDOUT: %G.loc9_31.1 => constants.%G // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @RepeatedRewrite(constants.%H) { -// CHECK:STDOUT: %H.patt.loc11_21.2 => constants.%H.patt -// CHECK:STDOUT: %H.loc11_21.1 => constants.%H +// CHECK:STDOUT: %H.patt.loc11_29.2 => constants.%H.patt +// CHECK:STDOUT: %H.loc11_29.1 => constants.%H // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @OneRewrite(constants.%H) { -// CHECK:STDOUT: %G.patt.loc9_23.2 => constants.%G.patt -// CHECK:STDOUT: %G.loc9_23.1 => constants.%H +// CHECK:STDOUT: %G.patt.loc9_31.2 => constants.%G.patt +// CHECK:STDOUT: %G.loc9_31.1 => constants.%H // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @RepeatedRewrite(constants.%I) { -// CHECK:STDOUT: %H.patt.loc11_21.2 => constants.%H.patt -// CHECK:STDOUT: %H.loc11_21.1 => constants.%I +// CHECK:STDOUT: %H.patt.loc11_29.2 => constants.%H.patt +// CHECK:STDOUT: %H.loc11_29.1 => constants.%I // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %OneRewrite.specific_fn.loc13_3.2 => constants.%OneRewrite.specific_fn.ba0394.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @OneRewrite(constants.%I) { -// CHECK:STDOUT: %G.patt.loc9_23.2 => constants.%G.patt -// CHECK:STDOUT: %G.loc9_23.1 => constants.%I +// CHECK:STDOUT: %G.patt.loc9_31.2 => constants.%G.patt +// CHECK:STDOUT: %G.loc9_31.1 => constants.%I // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -559,80 +559,80 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %Alphabetical.decl: %Alphabetical.type = fn_decl @Alphabetical [concrete = constants.%Alphabetical] { -// CHECK:STDOUT: %M.patt.loc10_25.1: %pattern_type = symbolic_binding_pattern M, 0 [symbolic = %M.patt.loc10_25.2 (constants.%M.patt)] +// CHECK:STDOUT: %M.patt.loc10_33.1: %pattern_type = symbolic_binding_pattern M, 0 [symbolic = %M.patt.loc10_33.2 (constants.%M.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_30.1: type = splice_block %.loc10_30.2 [concrete = constants.%J_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc10_25: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc10_37.1: type = splice_block %.loc10_37.2 [concrete = constants.%J_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc10_33: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self.frozen.loc10_30: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.99c] +// CHECK:STDOUT: %.Self.frozen.loc10_37: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.99c] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %J.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc10_36: %J.type = name_ref .Self, %.Self.frozen.loc10_30 [symbolic_self = constants.%.Self.frozen.99c] -// CHECK:STDOUT: %.Self.as_type.loc10_36: type = facet_access_type %.Self.ref.loc10_36 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc10_36: type = converted %.Self.ref.loc10_36, %.Self.as_type.loc10_36 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.Self.ref.loc10_43: %J.type = name_ref .Self, %.Self.frozen.loc10_37 [symbolic_self = constants.%.Self.frozen.99c] +// CHECK:STDOUT: %.Self.as_type.loc10_43: type = facet_access_type %.Self.ref.loc10_43 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc10_43: type = converted %.Self.ref.loc10_43, %.Self.as_type.loc10_43 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %K.ref: %J.assoc_type = name_ref K, @K.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc10_36.1: type = impl_witness_access constants.%J.lookup_impl_witness.cb1, element0 [symbolic_self = constants.%impl.elem0.221] -// CHECK:STDOUT: %.loc10_42.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc10_42.2: type = converted %.loc10_42.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %rewrite.loc10_39.1 = requirement_rewrite %impl.elem0.loc10_36.1, %.loc10_42.2 [concrete] -// CHECK:STDOUT: %.Self.ref.loc10_48: %J.type = name_ref .Self, %.Self.frozen.loc10_30 [symbolic_self = constants.%.Self.frozen.99c] -// CHECK:STDOUT: %.Self.as_type.loc10_48: type = facet_access_type %.Self.ref.loc10_48 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc10_48: type = converted %.Self.ref.loc10_48, %.Self.as_type.loc10_48 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %impl.elem0.loc10_43.1: type = impl_witness_access constants.%J.lookup_impl_witness.cb1, element0 [symbolic_self = constants.%impl.elem0.221] +// CHECK:STDOUT: %.loc10_49.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc10_49.2: type = converted %.loc10_49.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %rewrite.loc10_46.1 = requirement_rewrite %impl.elem0.loc10_43.1, %.loc10_49.2 [concrete] +// CHECK:STDOUT: %.Self.ref.loc10_55: %J.type = name_ref .Self, %.Self.frozen.loc10_37 [symbolic_self = constants.%.Self.frozen.99c] +// CHECK:STDOUT: %.Self.as_type.loc10_55: type = facet_access_type %.Self.ref.loc10_55 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc10_55: type = converted %.Self.ref.loc10_55, %.Self.as_type.loc10_55 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %L.ref: %J.assoc_type = name_ref L, @L.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc10_48.1: type = impl_witness_access constants.%J.lookup_impl_witness.cb1, element1 [symbolic_self = constants.%impl.elem1.eed] -// CHECK:STDOUT: %.loc10_53: type = type_literal bool [concrete = bool] -// CHECK:STDOUT: %rewrite.loc10_51.1 = requirement_rewrite %impl.elem1.loc10_48.1, %.loc10_53 [concrete] -// CHECK:STDOUT: %impl.elem0.loc10_36.2: type = impl_witness_access constants.%J.lookup_impl_witness.df8, element0 [symbolic_self = constants.%impl.elem0.bbd] -// CHECK:STDOUT: %rewrite.loc10_39.2 = requirement_rewrite %impl.elem0.loc10_36.2, %.loc10_42.2 [concrete] -// CHECK:STDOUT: %impl.elem1.loc10_48.2: type = impl_witness_access constants.%J.lookup_impl_witness.df8, element1 [symbolic_self = constants.%impl.elem1.fb5] -// CHECK:STDOUT: %rewrite.loc10_51.2 = requirement_rewrite %impl.elem1.loc10_48.2, %.loc10_53 [concrete] -// CHECK:STDOUT: %.loc10_30.2: type = where_expr [concrete = constants.%J_where.type] { +// CHECK:STDOUT: %impl.elem1.loc10_55.1: type = impl_witness_access constants.%J.lookup_impl_witness.cb1, element1 [symbolic_self = constants.%impl.elem1.eed] +// CHECK:STDOUT: %.loc10_60: type = type_literal bool [concrete = bool] +// CHECK:STDOUT: %rewrite.loc10_58.1 = requirement_rewrite %impl.elem1.loc10_55.1, %.loc10_60 [concrete] +// CHECK:STDOUT: %impl.elem0.loc10_43.2: type = impl_witness_access constants.%J.lookup_impl_witness.df8, element0 [symbolic_self = constants.%impl.elem0.bbd] +// CHECK:STDOUT: %rewrite.loc10_46.2 = requirement_rewrite %impl.elem0.loc10_43.2, %.loc10_49.2 [concrete] +// CHECK:STDOUT: %impl.elem1.loc10_55.2: type = impl_witness_access constants.%J.lookup_impl_witness.df8, element1 [symbolic_self = constants.%impl.elem1.fb5] +// CHECK:STDOUT: %rewrite.loc10_58.2 = requirement_rewrite %impl.elem1.loc10_55.2, %.loc10_60 [concrete] +// CHECK:STDOUT: %.loc10_37.2: type = where_expr [concrete = constants.%J_where.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %J.ref [concrete] -// CHECK:STDOUT: %rewrite.loc10_39.2 = requirement_rewrite %impl.elem0.loc10_36.2, %.loc10_42.2 [concrete] -// CHECK:STDOUT: %rewrite.loc10_51.2 = requirement_rewrite %impl.elem1.loc10_48.2, %.loc10_53 [concrete] +// CHECK:STDOUT: %rewrite.loc10_46.2 = requirement_rewrite %impl.elem0.loc10_43.2, %.loc10_49.2 [concrete] +// CHECK:STDOUT: %rewrite.loc10_58.2 = requirement_rewrite %impl.elem1.loc10_55.2, %.loc10_60 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %M.loc10_25.2: %J_where.type = symbolic_binding M, 0 [symbolic = %M.loc10_25.1 (constants.%M)] +// CHECK:STDOUT: %M.loc10_33.2: %J_where.type = symbolic_binding M, 0 [symbolic = %M.loc10_33.1 (constants.%M)] // CHECK:STDOUT: } // CHECK:STDOUT: %Reversed.decl: %Reversed.type = fn_decl @Reversed [concrete = constants.%Reversed] { -// CHECK:STDOUT: %N.patt.loc12_14.1: %pattern_type = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc12_14.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.patt.loc12_22.1: %pattern_type = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc12_22.2 (constants.%N.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_19.1: type = splice_block %.loc12_19.2 [concrete = constants.%J_where.type] { -// CHECK:STDOUT: %.Self.frozen.loc12_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] +// CHECK:STDOUT: %.loc12_26.1: type = splice_block %.loc12_26.2 [concrete = constants.%J_where.type] { +// CHECK:STDOUT: %.Self.frozen.loc12_22: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %.Self.frozen.loc12_19: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.99c] +// CHECK:STDOUT: %.Self.frozen.loc12_26: %J.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.99c] // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %J.ref [concrete] -// CHECK:STDOUT: %.Self.ref.loc12_25: %J.type = name_ref .Self, %.Self.frozen.loc12_19 [symbolic_self = constants.%.Self.frozen.99c] -// CHECK:STDOUT: %.Self.as_type.loc12_25: type = facet_access_type %.Self.ref.loc12_25 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc12_25: type = converted %.Self.ref.loc12_25, %.Self.as_type.loc12_25 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.Self.ref.loc12_32: %J.type = name_ref .Self, %.Self.frozen.loc12_26 [symbolic_self = constants.%.Self.frozen.99c] +// CHECK:STDOUT: %.Self.as_type.loc12_32: type = facet_access_type %.Self.ref.loc12_32 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc12_32: type = converted %.Self.ref.loc12_32, %.Self.as_type.loc12_32 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %L.ref: %J.assoc_type = name_ref L, @L.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc12_25.1: type = impl_witness_access constants.%J.lookup_impl_witness.cb1, element1 [symbolic_self = constants.%impl.elem1.eed] -// CHECK:STDOUT: %.loc12_30: type = type_literal bool [concrete = bool] -// CHECK:STDOUT: %rewrite.loc12_28.1 = requirement_rewrite %impl.elem1.loc12_25.1, %.loc12_30 [concrete] -// CHECK:STDOUT: %.Self.ref.loc12_39: %J.type = name_ref .Self, %.Self.frozen.loc12_19 [symbolic_self = constants.%.Self.frozen.99c] -// CHECK:STDOUT: %.Self.as_type.loc12_39: type = facet_access_type %.Self.ref.loc12_39 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %.loc12_39: type = converted %.Self.ref.loc12_39, %.Self.as_type.loc12_39 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %impl.elem1.loc12_32.1: type = impl_witness_access constants.%J.lookup_impl_witness.cb1, element1 [symbolic_self = constants.%impl.elem1.eed] +// CHECK:STDOUT: %.loc12_37: type = type_literal bool [concrete = bool] +// CHECK:STDOUT: %rewrite.loc12_35.1 = requirement_rewrite %impl.elem1.loc12_32.1, %.loc12_37 [concrete] +// CHECK:STDOUT: %.Self.ref.loc12_46: %J.type = name_ref .Self, %.Self.frozen.loc12_26 [symbolic_self = constants.%.Self.frozen.99c] +// CHECK:STDOUT: %.Self.as_type.loc12_46: type = facet_access_type %.Self.ref.loc12_46 [symbolic_self = constants.%.Self.frozen.as_type] +// CHECK:STDOUT: %.loc12_46: type = converted %.Self.ref.loc12_46, %.Self.as_type.loc12_46 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %K.ref: %J.assoc_type = name_ref K, @K.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc12_39.1: type = impl_witness_access constants.%J.lookup_impl_witness.cb1, element0 [symbolic_self = constants.%impl.elem0.221] -// CHECK:STDOUT: %.loc12_45.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc12_45.2: type = converted %.loc12_45.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %rewrite.loc12_42.1 = requirement_rewrite %impl.elem0.loc12_39.1, %.loc12_45.2 [concrete] -// CHECK:STDOUT: %impl.elem1.loc12_25.2: type = impl_witness_access constants.%J.lookup_impl_witness.df8, element1 [symbolic_self = constants.%impl.elem1.fb5] -// CHECK:STDOUT: %rewrite.loc12_28.2 = requirement_rewrite %impl.elem1.loc12_25.2, %.loc12_30 [concrete] -// CHECK:STDOUT: %impl.elem0.loc12_39.2: type = impl_witness_access constants.%J.lookup_impl_witness.df8, element0 [symbolic_self = constants.%impl.elem0.bbd] -// CHECK:STDOUT: %rewrite.loc12_42.2 = requirement_rewrite %impl.elem0.loc12_39.2, %.loc12_45.2 [concrete] -// CHECK:STDOUT: %.loc12_19.2: type = where_expr [concrete = constants.%J_where.type] { +// CHECK:STDOUT: %impl.elem0.loc12_46.1: type = impl_witness_access constants.%J.lookup_impl_witness.cb1, element0 [symbolic_self = constants.%impl.elem0.221] +// CHECK:STDOUT: %.loc12_52.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc12_52.2: type = converted %.loc12_52.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] +// CHECK:STDOUT: %rewrite.loc12_49.1 = requirement_rewrite %impl.elem0.loc12_46.1, %.loc12_52.2 [concrete] +// CHECK:STDOUT: %impl.elem1.loc12_32.2: type = impl_witness_access constants.%J.lookup_impl_witness.df8, element1 [symbolic_self = constants.%impl.elem1.fb5] +// CHECK:STDOUT: %rewrite.loc12_35.2 = requirement_rewrite %impl.elem1.loc12_32.2, %.loc12_37 [concrete] +// CHECK:STDOUT: %impl.elem0.loc12_46.2: type = impl_witness_access constants.%J.lookup_impl_witness.df8, element0 [symbolic_self = constants.%impl.elem0.bbd] +// CHECK:STDOUT: %rewrite.loc12_49.2 = requirement_rewrite %impl.elem0.loc12_46.2, %.loc12_52.2 [concrete] +// CHECK:STDOUT: %.loc12_26.2: type = where_expr [concrete = constants.%J_where.type] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %J.ref [concrete] -// CHECK:STDOUT: %rewrite.loc12_28.2 = requirement_rewrite %impl.elem1.loc12_25.2, %.loc12_30 [concrete] -// CHECK:STDOUT: %rewrite.loc12_42.2 = requirement_rewrite %impl.elem0.loc12_39.2, %.loc12_45.2 [concrete] +// CHECK:STDOUT: %rewrite.loc12_35.2 = requirement_rewrite %impl.elem1.loc12_32.2, %.loc12_37 [concrete] +// CHECK:STDOUT: %rewrite.loc12_49.2 = requirement_rewrite %impl.elem0.loc12_46.2, %.loc12_52.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %N.loc12_14.2: %J_where.type = symbolic_binding N, 0 [symbolic = %N.loc12_14.1 (constants.%N)] +// CHECK:STDOUT: %N.loc12_22.2: %J_where.type = symbolic_binding N, 0 [symbolic = %N.loc12_22.1 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Alphabetical(%M.loc10_25.2: %J_where.type) { -// CHECK:STDOUT: %M.patt.loc10_25.2: %pattern_type = symbolic_binding_pattern M, 0 [symbolic = %M.patt.loc10_25.2 (constants.%M.patt)] -// CHECK:STDOUT: %M.loc10_25.1: %J_where.type = symbolic_binding M, 0 [symbolic = %M.loc10_25.1 (constants.%M)] +// CHECK:STDOUT: generic fn @Alphabetical(%M.loc10_33.2: %J_where.type) { +// CHECK:STDOUT: %M.patt.loc10_33.2: %pattern_type = symbolic_binding_pattern M, 0 [symbolic = %M.patt.loc10_33.2 (constants.%M.patt)] +// CHECK:STDOUT: %M.loc10_33.1: %J_where.type = symbolic_binding M, 0 [symbolic = %M.loc10_33.1 (constants.%M)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -644,9 +644,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Reversed(%N.loc12_14.2: %J_where.type) { -// CHECK:STDOUT: %N.patt.loc12_14.2: %pattern_type = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc12_14.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.loc12_14.1: %J_where.type = symbolic_binding N, 0 [symbolic = %N.loc12_14.1 (constants.%N)] +// CHECK:STDOUT: generic fn @Reversed(%N.loc12_22.2: %J_where.type) { +// CHECK:STDOUT: %N.patt.loc12_22.2: %pattern_type = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc12_22.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.loc12_22.1: %J_where.type = symbolic_binding N, 0 [symbolic = %N.loc12_22.1 (constants.%N)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -660,18 +660,18 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Alphabetical(constants.%M) { -// CHECK:STDOUT: %M.patt.loc10_25.2 => constants.%M.patt -// CHECK:STDOUT: %M.loc10_25.1 => constants.%M +// CHECK:STDOUT: %M.patt.loc10_33.2 => constants.%M.patt +// CHECK:STDOUT: %M.loc10_33.1 => constants.%M // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Reversed(constants.%N) { -// CHECK:STDOUT: %N.patt.loc12_14.2 => constants.%N.patt -// CHECK:STDOUT: %N.loc12_14.1 => constants.%N +// CHECK:STDOUT: %N.patt.loc12_22.2 => constants.%N.patt +// CHECK:STDOUT: %N.loc12_22.1 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Alphabetical(constants.%N) { -// CHECK:STDOUT: %M.patt.loc10_25.2 => constants.%M.patt -// CHECK:STDOUT: %M.loc10_25.1 => constants.%N +// CHECK:STDOUT: %M.patt.loc10_33.2 => constants.%M.patt +// CHECK:STDOUT: %M.loc10_33.1 => constants.%N // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/where_expr/fail_not_facet.carbon b/toolchain/check/testdata/where_expr/fail_not_facet.carbon index a2964fb68880..ff4c85a08d07 100644 --- a/toolchain/check/testdata/where_expr/fail_not_facet.carbon +++ b/toolchain/check/testdata/where_expr/fail_not_facet.carbon @@ -14,21 +14,21 @@ library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_left_where_not_facet.carbon:[[@LINE+4]]:10: error: left argument of `where` operator must be a facet type [WhereOnNonFacetType] -// CHECK:STDERR: fn F(T:! i32 where .Self == bool); -// CHECK:STDERR: ^~~ +// CHECK:STDERR: fail_left_where_not_facet.carbon:[[@LINE+4]]:17: error: left argument of `where` operator must be a facet type [WhereOnNonFacetType] +// CHECK:STDERR: fn F(generic T: i32 where .Self == bool); +// CHECK:STDERR: ^~~ // CHECK:STDERR: -fn F(T:! i32 where .Self == bool); +fn F(generic T: i32 where .Self == bool); // --- fail_left_where_unknown.carbon library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_left_where_unknown.carbon:[[@LINE+4]]:10: error: name `NOT_DECLARED` not found [NameNotFound] -// CHECK:STDERR: fn G(U:! NOT_DECLARED where .Self == bool); -// CHECK:STDERR: ^~~~~~~~~~~~ +// CHECK:STDERR: fail_left_where_unknown.carbon:[[@LINE+4]]:17: error: name `NOT_DECLARED` not found [NameNotFound] +// CHECK:STDERR: fn G(generic U: NOT_DECLARED where .Self == bool); +// CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: -fn G(U:! NOT_DECLARED where .Self == bool); +fn G(generic U: NOT_DECLARED where .Self == bool); // --- fail_var.carbon diff --git a/toolchain/check/testdata/where_expr/non_generic.carbon b/toolchain/check/testdata/where_expr/non_generic.carbon index c5219749869d..58c7afdc1de0 100644 --- a/toolchain/check/testdata/where_expr/non_generic.carbon +++ b/toolchain/check/testdata/where_expr/non_generic.carbon @@ -10,7 +10,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/where_expr/non_generic.carbon -interface I { let T:! type; } +interface I { let T: type; } // Ensure that we don't crash when checking this `where` in a non-generic context. //@dump-sem-ir-begin diff --git a/toolchain/check/type.h b/toolchain/check/type.h index ea9bd426a924..2e23f1d6819c 100644 --- a/toolchain/check/type.h +++ b/toolchain/check/type.h @@ -22,7 +22,7 @@ auto ValidateFloatTypeAndSetKind(Context& context, SemIR::LocId loc_id, // Gets the type to use for an unbound associated entity declared in this // interface. For example, this is the type of `I.T` after -// `interface I { let T:! type; }`. The name of the interface is used for +// `interface I { let T: type; }`. The name of the interface is used for // diagnostics. // TODO: Should we use a different type for each such entity, or the same type // for all associated entities? @@ -70,7 +70,7 @@ auto GetFunctionTypeWithSelfType(Context& context, SemIR::InstId self_id) -> SemIR::TypeId; // Gets a generic class type, which is the type of a name of a generic class, -// such as the type of `Vector` given `class Vector(T:! type)`. The returned +// such as the type of `Vector` given `class Vector(T: type)`. The returned // type will be complete. auto GetGenericClassType(Context& context, SemIR::ClassId class_id, SemIR::SpecificId enclosing_specific_id) @@ -78,14 +78,14 @@ auto GetGenericClassType(Context& context, SemIR::ClassId class_id, // Gets a generic interface type, which is the type of a name of a generic // interface, such as the type of `AddWith` given -// `interface AddWith(T:! type)`. The returned type will be complete. +// `interface AddWith(T: type)`. The returned type will be complete. auto GetGenericInterfaceType(Context& context, SemIR::InterfaceId interface_id, SemIR::SpecificId enclosing_specific_id) -> SemIR::TypeId; // Gets a generic named constraint type, which is the type of a name of a // generic named constraint, such as the type of `AddWith` given `constraint -// AddWith(T:! type)`. The returned type will be complete. +// AddWith(T: type)`. The returned type will be complete. auto GetGenericNamedConstraintType(Context& context, SemIR::NamedConstraintId named_constraint_id, SemIR::SpecificId enclosing_specific_id) diff --git a/toolchain/diagnostics/kind.def b/toolchain/diagnostics/kind.def index 35a25e0bf30b..933bcf9dd09d 100644 --- a/toolchain/diagnostics/kind.def +++ b/toolchain/diagnostics/kind.def @@ -118,6 +118,8 @@ CARBON_DIAGNOSTIC_KIND(ExpectedCurlyBraceAfter) CARBON_DIAGNOSTIC_KIND(ExpectedGenericBindingPatternAfterTemplate) CARBON_DIAGNOSTIC_KIND(ExpectedParenAfter) CARBON_DIAGNOSTIC_KIND(ExpectedRuntimeBindingPatternAfterRef) +CARBON_DIAGNOSTIC_KIND(RedundantGenericModifier) +CARBON_DIAGNOSTIC_KIND(RedundantRuntimeModifier) CARBON_DIAGNOSTIC_KIND(ExpectedExprSemi) CARBON_DIAGNOSTIC_KIND(ExpectedStatementSemi) CARBON_DIAGNOSTIC_KIND(ExpectedStructLiteralField) @@ -127,6 +129,7 @@ CARBON_DIAGNOSTIC_KIND(ExpectedChoiceAlternativeName) CARBON_DIAGNOSTIC_KIND(ExpectedObserveOperator) CARBON_DIAGNOSTIC_KIND(NestedVar) CARBON_DIAGNOSTIC_KIND(NestedUnused) +CARBON_DIAGNOSTIC_KIND(UnusedAfterBindingModifier) CARBON_DIAGNOSTIC_KIND(OperatorRequiresParentheses) CARBON_DIAGNOSTIC_KIND(RefInsideVar) CARBON_DIAGNOSTIC_KIND(StatementOperatorAsSubExpr) @@ -184,7 +187,8 @@ CARBON_DIAGNOSTIC_KIND(ExpectedBuiltinName) CARBON_DIAGNOSTIC_KIND(ImplExpectedAfterForall) CARBON_DIAGNOSTIC_KIND(ImplExpectedAs) CARBON_DIAGNOSTIC_KIND(ExpectedAssociatedConstantIdentifier) -CARBON_DIAGNOSTIC_KIND(ExpectedAssociatedConstantColonExclaim) +CARBON_DIAGNOSTIC_KIND(ExpectedAssociatedConstantColon) +CARBON_DIAGNOSTIC_KIND(PhaseKeywordInAssociatedConstant) CARBON_DIAGNOSTIC_KIND(RequireExpectedImpls) // Alias diagnostics. @@ -273,6 +277,7 @@ CARBON_DIAGNOSTIC_KIND(CppCallArgTypeNotSupported) CARBON_DIAGNOSTIC_KIND(CppCallFieldNameNotSupported) CARBON_DIAGNOSTIC_KIND(GenericParamMustBeConstant) CARBON_DIAGNOSTIC_KIND(ImplictParamMustBeConstant) +CARBON_DIAGNOSTIC_KIND(VarParamIsRuntime) CARBON_DIAGNOSTIC_KIND(IncompleteReturnTypeHere) CARBON_DIAGNOSTIC_KIND(InCallToEntity) CARBON_DIAGNOSTIC_KIND(InCallToFunctionParam) diff --git a/toolchain/format/formatter.cpp b/toolchain/format/formatter.cpp index 287fdbae118d..f368120bbfbd 100644 --- a/toolchain/format/formatter.cpp +++ b/toolchain/format/formatter.cpp @@ -61,9 +61,9 @@ auto Formatter::Run() -> bool { break; default: - if (token_kind.IsOneOf( - {Lex::TokenKind::CloseParen, Lex::TokenKind::Colon, - Lex::TokenKind::ColonExclaim, Lex::TokenKind::Comma})) { + if (token_kind.IsOneOf({Lex::TokenKind::CloseParen, + Lex::TokenKind::Colon, + Lex::TokenKind::Comma})) { PrepareForPackedContent(); } else { PrepareForSpacedContent(); diff --git a/toolchain/lex/token_kind.def b/toolchain/lex/token_kind.def index 84bc1c27ab87..0205d5ff00ba 100644 --- a/toolchain/lex/token_kind.def +++ b/toolchain/lex/token_kind.def @@ -64,8 +64,6 @@ CARBON_SYMBOL_TOKEN(MinusGreaterQuestion,"->?") CARBON_SYMBOL_TOKEN(AmpEqual, "&=") CARBON_SYMBOL_TOKEN(CaretEqual, "^=") CARBON_SYMBOL_TOKEN(ColonEqual, ":=") -CARBON_TOKEN_WITH_VIRTUAL_NODE( - CARBON_SYMBOL_TOKEN(ColonExclaim, ":!")) CARBON_SYMBOL_TOKEN(ColonQuestion, ":?") CARBON_SYMBOL_TOKEN(EqualEqual, "==") CARBON_SYMBOL_TOKEN(EqualGreater, "=>") @@ -91,7 +89,8 @@ CARBON_SYMBOL_TOKEN(Amp, "&") CARBON_SYMBOL_TOKEN(At, "@") CARBON_SYMBOL_TOKEN(Backslash, "\\") CARBON_SYMBOL_TOKEN(Caret, "^") -CARBON_SYMBOL_TOKEN(Colon, ":") +CARBON_TOKEN_WITH_VIRTUAL_NODE( + CARBON_SYMBOL_TOKEN(Colon, ":")) CARBON_SYMBOL_TOKEN(Equal, "=") CARBON_SYMBOL_TOKEN(Exclaim, "!") CARBON_SYMBOL_TOKEN(Greater, ">") @@ -196,6 +195,7 @@ CARBON_KEYWORD_TOKEN(For, "for") CARBON_KEYWORD_TOKEN(Form, "form") CARBON_KEYWORD_TOKEN(Forall, "forall") CARBON_KEYWORD_TOKEN(Friend, "friend") +CARBON_KEYWORD_TOKEN(Generic, "generic") CARBON_KEYWORD_TOKEN(If, "if") CARBON_KEYWORD_TOKEN(Impls, "impls") CARBON_KEYWORD_TOKEN(In, "in") @@ -214,6 +214,7 @@ CARBON_KEYWORD_TOKEN(Protected, "protected") CARBON_KEYWORD_TOKEN(Ref, "ref") CARBON_KEYWORD_TOKEN(Return, "return") CARBON_KEYWORD_TOKEN(Returned, "returned") +CARBON_KEYWORD_TOKEN(Runtime, "runtime") CARBON_KEYWORD_TOKEN(SelfTypeIdentifier, "Self") CARBON_TOKEN_WITH_VIRTUAL_NODE( CARBON_KEYWORD_TOKEN(SelfValueIdentifier, "self")) diff --git a/toolchain/lex/token_kind.h b/toolchain/lex/token_kind.h index 38befb2eb308..bb7e84e7d5c2 100644 --- a/toolchain/lex/token_kind.h +++ b/toolchain/lex/token_kind.h @@ -94,8 +94,7 @@ class TokenKind : public CARBON_ENUM_BASE(TokenKind) { // Test whether this kind of token is a binding pattern operator. auto is_binding_pattern_operator() const -> bool { - return *this == TokenKind::Colon || *this == TokenKind::ColonExclaim || - *this == TokenKind::ColonQuestion; + return *this == TokenKind::Colon || *this == TokenKind::ColonQuestion; } // If this token kind has a fixed spelling when in source code, returns it. diff --git a/toolchain/lex/tokenized_buffer_benchmark.cpp b/toolchain/lex/tokenized_buffer_benchmark.cpp index 3998727b1d2a..511c77d59af9 100644 --- a/toolchain/lex/tokenized_buffer_benchmark.cpp +++ b/toolchain/lex/tokenized_buffer_benchmark.cpp @@ -56,7 +56,6 @@ auto GetSymbolTokenTable() -> llvm::ArrayRef { table.insert(table.end(), 8, TokenKind::Colon); table.insert(table.end(), 8, TokenKind::Equal); table.insert(table.end(), 4, TokenKind::Amp); - table.insert(table.end(), 4, TokenKind::ColonExclaim); table.insert(table.end(), 4, TokenKind::EqualEqual); table.insert(table.end(), 4, TokenKind::ExclaimEqual); table.insert(table.end(), 4, TokenKind::MinusGreater); diff --git a/toolchain/lower/testdata/builtins/maybe_unformed.carbon b/toolchain/lower/testdata/builtins/maybe_unformed.carbon index 4c6387359244..d22f233ca87c 100644 --- a/toolchain/lower/testdata/builtins/maybe_unformed.carbon +++ b/toolchain/lower/testdata/builtins/maybe_unformed.carbon @@ -35,7 +35,7 @@ fn ConvertBoolToUnformedBool(var b: bool) { // Also test that an adapter wrapped around the builtin is passed appropriately, // using the same calling convention as the adapted type. -class MaybeUnformedAdapter(T:! type) { +class MaybeUnformedAdapter(T: type) { adapt MaybeUnformedBuiltin(T); } diff --git a/toolchain/lower/testdata/builtins/pointer.carbon b/toolchain/lower/testdata/builtins/pointer.carbon index 53b86a00feb1..99c0935512ee 100644 --- a/toolchain/lower/testdata/builtins/pointer.carbon +++ b/toolchain/lower/testdata/builtins/pointer.carbon @@ -11,8 +11,8 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/builtins/pointer.carbon fn MakeUnformed(t: type) -> type = "maybe_unformed.make_type"; -fn MakeNull(T:! type) -> MakeUnformed(T*) = "pointer.make_null"; -fn IsNull[T:! type](p: MakeUnformed(T*)) -> bool = "pointer.is_null"; +fn MakeNull(generic T: type) -> MakeUnformed(T*) = "pointer.make_null"; +fn IsNull[T: type](p: MakeUnformed(T*)) -> bool = "pointer.is_null"; class C {} diff --git a/toolchain/lower/testdata/class/generic.carbon b/toolchain/lower/testdata/class/generic.carbon index 0500d7f5bcf7..104bd11abbc5 100644 --- a/toolchain/lower/testdata/class/generic.carbon +++ b/toolchain/lower/testdata/class/generic.carbon @@ -14,16 +14,16 @@ package Classes; -base class Base(T:! type) { +base class Base(T: type) { var b: T; } -class Derived(T:! type) { +class Derived(T: type) { extend base: Base(T); var d: T; } -class Adapter(T:! type) { +class Adapter(T: type) { extend adapt Derived(T); } @@ -45,12 +45,12 @@ fn CreateAdapter() -> Classes.Adapter(i32) { library "[[@TEST_NAME]]"; -class A(T:! type) { +class A(T: type) { var x: T; var y: T; } -fn Make[T:! Core.Copy](x: T, y: T) -> A(T) { +fn Make[T: Core.Copy](x: T, y: T) -> A(T) { return {.x = x, .y = y}; } @@ -71,7 +71,7 @@ fn Tuples() -> A((i32, i32)) { library "[[@TEST_NAME]]"; -class C(T:! Core.Copy) { +class C(T: Core.Copy) { fn GetBool(self) -> bool { return self.v; } diff --git a/toolchain/lower/testdata/class/import.carbon b/toolchain/lower/testdata/class/import.carbon index 7930146b90fc..9c997c7fffb0 100644 --- a/toolchain/lower/testdata/class/import.carbon +++ b/toolchain/lower/testdata/class/import.carbon @@ -13,7 +13,7 @@ // --- a.carbon library "X"; -base class D[T:! type](X:! T) { +base class D[T: type](X: T) { } class C { fn F(); diff --git a/toolchain/lower/testdata/class/virtual.carbon b/toolchain/lower/testdata/class/virtual.carbon index d4331ef99dee..c1fbcdd957ce 100644 --- a/toolchain/lower/testdata/class/virtual.carbon +++ b/toolchain/lower/testdata/class/virtual.carbon @@ -142,7 +142,7 @@ fn Use() { library "[[@TEST_NAME]]"; -base class Base(T:! type) { +base class Base(T: type) { virtual fn F(unused self) { } } @@ -150,7 +150,7 @@ base class Base(T:! type) { library "[[@TEST_NAME]]"; -base class Base(T:! Core.Destroy) { +base class Base(T: Core.Destroy) { virtual fn F(unused self) { var _: T; } @@ -170,7 +170,7 @@ fn F() { library "[[@TEST_NAME]]"; -base class Base(T:! type) { +base class Base(T: type) { virtual fn F(unused self) { } } diff --git a/toolchain/lower/testdata/for/bindings.carbon b/toolchain/lower/testdata/for/bindings.carbon index 79a66f253dd4..5178d90ca8e4 100644 --- a/toolchain/lower/testdata/for/bindings.carbon +++ b/toolchain/lower/testdata/for/bindings.carbon @@ -10,7 +10,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/for/bindings.carbon -class EmptyRange(T:! Core.Copy & Core.Destroy) { +class EmptyRange(T: Core.Copy & Core.Destroy) { impl as Core.Iterate where .CursorType = {} and .ElementType = T { fn NewCursor(unused self) -> {} { return {}; diff --git a/toolchain/lower/testdata/function/generic/call.carbon b/toolchain/lower/testdata/function/generic/call.carbon index 07268ed4bd76..7872988602b7 100644 --- a/toolchain/lower/testdata/function/generic/call.carbon +++ b/toolchain/lower/testdata/function/generic/call.carbon @@ -10,7 +10,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/function/generic/call.carbon -fn F[T:! type](_: T) { +fn F[T: type](_: T) { } class C {} diff --git a/toolchain/lower/testdata/function/generic/call_basic.carbon b/toolchain/lower/testdata/function/generic/call_basic.carbon index b7cb947ad82a..55abeb438d9c 100644 --- a/toolchain/lower/testdata/function/generic/call_basic.carbon +++ b/toolchain/lower/testdata/function/generic/call_basic.carbon @@ -16,16 +16,16 @@ class C { } } -fn F[T:! type](_: T) { +fn F[T: type](_: T) { } -fn H[T:! Core.Copy](x: T) -> T { +fn H[T: Core.Copy](x: T) -> T { return x; } // Simple stress test for single depth of calls with change in types. // Check definitions are emitted for each specific. -fn G[T:! Core.Copy & Core.Destroy](x: T) -> T { +fn G[T: Core.Copy & Core.Destroy](x: T) -> T { H(x); H(i32); H(G(x)); diff --git a/toolchain/lower/testdata/function/generic/call_basic_depth.carbon b/toolchain/lower/testdata/function/generic/call_basic_depth.carbon index d1e9f257fb4e..a6c539001f00 100644 --- a/toolchain/lower/testdata/function/generic/call_basic_depth.carbon +++ b/toolchain/lower/testdata/function/generic/call_basic_depth.carbon @@ -13,15 +13,15 @@ // Builds on `call_basic.carbon`. Checks definitions are emitted with deeper // call stack, i.e., when functions can be type checked without looking at the // specific calling context. -fn F[T:! type](_: T) { +fn F[T: type](_: T) { } -fn H[T:! Core.Copy](x: T) -> T { +fn H[T: Core.Copy](x: T) -> T { F(x); return x; } -fn G[T:! Core.Copy & Core.Destroy](x: T) -> T { +fn G[T: Core.Copy & Core.Destroy](x: T) -> T { H(x); F(x); return x; diff --git a/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon b/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon index 0700a5ca0edc..c6644122521e 100644 --- a/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon +++ b/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon @@ -10,7 +10,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon -fn F[T:! Core.Copy](x: T) -> T { +fn F[T: Core.Copy](x: T) -> T { return x; } diff --git a/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon b/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon index 25d2ba294f50..3b7850c12933 100644 --- a/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon +++ b/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon @@ -15,19 +15,19 @@ // conclude "equivalent" for all the call graph. This is to account for // switching to a work-queue from recursion. -fn A[U:! Core.Copy](x: U) -> U { +fn A[U: Core.Copy](x: U) -> U { return x; } -fn D[U:! Core.Copy](x: U) -> U { +fn D[U: Core.Copy](x: U) -> U { return x; } -fn B[U:! Core.Copy & Core.Destroy](x: U*) { +fn B[U: Core.Copy & Core.Destroy](x: U*) { D(*x); } -fn F[T:! Core.Copy & Core.Destroy](x: T*) { +fn F[T: Core.Copy & Core.Destroy](x: T*) { A(i32); B(x); } diff --git a/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon b/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon index e942bf4ffb37..ec795f31425b 100644 --- a/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon @@ -14,12 +14,12 @@ // Check different functions are still emitted when trying to deduplicate emitted definitons. interface I { - let T:! type; + let T: type; // TODO: An interface with multiple associated entities is not yet // implemented in mangling. } -fn G(U:! I) { +fn G(generic U: I) { var _: U.T*; } diff --git a/toolchain/lower/testdata/function/generic/call_different_impls.carbon b/toolchain/lower/testdata/function/generic/call_different_impls.carbon index 881d669c93b1..f5c5f5585430 100644 --- a/toolchain/lower/testdata/function/generic/call_different_impls.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_impls.carbon @@ -26,7 +26,7 @@ impl Y as I { // Cannot coalesce the lowering for G specifics, as they call different functions. // Check different functions are still emitted when trying to deduplicate emitted definitons. -fn G(T:! I) { T.F(); } +fn G(generic T: I) { T.F(); } fn Run() { G(X); @@ -105,9 +105,9 @@ fn Run() { // CHECK:STDOUT: !17 = !DILocation(line: 33, column: 3, scope: !12) // CHECK:STDOUT: !18 = !DILocation(line: 31, column: 1, scope: !12) // CHECK:STDOUT: !19 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c81631f865470482", scope: null, file: !1, line: 29, type: !5, spFlags: DISPFlagDefinition, unit: !0) -// CHECK:STDOUT: !20 = !DILocation(line: 29, column: 15, scope: !19) +// CHECK:STDOUT: !20 = !DILocation(line: 29, column: 22, scope: !19) // CHECK:STDOUT: !21 = !DILocation(line: 29, column: 1, scope: !19) // CHECK:STDOUT: !22 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.0b241ec84a68877b", scope: null, file: !1, line: 29, type: !5, spFlags: DISPFlagDefinition, unit: !0) -// CHECK:STDOUT: !23 = !DILocation(line: 29, column: 15, scope: !22) +// CHECK:STDOUT: !23 = !DILocation(line: 29, column: 22, scope: !22) // CHECK:STDOUT: !24 = !DILocation(line: 29, column: 1, scope: !22) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon b/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon index 7d1e6dcca42c..60e6be94dc30 100644 --- a/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon @@ -13,7 +13,7 @@ import Core library "io"; interface I { - let T:! Core.Destroy; + let T: Core.Destroy; fn F() -> T; } class X {} @@ -33,7 +33,7 @@ impl Y as I where .T = i32 { // Cannot coalesce the lowering for G specifics, as they call different functions. // Check different functions are still emitted when trying to deduplicate emitted definitons. -fn G(U:! I) { +fn G(generic U: I) { let _: U.T = U.F(); } diff --git a/toolchain/lower/testdata/function/generic/call_different_specific.carbon b/toolchain/lower/testdata/function/generic/call_different_specific.carbon index 8698a3ad6f26..d10edc0dae35 100644 --- a/toolchain/lower/testdata/function/generic/call_different_specific.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_specific.carbon @@ -22,19 +22,19 @@ // specifics, where the pointer values are different, and the calls to the // two D specifics are to functions with different function types. -fn A[U:! Core.Copy](x: U) -> U { +fn A[U: Core.Copy](x: U) -> U { return x; } -fn D[U:! Core.Copy](x: U) -> U { +fn D[U: Core.Copy](x: U) -> U { return x; } -fn B[U:! Core.Copy & Core.Destroy](x: U*) { +fn B[U: Core.Copy & Core.Destroy](x: U*) { D(*x); } -fn F[T:! Core.Copy & Core.Destroy](x: T*) { +fn F[T: Core.Copy & Core.Destroy](x: T*) { A(i32); B(x); } diff --git a/toolchain/lower/testdata/function/generic/call_impl_function.carbon b/toolchain/lower/testdata/function/generic/call_impl_function.carbon index 7ced6a12360e..6e0be51af2be 100644 --- a/toolchain/lower/testdata/function/generic/call_impl_function.carbon +++ b/toolchain/lower/testdata/function/generic/call_impl_function.carbon @@ -11,7 +11,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/function/generic/call_impl_function.carbon -interface SomeInterface(T:! type) { +interface SomeInterface(T: type) { fn F(x: T) -> T; } @@ -32,7 +32,7 @@ impl ImplsSomeInterface as SomeInterface(i32) { // } -fn CallGenericMethod(T:! type, U:! SomeInterface(T), x: T) -> T { +fn CallGenericMethod(generic T: type, generic U: SomeInterface(T), x: T) -> T { return U.F(x); } diff --git a/toolchain/lower/testdata/function/generic/call_method.carbon b/toolchain/lower/testdata/function/generic/call_method.carbon index 468d284d2ece..217f1983467a 100644 --- a/toolchain/lower/testdata/function/generic/call_method.carbon +++ b/toolchain/lower/testdata/function/generic/call_method.carbon @@ -11,7 +11,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/function/generic/call_method.carbon class C { - fn F[T:! Core.Copy](unused self, x: T) -> T { + fn F[T: Core.Copy](unused self, x: T) -> T { return x; } } diff --git a/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon b/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon index 37254c8c8430..6b6228a27739 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon @@ -18,7 +18,7 @@ class C { // The two specifics for recursive function F, when T is a pointer, could be // deduplicated. -fn F[T:! Core.Copy](x: T, count: i32) -> T { +fn F[T: Core.Copy](x: T, count: i32) -> T { if (count > 0) { return x; } diff --git a/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon b/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon index 8440f37dc9d3..a925f6407553 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon @@ -11,14 +11,14 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon import Core library "io"; -fn A[T:! Core.Copy](x: T, count: i32) -> T; -fn B[T:! Core.Copy](x: T, count: i32) -> T; -fn C[T:! Core.Copy](x: T, count: i32) -> T; -fn D[T:! Core.Copy](x: T, count: i32) -> T; +fn A[T: Core.Copy](x: T, count: i32) -> T; +fn B[T: Core.Copy](x: T, count: i32) -> T; +fn C[T: Core.Copy](x: T, count: i32) -> T; +fn D[T: Core.Copy](x: T, count: i32) -> T; // Builds on `call_recursive_mutual.carbon`. The two specifics for each of: // A, B, C, D with a pointer type could be deduplicated. -fn A[T:! Core.Copy](x: T, count: i32) -> T { +fn A[T: Core.Copy](x: T, count: i32) -> T { if (count > 4) { return x; } @@ -30,17 +30,17 @@ fn A[T:! Core.Copy](x: T, count: i32) -> T { } // B and C are not equivalent in the diamond: different generics and different function bodies. -fn B[T:! Core.Copy](x: T, count: i32) -> T { +fn B[T: Core.Copy](x: T, count: i32) -> T { Core.Print(1); return D(x, count); } -fn C[T:! Core.Copy](x: T, count: i32) -> T { +fn C[T: Core.Copy](x: T, count: i32) -> T { Core.Print(2); return D(x, count); } -fn D[T:! Core.Copy](x: T, count: i32) -> T { +fn D[T: Core.Copy](x: T, count: i32) -> T { return A(x, count + 1); } diff --git a/toolchain/lower/testdata/function/generic/call_recursive_impl.carbon b/toolchain/lower/testdata/function/generic/call_recursive_impl.carbon index fda1b2ed4ef0..d3d781e9af7e 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_impl.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_impl.carbon @@ -27,7 +27,7 @@ impl Y as I { // Builds on "call_different_impls.carbon", cannot lower a single G due to // different calls to F. Additionally, add recursion so the function // fingerprint is dependent on itself. -fn G(T:! I, count: i32) -> i32 { +fn G(generic T: I, count: i32) -> i32 { T.F(); if (count > 0) { diff --git a/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon b/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon index b66153359f88..51ff15ca9eda 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon @@ -13,16 +13,16 @@ // Builds on `call_recursive_basic.carbon`. // The two specifics for mutual recursive functions F and G, // when T is a pointer, could be deduplicated. -fn G[T:! Core.Copy](x: T, count: i32) -> T; +fn G[T: Core.Copy](x: T, count: i32) -> T; -fn F[T:! Core.Copy](x: T, count: i32) -> T { +fn F[T: Core.Copy](x: T, count: i32) -> T { if (count > 3) { return x; } return G(x, count + 1); } -fn G[T:! Core.Copy](x: T, count: i32) -> T { +fn G[T: Core.Copy](x: T, count: i32) -> T { if (count > 4) { return x; } diff --git a/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon b/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon index 5f6400f22d75..578693d91d44 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon @@ -12,7 +12,7 @@ // Builds on `call_recursive_basic.carbon`. -fn F[T:! type, U:! type](x: T, y: U, count: i32) -> i32 { +fn F[T: type, U: type](x: T, y: U, count: i32) -> i32 { if (count > 2) { return count; } diff --git a/toolchain/lower/testdata/function/generic/call_recursive_reorder_more.carbon b/toolchain/lower/testdata/function/generic/call_recursive_reorder_more.carbon index 2bbf2b26a6c9..65b9ab9f6744 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_reorder_more.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_reorder_more.carbon @@ -12,7 +12,7 @@ // Builds on `call_recursive_reorder.carbon`. -fn F[T:! type, U:! type, V:! type](x: T, y: U, z: V, count: i32) -> i32 { +fn F[T: type, U: type, V: type](x: T, y: U, z: V, count: i32) -> i32 { if (count > 2) { return count; } diff --git a/toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon b/toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon index c71549ce963d..2996caa05eb9 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon @@ -11,12 +11,12 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon import Core library "io"; -fn A[T:! Core.Copy](x: T, count: i32) -> T; -fn B[T:! Core.Copy](x: T, count: i32); -fn C[T:! Core.Copy](x: T, count: i32); -fn D[T:! Core.Copy](x: T, count: i32) -> T; -fn E[T:! Core.Copy](x: T, count: i32) -> T; -fn F[T:! Core.Copy](x: T, count: i32) -> T; +fn A[T: Core.Copy](x: T, count: i32) -> T; +fn B[T: Core.Copy](x: T, count: i32); +fn C[T: Core.Copy](x: T, count: i32); +fn D[T: Core.Copy](x: T, count: i32) -> T; +fn E[T: Core.Copy](x: T, count: i32) -> T; +fn F[T: Core.Copy](x: T, count: i32) -> T; // Builds on `call_recursive_mutual.carbon` and `call_recursive_diamond.carbon` // B-C form a mutually recursive SCC (strongly connected component), D-E-F-G @@ -28,23 +28,23 @@ fn F[T:! Core.Copy](x: T, count: i32) -> T; // optimization here, if the function fingerprint may infer deduplication // when not including the two different generic_ids. -fn A[T:! Core.Copy](x: T, count: i32) -> T { +fn A[T: Core.Copy](x: T, count: i32) -> T { B(x, count); return D(x, count); } -fn B[T:! Core.Copy](x: T, count: i32) { +fn B[T: Core.Copy](x: T, count: i32) { C(x, count); } -fn C[T:! Core.Copy](x: T, count: i32) { +fn C[T: Core.Copy](x: T, count: i32) { if (count <= 2) { Core.Print(count); B(x, count + 1); } } -fn D[T:! Core.Copy](x: T, count: i32) -> T { +fn D[T: Core.Copy](x: T, count: i32) -> T { if (count > 4) { return x; } @@ -55,17 +55,17 @@ fn D[T:! Core.Copy](x: T, count: i32) -> T { } } -fn G[T:! Core.Copy](x: T, count: i32) -> T; +fn G[T: Core.Copy](x: T, count: i32) -> T; -fn E[T:! Core.Copy](x: T, count: i32) -> T { +fn E[T: Core.Copy](x: T, count: i32) -> T { return G(x, count); } -fn F[T:! Core.Copy](x: T, count: i32) -> T { +fn F[T: Core.Copy](x: T, count: i32) -> T { return G(x, count); } -fn G[T:! Core.Copy](x: T, count: i32) -> T { +fn G[T: Core.Copy](x: T, count: i32) -> T { return D(x, count + 1); } diff --git a/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon b/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon index 949e834f6899..db4d28deca30 100644 --- a/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon +++ b/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon @@ -15,17 +15,17 @@ // generic function for an object, from a generic context. // The specifics with a pointer type could be deduplicated here. class C { - fn Cfn[T:! Core.Copy](unused self, x: T) -> T { + fn Cfn[T: Core.Copy](unused self, x: T) -> T { return x; } } -fn G[T:! Core.Copy](x: T) -> T { +fn G[T: Core.Copy](x: T) -> T { var c: C; return c.Cfn(x); } -fn F[T:! Core.Copy](x: T) -> T { +fn F[T: Core.Copy](x: T) -> T { return G(x); } diff --git a/toolchain/lower/testdata/function/generic/cross_library_name_collision_private.carbon b/toolchain/lower/testdata/function/generic/cross_library_name_collision_private.carbon index 8e0e02eb865f..0d78c11ef400 100644 --- a/toolchain/lower/testdata/function/generic/cross_library_name_collision_private.carbon +++ b/toolchain/lower/testdata/function/generic/cross_library_name_collision_private.carbon @@ -14,11 +14,11 @@ library "[[@TEST_NAME]]"; -private fn F[T:! Core.Copy](a: T, _: T) -> T { +private fn F[T: Core.Copy](a: T, _: T) -> T { return a; } -fn Lib1CallF[T:! Core.Copy](a: T, b: T) -> T { +fn Lib1CallF[T: Core.Copy](a: T, b: T) -> T { return F(a, b); } @@ -29,11 +29,11 @@ library "[[@TEST_NAME]]"; // Duplicate function name in different files. Shouldn't be a name conflict // because of `private`. However, we currently use the same mangling for both // functions. -private fn F[T:! Core.Copy](_: T, b: T) -> T { +private fn F[T: Core.Copy](_: T, b: T) -> T { return b; } -fn Lib2CallF[T:! Core.Copy](a: T, b: T) -> T { +fn Lib2CallF[T: Core.Copy](a: T, b: T) -> T { return F(a, b); } diff --git a/toolchain/lower/testdata/function/generic/import.carbon b/toolchain/lower/testdata/function/generic/import.carbon index bceb7ef75f28..5f497bd18e8b 100644 --- a/toolchain/lower/testdata/function/generic/import.carbon +++ b/toolchain/lower/testdata/function/generic/import.carbon @@ -22,7 +22,7 @@ fn IndirectDeclared(); fn IndirectDefined() {} -fn IndirectGeneric(T:! type, x: T*) -> T* { +fn IndirectGeneric(generic T: type, x: T*) -> T* { IndirectDeclared(); IndirectDefined(); return x; @@ -38,7 +38,7 @@ fn DirectDeclared(); fn DirectDefined() {} -fn DirectGeneric(T:! type, y: T*) -> T* { +fn DirectGeneric(generic T: type, y: T*) -> T* { DirectDeclared(); DirectDefined(); return IndirectGeneric(T, y); diff --git a/toolchain/lower/testdata/function/generic/import_core_witness.carbon b/toolchain/lower/testdata/function/generic/import_core_witness.carbon index 6869381092a4..b0132cb7a09a 100644 --- a/toolchain/lower/testdata/function/generic/import_core_witness.carbon +++ b/toolchain/lower/testdata/function/generic/import_core_witness.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; -fn F(x:! i32) { +fn F(generic x: i32) { // This generates a witness for the destructor of `y` which is reused by the // instantiation for the call in `main.carbon`. var unused y: i32 = x; diff --git a/toolchain/lower/testdata/function/generic/import_unused_def.carbon b/toolchain/lower/testdata/function/generic/import_unused_def.carbon index 61eb9538b69a..05a8395841cf 100644 --- a/toolchain/lower/testdata/function/generic/import_unused_def.carbon +++ b/toolchain/lower/testdata/function/generic/import_unused_def.carbon @@ -27,7 +27,7 @@ impl Foo as Core.Copy { } } -fn GenericF[T:! type](unused x: T) -> Foo { +fn GenericF[T: type](unused x: T) -> Foo { var f: Foo = (0 as i32) as Foo; return f; } diff --git a/toolchain/lower/testdata/function/generic/local_function.carbon b/toolchain/lower/testdata/function/generic/local_function.carbon index 64e16345dd1f..ca5752c98796 100644 --- a/toolchain/lower/testdata/function/generic/local_function.carbon +++ b/toolchain/lower/testdata/function/generic/local_function.carbon @@ -14,7 +14,7 @@ // This previously crashed due to the local function not having a parent name // scope. -fn F(T:! Core.Copy, y: T) -> T { +fn F(generic T: Core.Copy, y: T) -> T { fn G(x: T) -> T { return x; } return G(y); } diff --git a/toolchain/lower/testdata/function/generic/reverse_canonical.carbon b/toolchain/lower/testdata/function/generic/reverse_canonical.carbon index 2e4c6a0aeb2e..a37ae3eedb9a 100644 --- a/toolchain/lower/testdata/function/generic/reverse_canonical.carbon +++ b/toolchain/lower/testdata/function/generic/reverse_canonical.carbon @@ -12,32 +12,32 @@ class C1 {} -fn first[T:! type, U:! type, V:! type](arg1: T, arg2: U, arg3: V); -fn second[T:! type, U:! type, V:! type](arg1: T, arg2: U, arg3: V); -fn third[T:! type, U:! type, V:! type](arg1: T, arg2: U, arg3: V); -fn fourth[T:! type, U:! type, V:! type](arg1: T, arg2: U, arg3: V); +fn first[T: type, U: type, V: type](arg1: T, arg2: U, arg3: V); +fn second[T: type, U: type, V: type](arg1: T, arg2: U, arg3: V); +fn third[T: type, U: type, V: type](arg1: T, arg2: U, arg3: V); +fn fourth[T: type, U: type, V: type](arg1: T, arg2: U, arg3: V); -fn first[T:! type, U:! type, V:! type](unused arg1: T, arg2: U, unused arg3: V) { +fn first[T: type, U: type, V: type](unused arg1: T, arg2: U, unused arg3: V) { var local_name: C1*; second(arg2, arg2, local_name); } -fn second[T:! type, U:! type, V:! type](arg1: T, arg2: U, arg3: V) { +fn second[T: type, U: type, V: type](arg1: T, arg2: U, arg3: V) { var local_name: C1*; first(arg3, arg3, arg1); third(arg2, arg2, local_name); } -fn third[T:! type, U:! type, V:! type](arg1: T, arg2: U, arg3: V) { +fn third[T: type, U: type, V: type](arg1: T, arg2: U, arg3: V) { var local_name: C1**; fourth(local_name, local_name, arg1); fourth(arg3, arg3, arg2); } -fn fourth[T:! type, U:! type, V:! type](unused arg1: T, unused arg2: U, unused arg3: V) { +fn fourth[T: type, U: type, V: type](unused arg1: T, unused arg2: U, unused arg3: V) { } fn Main() { diff --git a/toolchain/lower/testdata/function/generic/self_canonical.carbon b/toolchain/lower/testdata/function/generic/self_canonical.carbon index ff5f4b1805a5..06548653665c 100644 --- a/toolchain/lower/testdata/function/generic/self_canonical.carbon +++ b/toolchain/lower/testdata/function/generic/self_canonical.carbon @@ -24,15 +24,15 @@ class class_name4 {} class class_name5 {} class class_name6 {} -fn third_function[T:! type, U:! type, V:! type](arg1: T, arg2: U, arg3: V); +fn third_function[T: type, U: type, V: type](arg1: T, arg2: U, arg3: V); -fn fourth_function[T:! type](arg: T); +fn fourth_function[T: type](arg: T); -fn first_function[T:! type](arg: T); +fn first_function[T: type](arg: T); -fn second_function[T:! type, U:! type, V:! type](arg1: T, arg2: U, arg3: V); +fn second_function[T: type, U: type, V: type](arg1: T, arg2: U, arg3: V); -fn third_function[T:! type, U:! type, V:! type](arg1: T, arg2: U, unused arg3: V) { +fn third_function[T: type, U: type, V: type](arg1: T, arg2: U, unused arg3: V) { var local1: class_name2*; var local2: class_name2*; @@ -40,13 +40,13 @@ fn third_function[T:! type, U:! type, V:! type](arg1: T, arg2: U, unused arg3: V fourth_function(local1); } -fn unused_1[T:! type, U:! type, V:! type](arg1: T, unused arg2: U, arg3: V) { +fn unused_1[T: type, U: type, V: type](arg1: T, unused arg2: U, arg3: V) { var local1: class_name6*; third_function(arg1, arg3, local1); } -fn fourth_function[T:! type](unused arg: T) { +fn fourth_function[T: type](unused arg: T) { var local1: class_name5**; var local2: class_name6*; @@ -54,20 +54,20 @@ fn fourth_function[T:! type](unused arg: T) { first_function(local2); } -fn first_function[T:! type](arg: T) { +fn first_function[T: type](arg: T) { var local1: class_name4*; var local2: class_name3*; second_function(local2, local1, arg); } -fn unused_2[T:! type, U:! type](arg1: T, arg2: U) { +fn unused_2[T: type, U: type](arg1: T, arg2: U) { var local1: class_name6*; second_function(arg1, arg2, local1); } -fn second_function[T:! type, U:! type, V:! type](arg1: T, unused arg2: U, arg3: V) { +fn second_function[T: type, U: type, V: type](arg1: T, unused arg2: U, arg3: V) { var local1: class_name3*; var local2: class_name4*; var local3: class_name2*; diff --git a/toolchain/lower/testdata/function/generic/type_param.carbon b/toolchain/lower/testdata/function/generic/type_param.carbon index 41d07b4d1761..c63efedcc0e5 100644 --- a/toolchain/lower/testdata/function/generic/type_param.carbon +++ b/toolchain/lower/testdata/function/generic/type_param.carbon @@ -10,7 +10,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/function/generic/type_param.carbon -fn F(T:! type) { +fn F(generic T: type) { var p: T*; let _: T = *p; } diff --git a/toolchain/lower/testdata/function/generic/type_representation.carbon b/toolchain/lower/testdata/function/generic/type_representation.carbon index 60f9ee4587dc..2b2105cbf336 100644 --- a/toolchain/lower/testdata/function/generic/type_representation.carbon +++ b/toolchain/lower/testdata/function/generic/type_representation.carbon @@ -14,7 +14,7 @@ interface Copy { fn Op(self) -> Self; } -fn F[T:! Copy & Core.Destroy](a: T) -> T { +fn F[T: Copy & Core.Destroy](a: T) -> T { var _: T = a.(Copy.Op)(); return a.(Copy.Op)(); } diff --git a/toolchain/lower/testdata/impl/impl.carbon b/toolchain/lower/testdata/impl/impl.carbon index 68bafc900d85..76efd26ecfec 100644 --- a/toolchain/lower/testdata/impl/impl.carbon +++ b/toolchain/lower/testdata/impl/impl.carbon @@ -40,7 +40,7 @@ class A {} class B {} class C {} -interface I(T:! type) { +interface I(T: type) { fn F(self) -> T; } @@ -57,7 +57,7 @@ fn F1(x: C, y: C) { var unused b: B = y.(I(B).F)(); } -fn F2[T:! I(A), U:! I(B)](x: T, y: U) { +fn F2[T: I(A), U: I(B)](x: T, y: U) { var unused a: A = x.F(); var unused b: B = y.F(); } @@ -69,7 +69,7 @@ library "[[@TEST_NAME]]"; class A {} class B {} -class C(T:! type) {} +class C(T: type) {} interface I { fn F(); diff --git a/toolchain/lower/testdata/impl/import_facet.carbon b/toolchain/lower/testdata/impl/import_facet.carbon index f15aa8c34092..f73aaedbd9cb 100644 --- a/toolchain/lower/testdata/impl/import_facet.carbon +++ b/toolchain/lower/testdata/impl/import_facet.carbon @@ -16,7 +16,7 @@ // --- a.carbon library "[[@TEST_NAME]]"; -class C(T:! Core.Copy & Core.UnformedInit & Core.Destroy) { +class C(T: Core.Copy & Core.UnformedInit & Core.Destroy) { fn GetC(unused self) -> T { var value: T; return value; @@ -28,7 +28,7 @@ library "[[@TEST_NAME]]"; export import library "a"; interface I { - let T:! Core.Copy & Core.UnformedInit & Core.Destroy; + let T: Core.Copy & Core.UnformedInit & Core.Destroy; fn GetI(self) -> C(T); } @@ -36,7 +36,7 @@ interface I { library "[[@TEST_NAME]]"; export import library "b"; -class D(U:! type) { +class D(U: type) { impl as I where .T = U* { fn GetI(unused self) -> C(U*) { return {}; diff --git a/toolchain/lower/testdata/impl/period_self.carbon b/toolchain/lower/testdata/impl/period_self.carbon index bf39f1ee0c8d..57d490620994 100644 --- a/toolchain/lower/testdata/impl/period_self.carbon +++ b/toolchain/lower/testdata/impl/period_self.carbon @@ -16,18 +16,18 @@ library "[[@TEST_NAME]]"; interface J {} -class A(T:! type) {} +class A(T: type) {} class B {} -impl forall [T:! type] A(T) as J {} +impl forall [T: type] A(T) as J {} -impl forall [T:! type where A(.Self) impls J] A(T) as Core.As(T*) { +impl forall [T: type where A(.Self) impls J] A(T) as Core.As(T*) { fn Convert(self) -> T* { return self as T*; } } -fn F[T:! type](x: A(T)) { +fn F[T: type](x: A(T)) { x as T*; } diff --git a/toolchain/lower/testdata/impl/thunk.carbon b/toolchain/lower/testdata/impl/thunk.carbon index cbecd1750634..bc169f921793 100644 --- a/toolchain/lower/testdata/impl/thunk.carbon +++ b/toolchain/lower/testdata/impl/thunk.carbon @@ -48,13 +48,13 @@ class B { } } -interface I(T:! type) { +interface I(T: type) { fn F(self, x: B) -> A; } -class C(U:! type) {} +class C(U: type) {} -impl forall [V:! type] C(V) as I(V) { +impl forall [V: type] C(V) as I(V) { fn F(unused self, _: A) -> B { return {}; } } @@ -62,7 +62,7 @@ fn Call(c: C(()), b: B) -> A { return c.(I(()).F)(b); } -fn CallGeneric[T:! I(())](c: T, b: B) -> A { +fn CallGeneric[T: I(())](c: T, b: B) -> A { return c.F(b); } diff --git a/toolchain/lower/testdata/interface/where.carbon b/toolchain/lower/testdata/interface/where.carbon index 76ef3771c78e..597a2fbfff03 100644 --- a/toolchain/lower/testdata/interface/where.carbon +++ b/toolchain/lower/testdata/interface/where.carbon @@ -15,7 +15,7 @@ library "[[@TEST_NAME]]"; interface I { - let T:! type; + let T: type; fn F(); } @@ -34,14 +34,14 @@ class C {} class D {} class E {} -interface I(T:! type) { fn F(self); } -interface J(T:! type) {} +interface I(T: type) { fn F(self); } +interface J(T: type) {} impl D as J(E) {} // The type of `T` is not `.Self`-dependent, because `.Self` appears after // `where`. -impl forall [T:! type where D impls J(.Self)] C as I(T) { +impl forall [T: type where D impls J(.Self)] C as I(T) { fn F(unused self) {} } diff --git a/toolchain/lower/testdata/interop/cpp/enum.carbon b/toolchain/lower/testdata/interop/cpp/enum.carbon index 0d0411535ff7..8144de7493d3 100644 --- a/toolchain/lower/testdata/interop/cpp/enum.carbon +++ b/toolchain/lower/testdata/interop/cpp/enum.carbon @@ -101,7 +101,7 @@ fn Compare(a: Cpp.C.E, b: Cpp.C.E) -> bool { return a == b; } -fn CompareGeneric[U:! type, T:! Core.EqWith(U)](x: T, y: U) -> bool { +fn CompareGeneric[U: type, T: Core.EqWith(U)](x: T, y: U) -> bool { return x == y; } @@ -138,7 +138,7 @@ fn Compare3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { return a == b; } -fn CompareGeneric[U:! type, T:! Core.EqWith(U)](x: T, y: U) -> bool { +fn CompareGeneric[U: type, T: Core.EqWith(U)](x: T, y: U) -> bool { return x == y; } diff --git a/toolchain/lower/testdata/interop/cpp/function/export/generic.carbon b/toolchain/lower/testdata/interop/cpp/function/export/generic.carbon index 436e7b617a4c..c96b79eaad96 100644 --- a/toolchain/lower/testdata/interop/cpp/function/export/generic.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/export/generic.carbon @@ -29,7 +29,7 @@ class B { } } -fn F[T:! I](t: T) { +fn F[T: I](t: T) { t.Doit(); } diff --git a/toolchain/lower/testdata/interop/cpp/operators.carbon b/toolchain/lower/testdata/interop/cpp/operators.carbon index a9af78e94599..0f700597d434 100644 --- a/toolchain/lower/testdata/interop/cpp/operators.carbon +++ b/toolchain/lower/testdata/interop/cpp/operators.carbon @@ -28,7 +28,7 @@ struct A { }; '''; -fn CheckEqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) { +fn CheckEqWith[U: type, T: Core.EqWith(U)](x: T, y: U) { x == y; x != y; } @@ -63,7 +63,7 @@ struct A { }; '''; -fn CheckOrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) { +fn CheckOrderedWith[U: type, T: Core.OrderedWith(U)](x: T, y: U) { x < y; x > y; x <= y; diff --git a/toolchain/lower/testdata/let/local.carbon b/toolchain/lower/testdata/let/local.carbon index c7ba86057f0e..6a4c0241702e 100644 --- a/toolchain/lower/testdata/let/local.carbon +++ b/toolchain/lower/testdata/let/local.carbon @@ -29,7 +29,7 @@ fn F(_: C) {} fn CallF() { // TODO: Uncomment this once symbolic locals work in check. It's disabled so // that we still test lowering of non-symbolic locals. - // let c:! C = {}; + // let generic c: C = {}; // F(c); } diff --git a/toolchain/lower/testdata/packages/imported_package_mangle.carbon b/toolchain/lower/testdata/packages/imported_package_mangle.carbon index 9356cd4e98a8..64cab31869a3 100644 --- a/toolchain/lower/testdata/packages/imported_package_mangle.carbon +++ b/toolchain/lower/testdata/packages/imported_package_mangle.carbon @@ -23,7 +23,7 @@ impl array(C, 1) as I { fn F() {} } -impl forall [N:! Core.IntLiteral] array(C, N) as I { +impl forall [N: Core.IntLiteral] array(C, N) as I { fn F() {} } @@ -55,7 +55,7 @@ impl array(C, 1) as I { fn F() {} } -impl forall [N:! Core.IntLiteral] array(C, N) as I { +impl forall [N: Core.IntLiteral] array(C, N) as I { fn F() {} } @@ -63,7 +63,7 @@ impl array(C, 1) as A.I { fn F() {} } -impl forall [N:! Core.IntLiteral] array(C, N) as A.I { +impl forall [N: Core.IntLiteral] array(C, N) as A.I { fn F() {} } @@ -71,7 +71,7 @@ impl array(A.C, 1) as I { fn F() {} } -impl forall [N:! Core.IntLiteral] array(A.C, N) as I { +impl forall [N: Core.IntLiteral] array(A.C, N) as I { fn F() {} } diff --git a/toolchain/lower/testdata/packages/imported_type_completeness.carbon b/toolchain/lower/testdata/packages/imported_type_completeness.carbon index ebb3a300efbf..d04b79847959 100644 --- a/toolchain/lower/testdata/packages/imported_type_completeness.carbon +++ b/toolchain/lower/testdata/packages/imported_type_completeness.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; -class C(T:! type) { +class C(T: type) { // Core.Int(123) is required to be complete here. fn F() -> Core.Int(123) { return 123; @@ -26,7 +26,7 @@ class C(T:! type) { } } -fn G(T:! type, t: T) { +fn G(generic T: type, t: T) { // Core.Int(123) is also required to be complete here. But because it's not // dependent, we don't require it to be complete when forming a specific for G. ({} as C(T)).F(); @@ -51,7 +51,7 @@ fn I() { library "[[@TEST_NAME]]"; -base class C(T:! type) { +base class C(T: type) { // Require Core.Int(11) and Core.Int(12) to be complete. virtual fn F(unused self) -> Core.Int(11) { return 11; } virtual fn G(unused self, unused t: T) -> Core.Int(12) { return 12; } @@ -74,7 +74,7 @@ library "[[@TEST_NAME]]"; import library "require_completion_in_vtable"; -fn F(T:! type, t: T) { +fn F(generic T: type, t: T) { var c: C(T) = {}; c.F(); c.G(t); diff --git a/toolchain/lower/testdata/packages/private_external_mangle.carbon b/toolchain/lower/testdata/packages/private_external_mangle.carbon index 0af5bbb7b3af..38ca0d915f9d 100644 --- a/toolchain/lower/testdata/packages/private_external_mangle.carbon +++ b/toolchain/lower/testdata/packages/private_external_mangle.carbon @@ -26,7 +26,7 @@ private class C { } } -fn CallInA(unused T:! type) { +fn CallInA(unused generic T: type) { Call(); C.Call(); } @@ -47,7 +47,7 @@ private class C { } } -fn CallInB(unused T:! type) { +fn CallInB(unused generic T: type) { Call(); C.Call(); } diff --git a/toolchain/lower/testdata/packages/separate_compilation_witness.carbon b/toolchain/lower/testdata/packages/separate_compilation_witness.carbon index ecc52711ef04..3954e0c23662 100644 --- a/toolchain/lower/testdata/packages/separate_compilation_witness.carbon +++ b/toolchain/lower/testdata/packages/separate_compilation_witness.carbon @@ -56,7 +56,7 @@ package OwningPackage library "[[@TEST_NAME]]"; import library "owner"; -fn Generic(unused T:! type, v1: Vector, v2: Vector) -> Vector { +fn Generic(unused generic T: type, v1: Vector, v2: Vector) -> Vector { return v1 + v2 * (2 as i32); } @@ -97,7 +97,7 @@ package OtherPackage library "[[@TEST_NAME]]"; import OwningPackage library "owner"; -fn Generic(unused T:! type, v1: OwningPackage.Vector, v2: OwningPackage.Vector) -> OwningPackage.Vector { +fn Generic(unused generic T: type, v1: OwningPackage.Vector, v2: OwningPackage.Vector) -> OwningPackage.Vector { return v1 + v2 * (2 as i32); } diff --git a/toolchain/lower/testdata/primitives/char.carbon b/toolchain/lower/testdata/primitives/char.carbon index f532d36d5f98..159972f633e2 100644 --- a/toolchain/lower/testdata/primitives/char.carbon +++ b/toolchain/lower/testdata/primitives/char.carbon @@ -16,7 +16,7 @@ class CharLike { } } -fn Discard[T:! type](unused x: T) {} +fn Discard[T: type](unused x: T) {} fn Convert(c: char, u: u8) { Discard(c as u8); diff --git a/toolchain/lower/testdata/primitives/char_literals.carbon b/toolchain/lower/testdata/primitives/char_literals.carbon index 4e4bb7307fb2..6dbc5c5f9dd6 100644 --- a/toolchain/lower/testdata/primitives/char_literals.carbon +++ b/toolchain/lower/testdata/primitives/char_literals.carbon @@ -16,7 +16,7 @@ class CharLike { } } -fn Discard[T:! type](unused x: T) {} +fn Discard[T: type](unused x: T) {} fn Convert() { Discard('x' as u8); diff --git a/toolchain/lower/testdata/return/function_ids_in_different_files.carbon b/toolchain/lower/testdata/return/function_ids_in_different_files.carbon index fef3d733decb..f2c9231e286b 100644 --- a/toolchain/lower/testdata/return/function_ids_in_different_files.carbon +++ b/toolchain/lower/testdata/return/function_ids_in_different_files.carbon @@ -12,7 +12,7 @@ // --- a.carbon library "[[@TEST_NAME]]"; -fn F(unused T:! type) { +fn F(unused generic T: type) { // Explicit no-argument `return` in a generic function. return; } diff --git a/toolchain/parse/context.h b/toolchain/parse/context.h index 0d5ec6e7fbf4..3c197abebdd9 100644 --- a/toolchain/parse/context.h +++ b/toolchain/parse/context.h @@ -30,6 +30,20 @@ enum class Lookahead : int32_t { NextToken = 1, }; +// The syntactic context of a binding pattern, which determines its default +// phase when no explicit `generic`/`template`/`runtime` keyword is present. +enum class BindingContext : uint8_t { + // An explicit `()` parameter of a function, or a local binding + // (`let`/`var`/`for`/`match`). Runtime by default. + ExplicitParam, + // A deduced `[]` parameter, whether of a function, a compile-time entity, or + // an `impl`'s `forall`. Checked generic by default. + DeducedParam, + // An explicit `()` parameter of a compile-time entity (such as a `class`), or + // of a parameterized name qualifier. Checked generic by default. + CompileTimeEntityParam, +}; + // Context and shared functionality for parser handlers. See state.def for state // documentation. class Context { @@ -102,6 +116,12 @@ class Context { // could help catch errors. bool in_unused_pattern : 1 = false; + // The binding context governing this state, used to pick the default phase + // of its bindings. Meaningful for pattern states, and for the + // declaration-name states that carry an enclosing declaration's default + // down to its parameter lists. + BindingContext binding_context : 2 = BindingContext::ExplicitParam; + // Precedence information used by expression states in order to determine // operator precedence. The ambient_precedence deals with how the expression // should interact with outside context, while the lhs_precedence is @@ -119,7 +139,7 @@ class Context { // We expect State to fit into 12 bytes: // state = 1 byte - // has_error, in_var_pattern, and in_unused_pattern = 1 byte + // has_error, in_var_pattern, in_unused_pattern, binding_context = 1 byte // ambient_precedence = 1 byte // lhs_precedence = 1 byte // token = 4 bytes @@ -318,6 +338,17 @@ class Context { PushState({.kind = kind, .token = token, .subtree_start = tree_->size()}); } + // Pushes a new state with a specific token and binding context. Used when + // starting a parameter list whose bindings have a non-default phase, or when + // carrying a declaration's binding context across a qualified name. + auto PushState(StateKind kind, Lex::TokenIndex token, + BindingContext binding_context) -> void { + PushState({.kind = kind, + .binding_context = binding_context, + .token = token, + .subtree_start = tree_->size()}); + } + // Pushes a new expression state with specific precedence. auto PushStateForExpr(PrecedenceGroup ambient_precedence) -> void { PushState({.kind = StateKind::Expr, @@ -338,13 +369,16 @@ class Context { // Pushes a new state for handling a pattern. `in_var_pattern` and // `in_unused_pattern` indicate whether that pattern is nested inside a `var` - // or `unused` pattern. + // or `unused` pattern. `binding_context` is the binding context that + // determines the default phase of bindings in this pattern. auto PushStateForPattern(StateKind kind, bool in_var_pattern, - bool in_unused_pattern, PrecedenceGroup precedence) - -> void { + bool in_unused_pattern, + BindingContext binding_context, + PrecedenceGroup precedence) -> void { PushState({.kind = kind, .in_var_pattern = in_var_pattern, .in_unused_pattern = in_unused_pattern, + .binding_context = binding_context, .ambient_precedence = precedence, .token = *position_, .subtree_start = tree_->size()}); diff --git a/toolchain/parse/handle_alias.cpp b/toolchain/parse/handle_alias.cpp index 9d4c80ae9d4c..bf85a54b4240 100644 --- a/toolchain/parse/handle_alias.cpp +++ b/toolchain/parse/handle_alias.cpp @@ -15,7 +15,8 @@ auto HandleAlias(Context& context) -> void { auto state = context.PopState(); context.PushState(state, StateKind::AliasAfterName); - context.PushState(StateKind::DeclNameAndParams, state.token); + context.PushState(StateKind::DeclNameAndParams, state.token, + BindingContext::CompileTimeEntityParam); } auto HandleAliasAfterName(Context& context) -> void { diff --git a/toolchain/parse/handle_binding_pattern.cpp b/toolchain/parse/handle_binding_pattern.cpp index 0e6aab2e0570..ddc0e416337b 100644 --- a/toolchain/parse/handle_binding_pattern.cpp +++ b/toolchain/parse/handle_binding_pattern.cpp @@ -8,6 +8,66 @@ namespace Carbon::Parse { +// Determines whether a `:` binding is a generic binding, from its contextual +// default and any explicit phase keyword. `is_form` is true for a `:?` form +// binding, whose phase is fixed and unaffected by phase keywords. +// +// A keyword that is *redundant* with the contextual default is diagnosed here. +// A keyword that is *invalid* for the context (such as `runtime` on a +// compile-time entity's parameter) is intentionally not rejected here: the +// requested phase is honored, and `check` diagnoses the resulting phase as +// invalid for the context and recovers by building an error binding that still +// introduces the name. Either way no parse node is flagged as an error, so +// `check` never aborts on an invalid parse tree; the caller preserves an +// explicit `runtime` keyword as a `RuntimeBindingName` node so its token is +// accounted for and `check` can see the requested phase. +static auto ResolveBindingPhase(Context& context, Context::State& state, + bool is_form, + std::optional template_token, + std::optional generic_token, + std::optional runtime_token, + bool& redundant_modifier) -> bool { + // `template`/`generic` force a generic binding, `runtime` forces a runtime + // binding, and otherwise the context's default applies. + bool resolved_generic; + if (template_token || generic_token) { + resolved_generic = true; + } else if (runtime_token) { + resolved_generic = false; + } else { + resolved_generic = state.binding_context != BindingContext::ExplicitParam; + } + + // A form binding's phase is fixed, so phase keywords don't apply to it, and + // there is no point diagnosing a redundant keyword once the binding is + // already in error. + // TODO: `:?` form bindings are temporary; see the TODO in + // `HandleBindingPattern`. + if (is_form || state.has_error) { + return resolved_generic; + } + + // Diagnose a phase keyword that is redundant with the contextual default. A + // keyword that is invalid (rather than redundant) is left for `check`. + if (generic_token && state.binding_context != BindingContext::ExplicitParam) { + CARBON_DIAGNOSTIC( + RedundantGenericModifier, Error, + "`generic` is redundant here; this binding is a checked generic by " + "default"); + context.emitter().Emit(*generic_token, RedundantGenericModifier); + redundant_modifier = true; + } else if (runtime_token && + state.binding_context == BindingContext::ExplicitParam) { + CARBON_DIAGNOSTIC( + RedundantRuntimeModifier, Error, + "`runtime` is redundant here; this binding is runtime by default"); + context.emitter().Emit(*runtime_token, RedundantRuntimeModifier); + redundant_modifier = true; + } + + return resolved_generic; +} + auto HandleBindingPattern(Context& context) -> void { auto state = context.PopState(); @@ -16,7 +76,7 @@ auto HandleBindingPattern(Context& context) -> void { if (!state.has_error) { CARBON_DIAGNOSTIC( ExpectedBindingPattern, Error, - "expected {0:name|`:`, `:!`, or `:?`} in binding pattern" + "expected {0:name|`:` or `:?`} in binding pattern" "{1:; prefix reserved word with `r#` to form a valid identifier|}", Diagnostics::BoolAsSelect, Diagnostics::BoolAsSelect); context.emitter().Emit(*context.position(), ExpectedBindingPattern, @@ -25,8 +85,10 @@ auto HandleBindingPattern(Context& context) -> void { } }; - // A `template` keyword may precede the name. + // Phase keywords and `ref` may precede the name. auto template_token = context.ConsumeIf(Lex::TokenKind::Template); + auto generic_token = context.ConsumeIf(Lex::TokenKind::Generic); + auto runtime_token = context.ConsumeIf(Lex::TokenKind::Runtime); auto ref_token = context.ConsumeIf(Lex::TokenKind::Ref); if (ref_token && state.in_var_pattern) { CARBON_DIAGNOSTIC(RefInsideVar, Error, "found `ref` inside `var` pattern"); @@ -34,6 +96,23 @@ auto HandleBindingPattern(Context& context) -> void { state.has_error = true; } + // Recover from `unused` written after a phase keyword or `ref` by consuming + // it and wrapping the binding in `unused`, as if it had been written first. + // The misordering is diagnosed later, once we know the modifier is itself + // valid; a redundant or invalid modifier is diagnosed on its own, and we + // don't stack the ordering error on top of it. + std::optional misordered_unused_token; + Lex::TokenKind misordered_unused_modifier = Lex::TokenKind::Unused; + if ((template_token || generic_token || runtime_token || ref_token) && + context.PositionIs(Lex::TokenKind::Unused)) { + misordered_unused_modifier = template_token ? Lex::TokenKind::Template + : generic_token ? Lex::TokenKind::Generic + : runtime_token ? Lex::TokenKind::Runtime + : Lex::TokenKind::Ref; + context.PushState(StateKind::FinishUnusedPattern); + misordered_unused_token = context.ConsumeChecked(Lex::TokenKind::Unused); + } + // The first item should be an identifier, the placeholder `_`, or `self`. std::optional self_token; if (auto identifier = context.ConsumeIf(Lex::TokenKind::Identifier)) { @@ -67,74 +146,123 @@ auto HandleBindingPattern(Context& context) -> void { on_error(/*expected_name=*/true); } - if (auto token_kind = context.PositionKind(); - token_kind.is_binding_pattern_operator()) { - // Add the wrapper node for the `template` keyword if present. - if (template_token) { - if (token_kind != Lex::TokenKind::ColonExclaim && !state.has_error) { - CARBON_DIAGNOSTIC(ExpectedGenericBindingPatternAfterTemplate, Error, - "expected `:!` binding after `template`"); - context.emitter().Emit(*template_token, - ExpectedGenericBindingPatternAfterTemplate); - state.has_error = true; + auto token_kind = context.PositionKind(); + if (!token_kind.is_binding_pattern_operator()) { + if (self_token && !template_token && !generic_token && !runtime_token) { + // A `self` binding may omit its type; checking supplies the implicit + // `Self` type. There is no type node, so this produces a + // `SelfBindingPattern` rather than a `LetBindingPattern`. + if (ref_token) { + context.AddNode(NodeKind::RefBindingName, *ref_token, state.has_error); } - context.AddNode(NodeKind::TemplateBindingName, *template_token, + context.AddNode(NodeKind::SelfBindingPattern, *self_token, state.has_error); - } - if (ref_token) { - if (token_kind != Lex::TokenKind::Colon && !state.has_error) { - CARBON_DIAGNOSTIC(ExpectedRuntimeBindingPatternAfterRef, Error, - "expected `:` binding after `ref`"); - context.emitter().Emit(*ref_token, - ExpectedRuntimeBindingPatternAfterRef); - state.has_error = true; + if (state.has_error) { + context.ReturnErrorOnState(); } - context.AddNode(NodeKind::RefBindingName, *ref_token, state.has_error); + return; } - - switch (token_kind) { - case Lex::TokenKind::Colon: - state.kind = StateKind::BindingPatternFinishAsRegular; - break; - case Lex::TokenKind::ColonExclaim: - state.kind = StateKind::BindingPatternFinishAsGeneric; - break; - case Lex::TokenKind::ColonQuestion: - state.kind = StateKind::BindingPatternFinishAsForm; - break; - default: - CARBON_FATAL("Unexpected token kind"); - } - - // Use the `:`, `:!`, or `:?` for the root node. - state.token = context.Consume(); - - if (token_kind == Lex::TokenKind::ColonExclaim) { - // Add a virtual node before the compile time binding's type - // expression. - context.AddNode(NodeKind::CompileTimeBindingPatternStart, state.token, - state.has_error); - } - - context.PushState(state); - context.PushStateForExpr(PrecedenceGroup::ForType()); - } else if (self_token && !template_token) { - // A `self` binding may omit its type; checking supplies the implicit `Self` - // type. There is no type node, so this produces a `SelfBindingPattern` - // rather than a `LetBindingPattern`. - if (ref_token) { - context.AddNode(NodeKind::RefBindingName, *ref_token, state.has_error); - } - context.AddNode(NodeKind::SelfBindingPattern, *self_token, state.has_error); - if (state.has_error) { - context.ReturnErrorOnState(); - } - } else { on_error(/*expected_name=*/false); // Add a substitute for a type node. context.AddInvalidParse(*context.position()); context.PushState(state, StateKind::BindingPatternFinishAsRegular); + return; } + + // TODO: `:?` introduces a form binding, from pending proposal #5389; proposal + // #7254 suggests replacing it with a `fwd` binding modifier. Until then form + // bindings are handled inline here, and are unaffected by phase keywords and + // contextual defaults. + bool is_form = token_kind == Lex::TokenKind::ColonQuestion; + + bool redundant_modifier = false; + bool resolved_generic = + ResolveBindingPhase(context, state, is_form, template_token, + generic_token, runtime_token, redundant_modifier); + + // `self` is always a runtime receiver binding; its phase never comes from the + // enclosing context's default. Forcing runtime here means that a misplaced + // `self` (in a deduced `[]` list or a compile-time entity's parameters, where + // the default would otherwise be generic) is reported by `check` as a + // misplaced `self` — the relevant error — rather than also producing a + // `ref`-on-generic error from that default. + if (self_token) { + resolved_generic = false; + } + + // `template` and `ref` wrap the binding name, and each is only meaningful on + // a particular kind of binding: `template` on a generic binding, and `ref` on + // a runtime `:` binding. Using one elsewhere is diagnosed and marks the + // binding as errored; we skip its wrapper node rather than attach it to a + // binding that can't hold it, which would leave the parse tree malformed. + if (template_token) { + if (is_form || !resolved_generic) { + if (!state.has_error) { + CARBON_DIAGNOSTIC(ExpectedGenericBindingPatternAfterTemplate, Error, + "`template` is only allowed on a generic binding"); + context.emitter().Emit(*template_token, + ExpectedGenericBindingPatternAfterTemplate); + } + state.has_error = true; + } else { + context.AddNode(NodeKind::TemplateBindingName, *template_token, + state.has_error); + } + } + if (ref_token) { + if (is_form || resolved_generic) { + if (!state.has_error) { + CARBON_DIAGNOSTIC(ExpectedRuntimeBindingPatternAfterRef, Error, + "`ref` is only allowed on a runtime binding"); + context.emitter().Emit(*ref_token, + ExpectedRuntimeBindingPatternAfterRef); + } + state.has_error = true; + } else { + context.AddNode(NodeKind::RefBindingName, *ref_token, state.has_error); + } + } + // Preserve an explicit `runtime` keyword as a node wrapping the binding name, + // so its token is accounted for and `check` sees that the phase was written. + // It applies only to a runtime `:` binding; on a generic or form binding the + // keyword doesn't set the phase and any misuse is diagnosed separately, so no + // node is added there. + if (runtime_token && !is_form && !resolved_generic) { + context.AddNode(NodeKind::RuntimeBindingName, *runtime_token, + state.has_error); + } + + // Now diagnose a misordered `unused` (recovered above), but only for an + // otherwise-valid modifier: a redundant modifier sets `redundant_modifier`, + // and an invalid `template`/`ref` sets `has_error`. Mark the binding in error + // once diagnosed, since recovery reordered the tokens the user wrote. + if (misordered_unused_token && !redundant_modifier && !state.has_error) { + CARBON_DIAGNOSTIC(UnusedAfterBindingModifier, Error, + "`unused` must be written before `{0}`", Lex::TokenKind); + context.emitter().Emit(*misordered_unused_token, UnusedAfterBindingModifier, + misordered_unused_modifier); + state.has_error = true; + } + + if (is_form) { + state.kind = StateKind::BindingPatternFinishAsForm; + } else if (resolved_generic) { + state.kind = StateKind::BindingPatternFinishAsGeneric; + } else { + state.kind = StateKind::BindingPatternFinishAsRegular; + } + + // Use the `:` or `:?` for the root node. + state.token = context.Consume(); + + if (!is_form && resolved_generic) { + // Add a virtual node before the compile time binding's type expression. + context.AddNode(NodeKind::CompileTimeBindingPatternStart, state.token, + state.has_error); + } + + context.PushState(state); + context.PushStateForExpr(PrecedenceGroup::ForType()); } // Handles BindingPatternFinishAs(Generic|Regular|Form). @@ -147,7 +275,7 @@ static auto HandleBindingPatternFinish(Context& context, StateKind finish_kind) node_kind = NodeKind::VarBindingPattern; if (finish_kind != StateKind::BindingPatternFinishAsRegular) { CARBON_DIAGNOSTIC(NonRegularBindingInVarDecl, Error, - "found {0:`:!`|`:?`} pattern inside `var` pattern", + "found {0:generic|`:?`} binding inside `var` pattern", Diagnostics::BoolAsSelect); context.emitter().Emit( *context.position(), NonRegularBindingInVarDecl, diff --git a/toolchain/parse/handle_choice.cpp b/toolchain/parse/handle_choice.cpp index 2432a281f68c..d4f1cace9533 100644 --- a/toolchain/parse/handle_choice.cpp +++ b/toolchain/parse/handle_choice.cpp @@ -10,7 +10,10 @@ auto HandleChoiceIntroducer(Context& context) -> void { auto state = context.PopState(); context.PushState(state, StateKind::ChoiceDefinitionStart); - context.PushState(StateKind::DeclNameAndParams, state.token); + // Choice alternative parameters, parsed separately below, are runtime by + // default, unlike the choice type parameters handled here. + context.PushState(StateKind::DeclNameAndParams, state.token, + BindingContext::CompileTimeEntityParam); } auto HandleChoiceDefinitionStart(Context& context) -> void { diff --git a/toolchain/parse/handle_decl_name_and_params.cpp b/toolchain/parse/handle_decl_name_and_params.cpp index 79b328b97052..33a856d74fdb 100644 --- a/toolchain/parse/handle_decl_name_and_params.cpp +++ b/toolchain/parse/handle_decl_name_and_params.cpp @@ -8,6 +8,28 @@ namespace Carbon::Parse { +// Determines the binding context for an explicit `()` parameter list beginning +// at the current position. A list that is a name qualifier (its matched `)` is +// immediately followed by `.`) names a compile-time entity, so its parameters +// use the compile-time-entity context; otherwise the list uses the enclosing +// declaration's default `decl_context`. +static auto ExplicitParamListContext(Context& context, + BindingContext decl_context) + -> BindingContext { + // A compile-time entity's parameters are compile-time whether or not this + // list is a name qualifier, so there is no need to look ahead for the `.`. + if (decl_context == BindingContext::CompileTimeEntityParam) { + return decl_context; + } + auto open_paren = *context.position(); + auto close_paren = context.tokens().GetMatchedClosingToken(open_paren); + auto after_close = Lex::TokenIndex(close_paren.index + 1); + if (context.tokens().GetKind(after_close) == Lex::TokenKind::Period) { + return BindingContext::CompileTimeEntityParam; + } + return decl_context; +} + // Adds a leaf node for the name, and updates the state stack for parameter // handling. static auto HandleName(Context& context, Context::State state, @@ -21,21 +43,27 @@ static auto HandleName(Context& context, Context::State state, context.AddNode(not_before_params_qualifier_kind, context.ConsumeChecked(Lex::TokenKind::Period), state.has_error); - context.PushState(StateKind::DeclNameAndParams); + // Carry the declaration's binding context across the qualified name so + // the final parameter list uses the declaration's default phase. + context.PushState(StateKind::DeclNameAndParams, *context.position(), + state.binding_context); break; case Lex::TokenKind::OpenSquareBracket: context.AddLeafNode(before_params_kind, name_token); state.kind = StateKind::DeclNameAndParamsAfterImplicit; context.PushState(state); - context.PushState(StateKind::PatternListAsImplicit); + context.PushState(StateKind::PatternListAsImplicit, *context.position(), + BindingContext::DeducedParam); break; case Lex::TokenKind::OpenParen: context.AddLeafNode(before_params_kind, name_token); state.kind = StateKind::DeclNameAndParamsAfterParams; context.PushState(state); - context.PushState(StateKind::PatternListAsExplicit); + context.PushState( + StateKind::PatternListAsExplicit, *context.position(), + ExplicitParamListContext(context, state.binding_context)); break; case Lex::TokenKind::MinusGreater: @@ -91,7 +119,8 @@ auto HandleDeclNameAndParamsAfterImplicit(Context& context) -> void { return; } - context.PushState(StateKind::PatternListAsExplicit); + context.PushState(StateKind::PatternListAsExplicit, *context.position(), + ExplicitParamListContext(context, state.binding_context)); } auto HandleDeclNameAndParamsAfterParams(Context& context) -> void { @@ -102,7 +131,8 @@ auto HandleDeclNameAndParamsAfterParams(Context& context) -> void { NodeKind::IdentifierNameMaybeBeforeSignature); context.AddNode(NodeKind::IdentifierNameQualifierWithParams, *period, state.has_error); - context.PushState(StateKind::DeclNameAndParams); + context.PushState(StateKind::DeclNameAndParams, *context.position(), + state.binding_context); } } diff --git a/toolchain/parse/handle_decl_scope_loop.cpp b/toolchain/parse/handle_decl_scope_loop.cpp index acb7bc5e682b..233c5bbcd10c 100644 --- a/toolchain/parse/handle_decl_scope_loop.cpp +++ b/toolchain/parse/handle_decl_scope_loop.cpp @@ -308,6 +308,11 @@ static auto HandleDecl(Context& context, DeclContextKind decl_context_kind) saw_modifier = true; } if (!TryHandleAsDecl(context, state, saw_modifier, decl_context_kind)) { + // TODO: A phase keyword written before the introducer, such as `generic + // let` or `template let` where `let` must come first, lands here as an + // unrecognized declaration. Detect a phase keyword followed by an + // introducer and diagnose the ordering specifically, recovering as if the + // introducer came first. HandleUnrecognizedDecl(context, state.subtree_start); } } diff --git a/toolchain/parse/handle_impl.cpp b/toolchain/parse/handle_impl.cpp index f49efb88050c..aa03a3e7cc5b 100644 --- a/toolchain/parse/handle_impl.cpp +++ b/toolchain/parse/handle_impl.cpp @@ -29,7 +29,8 @@ auto HandleImplAfterIntroducer(Context& context) -> void { context.PushState(StateKind::ImplAfterForall); context.AddLeafNode(NodeKind::Forall, context.Consume()); if (context.PositionIs(Lex::TokenKind::OpenSquareBracket)) { - context.PushState(StateKind::PatternListAsImplicit); + context.PushState(StateKind::PatternListAsImplicit, *context.position(), + BindingContext::DeducedParam); } else { CARBON_DIAGNOSTIC(ImplExpectedAfterForall, Error, "expected `[` after `forall` in `impl` declaration"); diff --git a/toolchain/parse/handle_import_and_package.cpp b/toolchain/parse/handle_import_and_package.cpp index 7dfccd3664da..c7f8e1d3b086 100644 --- a/toolchain/parse/handle_import_and_package.cpp +++ b/toolchain/parse/handle_import_and_package.cpp @@ -221,7 +221,8 @@ auto HandleExportName(Context& context) -> void { RestrictExportToApi(context, state); context.PushState(state, StateKind::ExportNameFinish); - context.PushState(StateKind::DeclNameAndParams, state.token); + context.PushState(StateKind::DeclNameAndParams, state.token, + BindingContext::CompileTimeEntityParam); } auto HandleExportNameFinish(Context& context) -> void { diff --git a/toolchain/parse/handle_let.cpp b/toolchain/parse/handle_let.cpp index d90c7111e8ba..a8609cde23a3 100644 --- a/toolchain/parse/handle_let.cpp +++ b/toolchain/parse/handle_let.cpp @@ -19,33 +19,47 @@ auto HandleLet(Context& context) -> void { context.PushStateForPattern(StateKind::Pattern, /*in_var_pattern=*/false, /*in_unused_pattern=*/false, + BindingContext::ExplicitParam, PrecedenceGroup::ForTopLevelPattern()); } auto HandleAssociatedConstant(Context& context) -> void { auto state = context.PopState(); - // Parse the associated constant pattern: identifier :! type + // Parse the associated constant pattern: identifier : type. The binding is a + // checked generic by context, so no phase keyword is used. auto identifier = context.ConsumeIf(Lex::TokenKind::Identifier); if (!identifier) { - CARBON_DIAGNOSTIC(ExpectedAssociatedConstantIdentifier, Error, - "expected identifier in associated constant declaration"); - context.emitter().Emit(*context.position(), - ExpectedAssociatedConstantIdentifier); + auto kind = context.PositionKind(); + if (kind == Lex::TokenKind::Generic || kind == Lex::TokenKind::Runtime || + kind == Lex::TokenKind::Template) { + // Diagnose a phase keyword specifically, rather than reporting a missing + // associated constant name. + CARBON_DIAGNOSTIC( + PhaseKeywordInAssociatedConstant, Error, + "phase keyword is not allowed on an associated constant"); + context.emitter().Emit(*context.position(), + PhaseKeywordInAssociatedConstant); + } else { + CARBON_DIAGNOSTIC( + ExpectedAssociatedConstantIdentifier, Error, + "expected identifier in associated constant declaration"); + context.emitter().Emit(*context.position(), + ExpectedAssociatedConstantIdentifier); + } state.has_error = true; } - auto colon_exclaim = context.ConsumeIf(Lex::TokenKind::ColonExclaim); - if (identifier && !colon_exclaim) { - CARBON_DIAGNOSTIC(ExpectedAssociatedConstantColonExclaim, Error, - "found runtime binding pattern in associated constant " - "declaration; expected a `:!` binding"); + auto colon = context.ConsumeIf(Lex::TokenKind::Colon); + if (identifier && !colon) { + CARBON_DIAGNOSTIC(ExpectedAssociatedConstantColon, Error, + "expected `:` in associated constant declaration"); context.emitter().Emit(*context.position(), - ExpectedAssociatedConstantColonExclaim); + ExpectedAssociatedConstantColon); state.has_error = true; } - if (!identifier || !colon_exclaim) { + if (!identifier || !colon) { auto end_token = context.SkipPastLikelyEnd(*(context.position() - 1)); context.AddNode(NodeKind::AssociatedConstantDecl, end_token, /*has_error=*/true); @@ -54,7 +68,7 @@ auto HandleAssociatedConstant(Context& context) -> void { } context.AddLeafNode(NodeKind::IdentifierNameNotBeforeSignature, *identifier); - state.token = *colon_exclaim; + state.token = *colon; context.PushState(state, StateKind::LetFinishAsAssociatedConstant); context.PushState(state, StateKind::LetAfterPatternAsAssociatedConstant); context.PushState(StateKind::Expr); diff --git a/toolchain/parse/handle_match.cpp b/toolchain/parse/handle_match.cpp index 6d41bd515971..75066ede1d2f 100644 --- a/toolchain/parse/handle_match.cpp +++ b/toolchain/parse/handle_match.cpp @@ -144,6 +144,7 @@ auto HandleMatchCaseIntroducer(Context& context) -> void { context.PushState(state, StateKind::MatchCaseAfterPattern); context.PushStateForPattern(StateKind::Pattern, /*in_var_pattern=*/false, /*in_unused_pattern=*/false, + BindingContext::ExplicitParam, PrecedenceGroup::ForTopLevelPattern()); } diff --git a/toolchain/parse/handle_namespace.cpp b/toolchain/parse/handle_namespace.cpp index cef80b0f19ca..4a21e3fe2bd5 100644 --- a/toolchain/parse/handle_namespace.cpp +++ b/toolchain/parse/handle_namespace.cpp @@ -10,7 +10,8 @@ namespace Carbon::Parse { auto HandleNamespace(Context& context) -> void { auto state = context.PopState(); context.PushState(state, StateKind::NamespaceFinish); - context.PushState(StateKind::DeclNameAndParams, state.token); + context.PushState(StateKind::DeclNameAndParams, state.token, + BindingContext::CompileTimeEntityParam); } auto HandleNamespaceFinish(Context& context) -> void { diff --git a/toolchain/parse/handle_pattern.cpp b/toolchain/parse/handle_pattern.cpp index de51c8111b6c..560682d6c664 100644 --- a/toolchain/parse/handle_pattern.cpp +++ b/toolchain/parse/handle_pattern.cpp @@ -13,25 +13,31 @@ auto HandlePattern(Context& context) -> void { case Lex::TokenKind::OpenParen: context.PushStateForPattern(StateKind::PatternListAsTuple, state.in_var_pattern, state.in_unused_pattern, + state.binding_context, state.ambient_precedence); break; case Lex::TokenKind::Var: context.PushStateForPattern(StateKind::VariablePattern, state.in_var_pattern, state.in_unused_pattern, + state.binding_context, state.ambient_precedence); break; case Lex::TokenKind::Unused: context.PushStateForPattern(StateKind::UnusedPattern, state.in_var_pattern, state.in_unused_pattern, + state.binding_context, state.ambient_precedence); break; case Lex::TokenKind::Template: + case Lex::TokenKind::Generic: + case Lex::TokenKind::Runtime: case Lex::TokenKind::Ref: // `self` is always a binding, even when its type is omitted (and so is not // followed by a `:`). case Lex::TokenKind::SelfValueIdentifier: context.PushStateForPattern(StateKind::BindingPattern, state.in_var_pattern, state.in_unused_pattern, + state.binding_context, state.ambient_precedence); break; default: @@ -40,7 +46,8 @@ auto HandlePattern(Context& context) -> void { .is_binding_pattern_operator()) { context.PushStateForPattern( StateKind::BindingPattern, state.in_var_pattern, - state.in_unused_pattern, state.ambient_precedence); + state.in_unused_pattern, state.binding_context, + state.ambient_precedence); break; } context.PushState(StateKind::ExprPattern); diff --git a/toolchain/parse/handle_pattern_list.cpp b/toolchain/parse/handle_pattern_list.cpp index 5f05174ae369..51064b304a28 100644 --- a/toolchain/parse/handle_pattern_list.cpp +++ b/toolchain/parse/handle_pattern_list.cpp @@ -13,10 +13,10 @@ static auto HandlePatternListElement(Context& context, StateKind pattern_state, auto state = context.PopState(); context.PushStateForPattern(finish_state_kind, state.in_var_pattern, - state.in_unused_pattern, + state.in_unused_pattern, state.binding_context, state.ambient_precedence); context.PushStateForPattern(pattern_state, state.in_var_pattern, - state.in_unused_pattern, + state.in_unused_pattern, state.binding_context, state.ambient_precedence); } @@ -60,7 +60,7 @@ static auto HandlePatternListElementFinish(Context& context, if (list_token_kind == Context::ListTokenKind::Comma) { context.PushStateForPattern(param_state_kind, state.in_var_pattern, - state.in_unused_pattern, + state.in_unused_pattern, state.binding_context, state.ambient_precedence); } } @@ -93,12 +93,12 @@ static auto HandlePatternList(Context& context, NodeKind node_kind, context.PushStateForPattern( empty ? finish_state_empty : finish_state_nonempty, state.in_var_pattern, - state.in_unused_pattern, state.ambient_precedence); + state.in_unused_pattern, state.binding_context, state.ambient_precedence); context.AddLeafNode(node_kind, open_token); if (!empty) { context.PushStateForPattern(param_state, state.in_var_pattern, - state.in_unused_pattern, + state.in_unused_pattern, state.binding_context, PrecedenceGroup::ForTopLevelExpr()); } } diff --git a/toolchain/parse/handle_statement.cpp b/toolchain/parse/handle_statement.cpp index 2785b635fe20..137d4296895b 100644 --- a/toolchain/parse/handle_statement.cpp +++ b/toolchain/parse/handle_statement.cpp @@ -119,6 +119,7 @@ auto HandleStatementForHeader(Context& context) -> void { context.PushState(state); context.PushStateForPattern(StateKind::Pattern, /*in_var_pattern=*/false, /*in_unused_pattern=*/false, + BindingContext::ExplicitParam, PrecedenceGroup::ForTopLevelPattern()); } diff --git a/toolchain/parse/handle_type.cpp b/toolchain/parse/handle_type.cpp index 4403fe80d5c4..f85315297bab 100644 --- a/toolchain/parse/handle_type.cpp +++ b/toolchain/parse/handle_type.cpp @@ -13,7 +13,8 @@ static auto HandleTypeAfterIntroducer(Context& context, -> void { auto state = context.PopState(); context.PushState(state, after_params_state_kind); - context.PushState(StateKind::DeclNameAndParams, state.token); + context.PushState(StateKind::DeclNameAndParams, state.token, + BindingContext::CompileTimeEntityParam); } auto HandleTypeAfterIntroducerAsClass(Context& context) -> void { diff --git a/toolchain/parse/handle_unused.cpp b/toolchain/parse/handle_unused.cpp index 79fe87227083..a7e5f15f2b28 100644 --- a/toolchain/parse/handle_unused.cpp +++ b/toolchain/parse/handle_unused.cpp @@ -19,7 +19,7 @@ auto HandleUnusedPattern(Context& context) -> void { context.ConsumeChecked(Lex::TokenKind::Unused); context.PushStateForPattern(StateKind::Pattern, state.in_var_pattern, - /*in_unused_pattern=*/true, + /*in_unused_pattern=*/true, state.binding_context, state.ambient_precedence); } diff --git a/toolchain/parse/handle_var.cpp b/toolchain/parse/handle_var.cpp index fa0541cc4934..f6deb7d1a46e 100644 --- a/toolchain/parse/handle_var.cpp +++ b/toolchain/parse/handle_var.cpp @@ -27,6 +27,7 @@ static auto HandleVar(Context& context, StateKind finish_state_kind, context.PushStateForPattern(StateKind::Pattern, /*in_var_pattern=*/true, /*in_unused_pattern=*/false, + BindingContext::ExplicitParam, PrecedenceGroup::ForTopLevelPattern()); } @@ -97,9 +98,10 @@ auto HandleVariablePattern(Context& context) -> void { context.PushState(state); context.ConsumeChecked(Lex::TokenKind::Var); - context.PushStateForPattern(StateKind::Pattern, /*in_var_pattern=*/true, - state.in_unused_pattern, - state.ambient_precedence); + // A `var` binding is always runtime, regardless of the enclosing context. + context.PushStateForPattern( + StateKind::Pattern, /*in_var_pattern=*/true, state.in_unused_pattern, + BindingContext::ExplicitParam, state.ambient_precedence); } auto HandleFinishVariablePattern(Context& context) -> void { diff --git a/toolchain/parse/node_kind.def b/toolchain/parse/node_kind.def index 885109894162..6d493818f16a 100644 --- a/toolchain/parse/node_kind.def +++ b/toolchain/parse/node_kind.def @@ -183,6 +183,7 @@ CARBON_PARSE_NODE_KIND(ArrayExprComma) CARBON_PARSE_NODE_KIND(ArrayExpr) CARBON_PARSE_NODE_KIND(RefBindingName) +CARBON_PARSE_NODE_KIND(RuntimeBindingName) CARBON_PARSE_NODE_KIND(UnusedPattern) CARBON_PARSE_NODE_KIND(LetBindingPattern) CARBON_PARSE_NODE_KIND(SelfBindingPattern) diff --git a/toolchain/parse/testdata/choice/fail_alternative_with_implicit_params.carbon b/toolchain/parse/testdata/choice/fail_alternative_with_implicit_params.carbon index ba4e7dc512b5..e3ca63fd98d6 100644 --- a/toolchain/parse/testdata/choice/fail_alternative_with_implicit_params.carbon +++ b/toolchain/parse/testdata/choice/fail_alternative_with_implicit_params.carbon @@ -10,10 +10,10 @@ choice X { // CHECK:STDERR: fail_alternative_with_implicit_params.carbon:[[@LINE+4]]:4: error: expected `,` or `}` [UnexpectedTokenAfterListElement] - // CHECK:STDERR: A[T:! type](value: T) + // CHECK:STDERR: A[T: type](value: T) // CHECK:STDERR: ^ // CHECK:STDERR: - A[T:! type](value: T) + A[T: type](value: T) } // CHECK:STDOUT: - filename: fail_alternative_with_implicit_params.carbon diff --git a/toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon b/toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon index 18211145337a..e0dfa6540b7b 100644 --- a/toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon +++ b/toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon @@ -8,11 +8,11 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon -// CHECK:STDERR: fail_missing_definition_parameterized.carbon:[[@LINE+4]]:35: error: choice definition expected [ExpectedChoiceDefinition] -// CHECK:STDERR: choice MissingDefinition(T:! type); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_missing_definition_parameterized.carbon:[[@LINE+4]]:34: error: choice definition expected [ExpectedChoiceDefinition] +// CHECK:STDERR: choice MissingDefinition(T: type); +// CHECK:STDERR: ^ // CHECK:STDERR: -choice MissingDefinition(T:! type); +choice MissingDefinition(T: type); // CHECK:STDOUT: - filename: fail_missing_definition_parameterized.carbon // CHECK:STDOUT: parse_tree: [ @@ -21,9 +21,9 @@ choice MissingDefinition(T:! type); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'MissingDefinition'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ChoiceDefinitionStart', text: ';', has_error: yes, subtree_size: 9}, // CHECK:STDOUT: {kind: 'ChoiceDefinition', text: ';', has_error: yes, subtree_size: 10}, diff --git a/toolchain/parse/testdata/choice/parameterized.carbon b/toolchain/parse/testdata/choice/parameterized.carbon index 9fbed8e48093..fcfcc72d40ac 100644 --- a/toolchain/parse/testdata/choice/parameterized.carbon +++ b/toolchain/parse/testdata/choice/parameterized.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/choice/parameterized.carbon -choice OptionalElement(T:! type) { +choice OptionalElement(T: type) { Element(value: T), None, } @@ -20,9 +20,9 @@ choice OptionalElement(T:! type) { // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'OptionalElement'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ChoiceDefinitionStart', text: '{', subtree_size: 9}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Element'}, diff --git a/toolchain/parse/testdata/class/fail_var_name.carbon b/toolchain/parse/testdata/class/fail_var_name.carbon index a5244538b3d3..c11c17f14246 100644 --- a/toolchain/parse/testdata/class/fail_var_name.carbon +++ b/toolchain/parse/testdata/class/fail_var_name.carbon @@ -55,11 +55,11 @@ class C { // CHECK:STDERR: var name name: C; - // CHECK:STDERR: fail_var_name.carbon:[[@LINE+4]]:15: error: found `:!` pattern inside `var` pattern [NonRegularBindingInVarDecl] - // CHECK:STDERR: var name:! C; - // CHECK:STDERR: ^ + // CHECK:STDERR: fail_var_name.carbon:[[@LINE+4]]:22: error: found generic binding inside `var` pattern [NonRegularBindingInVarDecl] + // CHECK:STDERR: var generic name: C; + // CHECK:STDERR: ^ // CHECK:STDERR: - var name:! C; + var generic name: C; } // CHECK:STDOUT: - filename: fail_var_name.carbon @@ -112,9 +112,9 @@ class C { // CHECK:STDOUT: {kind: 'VariableDecl', text: ';', has_error: yes, subtree_size: 4}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'name'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'C'}, -// CHECK:STDOUT: {kind: 'VarBindingPattern', text: ':!', has_error: yes, subtree_size: 4}, +// CHECK:STDOUT: {kind: 'VarBindingPattern', text: ':', has_error: yes, subtree_size: 4}, // CHECK:STDOUT: {kind: 'VariablePattern', text: 'var', has_error: yes, subtree_size: 5}, // CHECK:STDOUT: {kind: 'VariableDecl', text: ';', subtree_size: 7}, // CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 53}, diff --git a/toolchain/parse/testdata/function/declaration.carbon b/toolchain/parse/testdata/function/declaration.carbon index 49c7a918c2c9..052c361b07ba 100644 --- a/toolchain/parse/testdata/function/declaration.carbon +++ b/toolchain/parse/testdata/function/declaration.carbon @@ -165,7 +165,7 @@ fn ComplexFormParam(x:? X.Y(Z)); // --- fail_ref_on_form_parameter.carbon -// CHECK:STDERR: fail_ref_on_form_parameter.carbon:[[@LINE+4]]:6: error: expected `:` binding after `ref` [ExpectedRuntimeBindingPatternAfterRef] +// CHECK:STDERR: fail_ref_on_form_parameter.carbon:[[@LINE+4]]:6: error: `ref` is only allowed on a runtime binding [ExpectedRuntimeBindingPatternAfterRef] // CHECK:STDERR: fn F(ref x:? Form); // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -173,7 +173,7 @@ fn F(ref x:? Form); // --- fail_form_within_var.carbon -// CHECK:STDERR: fail_form_within_var.carbon:[[@LINE+4]]:26: error: found `:?` pattern inside `var` pattern [NonRegularBindingInVarDecl] +// CHECK:STDERR: fail_form_within_var.carbon:[[@LINE+4]]:26: error: found `:?` binding inside `var` pattern [NonRegularBindingInVarDecl] // CHECK:STDERR: fn FormInVar(var x:? Form); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -226,17 +226,19 @@ fn ComplexReturnForm() ->? X.Y(Z); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'foo'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 11}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 14}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 16}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: no_params.carbon @@ -473,12 +475,11 @@ fn ComplexReturnForm() ->? X.Y(Z); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'F'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'x'}, -// CHECK:STDOUT: {kind: 'RefBindingName', text: 'ref', has_error: yes, subtree_size: 2}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'x'}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Form'}, -// CHECK:STDOUT: {kind: 'FormBindingPattern', text: ':?', has_error: yes, subtree_size: 4}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 6}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'FormBindingPattern', text: ':?', has_error: yes, subtree_size: 3}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 5}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 8}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: fail_form_within_var.carbon diff --git a/toolchain/parse/testdata/function/fail_template_form_param.carbon b/toolchain/parse/testdata/function/fail_template_form_param.carbon new file mode 100644 index 000000000000..c620e0444274 --- /dev/null +++ b/toolchain/parse/testdata/function/fail_template_form_param.carbon @@ -0,0 +1,30 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/parse/testdata/function/fail_template_form_param.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/fail_template_form_param.carbon + +// `template` cannot be combined with a `:?` form binding. +// CHECK:STDERR: fail_template_form_param.carbon:[[@LINE+4]]:6: error: `template` is only allowed on a generic binding [ExpectedGenericBindingPatternAfterTemplate] +// CHECK:STDERR: fn F(template x:? Form); +// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: +fn F(template x:? Form); + +// CHECK:STDOUT: - filename: fail_template_form_param.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, +// CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'F'}, +// CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'x'}, +// CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Form'}, +// CHECK:STDOUT: {kind: 'FormBindingPattern', text: ':?', has_error: yes, subtree_size: 3}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 5}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/deduced_params/no_parens.carbon b/toolchain/parse/testdata/generics/deduced_params/no_parens.carbon index ef55cd0033e1..5b1619c0ab40 100644 --- a/toolchain/parse/testdata/generics/deduced_params/no_parens.carbon +++ b/toolchain/parse/testdata/generics/deduced_params/no_parens.carbon @@ -35,11 +35,12 @@ interface Bar[].Baz[] {} // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 9}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: interface.carbon @@ -54,12 +55,13 @@ interface Bar[].Baz[] {} // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 8}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 10}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: qualified.carbon diff --git a/toolchain/parse/testdata/generics/deduced_params/one.carbon b/toolchain/parse/testdata/generics/deduced_params/one.carbon index 5ac7975a08e4..c509da46c7cc 100644 --- a/toolchain/parse/testdata/generics/deduced_params/one.carbon +++ b/toolchain/parse/testdata/generics/deduced_params/one.carbon @@ -18,23 +18,25 @@ interface Bar[a: i32]() {} // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 11}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 10}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 12}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/deduced_params/one_suffix_comma.carbon b/toolchain/parse/testdata/generics/deduced_params/one_suffix_comma.carbon index d452f4a3972b..6bcc73f90f3c 100644 --- a/toolchain/parse/testdata/generics/deduced_params/one_suffix_comma.carbon +++ b/toolchain/parse/testdata/generics/deduced_params/one_suffix_comma.carbon @@ -18,25 +18,27 @@ interface Bar[a: i32,]() {} // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 7}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 12}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 7}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 11}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 13}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/deduced_params/six.carbon b/toolchain/parse/testdata/generics/deduced_params/six.carbon index ff19679483cc..b9ea46c7b092 100644 --- a/toolchain/parse/testdata/generics/deduced_params/six.carbon +++ b/toolchain/parse/testdata/generics/deduced_params/six.carbon @@ -18,63 +18,75 @@ interface Bar[a: i32, b: i32, c: i32, d: i32, e: i32, f: i32]() {} // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'c'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'c'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'd'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'd'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'e'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'e'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'f'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'f'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 25}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 31}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 30}, +// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 36}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'c'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'c'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'd'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'd'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'e'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'e'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'f'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'f'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 25}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 31}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 30}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 31}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 36}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 37}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/deduced_params/two.carbon b/toolchain/parse/testdata/generics/deduced_params/two.carbon index 867e0a57d247..5a1ab9e1c921 100644 --- a/toolchain/parse/testdata/generics/deduced_params/two.carbon +++ b/toolchain/parse/testdata/generics/deduced_params/two.carbon @@ -18,31 +18,35 @@ interface Bar[a: i32, b: i32]() {} // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 11}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 14}, +// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 16}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 11}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 14}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 15}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 16}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 17}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/deduced_params/two_suffix_comma.carbon b/toolchain/parse/testdata/generics/deduced_params/two_suffix_comma.carbon index f4acd5a30e0e..1640d8ccff10 100644 --- a/toolchain/parse/testdata/generics/deduced_params/two_suffix_comma.carbon +++ b/toolchain/parse/testdata/generics/deduced_params/two_suffix_comma.carbon @@ -18,33 +18,37 @@ interface Bar[a: i32, b: i32,]() {} // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 12}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 15}, +// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 17}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 12}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 15}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 16}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 17}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 18}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/generic_params/basic.carbon b/toolchain/parse/testdata/generics/generic_params/basic.carbon index fa916899c347..9e034e5ea24b 100644 --- a/toolchain/parse/testdata/generics/generic_params/basic.carbon +++ b/toolchain/parse/testdata/generics/generic_params/basic.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/generics/generic_params/basic.carbon -fn foo(a:! i32); +fn foo(generic a: i32); // CHECK:STDOUT: - filename: basic.carbon // CHECK:STDOUT: parse_tree: [ @@ -17,9 +17,9 @@ fn foo(a:! i32); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'foo'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 9}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, diff --git a/toolchain/parse/testdata/generics/generic_params/fail_template_no_param.carbon b/toolchain/parse/testdata/generics/generic_params/fail_template_no_param.carbon index 2d053a1317dc..7c676c5e2264 100644 --- a/toolchain/parse/testdata/generics/generic_params/fail_template_no_param.carbon +++ b/toolchain/parse/testdata/generics/generic_params/fail_template_no_param.carbon @@ -8,37 +8,31 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/generics/generic_params/fail_template_no_param.carbon -// CHECK:STDERR: fail_template_no_param.carbon:[[@LINE+4]]:15: error: expected name in binding pattern [ExpectedBindingPattern] +// --- fail_template_before_type.carbon + +// CHECK:STDERR: fail_template_before_type.carbon:[[@LINE+4]]:15: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: fn A(template i32); // CHECK:STDERR: ^~~ // CHECK:STDERR: fn A(template i32); -// CHECK:STDERR: fail_template_no_param.carbon:[[@LINE+4]]:6: error: expected `:!` binding after `template` [ExpectedGenericBindingPatternAfterTemplate] -// CHECK:STDERR: fn B(template a: i32); -// CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: -fn B(template a: i32); +// --- fail_template_no_name.carbon -// CHECK:STDERR: fail_template_no_param.carbon:[[@LINE+4]]:14: error: expected name in binding pattern [ExpectedBindingPattern] +// CHECK:STDERR: fail_template_no_name.carbon:[[@LINE+4]]:14: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: fn C(template); // CHECK:STDERR: ^ // CHECK:STDERR: fn C(template); -// CHECK:STDERR: fail_template_no_param.carbon:[[@LINE+4]]:14: error: expected name in binding pattern [ExpectedBindingPattern] -// CHECK:STDERR: fn D(template:! i32); -// CHECK:STDERR: ^~ -// CHECK:STDERR: -fn D(template:! i32); +// --- fail_reserved_word_after_generic.carbon -// CHECK:STDERR: fail_template_no_param.carbon:[[@LINE+4]]:14: error: expected name in binding pattern [ExpectedBindingPattern] -// CHECK:STDERR: fn E(template:! i32); -// CHECK:STDERR: ^~ +// CHECK:STDERR: fail_reserved_word_after_generic.carbon:[[@LINE+4]]:22: error: expected name in binding pattern; prefix reserved word with `r#` to form a valid identifier [ExpectedBindingPattern] +// CHECK:STDERR: fn E(generic template: i32); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn E(template:! i32); +fn E(generic template: i32); -// CHECK:STDOUT: - filename: fail_template_no_param.carbon +// CHECK:STDOUT: - filename: fail_template_before_type.carbon // CHECK:STDOUT: parse_tree: [ // CHECK:STDOUT: {kind: 'FileStart', text: ''}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, @@ -49,15 +43,11 @@ fn E(template:! i32); // CHECK:STDOUT: {kind: 'LetBindingPattern', text: 'template', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 5}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 8}, -// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'B'}, -// CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, -// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', has_error: yes, subtree_size: 2}, -// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', has_error: yes, subtree_size: 4}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 6}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: fail_template_no_name.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'C'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, @@ -66,25 +56,19 @@ fn E(template:! i32); // CHECK:STDOUT: {kind: 'LetBindingPattern', text: 'template', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 5}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 8}, -// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'D'}, -// CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: ':!', has_error: yes}, -// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', has_error: yes, subtree_size: 2}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', has_error: yes, subtree_size: 3}, -// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 7}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: fail_reserved_word_after_generic.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'E'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: ':!', has_error: yes}, -// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', has_error: yes, subtree_size: 2}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', has_error: yes, subtree_size: 3}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'template'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 7}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 9}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/generic_params/template.carbon b/toolchain/parse/testdata/generics/generic_params/template.carbon index 1c7621b80898..6bda515d3c81 100644 --- a/toolchain/parse/testdata/generics/generic_params/template.carbon +++ b/toolchain/parse/testdata/generics/generic_params/template.carbon @@ -10,27 +10,27 @@ // --- basic.carbon -fn foo(template a:! i32); +fn foo(template a: i32); // --- fail_template_ref.carbon -// CHECK:STDERR: fail_template_ref.carbon:[[@LINE+4]]:17: error: expected `:` binding after `ref` [ExpectedRuntimeBindingPatternAfterRef] -// CHECK:STDERR: fn foo(template ref a:! i32); +// CHECK:STDERR: fail_template_ref.carbon:[[@LINE+4]]:17: error: `ref` is only allowed on a runtime binding [ExpectedRuntimeBindingPatternAfterRef] +// CHECK:STDERR: fn foo(template ref a: i32); // CHECK:STDERR: ^~~ // CHECK:STDERR: -fn foo(template ref a:! i32); +fn foo(template ref a: i32); -// CHECK:STDERR: fail_template_ref.carbon:[[@LINE+4]]:8: error: expected `:!` binding after `template` [ExpectedGenericBindingPatternAfterTemplate] +// CHECK:STDERR: fail_template_ref.carbon:[[@LINE+4]]:17: error: `ref` is only allowed on a runtime binding [ExpectedRuntimeBindingPatternAfterRef] // CHECK:STDERR: fn foo(template ref a: i32); -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: ^~~ // CHECK:STDERR: fn foo(template ref a: i32); // CHECK:STDERR: fail_template_ref.carbon:[[@LINE+4]]:12: error: expected name in binding pattern [ExpectedBindingPattern] -// CHECK:STDERR: fn foo(ref template a:! i32); +// CHECK:STDERR: fn foo(ref template a: i32); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -fn foo(ref template a:! i32); +fn foo(ref template a: i32); // CHECK:STDOUT: - filename: basic.carbon // CHECK:STDOUT: parse_tree: [ @@ -40,9 +40,9 @@ fn foo(ref template a:! i32); // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, // CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 5}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 7}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 10}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, @@ -53,22 +53,21 @@ fn foo(ref template a:! i32); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'foo'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, -// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'RefBindingName', text: 'ref', has_error: yes, subtree_size: 3}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', has_error: yes, subtree_size: 4}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 6}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 8}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 5}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 7}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 10}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'foo'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, -// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', has_error: yes, subtree_size: 2}, -// CHECK:STDOUT: {kind: 'RefBindingName', text: 'ref', has_error: yes, subtree_size: 3}, +// CHECK:STDOUT: {kind: 'TemplateBindingName', text: 'template', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', has_error: yes, subtree_size: 5}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 5}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 7}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 10}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, diff --git a/toolchain/parse/testdata/generics/impl/fail_impl.carbon b/toolchain/parse/testdata/generics/impl/fail_impl.carbon index ea5cb065221b..4f5f98e7ebd7 100644 --- a/toolchain/parse/testdata/generics/impl/fail_impl.carbon +++ b/toolchain/parse/testdata/generics/impl/fail_impl.carbon @@ -66,23 +66,23 @@ impl forall [invalid] i8; // CHECK:STDERR: impl forall f16 as Quux; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:27: error: expected `as` in `impl` declaration [ImplExpectedAs] -// CHECK:STDERR: impl forall [T:! type] str; -// CHECK:STDERR: ^ -// CHECK:STDERR: -impl forall [T:! type] str; - // CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:26: error: expected `as` in `impl` declaration [ImplExpectedAs] -// CHECK:STDERR: impl forall [T:! type] T missing_as; -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: impl forall [T: type] str; +// CHECK:STDERR: ^ // CHECK:STDERR: -impl forall [T:! type] T missing_as; +impl forall [T: type] str; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:39: error: `impl` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition] -// CHECK:STDERR: impl forall [T:! type] T as Interface extra; -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:25: error: expected `as` in `impl` declaration [ImplExpectedAs] +// CHECK:STDERR: impl forall [T: type] T missing_as; +// CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -impl forall [T:! type] T as Interface extra; +impl forall [T: type] T missing_as; + +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:38: error: `impl` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition] +// CHECK:STDERR: impl forall [T: type] T as Interface extra; +// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: +impl forall [T: type] T as Interface extra; // CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:5: error: expected expression [ExpectedExpr] // CHECK:STDERR: impl; @@ -147,9 +147,9 @@ impl // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'StringTypeLiteral', text: 'str'}, // CHECK:STDOUT: {kind: 'ImplDecl', text: ';', has_error: yes, subtree_size: 10}, @@ -157,9 +157,9 @@ impl // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, // CHECK:STDOUT: {kind: 'ImplDecl', text: ';', has_error: yes, subtree_size: 10}, @@ -167,9 +167,9 @@ impl // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, // CHECK:STDOUT: {kind: 'ImplTypeAs', text: 'as', subtree_size: 2}, diff --git a/toolchain/parse/testdata/generics/impl/final_match_first.carbon b/toolchain/parse/testdata/generics/impl/final_match_first.carbon index 7a16f7081cbc..43ecc0c7d754 100644 --- a/toolchain/parse/testdata/generics/impl/final_match_first.carbon +++ b/toolchain/parse/testdata/generics/impl/final_match_first.carbon @@ -10,11 +10,11 @@ final match_first { -impl forall [T:! I] T as Interface { +impl forall [T: I] T as Interface { fn Add(self, b: Self) -> Self; } -impl forall [T:! J] T as Interface { +impl forall [T: J] T as Interface { fn Add(self, b: Self) -> Self; } @@ -30,9 +30,9 @@ impl forall [T:! J] T as Interface { // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'I'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, // CHECK:STDOUT: {kind: 'ImplTypeAs', text: 'as', subtree_size: 2}, @@ -56,9 +56,9 @@ impl forall [T:! J] T as Interface { // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'J'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, // CHECK:STDOUT: {kind: 'ImplTypeAs', text: 'as', subtree_size: 2}, diff --git a/toolchain/parse/testdata/generics/impl/forall.carbon b/toolchain/parse/testdata/generics/impl/forall.carbon index 0fd69aff7fa7..81e63c1bf009 100644 --- a/toolchain/parse/testdata/generics/impl/forall.carbon +++ b/toolchain/parse/testdata/generics/impl/forall.carbon @@ -8,9 +8,9 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/generics/impl/forall.carbon -impl forall [T:! type] T as Interface; +impl forall [T: type] T as Interface; -impl forall [T:! type, U:! Interface] U as Interface(T) { +impl forall [T: type, U: Interface] U as Interface(T) { } // CHECK:STDOUT: - filename: forall.carbon @@ -20,9 +20,9 @@ impl forall [T:! type, U:! Interface] U as Interface(T) { // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, // CHECK:STDOUT: {kind: 'ImplTypeAs', text: 'as', subtree_size: 2}, @@ -32,14 +32,14 @@ impl forall [T:! type, U:! Interface] U as Interface(T) { // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'U'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Interface'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 11}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'U'}, // CHECK:STDOUT: {kind: 'ImplTypeAs', text: 'as', subtree_size: 2}, diff --git a/toolchain/parse/testdata/generics/impl/match_first.carbon b/toolchain/parse/testdata/generics/impl/match_first.carbon index 62d767da82a3..7c3135ef455c 100644 --- a/toolchain/parse/testdata/generics/impl/match_first.carbon +++ b/toolchain/parse/testdata/generics/impl/match_first.carbon @@ -24,11 +24,11 @@ match_first; match_first { -impl forall [T:! I] T as Interface { +impl forall [T: I] T as Interface { fn Add(self, b: Self) -> Self; } -impl forall [T:! J] T as Interface { +impl forall [T: J] T as Interface { fn Add(self, b: Self) -> Self; } @@ -59,9 +59,9 @@ impl forall [T:! J] T as Interface { // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'I'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, // CHECK:STDOUT: {kind: 'ImplTypeAs', text: 'as', subtree_size: 2}, @@ -85,9 +85,9 @@ impl forall [T:! J] T as Interface { // CHECK:STDOUT: {kind: 'Forall', text: 'forall'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'J'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, // CHECK:STDOUT: {kind: 'ImplTypeAs', text: 'as', subtree_size: 2}, diff --git a/toolchain/parse/testdata/generics/interface/associated_constants.carbon b/toolchain/parse/testdata/generics/interface/associated_constants.carbon index e216eec6f11a..a622d546e5a6 100644 --- a/toolchain/parse/testdata/generics/interface/associated_constants.carbon +++ b/toolchain/parse/testdata/generics/interface/associated_constants.carbon @@ -13,9 +13,9 @@ library "[[@TEST_NAME]]"; interface I { - let T:! type; - final let I:! i32; - default let D:! bool; + let T: type; + final let I: i32; + default let D: bool; } // --- initializer.carbon @@ -23,9 +23,9 @@ interface I { library "[[@TEST_NAME]]"; interface I { - let T:! type = (i32, i32); - final let I:! i32 = 42; - default let D:! bool = false; + let T: type = (i32, i32); + final let I: i32 = 42; + default let D: bool = false; } // CHECK:STDOUT: - filename: associated_constants.carbon @@ -40,19 +40,19 @@ interface I { // CHECK:STDOUT: {kind: 'AssociatedConstantIntroducer', text: 'let'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':!', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'AssociatedConstantDecl', text: ';', subtree_size: 5}, // CHECK:STDOUT: {kind: 'AssociatedConstantIntroducer', text: 'let'}, // CHECK:STDOUT: {kind: 'FinalModifier', text: 'final'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'I'}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':!', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'AssociatedConstantDecl', text: ';', subtree_size: 6}, // CHECK:STDOUT: {kind: 'AssociatedConstantIntroducer', text: 'let'}, // CHECK:STDOUT: {kind: 'DefaultModifier', text: 'default'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'D'}, // CHECK:STDOUT: {kind: 'BoolTypeLiteral', text: 'bool'}, -// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':!', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'AssociatedConstantDecl', text: ';', subtree_size: 6}, // CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 21}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, @@ -69,7 +69,7 @@ interface I { // CHECK:STDOUT: {kind: 'AssociatedConstantIntroducer', text: 'let'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':!', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'AssociatedConstantInitializer', text: '='}, // CHECK:STDOUT: {kind: 'TupleLiteralStart', text: '('}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, @@ -81,7 +81,7 @@ interface I { // CHECK:STDOUT: {kind: 'FinalModifier', text: 'final'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'I'}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':!', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'AssociatedConstantInitializer', text: '='}, // CHECK:STDOUT: {kind: 'IntLiteral', text: '42'}, // CHECK:STDOUT: {kind: 'AssociatedConstantDecl', text: ';', subtree_size: 8}, @@ -89,7 +89,7 @@ interface I { // CHECK:STDOUT: {kind: 'DefaultModifier', text: 'default'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'D'}, // CHECK:STDOUT: {kind: 'BoolTypeLiteral', text: 'bool'}, -// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':!', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'AssociatedConstantInitializer', text: '='}, // CHECK:STDOUT: {kind: 'BoolLiteralFalse', text: 'false'}, // CHECK:STDOUT: {kind: 'AssociatedConstantDecl', text: ';', subtree_size: 8}, diff --git a/toolchain/parse/testdata/generics/interface/fail_associated_constants.carbon b/toolchain/parse/testdata/generics/interface/fail_associated_constants.carbon index e9ba2141fb89..391c742f74d7 100644 --- a/toolchain/parse/testdata/generics/interface/fail_associated_constants.carbon +++ b/toolchain/parse/testdata/generics/interface/fail_associated_constants.carbon @@ -14,10 +14,10 @@ library "[[@TEST_NAME]]"; interface I { // CHECK:STDERR: fail_tuple_pattern.carbon:[[@LINE+4]]:7: error: expected identifier in associated constant declaration [ExpectedAssociatedConstantIdentifier] - // CHECK:STDERR: let (T:! type, U:! type); + // CHECK:STDERR: let (T: type, U: type); // CHECK:STDERR: ^ // CHECK:STDERR: - let (T:! type, U:! type); + let (T: type, U: type); } // --- fail_tuple_pattern_with_default.carbon @@ -26,10 +26,10 @@ library "[[@TEST_NAME]]"; interface I { // CHECK:STDERR: fail_tuple_pattern_with_default.carbon:[[@LINE+4]]:15: error: expected identifier in associated constant declaration [ExpectedAssociatedConstantIdentifier] - // CHECK:STDERR: default let (T:! type, U:! type) = ({}, {}); + // CHECK:STDERR: default let (T: type, U: type) = ({}, {}); // CHECK:STDERR: ^ // CHECK:STDERR: - default let (T:! type, U:! type) = ({}, {}); + default let (T: type, U: type) = ({}, {}); } // --- fail_var_pattern.carbon @@ -38,10 +38,10 @@ library "[[@TEST_NAME]]"; interface I { // CHECK:STDERR: fail_var_pattern.carbon:[[@LINE+4]]:7: error: expected identifier in associated constant declaration [ExpectedAssociatedConstantIdentifier] - // CHECK:STDERR: let var T:! type; + // CHECK:STDERR: let var T: type; // CHECK:STDERR: ^~~ // CHECK:STDERR: - let var T:! type; + let var T: type; } // --- fail_var_pattern_with_default.carbon @@ -50,10 +50,10 @@ library "[[@TEST_NAME]]"; interface I { // CHECK:STDERR: fail_var_pattern_with_default.carbon:[[@LINE+4]]:15: error: expected identifier in associated constant declaration [ExpectedAssociatedConstantIdentifier] - // CHECK:STDERR: default let var T:! type = {}; + // CHECK:STDERR: default let var T: type = {}; // CHECK:STDERR: ^~~ // CHECK:STDERR: - default let var T:! type = {}; + default let var T: type = {}; } // --- fail_not_constant.carbon @@ -61,11 +61,11 @@ interface I { library "[[@TEST_NAME]]"; interface I { - // CHECK:STDERR: fail_not_constant.carbon:[[@LINE+4]]:8: error: found runtime binding pattern in associated constant declaration; expected a `:!` binding [ExpectedAssociatedConstantColonExclaim] - // CHECK:STDERR: let a: {.b: ()}; - // CHECK:STDERR: ^ + // CHECK:STDERR: fail_not_constant.carbon:[[@LINE+4]]:7: error: phase keyword is not allowed on an associated constant [PhaseKeywordInAssociatedConstant] + // CHECK:STDERR: let runtime a: {.b: ()}; + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - let a: {.b: ()}; + let runtime a: {.b: ()}; } // --- fail_template.carbon @@ -73,13 +73,24 @@ interface I { library "[[@TEST_NAME]]"; interface I { - // CHECK:STDERR: fail_template.carbon:[[@LINE+4]]:7: error: expected identifier in associated constant declaration [ExpectedAssociatedConstantIdentifier] - // CHECK:STDERR: let template T:! type; + // CHECK:STDERR: fail_template.carbon:[[@LINE+4]]:7: error: phase keyword is not allowed on an associated constant [PhaseKeywordInAssociatedConstant] + // CHECK:STDERR: let template T: type; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: - let template T:! type; + let template T: type; } +// --- fail_generic.carbon + +library "[[@TEST_NAME]]"; + +interface I { + // CHECK:STDERR: fail_generic.carbon:[[@LINE+4]]:7: error: phase keyword is not allowed on an associated constant [PhaseKeywordInAssociatedConstant] + // CHECK:STDERR: let generic a: type; + // CHECK:STDERR: ^~~~~~~ + // CHECK:STDERR: + let generic a: type; +} // --- fail_underscore.carbon @@ -87,10 +98,22 @@ library "[[@TEST_NAME]]"; interface I { // CHECK:STDERR: fail_underscore.carbon:[[@LINE+4]]:7: error: expected identifier in associated constant declaration [ExpectedAssociatedConstantIdentifier] - // CHECK:STDERR: let _:! {}; + // CHECK:STDERR: let _: {}; // CHECK:STDERR: ^ // CHECK:STDERR: - let _:! {}; + let _: {}; +} + +// --- fail_missing_colon.carbon + +library "[[@TEST_NAME]]"; + +interface I { + // CHECK:STDERR: fail_missing_colon.carbon:[[@LINE+4]]:8: error: expected `:` in associated constant declaration [ExpectedAssociatedConstantColon] + // CHECK:STDERR: let a; + // CHECK:STDERR: ^ + // CHECK:STDERR: + let a; } @@ -180,6 +203,20 @@ interface I { // CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 6}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: fail_generic.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'LibraryIntroducer', text: 'library'}, +// CHECK:STDOUT: {kind: 'LibraryName', text: '"generic"'}, +// CHECK:STDOUT: {kind: 'LibraryDecl', text: ';', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'I'}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'AssociatedConstantIntroducer', text: 'let'}, +// CHECK:STDOUT: {kind: 'AssociatedConstantDecl', text: ';', has_error: yes, subtree_size: 2}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] // CHECK:STDOUT: - filename: fail_underscore.carbon // CHECK:STDOUT: parse_tree: [ // CHECK:STDOUT: {kind: 'FileStart', text: ''}, @@ -194,3 +231,17 @@ interface I { // CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 6}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: fail_missing_colon.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'LibraryIntroducer', text: 'library'}, +// CHECK:STDOUT: {kind: 'LibraryName', text: '"missing_colon"'}, +// CHECK:STDOUT: {kind: 'LibraryDecl', text: ';', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'I'}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'AssociatedConstantIntroducer', text: 'let'}, +// CHECK:STDOUT: {kind: 'AssociatedConstantDecl', text: ';', has_error: yes, subtree_size: 2}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/interface/require.carbon b/toolchain/parse/testdata/generics/interface/require.carbon index 2aba84e46b90..5fc9f92bf756 100644 --- a/toolchain/parse/testdata/generics/interface/require.carbon +++ b/toolchain/parse/testdata/generics/interface/require.carbon @@ -26,7 +26,7 @@ interface Z { // --- impls_where.carbon -interface Y { let Y1:! type; } +interface Y { let Y1: type; } interface Z { require impls Y where .Y1 = (); @@ -36,7 +36,7 @@ interface Z { interface Y {} -interface Z(T:! type) { +interface Z(T: type) { require T impls Y; } @@ -136,7 +136,7 @@ interface Z { // CHECK:STDOUT: {kind: 'AssociatedConstantIntroducer', text: 'let'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'Y1'}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':!', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'AssociatedConstantDecl', text: ';', subtree_size: 5}, // CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 9}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, @@ -167,9 +167,9 @@ interface Z { // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Z'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 9}, // CHECK:STDOUT: {kind: 'RequireIntroducer', text: 'require'}, diff --git a/toolchain/parse/testdata/generics/params/fail_redundant_phase_keyword.carbon b/toolchain/parse/testdata/generics/params/fail_redundant_phase_keyword.carbon new file mode 100644 index 000000000000..da26d48d3136 --- /dev/null +++ b/toolchain/parse/testdata/generics/params/fail_redundant_phase_keyword.carbon @@ -0,0 +1,129 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/parse/testdata/generics/params/fail_redundant_phase_keyword.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/generics/params/fail_redundant_phase_keyword.carbon + +// --- fail_redundant_generic_deduced.carbon + +// CHECK:STDERR: fail_redundant_generic_deduced.carbon:[[@LINE+4]]:6: error: `generic` is redundant here; this binding is a checked generic by default [RedundantGenericModifier] +// CHECK:STDERR: fn F[generic T: type](); +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: +fn F[generic T: type](); + +// --- fail_redundant_generic_class_param.carbon + +// CHECK:STDERR: fail_redundant_generic_class_param.carbon:[[@LINE+4]]:9: error: `generic` is redundant here; this binding is a checked generic by default [RedundantGenericModifier] +// CHECK:STDERR: class C(generic T: type) {} +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: +class C(generic T: type) {} + +// --- fail_redundant_runtime_explicit.carbon + +// CHECK:STDERR: fail_redundant_runtime_explicit.carbon:[[@LINE+4]]:6: error: `runtime` is redundant here; this binding is runtime by default [RedundantRuntimeModifier] +// CHECK:STDERR: fn G(runtime x: i32); +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: +fn G(runtime x: i32); + +// --- fail_redundant_generic_qualified.carbon + +// CHECK:STDERR: fail_redundant_generic_qualified.carbon:[[@LINE+4]]:8: error: `generic` is redundant here; this binding is a checked generic by default [RedundantGenericModifier] +// CHECK:STDERR: fn C.F[generic T: type](); +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: +fn C.F[generic T: type](); + +// --- fail_redundant_runtime_qualified.carbon + +// CHECK:STDERR: fail_redundant_runtime_qualified.carbon:[[@LINE+4]]:8: error: `runtime` is redundant here; this binding is runtime by default [RedundantRuntimeModifier] +// CHECK:STDERR: fn C.G(runtime x: i32); +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: +fn C.G(runtime x: i32); + +// CHECK:STDOUT: - filename: fail_redundant_generic_deduced.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, +// CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'F'}, +// CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: fail_redundant_generic_class_param.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, +// CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'C'}, +// CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: fail_redundant_runtime_explicit.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, +// CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'G'}, +// CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'x'}, +// CHECK:STDOUT: {kind: 'RuntimeBindingName', text: 'runtime', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, +// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: fail_redundant_generic_qualified.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'C'}, +// CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithoutParams', text: '.', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'F'}, +// CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 13}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: fail_redundant_runtime_qualified.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'C'}, +// CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithoutParams', text: '.', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'G'}, +// CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'x'}, +// CHECK:STDOUT: {kind: 'RuntimeBindingName', text: 'runtime', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, +// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/params/fail_unused_after_phase_keyword.carbon b/toolchain/parse/testdata/generics/params/fail_unused_after_phase_keyword.carbon new file mode 100644 index 000000000000..38e5a84c7864 --- /dev/null +++ b/toolchain/parse/testdata/generics/params/fail_unused_after_phase_keyword.carbon @@ -0,0 +1,81 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/parse/testdata/generics/params/fail_unused_after_phase_keyword.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/generics/params/fail_unused_after_phase_keyword.carbon + +// --- fail_generic_before_unused.carbon + +// CHECK:STDERR: fail_generic_before_unused.carbon:[[@LINE+4]]:14: error: `unused` must be written before `generic` [UnusedAfterBindingModifier] +// CHECK:STDERR: fn F(generic unused T: type); +// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: +fn F(generic unused T: type); + +// --- fail_runtime_before_unused.carbon + +// CHECK:STDERR: fail_runtime_before_unused.carbon:[[@LINE+4]]:14: error: `unused` must be written before `runtime` [UnusedAfterBindingModifier] +// CHECK:STDERR: fn G[runtime unused T: type](); +// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: +fn G[runtime unused T: type](); + +// --- fail_redundant_runtime_before_unused.carbon + +// CHECK:STDERR: fail_redundant_runtime_before_unused.carbon:[[@LINE+4]]:6: error: `runtime` is redundant here; this binding is runtime by default [RedundantRuntimeModifier] +// CHECK:STDERR: fn H(runtime unused x: i32); +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: +fn H(runtime unused x: i32); + +// CHECK:STDOUT: - filename: fail_generic_before_unused.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, +// CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'F'}, +// CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', has_error: yes, subtree_size: 2}, +// CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 4}, +// CHECK:STDOUT: {kind: 'UnusedPattern', text: 'unused', has_error: yes, subtree_size: 5}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 7}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: fail_runtime_before_unused.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, +// CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'G'}, +// CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, +// CHECK:STDOUT: {kind: 'RuntimeBindingName', text: 'runtime', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, +// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', has_error: yes, subtree_size: 4}, +// CHECK:STDOUT: {kind: 'UnusedPattern', text: 'unused', has_error: yes, subtree_size: 5}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', has_error: yes, subtree_size: 7}, +// CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: fail_redundant_runtime_before_unused.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, +// CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'H'}, +// CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'x'}, +// CHECK:STDOUT: {kind: 'RuntimeBindingName', text: 'runtime', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, +// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'UnusedPattern', text: 'unused', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 7}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/params/name_qualifier.carbon b/toolchain/parse/testdata/generics/params/name_qualifier.carbon index 3c5910c94554..e58f71a091bd 100644 --- a/toolchain/parse/testdata/generics/params/name_qualifier.carbon +++ b/toolchain/parse/testdata/generics/params/name_qualifier.carbon @@ -8,27 +8,27 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/generics/params/name_qualifier.carbon -class GenericClass1(T:! type) { +class GenericClass1(T: type) { fn F(); } -fn GenericClass1(T:! type).F() {} +fn GenericClass1(T: type).F() {} -class GenericClass2[T:! type](X:! T) { +class GenericClass2[T: type](X: T) { fn F(); } -fn GenericClass2[T:! type](X:! T).F() {} +fn GenericClass2[T: type](X: T).F() {} -class OuterGeneric(T:! type) { - class InnerGeneric(U:! type); +class OuterGeneric(T: type) { + class InnerGeneric(U: type); } -class OuterGeneric(T:! type).InnerGeneric(U:! type) { +class OuterGeneric(T: type).InnerGeneric(U: type) { fn F(x: T, y: U); } -fn OuterGeneric(T:! type).InnerGeneric(U:! type).F(x: T, y: U) {} +fn OuterGeneric(T: type).InnerGeneric(U: type).F(x: T, y: U) {} // CHECK:STDOUT: - filename: name_qualifier.carbon // CHECK:STDOUT: parse_tree: [ @@ -37,9 +37,9 @@ fn OuterGeneric(T:! type).InnerGeneric(U:! type).F(x: T, y: U) {} // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'GenericClass1'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 9}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, @@ -52,9 +52,9 @@ fn OuterGeneric(T:! type).InnerGeneric(U:! type).F(x: T, y: U) {} // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'GenericClass1'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 8}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'F'}, @@ -66,15 +66,15 @@ fn OuterGeneric(T:! type).InnerGeneric(U:! type).F(x: T, y: U) {} // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'GenericClass2'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'X'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 15}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, @@ -87,15 +87,15 @@ fn OuterGeneric(T:! type).InnerGeneric(U:! type).F(x: T, y: U) {} // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'GenericClass2'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'X'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 14}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'F'}, @@ -107,18 +107,18 @@ fn OuterGeneric(T:! type).InnerGeneric(U:! type).F(x: T, y: U) {} // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'OuterGeneric'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 9}, // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'InnerGeneric'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'U'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 9}, // CHECK:STDOUT: {kind: 'ClassDefinition', text: '}', subtree_size: 19}, @@ -126,17 +126,17 @@ fn OuterGeneric(T:! type).InnerGeneric(U:! type).F(x: T, y: U) {} // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'OuterGeneric'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 8}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'InnerGeneric'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'U'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 17}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, @@ -156,17 +156,17 @@ fn OuterGeneric(T:! type).InnerGeneric(U:! type).F(x: T, y: U) {} // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'OuterGeneric'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 8}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'InnerGeneric'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'U'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'IdentifierNameQualifierWithParams', text: '.', subtree_size: 8}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'F'}, diff --git a/toolchain/parse/testdata/generics/params/one.carbon b/toolchain/parse/testdata/generics/params/one.carbon index 9242867ead2c..56dedb0c8e5c 100644 --- a/toolchain/parse/testdata/generics/params/one.carbon +++ b/toolchain/parse/testdata/generics/params/one.carbon @@ -18,19 +18,21 @@ interface Bar(a: i32) {} // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 9}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 8}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 10}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/params/one_suffix_comma.carbon b/toolchain/parse/testdata/generics/params/one_suffix_comma.carbon index c739da8b72eb..848dff6d60c5 100644 --- a/toolchain/parse/testdata/generics/params/one_suffix_comma.carbon +++ b/toolchain/parse/testdata/generics/params/one_suffix_comma.carbon @@ -18,21 +18,23 @@ interface Bar(a: i32,) {} // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, -// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 7}, +// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 10}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 6}, -// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 9}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 7}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 11}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/params/six.carbon b/toolchain/parse/testdata/generics/params/six.carbon index 9466c0f0b41f..e41350debcc2 100644 --- a/toolchain/parse/testdata/generics/params/six.carbon +++ b/toolchain/parse/testdata/generics/params/six.carbon @@ -18,59 +18,71 @@ interface Bar(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32) {} // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'c'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'c'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'd'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'd'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'e'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'e'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'f'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'f'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 25}, -// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 28}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 31}, +// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 34}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'c'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'c'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'd'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'd'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'e'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'e'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'f'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'f'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 25}, -// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 28}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 29}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 31}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 34}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 35}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/params/two.carbon b/toolchain/parse/testdata/generics/params/two.carbon index 0da86b3b1634..37fcc67ce5a6 100644 --- a/toolchain/parse/testdata/generics/params/two.carbon +++ b/toolchain/parse/testdata/generics/params/two.carbon @@ -18,27 +18,31 @@ interface Bar(a: i32, b: i32) {} // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 9}, -// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 14}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 9}, -// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 12}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 13}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 14}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 15}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/params/two_suffix_comma.carbon b/toolchain/parse/testdata/generics/params/two_suffix_comma.carbon index fef0cb9884af..f3a933a1172d 100644 --- a/toolchain/parse/testdata/generics/params/two_suffix_comma.carbon +++ b/toolchain/parse/testdata/generics/params/two_suffix_comma.carbon @@ -18,29 +18,33 @@ interface Bar(a: i32, b: i32,) {} // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 10}, -// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 13}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 15}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'a'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'PatternListComma', text: ','}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 10}, -// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 13}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 14}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 15}, +// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 16}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/lambda/lambda.carbon b/toolchain/parse/testdata/lambda/lambda.carbon index 40ac309b3f46..18cc53e027fe 100644 --- a/toolchain/parse/testdata/lambda/lambda.carbon +++ b/toolchain/parse/testdata/lambda/lambda.carbon @@ -10,7 +10,7 @@ // --- basic.carbon -var a: auto = fn [T:! type] (x: T) -> T { return x; }; +var a: auto = fn [T: type] (x: T) -> T { return x; }; var b: auto = fn (x: i32) => x; var c: auto = fn { }; @@ -76,11 +76,10 @@ fn G() { // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, // CHECK:STDOUT: {kind: 'LambdaIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'ImplicitParamListStart', text: '['}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 4}, -// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'ImplicitParamList', text: ']', subtree_size: 5}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'x'}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'T'}, @@ -93,8 +92,8 @@ fn G() { // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'x'}, // CHECK:STDOUT: {kind: 'ReturnStatement', text: ';', subtree_size: 3}, // CHECK:STDOUT: {kind: 'CodeBlock', text: '}', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'Lambda', text: 'fn', subtree_size: 20}, -// CHECK:STDOUT: {kind: 'VariableDecl', text: ';', subtree_size: 27}, +// CHECK:STDOUT: {kind: 'Lambda', text: 'fn', subtree_size: 19}, +// CHECK:STDOUT: {kind: 'VariableDecl', text: ';', subtree_size: 26}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'b'}, // CHECK:STDOUT: {kind: 'AutoTypeLiteral', text: 'auto'}, diff --git a/toolchain/parse/testdata/let/fail_generic_ref.carbon b/toolchain/parse/testdata/let/fail_generic_ref.carbon index cc13c7613294..cca6ae4cc7fa 100644 --- a/toolchain/parse/testdata/let/fail_generic_ref.carbon +++ b/toolchain/parse/testdata/let/fail_generic_ref.carbon @@ -8,23 +8,22 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/let/fail_generic_ref.carbon -// CHECK:STDERR: fail_generic_ref.carbon:[[@LINE+4]]:5: error: expected `:` binding after `ref` [ExpectedRuntimeBindingPatternAfterRef] -// CHECK:STDERR: let ref X:! i32 = 0; -// CHECK:STDERR: ^~~ +// CHECK:STDERR: fail_generic_ref.carbon:[[@LINE+4]]:13: error: `ref` is only allowed on a runtime binding [ExpectedRuntimeBindingPatternAfterRef] +// CHECK:STDERR: let generic ref X: i32 = 0; +// CHECK:STDERR: ^~~ // CHECK:STDERR: -let ref X:! i32 = 0; +let generic ref X: i32 = 0; // CHECK:STDOUT: - filename: fail_generic_ref.carbon // CHECK:STDOUT: parse_tree: [ // CHECK:STDOUT: {kind: 'FileStart', text: ''}, // CHECK:STDOUT: {kind: 'LetIntroducer', text: 'let'}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'X'}, -// CHECK:STDOUT: {kind: 'RefBindingName', text: 'ref', has_error: yes, subtree_size: 2}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', has_error: yes, subtree_size: 3}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'X'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 5}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 4}, // CHECK:STDOUT: {kind: 'LetInitializer', text: '='}, // CHECK:STDOUT: {kind: 'IntLiteral', text: '0'}, -// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 8}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/let/fail_missing_name.carbon b/toolchain/parse/testdata/let/fail_missing_name.carbon index dc8860495415..ac302a6fe36c 100644 --- a/toolchain/parse/testdata/let/fail_missing_name.carbon +++ b/toolchain/parse/testdata/let/fail_missing_name.carbon @@ -18,11 +18,11 @@ let : i32 = 4; // --- fail_compiletime_binding.carbon -// CHECK:STDERR: fail_compiletime_binding.carbon:[[@LINE+4]]:5: error: expected pattern [ExpectedPattern] -// CHECK:STDERR: let :! bool = true; -// CHECK:STDERR: ^~ +// CHECK:STDERR: fail_compiletime_binding.carbon:[[@LINE+4]]:13: error: expected name in binding pattern [ExpectedBindingPattern] +// CHECK:STDERR: let generic : bool = true; +// CHECK:STDERR: ^ // CHECK:STDERR: -let :! bool = true; +let generic : bool = true; // CHECK:STDOUT: - filename: fail_runtime_binding.carbon // CHECK:STDOUT: parse_tree: [ @@ -38,9 +38,12 @@ let :! bool = true; // CHECK:STDOUT: parse_tree: [ // CHECK:STDOUT: {kind: 'FileStart', text: ''}, // CHECK:STDOUT: {kind: 'LetIntroducer', text: 'let'}, -// CHECK:STDOUT: {kind: 'InvalidParse', text: ':!', has_error: yes}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: ':', has_error: yes}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', has_error: yes, subtree_size: 2}, +// CHECK:STDOUT: {kind: 'BoolTypeLiteral', text: 'bool'}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 4}, // CHECK:STDOUT: {kind: 'LetInitializer', text: '='}, // CHECK:STDOUT: {kind: 'BoolLiteralTrue', text: 'true'}, -// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 8}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/let/missing_value.carbon b/toolchain/parse/testdata/let/missing_value.carbon index 5d8702ae06e3..f51af82630fe 100644 --- a/toolchain/parse/testdata/let/missing_value.carbon +++ b/toolchain/parse/testdata/let/missing_value.carbon @@ -15,7 +15,7 @@ fn F() { } interface I { - let T:! type; + let T: type; } // CHECK:STDOUT: - filename: missing_value.carbon @@ -43,7 +43,7 @@ interface I { // CHECK:STDOUT: {kind: 'AssociatedConstantIntroducer', text: 'let'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':!', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'AssociatedConstantDecl', text: ';', subtree_size: 5}, // CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 9}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, diff --git a/toolchain/parse/testdata/operators/precedence_where.carbon b/toolchain/parse/testdata/operators/precedence_where.carbon index c134fccade27..37c1f98a998b 100644 --- a/toolchain/parse/testdata/operators/precedence_where.carbon +++ b/toolchain/parse/testdata/operators/precedence_where.carbon @@ -8,13 +8,13 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/precedence_where.carbon -fn PostfixStar(T:! I* where .A* == .B*); +fn PostfixStar(generic T: I* where .A* == .B*); -fn Ampersand(U:! J & K where C & D impls E & F); +fn Ampersand(generic U: J & K where C & D impls E & F); -fn BinaryPlus(V:! L + M where G & H impls N & O); +fn BinaryPlus(generic V: L + M where G & H impls N & O); -fn UnaryMinus(W:! -P where -Q impls -R); +fn UnaryMinus(generic W: -P where -Q impls -R); // CHECK:STDOUT: - filename: precedence_where.carbon // CHECK:STDOUT: parse_tree: [ @@ -23,7 +23,7 @@ fn UnaryMinus(W:! -P where -Q impls -R); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'PostfixStar'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'I'}, // CHECK:STDOUT: {kind: 'PostfixOperatorStar', text: '*', subtree_size: 2}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 3}, @@ -35,14 +35,14 @@ fn UnaryMinus(W:! -P where -Q impls -R); // CHECK:STDOUT: {kind: 'PostfixOperatorStar', text: '*', subtree_size: 3}, // CHECK:STDOUT: {kind: 'RequirementEqualEqual', text: '==', subtree_size: 7}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 11}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 14}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 14}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 16}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 19}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'Ampersand'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'U'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'J'}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'K'}, // CHECK:STDOUT: {kind: 'InfixOperatorAmp', text: '&', subtree_size: 3}, @@ -55,14 +55,14 @@ fn UnaryMinus(W:! -P where -Q impls -R); // CHECK:STDOUT: {kind: 'InfixOperatorAmp', text: '&', subtree_size: 3}, // CHECK:STDOUT: {kind: 'RequirementImpls', text: 'impls', subtree_size: 7}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 12}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 15}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 15}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 17}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 20}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'BinaryPlus'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'V'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'L'}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'M'}, // CHECK:STDOUT: {kind: 'InfixOperatorPlus', text: '+', subtree_size: 3}, @@ -75,14 +75,14 @@ fn UnaryMinus(W:! -P where -Q impls -R); // CHECK:STDOUT: {kind: 'InfixOperatorAmp', text: '&', subtree_size: 3}, // CHECK:STDOUT: {kind: 'RequirementImpls', text: 'impls', subtree_size: 7}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 12}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 15}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 15}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 17}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 20}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'UnaryMinus'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'W'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'P'}, // CHECK:STDOUT: {kind: 'PrefixOperatorMinus', text: '-', subtree_size: 2}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 3}, @@ -92,7 +92,7 @@ fn UnaryMinus(W:! -P where -Q impls -R); // CHECK:STDOUT: {kind: 'PrefixOperatorMinus', text: '-', subtree_size: 2}, // CHECK:STDOUT: {kind: 'RequirementImpls', text: 'impls', subtree_size: 5}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 9}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 12}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 14}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 17}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, diff --git a/toolchain/parse/testdata/var/fail_in_interface.carbon b/toolchain/parse/testdata/var/fail_in_interface.carbon index 59194270d616..512e92a34865 100644 --- a/toolchain/parse/testdata/var/fail_in_interface.carbon +++ b/toolchain/parse/testdata/var/fail_in_interface.carbon @@ -22,16 +22,16 @@ interface I { var b: (); // CHECK:STDERR: fail_in_interface.carbon:[[@LINE+4]]:7: error: expected identifier in associated constant declaration [ExpectedAssociatedConstantIdentifier] - // CHECK:STDERR: let var c:! (); + // CHECK:STDERR: let var c: (); // CHECK:STDERR: ^~~ // CHECK:STDERR: - let var c:! (); + let var c: (); // CHECK:STDERR: fail_in_interface.carbon:[[@LINE+4]]:3: error: unrecognized declaration introducer [UnrecognizedDecl] - // CHECK:STDERR: var d:! (); + // CHECK:STDERR: var d: (); // CHECK:STDERR: ^~~ // CHECK:STDERR: - var d:! (); + var d: (); } // CHECK:STDOUT: - filename: fail_in_interface.carbon diff --git a/toolchain/parse/testdata/var/unused.carbon b/toolchain/parse/testdata/var/unused.carbon index fa10840753d0..87e53b689bdb 100644 --- a/toolchain/parse/testdata/var/unused.carbon +++ b/toolchain/parse/testdata/var/unused.carbon @@ -56,7 +56,7 @@ fn F(x: (), unused var y: ()); // --- fail_ref_unused.carbon -// CHECK:STDERR: fail_ref_unused.carbon:[[@LINE+4]]:10: error: expected name in binding pattern [ExpectedBindingPattern] +// CHECK:STDERR: fail_ref_unused.carbon:[[@LINE+4]]:10: error: `unused` must be written before `ref` [UnusedAfterBindingModifier] // CHECK:STDERR: fn F(ref unused y: i32); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -426,11 +426,13 @@ var unused (unused y: i32) = (0,); // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'F'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'unused', has_error: yes}, -// CHECK:STDOUT: {kind: 'InvalidParse', text: 'unused', has_error: yes}, -// CHECK:STDOUT: {kind: 'LetBindingPattern', text: 'ref', has_error: yes, subtree_size: 3}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 5}, -// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'y'}, +// CHECK:STDOUT: {kind: 'RefBindingName', text: 'ref', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, +// CHECK:STDOUT: {kind: 'LetBindingPattern', text: ':', has_error: yes, subtree_size: 4}, +// CHECK:STDOUT: {kind: 'UnusedPattern', text: 'unused', has_error: yes, subtree_size: 5}, +// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 7}, +// CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 10}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] // CHECK:STDOUT: - filename: fail_nested.carbon diff --git a/toolchain/parse/testdata/where_expr/basic.carbon b/toolchain/parse/testdata/where_expr/basic.carbon index 5d71bbf4f783..bbad82fb3f28 100644 --- a/toolchain/parse/testdata/where_expr/basic.carbon +++ b/toolchain/parse/testdata/where_expr/basic.carbon @@ -11,13 +11,13 @@ fn Foo(T: type where .Self == i32); interface I { - let T:! type where .Foo impls Bar; + let T: type where .Foo impls Bar; } -let T:! type where .U = .V; +let generic T: type where .U = .V; fn F() { - let U:! type where .W == .X; + let generic U: type where .W == .X; } // CHECK:STDOUT: - filename: basic.carbon @@ -49,12 +49,12 @@ fn F() { // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Bar'}, // CHECK:STDOUT: {kind: 'RequirementImpls', text: 'impls', subtree_size: 4}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 7}, -// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':!', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':', subtree_size: 9}, // CHECK:STDOUT: {kind: 'AssociatedConstantDecl', text: ';', subtree_size: 11}, // CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 15}, // CHECK:STDOUT: {kind: 'LetIntroducer', text: 'let'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'U'}, @@ -63,7 +63,7 @@ fn F() { // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'RequirementEqual', text: '=', subtree_size: 5}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 8}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 11}, // CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 13}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'F'}, @@ -72,7 +72,7 @@ fn F() { // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'LetIntroducer', text: 'let'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'U'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'W'}, @@ -81,7 +81,7 @@ fn F() { // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'RequirementEqualEqual', text: '==', subtree_size: 5}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 8}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 11}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 11}, // CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 13}, // CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 19}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, diff --git a/toolchain/parse/testdata/where_expr/fail_rewrite.carbon b/toolchain/parse/testdata/where_expr/fail_rewrite.carbon index fd719e2c4ecc..4caa76f6b837 100644 --- a/toolchain/parse/testdata/where_expr/fail_rewrite.carbon +++ b/toolchain/parse/testdata/where_expr/fail_rewrite.carbon @@ -13,59 +13,59 @@ // --- fail_not_designator.carbon -// CHECK:STDERR: fail_not_designator.carbon:[[@LINE+4]]:37: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] -// CHECK:STDERR: fn NotDesignator(T:! type where i32 = .U); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_not_designator.carbon:[[@LINE+4]]:44: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] +// CHECK:STDERR: fn NotDesignator(generic T: type where i32 = .U); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn NotDesignator(T:! type where i32 = .U); +fn NotDesignator(generic T: type where i32 = .U); // --- fail_designator_in_parens.carbon -// CHECK:STDERR: fail_designator_in_parens.carbon:[[@LINE+4]]:40: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] -// CHECK:STDERR: fn DesignatorInParens(V:! I where (.J) = bool); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_designator_in_parens.carbon:[[@LINE+4]]:47: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] +// CHECK:STDERR: fn DesignatorInParens(generic V: I where (.J) = bool); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn DesignatorInParens(V:! I where (.J) = bool); +fn DesignatorInParens(generic V: I where (.J) = bool); // --- fail_dot_self.carbon -// CHECK:STDERR: fail_dot_self.carbon:[[@LINE+4]]:30: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] -// CHECK:STDERR: fn DotSelf(W:! K where .Self = f32); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_dot_self.carbon:[[@LINE+4]]:37: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] +// CHECK:STDERR: fn DotSelf(generic W: K where .Self = f32); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn DotSelf(W:! K where .Self = f32); +fn DotSelf(generic W: K where .Self = f32); // --- fail_dot_keyword.carbon -// CHECK:STDERR: fail_dot_keyword.carbon:[[@LINE+4]]:28: error: expected identifier or `Self` after `.` [ExpectedIdentifierOrSelfAfterPeriod] -// CHECK:STDERR: fn DotKeyword(W:! K where .and = u8); -// CHECK:STDERR: ^~~ +// CHECK:STDERR: fail_dot_keyword.carbon:[[@LINE+4]]:35: error: expected identifier or `Self` after `.` [ExpectedIdentifierOrSelfAfterPeriod] +// CHECK:STDERR: fn DotKeyword(generic W: K where .and = u8); +// CHECK:STDERR: ^~~ // CHECK:STDERR: -fn DotKeyword(W:! K where .and = u8); +fn DotKeyword(generic W: K where .and = u8); // --- fail_postfix_after_designator.carbon -// CHECK:STDERR: fail_postfix_after_designator.carbon:[[@LINE+4]]:43: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] -// CHECK:STDERR: fn PostfixAfterDesignator(X:! L where .M* = u64*); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_postfix_after_designator.carbon:[[@LINE+4]]:50: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] +// CHECK:STDERR: fn PostfixAfterDesignator(generic X: L where .M* = u64*); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn PostfixAfterDesignator(X:! L where .M* = u64*); +fn PostfixAfterDesignator(generic X: L where .M* = u64*); // --- fail_binary_op_after_designator.carbon -// CHECK:STDERR: fail_binary_op_after_designator.carbon:[[@LINE+4]]:48: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] -// CHECK:STDERR: fn BinaryOpAfterDesignator(Y:! N where .O + .P = {}); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_binary_op_after_designator.carbon:[[@LINE+4]]:55: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] +// CHECK:STDERR: fn BinaryOpAfterDesignator(generic Y: N where .O + .P = {}); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn BinaryOpAfterDesignator(Y:! N where .O + .P = {}); +fn BinaryOpAfterDesignator(generic Y: N where .O + .P = {}); // --- fail_after_and.carbon -// CHECK:STDERR: fail_after_and.carbon:[[@LINE+4]]:43: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] -// CHECK:STDERR: fn AfterAnd(Z:! Q where .R impls S and () = .A); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_after_and.carbon:[[@LINE+4]]:50: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] +// CHECK:STDERR: fn AfterAnd(generic Z: Q where .R impls S and () = .A); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn AfterAnd(Z:! Q where .R impls S and () = .A); +fn AfterAnd(generic Z: Q where .R impls S and () = .A); // CHECK:STDOUT: - filename: fail_not_designator.carbon // CHECK:STDOUT: parse_tree: [ @@ -74,12 +74,12 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'NotDesignator'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 4}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 7}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 7}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 9}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 12}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, @@ -91,7 +91,7 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'DesignatorInParens'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'V'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'I'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ParenExprStart', text: '('}, @@ -99,7 +99,7 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ParenExpr', text: ')', subtree_size: 4}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 7}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 10}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 10}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 12}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 15}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, @@ -111,13 +111,13 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'DotSelf'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'W'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'K'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'SelfTypeName', text: 'Self'}, // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 5}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 8}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 8}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 10}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 13}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, @@ -129,13 +129,13 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'DotKeyword'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'W'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'K'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'and', has_error: yes}, // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 5}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 8}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 8}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 10}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 13}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, @@ -147,14 +147,14 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'PostfixAfterDesignator'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'X'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'L'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'M'}, // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'PostfixOperatorStar', text: '*', subtree_size: 3}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 6}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 9}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 9}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 11}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 14}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, @@ -166,7 +166,7 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'BinaryOpAfterDesignator'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'Y'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'N'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'O'}, @@ -175,7 +175,7 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'InfixOperatorPlus', text: '+', subtree_size: 5}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 8}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 11}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 11}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 13}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 16}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, @@ -187,7 +187,7 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'AfterAnd'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'Z'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Q'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'R'}, @@ -198,7 +198,7 @@ fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDOUT: {kind: 'TupleLiteralStart', text: '('}, // CHECK:STDOUT: {kind: 'TupleLiteral', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 10}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 13}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 13}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 15}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 18}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, diff --git a/toolchain/parse/testdata/where_expr/impl_where.carbon b/toolchain/parse/testdata/where_expr/impl_where.carbon index d8307bcc0dd7..3c2769d69fd1 100644 --- a/toolchain/parse/testdata/where_expr/impl_where.carbon +++ b/toolchain/parse/testdata/where_expr/impl_where.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/where_expr/impl_where.carbon interface Interface { - let T:! type; + let T: type; } impl i32 as Interface where .T = () { @@ -33,7 +33,7 @@ impl f64 as Interface where .T = (type where .Self impls type) { // CHECK:STDOUT: {kind: 'AssociatedConstantIntroducer', text: 'let'}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, -// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':!', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'AssociatedConstantDecl', text: ';', subtree_size: 5}, // CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 9}, // CHECK:STDOUT: {kind: 'ImplIntroducer', text: 'impl'}, diff --git a/toolchain/parse/testdata/where_expr/where_and.carbon b/toolchain/parse/testdata/where_expr/where_and.carbon index 90e17bf2d784..f256a1d78635 100644 --- a/toolchain/parse/testdata/where_expr/where_and.carbon +++ b/toolchain/parse/testdata/where_expr/where_and.carbon @@ -10,33 +10,33 @@ // --- success.carbon -fn OneAnd(T:! type where .U = i32 and .V == .W); +fn OneAnd(generic T: type where .U = i32 and .V == .W); -fn TwoAnd(Y:! I where .J impls K and .L == .M and .N = bool); +fn TwoAnd(generic Y: I where .J impls K and .L == .M and .N = bool); // --- fail_and_prefix.carbon -// CHECK:STDERR: fail_and_prefix.carbon:[[@LINE+4]]:29: error: expected expression [ExpectedExpr] -// CHECK:STDERR: fn AndPrefix(T:! type where and .V == .W); -// CHECK:STDERR: ^~~ +// CHECK:STDERR: fail_and_prefix.carbon:[[@LINE+4]]:36: error: expected expression [ExpectedExpr] +// CHECK:STDERR: fn AndPrefix(generic T: type where and .V == .W); +// CHECK:STDERR: ^~~ // CHECK:STDERR: -fn AndPrefix(T:! type where and .V == .W); +fn AndPrefix(generic T: type where and .V == .W); // --- fail_and_suffix.carbon -// CHECK:STDERR: fail_and_suffix.carbon:[[@LINE+4]]:40: error: expected expression [ExpectedExpr] -// CHECK:STDERR: fn AndSuffix(Y:! I where .J impls K and); -// CHECK:STDERR: ^ +// CHECK:STDERR: fail_and_suffix.carbon:[[@LINE+4]]:47: error: expected expression [ExpectedExpr] +// CHECK:STDERR: fn AndSuffix(generic Y: I where .J impls K and); +// CHECK:STDERR: ^ // CHECK:STDERR: -fn AndSuffix(Y:! I where .J impls K and); +fn AndSuffix(generic Y: I where .J impls K and); // --- fail_and_early.carbon -// CHECK:STDERR: fail_and_early.carbon:[[@LINE+4]]:28: error: requirement should use `impls`, `=`, or `==` operator [ExpectedRequirementOperator] -// CHECK:STDERR: fn AndEarly(Z:! L where .M and N); -// CHECK:STDERR: ^~~ +// CHECK:STDERR: fail_and_early.carbon:[[@LINE+4]]:35: error: requirement should use `impls`, `=`, or `==` operator [ExpectedRequirementOperator] +// CHECK:STDERR: fn AndEarly(generic Z: L where .M and N); +// CHECK:STDERR: ^~~ // CHECK:STDERR: -fn AndEarly(Z:! L where .M and N); +fn AndEarly(generic Z: L where .M and N); // CHECK:STDOUT: - filename: success.carbon // CHECK:STDOUT: parse_tree: [ @@ -45,7 +45,7 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'OneAnd'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'U'}, @@ -59,14 +59,14 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'RequirementEqualEqual', text: '==', subtree_size: 5}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 13}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 16}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 16}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 18}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 21}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'TwoAnd'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'Y'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'I'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'J'}, @@ -85,7 +85,7 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'BoolTypeLiteral', text: 'bool'}, // CHECK:STDOUT: {kind: 'RequirementEqual', text: '=', subtree_size: 4}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 18}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 21}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', subtree_size: 21}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 23}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 26}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, @@ -97,12 +97,12 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'AndPrefix'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'T'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'InvalidParse', text: 'and', has_error: yes}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 4}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 7}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 7}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 9}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 12}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, @@ -114,7 +114,7 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'AndSuffix'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'Y'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'I'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'J'}, @@ -124,7 +124,7 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'RequirementAnd', text: 'and'}, // CHECK:STDOUT: {kind: 'InvalidParse', text: ')', has_error: yes}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 9}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 12}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 12}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 14}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 17}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, @@ -136,13 +136,13 @@ fn AndEarly(Z:! L where .M and N); // CHECK:STDOUT: {kind: 'IdentifierNameMaybeBeforeSignature', text: 'AndEarly'}, // CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'Z'}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'L'}, // CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2}, // CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeSignature', text: 'M'}, // CHECK:STDOUT: {kind: 'DesignatorExpr', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', has_error: yes, subtree_size: 5}, -// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', has_error: yes, subtree_size: 8}, +// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':', has_error: yes, subtree_size: 8}, // CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', has_error: yes, subtree_size: 10}, // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 13}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, diff --git a/toolchain/parse/typed_nodes.h b/toolchain/parse/typed_nodes.h index cc3c86aad038..cff8d275d360 100644 --- a/toolchain/parse/typed_nodes.h +++ b/toolchain/parse/typed_nodes.h @@ -169,8 +169,8 @@ using UnderscoreName = LeafNode; -// A name qualifier with parameters, such as `A(T:! type).` or `A[T:! type](N:! -// T).`. +// A name qualifier with parameters, such as `A(T: type).` or +// `A[T: type](N: T).`. struct IdentifierNameQualifierWithParams { static constexpr auto Kind = NodeKind::IdentifierNameQualifierWithParams.Define( @@ -192,7 +192,7 @@ struct IdentifierNameQualifierWithoutParams { Lex::PeriodTokenIndex token; }; -// A complete name in a declaration: `A.C(T:! type).F(n: i32)`. +// A complete name in a declaration: `A.C(T: type).F(n: i32)`. // Note that this includes the parameters of the entity itself. struct DeclName { llvm::SmallVector + RefBindingName, RuntimeBindingName> name; Lex::ColonTokenIndex token; AnyExprId type; @@ -443,18 +457,20 @@ struct CompileTimeBindingPatternStart { NodeIdOneOf name; - // This is a virtual token. The `:!` token is owned by the + // This is a virtual token. The `:` token is owned by the // CompileTimeBindingPattern node. - Lex::ColonExclaimTokenIndex token; + Lex::ColonTokenIndex token; }; -// `name:! Type` +// `name: Type` in a context where the binding is a checked or template generic +// (for example, a deduced `[]` parameter, a parameter of a compile-time entity, +// or an explicit parameter marked `generic`/`template`). struct CompileTimeBindingPattern { static constexpr auto Kind = NodeKind::CompileTimeBindingPattern.Define( {.category = NodeCategory::Pattern, .child_count = 2}); CompileTimeBindingPatternStartId introducer; - Lex::ColonExclaimTokenIndex token; + Lex::ColonTokenIndex token; AnyExprId type; }; @@ -502,7 +518,7 @@ struct ExplicitParamList { using ImplicitParamListStart = LeafNode; -// An implicit parameter list: `[T:! type, self: Self]`. +// An implicit parameter list: `[T: type]`. struct ImplicitParamList { static constexpr auto Kind = NodeKind::ImplicitParamList.Define( {.bracketed_by = ImplicitParamListStart::Kind}); @@ -656,11 +672,11 @@ struct AssociatedConstantNameAndType { {.category = NodeCategory::Pattern, .child_count = 2}); AnyRuntimeBindingPatternName name; - Lex::ColonExclaimTokenIndex token; + Lex::ColonTokenIndex token; AnyExprId type; }; -// An associated constant declaration: `let a:! i32;`. +// An associated constant declaration: `let a: i32;`. struct AssociatedConstantDecl { static constexpr auto Kind = NodeKind::AssociatedConstantDecl.Define( {.category = NodeCategory::Decl, diff --git a/toolchain/parse/typed_nodes_test.cpp b/toolchain/parse/typed_nodes_test.cpp index d3aa606dd6a1..a0ebbb143cbd 100644 --- a/toolchain/parse/typed_nodes_test.cpp +++ b/toolchain/parse/typed_nodes_test.cpp @@ -271,7 +271,7 @@ Aggregate [^:]*: success TEST_F(TypedNodeTest, VerifyExtractTraceClassDecl) { auto& tree = compile_helper_.GetTreeAndSubtrees(R"carbon( - private abstract class N.C(T:! type); + private abstract class N.C(T: type); )carbon"); auto file = tree.ExtractFile(); diff --git a/toolchain/sem_ir/associated_constant.h b/toolchain/sem_ir/associated_constant.h index eec01645e917..69e58d6d9e98 100644 --- a/toolchain/sem_ir/associated_constant.h +++ b/toolchain/sem_ir/associated_constant.h @@ -14,7 +14,7 @@ namespace Carbon::SemIR { // An associated constant entity. For example: // // interface I { -// let AssocConst:! type; +// let AssocConst: type; // } // // TODO: This overlaps a lot with EntityName and EntityWithParamsBase. @@ -27,7 +27,7 @@ struct AssociatedConstant : public Printable { << ", default_value_id: " << default_value_id << "}"; } - // The following fields are set at the `:!` binding, when the + // The following fields are set at the `:` binding, when the // `AssociatedConstant` is created. // The entity's name. diff --git a/toolchain/sem_ir/constant.h b/toolchain/sem_ir/constant.h index 51862403b537..d6d62922a772 100644 --- a/toolchain/sem_ir/constant.h +++ b/toolchain/sem_ir/constant.h @@ -63,7 +63,7 @@ enum class ConstantDependence : uint8_t { // parameterized by the `bind_symbolic_name` constant insts that it depends on, // whereas an attached constant explicitly binds them to parameters of the // enclosing generic. It's the difference between "`Vector(T)` where `T` is some -// value of type `type`" and "`Vector(T)` where `T` is the `T:! type` parameter +// value of type `type`" and "`Vector(T)` where `T` is the `T: type` parameter // of this particular enclosing generic". // // TODO: consider instead keeping this metadata in a separate hash map keyed by diff --git a/toolchain/sem_ir/generic.h b/toolchain/sem_ir/generic.h index 744bd40b8613..803623490f7c 100644 --- a/toolchain/sem_ir/generic.h +++ b/toolchain/sem_ir/generic.h @@ -43,7 +43,7 @@ struct Generic : public Printable { InstBlockId bindings_id; // The self specific of this generic, which is a specific where every generic // parameter's argument is that same parameter. For example, the self specific - // of `Vector(T:! type)` is `Vector(T)`. + // of `Vector(T: type)` is `Vector(T)`. SpecificId self_specific_id; // The following members are set at the end of the corresponding region of the diff --git a/toolchain/sem_ir/stringify.cpp b/toolchain/sem_ir/stringify.cpp index bca0e460c999..2c696ca0940b 100644 --- a/toolchain/sem_ir/stringify.cpp +++ b/toolchain/sem_ir/stringify.cpp @@ -370,7 +370,7 @@ class Stringifier { } auto StringifyInst(InstId /*inst_id*/, FacetAccessType inst) -> void { - // Given `T:! I`, print `T as type` as simply `T`. + // Given `T: I`, print `T as type` as simply `T`. step_stack_->PushInstId(inst.facet_value_inst_id); } diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index 9dba76d8fbb4..a17704462229 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -215,7 +215,7 @@ struct Assign { InstId rhs_id; }; -// An associated constant declaration in an interface, such as `let T:! type;`. +// An associated constant declaration in an interface, such as `let T: type;`. struct AssociatedConstantDecl { static constexpr auto Kind = InstKind::AssociatedConstantDecl @@ -1986,7 +1986,7 @@ struct StructValue { InstBlockId elements_id; }; -// Binds a symbolic name, such as `x` in `let x:! i32 = 7;`. See AnyBinding for +// Binds a symbolic name, such as `x` in `let x: i32 = 7;`. See AnyBinding for // member documentation. struct SymbolicBinding { static constexpr auto Kind = InstKind::SymbolicBinding.Define( diff --git a/toolchain/testing/testdata/min_prelude/parts/as.carbon b/toolchain/testing/testdata/min_prelude/parts/as.carbon index 0227a2e5de7c..9e6902f58e05 100644 --- a/toolchain/testing/testdata/min_prelude/parts/as.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/as.carbon @@ -14,21 +14,21 @@ export import library "prelude/parts/default"; export import library "prelude/parts/destroy"; export import library "prelude/parts/form"; -interface UnsafeAs(Dest:! type) { +interface UnsafeAs(Dest: type) { fn Convert(self) -> Dest; } -interface As(Dest:! type) { +interface As(Dest: type) { // TODO: extend UnsafeAs(Dest); fn Convert(self) -> Dest; } -interface ImplicitAs(Dest:! type) { +interface ImplicitAs(Dest: type) { // TODO: extend As(Dest); fn Convert(self) -> Dest; } -interface BitAndWith(Other:! type) { +interface BitAndWith(Other: type) { fn Op(self, other: Other) -> Self; } diff --git a/toolchain/testing/testdata/min_prelude/parts/copy.carbon b/toolchain/testing/testdata/min_prelude/parts/copy.carbon index fcf26df69fc6..2919da8c5c6d 100644 --- a/toolchain/testing/testdata/min_prelude/parts/copy.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/copy.carbon @@ -21,7 +21,7 @@ private alias FloatLiteral = MakeFloatLiteral(); private fn MakeIntLiteral() -> type = "int_literal.make_type"; private alias IntLiteral = MakeIntLiteral(); -impl forall [T:! Copy] const T as Copy { +impl forall [T: Copy] const T as Copy { fn Op(self) -> Self { return (self as T).(Copy.Op)() as const T; } } @@ -41,7 +41,7 @@ impl IntLiteral as Copy { fn Op(self) -> Self = "primitive_copy"; } -impl forall [T:! type] T* as Copy { +impl forall [T: type] T* as Copy { fn Op(self) -> Self = "primitive_copy"; } @@ -53,13 +53,13 @@ impl () as Copy { fn Op(self) -> Self = "no_op"; } -impl forall [T:! Copy, U:! Copy] (T, U) as Copy { +impl forall [T: Copy, U: Copy] (T, U) as Copy { fn Op(self) -> Self { return (self.0.Op(), self.1.Op()); } } -impl forall [T:! Copy, U:! Copy, V:! Copy] (T, U, V) as Copy { +impl forall [T: Copy, U: Copy, V: Copy] (T, U, V) as Copy { fn Op(self) -> Self { return (self.0.Op(), self.1.Op(), self.2.Op()); } diff --git a/toolchain/testing/testdata/min_prelude/parts/default.carbon b/toolchain/testing/testdata/min_prelude/parts/default.carbon index 6570a2d7931f..3f0941ef3374 100644 --- a/toolchain/testing/testdata/min_prelude/parts/default.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/default.carbon @@ -10,12 +10,12 @@ interface DefaultOrUnformed { fn Op() -> Self; } interface Default { fn Op() -> Self; } -final impl forall [T:! Default] T as DefaultOrUnformed { +final impl forall [T: Default] T as DefaultOrUnformed { fn Op() -> Self { return T.(Default.Op)(); } } // In tests, just allow any type to be default-initialized as a no-op. // TODO: This is a hack to allow existing tests to contiue working. -impl forall [T:! type] T as DefaultOrUnformed { +impl forall [T: type] T as DefaultOrUnformed { fn Op() -> Self = "make_uninitialized"; } diff --git a/toolchain/testing/testdata/min_prelude/parts/float.carbon b/toolchain/testing/testdata/min_prelude/parts/float.carbon index 01c57fcc3259..286e16a9d3ae 100644 --- a/toolchain/testing/testdata/min_prelude/parts/float.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/float.carbon @@ -18,19 +18,19 @@ export import library "prelude/parts/int_literal"; private fn MakeFloat(size: IntLiteral) -> type = "float.make_type"; -class Float(N:! IntLiteral) { +class Float(N: IntLiteral) { adapt MakeFloat(N); } -impl forall [N:! IntLiteral] Float(N) as Copy { +impl forall [N: IntLiteral] Float(N) as Copy { fn Op(self) -> Self = "primitive_copy"; } -impl forall [To:! IntLiteral] FloatLiteral as ImplicitAs(Float(To)) { +impl forall [To: IntLiteral] FloatLiteral as ImplicitAs(Float(To)) { fn Convert(self) -> Float(To) = "float.convert_checked"; } // TODO: Remove this once ImplicitAs extends As. -impl forall [To:! IntLiteral] FloatLiteral as As(Float(To)) { +impl forall [To: IntLiteral] FloatLiteral as As(Float(To)) { fn Convert(self) -> Float(To) = "float.convert_checked"; } diff --git a/toolchain/testing/testdata/min_prelude/parts/int.carbon b/toolchain/testing/testdata/min_prelude/parts/int.carbon index ce3b328fab9d..c03160c3bc43 100644 --- a/toolchain/testing/testdata/min_prelude/parts/int.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/int.carbon @@ -16,38 +16,38 @@ export import library "prelude/parts/int_literal"; private fn MakeInt(size: IntLiteral) -> type = "int.make_type_signed"; -class Int(N:! IntLiteral) { +class Int(N: IntLiteral) { adapt MakeInt(N); } // Copy. -impl forall [N:! IntLiteral] Int(N) as Copy { +impl forall [N: IntLiteral] Int(N) as Copy { fn Op(self) -> Self = "primitive_copy"; } // Conversions. -impl forall [To:! IntLiteral] IntLiteral as ImplicitAs(Int(To)) { +impl forall [To: IntLiteral] IntLiteral as ImplicitAs(Int(To)) { fn Convert(self) -> Int(To) = "int.convert_checked"; } -final impl forall [From:! IntLiteral] Int(From) as ImplicitAs(IntLiteral) { +final impl forall [From: IntLiteral] Int(From) as ImplicitAs(IntLiteral) { fn Convert(self) -> IntLiteral = "int.convert_checked"; } // TODO: Remove these once ImplicitAs extends As. -impl forall [To:! IntLiteral] IntLiteral as As(Int(To)) { +impl forall [To: IntLiteral] IntLiteral as As(Int(To)) { fn Convert(self) -> Int(To) = "int.convert_checked"; } -final impl forall [From:! IntLiteral] Int(From) as As(IntLiteral) { +final impl forall [From: IntLiteral] Int(From) as As(IntLiteral) { fn Convert(self) -> IntLiteral = "int.convert_checked"; } // Negate. -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] Int(N) as Negate where .Result = Self { fn Op(self) -> Self = "int.snegate"; } diff --git a/toolchain/testing/testdata/min_prelude/parts/int_literal.carbon b/toolchain/testing/testdata/min_prelude/parts/int_literal.carbon index a60d20d2d8e7..c7b29e5a4d8b 100644 --- a/toolchain/testing/testdata/min_prelude/parts/int_literal.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/int_literal.carbon @@ -12,7 +12,7 @@ alias IntLiteral = MakeIntLiteral(); // Negate. interface Negate { - let Result:! type; + let Result: type; fn Op(self) -> Result; } diff --git a/toolchain/testing/testdata/min_prelude/parts/iterate.carbon b/toolchain/testing/testdata/min_prelude/parts/iterate.carbon index 600b71b38fb1..257def2b6f38 100644 --- a/toolchain/testing/testdata/min_prelude/parts/iterate.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/iterate.carbon @@ -13,8 +13,8 @@ import library "prelude/parts/copy"; import library "prelude/parts/optional"; interface Iterate { - let ElementType:! Copy; - let CursorType:! type; + let ElementType: Copy; + let CursorType: type; fn NewCursor(self) -> CursorType; fn Next(self, cursor: CursorType*) -> Optional(ElementType); } diff --git a/toolchain/testing/testdata/min_prelude/parts/maybe_unformed.carbon b/toolchain/testing/testdata/min_prelude/parts/maybe_unformed.carbon index 86973d9bac33..7b71488d55fb 100644 --- a/toolchain/testing/testdata/min_prelude/parts/maybe_unformed.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/maybe_unformed.carbon @@ -12,6 +12,6 @@ export import library "prelude/parts/destroy"; private fn Make(t: type) -> type = "maybe_unformed.make_type"; -class MaybeUnformed(T:! type) { +class MaybeUnformed(T: type) { adapt Make(T); } diff --git a/toolchain/testing/testdata/min_prelude/parts/optional.carbon b/toolchain/testing/testdata/min_prelude/parts/optional.carbon index 134a53d214c0..9740d28f62a4 100644 --- a/toolchain/testing/testdata/min_prelude/parts/optional.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/optional.carbon @@ -16,7 +16,7 @@ import library "prelude/parts/copy"; import library "prelude/parts/default"; import library "prelude/parts/destroy"; -class Optional(T:! Copy) { +class Optional(T: Copy) { fn None() -> Self { returned var me: Self; me.has_value = false; diff --git a/toolchain/testing/testdata/min_prelude/parts/uint.carbon b/toolchain/testing/testdata/min_prelude/parts/uint.carbon index 89da313f774d..bee066724126 100644 --- a/toolchain/testing/testdata/min_prelude/parts/uint.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/uint.carbon @@ -16,38 +16,38 @@ export import library "prelude/parts/int_literal"; private fn MakeUInt(size: IntLiteral) -> type = "int.make_type_unsigned"; -class UInt(N:! IntLiteral) { +class UInt(N: IntLiteral) { adapt MakeUInt(N); } // Copy. -impl forall [N:! IntLiteral] UInt(N) as Copy { +impl forall [N: IntLiteral] UInt(N) as Copy { fn Op(self) -> Self = "primitive_copy"; } // Conversions. -impl forall [To:! IntLiteral] IntLiteral as ImplicitAs(UInt(To)) { +impl forall [To: IntLiteral] IntLiteral as ImplicitAs(UInt(To)) { fn Convert(self) -> UInt(To) = "int.convert_checked"; } -final impl forall [From:! IntLiteral] UInt(From) as ImplicitAs(IntLiteral) { +final impl forall [From: IntLiteral] UInt(From) as ImplicitAs(IntLiteral) { fn Convert(self) -> IntLiteral = "int.convert_checked"; } // TODO: Remove these once ImplicitAs extends As. -impl forall [To:! IntLiteral] IntLiteral as As(UInt(To)) { +impl forall [To: IntLiteral] IntLiteral as As(UInt(To)) { fn Convert(self) -> UInt(To) = "int.convert_checked"; } -final impl forall [From:! IntLiteral] UInt(From) as As(IntLiteral) { +final impl forall [From: IntLiteral] UInt(From) as As(IntLiteral) { fn Convert(self) -> IntLiteral = "int.convert_checked"; } // Negate. -final impl forall [N:! IntLiteral] +final impl forall [N: IntLiteral] UInt(N) as Negate where .Result = Self { fn Op(self) -> Self = "int.unegate"; } diff --git a/utils/textmate/Samples/choices.carbon b/utils/textmate/Samples/choices.carbon index 1a381988cf1b..2f93d6d376a0 100644 --- a/utils/textmate/Samples/choices.carbon +++ b/utils/textmate/Samples/choices.carbon @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -choice SomeChoice(T:! type) { +choice SomeChoice(T: type) { Val1, Val2(a: i32, b: array(T, 5), t: T), Val3 diff --git a/utils/textmate/Samples/comments.carbon b/utils/textmate/Samples/comments.carbon index 9f726fc2679d..2598264bee85 100644 --- a/utils/textmate/Samples/comments.carbon +++ b/utils/textmate/Samples/comments.carbon @@ -4,7 +4,7 @@ // This is a comment. // Comment with whitespace. -// class C; fn F[T:! A](a: T) -> i32 { return 86; } +// class C; fn F[T: A](a: T) -> i32 { return 86; } //@dump-sem-ir-begin //@dump-sem-ir-end //@dump-sem-ir- diff --git a/utils/textmate/Samples/functions_variables.carbon b/utils/textmate/Samples/functions_variables.carbon index fab747303106..907bc2031988 100644 --- a/utils/textmate/Samples/functions_variables.carbon +++ b/utils/textmate/Samples/functions_variables.carbon @@ -5,14 +5,14 @@ fn F; fn F1(); fn Func(a: i32, b: A); -fn Generic[T:! type, U:! I](a: T, b: U) -> U; +fn Generic[T: type, U: I](a: T, b: U) -> U; fn Lambda(a: i32) -> i32 => return a + 5; fn MultiLine[ - A:! type, - B:! C1, - C:! C2 + A: type, + B: C1, + C: C2 ](a: A(B, C), b: B, c: i32); @@ -23,17 +23,17 @@ a: A; a: A = (b as A); a: i32; a: array(A, 5); -a:! type; -a:! T = b; +generic a: type; +generic a: T = b; a: A in some_list; var a: T; let b: T; binding: T; -binding:! T; +generic binding: T; var multiline: T; -fn F(ref a: A, const ref b:! B); +fn F(ref a: A, const ref b: B); fn F() -> T; fn F() -> T.U { return val; } fn F() -> i32 => return val; diff --git a/utils/textmate/Samples/main.carbon b/utils/textmate/Samples/main.carbon index 380fe968ec5e..73fa0feca659 100644 --- a/utils/textmate/Samples/main.carbon +++ b/utils/textmate/Samples/main.carbon @@ -6,7 +6,7 @@ package Carbon api; -interface HasValueParam(T:! type, V:! T) { +interface HasValueParam(T: type, V: T) { fn Go(self) -> T; } diff --git a/utils/textmate/Samples/types.carbon b/utils/textmate/Samples/types.carbon index 4d2356f0fbf9..d2e46b08042a 100644 --- a/utils/textmate/Samples/types.carbon +++ b/utils/textmate/Samples/types.carbon @@ -3,14 +3,14 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception class C1; -class C2(T1:! type, T2:! C1) {} +class C2(T1: type, T2: C1) {} class C3 { extend base: C1; } class (C4( - (T1:! type), - T2:! + (T1: type), + T2: (A.(B(E, F(G)).C) .D))) ; diff --git a/utils/textmate/Syntaxes/carbon.tmLanguage b/utils/textmate/Syntaxes/carbon.tmLanguage index fc4baf1f2bfa..c6f90f745935 100644 --- a/utils/textmate/Syntaxes/carbon.tmLanguage +++ b/utils/textmate/Syntaxes/carbon.tmLanguage @@ -607,7 +607,7 @@ THIS FILE IS AUTOGENERATED FROM carbon.tmLanguage.json. DO NOT EDIT. match - \b(and|as|impls|in|like|not|or|partial|ref|template|where)\b + \b(and|as|generic|impls|in|like|not|or|partial|ref|runtime|template|where)\b name keyword.control.carbon @@ -797,7 +797,7 @@ THIS FILE IS AUTOGENERATED FROM carbon.tmLanguage.json. DO NOT EDIT. begin - :!? + : comment Matches types in bindings. end diff --git a/utils/vscode/carbon.tmLanguage.json b/utils/vscode/carbon.tmLanguage.json index 87cfaa80f47e..db2ac7c7a7b6 100644 --- a/utils/vscode/carbon.tmLanguage.json +++ b/utils/vscode/carbon.tmLanguage.json @@ -226,7 +226,7 @@ }, { "comment": "Matches types in bindings.", - "begin": ":!?", + "begin": ":", "end": "(?=([;{=]|->|in|where))", "patterns": [ { "include": "#common" }, @@ -346,7 +346,7 @@ }, { "name": "keyword.control.carbon", - "match": "\\b(and|as|impls|in|like|not|or|partial|ref|template|where)\\b" + "match": "\\b(and|as|generic|impls|in|like|not|or|partial|ref|runtime|template|where)\\b" } ] },