|
|
@@ -8,6 +8,20 @@
|
|
|
// TIP: To dump output, run:
|
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/builtin_conversions/no_prelude/convert_class_type_to_generic_facet_value.carbon
|
|
|
|
|
|
+// --- core.carbon
|
|
|
+
|
|
|
+package Core;
|
|
|
+
|
|
|
+interface ImplicitAs(T:! type) {
|
|
|
+ fn Convert[self: Self]() -> T;
|
|
|
+}
|
|
|
+
|
|
|
+// --- generic_facet_type.carbon
|
|
|
+
|
|
|
+library "[[@TEST_NAME]]";
|
|
|
+
|
|
|
+import Core;
|
|
|
+
|
|
|
interface Generic(Scalar:! type) {
|
|
|
fn F();
|
|
|
}
|
|
|
@@ -33,7 +47,125 @@ fn H() {
|
|
|
PassThroughToGenericMethod(GenericParam, ImplsGeneric);
|
|
|
}
|
|
|
|
|
|
-// CHECK:STDOUT: --- convert_class_type_to_generic_facet_value.carbon
|
|
|
+// --- generic_facet_type_from_implicit_param.carbon
|
|
|
+
|
|
|
+library "[[@TEST_NAME]]";
|
|
|
+
|
|
|
+import Core;
|
|
|
+
|
|
|
+interface Generic(Scalar:! type) {
|
|
|
+ fn F();
|
|
|
+}
|
|
|
+
|
|
|
+class GenericParam {}
|
|
|
+
|
|
|
+class ImplsGeneric {}
|
|
|
+impl ImplsGeneric as Generic(GenericParam) {
|
|
|
+ fn F() {}
|
|
|
+}
|
|
|
+
|
|
|
+fn CallGenericMethod[T:! type](U:! Generic(T), t: T) {}
|
|
|
+
|
|
|
+fn G() {
|
|
|
+ CallGenericMethod(ImplsGeneric, {} as GenericParam);
|
|
|
+}
|
|
|
+
|
|
|
+// CHECK:STDOUT: --- core.carbon
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: constants {
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.96f: type = generic_interface_type @ImplicitAs [template]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.96f = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type.07f: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic]
|
|
|
+// CHECK:STDOUT: %Self: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic]
|
|
|
+// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
|
|
|
+// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%T) [symbolic]
|
|
|
+// CHECK:STDOUT: %Convert: %Convert.type = struct_value () [symbolic]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type %ImplicitAs.type.07f [symbolic]
|
|
|
+// CHECK:STDOUT: %assoc0: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: file {
|
|
|
+// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
+// CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.96f = interface_decl @ImplicitAs [template = constants.%ImplicitAs.generic] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc4_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_22.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_22.1, runtime_param<none> [symbolic = %T.patt.loc4_22.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<none>
|
|
|
+// CHECK:STDOUT: %T.loc4_22.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_22.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic interface @ImplicitAs(%T.loc4_22.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc4_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_22.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc4_22.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_22.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc4_22.2)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
|
|
|
+// CHECK:STDOUT: %Self.2: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
|
|
|
+// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%T.loc4_22.2) [symbolic = %Convert.type (constants.%Convert.type)]
|
|
|
+// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type) = struct_value () [symbolic = %Convert (constants.%Convert)]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type)]
|
|
|
+// CHECK:STDOUT: %assoc0.loc5_32.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc5_32.2 (constants.%assoc0)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: interface {
|
|
|
+// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
|
|
|
+// CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type) = fn_decl @Convert [symbolic = @ImplicitAs.%Convert (constants.%Convert)] {
|
|
|
+// CHECK:STDOUT: %self.patt: @Convert.%Self.as_type.loc5_20.1 (%Self.as_type) = binding_pattern self
|
|
|
+// CHECK:STDOUT: %self.param_patt: @Convert.%Self.as_type.loc5_20.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0
|
|
|
+// CHECK:STDOUT: %return.patt: @Convert.%T (%T) = return_slot_pattern
|
|
|
+// CHECK:STDOUT: %return.param_patt: @Convert.%T (%T) = out_param_pattern %return.patt, runtime_param1
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc4_22.1 [symbolic = %T (constants.%T)]
|
|
|
+// CHECK:STDOUT: %self.param: @Convert.%Self.as_type.loc5_20.1 (%Self.as_type) = value_param runtime_param0
|
|
|
+// CHECK:STDOUT: %.loc5_20.1: type = splice_block %.loc5_20.3 [symbolic = %Self.as_type.loc5_20.1 (constants.%Self.as_type)] {
|
|
|
+// CHECK:STDOUT: %.loc5_20.2: @Convert.%ImplicitAs.type (%ImplicitAs.type.07f) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self)]
|
|
|
+// CHECK:STDOUT: %Self.ref: @Convert.%ImplicitAs.type (%ImplicitAs.type.07f) = name_ref Self, %.loc5_20.2 [symbolic = %Self (constants.%Self)]
|
|
|
+// CHECK:STDOUT: %Self.as_type.loc5_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_20.1 (constants.%Self.as_type)]
|
|
|
+// CHECK:STDOUT: %.loc5_20.3: type = converted %Self.ref, %Self.as_type.loc5_20.2 [symbolic = %Self.as_type.loc5_20.1 (constants.%Self.as_type)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %self: @Convert.%Self.as_type.loc5_20.1 (%Self.as_type) = bind_name self, %self.param
|
|
|
+// CHECK:STDOUT: %return.param: ref @Convert.%T (%T) = out_param runtime_param1
|
|
|
+// CHECK:STDOUT: %return: ref @Convert.%T (%T) = return_slot %return.param
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %assoc0.loc5_32.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc5_32.2 (constants.%assoc0)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
+// CHECK:STDOUT: .Self = %Self.1
|
|
|
+// CHECK:STDOUT: .Convert = %assoc0.loc5_32.1
|
|
|
+// CHECK:STDOUT: witness = (%Convert.decl)
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic fn @Convert(@ImplicitAs.%T.loc4_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f)) {
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
|
|
|
+// CHECK:STDOUT: %Self: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)]
|
|
|
+// CHECK:STDOUT: %Self.as_type.loc5_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc5_20.1 (constants.%Self.as_type)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self.as_type.loc5_20.1 (%Self.as_type)]() -> @Convert.%T (%T);
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @ImplicitAs(constants.%T) {
|
|
|
+// CHECK:STDOUT: %T.loc4_22.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc4_22.2 => constants.%T
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @Convert(constants.%T, constants.%Self) {
|
|
|
+// CHECK:STDOUT: %T => constants.%T
|
|
|
+// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.07f
|
|
|
+// CHECK:STDOUT: %Self => constants.%Self
|
|
|
+// CHECK:STDOUT: %Self.as_type.loc5_20.1 => constants.%Self.as_type
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @ImplicitAs(@Convert.%T) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @ImplicitAs(%T.loc4_22.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: --- generic_facet_type.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %Scalar: type = bind_symbolic_name Scalar, 0 [symbolic]
|
|
|
@@ -78,8 +210,15 @@ fn H() {
|
|
|
// CHECK:STDOUT: %PassThroughToGenericMethod.specific_fn: <specific function> = specific_function %PassThroughToGenericMethod, @PassThroughToGenericMethod(%GenericParam, %Generic.facet) [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: imports {
|
|
|
+// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
|
+// CHECK:STDOUT: import Core//default
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
+// CHECK:STDOUT: .Core = imports.%Core
|
|
|
// CHECK:STDOUT: .Generic = %Generic.decl
|
|
|
// CHECK:STDOUT: .GenericParam = %GenericParam.decl
|
|
|
// CHECK:STDOUT: .ImplsGeneric = %ImplsGeneric.decl
|
|
|
@@ -88,12 +227,13 @@ fn H() {
|
|
|
// CHECK:STDOUT: .PassThroughToGenericMethod = %PassThroughToGenericMethod.decl
|
|
|
// CHECK:STDOUT: .H = %H.decl
|
|
|
// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %Core.import = import Core
|
|
|
// CHECK:STDOUT: %Generic.decl: %Generic.type.c21 = interface_decl @Generic [template = constants.%Generic.generic] {
|
|
|
-// CHECK:STDOUT: %Scalar.patt.loc11_19.1: type = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc11_19.2 (constants.%Scalar.patt)]
|
|
|
-// CHECK:STDOUT: %Scalar.param_patt: type = value_param_pattern %Scalar.patt.loc11_19.1, runtime_param<none> [symbolic = %Scalar.patt.loc11_19.2 (constants.%Scalar.patt)]
|
|
|
+// CHECK:STDOUT: %Scalar.patt.loc6_19.1: type = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc6_19.2 (constants.%Scalar.patt)]
|
|
|
+// CHECK:STDOUT: %Scalar.param_patt: type = value_param_pattern %Scalar.patt.loc6_19.1, runtime_param<none> [symbolic = %Scalar.patt.loc6_19.2 (constants.%Scalar.patt)]
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %Scalar.param: type = value_param runtime_param<none>
|
|
|
-// CHECK:STDOUT: %Scalar.loc11_19.1: type = bind_symbolic_name Scalar, 0, %Scalar.param [symbolic = %Scalar.loc11_19.2 (constants.%Scalar)]
|
|
|
+// CHECK:STDOUT: %Scalar.loc6_19.1: type = bind_symbolic_name Scalar, 0, %Scalar.param [symbolic = %Scalar.loc6_19.2 (constants.%Scalar)]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %GenericParam.decl: type = class_decl @GenericParam [template = constants.%GenericParam] {} {}
|
|
|
// CHECK:STDOUT: %ImplsGeneric.decl: type = class_decl @ImplsGeneric [template = constants.%ImplsGeneric] {} {}
|
|
|
@@ -105,61 +245,61 @@ fn H() {
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (@impl.%F.decl) [template = constants.%impl_witness]
|
|
|
// CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [template = constants.%CallGenericMethod] {
|
|
|
-// CHECK:STDOUT: %T.patt.loc22_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_22.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc22_22.1, runtime_param<none> [symbolic = %T.patt.loc22_22.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %U.patt.loc22_32.1: @CallGenericMethod.%Generic.type.loc22_45.2 (%Generic.type.91ccba.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc22_32.2 (constants.%U.patt)]
|
|
|
-// CHECK:STDOUT: %U.param_patt: @CallGenericMethod.%Generic.type.loc22_45.2 (%Generic.type.91ccba.2) = value_param_pattern %U.patt.loc22_32.1, runtime_param<none> [symbolic = %U.patt.loc22_32.2 (constants.%U.patt)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_22.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc17_22.1, runtime_param<none> [symbolic = %T.patt.loc17_22.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %U.patt.loc17_32.1: @CallGenericMethod.%Generic.type.loc17_45.2 (%Generic.type.91ccba.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc17_32.2 (constants.%U.patt)]
|
|
|
+// CHECK:STDOUT: %U.param_patt: @CallGenericMethod.%Generic.type.loc17_45.2 (%Generic.type.91ccba.2) = value_param_pattern %U.patt.loc17_32.1, runtime_param<none> [symbolic = %U.patt.loc17_32.2 (constants.%U.patt)]
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %T.param: type = value_param runtime_param<none>
|
|
|
-// CHECK:STDOUT: %T.loc22_22.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc22_22.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %U.param: @CallGenericMethod.%Generic.type.loc22_45.2 (%Generic.type.91ccba.2) = value_param runtime_param<none>
|
|
|
-// CHECK:STDOUT: %.loc22: type = splice_block %Generic.type.loc22_45.1 [symbolic = %Generic.type.loc22_45.2 (constants.%Generic.type.91ccba.2)] {
|
|
|
+// CHECK:STDOUT: %T.loc17_22.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc17_22.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %U.param: @CallGenericMethod.%Generic.type.loc17_45.2 (%Generic.type.91ccba.2) = value_param runtime_param<none>
|
|
|
+// CHECK:STDOUT: %.loc17: type = splice_block %Generic.type.loc17_45.1 [symbolic = %Generic.type.loc17_45.2 (constants.%Generic.type.91ccba.2)] {
|
|
|
// CHECK:STDOUT: %Generic.ref: %Generic.type.c21 = name_ref Generic, file.%Generic.decl [template = constants.%Generic.generic]
|
|
|
-// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc22_22.1 [symbolic = %T.loc22_22.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %Generic.type.loc22_45.1: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc22_45.2 (constants.%Generic.type.91ccba.2)]
|
|
|
+// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc17_22.1 [symbolic = %T.loc17_22.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %Generic.type.loc17_45.1: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc17_45.2 (constants.%Generic.type.91ccba.2)]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %U.loc22_32.1: @CallGenericMethod.%Generic.type.loc22_45.2 (%Generic.type.91ccba.2) = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc22_32.2 (constants.%U)]
|
|
|
+// CHECK:STDOUT: %U.loc17_32.1: @CallGenericMethod.%Generic.type.loc17_45.2 (%Generic.type.91ccba.2) = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc17_32.2 (constants.%U)]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {}
|
|
|
// CHECK:STDOUT: %PassThroughToGenericMethod.decl: %PassThroughToGenericMethod.type = fn_decl @PassThroughToGenericMethod [template = constants.%PassThroughToGenericMethod] {
|
|
|
-// CHECK:STDOUT: %T.patt.loc28_31.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc28_31.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc28_31.1, runtime_param<none> [symbolic = %T.patt.loc28_31.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %U.patt.loc28_41.1: @PassThroughToGenericMethod.%Generic.type.loc28_54.2 (%Generic.type.91ccba.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc28_41.2 (constants.%U.patt)]
|
|
|
-// CHECK:STDOUT: %U.param_patt: @PassThroughToGenericMethod.%Generic.type.loc28_54.2 (%Generic.type.91ccba.2) = value_param_pattern %U.patt.loc28_41.1, runtime_param<none> [symbolic = %U.patt.loc28_41.2 (constants.%U.patt)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc23_31.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc23_31.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc23_31.1, runtime_param<none> [symbolic = %T.patt.loc23_31.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %U.patt.loc23_41.1: @PassThroughToGenericMethod.%Generic.type.loc23_54.2 (%Generic.type.91ccba.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc23_41.2 (constants.%U.patt)]
|
|
|
+// CHECK:STDOUT: %U.param_patt: @PassThroughToGenericMethod.%Generic.type.loc23_54.2 (%Generic.type.91ccba.2) = value_param_pattern %U.patt.loc23_41.1, runtime_param<none> [symbolic = %U.patt.loc23_41.2 (constants.%U.patt)]
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %T.param: type = value_param runtime_param<none>
|
|
|
-// CHECK:STDOUT: %T.loc28_31.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc28_31.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %U.param: @PassThroughToGenericMethod.%Generic.type.loc28_54.2 (%Generic.type.91ccba.2) = value_param runtime_param<none>
|
|
|
-// CHECK:STDOUT: %.loc28: type = splice_block %Generic.type.loc28_54.1 [symbolic = %Generic.type.loc28_54.2 (constants.%Generic.type.91ccba.2)] {
|
|
|
+// CHECK:STDOUT: %T.loc23_31.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc23_31.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %U.param: @PassThroughToGenericMethod.%Generic.type.loc23_54.2 (%Generic.type.91ccba.2) = value_param runtime_param<none>
|
|
|
+// CHECK:STDOUT: %.loc23: type = splice_block %Generic.type.loc23_54.1 [symbolic = %Generic.type.loc23_54.2 (constants.%Generic.type.91ccba.2)] {
|
|
|
// CHECK:STDOUT: %Generic.ref: %Generic.type.c21 = name_ref Generic, file.%Generic.decl [template = constants.%Generic.generic]
|
|
|
-// CHECK:STDOUT: %T.ref.loc28: type = name_ref T, %T.loc28_31.1 [symbolic = %T.loc28_31.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %Generic.type.loc28_54.1: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc28_54.2 (constants.%Generic.type.91ccba.2)]
|
|
|
+// CHECK:STDOUT: %T.ref.loc23: type = name_ref T, %T.loc23_31.1 [symbolic = %T.loc23_31.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %Generic.type.loc23_54.1: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc23_54.2 (constants.%Generic.type.91ccba.2)]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %U.loc28_41.1: @PassThroughToGenericMethod.%Generic.type.loc28_54.2 (%Generic.type.91ccba.2) = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc28_41.2 (constants.%U)]
|
|
|
+// CHECK:STDOUT: %U.loc23_41.1: @PassThroughToGenericMethod.%Generic.type.loc23_54.2 (%Generic.type.91ccba.2) = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc23_41.2 (constants.%U)]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic interface @Generic(%Scalar.loc11_19.1: type) {
|
|
|
-// CHECK:STDOUT: %Scalar.loc11_19.2: type = bind_symbolic_name Scalar, 0 [symbolic = %Scalar.loc11_19.2 (constants.%Scalar)]
|
|
|
-// CHECK:STDOUT: %Scalar.patt.loc11_19.2: type = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc11_19.2 (constants.%Scalar.patt)]
|
|
|
+// CHECK:STDOUT: generic interface @Generic(%Scalar.loc6_19.1: type) {
|
|
|
+// CHECK:STDOUT: %Scalar.loc6_19.2: type = bind_symbolic_name Scalar, 0 [symbolic = %Scalar.loc6_19.2 (constants.%Scalar)]
|
|
|
+// CHECK:STDOUT: %Scalar.patt.loc6_19.2: type = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc6_19.2 (constants.%Scalar.patt)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc11_19.2)> [symbolic = %Generic.type (constants.%Generic.type.91ccba.1)]
|
|
|
+// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc6_19.2)> [symbolic = %Generic.type (constants.%Generic.type.91ccba.1)]
|
|
|
// CHECK:STDOUT: %Self.2: %Generic.type.91ccba.1 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
|
|
|
-// CHECK:STDOUT: %F.type: type = fn_type @F.1, @Generic(%Scalar.loc11_19.2) [symbolic = %F.type (constants.%F.type.f43)]
|
|
|
+// CHECK:STDOUT: %F.type: type = fn_type @F.1, @Generic(%Scalar.loc6_19.2) [symbolic = %F.type (constants.%F.type.f43)]
|
|
|
// CHECK:STDOUT: %F: @Generic.%F.type (%F.type.f43) = struct_value () [symbolic = %F (constants.%F.8a2)]
|
|
|
// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic.%Generic.type (%Generic.type.91ccba.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.de9)]
|
|
|
-// CHECK:STDOUT: %assoc0.loc12_9.2: @Generic.%Generic.assoc_type (%Generic.assoc_type.de9) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc12_9.2 (constants.%assoc0.29c)]
|
|
|
+// CHECK:STDOUT: %assoc0.loc7_9.2: @Generic.%Generic.assoc_type (%Generic.assoc_type.de9) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc7_9.2 (constants.%assoc0.29c)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: interface {
|
|
|
// CHECK:STDOUT: %Self.1: @Generic.%Generic.type (%Generic.type.91ccba.1) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
|
|
|
// CHECK:STDOUT: %F.decl: @Generic.%F.type (%F.type.f43) = fn_decl @F.1 [symbolic = @Generic.%F (constants.%F.8a2)] {} {}
|
|
|
-// CHECK:STDOUT: %assoc0.loc12_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.de9) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc12_9.2 (constants.%assoc0.29c)]
|
|
|
+// CHECK:STDOUT: %assoc0.loc7_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.de9) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc7_9.2 (constants.%assoc0.29c)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !members:
|
|
|
// CHECK:STDOUT: .Self = %Self.1
|
|
|
-// CHECK:STDOUT: .F = %assoc0.loc12_9.1
|
|
|
+// CHECK:STDOUT: .F = %assoc0.loc7_9.1
|
|
|
// CHECK:STDOUT: witness = (%F.decl)
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -188,7 +328,7 @@ fn H() {
|
|
|
// CHECK:STDOUT: .Self = constants.%ImplsGeneric
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @F.1(@Generic.%Scalar.loc11_19.1: type, @Generic.%Self.1: @Generic.%Generic.type (%Generic.type.91ccba.1)) {
|
|
|
+// CHECK:STDOUT: generic fn @F.1(@Generic.%Scalar.loc6_19.1: type, @Generic.%Self.1: @Generic.%Generic.type (%Generic.type.91ccba.1)) {
|
|
|
// CHECK:STDOUT: fn();
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -197,16 +337,16 @@ fn H() {
|
|
|
// CHECK:STDOUT: return
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc22_22.1: type, %U.loc22_32.1: @CallGenericMethod.%Generic.type.loc22_45.2 (%Generic.type.91ccba.2)) {
|
|
|
-// CHECK:STDOUT: %T.loc22_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc22_22.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %T.patt.loc22_22.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_22.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %Generic.type.loc22_45.2: type = facet_type <@Generic, @Generic(%T.loc22_22.2)> [symbolic = %Generic.type.loc22_45.2 (constants.%Generic.type.91ccba.2)]
|
|
|
-// CHECK:STDOUT: %U.loc22_32.2: %Generic.type.91ccba.2 = bind_symbolic_name U, 1 [symbolic = %U.loc22_32.2 (constants.%U)]
|
|
|
-// CHECK:STDOUT: %U.patt.loc22_32.2: %Generic.type.91ccba.2 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc22_32.2 (constants.%U.patt)]
|
|
|
+// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc17_22.1: type, %U.loc17_32.1: @CallGenericMethod.%Generic.type.loc17_45.2 (%Generic.type.91ccba.2)) {
|
|
|
+// CHECK:STDOUT: %T.loc17_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc17_22.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_22.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_22.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %Generic.type.loc17_45.2: type = facet_type <@Generic, @Generic(%T.loc17_22.2)> [symbolic = %Generic.type.loc17_45.2 (constants.%Generic.type.91ccba.2)]
|
|
|
+// CHECK:STDOUT: %U.loc17_32.2: %Generic.type.91ccba.2 = bind_symbolic_name U, 1 [symbolic = %U.loc17_32.2 (constants.%U)]
|
|
|
+// CHECK:STDOUT: %U.patt.loc17_32.2: %Generic.type.91ccba.2 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc17_32.2 (constants.%U.patt)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: @CallGenericMethod.%Generic.type.loc22_45.2 (%Generic.type.91ccba.2)) {
|
|
|
+// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: @CallGenericMethod.%Generic.type.loc17_45.2 (%Generic.type.91ccba.2)) {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: return
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -218,29 +358,29 @@ fn H() {
|
|
|
// CHECK:STDOUT: %GenericParam.ref: type = name_ref GenericParam, file.%GenericParam.decl [template = constants.%GenericParam]
|
|
|
// CHECK:STDOUT: %ImplsGeneric.ref: type = name_ref ImplsGeneric, file.%ImplsGeneric.decl [template = constants.%ImplsGeneric]
|
|
|
// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, constants.%impl_witness [template = constants.%Generic.facet]
|
|
|
-// CHECK:STDOUT: %.loc25: %Generic.type.769 = converted constants.%ImplsGeneric, %Generic.facet [template = constants.%Generic.facet]
|
|
|
-// CHECK:STDOUT: %CallGenericMethod.specific_fn: <specific function> = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%GenericParam, %.loc25) [template = constants.%CallGenericMethod.specific_fn.d8c]
|
|
|
+// CHECK:STDOUT: %.loc20: %Generic.type.769 = converted constants.%ImplsGeneric, %Generic.facet [template = constants.%Generic.facet]
|
|
|
+// CHECK:STDOUT: %CallGenericMethod.specific_fn: <specific function> = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%GenericParam, %.loc20) [template = constants.%CallGenericMethod.specific_fn.d8c]
|
|
|
// CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn()
|
|
|
// CHECK:STDOUT: return
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic fn @PassThroughToGenericMethod(%T.loc28_31.1: type, %U.loc28_41.1: @PassThroughToGenericMethod.%Generic.type.loc28_54.2 (%Generic.type.91ccba.2)) {
|
|
|
-// CHECK:STDOUT: %T.loc28_31.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc28_31.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %T.patt.loc28_31.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc28_31.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %Generic.type.loc28_54.2: type = facet_type <@Generic, @Generic(%T.loc28_31.2)> [symbolic = %Generic.type.loc28_54.2 (constants.%Generic.type.91ccba.2)]
|
|
|
-// CHECK:STDOUT: %U.loc28_41.2: %Generic.type.91ccba.2 = bind_symbolic_name U, 1 [symbolic = %U.loc28_41.2 (constants.%U)]
|
|
|
-// CHECK:STDOUT: %U.patt.loc28_41.2: %Generic.type.91ccba.2 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc28_41.2 (constants.%U.patt)]
|
|
|
+// CHECK:STDOUT: generic fn @PassThroughToGenericMethod(%T.loc23_31.1: type, %U.loc23_41.1: @PassThroughToGenericMethod.%Generic.type.loc23_54.2 (%Generic.type.91ccba.2)) {
|
|
|
+// CHECK:STDOUT: %T.loc23_31.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc23_31.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc23_31.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc23_31.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %Generic.type.loc23_54.2: type = facet_type <@Generic, @Generic(%T.loc23_31.2)> [symbolic = %Generic.type.loc23_54.2 (constants.%Generic.type.91ccba.2)]
|
|
|
+// CHECK:STDOUT: %U.loc23_41.2: %Generic.type.91ccba.2 = bind_symbolic_name U, 1 [symbolic = %U.loc23_41.2 (constants.%U)]
|
|
|
+// CHECK:STDOUT: %U.patt.loc23_41.2: %Generic.type.91ccba.2 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc23_41.2 (constants.%U.patt)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %CallGenericMethod.specific_fn.loc29_3.2: <specific function> = specific_function constants.%CallGenericMethod, @CallGenericMethod(%T.loc28_31.2, %U.loc28_41.2) [symbolic = %CallGenericMethod.specific_fn.loc29_3.2 (constants.%CallGenericMethod.specific_fn.a24)]
|
|
|
+// CHECK:STDOUT: %CallGenericMethod.specific_fn.loc24_3.2: <specific function> = specific_function constants.%CallGenericMethod, @CallGenericMethod(%T.loc23_31.2, %U.loc23_41.2) [symbolic = %CallGenericMethod.specific_fn.loc24_3.2 (constants.%CallGenericMethod.specific_fn.a24)]
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: @PassThroughToGenericMethod.%Generic.type.loc28_54.2 (%Generic.type.91ccba.2)) {
|
|
|
+// CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: @PassThroughToGenericMethod.%Generic.type.loc23_54.2 (%Generic.type.91ccba.2)) {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: %CallGenericMethod.ref: %CallGenericMethod.type = name_ref CallGenericMethod, file.%CallGenericMethod.decl [template = constants.%CallGenericMethod]
|
|
|
-// CHECK:STDOUT: %T.ref.loc29: type = name_ref T, %T.loc28_31.1 [symbolic = %T.loc28_31.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %U.ref: @PassThroughToGenericMethod.%Generic.type.loc28_54.2 (%Generic.type.91ccba.2) = name_ref U, %U.loc28_41.1 [symbolic = %U.loc28_41.2 (constants.%U)]
|
|
|
-// CHECK:STDOUT: %CallGenericMethod.specific_fn.loc29_3.1: <specific function> = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%T, constants.%U) [symbolic = %CallGenericMethod.specific_fn.loc29_3.2 (constants.%CallGenericMethod.specific_fn.a24)]
|
|
|
-// CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn.loc29_3.1()
|
|
|
+// CHECK:STDOUT: %T.ref.loc24: type = name_ref T, %T.loc23_31.1 [symbolic = %T.loc23_31.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %U.ref: @PassThroughToGenericMethod.%Generic.type.loc23_54.2 (%Generic.type.91ccba.2) = name_ref U, %U.loc23_41.1 [symbolic = %U.loc23_41.2 (constants.%U)]
|
|
|
+// CHECK:STDOUT: %CallGenericMethod.specific_fn.loc24_3.1: <specific function> = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%T, constants.%U) [symbolic = %CallGenericMethod.specific_fn.loc24_3.2 (constants.%CallGenericMethod.specific_fn.a24)]
|
|
|
+// CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn.loc24_3.1()
|
|
|
// CHECK:STDOUT: return
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -251,24 +391,24 @@ fn H() {
|
|
|
// CHECK:STDOUT: %GenericParam.ref: type = name_ref GenericParam, file.%GenericParam.decl [template = constants.%GenericParam]
|
|
|
// CHECK:STDOUT: %ImplsGeneric.ref: type = name_ref ImplsGeneric, file.%ImplsGeneric.decl [template = constants.%ImplsGeneric]
|
|
|
// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, constants.%impl_witness [template = constants.%Generic.facet]
|
|
|
-// CHECK:STDOUT: %.loc33: %Generic.type.769 = converted constants.%ImplsGeneric, %Generic.facet [template = constants.%Generic.facet]
|
|
|
-// CHECK:STDOUT: %PassThroughToGenericMethod.specific_fn: <specific function> = specific_function %PassThroughToGenericMethod.ref, @PassThroughToGenericMethod(constants.%GenericParam, %.loc33) [template = constants.%PassThroughToGenericMethod.specific_fn]
|
|
|
+// CHECK:STDOUT: %.loc28: %Generic.type.769 = converted constants.%ImplsGeneric, %Generic.facet [template = constants.%Generic.facet]
|
|
|
+// CHECK:STDOUT: %PassThroughToGenericMethod.specific_fn: <specific function> = specific_function %PassThroughToGenericMethod.ref, @PassThroughToGenericMethod(constants.%GenericParam, %.loc28) [template = constants.%PassThroughToGenericMethod.specific_fn]
|
|
|
// CHECK:STDOUT: %PassThroughToGenericMethod.call: init %empty_tuple.type = call %PassThroughToGenericMethod.specific_fn()
|
|
|
// CHECK:STDOUT: return
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @Generic(constants.%Scalar) {
|
|
|
-// CHECK:STDOUT: %Scalar.loc11_19.2 => constants.%Scalar
|
|
|
-// CHECK:STDOUT: %Scalar.patt.loc11_19.2 => constants.%Scalar
|
|
|
+// CHECK:STDOUT: %Scalar.loc6_19.2 => constants.%Scalar
|
|
|
+// CHECK:STDOUT: %Scalar.patt.loc6_19.2 => constants.%Scalar
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self) {}
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @Generic(%Scalar.loc11_19.2) {}
|
|
|
+// CHECK:STDOUT: specific @Generic(%Scalar.loc6_19.2) {}
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @Generic(constants.%GenericParam) {
|
|
|
-// CHECK:STDOUT: %Scalar.loc11_19.2 => constants.%GenericParam
|
|
|
-// CHECK:STDOUT: %Scalar.patt.loc11_19.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %Scalar.loc6_19.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %Scalar.patt.loc6_19.2 => constants.%GenericParam
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT: %Generic.type => constants.%Generic.type.769
|
|
|
@@ -276,74 +416,320 @@ fn H() {
|
|
|
// CHECK:STDOUT: %F.type => constants.%F.type.4cf
|
|
|
// CHECK:STDOUT: %F => constants.%F.118
|
|
|
// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.9f1
|
|
|
-// CHECK:STDOUT: %assoc0.loc12_9.2 => constants.%assoc0.9b7
|
|
|
+// CHECK:STDOUT: %assoc0.loc7_9.2 => constants.%assoc0.9b7
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @F.1(constants.%GenericParam, constants.%Generic.facet) {}
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @Generic(constants.%T) {
|
|
|
-// CHECK:STDOUT: %Scalar.loc11_19.2 => constants.%T
|
|
|
-// CHECK:STDOUT: %Scalar.patt.loc11_19.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %Scalar.loc6_19.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %Scalar.patt.loc6_19.2 => constants.%T
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U) {
|
|
|
-// CHECK:STDOUT: %T.loc22_22.2 => constants.%T
|
|
|
-// CHECK:STDOUT: %T.patt.loc22_22.2 => constants.%T
|
|
|
-// CHECK:STDOUT: %Generic.type.loc22_45.2 => constants.%Generic.type.91ccba.2
|
|
|
-// CHECK:STDOUT: %U.loc22_32.2 => constants.%U
|
|
|
-// CHECK:STDOUT: %U.patt.loc22_32.2 => constants.%U
|
|
|
+// CHECK:STDOUT: %T.loc17_22.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_22.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %Generic.type.loc17_45.2 => constants.%Generic.type.91ccba.2
|
|
|
+// CHECK:STDOUT: %U.loc17_32.2 => constants.%U
|
|
|
+// CHECK:STDOUT: %U.patt.loc17_32.2 => constants.%U
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc22_22.2) {}
|
|
|
+// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc17_22.2) {}
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, @G.%.loc25) {
|
|
|
-// CHECK:STDOUT: %T.loc22_22.2 => constants.%GenericParam
|
|
|
-// CHECK:STDOUT: %T.patt.loc22_22.2 => constants.%GenericParam
|
|
|
-// CHECK:STDOUT: %Generic.type.loc22_45.2 => constants.%Generic.type.769
|
|
|
-// CHECK:STDOUT: %U.loc22_32.2 => constants.%Generic.facet
|
|
|
-// CHECK:STDOUT: %U.patt.loc22_32.2 => constants.%Generic.facet
|
|
|
+// CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, @G.%.loc20) {
|
|
|
+// CHECK:STDOUT: %T.loc17_22.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_22.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %Generic.type.loc17_45.2 => constants.%Generic.type.769
|
|
|
+// CHECK:STDOUT: %U.loc17_32.2 => constants.%Generic.facet
|
|
|
+// CHECK:STDOUT: %U.patt.loc17_32.2 => constants.%Generic.facet
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) {
|
|
|
-// CHECK:STDOUT: %T.loc22_22.2 => constants.%GenericParam
|
|
|
-// CHECK:STDOUT: %T.patt.loc22_22.2 => constants.%GenericParam
|
|
|
-// CHECK:STDOUT: %Generic.type.loc22_45.2 => constants.%Generic.type.769
|
|
|
-// CHECK:STDOUT: %U.loc22_32.2 => constants.%Generic.facet
|
|
|
-// CHECK:STDOUT: %U.patt.loc22_32.2 => constants.%Generic.facet
|
|
|
+// CHECK:STDOUT: %T.loc17_22.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_22.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %Generic.type.loc17_45.2 => constants.%Generic.type.769
|
|
|
+// CHECK:STDOUT: %U.loc17_32.2 => constants.%Generic.facet
|
|
|
+// CHECK:STDOUT: %U.patt.loc17_32.2 => constants.%Generic.facet
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @PassThroughToGenericMethod(constants.%T, constants.%U) {
|
|
|
-// CHECK:STDOUT: %T.loc28_31.2 => constants.%T
|
|
|
-// CHECK:STDOUT: %T.patt.loc28_31.2 => constants.%T
|
|
|
-// CHECK:STDOUT: %Generic.type.loc28_54.2 => constants.%Generic.type.91ccba.2
|
|
|
-// CHECK:STDOUT: %U.loc28_41.2 => constants.%U
|
|
|
-// CHECK:STDOUT: %U.patt.loc28_41.2 => constants.%U
|
|
|
+// CHECK:STDOUT: %T.loc23_31.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc23_31.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %Generic.type.loc23_54.2 => constants.%Generic.type.91ccba.2
|
|
|
+// CHECK:STDOUT: %U.loc23_41.2 => constants.%U
|
|
|
+// CHECK:STDOUT: %U.patt.loc23_41.2 => constants.%U
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @Generic(@PassThroughToGenericMethod.%T.loc28_31.2) {}
|
|
|
+// CHECK:STDOUT: specific @Generic(@PassThroughToGenericMethod.%T.loc23_31.2) {}
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @CallGenericMethod(@PassThroughToGenericMethod.%T.loc28_31.2, @PassThroughToGenericMethod.%U.loc28_41.2) {}
|
|
|
+// CHECK:STDOUT: specific @CallGenericMethod(@PassThroughToGenericMethod.%T.loc23_31.2, @PassThroughToGenericMethod.%U.loc23_41.2) {}
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @PassThroughToGenericMethod(constants.%GenericParam, @H.%.loc33) {
|
|
|
-// CHECK:STDOUT: %T.loc28_31.2 => constants.%GenericParam
|
|
|
-// CHECK:STDOUT: %T.patt.loc28_31.2 => constants.%GenericParam
|
|
|
-// CHECK:STDOUT: %Generic.type.loc28_54.2 => constants.%Generic.type.769
|
|
|
-// CHECK:STDOUT: %U.loc28_41.2 => constants.%Generic.facet
|
|
|
-// CHECK:STDOUT: %U.patt.loc28_41.2 => constants.%Generic.facet
|
|
|
+// CHECK:STDOUT: specific @PassThroughToGenericMethod(constants.%GenericParam, @H.%.loc28) {
|
|
|
+// CHECK:STDOUT: %T.loc23_31.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %T.patt.loc23_31.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %Generic.type.loc23_54.2 => constants.%Generic.type.769
|
|
|
+// CHECK:STDOUT: %U.loc23_41.2 => constants.%Generic.facet
|
|
|
+// CHECK:STDOUT: %U.patt.loc23_41.2 => constants.%Generic.facet
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %CallGenericMethod.specific_fn.loc29_3.2 => constants.%CallGenericMethod.specific_fn.d8c
|
|
|
+// CHECK:STDOUT: %CallGenericMethod.specific_fn.loc24_3.2 => constants.%CallGenericMethod.specific_fn.d8c
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @PassThroughToGenericMethod(constants.%GenericParam, constants.%Generic.facet) {
|
|
|
-// CHECK:STDOUT: %T.loc28_31.2 => constants.%GenericParam
|
|
|
-// CHECK:STDOUT: %T.patt.loc28_31.2 => constants.%GenericParam
|
|
|
-// CHECK:STDOUT: %Generic.type.loc28_54.2 => constants.%Generic.type.769
|
|
|
-// CHECK:STDOUT: %U.loc28_41.2 => constants.%Generic.facet
|
|
|
-// CHECK:STDOUT: %U.patt.loc28_41.2 => constants.%Generic.facet
|
|
|
+// CHECK:STDOUT: %T.loc23_31.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %T.patt.loc23_31.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %Generic.type.loc23_54.2 => constants.%Generic.type.769
|
|
|
+// CHECK:STDOUT: %U.loc23_41.2 => constants.%Generic.facet
|
|
|
+// CHECK:STDOUT: %U.patt.loc23_41.2 => constants.%Generic.facet
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: --- generic_facet_type_from_implicit_param.carbon
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: constants {
|
|
|
+// CHECK:STDOUT: %Scalar: type = bind_symbolic_name Scalar, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %Scalar.patt: type = symbolic_binding_pattern Scalar, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %Generic.type.c21: type = generic_interface_type @Generic [template]
|
|
|
+// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
|
|
+// CHECK:STDOUT: %Generic.generic: %Generic.type.c21 = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %Generic.type.91ccba.1: type = facet_type <@Generic, @Generic(%Scalar)> [symbolic]
|
|
|
+// CHECK:STDOUT: %Self: %Generic.type.91ccba.1 = bind_symbolic_name Self, 1 [symbolic]
|
|
|
+// CHECK:STDOUT: %F.type.f43: type = fn_type @F.1, @Generic(%Scalar) [symbolic]
|
|
|
+// CHECK:STDOUT: %F.8a2: %F.type.f43 = struct_value () [symbolic]
|
|
|
+// CHECK:STDOUT: %Generic.assoc_type.de9: type = assoc_entity_type %Generic.type.91ccba.1 [symbolic]
|
|
|
+// CHECK:STDOUT: %assoc0.29c: %Generic.assoc_type.de9 = assoc_entity element0, @Generic.%F.decl [symbolic]
|
|
|
+// CHECK:STDOUT: %GenericParam: type = class_type @GenericParam [template]
|
|
|
+// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
|
|
|
+// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
|
|
|
+// CHECK:STDOUT: %ImplsGeneric: type = class_type @ImplsGeneric [template]
|
|
|
+// CHECK:STDOUT: %Generic.type.769: type = facet_type <@Generic, @Generic(%GenericParam)> [template]
|
|
|
+// CHECK:STDOUT: %F.type.4cf: type = fn_type @F.1, @Generic(%GenericParam) [template]
|
|
|
+// CHECK:STDOUT: %F.118: %F.type.4cf = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %Generic.assoc_type.9f1: type = assoc_entity_type %Generic.type.769 [template]
|
|
|
+// CHECK:STDOUT: %assoc0.9b7: %Generic.assoc_type.9f1 = assoc_entity element0, @Generic.%F.decl [template]
|
|
|
+// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (@impl.%F.decl) [template]
|
|
|
+// CHECK:STDOUT: %F.type.17b: type = fn_type @F.2 [template]
|
|
|
+// CHECK:STDOUT: %F.a56: %F.type.17b = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value %ImplsGeneric, %impl_witness [template]
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %Generic.type.91ccba.2: type = facet_type <@Generic, @Generic(%T)> [symbolic]
|
|
|
+// CHECK:STDOUT: %U: %Generic.type.91ccba.2 = bind_symbolic_name U, 1 [symbolic]
|
|
|
+// CHECK:STDOUT: %U.patt: %Generic.type.91ccba.2 = symbolic_binding_pattern U, 1 [symbolic]
|
|
|
+// CHECK:STDOUT: %CallGenericMethod.type: type = fn_type @CallGenericMethod [template]
|
|
|
+// CHECK:STDOUT: %CallGenericMethod: %CallGenericMethod.type = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
|
|
|
+// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
|
|
+// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %GenericParam.val: %GenericParam = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %CallGenericMethod.specific_fn: <specific function> = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet) [template]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: imports {
|
|
|
+// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
|
|
|
+// CHECK:STDOUT: import Core//default
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: file {
|
|
|
+// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
+// CHECK:STDOUT: .Core = imports.%Core
|
|
|
+// CHECK:STDOUT: .Generic = %Generic.decl
|
|
|
+// CHECK:STDOUT: .GenericParam = %GenericParam.decl
|
|
|
+// CHECK:STDOUT: .ImplsGeneric = %ImplsGeneric.decl
|
|
|
+// CHECK:STDOUT: .CallGenericMethod = %CallGenericMethod.decl
|
|
|
+// CHECK:STDOUT: .G = %G.decl
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %Core.import = import Core
|
|
|
+// CHECK:STDOUT: %Generic.decl: %Generic.type.c21 = interface_decl @Generic [template = constants.%Generic.generic] {
|
|
|
+// CHECK:STDOUT: %Scalar.patt.loc6_19.1: type = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc6_19.2 (constants.%Scalar.patt)]
|
|
|
+// CHECK:STDOUT: %Scalar.param_patt: type = value_param_pattern %Scalar.patt.loc6_19.1, runtime_param<none> [symbolic = %Scalar.patt.loc6_19.2 (constants.%Scalar.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %Scalar.param: type = value_param runtime_param<none>
|
|
|
+// CHECK:STDOUT: %Scalar.loc6_19.1: type = bind_symbolic_name Scalar, 0, %Scalar.param [symbolic = %Scalar.loc6_19.2 (constants.%Scalar)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %GenericParam.decl: type = class_decl @GenericParam [template = constants.%GenericParam] {} {}
|
|
|
+// CHECK:STDOUT: %ImplsGeneric.decl: type = class_decl @ImplsGeneric [template = constants.%ImplsGeneric] {} {}
|
|
|
+// CHECK:STDOUT: impl_decl @impl [template] {} {
|
|
|
+// CHECK:STDOUT: %ImplsGeneric.ref: type = name_ref ImplsGeneric, file.%ImplsGeneric.decl [template = constants.%ImplsGeneric]
|
|
|
+// CHECK:STDOUT: %Generic.ref: %Generic.type.c21 = name_ref Generic, file.%Generic.decl [template = constants.%Generic.generic]
|
|
|
+// CHECK:STDOUT: %GenericParam.ref: type = name_ref GenericParam, file.%GenericParam.decl [template = constants.%GenericParam]
|
|
|
+// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%GenericParam)> [template = constants.%Generic.type.769]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (@impl.%F.decl) [template = constants.%impl_witness]
|
|
|
+// CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [template = constants.%CallGenericMethod] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_22.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_22.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc17_22.1, runtime_param<none> [symbolic = %T.patt.loc17_22.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %U.patt.loc17_32.1: @CallGenericMethod.%Generic.type.loc17_45.2 (%Generic.type.91ccba.2) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc17_32.2 (constants.%U.patt)]
|
|
|
+// CHECK:STDOUT: %U.param_patt: @CallGenericMethod.%Generic.type.loc17_45.2 (%Generic.type.91ccba.2) = value_param_pattern %U.patt.loc17_32.1, runtime_param<none> [symbolic = %U.patt.loc17_32.2 (constants.%U.patt)]
|
|
|
+// CHECK:STDOUT: %t.patt: @CallGenericMethod.%T.loc17_22.2 (%T) = binding_pattern t
|
|
|
+// CHECK:STDOUT: %t.param_patt: @CallGenericMethod.%T.loc17_22.2 (%T) = value_param_pattern %t.patt, runtime_param0
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<none>
|
|
|
+// CHECK:STDOUT: %T.loc17_22.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc17_22.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %U.param: @CallGenericMethod.%Generic.type.loc17_45.2 (%Generic.type.91ccba.2) = value_param runtime_param<none>
|
|
|
+// CHECK:STDOUT: %.loc17: type = splice_block %Generic.type.loc17_45.1 [symbolic = %Generic.type.loc17_45.2 (constants.%Generic.type.91ccba.2)] {
|
|
|
+// CHECK:STDOUT: %Generic.ref: %Generic.type.c21 = name_ref Generic, file.%Generic.decl [template = constants.%Generic.generic]
|
|
|
+// CHECK:STDOUT: %T.ref.loc17_44: type = name_ref T, %T.loc17_22.1 [symbolic = %T.loc17_22.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %Generic.type.loc17_45.1: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc17_45.2 (constants.%Generic.type.91ccba.2)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %U.loc17_32.1: @CallGenericMethod.%Generic.type.loc17_45.2 (%Generic.type.91ccba.2) = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc17_32.2 (constants.%U)]
|
|
|
+// CHECK:STDOUT: %t.param: @CallGenericMethod.%T.loc17_22.2 (%T) = value_param runtime_param0
|
|
|
+// CHECK:STDOUT: %T.ref.loc17_51: type = name_ref T, %T.loc17_22.1 [symbolic = %T.loc17_22.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %t: @CallGenericMethod.%T.loc17_22.2 (%T) = bind_name t, %t.param
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {}
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic interface @Generic(%Scalar.loc6_19.1: type) {
|
|
|
+// CHECK:STDOUT: %Scalar.loc6_19.2: type = bind_symbolic_name Scalar, 0 [symbolic = %Scalar.loc6_19.2 (constants.%Scalar)]
|
|
|
+// CHECK:STDOUT: %Scalar.patt.loc6_19.2: type = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc6_19.2 (constants.%Scalar.patt)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc6_19.2)> [symbolic = %Generic.type (constants.%Generic.type.91ccba.1)]
|
|
|
+// CHECK:STDOUT: %Self.2: %Generic.type.91ccba.1 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
|
|
|
+// CHECK:STDOUT: %F.type: type = fn_type @F.1, @Generic(%Scalar.loc6_19.2) [symbolic = %F.type (constants.%F.type.f43)]
|
|
|
+// CHECK:STDOUT: %F: @Generic.%F.type (%F.type.f43) = struct_value () [symbolic = %F (constants.%F.8a2)]
|
|
|
+// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic.%Generic.type (%Generic.type.91ccba.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.de9)]
|
|
|
+// CHECK:STDOUT: %assoc0.loc7_9.2: @Generic.%Generic.assoc_type (%Generic.assoc_type.de9) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc7_9.2 (constants.%assoc0.29c)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: interface {
|
|
|
+// CHECK:STDOUT: %Self.1: @Generic.%Generic.type (%Generic.type.91ccba.1) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
|
|
|
+// CHECK:STDOUT: %F.decl: @Generic.%F.type (%F.type.f43) = fn_decl @F.1 [symbolic = @Generic.%F (constants.%F.8a2)] {} {}
|
|
|
+// CHECK:STDOUT: %assoc0.loc7_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.de9) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc7_9.2 (constants.%assoc0.29c)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
+// CHECK:STDOUT: .Self = %Self.1
|
|
|
+// CHECK:STDOUT: .F = %assoc0.loc7_9.1
|
|
|
+// CHECK:STDOUT: witness = (%F.decl)
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: impl @impl: %ImplsGeneric.ref as %Generic.type {
|
|
|
+// CHECK:STDOUT: %F.decl: %F.type.17b = fn_decl @F.2 [template = constants.%F.a56] {} {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
+// CHECK:STDOUT: .F = %F.decl
|
|
|
+// CHECK:STDOUT: witness = file.%impl_witness
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: class @GenericParam {
|
|
|
+// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
|
|
|
+// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
+// CHECK:STDOUT: .Self = constants.%GenericParam
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: class @ImplsGeneric {
|
|
|
+// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
|
|
|
+// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
+// CHECK:STDOUT: .Self = constants.%ImplsGeneric
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic fn @F.1(@Generic.%Scalar.loc6_19.1: type, @Generic.%Self.1: @Generic.%Generic.type (%Generic.type.91ccba.1)) {
|
|
|
+// CHECK:STDOUT: fn();
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: fn @F.2() {
|
|
|
+// CHECK:STDOUT: !entry:
|
|
|
+// CHECK:STDOUT: return
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc17_22.1: type, %U.loc17_32.1: @CallGenericMethod.%Generic.type.loc17_45.2 (%Generic.type.91ccba.2)) {
|
|
|
+// CHECK:STDOUT: %T.loc17_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc17_22.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_22.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_22.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %Generic.type.loc17_45.2: type = facet_type <@Generic, @Generic(%T.loc17_22.2)> [symbolic = %Generic.type.loc17_45.2 (constants.%Generic.type.91ccba.2)]
|
|
|
+// CHECK:STDOUT: %U.loc17_32.2: %Generic.type.91ccba.2 = bind_symbolic_name U, 1 [symbolic = %U.loc17_32.2 (constants.%U)]
|
|
|
+// CHECK:STDOUT: %U.patt.loc17_32.2: %Generic.type.91ccba.2 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc17_32.2 (constants.%U.patt)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT: %require_complete: <witness> = require_complete_type @CallGenericMethod.%T.loc17_22.2 (%T) [symbolic = %require_complete (constants.%require_complete)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: fn[%T.param_patt: type](%U.param_patt: @CallGenericMethod.%Generic.type.loc17_45.2 (%Generic.type.91ccba.2), %t.param_patt: @CallGenericMethod.%T.loc17_22.2 (%T)) {
|
|
|
+// CHECK:STDOUT: !entry:
|
|
|
+// CHECK:STDOUT: return
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: fn @G() {
|
|
|
+// CHECK:STDOUT: !entry:
|
|
|
+// CHECK:STDOUT: %CallGenericMethod.ref: %CallGenericMethod.type = name_ref CallGenericMethod, file.%CallGenericMethod.decl [template = constants.%CallGenericMethod]
|
|
|
+// CHECK:STDOUT: %ImplsGeneric.ref: type = name_ref ImplsGeneric, file.%ImplsGeneric.decl [template = constants.%ImplsGeneric]
|
|
|
+// CHECK:STDOUT: %.loc20_36.1: %empty_struct_type = struct_literal ()
|
|
|
+// CHECK:STDOUT: %GenericParam.ref: type = name_ref GenericParam, file.%GenericParam.decl [template = constants.%GenericParam]
|
|
|
+// CHECK:STDOUT: %.loc20_36.2: ref %GenericParam = temporary_storage
|
|
|
+// CHECK:STDOUT: %.loc20_36.3: init %GenericParam = class_init (), %.loc20_36.2 [template = constants.%GenericParam.val]
|
|
|
+// CHECK:STDOUT: %.loc20_36.4: ref %GenericParam = temporary %.loc20_36.2, %.loc20_36.3
|
|
|
+// CHECK:STDOUT: %.loc20_38.1: ref %GenericParam = converted %.loc20_36.1, %.loc20_36.4
|
|
|
+// CHECK:STDOUT: %Generic.facet: %Generic.type.769 = facet_value constants.%ImplsGeneric, constants.%impl_witness [template = constants.%Generic.facet]
|
|
|
+// CHECK:STDOUT: %.loc20_53: %Generic.type.769 = converted constants.%ImplsGeneric, %Generic.facet [template = constants.%Generic.facet]
|
|
|
+// CHECK:STDOUT: %CallGenericMethod.specific_fn: <specific function> = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%GenericParam, %.loc20_53) [template = constants.%CallGenericMethod.specific_fn]
|
|
|
+// CHECK:STDOUT: %.loc20_38.2: %GenericParam = bind_value %.loc20_38.1
|
|
|
+// CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn(%.loc20_38.2)
|
|
|
+// CHECK:STDOUT: return
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @Generic(constants.%Scalar) {
|
|
|
+// CHECK:STDOUT: %Scalar.loc6_19.2 => constants.%Scalar
|
|
|
+// CHECK:STDOUT: %Scalar.patt.loc6_19.2 => constants.%Scalar
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @Generic(%Scalar.loc6_19.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @Generic(constants.%GenericParam) {
|
|
|
+// CHECK:STDOUT: %Scalar.loc6_19.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %Scalar.patt.loc6_19.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT: %Generic.type => constants.%Generic.type.769
|
|
|
+// CHECK:STDOUT: %Self.2 => constants.%Self
|
|
|
+// CHECK:STDOUT: %F.type => constants.%F.type.4cf
|
|
|
+// CHECK:STDOUT: %F => constants.%F.118
|
|
|
+// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.9f1
|
|
|
+// CHECK:STDOUT: %assoc0.loc7_9.2 => constants.%assoc0.9b7
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @F.1(constants.%GenericParam, constants.%Generic.facet) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @Generic(constants.%T) {
|
|
|
+// CHECK:STDOUT: %Scalar.loc6_19.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %Scalar.patt.loc6_19.2 => constants.%T
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U) {
|
|
|
+// CHECK:STDOUT: %T.loc17_22.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_22.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %Generic.type.loc17_45.2 => constants.%Generic.type.91ccba.2
|
|
|
+// CHECK:STDOUT: %U.loc17_32.2 => constants.%U
|
|
|
+// CHECK:STDOUT: %U.patt.loc17_32.2 => constants.%U
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc17_22.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, @G.%.loc20_53) {
|
|
|
+// CHECK:STDOUT: %T.loc17_22.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_22.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %Generic.type.loc17_45.2 => constants.%Generic.type.769
|
|
|
+// CHECK:STDOUT: %U.loc17_32.2 => constants.%Generic.facet
|
|
|
+// CHECK:STDOUT: %U.patt.loc17_32.2 => constants.%Generic.facet
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT: %require_complete => constants.%complete_type
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) {
|
|
|
+// CHECK:STDOUT: %T.loc17_22.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_22.2 => constants.%GenericParam
|
|
|
+// CHECK:STDOUT: %Generic.type.loc17_45.2 => constants.%Generic.type.769
|
|
|
+// CHECK:STDOUT: %U.loc17_32.2 => constants.%Generic.facet
|
|
|
+// CHECK:STDOUT: %U.patt.loc17_32.2 => constants.%Generic.facet
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|