mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Use the correct type for Self in generic classes and generic interfaces (#4087)
In a `class C(T:! type)`, the type `Self` should be `C(T)`, not merely `C`. Similarly, in an `interface I(T:! type)`, the type of self should be `I(T)`, not merely `I`.
This commit is contained in:
+12
-10
@@ -45,17 +45,19 @@ interface DifferentParams(T:! ()) {}
|
||||
// CHECK:STDOUT: %.type.1: type = generic_interface_type @.1 [template]
|
||||
// CHECK:STDOUT: %.2: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %.3: %.type.1 = struct_value () [template]
|
||||
// CHECK:STDOUT: %Self.1: %.3 = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %.4: type = interface_type @.1, (%T.1) [symbolic]
|
||||
// CHECK:STDOUT: %Self.1: %.4 = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %Generic.type: type = generic_interface_type @Generic [template]
|
||||
// CHECK:STDOUT: %Generic: %Generic.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.4: type = interface_type @.2 [template]
|
||||
// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self 0 [symbolic]
|
||||
// CHECK:STDOUT: %.5: type = interface_type @.2 [template]
|
||||
// CHECK:STDOUT: %Self.2: %.5 = bind_symbolic_name Self 0 [symbolic]
|
||||
// CHECK:STDOUT: %DifferentParams.type: type = generic_interface_type @DifferentParams [template]
|
||||
// CHECK:STDOUT: %DifferentParams: %DifferentParams.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %T.2: %.2 = bind_symbolic_name T 0 [symbolic]
|
||||
// CHECK:STDOUT: %.type.2: type = generic_interface_type @.3 [template]
|
||||
// CHECK:STDOUT: %.5: %.type.2 = struct_value () [template]
|
||||
// CHECK:STDOUT: %Self.3: %.5 = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %.6: %.type.2 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.7: type = interface_type @.3, (%T.2) [symbolic]
|
||||
// CHECK:STDOUT: %Self.3: %.7 = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -73,12 +75,12 @@ interface DifferentParams(T:! ()) {}
|
||||
// CHECK:STDOUT: %T.loc21_19.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc21_19.2: type = bind_symbolic_name T 0, %T.loc21_19.1 [symbolic = constants.%T.1]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.decl.loc29: type = interface_decl @.2 [template = constants.%.4] {}
|
||||
// CHECK:STDOUT: %.decl.loc29: type = interface_decl @.2 [template = constants.%.5] {}
|
||||
// CHECK:STDOUT: %DifferentParams.decl: %DifferentParams.type = interface_decl @DifferentParams [template = constants.%DifferentParams] {
|
||||
// CHECK:STDOUT: %T.loc31_27.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc31_27.2: type = bind_symbolic_name T 0, %T.loc31_27.1 [symbolic = constants.%T.1]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.decl.loc38: %.type.2 = interface_decl @.3 [template = constants.%.5] {
|
||||
// CHECK:STDOUT: %.decl.loc38: %.type.2 = interface_decl @.3 [template = constants.%.6] {
|
||||
// CHECK:STDOUT: %.loc38_32.1: %.2 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc38_32.2: type = converted %.loc38_32.1, constants.%.2 [template = constants.%.2]
|
||||
// CHECK:STDOUT: %T.loc38_27.1: %.2 = param T
|
||||
@@ -90,7 +92,7 @@ interface DifferentParams(T:! ()) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @.1
|
||||
// CHECK:STDOUT: generic [file.%T.loc19_22.2: type] {
|
||||
// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self 1 [symbolic = constants.%Self.1]
|
||||
// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self 1 [symbolic = constants.%Self.1]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
@@ -101,7 +103,7 @@ interface DifferentParams(T:! ()) {}
|
||||
// CHECK:STDOUT: generic [file.%T.loc21_19.2: type];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @.2 {
|
||||
// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self 0 [symbolic = constants.%Self.2]
|
||||
// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self 0 [symbolic = constants.%Self.2]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
@@ -113,7 +115,7 @@ interface DifferentParams(T:! ()) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @.3
|
||||
// CHECK:STDOUT: generic [file.%T.loc38_27.2: %.2] {
|
||||
// CHECK:STDOUT: %Self: %.5 = bind_symbolic_name Self 1 [symbolic = constants.%Self.3]
|
||||
// CHECK:STDOUT: %Self: %.7 = bind_symbolic_name Self 1 [symbolic = constants.%Self.3]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
|
||||
+36
-44
@@ -9,33 +9,16 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon
|
||||
|
||||
interface I(T:! type) {
|
||||
// TODO: Declare `Self` as having type `I(T)` instead of `I`.
|
||||
// TODO: Use `default` here.
|
||||
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE+8]]:14: ERROR: Cannot implicitly convert from `<cannot stringify inst+7>` to `type`.
|
||||
// CHECK:STDERR: fn F[self: Self]() -> Self;
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE+4]]:25: ERROR: Cannot implicitly convert from `<cannot stringify inst+7>` to `type`.
|
||||
// CHECK:STDERR: fn F[self: Self]() -> Self;
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR:
|
||||
fn F[self: Self]() -> Self;
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE+14]]:1: ERROR: Duplicate name being declared in the same scope.
|
||||
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE+6]]:1: ERROR: Duplicate name being declared in the same scope.
|
||||
// CHECK:STDERR: fn I(T:! type).F[self: Self]() -> Self { return self; }
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE-6]]:3: Name is previously declared here.
|
||||
// CHECK:STDERR: fn F[self: Self]() -> Self;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE+7]]:24: ERROR: Cannot implicitly convert from `<cannot stringify inst+7>` to `type`.
|
||||
// CHECK:STDERR: fn I(T:! type).F[self: Self]() -> Self { return self; }
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE+3]]:35: ERROR: Cannot implicitly convert from `<cannot stringify inst+7>` to `type`.
|
||||
// CHECK:STDERR: fn I(T:! type).F[self: Self]() -> Self { return self; }
|
||||
// CHECK:STDERR: ^~~~
|
||||
fn I(T:! type).F[self: Self]() -> Self { return self; }
|
||||
|
||||
// CHECK:STDOUT: --- fail_todo_generic_default_fn.carbon
|
||||
@@ -45,13 +28,14 @@ fn I(T:! type).F[self: Self]() -> Self { return self; }
|
||||
// CHECK:STDOUT: %I.type: type = generic_interface_type @I [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %I: %I.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Self: %I = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = interface_type @I, (%T) [symbolic]
|
||||
// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = assoc_entity_type @I, %F.type [template]
|
||||
// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template]
|
||||
// CHECK:STDOUT: %.3: type = assoc_entity_type @I, %F.type [template]
|
||||
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template]
|
||||
// CHECK:STDOUT: %.type: type = fn_type @.1 [template]
|
||||
// CHECK:STDOUT: %.4: %.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.5: %.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -62,42 +46,50 @@ fn I(T:! type).F[self: Self]() -> Self { return self; }
|
||||
// CHECK:STDOUT: %T.loc11_13.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T 0, %T.loc11_13.1 [symbolic = constants.%T]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {
|
||||
// CHECK:STDOUT: %T.loc39_6.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc39_6.2: type = bind_symbolic_name T 0, %T.loc39_6.1 [symbolic = constants.%T]
|
||||
// CHECK:STDOUT: %Self.ref.loc39_24: %I = name_ref Self, @I.%Self [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %self.loc39_18.1: <error> = param self
|
||||
// CHECK:STDOUT: @.1.%self: <error> = bind_name self, %self.loc39_18.1
|
||||
// CHECK:STDOUT: %Self.ref.loc39_35: %I = name_ref Self, @I.%Self [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: @.1.%return: ref <error> = var <return slot>
|
||||
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.5] {
|
||||
// CHECK:STDOUT: %T.loc22_6.1: type = param T
|
||||
// CHECK:STDOUT: %T.loc22_6.2: type = bind_symbolic_name T 0, %T.loc22_6.1 [symbolic = constants.%T]
|
||||
// CHECK:STDOUT: %Self.ref.loc22_24: %.2 = name_ref Self, @I.%Self [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %.loc22_24.1: type = facet_type_access %Self.ref.loc22_24 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %.loc22_24.2: type = converted %Self.ref.loc22_24, %.loc22_24.1 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %self.loc22_18.1: %Self = param self
|
||||
// CHECK:STDOUT: @.1.%self: %Self = bind_name self, %self.loc22_18.1
|
||||
// CHECK:STDOUT: %Self.ref.loc22_35: %.2 = name_ref Self, @I.%Self [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %.loc22_35.1: type = facet_type_access %Self.ref.loc22_35 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %.loc22_35.2: type = converted %Self.ref.loc22_35, %.loc22_35.1 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: @.1.%return: ref %Self = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @I
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type] {
|
||||
// CHECK:STDOUT: %Self: %I = bind_symbolic_name Self 1 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 1 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %Self.ref.loc22_14: %I = name_ref Self, %Self [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %self.loc22_8.1: <error> = param self
|
||||
// CHECK:STDOUT: %self.loc22_8.2: <error> = bind_name self, %self.loc22_8.1
|
||||
// CHECK:STDOUT: %Self.ref.loc22_25: %I = name_ref Self, %Self [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %return.var: ref <error> = var <return slot>
|
||||
// CHECK:STDOUT: %Self.ref.loc13_14: %.2 = name_ref Self, %Self [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %.loc13_14.1: type = facet_type_access %Self.ref.loc13_14 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %.loc13_14.2: type = converted %Self.ref.loc13_14, %.loc13_14.1 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %self.loc13_8.1: %Self = param self
|
||||
// CHECK:STDOUT: %self.loc13_8.2: %Self = bind_name self, %self.loc13_8.1
|
||||
// CHECK:STDOUT: %Self.ref.loc13_25: %.2 = name_ref Self, %Self [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %.loc13_25.1: type = facet_type_access %Self.ref.loc13_25 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %.loc13_25.2: type = converted %Self.ref.loc13_25, %.loc13_25.1 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %return.var: ref %Self = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc22: %.2 = assoc_entity element0, %F.decl [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc13_29: %.3 = assoc_entity element0, %F.decl [template = constants.%.4]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
// CHECK:STDOUT: .F = %.loc22
|
||||
// CHECK:STDOUT: .F = %.loc13_29
|
||||
// CHECK:STDOUT: witness = (%F.decl)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F[@I.%self.loc22_8.2: <error>]() -> <error>
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type, @I.%Self: %I];
|
||||
// CHECK:STDOUT: fn @F[@I.%self.loc13_8.2: %Self]() -> %Self
|
||||
// CHECK:STDOUT: generic [file.%T.loc11_13.2: type, @I.%Self: %.2];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @.1[%self: <error>]() -> <error>
|
||||
// CHECK:STDOUT: generic [file.%T.loc39_6.2: type] {
|
||||
// CHECK:STDOUT: fn @.1[%self: %Self]() -> %Self
|
||||
// CHECK:STDOUT: generic [file.%T.loc22_6.2: type] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref: <error> = name_ref self, %self
|
||||
// CHECK:STDOUT: return <error>
|
||||
// CHECK:STDOUT: %self.ref: %Self = name_ref self, %self
|
||||
// CHECK:STDOUT: return %self.ref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+66
-63
@@ -65,29 +65,31 @@ fn G(T:! Generic(B)) {
|
||||
// CHECK:STDOUT: %Simple.type: type = generic_interface_type @Simple [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Simple: %Simple.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Self.1: %Simple = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = interface_type @Simple, (%T.1) [symbolic]
|
||||
// CHECK:STDOUT: %Self.1: %.2 = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %X: type = class_type @X [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.3: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %WithAssocFn.type: type = generic_interface_type @WithAssocFn [template]
|
||||
// CHECK:STDOUT: %WithAssocFn: %WithAssocFn.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Self.2: %WithAssocFn = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %.4: type = interface_type @WithAssocFn, (%T.1) [symbolic]
|
||||
// CHECK:STDOUT: %Self.2: %.4 = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template]
|
||||
// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: type = assoc_entity_type @WithAssocFn, %F.type.1 [template]
|
||||
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @WithAssocFn.%F.decl [template]
|
||||
// CHECK:STDOUT: %.5: type = assoc_entity_type @WithAssocFn, %F.type.1 [template]
|
||||
// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @WithAssocFn.%F.decl [template]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [template]
|
||||
// CHECK:STDOUT: %.5: type = interface_type @Simple, (%C) [template]
|
||||
// CHECK:STDOUT: %.6: <witness> = interface_witness () [template]
|
||||
// CHECK:STDOUT: %.7: type = interface_type @WithAssocFn, (%C) [template]
|
||||
// CHECK:STDOUT: %.7: type = interface_type @Simple, (%C) [template]
|
||||
// CHECK:STDOUT: %.8: <witness> = interface_witness () [template]
|
||||
// CHECK:STDOUT: %.9: type = interface_type @WithAssocFn, (%C) [template]
|
||||
// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template]
|
||||
// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.8: <witness> = interface_witness (%F.2) [template]
|
||||
// CHECK:STDOUT: %.9: type = ptr_type %.2 [template]
|
||||
// CHECK:STDOUT: %.10: <witness> = interface_witness (%F.2) [template]
|
||||
// CHECK:STDOUT: %.11: type = ptr_type %.3 [template]
|
||||
// CHECK:STDOUT: %struct: %X = struct_value () [template]
|
||||
// CHECK:STDOUT: %N: %T.1 = bind_symbolic_name N 1 [symbolic]
|
||||
// CHECK:STDOUT: %WithImplicitArgs.type: type = generic_interface_type @WithImplicitArgs [template]
|
||||
// CHECK:STDOUT: %WithImplicitArgs: %WithImplicitArgs.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %T.2: %.5 = bind_symbolic_name T 0 [symbolic]
|
||||
// CHECK:STDOUT: %T.2: %.7 = bind_symbolic_name T 0 [symbolic]
|
||||
// CHECK:STDOUT: %Receive.type: type = fn_type @Receive [template]
|
||||
// CHECK:STDOUT: %Receive: %Receive.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Pass.type: type = fn_type @Pass [template]
|
||||
@@ -124,26 +126,26 @@ fn G(T:! Generic(B)) {
|
||||
// CHECK:STDOUT: %Receive.decl: %Receive.type = fn_decl @Receive [template = constants.%Receive] {
|
||||
// CHECK:STDOUT: %Simple.ref.loc24: %Simple.type = name_ref Simple, %Simple.decl [template = constants.%Simple]
|
||||
// CHECK:STDOUT: %C.ref.loc24: type = name_ref C, %C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %.loc24_22: init type = call %Simple.ref.loc24(%C.ref.loc24) [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc24_24.1: type = value_of_initializer %.loc24_22 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc24_24.2: type = converted %.loc24_22, %.loc24_24.1 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %T.loc24_12.1: %.5 = param T
|
||||
// CHECK:STDOUT: @Receive.%T: %.5 = bind_symbolic_name T 0, %T.loc24_12.1 [symbolic = constants.%T.2]
|
||||
// CHECK:STDOUT: %.loc24_22: init type = call %Simple.ref.loc24(%C.ref.loc24) [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc24_24.1: type = value_of_initializer %.loc24_22 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc24_24.2: type = converted %.loc24_22, %.loc24_24.1 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %T.loc24_12.1: %.7 = param T
|
||||
// CHECK:STDOUT: @Receive.%T: %.7 = bind_symbolic_name T 0, %T.loc24_12.1 [symbolic = constants.%T.2]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Pass.decl: %Pass.type = fn_decl @Pass [template = constants.%Pass] {
|
||||
// CHECK:STDOUT: %Simple.ref.loc25: %Simple.type = name_ref Simple, %Simple.decl [template = constants.%Simple]
|
||||
// CHECK:STDOUT: %C.ref.loc25: type = name_ref C, %C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %.loc25_19: init type = call %Simple.ref.loc25(%C.ref.loc25) [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc25_21.1: type = value_of_initializer %.loc25_19 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc25_21.2: type = converted %.loc25_19, %.loc25_21.1 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %T.loc25_9.1: %.5 = param T
|
||||
// CHECK:STDOUT: @Pass.%T: %.5 = bind_symbolic_name T 0, %T.loc25_9.1 [symbolic = constants.%T.2]
|
||||
// CHECK:STDOUT: %.loc25_19: init type = call %Simple.ref.loc25(%C.ref.loc25) [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc25_21.1: type = value_of_initializer %.loc25_19 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc25_21.2: type = converted %.loc25_19, %.loc25_21.1 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %T.loc25_9.1: %.7 = param T
|
||||
// CHECK:STDOUT: @Pass.%T: %.7 = bind_symbolic_name T 0, %T.loc25_9.1 [symbolic = constants.%T.2]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @Simple
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_18.2: type] {
|
||||
// CHECK:STDOUT: %Self: %Simple = bind_symbolic_name Self 1 [symbolic = constants.%Self.1]
|
||||
// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 1 [symbolic = constants.%Self.1]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
@@ -152,12 +154,12 @@ fn G(T:! Generic(B)) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @WithAssocFn
|
||||
// CHECK:STDOUT: generic [file.%T.loc8_23.2: type] {
|
||||
// CHECK:STDOUT: %Self: %WithAssocFn = bind_symbolic_name Self 1 [symbolic = constants.%Self.2]
|
||||
// CHECK:STDOUT: %Self: %.4 = bind_symbolic_name Self 1 [symbolic = constants.%Self.2]
|
||||
// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {
|
||||
// CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X]
|
||||
// CHECK:STDOUT: %return.var: ref %X = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc10: %.3 = assoc_entity element0, %F.decl [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc10: %.5 = assoc_entity element0, %F.decl [template = constants.%.6]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
@@ -168,19 +170,19 @@ fn G(T:! Generic(B)) {
|
||||
// CHECK:STDOUT: interface @WithImplicitArgs
|
||||
// CHECK:STDOUT: generic [file.%T.loc22_28.2: type, file.%N.loc22_38.2: %T.1];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl.1: %C as %.5 {
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness () [template = constants.%.6]
|
||||
// CHECK:STDOUT: impl @impl.1: %C as %.7 {
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness () [template = constants.%.8]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: witness = %.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl.2: %C as %.7 {
|
||||
// CHECK:STDOUT: impl @impl.2: %C as %.9 {
|
||||
// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {
|
||||
// CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X]
|
||||
// CHECK:STDOUT: %return.var: ref %X = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness (%F.decl) [template = constants.%.8]
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness (%F.decl) [template = constants.%.10]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
@@ -193,19 +195,19 @@ fn G(T:! Generic(B)) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C {
|
||||
// CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %.loc14_17 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc14_19.2: type = converted %.loc14_17, %.loc14_19.1 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %.loc14_17 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc14_19.2: type = converted %.loc14_17, %.loc14_19.1 [template = constants.%.7]
|
||||
// CHECK:STDOUT: impl_decl @impl.1 {
|
||||
// CHECK:STDOUT: %Simple.ref: %Simple.type = name_ref Simple, file.%Simple.decl [template = constants.%Simple]
|
||||
// CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %.loc14_17: init type = call %Simple.ref(%C.ref.loc14) [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc14_17: init type = call %Simple.ref(%C.ref.loc14) [template = constants.%.7]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc15_24.1: type = value_of_initializer %.loc15_22 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc15_24.2: type = converted %.loc15_22, %.loc15_24.1 [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc15_24.1: type = value_of_initializer %.loc15_22 [template = constants.%.9]
|
||||
// CHECK:STDOUT: %.loc15_24.2: type = converted %.loc15_22, %.loc15_24.1 [template = constants.%.9]
|
||||
// CHECK:STDOUT: impl_decl @impl.2 {
|
||||
// CHECK:STDOUT: %WithAssocFn.ref: %WithAssocFn.type = name_ref WithAssocFn, file.%WithAssocFn.decl [template = constants.%WithAssocFn]
|
||||
// CHECK:STDOUT: %C.ref.loc15: type = name_ref C, file.%C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %.loc15_22: init type = call %WithAssocFn.ref(%C.ref.loc15) [template = constants.%.7]
|
||||
// CHECK:STDOUT: %.loc15_22: init type = call %WithAssocFn.ref(%C.ref.loc15) [template = constants.%.9]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -213,24 +215,24 @@ fn G(T:! Generic(B)) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F.1() -> %X
|
||||
// CHECK:STDOUT: generic [file.%T.loc8_23.2: type, @WithAssocFn.%Self: %WithAssocFn];
|
||||
// CHECK:STDOUT: generic [file.%T.loc8_23.2: type, @WithAssocFn.%Self: %.4];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F.2() -> @impl.2.%return.var: %X {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc17_15.1: %.2 = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc17_15.1: %.3 = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc17_15.2: init %X = class_init (), @impl.2.%return.var [template = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc17_16: init %X = converted %.loc17_15.1, %.loc17_15.2 [template = constants.%struct]
|
||||
// CHECK:STDOUT: return %.loc17_16 to @impl.2.%return.var
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Receive(%T: %.5)
|
||||
// CHECK:STDOUT: generic [%T: %.5];
|
||||
// CHECK:STDOUT: fn @Receive(%T: %.7)
|
||||
// CHECK:STDOUT: generic [%T: %.7];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Pass(%T: %.5)
|
||||
// CHECK:STDOUT: generic [%T: %.5] {
|
||||
// CHECK:STDOUT: fn @Pass(%T: %.7)
|
||||
// CHECK:STDOUT: generic [%T: %.7] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Receive.ref: %Receive.type = name_ref Receive, file.%Receive.decl [template = constants.%Receive]
|
||||
// CHECK:STDOUT: %T.ref: %.5 = name_ref T, %T [symbolic = constants.%T.2]
|
||||
// CHECK:STDOUT: %T.ref: %.7 = name_ref T, %T [symbolic = constants.%T.2]
|
||||
// CHECK:STDOUT: %Receive.call: init %.1 = call %Receive.ref(%T.ref)
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
@@ -242,16 +244,17 @@ fn G(T:! Generic(B)) {
|
||||
// CHECK:STDOUT: %Generic.type: type = generic_interface_type @Generic [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Generic: %Generic.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Self: %Generic = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = interface_type @Generic, (%T.1) [symbolic]
|
||||
// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %A: type = class_type @A [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %.3: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %B: type = class_type @B [template]
|
||||
// CHECK:STDOUT: %.3: type = interface_type @Generic, (%A) [template]
|
||||
// CHECK:STDOUT: %T.2: %.3 = bind_symbolic_name T 0 [symbolic]
|
||||
// CHECK:STDOUT: %.4: type = interface_type @Generic, (%A) [template]
|
||||
// CHECK:STDOUT: %T.2: %.4 = bind_symbolic_name T 0 [symbolic]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.4: type = interface_type @Generic, (%B) [template]
|
||||
// CHECK:STDOUT: %T.3: %.4 = bind_symbolic_name T 0 [symbolic]
|
||||
// CHECK:STDOUT: %.5: type = interface_type @Generic, (%B) [template]
|
||||
// CHECK:STDOUT: %T.3: %.5 = bind_symbolic_name T 0 [symbolic]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -273,26 +276,26 @@ fn G(T:! Generic(B)) {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %Generic.ref.loc9: %Generic.type = name_ref Generic, %Generic.decl [template = constants.%Generic]
|
||||
// CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A]
|
||||
// CHECK:STDOUT: %.loc9_17: init type = call %Generic.ref.loc9(%A.ref) [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %.loc9_17 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc9_19.2: type = converted %.loc9_17, %.loc9_19.1 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %T.loc9_6.1: %.3 = param T
|
||||
// CHECK:STDOUT: @F.%T: %.3 = bind_symbolic_name T 0, %T.loc9_6.1 [symbolic = constants.%T.2]
|
||||
// CHECK:STDOUT: %.loc9_17: init type = call %Generic.ref.loc9(%A.ref) [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %.loc9_17 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc9_19.2: type = converted %.loc9_17, %.loc9_19.1 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %T.loc9_6.1: %.4 = param T
|
||||
// CHECK:STDOUT: @F.%T: %.4 = bind_symbolic_name T 0, %T.loc9_6.1 [symbolic = constants.%T.2]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %Generic.ref.loc10: %Generic.type = name_ref Generic, %Generic.decl [template = constants.%Generic]
|
||||
// CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [template = constants.%B]
|
||||
// CHECK:STDOUT: %.loc10_17: init type = call %Generic.ref.loc10(%B.ref) [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc10_19.1: type = value_of_initializer %.loc10_17 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc10_19.2: type = converted %.loc10_17, %.loc10_19.1 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %T.loc10_6.1: %.4 = param T
|
||||
// CHECK:STDOUT: @G.%T: %.4 = bind_symbolic_name T 0, %T.loc10_6.1 [symbolic = constants.%T.3]
|
||||
// CHECK:STDOUT: %.loc10_17: init type = call %Generic.ref.loc10(%B.ref) [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc10_19.1: type = value_of_initializer %.loc10_17 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %.loc10_19.2: type = converted %.loc10_17, %.loc10_19.1 [template = constants.%.5]
|
||||
// CHECK:STDOUT: %T.loc10_6.1: %.5 = param T
|
||||
// CHECK:STDOUT: @G.%T: %.5 = bind_symbolic_name T 0, %T.loc10_6.1 [symbolic = constants.%T.3]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @Generic
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_19.2: type] {
|
||||
// CHECK:STDOUT: %Self: %Generic = bind_symbolic_name Self 1 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 1 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
@@ -309,14 +312,14 @@ fn G(T:! Generic(B)) {
|
||||
// CHECK:STDOUT: .Self = constants.%B
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%T: %.3)
|
||||
// CHECK:STDOUT: generic [%T: %.3];
|
||||
// CHECK:STDOUT: fn @F(%T: %.4)
|
||||
// CHECK:STDOUT: generic [%T: %.4];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G(%T: %.4)
|
||||
// CHECK:STDOUT: generic [%T: %.4] {
|
||||
// CHECK:STDOUT: fn @G(%T: %.5)
|
||||
// CHECK:STDOUT: generic [%T: %.5] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
||||
// CHECK:STDOUT: %T.ref: %.4 = name_ref T, %T [symbolic = constants.%T.3]
|
||||
// CHECK:STDOUT: %T.ref: %.5 = name_ref T, %T [symbolic = constants.%T.3]
|
||||
// CHECK:STDOUT: %F.call: init %.1 = call %F.ref(<invalid>) [template = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -34,11 +34,12 @@ impl C as AddWith(C) {
|
||||
// CHECK:STDOUT: %AddWith.type: type = generic_interface_type @AddWith [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %AddWith: %AddWith.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Self: %AddWith = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %.2: type = interface_type @AddWith, (%T) [symbolic]
|
||||
// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = assoc_entity_type @AddWith, %F.type [template]
|
||||
// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @AddWith.%F.decl [template]
|
||||
// CHECK:STDOUT: %.3: type = assoc_entity_type @AddWith, %F.type [template]
|
||||
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @AddWith.%F.decl [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -53,9 +54,9 @@ impl C as AddWith(C) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @AddWith
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_19.2: type] {
|
||||
// CHECK:STDOUT: %Self: %AddWith = bind_symbolic_name Self 1 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 1 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %F.decl [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc5: %.3 = assoc_entity element0, %F.decl [template = constants.%.4]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
@@ -64,7 +65,7 @@ impl C as AddWith(C) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F()
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_19.2: type, @AddWith.%Self: %AddWith];
|
||||
// CHECK:STDOUT: generic [file.%T.loc4_19.2: type, @AddWith.%Self: %.2];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- b.carbon
|
||||
// CHECK:STDOUT:
|
||||
@@ -73,16 +74,16 @@ impl C as AddWith(C) {
|
||||
// CHECK:STDOUT: %.1: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %AddWith.type: type = generic_interface_type @AddWith [template]
|
||||
// CHECK:STDOUT: %.2: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %AddWith.1: %AddWith.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %AddWith.2: %AddWith.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Self: %AddWith.2 = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %AddWith: %AddWith.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0, <unexpected instref inst+13> [symbolic]
|
||||
// CHECK:STDOUT: %.3: type = interface_type @AddWith, (%C) [template]
|
||||
// CHECK:STDOUT: %.3: type = interface_type @AddWith, (%T) [symbolic]
|
||||
// CHECK:STDOUT: %Self: %.3 = bind_symbolic_name Self 1 [symbolic]
|
||||
// CHECK:STDOUT: %.4: type = interface_type @AddWith, (%C) [template]
|
||||
// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template]
|
||||
// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template]
|
||||
// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template]
|
||||
// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
|
||||
// CHECK:STDOUT: %.4: <witness> = interface_witness (%F.1) [template]
|
||||
// CHECK:STDOUT: %.5: <witness> = interface_witness (%F.1) [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -90,18 +91,18 @@ impl C as AddWith(C) {
|
||||
// CHECK:STDOUT: .AddWith = %import_ref.1
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.1: %AddWith.type = import_ref ir1, inst+4, loaded [template = constants.%AddWith.1]
|
||||
// CHECK:STDOUT: %import_ref.1: %AddWith.type = import_ref ir1, inst+4, loaded [template = constants.%AddWith]
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+8, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+14, unloaded
|
||||
// CHECK:STDOUT: %import_ref.4: %F.type.2 = import_ref ir1, inst+10, loaded [template = constants.%F.2]
|
||||
// CHECK:STDOUT: %.loc7_20.1: type = value_of_initializer %.loc7_18 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc7_20.2: type = converted %.loc7_18, %.loc7_20.1 [template = constants.%.3]
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+9, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+15, unloaded
|
||||
// CHECK:STDOUT: %import_ref.4: %F.type.2 = import_ref ir1, inst+11, loaded [template = constants.%F.2]
|
||||
// CHECK:STDOUT: %.loc7_20.1: type = value_of_initializer %.loc7_18 [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.loc7_20.2: type = converted %.loc7_18, %.loc7_20.1 [template = constants.%.4]
|
||||
// CHECK:STDOUT: impl_decl @impl {
|
||||
// CHECK:STDOUT: %C.ref.loc7_6: type = name_ref C, %C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %AddWith.ref: %AddWith.type = name_ref AddWith, %import_ref.1 [template = constants.%AddWith.1]
|
||||
// CHECK:STDOUT: %AddWith.ref: %AddWith.type = name_ref AddWith, %import_ref.1 [template = constants.%AddWith]
|
||||
// CHECK:STDOUT: %C.ref.loc7_19: type = name_ref C, %C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: %.loc7_18: init type = call %AddWith.ref(%C.ref.loc7_19) [template = constants.%.3]
|
||||
// CHECK:STDOUT: %.loc7_18: init type = call %AddWith.ref(%C.ref.loc7_19) [template = constants.%.4]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -112,9 +113,9 @@ impl C as AddWith(C) {
|
||||
// CHECK:STDOUT: witness = (file.%import_ref.4)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl: %C as %.3 {
|
||||
// CHECK:STDOUT: impl @impl: %C as %.4 {
|
||||
// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {}
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness (%F.decl) [template = constants.%.4]
|
||||
// CHECK:STDOUT: %.1: <witness> = interface_witness (%F.decl) [template = constants.%.5]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
|
||||
Reference in New Issue
Block a user