Replace :! binding syntax with phase keywords and contextual defaults (#7479)

Implement the toolchain side of proposal #7254, removing the `:!`
binding
syntax for generic and template parameters in favor of the keywords
`generic`,
`template`, and `runtime` plus contextual defaults for phase.

For valid programs this is semantics-preserving: each binding resolves
to the
same phase, and produces the same SemIR, as it did under `:!`/`:`. The
parser
derives a binding's phase from its syntactic context plus any explicit
phase
keyword; new diagnostics and error recovery for misused keywords are
described
below.

Implementation details for each component:

- Lexer: remove the `:!` (`ColonExclaim`) token, move its virtual
parse-node
  budget onto `:`, and add the `generic` and `runtime` keywords.
- Parser: thread a `BindingContext` (`ExplicitParam`, `DeducedParam`, or
`CompileTimeEntityParam`) from declaration introducers down through
parameter
lists to each binding pattern, using a one-token lookahead to
distinguish a
name-qualifier parameter list from a declaration's own final list.
Parameters
of a compile-time entity (`class`, `interface`, `constraint`, `choice`,
`alias`, `export`, `namespace`) and deduced `[]` parameters default to
checked
generic; explicit function parameters and local bindings default to
runtime.
`HandleBindingPattern` resolves the phase from that context plus the
keyword: a
`generic` keyword needs no node of its own (the phase is carried by the
  binding's node kind), while a `runtime` keyword is preserved as a
`RuntimeBindingName` node so `check` can name it in a diagnostic. A
phase
keyword that is merely redundant with the contextual default is
diagnosed
  here, without invalidating the parse tree.
- Check: a phase keyword that is invalid for its context (for example
`runtime`
on a checked-generic parameter) is diagnosed here, and recovers by
building an
error binding that still introduces the name so that later uses of it do
not
  produce cascading errors.

The removed `:!` syntax is now rejected as an ordinary parse error.

The `form`/`:?`/`->?` ("extended types") portion of proposal #7254 is
left for a
separate change.

Assisted-by: Claude Code
This commit is contained in:
Chandler Carruth
2026-07-11 01:22:44 +00:00
committed by GitHub
parent bf106c3b4b
commit 8be274cf60
482 changed files with 16917 additions and 16226 deletions
@@ -78,7 +78,7 @@ library "[[@TEST_NAME]]";
import Cpp;
class B(N:! i32) {
class B(N: i32) {
var a: array(i8, N);
}
@@ -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)) {
@@ -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);
}
+5 -5
View File
@@ -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);
}
@@ -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 '''
@@ -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: <namespace> = 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: <witness> = require_complete_type %T.as_type.loc20_16.1 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT: %require_complete: <witness> = 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: <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 function> = 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> = 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> = 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> = 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
@@ -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 `<type of Cpp.foo>` 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:
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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;
File diff suppressed because it is too large Load Diff
+159 -159
View File
@@ -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: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %require_complete.loc13: <witness> = require_complete_type %EqWith.type.loc11_38.1 [symbolic = %require_complete.loc13 (constants.%require_complete.fb5)]
// CHECK:STDOUT: %require_complete.loc13: <witness> = 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: <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: <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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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> = 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: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %require_complete.loc36: <witness> = require_complete_type %EqWith.type.loc34_38.1 [symbolic = %require_complete.loc36 (constants.%require_complete.fb5)]
// CHECK:STDOUT: %require_complete.loc36: <witness> = 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: <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: <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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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> = 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
@@ -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: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %require_complete.loc15: <witness> = require_complete_type %OrderedWith.type.loc13_48.1 [symbolic = %require_complete.loc15 (constants.%require_complete.3c0)]
// CHECK:STDOUT: %require_complete.loc15: <witness> = 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: <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: <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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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> = 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 function> = 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> = 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 function> = 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> = 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: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %require_complete.loc56: <witness> = require_complete_type %OrderedWith.type.loc54_48.1 [symbolic = %require_complete.loc56 (constants.%require_complete.3c0)]
// CHECK:STDOUT: %require_complete.loc56: <witness> = 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: <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: <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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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> = 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 function> = 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> = 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 function> = 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> = 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
+143 -143
View File
@@ -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: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %require_complete.loc6: <witness> = require_complete_type %EqWith.type.loc4_38.1 [symbolic = %require_complete.loc6 (constants.%require_complete.fb5)]
// CHECK:STDOUT: %require_complete.loc6: <witness> = 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: <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: <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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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> = 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: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %require_complete.loc13: <witness> = require_complete_type %OrderedWith.type.loc11_48.1 [symbolic = %require_complete.loc13 (constants.%require_complete.3c0)]
// CHECK:STDOUT: %require_complete.loc13: <witness> = 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: <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: <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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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 function> = 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> = 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 function> = 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> = 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 function> = 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> = 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, <error>) {
// 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 => <error>
// CHECK:STDOUT: %T.as_type.loc4_44.1 => <error>
// CHECK:STDOUT: %pattern_type.loc4_42 => <error>
// CHECK:STDOUT: %x.param_patt.loc4_42.2 => <error>
// CHECK:STDOUT: %x.patt.loc4_42.2 => <error>
// 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 => <error>
// CHECK:STDOUT: %T.as_type.loc4_42.1 => <error>
// CHECK:STDOUT: %pattern_type.loc4_40 => <error>
// CHECK:STDOUT: %x.param_patt.loc4_40.2 => <error>
// CHECK:STDOUT: %x.patt.loc4_40.2 => <error>
// 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, <error>) {
// 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 => <error>
// CHECK:STDOUT: %T.as_type.loc11_54.1 => <error>
// CHECK:STDOUT: %pattern_type.loc11_52 => <error>
// CHECK:STDOUT: %x.param_patt.loc11_52.2 => <error>
// CHECK:STDOUT: %x.patt.loc11_52.2 => <error>
// 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 => <error>
// CHECK:STDOUT: %T.as_type.loc11_52.1 => <error>
// CHECK:STDOUT: %pattern_type.loc11_50 => <error>
// CHECK:STDOUT: %x.param_patt.loc11_50.2 => <error>
// CHECK:STDOUT: %x.patt.loc11_50.2 => <error>
// 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, <error>) {
// 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 => <error>
// CHECK:STDOUT: %T.as_type.loc11_54.1 => <error>
// CHECK:STDOUT: %pattern_type.loc11_52 => <error>
// CHECK:STDOUT: %x.param_patt.loc11_52.2 => <error>
// CHECK:STDOUT: %x.patt.loc11_52.2 => <error>
// 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 => <error>
// CHECK:STDOUT: %T.as_type.loc11_52.1 => <error>
// CHECK:STDOUT: %pattern_type.loc11_50 => <error>
// CHECK:STDOUT: %x.param_patt.loc11_50.2 => <error>
// CHECK:STDOUT: %x.patt.loc11_50.2 => <error>
// 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, <error>) {
// 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 => <error>
// CHECK:STDOUT: %T.as_type.loc11_54.1 => <error>
// CHECK:STDOUT: %pattern_type.loc11_52 => <error>
// CHECK:STDOUT: %x.param_patt.loc11_52.2 => <error>
// CHECK:STDOUT: %x.patt.loc11_52.2 => <error>
// 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 => <error>
// CHECK:STDOUT: %T.as_type.loc11_52.1 => <error>
// CHECK:STDOUT: %pattern_type.loc11_50 => <error>
// CHECK:STDOUT: %x.param_patt.loc11_50.2 => <error>
// CHECK:STDOUT: %x.patt.loc11_50.2 => <error>
// 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, <error>) {
// 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 => <error>
// CHECK:STDOUT: %T.as_type.loc11_54.1 => <error>
// CHECK:STDOUT: %pattern_type.loc11_52 => <error>
// CHECK:STDOUT: %x.param_patt.loc11_52.2 => <error>
// CHECK:STDOUT: %x.patt.loc11_52.2 => <error>
// 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 => <error>
// CHECK:STDOUT: %T.as_type.loc11_52.1 => <error>
// CHECK:STDOUT: %pattern_type.loc11_50 => <error>
// CHECK:STDOUT: %x.param_patt.loc11_50.2 => <error>
// CHECK:STDOUT: %x.patt.loc11_50.2 => <error>
// 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, <error>) {
// 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 => <error>
// CHECK:STDOUT: %T.as_type.loc11_54.1 => <error>
// CHECK:STDOUT: %pattern_type.loc11_52 => <error>
// CHECK:STDOUT: %x.param_patt.loc11_52.2 => <error>
// CHECK:STDOUT: %x.patt.loc11_52.2 => <error>
// 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 => <error>
// CHECK:STDOUT: %T.as_type.loc11_52.1 => <error>
// CHECK:STDOUT: %pattern_type.loc11_50 => <error>
// CHECK:STDOUT: %x.param_patt.loc11_50.2 => <error>
// CHECK:STDOUT: %x.patt.loc11_50.2 => <error>
// 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:
@@ -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;
@@ -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;
+121 -121
View File
@@ -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: <witness> = 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: <elided>
// CHECK:STDOUT: %Iterate.lookup_impl_witness: <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 function> = 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: <elided>
// 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> = 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: <elided>
// CHECK:STDOUT: %Iterate.lookup_impl_witness: <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 function> = 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: <elided>
// 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> = 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 function> = 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> = 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 function> = 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> = 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: <witness> = 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: <elided>
// CHECK:STDOUT: %Iterate.lookup_impl_witness: <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 function> = 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: <elided>
// 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> = 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: <witness> = 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: <elided>
// CHECK:STDOUT: %Iterate.lookup_impl_witness: <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 function> = 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: <elided>
// 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> = 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: <elided>
// CHECK:STDOUT: %Iterate.lookup_impl_witness: <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 function> = 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: <elided>
// 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> = 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: <elided>
// CHECK:STDOUT: %Iterate.lookup_impl_witness: <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 function> = 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: <elided>
// 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> = 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: <elided>
// CHECK:STDOUT: %Iterate.lookup_impl_witness: <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 function> = 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: <elided>
// 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> = 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
@@ -24,7 +24,7 @@ library "[[@TEST_NAME]]";
import Cpp library "concept.h";
class X(B:! bool) {
class X(B: bool) {
fn Make() -> Self { return {}; }
}
@@ -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]
@@ -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();