|
|
@@ -2,9 +2,6 @@
|
|
|
// Exceptions. See /LICENSE for license information.
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
//
|
|
|
-// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
|
|
|
-// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
|
|
|
-//
|
|
|
// AUTOUPDATE
|
|
|
// TIP: To test this file alone, run:
|
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/where_expr/equal_rewrite.carbon
|
|
|
@@ -19,7 +16,9 @@ interface N {
|
|
|
let P:! type;
|
|
|
}
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
fn Equal(T:! N where .P = {});
|
|
|
+//@dump-sem-ir-end
|
|
|
|
|
|
// --- nested_rewrites.carbon
|
|
|
|
|
|
@@ -30,7 +29,9 @@ interface A {
|
|
|
let C:! type;
|
|
|
}
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
fn NestedRewrite(D:! (A where .B = bool) where .C = ());
|
|
|
+//@dump-sem-ir-end
|
|
|
|
|
|
// --- repeated_rewrite.carbon
|
|
|
|
|
|
@@ -40,9 +41,11 @@ interface E {
|
|
|
let F:! type;
|
|
|
}
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
fn OneRewrite(G:! E where .F = i32) {}
|
|
|
|
|
|
fn RepeatedRewrite(H:! E where .F = i32 and .F = i32) {
|
|
|
+ //@dump-sem-ir-end
|
|
|
OneRewrite(H);
|
|
|
}
|
|
|
|
|
|
@@ -59,9 +62,11 @@ interface J {
|
|
|
let L:! type;
|
|
|
}
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
fn Alphabetical(M:! J where .K = () and .L = bool) {}
|
|
|
|
|
|
fn Reversed(N:! J where .L = bool and .K = ()) {
|
|
|
+ //@dump-sem-ir-end
|
|
|
Alphabetical(N);
|
|
|
}
|
|
|
|
|
|
@@ -108,7 +113,7 @@ fn Calls() {
|
|
|
// CHECK:STDERR: Equal(bool);
|
|
|
// CHECK:STDERR: ^~~~~~~~~~~
|
|
|
// CHECK:STDERR: fail_import_rewrites.carbon:[[@LINE-7]]:1: in import [InImport]
|
|
|
- // CHECK:STDERR: equal_constraint.carbon:8:10: note: initializing generic parameter `T` declared here [InitializingGenericParam]
|
|
|
+ // CHECK:STDERR: equal_constraint.carbon:9:10: note: initializing generic parameter `T` declared here [InitializingGenericParam]
|
|
|
// CHECK:STDERR: fn Equal(T:! N where .P = {});
|
|
|
// CHECK:STDERR: ^
|
|
|
// CHECK:STDERR:
|
|
|
@@ -118,7 +123,7 @@ fn Calls() {
|
|
|
// CHECK:STDERR: NestedRewrite(i32);
|
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR: fail_import_rewrites.carbon:[[@LINE-17]]:1: in import [InImport]
|
|
|
- // CHECK:STDERR: nested_rewrites.carbon:9:18: note: initializing generic parameter `D` declared here [InitializingGenericParam]
|
|
|
+ // CHECK:STDERR: nested_rewrites.carbon:10:18: note: initializing generic parameter `D` declared here [InitializingGenericParam]
|
|
|
// CHECK:STDERR: fn NestedRewrite(D:! (A where .B = bool) where .C = ());
|
|
|
// CHECK:STDERR: ^
|
|
|
// CHECK:STDERR:
|
|
|
@@ -204,13 +209,11 @@ let K: (E where .F = .Self.G) = bool;
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %N.type: type = facet_type <@N> [concrete]
|
|
|
-// CHECK:STDOUT: %Self: %N.type = bind_symbolic_name Self, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %N.assoc_type: type = assoc_entity_type @N [concrete]
|
|
|
// CHECK:STDOUT: %assoc0: %N.assoc_type = assoc_entity element0, @N.%P [concrete]
|
|
|
// CHECK:STDOUT: %.Self: %N.type = bind_symbolic_name .Self [symbolic_self]
|
|
|
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
|
|
|
// CHECK:STDOUT: %N.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @N [symbolic_self]
|
|
|
-// CHECK:STDOUT: %N.facet: %N.type = facet_value %.Self.as_type, (%N.lookup_impl_witness) [symbolic_self]
|
|
|
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %N.lookup_impl_witness, element0 [symbolic_self]
|
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
// CHECK:STDOUT: %N_where.type: type = facet_type <@N where %impl.elem0 = %empty_struct_type> [concrete]
|
|
|
@@ -221,83 +224,50 @@ let K: (E where .F = .Self.G) = bool;
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
-// CHECK:STDOUT: import Core//prelude
|
|
|
-// CHECK:STDOUT: import Core//prelude/...
|
|
|
-// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Core = imports.%Core
|
|
|
-// CHECK:STDOUT: .N = %N.decl
|
|
|
-// CHECK:STDOUT: .Equal = %Equal.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import = import Core
|
|
|
-// CHECK:STDOUT: %N.decl: type = interface_decl @N [concrete = constants.%N.type] {} {}
|
|
|
// CHECK:STDOUT: %Equal.decl: %Equal.type = fn_decl @Equal [concrete = constants.%Equal] {
|
|
|
// CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %.loc8_16.1: type = splice_block %.loc8_16.2 [concrete = constants.%N_where.type] {
|
|
|
+// CHECK:STDOUT: %.loc9_16.1: type = splice_block %.loc9_16.2 [concrete = constants.%N_where.type] {
|
|
|
// CHECK:STDOUT: %N.ref: type = name_ref N, file.%N.decl [concrete = constants.%N.type]
|
|
|
-// CHECK:STDOUT: %.Self: %N.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: %.Self.ref: %N.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
// CHECK:STDOUT: %P.ref: %N.assoc_type = name_ref P, @P.%assoc0 [concrete = constants.%assoc0]
|
|
|
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc8_22: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %.loc9_22: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
|
|
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%N.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %.loc8_28.1: %empty_struct_type = struct_literal ()
|
|
|
-// CHECK:STDOUT: %.loc8_28.2: type = converted %.loc8_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %.loc8_16.2: type = where_expr %.Self [concrete = constants.%N_where.type] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_28.2
|
|
|
+// CHECK:STDOUT: %.loc9_28.1: %empty_struct_type = struct_literal ()
|
|
|
+// CHECK:STDOUT: %.loc9_28.2: type = converted %.loc9_28.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
|
|
+// CHECK:STDOUT: %.loc9_16.2: type = where_expr %.Self [concrete = constants.%N_where.type] {
|
|
|
+// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_28.2
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %T.loc8_10.1: %N_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_10.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.loc9_10.1: %N_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_10.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: interface @N {
|
|
|
-// CHECK:STDOUT: %Self: %N.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
|
|
-// CHECK:STDOUT: %P: type = assoc_const_decl @P [concrete] {
|
|
|
-// CHECK:STDOUT: %assoc0: %N.assoc_type = assoc_entity element0, @N.%P [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = %Self
|
|
|
-// CHECK:STDOUT: .P = @P.%assoc0
|
|
|
-// CHECK:STDOUT: witness = (%P)
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic assoc_const @P(@N.%Self: %N.type) {
|
|
|
-// CHECK:STDOUT: assoc_const P:! type;
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @Equal(%T.loc8_10.1: %N_where.type) {
|
|
|
-// CHECK:STDOUT: %T.loc8_10.2: %N_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_10.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: generic fn @Equal(%T.loc9_10.1: %N_where.type) {
|
|
|
+// CHECK:STDOUT: %T.loc9_10.2: %N_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc9_10.2 (constants.%T)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn();
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @P(constants.%Self) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @P(constants.%N.facet) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @Equal(constants.%T) {
|
|
|
-// CHECK:STDOUT: %T.loc8_10.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.loc9_10.2 => constants.%T
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- nested_rewrites.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete]
|
|
|
-// CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete]
|
|
|
// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, @A.%B [concrete]
|
|
|
// CHECK:STDOUT: %assoc1: %A.assoc_type = assoc_entity element1, @A.%C [concrete]
|
|
|
// CHECK:STDOUT: %.Self.3ca: %A.type = bind_symbolic_name .Self [symbolic_self]
|
|
|
// CHECK:STDOUT: %.Self.as_type.adb: type = facet_access_type %.Self.3ca [symbolic_self]
|
|
|
// CHECK:STDOUT: %A.lookup_impl_witness.5ad: <witness> = lookup_impl_witness %.Self.3ca, @A [symbolic_self]
|
|
|
-// CHECK:STDOUT: %A.facet.ace: %A.type = facet_value %.Self.as_type.adb, (%A.lookup_impl_witness.5ad) [symbolic_self]
|
|
|
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %A.lookup_impl_witness.5ad, element0 [symbolic_self]
|
|
|
// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
|
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
@@ -306,7 +276,6 @@ let K: (E where .F = .Self.G) = bool;
|
|
|
// CHECK:STDOUT: %.Self.60a: %A_where.type.ef7 = bind_symbolic_name .Self [symbolic_self]
|
|
|
// CHECK:STDOUT: %.Self.as_type.e64: type = facet_access_type %.Self.60a [symbolic_self]
|
|
|
// CHECK:STDOUT: %A.lookup_impl_witness.138: <witness> = lookup_impl_witness %.Self.60a, @A [symbolic_self]
|
|
|
-// CHECK:STDOUT: %A.facet.418: %A.type = facet_value %.Self.as_type.e64, (%A.lookup_impl_witness.138) [symbolic_self]
|
|
|
// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %A.lookup_impl_witness.138, element1 [symbolic_self]
|
|
|
// CHECK:STDOUT: %A_where.type.2d0: type = facet_type <@A where %impl.elem0 = bool and %impl.elem1 = %empty_tuple.type> [concrete]
|
|
|
// CHECK:STDOUT: %D: %A_where.type.2d0 = bind_symbolic_name D, 0 [symbolic]
|
|
|
@@ -316,113 +285,63 @@ let K: (E where .F = .Self.G) = bool;
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
-// CHECK:STDOUT: .Bool = %Core.Bool
|
|
|
-// CHECK:STDOUT: import Core//prelude
|
|
|
-// CHECK:STDOUT: import Core//prelude/...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Core = imports.%Core
|
|
|
-// CHECK:STDOUT: .A = %A.decl
|
|
|
-// CHECK:STDOUT: .NestedRewrite = %NestedRewrite.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import = import Core
|
|
|
-// CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {}
|
|
|
// CHECK:STDOUT: %NestedRewrite.decl: %NestedRewrite.type = fn_decl @NestedRewrite [concrete = constants.%NestedRewrite] {
|
|
|
// CHECK:STDOUT: %D.patt: %pattern_type.24c = symbolic_binding_pattern D, 0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %.loc9_42.1: type = splice_block %.loc9_42.2 [concrete = constants.%A_where.type.2d0] {
|
|
|
+// CHECK:STDOUT: %.loc10_42.1: type = splice_block %.loc10_42.2 [concrete = constants.%A_where.type.2d0] {
|
|
|
// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
|
|
|
-// CHECK:STDOUT: %.Self.1: %A.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.3ca]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc9_31: %A.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.3ca]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
+// CHECK:STDOUT: %.Self.ref.loc10_31: %A.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.3ca]
|
|
|
// CHECK:STDOUT: %B.ref: %A.assoc_type = name_ref B, @B.%assoc0 [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc9_31: type = facet_access_type %.Self.ref.loc9_31 [symbolic_self = constants.%.Self.as_type.adb]
|
|
|
-// CHECK:STDOUT: %.loc9_31: type = converted %.Self.ref.loc9_31, %.Self.as_type.loc9_31 [symbolic_self = constants.%.Self.as_type.adb]
|
|
|
+// CHECK:STDOUT: %.Self.as_type.loc10_31: type = facet_access_type %.Self.ref.loc10_31 [symbolic_self = constants.%.Self.as_type.adb]
|
|
|
+// CHECK:STDOUT: %.loc10_31: type = converted %.Self.ref.loc10_31, %.Self.as_type.loc10_31 [symbolic_self = constants.%.Self.as_type.adb]
|
|
|
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%A.lookup_impl_witness.5ad, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc9_36.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc9_36.2: type = converted %bool.make_type, %.loc9_36.1 [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc9_25: type = where_expr %.Self.1 [concrete = constants.%A_where.type.ef7] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_36.2
|
|
|
+// CHECK:STDOUT: %.loc10_36.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
|
|
+// CHECK:STDOUT: %.loc10_36.2: type = converted %bool.make_type, %.loc10_36.1 [concrete = bool]
|
|
|
+// CHECK:STDOUT: %.loc10_25: type = where_expr %.Self.1 [concrete = constants.%A_where.type.ef7] {
|
|
|
+// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_36.2
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %.Self.2: %A_where.type.ef7 = bind_symbolic_name .Self [symbolic_self = constants.%.Self.60a]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc9_48: %A_where.type.ef7 = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.60a]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
+// CHECK:STDOUT: %.Self.ref.loc10_48: %A_where.type.ef7 = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.60a]
|
|
|
// CHECK:STDOUT: %C.ref: %A.assoc_type = name_ref C, @C.%assoc1 [concrete = constants.%assoc1]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc9_48: type = facet_access_type %.Self.ref.loc9_48 [symbolic_self = constants.%.Self.as_type.e64]
|
|
|
-// CHECK:STDOUT: %.loc9_48: type = converted %.Self.ref.loc9_48, %.Self.as_type.loc9_48 [symbolic_self = constants.%.Self.as_type.e64]
|
|
|
+// CHECK:STDOUT: %.Self.as_type.loc10_48: type = facet_access_type %.Self.ref.loc10_48 [symbolic_self = constants.%.Self.as_type.e64]
|
|
|
+// CHECK:STDOUT: %.loc10_48: type = converted %.Self.ref.loc10_48, %.Self.as_type.loc10_48 [symbolic_self = constants.%.Self.as_type.e64]
|
|
|
// CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%A.lookup_impl_witness.138, element1 [symbolic_self = constants.%impl.elem1]
|
|
|
-// CHECK:STDOUT: %.loc9_54.1: %empty_tuple.type = tuple_literal ()
|
|
|
-// CHECK:STDOUT: %.loc9_54.2: type = converted %.loc9_54.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
|
-// CHECK:STDOUT: %.loc9_42.2: type = where_expr %.Self.2 [concrete = constants.%A_where.type.2d0] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc9_54.2
|
|
|
+// CHECK:STDOUT: %.loc10_54.1: %empty_tuple.type = tuple_literal ()
|
|
|
+// CHECK:STDOUT: %.loc10_54.2: type = converted %.loc10_54.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
|
+// CHECK:STDOUT: %.loc10_42.2: type = where_expr %.Self.2 [concrete = constants.%A_where.type.2d0] {
|
|
|
+// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc10_54.2
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %D.loc9_18.1: %A_where.type.2d0 = bind_symbolic_name D, 0 [symbolic = %D.loc9_18.2 (constants.%D)]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: interface @A {
|
|
|
-// CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
|
|
-// CHECK:STDOUT: %B: type = assoc_const_decl @B [concrete] {
|
|
|
-// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, @A.%B [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %C: type = assoc_const_decl @C [concrete] {
|
|
|
-// CHECK:STDOUT: %assoc1: %A.assoc_type = assoc_entity element1, @A.%C [concrete = constants.%assoc1]
|
|
|
+// CHECK:STDOUT: %D.loc10_18.1: %A_where.type.2d0 = bind_symbolic_name D, 0 [symbolic = %D.loc10_18.2 (constants.%D)]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = %Self
|
|
|
-// CHECK:STDOUT: .B = @B.%assoc0
|
|
|
-// CHECK:STDOUT: .C = @C.%assoc1
|
|
|
-// CHECK:STDOUT: witness = (%B, %C)
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic assoc_const @B(@A.%Self: %A.type) {
|
|
|
-// CHECK:STDOUT: assoc_const B:! type;
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic assoc_const @C(@A.%Self: %A.type) {
|
|
|
-// CHECK:STDOUT: assoc_const C:! type;
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @NestedRewrite(%D.loc9_18.1: %A_where.type.2d0) {
|
|
|
-// CHECK:STDOUT: %D.loc9_18.2: %A_where.type.2d0 = bind_symbolic_name D, 0 [symbolic = %D.loc9_18.2 (constants.%D)]
|
|
|
+// CHECK:STDOUT: generic fn @NestedRewrite(%D.loc10_18.1: %A_where.type.2d0) {
|
|
|
+// CHECK:STDOUT: %D.loc10_18.2: %A_where.type.2d0 = bind_symbolic_name D, 0 [symbolic = %D.loc10_18.2 (constants.%D)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn();
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @B(constants.%Self) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @C(constants.%Self) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @B(constants.%A.facet.ace) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @C(constants.%A.facet.418) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @NestedRewrite(constants.%D) {
|
|
|
-// CHECK:STDOUT: %D.loc9_18.2 => constants.%D
|
|
|
+// CHECK:STDOUT: %D.loc10_18.2 => constants.%D
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- repeated_rewrite.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %E.type: type = facet_type <@E> [concrete]
|
|
|
-// CHECK:STDOUT: %Self: %E.type = bind_symbolic_name Self, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %E.assoc_type: type = assoc_entity_type @E [concrete]
|
|
|
// CHECK:STDOUT: %assoc0: %E.assoc_type = assoc_entity element0, @E.%F [concrete]
|
|
|
// CHECK:STDOUT: %.Self: %E.type = bind_symbolic_name .Self [symbolic_self]
|
|
|
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
|
|
|
// CHECK:STDOUT: %E.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @E [symbolic_self]
|
|
|
-// CHECK:STDOUT: %E.facet: %E.type = facet_value %.Self.as_type, (%E.lookup_impl_witness) [symbolic_self]
|
|
|
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %E.lookup_impl_witness, element0 [symbolic_self]
|
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
|
-// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
|
|
|
-// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
-// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
|
// CHECK:STDOUT: %E_where.type: type = facet_type <@E where %impl.elem0 = %i32> [concrete]
|
|
|
// CHECK:STDOUT: %G: %E_where.type = bind_symbolic_name G, 0 [symbolic]
|
|
|
@@ -432,118 +351,64 @@ let K: (E where .F = .Self.G) = bool;
|
|
|
// CHECK:STDOUT: %H: %E_where.type = bind_symbolic_name H, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %RepeatedRewrite.type: type = fn_type @RepeatedRewrite [concrete]
|
|
|
// CHECK:STDOUT: %RepeatedRewrite: %RepeatedRewrite.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %OneRewrite.specific_fn.7fa5d5.1: <specific function> = specific_function %OneRewrite, @OneRewrite(%H) [symbolic]
|
|
|
// CHECK:STDOUT: %I: %E_where.type = bind_symbolic_name I, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %OneRewriteAgain.type: type = fn_type @OneRewriteAgain [concrete]
|
|
|
-// CHECK:STDOUT: %OneRewriteAgain: %OneRewriteAgain.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %RepeatedRewrite.specific_fn: <specific function> = specific_function %RepeatedRewrite, @RepeatedRewrite(%I) [symbolic]
|
|
|
// CHECK:STDOUT: %OneRewrite.specific_fn.7fa5d5.2: <specific function> = specific_function %OneRewrite, @OneRewrite(%I) [symbolic]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
-// CHECK:STDOUT: .Int = %Core.Int
|
|
|
-// CHECK:STDOUT: import Core//prelude
|
|
|
-// CHECK:STDOUT: import Core//prelude/...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Core = imports.%Core
|
|
|
-// CHECK:STDOUT: .E = %E.decl
|
|
|
-// CHECK:STDOUT: .OneRewrite = %OneRewrite.decl
|
|
|
-// CHECK:STDOUT: .RepeatedRewrite = %RepeatedRewrite.decl
|
|
|
-// CHECK:STDOUT: .OneRewriteAgain = %OneRewriteAgain.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import = import Core
|
|
|
-// CHECK:STDOUT: %E.decl: type = interface_decl @E [concrete = constants.%E.type] {} {}
|
|
|
// CHECK:STDOUT: %OneRewrite.decl: %OneRewrite.type = fn_decl @OneRewrite [concrete = constants.%OneRewrite] {
|
|
|
// CHECK:STDOUT: %G.patt: %pattern_type.c64 = symbolic_binding_pattern G, 0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %.loc8_21.1: type = splice_block %.loc8_21.2 [concrete = constants.%E_where.type] {
|
|
|
+// CHECK:STDOUT: %.loc9_21.1: type = splice_block %.loc9_21.2 [concrete = constants.%E_where.type] {
|
|
|
// CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [concrete = constants.%E.type]
|
|
|
-// CHECK:STDOUT: %.Self: %E.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: %.Self.ref: %E.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
// CHECK:STDOUT: %F.ref: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0]
|
|
|
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc8_27: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %.loc9_27: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
|
|
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%E.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
|
|
-// CHECK:STDOUT: %.loc8_21.2: type = where_expr %.Self [concrete = constants.%E_where.type] {
|
|
|
+// CHECK:STDOUT: %.loc9_21.2: type = where_expr %.Self [concrete = constants.%E_where.type] {
|
|
|
// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %G.loc8_15.1: %E_where.type = bind_symbolic_name G, 0 [symbolic = %G.loc8_15.2 (constants.%G)]
|
|
|
+// CHECK:STDOUT: %G.loc9_15.1: %E_where.type = bind_symbolic_name G, 0 [symbolic = %G.loc9_15.2 (constants.%G)]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %RepeatedRewrite.decl: %RepeatedRewrite.type = fn_decl @RepeatedRewrite [concrete = constants.%RepeatedRewrite] {
|
|
|
// CHECK:STDOUT: %H.patt: %pattern_type.c64 = symbolic_binding_pattern H, 0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %.loc10_26.1: type = splice_block %.loc10_26.2 [concrete = constants.%E_where.type] {
|
|
|
+// CHECK:STDOUT: %.loc11_26.1: type = splice_block %.loc11_26.2 [concrete = constants.%E_where.type] {
|
|
|
// CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [concrete = constants.%E.type]
|
|
|
-// CHECK:STDOUT: %.Self: %E.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc10_32: %E.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %F.ref.loc10_32: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc10_32: type = facet_access_type %.Self.ref.loc10_32 [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc10_32: type = converted %.Self.ref.loc10_32, %.Self.as_type.loc10_32 [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %impl.elem0.loc10_32: type = impl_witness_access constants.%E.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %int_32.loc10_37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
-// CHECK:STDOUT: %i32.loc10_37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc10_45: %E.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %F.ref.loc10_45: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc10_45: type = facet_access_type %.Self.ref.loc10_45 [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc10_45: type = converted %.Self.ref.loc10_45, %.Self.as_type.loc10_45 [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %impl.elem0.loc10_45: type = impl_witness_access constants.%E.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %int_32.loc10_50: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
-// CHECK:STDOUT: %i32.loc10_50: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
|
|
-// CHECK:STDOUT: %.loc10_26.2: type = where_expr %.Self [concrete = constants.%E_where.type] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_32, %i32.loc10_37
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_45, %i32.loc10_50
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
+// CHECK:STDOUT: %.Self.ref.loc11_32: %E.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
+// CHECK:STDOUT: %F.ref.loc11_32: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0]
|
|
|
+// CHECK:STDOUT: %.Self.as_type.loc11_32: type = facet_access_type %.Self.ref.loc11_32 [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %.loc11_32: type = converted %.Self.ref.loc11_32, %.Self.as_type.loc11_32 [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc11_32: type = impl_witness_access constants.%E.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
+// CHECK:STDOUT: %int_32.loc11_37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
+// CHECK:STDOUT: %i32.loc11_37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
|
|
+// CHECK:STDOUT: %.Self.ref.loc11_45: %E.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
+// CHECK:STDOUT: %F.ref.loc11_45: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0]
|
|
|
+// CHECK:STDOUT: %.Self.as_type.loc11_45: type = facet_access_type %.Self.ref.loc11_45 [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %.loc11_45: type = converted %.Self.ref.loc11_45, %.Self.as_type.loc11_45 [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %impl.elem0.loc11_45: type = impl_witness_access constants.%E.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
+// CHECK:STDOUT: %int_32.loc11_50: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
+// CHECK:STDOUT: %i32.loc11_50: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
|
|
+// CHECK:STDOUT: %.loc11_26.2: type = where_expr %.Self [concrete = constants.%E_where.type] {
|
|
|
+// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc11_32, %i32.loc11_37
|
|
|
+// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc11_45, %i32.loc11_50
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %H.loc10_20.1: %E_where.type = bind_symbolic_name H, 0 [symbolic = %H.loc10_20.2 (constants.%H)]
|
|
|
+// CHECK:STDOUT: %H.loc11_20.1: %E_where.type = bind_symbolic_name H, 0 [symbolic = %H.loc11_20.2 (constants.%H)]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %OneRewriteAgain.decl: %OneRewriteAgain.type = fn_decl @OneRewriteAgain [concrete = constants.%OneRewriteAgain] {
|
|
|
-// CHECK:STDOUT: %I.patt: %pattern_type.c64 = symbolic_binding_pattern I, 0 [concrete]
|
|
|
-// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %.loc14_26.1: type = splice_block %.loc14_26.2 [concrete = constants.%E_where.type] {
|
|
|
-// CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [concrete = constants.%E.type]
|
|
|
-// CHECK:STDOUT: %.Self: %E.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %.Self.ref: %E.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %F.ref: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc14_32: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%E.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
-// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
|
|
-// CHECK:STDOUT: %.loc14_26.2: type = where_expr %.Self [concrete = constants.%E_where.type] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %I.loc14_20.1: %E_where.type = bind_symbolic_name I, 0 [symbolic = %I.loc14_20.2 (constants.%I)]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: interface @E {
|
|
|
-// CHECK:STDOUT: %Self: %E.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
|
|
-// CHECK:STDOUT: %F: type = assoc_const_decl @F [concrete] {
|
|
|
-// CHECK:STDOUT: %assoc0: %E.assoc_type = assoc_entity element0, @E.%F [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = %Self
|
|
|
-// CHECK:STDOUT: .F = @F.%assoc0
|
|
|
-// CHECK:STDOUT: witness = (%F)
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic assoc_const @F(@E.%Self: %E.type) {
|
|
|
-// CHECK:STDOUT: assoc_const F:! type;
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @OneRewrite(%G.loc8_15.1: %E_where.type) {
|
|
|
-// CHECK:STDOUT: %G.loc8_15.2: %E_where.type = bind_symbolic_name G, 0 [symbolic = %G.loc8_15.2 (constants.%G)]
|
|
|
+// CHECK:STDOUT: generic fn @OneRewrite(%G.loc9_15.1: %E_where.type) {
|
|
|
+// CHECK:STDOUT: %G.loc9_15.2: %E_where.type = bind_symbolic_name G, 0 [symbolic = %G.loc9_15.2 (constants.%G)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -553,69 +418,41 @@ let K: (E where .F = .Self.G) = bool;
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @RepeatedRewrite(%H.loc10_20.1: %E_where.type) {
|
|
|
-// CHECK:STDOUT: %H.loc10_20.2: %E_where.type = bind_symbolic_name H, 0 [symbolic = %H.loc10_20.2 (constants.%H)]
|
|
|
+// CHECK:STDOUT: generic fn @RepeatedRewrite(%H.loc11_20.1: %E_where.type) {
|
|
|
+// CHECK:STDOUT: %H.loc11_20.2: %E_where.type = bind_symbolic_name H, 0 [symbolic = %H.loc11_20.2 (constants.%H)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %OneRewrite.specific_fn.loc11_3.2: <specific function> = specific_function constants.%OneRewrite, @OneRewrite(%H.loc10_20.2) [symbolic = %OneRewrite.specific_fn.loc11_3.2 (constants.%OneRewrite.specific_fn.7fa5d5.1)]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn() {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %OneRewrite.ref: %OneRewrite.type = name_ref OneRewrite, file.%OneRewrite.decl [concrete = constants.%OneRewrite]
|
|
|
-// CHECK:STDOUT: %H.ref: %E_where.type = name_ref H, %H.loc10_20.1 [symbolic = %H.loc10_20.2 (constants.%H)]
|
|
|
-// CHECK:STDOUT: %OneRewrite.specific_fn.loc11_3.1: <specific function> = specific_function %OneRewrite.ref, @OneRewrite(constants.%H) [symbolic = %OneRewrite.specific_fn.loc11_3.2 (constants.%OneRewrite.specific_fn.7fa5d5.1)]
|
|
|
-// CHECK:STDOUT: %OneRewrite.call: init %empty_tuple.type = call %OneRewrite.specific_fn.loc11_3.1()
|
|
|
-// CHECK:STDOUT: return
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @OneRewriteAgain(%I.loc14_20.1: %E_where.type) {
|
|
|
-// CHECK:STDOUT: %I.loc14_20.2: %E_where.type = bind_symbolic_name I, 0 [symbolic = %I.loc14_20.2 (constants.%I)]
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %RepeatedRewrite.specific_fn.loc15_3.2: <specific function> = specific_function constants.%RepeatedRewrite, @RepeatedRewrite(%I.loc14_20.2) [symbolic = %RepeatedRewrite.specific_fn.loc15_3.2 (constants.%RepeatedRewrite.specific_fn)]
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %RepeatedRewrite.ref: %RepeatedRewrite.type = name_ref RepeatedRewrite, file.%RepeatedRewrite.decl [concrete = constants.%RepeatedRewrite]
|
|
|
-// CHECK:STDOUT: %I.ref: %E_where.type = name_ref I, %I.loc14_20.1 [symbolic = %I.loc14_20.2 (constants.%I)]
|
|
|
-// CHECK:STDOUT: %RepeatedRewrite.specific_fn.loc15_3.1: <specific function> = specific_function %RepeatedRewrite.ref, @RepeatedRewrite(constants.%I) [symbolic = %RepeatedRewrite.specific_fn.loc15_3.2 (constants.%RepeatedRewrite.specific_fn)]
|
|
|
-// CHECK:STDOUT: %RepeatedRewrite.call: init %empty_tuple.type = call %RepeatedRewrite.specific_fn.loc15_3.1()
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @F(constants.%Self) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @F(constants.%E.facet) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @OneRewrite(constants.%G) {
|
|
|
-// CHECK:STDOUT: %G.loc8_15.2 => constants.%G
|
|
|
+// CHECK:STDOUT: %G.loc9_15.2 => constants.%G
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @RepeatedRewrite(constants.%H) {
|
|
|
-// CHECK:STDOUT: %H.loc10_20.2 => constants.%H
|
|
|
+// CHECK:STDOUT: %H.loc11_20.2 => constants.%H
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @OneRewrite(constants.%H) {
|
|
|
-// CHECK:STDOUT: %G.loc8_15.2 => constants.%H
|
|
|
+// CHECK:STDOUT: %G.loc9_15.2 => constants.%H
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @OneRewriteAgain(constants.%I) {
|
|
|
-// CHECK:STDOUT: %I.loc14_20.2 => constants.%I
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @RepeatedRewrite(constants.%I) {
|
|
|
-// CHECK:STDOUT: %H.loc10_20.2 => constants.%I
|
|
|
+// CHECK:STDOUT: %H.loc11_20.2 => constants.%I
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %OneRewrite.specific_fn.loc11_3.2 => constants.%OneRewrite.specific_fn.7fa5d5.2
|
|
|
+// CHECK:STDOUT: %OneRewrite.specific_fn.loc13_3.2 => constants.%OneRewrite.specific_fn.7fa5d5.2
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @OneRewrite(constants.%I) {
|
|
|
-// CHECK:STDOUT: %G.loc8_15.2 => constants.%I
|
|
|
+// CHECK:STDOUT: %G.loc9_15.2 => constants.%I
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -624,14 +461,12 @@ let K: (E where .F = .Self.G) = bool;
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
|
|
|
-// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
|
|
|
// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%K [concrete]
|
|
|
// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%L [concrete]
|
|
|
// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self]
|
|
|
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
|
|
|
// CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @J [symbolic_self]
|
|
|
-// CHECK:STDOUT: %J.facet: %J.type = facet_value %.Self.as_type, (%J.lookup_impl_witness) [symbolic_self]
|
|
|
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic_self]
|
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %J.lookup_impl_witness, element1 [symbolic_self]
|
|
|
@@ -645,111 +480,72 @@ let K: (E where .F = .Self.G) = bool;
|
|
|
// CHECK:STDOUT: %N: %J_where.type = bind_symbolic_name N, 0 [symbolic]
|
|
|
// CHECK:STDOUT: %Reversed.type: type = fn_type @Reversed [concrete]
|
|
|
// CHECK:STDOUT: %Reversed: %Reversed.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %Alphabetical.specific_fn: <specific function> = specific_function %Alphabetical, @Alphabetical(%N) [symbolic]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
-// CHECK:STDOUT: .Bool = %Core.Bool
|
|
|
-// CHECK:STDOUT: import Core//prelude
|
|
|
-// CHECK:STDOUT: import Core//prelude/...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Core = imports.%Core
|
|
|
-// CHECK:STDOUT: .J = %J.decl
|
|
|
-// CHECK:STDOUT: .Alphabetical = %Alphabetical.decl
|
|
|
-// CHECK:STDOUT: .Reversed = %Reversed.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import = import Core
|
|
|
-// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
|
|
|
// CHECK:STDOUT: %Alphabetical.decl: %Alphabetical.type = fn_decl @Alphabetical [concrete = constants.%Alphabetical] {
|
|
|
// CHECK:STDOUT: %M.patt: %pattern_type.49f = symbolic_binding_pattern M, 0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.2 [concrete = constants.%J_where.type] {
|
|
|
+// CHECK:STDOUT: %.loc10_23.1: type = splice_block %.loc10_23.2 [concrete = constants.%J_where.type] {
|
|
|
// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
|
|
|
-// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc9_29: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
+// CHECK:STDOUT: %.Self.ref.loc10_29: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
// CHECK:STDOUT: %K.ref: %J.assoc_type = name_ref K, @K.%assoc0 [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc9_29: type = facet_access_type %.Self.ref.loc9_29 [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc9_29: type = converted %.Self.ref.loc9_29, %.Self.as_type.loc9_29 [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %.Self.as_type.loc10_29: type = facet_access_type %.Self.ref.loc10_29 [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %.loc10_29: type = converted %.Self.ref.loc10_29, %.Self.as_type.loc10_29 [symbolic_self = constants.%.Self.as_type]
|
|
|
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %.loc9_35.1: %empty_tuple.type = tuple_literal ()
|
|
|
-// CHECK:STDOUT: %.loc9_35.2: type = converted %.loc9_35.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc9_41: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
+// CHECK:STDOUT: %.loc10_35.1: %empty_tuple.type = tuple_literal ()
|
|
|
+// CHECK:STDOUT: %.loc10_35.2: type = converted %.loc10_35.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
|
+// CHECK:STDOUT: %.Self.ref.loc10_41: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
// CHECK:STDOUT: %L.ref: %J.assoc_type = name_ref L, @L.%assoc1 [concrete = constants.%assoc1]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc9_41: type = facet_access_type %.Self.ref.loc9_41 [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc9_41: type = converted %.Self.ref.loc9_41, %.Self.as_type.loc9_41 [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %.Self.as_type.loc10_41: type = facet_access_type %.Self.ref.loc10_41 [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %.loc10_41: type = converted %.Self.ref.loc10_41, %.Self.as_type.loc10_41 [symbolic_self = constants.%.Self.as_type]
|
|
|
// CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%J.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1]
|
|
|
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc9_46.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc9_46.2: type = converted %bool.make_type, %.loc9_46.1 [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc9_23.2: type = where_expr %.Self [concrete = constants.%J_where.type] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_35.2
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc9_46.2
|
|
|
+// CHECK:STDOUT: %.loc10_46.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
|
|
+// CHECK:STDOUT: %.loc10_46.2: type = converted %bool.make_type, %.loc10_46.1 [concrete = bool]
|
|
|
+// CHECK:STDOUT: %.loc10_23.2: type = where_expr %.Self [concrete = constants.%J_where.type] {
|
|
|
+// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_35.2
|
|
|
+// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc10_46.2
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %M.loc9_17.1: %J_where.type = bind_symbolic_name M, 0 [symbolic = %M.loc9_17.2 (constants.%M)]
|
|
|
+// CHECK:STDOUT: %M.loc10_17.1: %J_where.type = bind_symbolic_name M, 0 [symbolic = %M.loc10_17.2 (constants.%M)]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %Reversed.decl: %Reversed.type = fn_decl @Reversed [concrete = constants.%Reversed] {
|
|
|
// CHECK:STDOUT: %N.patt: %pattern_type.49f = symbolic_binding_pattern N, 0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %.loc11_19.1: type = splice_block %.loc11_19.2 [concrete = constants.%J_where.type] {
|
|
|
+// CHECK:STDOUT: %.loc12_19.1: type = splice_block %.loc12_19.2 [concrete = constants.%J_where.type] {
|
|
|
// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
|
|
|
-// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc11_25: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
+// CHECK:STDOUT: %.Self.ref.loc12_25: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
// CHECK:STDOUT: %L.ref: %J.assoc_type = name_ref L, @L.%assoc1 [concrete = constants.%assoc1]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc11_25: type = facet_access_type %.Self.ref.loc11_25 [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc11_25: type = converted %.Self.ref.loc11_25, %.Self.as_type.loc11_25 [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %.Self.as_type.loc12_25: type = facet_access_type %.Self.ref.loc12_25 [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %.loc12_25: type = converted %.Self.ref.loc12_25, %.Self.as_type.loc12_25 [symbolic_self = constants.%.Self.as_type]
|
|
|
// CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%J.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1]
|
|
|
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc11_30.2: type = converted %bool.make_type, %.loc11_30.1 [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc11_39: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
+// CHECK:STDOUT: %.loc12_30.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
|
|
+// CHECK:STDOUT: %.loc12_30.2: type = converted %bool.make_type, %.loc12_30.1 [concrete = bool]
|
|
|
+// CHECK:STDOUT: %.Self.ref.loc12_39: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
// CHECK:STDOUT: %K.ref: %J.assoc_type = name_ref K, @K.%assoc0 [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc11_39: type = facet_access_type %.Self.ref.loc11_39 [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc11_39: type = converted %.Self.ref.loc11_39, %.Self.as_type.loc11_39 [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %.Self.as_type.loc12_39: type = facet_access_type %.Self.ref.loc12_39 [symbolic_self = constants.%.Self.as_type]
|
|
|
+// CHECK:STDOUT: %.loc12_39: type = converted %.Self.ref.loc12_39, %.Self.as_type.loc12_39 [symbolic_self = constants.%.Self.as_type]
|
|
|
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %.loc11_45.1: %empty_tuple.type = tuple_literal ()
|
|
|
-// CHECK:STDOUT: %.loc11_45.2: type = converted %.loc11_45.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
|
-// CHECK:STDOUT: %.loc11_19.2: type = where_expr %.Self [concrete = constants.%J_where.type] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc11_30.2
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc11_45.2
|
|
|
+// CHECK:STDOUT: %.loc12_45.1: %empty_tuple.type = tuple_literal ()
|
|
|
+// CHECK:STDOUT: %.loc12_45.2: type = converted %.loc12_45.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
|
+// CHECK:STDOUT: %.loc12_19.2: type = where_expr %.Self [concrete = constants.%J_where.type] {
|
|
|
+// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc12_30.2
|
|
|
+// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc12_45.2
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %N.loc11_13.1: %J_where.type = bind_symbolic_name N, 0 [symbolic = %N.loc11_13.2 (constants.%N)]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: interface @J {
|
|
|
-// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
|
|
-// CHECK:STDOUT: %K: type = assoc_const_decl @K [concrete] {
|
|
|
-// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%K [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %L: type = assoc_const_decl @L [concrete] {
|
|
|
-// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%L [concrete = constants.%assoc1]
|
|
|
+// CHECK:STDOUT: %N.loc12_13.1: %J_where.type = bind_symbolic_name N, 0 [symbolic = %N.loc12_13.2 (constants.%N)]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = %Self
|
|
|
-// CHECK:STDOUT: .K = @K.%assoc0
|
|
|
-// CHECK:STDOUT: .L = @L.%assoc1
|
|
|
-// CHECK:STDOUT: witness = (%K, %L)
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic assoc_const @K(@J.%Self: %J.type) {
|
|
|
-// CHECK:STDOUT: assoc_const K:! type;
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic assoc_const @L(@J.%Self: %J.type) {
|
|
|
-// CHECK:STDOUT: assoc_const L:! type;
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @Alphabetical(%M.loc9_17.1: %J_where.type) {
|
|
|
-// CHECK:STDOUT: %M.loc9_17.2: %J_where.type = bind_symbolic_name M, 0 [symbolic = %M.loc9_17.2 (constants.%M)]
|
|
|
+// CHECK:STDOUT: generic fn @Alphabetical(%M.loc10_17.1: %J_where.type) {
|
|
|
+// CHECK:STDOUT: %M.loc10_17.2: %J_where.type = bind_symbolic_name M, 0 [symbolic = %M.loc10_17.2 (constants.%M)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -759,945 +555,29 @@ let K: (E where .F = .Self.G) = bool;
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @Reversed(%N.loc11_13.1: %J_where.type) {
|
|
|
-// CHECK:STDOUT: %N.loc11_13.2: %J_where.type = bind_symbolic_name N, 0 [symbolic = %N.loc11_13.2 (constants.%N)]
|
|
|
+// CHECK:STDOUT: generic fn @Reversed(%N.loc12_13.1: %J_where.type) {
|
|
|
+// CHECK:STDOUT: %N.loc12_13.2: %J_where.type = bind_symbolic_name N, 0 [symbolic = %N.loc12_13.2 (constants.%N)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %Alphabetical.specific_fn.loc12_3.2: <specific function> = specific_function constants.%Alphabetical, @Alphabetical(%N.loc11_13.2) [symbolic = %Alphabetical.specific_fn.loc12_3.2 (constants.%Alphabetical.specific_fn)]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn() {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %Alphabetical.ref: %Alphabetical.type = name_ref Alphabetical, file.%Alphabetical.decl [concrete = constants.%Alphabetical]
|
|
|
-// CHECK:STDOUT: %N.ref: %J_where.type = name_ref N, %N.loc11_13.1 [symbolic = %N.loc11_13.2 (constants.%N)]
|
|
|
-// CHECK:STDOUT: %Alphabetical.specific_fn.loc12_3.1: <specific function> = specific_function %Alphabetical.ref, @Alphabetical(constants.%N) [symbolic = %Alphabetical.specific_fn.loc12_3.2 (constants.%Alphabetical.specific_fn)]
|
|
|
-// CHECK:STDOUT: %Alphabetical.call: init %empty_tuple.type = call %Alphabetical.specific_fn.loc12_3.1()
|
|
|
-// CHECK:STDOUT: return
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @K(constants.%Self) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @L(constants.%Self) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @K(constants.%J.facet) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @L(constants.%J.facet) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @Alphabetical(constants.%M) {
|
|
|
-// CHECK:STDOUT: %M.loc9_17.2 => constants.%M
|
|
|
+// CHECK:STDOUT: %M.loc10_17.2 => constants.%M
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @Reversed(constants.%N) {
|
|
|
-// CHECK:STDOUT: %N.loc11_13.2 => constants.%N
|
|
|
+// CHECK:STDOUT: %N.loc12_13.2 => constants.%N
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @Alphabetical(constants.%N) {
|
|
|
-// CHECK:STDOUT: %M.loc9_17.2 => constants.%N
|
|
|
+// CHECK:STDOUT: %M.loc10_17.2 => constants.%N
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- todo_fail_rewrites_mismatch_right.carbon
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %O.type: type = facet_type <@O> [concrete]
|
|
|
-// CHECK:STDOUT: %Self: %O.type = bind_symbolic_name Self, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %O.assoc_type: type = assoc_entity_type @O [concrete]
|
|
|
-// CHECK:STDOUT: %assoc0: %O.assoc_type = assoc_entity element0, @O.%P [concrete]
|
|
|
-// CHECK:STDOUT: %.Self: %O.type = bind_symbolic_name .Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %O.lookup_impl_witness.c7a: <witness> = lookup_impl_witness %.Self, @O [symbolic_self]
|
|
|
-// CHECK:STDOUT: %O.facet: %O.type = facet_value %.Self.as_type, (%O.lookup_impl_witness.c7a) [symbolic_self]
|
|
|
-// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %O.lookup_impl_witness.c7a, element0 [symbolic_self]
|
|
|
-// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
|
-// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
|
|
|
-// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
-// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
|
-// CHECK:STDOUT: %O_where.type.e27: type = facet_type <@O where %impl.elem0 = %i32> [concrete]
|
|
|
-// CHECK:STDOUT: %Q: %O_where.type.e27 = bind_symbolic_name Q, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %pattern_type.7eb: type = pattern_type %O_where.type.e27 [concrete]
|
|
|
-// CHECK:STDOUT: %WithInteger.type: type = fn_type @WithInteger [concrete]
|
|
|
-// CHECK:STDOUT: %WithInteger: %WithInteger.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
|
|
|
-// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %O_where.type.e45: type = facet_type <@O where %impl.elem0 = bool> [concrete]
|
|
|
-// CHECK:STDOUT: %R: %O_where.type.e45 = bind_symbolic_name R, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %pattern_type.9d2: type = pattern_type %O_where.type.e45 [concrete]
|
|
|
-// CHECK:STDOUT: %WithBool.type: type = fn_type @WithBool [concrete]
|
|
|
-// CHECK:STDOUT: %WithBool: %WithBool.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %O.lookup_impl_witness.c41: <witness> = lookup_impl_witness %R, @O [symbolic]
|
|
|
-// CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic]
|
|
|
-// CHECK:STDOUT: %facet_value: %O_where.type.e27 = facet_value %R.as_type, (%O.lookup_impl_witness.c41) [symbolic]
|
|
|
-// CHECK:STDOUT: %WithInteger.specific_fn: <specific function> = specific_function %WithInteger, @WithInteger(%facet_value) [symbolic]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
-// CHECK:STDOUT: .Int = %Core.Int
|
|
|
-// CHECK:STDOUT: .Bool = %Core.Bool
|
|
|
-// CHECK:STDOUT: import Core//prelude
|
|
|
-// CHECK:STDOUT: import Core//prelude/...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
|
|
|
-// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Core = imports.%Core
|
|
|
-// CHECK:STDOUT: .O = %O.decl
|
|
|
-// CHECK:STDOUT: .WithInteger = %WithInteger.decl
|
|
|
-// CHECK:STDOUT: .WithBool = %WithBool.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import = import Core
|
|
|
-// CHECK:STDOUT: %O.decl: type = interface_decl @O [concrete = constants.%O.type] {} {}
|
|
|
-// CHECK:STDOUT: %WithInteger.decl: %WithInteger.type = fn_decl @WithInteger [concrete = constants.%WithInteger] {
|
|
|
-// CHECK:STDOUT: %Q.patt: %pattern_type.7eb = symbolic_binding_pattern Q, 0 [concrete]
|
|
|
-// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %.loc8_22.1: type = splice_block %.loc8_22.2 [concrete = constants.%O_where.type.e27] {
|
|
|
-// CHECK:STDOUT: %O.ref: type = name_ref O, file.%O.decl [concrete = constants.%O.type]
|
|
|
-// CHECK:STDOUT: %.Self: %O.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %.Self.ref: %O.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %P.ref: %O.assoc_type = name_ref P, @P.%assoc0 [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc8_28: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%O.lookup_impl_witness.c7a, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
-// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
|
|
-// CHECK:STDOUT: %.loc8_22.2: type = where_expr %.Self [concrete = constants.%O_where.type.e27] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Q.loc8_16.1: %O_where.type.e27 = bind_symbolic_name Q, 0 [symbolic = %Q.loc8_16.2 (constants.%Q)]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %WithBool.decl: %WithBool.type = fn_decl @WithBool [concrete = constants.%WithBool] {
|
|
|
-// CHECK:STDOUT: %R.patt: %pattern_type.9d2 = symbolic_binding_pattern R, 0 [concrete]
|
|
|
-// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %.loc10_19.1: type = splice_block %.loc10_19.2 [concrete = constants.%O_where.type.e45] {
|
|
|
-// CHECK:STDOUT: %O.ref: type = name_ref O, file.%O.decl [concrete = constants.%O.type]
|
|
|
-// CHECK:STDOUT: %.Self: %O.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %.Self.ref: %O.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %P.ref: %O.assoc_type = name_ref P, @P.%assoc0 [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc10_25: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%O.lookup_impl_witness.c7a, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc10_30.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc10_30.2: type = converted %bool.make_type, %.loc10_30.1 [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc10_19.2: type = where_expr %.Self [concrete = constants.%O_where.type.e45] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_30.2
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %R.loc10_13.1: %O_where.type.e45 = bind_symbolic_name R, 0 [symbolic = %R.loc10_13.2 (constants.%R)]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: interface @O {
|
|
|
-// CHECK:STDOUT: %Self: %O.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
|
|
-// CHECK:STDOUT: %P: type = assoc_const_decl @P [concrete] {
|
|
|
-// CHECK:STDOUT: %assoc0: %O.assoc_type = assoc_entity element0, @O.%P [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = %Self
|
|
|
-// CHECK:STDOUT: .P = @P.%assoc0
|
|
|
-// CHECK:STDOUT: witness = (%P)
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic assoc_const @P(@O.%Self: %O.type) {
|
|
|
-// CHECK:STDOUT: assoc_const P:! type;
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @WithInteger(%Q.loc8_16.1: %O_where.type.e27) {
|
|
|
-// CHECK:STDOUT: %Q.loc8_16.2: %O_where.type.e27 = bind_symbolic_name Q, 0 [symbolic = %Q.loc8_16.2 (constants.%Q)]
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @WithBool(%R.loc10_13.1: %O_where.type.e45) {
|
|
|
-// CHECK:STDOUT: %R.loc10_13.2: %O_where.type.e45 = bind_symbolic_name R, 0 [symbolic = %R.loc10_13.2 (constants.%R)]
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %O.lookup_impl_witness: <witness> = lookup_impl_witness %R.loc10_13.2, @O [symbolic = %O.lookup_impl_witness (constants.%O.lookup_impl_witness.c41)]
|
|
|
-// CHECK:STDOUT: %R.as_type.loc12_16.2: type = facet_access_type %R.loc10_13.2 [symbolic = %R.as_type.loc12_16.2 (constants.%R.as_type)]
|
|
|
-// CHECK:STDOUT: %facet_value.loc12_16.2: %O_where.type.e27 = facet_value %R.as_type.loc12_16.2, (%O.lookup_impl_witness) [symbolic = %facet_value.loc12_16.2 (constants.%facet_value)]
|
|
|
-// CHECK:STDOUT: %WithInteger.specific_fn.loc12_3.2: <specific function> = specific_function constants.%WithInteger, @WithInteger(%facet_value.loc12_16.2) [symbolic = %WithInteger.specific_fn.loc12_3.2 (constants.%WithInteger.specific_fn)]
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %WithInteger.ref: %WithInteger.type = name_ref WithInteger, file.%WithInteger.decl [concrete = constants.%WithInteger]
|
|
|
-// CHECK:STDOUT: %R.ref: %O_where.type.e45 = name_ref R, %R.loc10_13.1 [symbolic = %R.loc10_13.2 (constants.%R)]
|
|
|
-// CHECK:STDOUT: %R.as_type.loc12_16.1: type = facet_access_type constants.%R [symbolic = %R.as_type.loc12_16.2 (constants.%R.as_type)]
|
|
|
-// CHECK:STDOUT: %facet_value.loc12_16.1: %O_where.type.e27 = facet_value %R.as_type.loc12_16.1, (constants.%O.lookup_impl_witness.c41) [symbolic = %facet_value.loc12_16.2 (constants.%facet_value)]
|
|
|
-// CHECK:STDOUT: %.loc12: %O_where.type.e27 = converted %R.ref, %facet_value.loc12_16.1 [symbolic = %facet_value.loc12_16.2 (constants.%facet_value)]
|
|
|
-// CHECK:STDOUT: %WithInteger.specific_fn.loc12_3.1: <specific function> = specific_function %WithInteger.ref, @WithInteger(constants.%facet_value) [symbolic = %WithInteger.specific_fn.loc12_3.2 (constants.%WithInteger.specific_fn)]
|
|
|
-// CHECK:STDOUT: %WithInteger.call: init %empty_tuple.type = call %WithInteger.specific_fn.loc12_3.1()
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @P(constants.%Self) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @P(constants.%O.facet) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @WithInteger(constants.%Q) {
|
|
|
-// CHECK:STDOUT: %Q.loc8_16.2 => constants.%Q
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @WithBool(constants.%R) {
|
|
|
-// CHECK:STDOUT: %R.loc10_13.2 => constants.%R
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @WithInteger(constants.%facet_value) {
|
|
|
-// CHECK:STDOUT: %Q.loc8_16.2 => constants.%facet_value
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- todo_fail_rewrites_mismatch_left.carbon
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %S.type: type = facet_type <@S> [concrete]
|
|
|
-// CHECK:STDOUT: %Self: %S.type = bind_symbolic_name Self, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %S.assoc_type: type = assoc_entity_type @S [concrete]
|
|
|
-// CHECK:STDOUT: %assoc0: %S.assoc_type = assoc_entity element0, @S.%T [concrete]
|
|
|
-// CHECK:STDOUT: %assoc1: %S.assoc_type = assoc_entity element1, @S.%U [concrete]
|
|
|
-// CHECK:STDOUT: %.Self: %S.type = bind_symbolic_name .Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %S.lookup_impl_witness.ffa: <witness> = lookup_impl_witness %.Self, @S [symbolic_self]
|
|
|
-// CHECK:STDOUT: %S.facet: %S.type = facet_value %.Self.as_type, (%S.lookup_impl_witness.ffa) [symbolic_self]
|
|
|
-// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %S.lookup_impl_witness.ffa, element0 [symbolic_self]
|
|
|
-// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
-// CHECK:STDOUT: %S_where.type.4c2: type = facet_type <@S where %impl.elem0 = %empty_tuple.type> [concrete]
|
|
|
-// CHECK:STDOUT: %V: %S_where.type.4c2 = bind_symbolic_name V, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %pattern_type.7b9: type = pattern_type %S_where.type.4c2 [concrete]
|
|
|
-// CHECK:STDOUT: %WithT.type: type = fn_type @WithT [concrete]
|
|
|
-// CHECK:STDOUT: %WithT: %WithT.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %S.lookup_impl_witness.ffa, element1 [symbolic_self]
|
|
|
-// CHECK:STDOUT: %S_where.type.592: type = facet_type <@S where %impl.elem1 = %empty_tuple.type> [concrete]
|
|
|
-// CHECK:STDOUT: %W: %S_where.type.592 = bind_symbolic_name W, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %pattern_type.4aa: type = pattern_type %S_where.type.592 [concrete]
|
|
|
-// CHECK:STDOUT: %WithU.type: type = fn_type @WithU [concrete]
|
|
|
-// CHECK:STDOUT: %WithU: %WithU.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %S.lookup_impl_witness.6f2: <witness> = lookup_impl_witness %W, @S [symbolic]
|
|
|
-// CHECK:STDOUT: %W.as_type: type = facet_access_type %W [symbolic]
|
|
|
-// CHECK:STDOUT: %facet_value: %S_where.type.4c2 = facet_value %W.as_type, (%S.lookup_impl_witness.6f2) [symbolic]
|
|
|
-// CHECK:STDOUT: %WithT.specific_fn: <specific function> = specific_function %WithT, @WithT(%facet_value) [symbolic]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
-// CHECK:STDOUT: import Core//prelude
|
|
|
-// CHECK:STDOUT: import Core//prelude/...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Core = imports.%Core
|
|
|
-// CHECK:STDOUT: .S = %S.decl
|
|
|
-// CHECK:STDOUT: .WithT = %WithT.decl
|
|
|
-// CHECK:STDOUT: .WithU = %WithU.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import = import Core
|
|
|
-// CHECK:STDOUT: %S.decl: type = interface_decl @S [concrete = constants.%S.type] {} {}
|
|
|
-// CHECK:STDOUT: %WithT.decl: %WithT.type = fn_decl @WithT [concrete = constants.%WithT] {
|
|
|
-// CHECK:STDOUT: %V.patt: %pattern_type.7b9 = symbolic_binding_pattern V, 0 [concrete]
|
|
|
-// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %.loc9_16.1: type = splice_block %.loc9_16.2 [concrete = constants.%S_where.type.4c2] {
|
|
|
-// CHECK:STDOUT: %S.ref: type = name_ref S, file.%S.decl [concrete = constants.%S.type]
|
|
|
-// CHECK:STDOUT: %.Self: %S.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %.Self.ref: %S.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %T.ref: %S.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc9_22: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%S.lookup_impl_witness.ffa, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %.loc9_28.1: %empty_tuple.type = tuple_literal ()
|
|
|
-// CHECK:STDOUT: %.loc9_28.2: type = converted %.loc9_28.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
|
-// CHECK:STDOUT: %.loc9_16.2: type = where_expr %.Self [concrete = constants.%S_where.type.4c2] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_28.2
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %V.loc9_10.1: %S_where.type.4c2 = bind_symbolic_name V, 0 [symbolic = %V.loc9_10.2 (constants.%V)]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %WithU.decl: %WithU.type = fn_decl @WithU [concrete = constants.%WithU] {
|
|
|
-// CHECK:STDOUT: %W.patt: %pattern_type.4aa = symbolic_binding_pattern W, 0 [concrete]
|
|
|
-// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %.loc11_16.1: type = splice_block %.loc11_16.2 [concrete = constants.%S_where.type.592] {
|
|
|
-// CHECK:STDOUT: %S.ref: type = name_ref S, file.%S.decl [concrete = constants.%S.type]
|
|
|
-// CHECK:STDOUT: %.Self: %S.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %.Self.ref: %S.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %U.ref: %S.assoc_type = name_ref U, @U.%assoc1 [concrete = constants.%assoc1]
|
|
|
-// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc11_22: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%S.lookup_impl_witness.ffa, element1 [symbolic_self = constants.%impl.elem1]
|
|
|
-// CHECK:STDOUT: %.loc11_28.1: %empty_tuple.type = tuple_literal ()
|
|
|
-// CHECK:STDOUT: %.loc11_28.2: type = converted %.loc11_28.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
|
-// CHECK:STDOUT: %.loc11_16.2: type = where_expr %.Self [concrete = constants.%S_where.type.592] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc11_28.2
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %W.loc11_10.1: %S_where.type.592 = bind_symbolic_name W, 0 [symbolic = %W.loc11_10.2 (constants.%W)]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: interface @S {
|
|
|
-// CHECK:STDOUT: %Self: %S.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
|
|
-// CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
|
|
|
-// CHECK:STDOUT: %assoc0: %S.assoc_type = assoc_entity element0, @S.%T [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
|
|
|
-// CHECK:STDOUT: %assoc1: %S.assoc_type = assoc_entity element1, @S.%U [concrete = constants.%assoc1]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = %Self
|
|
|
-// CHECK:STDOUT: .T = @T.%assoc0
|
|
|
-// CHECK:STDOUT: .U = @U.%assoc1
|
|
|
-// CHECK:STDOUT: witness = (%T, %U)
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic assoc_const @T(@S.%Self: %S.type) {
|
|
|
-// CHECK:STDOUT: assoc_const T:! type;
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic assoc_const @U(@S.%Self: %S.type) {
|
|
|
-// CHECK:STDOUT: assoc_const U:! type;
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @WithT(%V.loc9_10.1: %S_where.type.4c2) {
|
|
|
-// CHECK:STDOUT: %V.loc9_10.2: %S_where.type.4c2 = bind_symbolic_name V, 0 [symbolic = %V.loc9_10.2 (constants.%V)]
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @WithU(%W.loc11_10.1: %S_where.type.592) {
|
|
|
-// CHECK:STDOUT: %W.loc11_10.2: %S_where.type.592 = bind_symbolic_name W, 0 [symbolic = %W.loc11_10.2 (constants.%W)]
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %S.lookup_impl_witness: <witness> = lookup_impl_witness %W.loc11_10.2, @S [symbolic = %S.lookup_impl_witness (constants.%S.lookup_impl_witness.6f2)]
|
|
|
-// CHECK:STDOUT: %W.as_type.loc13_10.2: type = facet_access_type %W.loc11_10.2 [symbolic = %W.as_type.loc13_10.2 (constants.%W.as_type)]
|
|
|
-// CHECK:STDOUT: %facet_value.loc13_10.2: %S_where.type.4c2 = facet_value %W.as_type.loc13_10.2, (%S.lookup_impl_witness) [symbolic = %facet_value.loc13_10.2 (constants.%facet_value)]
|
|
|
-// CHECK:STDOUT: %WithT.specific_fn.loc13_3.2: <specific function> = specific_function constants.%WithT, @WithT(%facet_value.loc13_10.2) [symbolic = %WithT.specific_fn.loc13_3.2 (constants.%WithT.specific_fn)]
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %WithT.ref: %WithT.type = name_ref WithT, file.%WithT.decl [concrete = constants.%WithT]
|
|
|
-// CHECK:STDOUT: %W.ref: %S_where.type.592 = name_ref W, %W.loc11_10.1 [symbolic = %W.loc11_10.2 (constants.%W)]
|
|
|
-// CHECK:STDOUT: %W.as_type.loc13_10.1: type = facet_access_type constants.%W [symbolic = %W.as_type.loc13_10.2 (constants.%W.as_type)]
|
|
|
-// CHECK:STDOUT: %facet_value.loc13_10.1: %S_where.type.4c2 = facet_value %W.as_type.loc13_10.1, (constants.%S.lookup_impl_witness.6f2) [symbolic = %facet_value.loc13_10.2 (constants.%facet_value)]
|
|
|
-// CHECK:STDOUT: %.loc13: %S_where.type.4c2 = converted %W.ref, %facet_value.loc13_10.1 [symbolic = %facet_value.loc13_10.2 (constants.%facet_value)]
|
|
|
-// CHECK:STDOUT: %WithT.specific_fn.loc13_3.1: <specific function> = specific_function %WithT.ref, @WithT(constants.%facet_value) [symbolic = %WithT.specific_fn.loc13_3.2 (constants.%WithT.specific_fn)]
|
|
|
-// CHECK:STDOUT: %WithT.call: init %empty_tuple.type = call %WithT.specific_fn.loc13_3.1()
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @T(constants.%Self) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @U(constants.%Self) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @T(constants.%S.facet) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @WithT(constants.%V) {
|
|
|
-// CHECK:STDOUT: %V.loc9_10.2 => constants.%V
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @U(constants.%S.facet) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @WithU(constants.%W) {
|
|
|
-// CHECK:STDOUT: %W.loc11_10.2 => constants.%W
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @WithT(constants.%facet_value) {
|
|
|
-// CHECK:STDOUT: %V.loc9_10.2 => constants.%facet_value
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_import_rewrites.carbon
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %Calls.type: type = fn_type @Calls [concrete]
|
|
|
-// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
-// CHECK:STDOUT: %Calls: %Calls.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %Equal.type.d73: type = fn_type @Equal.1 [concrete]
|
|
|
-// CHECK:STDOUT: %Equal.517: %Equal.type.d73 = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %N.type: type = facet_type <@N> [concrete]
|
|
|
-// CHECK:STDOUT: %.Self.9aa: %N.type = bind_symbolic_name .Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %N.lookup_impl_witness: <witness> = lookup_impl_witness %.Self.9aa, @N [symbolic_self]
|
|
|
-// CHECK:STDOUT: %impl.elem0.abf: type = impl_witness_access %N.lookup_impl_witness, element0 [symbolic_self]
|
|
|
-// CHECK:STDOUT: %N_where.type: type = facet_type <@N where %impl.elem0.abf = %empty_struct_type> [concrete]
|
|
|
-// CHECK:STDOUT: %T.dcb: %N_where.type = bind_symbolic_name T, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
|
|
|
-// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %NestedRewrite.type: type = fn_type @NestedRewrite [concrete]
|
|
|
-// CHECK:STDOUT: %NestedRewrite: %NestedRewrite.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete]
|
|
|
-// CHECK:STDOUT: %.Self.3ca: %A.type = bind_symbolic_name .Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %A.lookup_impl_witness.5ad: <witness> = lookup_impl_witness %.Self.3ca, @A [symbolic_self]
|
|
|
-// CHECK:STDOUT: %impl.elem0.2e8: type = impl_witness_access %A.lookup_impl_witness.5ad, element0 [symbolic_self]
|
|
|
-// CHECK:STDOUT: %A_where.type.ef7: type = facet_type <@A where %impl.elem0.2e8 = bool> [concrete]
|
|
|
-// CHECK:STDOUT: %.Self.60a: %A_where.type.ef7 = bind_symbolic_name .Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %A.lookup_impl_witness.138: <witness> = lookup_impl_witness %.Self.60a, @A [symbolic_self]
|
|
|
-// CHECK:STDOUT: %impl.elem1: type = impl_witness_access %A.lookup_impl_witness.138, element1 [symbolic_self]
|
|
|
-// CHECK:STDOUT: %A_where.type.2d0: type = facet_type <@A where %impl.elem0.2e8 = bool and %impl.elem1 = %empty_tuple.type> [concrete]
|
|
|
-// CHECK:STDOUT: %D: %A_where.type.2d0 = bind_symbolic_name D, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
|
-// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
|
|
|
-// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Main.N = import_ref Main//equal_constraint, N, unloaded
|
|
|
-// CHECK:STDOUT: %Main.Equal: %Equal.type.d73 = import_ref Main//equal_constraint, Equal, loaded [concrete = constants.%Equal.517]
|
|
|
-// CHECK:STDOUT: %Main.A = import_ref Main//nested_rewrites, A, unloaded
|
|
|
-// CHECK:STDOUT: %Main.NestedRewrite: %NestedRewrite.type = import_ref Main//nested_rewrites, NestedRewrite, loaded [concrete = constants.%NestedRewrite]
|
|
|
-// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
-// CHECK:STDOUT: .Bool = %Core.Bool
|
|
|
-// CHECK:STDOUT: .Int = %Core.Int
|
|
|
-// CHECK:STDOUT: import Core//prelude
|
|
|
-// CHECK:STDOUT: import Core//prelude/...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Main.import_ref.169 = import_ref Main//equal_constraint, inst19 [no loc], unloaded
|
|
|
-// CHECK:STDOUT: %Main.import_ref.56b = import_ref Main//equal_constraint, loc5_8, unloaded
|
|
|
-// CHECK:STDOUT: %Main.P = import_ref Main//equal_constraint, P, unloaded
|
|
|
-// CHECK:STDOUT: %Main.import_ref.0bb: %N_where.type = import_ref Main//equal_constraint, loc8_10, loaded [symbolic = @Equal.1.%T (constants.%T.dcb)]
|
|
|
-// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool]
|
|
|
-// CHECK:STDOUT: %Main.import_ref.b61 = import_ref Main//nested_rewrites, inst19 [no loc], unloaded
|
|
|
-// CHECK:STDOUT: %Main.import_ref.38f = import_ref Main//nested_rewrites, loc5_8, unloaded
|
|
|
-// CHECK:STDOUT: %Main.import_ref.30f = import_ref Main//nested_rewrites, loc6_8, unloaded
|
|
|
-// CHECK:STDOUT: %Main.B = import_ref Main//nested_rewrites, B, unloaded
|
|
|
-// CHECK:STDOUT: %Main.C = import_ref Main//nested_rewrites, C, unloaded
|
|
|
-// CHECK:STDOUT: %Main.import_ref.5fe: %A_where.type.2d0 = import_ref Main//nested_rewrites, loc9_18, loaded [symbolic = @NestedRewrite.%D (constants.%D)]
|
|
|
-// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .N = imports.%Main.N
|
|
|
-// CHECK:STDOUT: .Equal = imports.%Main.Equal
|
|
|
-// CHECK:STDOUT: .A = imports.%Main.A
|
|
|
-// CHECK:STDOUT: .NestedRewrite = imports.%Main.NestedRewrite
|
|
|
-// CHECK:STDOUT: .Core = imports.%Core
|
|
|
-// CHECK:STDOUT: .Calls = %Calls.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import = import Core
|
|
|
-// CHECK:STDOUT: %default.import = import <none>
|
|
|
-// CHECK:STDOUT: %Calls.decl: %Calls.type = fn_decl @Calls [concrete = constants.%Calls] {} {}
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: interface @N [from "equal_constraint.carbon"] {
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = imports.%Main.import_ref.169
|
|
|
-// CHECK:STDOUT: .P = imports.%Main.import_ref.56b
|
|
|
-// CHECK:STDOUT: witness = (imports.%Main.P)
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: interface @A [from "nested_rewrites.carbon"] {
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = imports.%Main.import_ref.b61
|
|
|
-// CHECK:STDOUT: .B = imports.%Main.import_ref.38f
|
|
|
-// CHECK:STDOUT: .C = imports.%Main.import_ref.30f
|
|
|
-// CHECK:STDOUT: witness = (imports.%Main.B, imports.%Main.C)
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @Calls() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %Equal.ref: %Equal.type.d73 = name_ref Equal, imports.%Main.Equal [concrete = constants.%Equal.517]
|
|
|
-// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
|
|
-// CHECK:STDOUT: %NestedRewrite.ref: %NestedRewrite.type = name_ref NestedRewrite, imports.%Main.NestedRewrite [concrete = constants.%NestedRewrite]
|
|
|
-// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
-// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @Equal.1(imports.%Main.import_ref.0bb: %N_where.type) [from "equal_constraint.carbon"] {
|
|
|
-// CHECK:STDOUT: %T: %N_where.type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.dcb)]
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn;
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @NestedRewrite(imports.%Main.import_ref.5fe: %A_where.type.2d0) [from "nested_rewrites.carbon"] {
|
|
|
-// CHECK:STDOUT: %D: %A_where.type.2d0 = bind_symbolic_name D, 0 [symbolic = %D (constants.%D)]
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn;
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @Equal.1(constants.%T.dcb) {
|
|
|
-// CHECK:STDOUT: %T => constants.%T.dcb
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @NestedRewrite(constants.%D) {
|
|
|
-// CHECK:STDOUT: %D => constants.%D
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_check_rewrite_constraints.carbon
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
|
|
|
-// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
|
|
|
-// CHECK:STDOUT: %assoc0.7bc: %I.assoc_type = assoc_entity element0, @I.%Member [concrete]
|
|
|
-// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @I [symbolic_self]
|
|
|
-// CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, (%I.lookup_impl_witness) [symbolic_self]
|
|
|
-// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
|
|
|
-// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete]
|
|
|
-// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
|
|
|
-// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %RewriteTypeMismatch.type: type = fn_type @RewriteTypeMismatch [concrete]
|
|
|
-// CHECK:STDOUT: %RewriteTypeMismatch: %RewriteTypeMismatch.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
-// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
|
|
|
-// CHECK:STDOUT: import Core//prelude
|
|
|
-// CHECK:STDOUT: import Core//prelude/...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Core = imports.%Core
|
|
|
-// CHECK:STDOUT: .I = %I.decl
|
|
|
-// CHECK:STDOUT: .RewriteTypeMismatch = %RewriteTypeMismatch.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import = import Core
|
|
|
-// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
|
|
|
-// CHECK:STDOUT: %RewriteTypeMismatch.decl: %RewriteTypeMismatch.type = fn_decl @RewriteTypeMismatch [concrete = constants.%RewriteTypeMismatch] {
|
|
|
-// CHECK:STDOUT: %X.patt: <error> = symbolic_binding_pattern X, 0 [concrete]
|
|
|
-// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %.loc16_30.1: type = splice_block %.loc16_30.2 [concrete = <error>] {
|
|
|
-// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
|
|
-// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %Member.ref: %I.assoc_type = name_ref Member, @Member.%assoc0 [concrete = constants.%assoc0.7bc]
|
|
|
-// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %.loc16_36: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
|
|
-// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
|
|
|
-// CHECK:STDOUT: %.loc16_46: type = converted %int_2, <error> [concrete = <error>]
|
|
|
-// CHECK:STDOUT: %.loc16_30.2: type = where_expr %.Self [concrete = <error>] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0, <error>
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %X: <error> = bind_symbolic_name X, 0 [concrete = <error>]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: interface @I {
|
|
|
-// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
|
|
|
-// CHECK:STDOUT: %Member: type = assoc_const_decl @Member [concrete] {
|
|
|
-// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%Member [concrete = constants.%assoc0.7bc]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = %Self
|
|
|
-// CHECK:STDOUT: .Member = @Member.%assoc0
|
|
|
-// CHECK:STDOUT: witness = (%Member)
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic assoc_const @Member(@I.%Self: %I.type) {
|
|
|
-// CHECK:STDOUT: assoc_const Member:! type;
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @RewriteTypeMismatch(%X: <error>) {
|
|
|
-// CHECK:STDOUT: fn();
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @Member(constants.%Self.826) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @Member(constants.%I.facet) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @RewriteTypeMismatch(<error>) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- todo_let.carbon
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete]
|
|
|
-// CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %D: type = class_type @D [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
-// CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness file.%A.impl_witness_table [concrete]
|
|
|
-// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls @A> [concrete]
|
|
|
-// CHECK:STDOUT: %pattern_type: type = pattern_type %type_where [concrete]
|
|
|
-// CHECK:STDOUT: %facet_value: %type_where = facet_value %D, (%A.impl_witness) [concrete]
|
|
|
-// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
|
|
-// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %E: %type_where = bind_symbolic_name E, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
-// CHECK:STDOUT: import Core//prelude
|
|
|
-// CHECK:STDOUT: import Core//prelude/...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Core = imports.%Core
|
|
|
-// CHECK:STDOUT: .A = %A.decl
|
|
|
-// CHECK:STDOUT: .D = %D.decl
|
|
|
-// CHECK:STDOUT: .B = %B
|
|
|
-// CHECK:STDOUT: .F = %F.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import = import Core
|
|
|
-// CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {}
|
|
|
-// CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
|
|
|
-// CHECK:STDOUT: impl_decl @impl [concrete] {} {
|
|
|
-// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
|
|
|
-// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (), @impl [concrete]
|
|
|
-// CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness]
|
|
|
-// CHECK:STDOUT: name_binding_decl {
|
|
|
-// CHECK:STDOUT: %B.patt: %pattern_type = binding_pattern B [concrete]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.2 [concrete = constants.%type_where] {
|
|
|
-// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [concrete = constants.%A.type]
|
|
|
-// CHECK:STDOUT: %.loc8_13.2: type = where_expr %.Self [concrete = constants.%type_where] {
|
|
|
-// CHECK:STDOUT: requirement_impls %.Self.ref, %A.ref
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%D, (constants.%A.impl_witness) [concrete = constants.%facet_value]
|
|
|
-// CHECK:STDOUT: %.loc8_35: %type_where = converted @__global_init.%D.ref, %facet_value [concrete = constants.%facet_value]
|
|
|
-// CHECK:STDOUT: %B: %type_where = bind_name B, %.loc8_35
|
|
|
-// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: interface @A {
|
|
|
-// CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = %Self
|
|
|
-// CHECK:STDOUT: witness = ()
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: impl @impl: %D.ref as %A.ref {
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: witness = file.%A.impl_witness
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @D {
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
|
|
-// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%D
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @F() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: name_binding_decl {
|
|
|
-// CHECK:STDOUT: %E.patt: %pattern_type = symbolic_binding_pattern E, 0 [concrete]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
|
|
|
-// CHECK:STDOUT: %.loc11_16.1: type = splice_block %.loc11_16.2 [concrete = constants.%type_where] {
|
|
|
-// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
|
|
|
-// CHECK:STDOUT: %.loc11_16.2: type = where_expr %.Self [concrete = constants.%type_where] {
|
|
|
-// CHECK:STDOUT: requirement_impls %.Self.ref, %A.ref
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%D, (constants.%A.impl_witness) [concrete = constants.%facet_value]
|
|
|
-// CHECK:STDOUT: %.loc11_38: %type_where = converted %D.ref, %facet_value [concrete = constants.%facet_value]
|
|
|
-// CHECK:STDOUT: %E: %type_where = bind_symbolic_name E, 0, %.loc11_38 [symbolic = constants.%E]
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @__global_init() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_todo_let_compile_time.carbon
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete]
|
|
|
-// CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %D: type = class_type @D [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
-// CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness file.%A.impl_witness_table [concrete]
|
|
|
-// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls @A> [concrete]
|
|
|
-// CHECK:STDOUT: %pattern_type: type = pattern_type %type_where [concrete]
|
|
|
-// CHECK:STDOUT: %facet_value: %type_where = facet_value %D, (%A.impl_witness) [concrete]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
-// CHECK:STDOUT: import Core//prelude
|
|
|
-// CHECK:STDOUT: import Core//prelude/...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Core = imports.%Core
|
|
|
-// CHECK:STDOUT: .A = %A.decl
|
|
|
-// CHECK:STDOUT: .D = %D.decl
|
|
|
-// CHECK:STDOUT: .B = %B
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import = import Core
|
|
|
-// CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {}
|
|
|
-// CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
|
|
|
-// CHECK:STDOUT: impl_decl @impl [concrete] {} {
|
|
|
-// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
|
|
|
-// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %A.impl_witness_table = impl_witness_table (), @impl [concrete]
|
|
|
-// CHECK:STDOUT: %A.impl_witness: <witness> = impl_witness %A.impl_witness_table [concrete = constants.%A.impl_witness]
|
|
|
-// CHECK:STDOUT: name_binding_decl {
|
|
|
-// CHECK:STDOUT: %B.patt: %pattern_type = binding_pattern B [concrete]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %.loc12_14.1: type = splice_block %.loc12_14.2 [concrete = constants.%type_where] {
|
|
|
-// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
|
|
-// CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [concrete = constants.%A.type]
|
|
|
-// CHECK:STDOUT: %.loc12_14.2: type = where_expr %.Self [concrete = constants.%type_where] {
|
|
|
-// CHECK:STDOUT: requirement_impls %.Self.ref, %A.ref
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%D, (constants.%A.impl_witness) [concrete = constants.%facet_value]
|
|
|
-// CHECK:STDOUT: %.loc12_36: %type_where = converted @__global_init.%D.ref, %facet_value [concrete = constants.%facet_value]
|
|
|
-// CHECK:STDOUT: %B: %type_where = bind_name B, %.loc12_36
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: interface @A {
|
|
|
-// CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = %Self
|
|
|
-// CHECK:STDOUT: witness = ()
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: impl @impl: %D.ref as %A.ref {
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: witness = file.%A.impl_witness
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @D {
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
|
|
-// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%D
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @__global_init() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_type_does_not_implement_where.carbon
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %E.type: type = facet_type <@E> [concrete]
|
|
|
-// CHECK:STDOUT: %Self: %E.type = bind_symbolic_name Self, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %E.assoc_type: type = assoc_entity_type @E [concrete]
|
|
|
-// CHECK:STDOUT: %assoc0: %E.assoc_type = assoc_entity element0, @E.%F [concrete]
|
|
|
-// CHECK:STDOUT: %assoc1: %E.assoc_type = assoc_entity element1, @E.%G [concrete]
|
|
|
-// CHECK:STDOUT: %.Self.da5: %E.type = bind_symbolic_name .Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.34e: type = facet_access_type %.Self.da5 [symbolic_self]
|
|
|
-// CHECK:STDOUT: %E.lookup_impl_witness.004: <witness> = lookup_impl_witness %.Self.da5, @E [symbolic_self]
|
|
|
-// CHECK:STDOUT: %E.facet.2c4: %E.type = facet_value %.Self.as_type.34e, (%E.lookup_impl_witness.004) [symbolic_self]
|
|
|
-// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %E.lookup_impl_witness.004, element0 [symbolic_self]
|
|
|
-// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
|
|
|
-// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
-// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %impl.elem1.c11: type = impl_witness_access %E.lookup_impl_witness.004, element1 [symbolic_self]
|
|
|
-// CHECK:STDOUT: %E_where.type.82c: type = facet_type <@E where %impl.elem0 = bool and %impl.elem1.c11 = %empty_tuple.type> [concrete]
|
|
|
-// CHECK:STDOUT: %pattern_type.826: type = pattern_type %E_where.type.82c [concrete]
|
|
|
-// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
|
|
|
-// CHECK:STDOUT: %Float.type: type = fn_type @Float [concrete]
|
|
|
-// CHECK:STDOUT: %Float: %Float.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %E_where.type.981: type = facet_type <@E where %impl.elem0 = %empty_struct_type> [concrete]
|
|
|
-// CHECK:STDOUT: %.Self.956: %E_where.type.981 = bind_symbolic_name .Self [symbolic_self]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.eab: type = facet_access_type %.Self.956 [symbolic_self]
|
|
|
-// CHECK:STDOUT: %E.lookup_impl_witness.d64: <witness> = lookup_impl_witness %.Self.956, @E [symbolic_self]
|
|
|
-// CHECK:STDOUT: %E.facet.3c4: %E.type = facet_value %.Self.as_type.eab, (%E.lookup_impl_witness.d64) [symbolic_self]
|
|
|
-// CHECK:STDOUT: %impl.elem1.072: type = impl_witness_access %E.lookup_impl_witness.d64, element1 [symbolic_self]
|
|
|
-// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
|
|
-// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
|
|
|
-// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
|
|
-// CHECK:STDOUT: %E_where.type.a0d: type = facet_type <@E where %impl.elem0 = %empty_struct_type and %impl.elem1.072 = %i32> [concrete]
|
|
|
-// CHECK:STDOUT: %pattern_type.562: type = pattern_type %E_where.type.a0d [concrete]
|
|
|
-// CHECK:STDOUT: %E_where.type.0ba: type = facet_type <@E where %impl.elem0 = %impl.elem1.c11> [concrete]
|
|
|
-// CHECK:STDOUT: %pattern_type.e21: type = pattern_type %E_where.type.0ba [concrete]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
|
|
-// CHECK:STDOUT: .Bool = %Core.Bool
|
|
|
-// CHECK:STDOUT: .Float = %Core.Float
|
|
|
-// CHECK:STDOUT: .Int = %Core.Int
|
|
|
-// CHECK:STDOUT: import Core//prelude
|
|
|
-// CHECK:STDOUT: import Core//prelude/...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool]
|
|
|
-// CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/types, Float, loaded [concrete = constants.%Float]
|
|
|
-// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Core = imports.%Core
|
|
|
-// CHECK:STDOUT: .E = %E.decl
|
|
|
-// CHECK:STDOUT: .H = %H
|
|
|
-// CHECK:STDOUT: .J = %J
|
|
|
-// CHECK:STDOUT: .K = %K
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Core.import = import Core
|
|
|
-// CHECK:STDOUT: %E.decl: type = interface_decl @E [concrete = constants.%E.type] {} {}
|
|
|
-// CHECK:STDOUT: name_binding_decl {
|
|
|
-// CHECK:STDOUT: %H.patt: %pattern_type.826 = binding_pattern H [concrete]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %.loc15_11.1: type = splice_block %.loc15_11.2 [concrete = constants.%E_where.type.82c] {
|
|
|
-// CHECK:STDOUT: %E.ref.loc15: type = name_ref E, %E.decl [concrete = constants.%E.type]
|
|
|
-// CHECK:STDOUT: %.Self.1: %E.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.da5]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc15_17: %E.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.da5]
|
|
|
-// CHECK:STDOUT: %F.ref.loc15: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc15_17: type = facet_access_type %.Self.ref.loc15_17 [symbolic_self = constants.%.Self.as_type.34e]
|
|
|
-// CHECK:STDOUT: %.loc15_17: type = converted %.Self.ref.loc15_17, %.Self.as_type.loc15_17 [symbolic_self = constants.%.Self.as_type.34e]
|
|
|
-// CHECK:STDOUT: %impl.elem0.loc15: type = impl_witness_access constants.%E.lookup_impl_witness.004, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc15_22.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.loc15_22.2: type = converted %bool.make_type, %.loc15_22.1 [concrete = bool]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc15_31: %E.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.da5]
|
|
|
-// CHECK:STDOUT: %G.ref.loc15: %E.assoc_type = name_ref G, @G.%assoc1 [concrete = constants.%assoc1]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc15_31: type = facet_access_type %.Self.ref.loc15_31 [symbolic_self = constants.%.Self.as_type.34e]
|
|
|
-// CHECK:STDOUT: %.loc15_31: type = converted %.Self.ref.loc15_31, %.Self.as_type.loc15_31 [symbolic_self = constants.%.Self.as_type.34e]
|
|
|
-// CHECK:STDOUT: %impl.elem1.loc15: type = impl_witness_access constants.%E.lookup_impl_witness.004, element1 [symbolic_self = constants.%impl.elem1.c11]
|
|
|
-// CHECK:STDOUT: %.loc15_37.1: %empty_tuple.type = tuple_literal ()
|
|
|
-// CHECK:STDOUT: %.loc15_37.2: type = converted %.loc15_37.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
|
-// CHECK:STDOUT: %.loc15_11.2: type = where_expr %.Self.1 [concrete = constants.%E_where.type.82c] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc15, %.loc15_22.2
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem1.loc15, %.loc15_37.2
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %H: %E_where.type.82c = bind_name H, <error> [concrete = <error>]
|
|
|
-// CHECK:STDOUT: name_binding_decl {
|
|
|
-// CHECK:STDOUT: %J.patt: %pattern_type.562 = binding_pattern J [concrete]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %.loc21_27.1: type = splice_block %.loc21_27.2 [concrete = constants.%E_where.type.a0d] {
|
|
|
-// CHECK:STDOUT: %E.ref.loc21: type = name_ref E, %E.decl [concrete = constants.%E.type]
|
|
|
-// CHECK:STDOUT: %.Self.2: %E.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.da5]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc21_18: %E.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.da5]
|
|
|
-// CHECK:STDOUT: %F.ref.loc21: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc21_18: type = facet_access_type %.Self.ref.loc21_18 [symbolic_self = constants.%.Self.as_type.34e]
|
|
|
-// CHECK:STDOUT: %.loc21_18: type = converted %.Self.ref.loc21_18, %.Self.as_type.loc21_18 [symbolic_self = constants.%.Self.as_type.34e]
|
|
|
-// CHECK:STDOUT: %impl.elem0.loc21: type = impl_witness_access constants.%E.lookup_impl_witness.004, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %.loc21_24.1: %empty_struct_type = struct_literal ()
|
|
|
-// CHECK:STDOUT: %.loc21_24.2: type = converted %.loc21_24.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %.loc21_12: type = where_expr %.Self.2 [concrete = constants.%E_where.type.981] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc21, %.loc21_24.2
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %.Self.3: %E_where.type.981 = bind_symbolic_name .Self [symbolic_self = constants.%.Self.956]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc21_33: %E_where.type.981 = name_ref .Self, %.Self.3 [symbolic_self = constants.%.Self.956]
|
|
|
-// CHECK:STDOUT: %G.ref.loc21: %E.assoc_type = name_ref G, @G.%assoc1 [concrete = constants.%assoc1]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc21_33: type = facet_access_type %.Self.ref.loc21_33 [symbolic_self = constants.%.Self.as_type.eab]
|
|
|
-// CHECK:STDOUT: %.loc21_33: type = converted %.Self.ref.loc21_33, %.Self.as_type.loc21_33 [symbolic_self = constants.%.Self.as_type.eab]
|
|
|
-// CHECK:STDOUT: %impl.elem1.loc21: type = impl_witness_access constants.%E.lookup_impl_witness.d64, element1 [symbolic_self = constants.%impl.elem1.072]
|
|
|
-// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
|
|
-// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
|
|
-// CHECK:STDOUT: %.loc21_27.2: type = where_expr %.Self.3 [concrete = constants.%E_where.type.a0d] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem1.loc21, %i32
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %J: %E_where.type.a0d = bind_name J, <error> [concrete = <error>]
|
|
|
-// CHECK:STDOUT: name_binding_decl {
|
|
|
-// CHECK:STDOUT: %K.patt: %pattern_type.e21 = binding_pattern K [concrete]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %.loc27_11.1: type = splice_block %.loc27_11.2 [concrete = constants.%E_where.type.0ba] {
|
|
|
-// CHECK:STDOUT: %E.ref.loc27: type = name_ref E, %E.decl [concrete = constants.%E.type]
|
|
|
-// CHECK:STDOUT: %.Self.4: %E.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self.da5]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc27_17: %E.type = name_ref .Self, %.Self.4 [symbolic_self = constants.%.Self.da5]
|
|
|
-// CHECK:STDOUT: %F.ref.loc27: %E.assoc_type = name_ref F, @F.%assoc0 [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc27_17: type = facet_access_type %.Self.ref.loc27_17 [symbolic_self = constants.%.Self.as_type.34e]
|
|
|
-// CHECK:STDOUT: %.loc27_17: type = converted %.Self.ref.loc27_17, %.Self.as_type.loc27_17 [symbolic_self = constants.%.Self.as_type.34e]
|
|
|
-// CHECK:STDOUT: %impl.elem0.loc27: type = impl_witness_access constants.%E.lookup_impl_witness.004, element0 [symbolic_self = constants.%impl.elem0]
|
|
|
-// CHECK:STDOUT: %.Self.ref.loc27_22: %E.type = name_ref .Self, %.Self.4 [symbolic_self = constants.%.Self.da5]
|
|
|
-// CHECK:STDOUT: %G.ref.loc27: %E.assoc_type = name_ref G, @G.%assoc1 [concrete = constants.%assoc1]
|
|
|
-// CHECK:STDOUT: %.Self.as_type.loc27_27: type = facet_access_type %.Self.ref.loc27_22 [symbolic_self = constants.%.Self.as_type.34e]
|
|
|
-// CHECK:STDOUT: %.loc27_27: type = converted %.Self.ref.loc27_22, %.Self.as_type.loc27_27 [symbolic_self = constants.%.Self.as_type.34e]
|
|
|
-// CHECK:STDOUT: %impl.elem1.loc27: type = impl_witness_access constants.%E.lookup_impl_witness.004, element1 [symbolic_self = constants.%impl.elem1.c11]
|
|
|
-// CHECK:STDOUT: %.loc27_11.2: type = where_expr %.Self.4 [concrete = constants.%E_where.type.0ba] {
|
|
|
-// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc27, %impl.elem1.loc27
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %K: %E_where.type.0ba = bind_name K, <error> [concrete = <error>]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: interface @E {
|
|
|
-// CHECK:STDOUT: %Self: %E.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
|
|
-// CHECK:STDOUT: %F: type = assoc_const_decl @F [concrete] {
|
|
|
-// CHECK:STDOUT: %assoc0: %E.assoc_type = assoc_entity element0, @E.%F [concrete = constants.%assoc0]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %G: type = assoc_const_decl @G [concrete] {
|
|
|
-// CHECK:STDOUT: %assoc1: %E.assoc_type = assoc_entity element1, @E.%G [concrete = constants.%assoc1]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = %Self
|
|
|
-// CHECK:STDOUT: .F = @F.%assoc0
|
|
|
-// CHECK:STDOUT: .G = @G.%assoc1
|
|
|
-// CHECK:STDOUT: witness = (%F, %G)
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic assoc_const @F(@E.%Self: %E.type) {
|
|
|
-// CHECK:STDOUT: assoc_const F:! type;
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic assoc_const @G(@E.%Self: %E.type) {
|
|
|
-// CHECK:STDOUT: assoc_const G:! type;
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @__global_init() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
|
|
|
-// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [concrete = f64]
|
|
|
-// CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%Bool() [concrete = bool]
|
|
|
-// CHECK:STDOUT: %bool.make_type.loc27: init type = call constants.%Bool() [concrete = bool]
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @F(constants.%Self) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @G(constants.%Self) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @F(constants.%E.facet.2c4) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @G(constants.%E.facet.2c4) {}
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @G(constants.%E.facet.3c4) {}
|
|
|
-// CHECK:STDOUT:
|