redeclare.carbon 64 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
  6. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  7. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  8. //
  9. // AUTOUPDATE
  10. // TIP: To test this file alone, run:
  11. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/generic/redeclare.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/generic/redeclare.carbon
  14. // --- valid.carbon
  15. library "[[@TEST_NAME]]";
  16. class Generic(T:! type);
  17. class Generic(T:! type) {
  18. }
  19. // --- fail_mismatch_param_list.carbon
  20. library "[[@TEST_NAME]]";
  21. class A;
  22. // CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter list [RedeclParamListDiffers]
  23. // CHECK:STDERR: class A(T:! type) {}
  24. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
  25. // CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE-4]]:1: note: previously declared without parameter list [RedeclParamListPrevious]
  26. // CHECK:STDERR: class A;
  27. // CHECK:STDERR: ^~~~~~~~
  28. // CHECK:STDERR:
  29. class A(T:! type) {}
  30. // --- fail_mismatch_implicit_param_list.carbon
  31. library "[[@TEST_NAME]]";
  32. class A {}
  33. class B(N:! A);
  34. // CHECK:STDERR: fail_mismatch_implicit_param_list.carbon:[[@LINE+7]]:1: error: redeclaration differs because of implicit parameter list [RedeclParamListDiffers]
  35. // CHECK:STDERR: class B[T:! type](N:! T) {}
  36. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
  37. // CHECK:STDERR: fail_mismatch_implicit_param_list.carbon:[[@LINE-4]]:1: note: previously declared without implicit parameter list [RedeclParamListPrevious]
  38. // CHECK:STDERR: class B(N:! A);
  39. // CHECK:STDERR: ^~~~~~~~~~~~~~~
  40. // CHECK:STDERR:
  41. class B[T:! type](N:! T) {}
  42. // --- fail_mismatch_param_count.carbon
  43. library "[[@TEST_NAME]]";
  44. class A {}
  45. class C(T:! type);
  46. // CHECK:STDERR: fail_mismatch_param_count.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter count of 2 [RedeclParamCountDiffers]
  47. // CHECK:STDERR: class C(T:! type, U:! A) {}
  48. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
  49. // CHECK:STDERR: fail_mismatch_param_count.carbon:[[@LINE-4]]:1: note: previously declared with parameter count of 1 [RedeclParamCountPrevious]
  50. // CHECK:STDERR: class C(T:! type);
  51. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
  52. // CHECK:STDERR:
  53. class C(T:! type, U:! A) {}
  54. // --- fail_mismatch_param_type.carbon
  55. library "[[@TEST_NAME]]";
  56. class A {}
  57. class D(T:! type);
  58. // CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE+7]]:9: error: type `<pattern for A>` of parameter 1 in redeclaration differs from previous parameter type `<pattern for type>` [RedeclParamDiffersType]
  59. // CHECK:STDERR: class D(T:! A) {}
  60. // CHECK:STDERR: ^
  61. // CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE-4]]:9: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
  62. // CHECK:STDERR: class D(T:! type);
  63. // CHECK:STDERR: ^
  64. // CHECK:STDERR:
  65. class D(T:! A) {}
  66. // --- fail_mismatch_param_name.carbon
  67. library "[[@TEST_NAME]]";
  68. class E(T:! type);
  69. // CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE+7]]:9: error: redeclaration differs at parameter 1 [RedeclParamDiffers]
  70. // CHECK:STDERR: class E(U:! type) {}
  71. // CHECK:STDERR: ^
  72. // CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE-4]]:9: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
  73. // CHECK:STDERR: class E(T:! type);
  74. // CHECK:STDERR: ^
  75. // CHECK:STDERR:
  76. class E(U:! type) {}
  77. // CHECK:STDOUT: --- valid.carbon
  78. // CHECK:STDOUT:
  79. // CHECK:STDOUT: constants {
  80. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self]
  81. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  82. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  83. // CHECK:STDOUT: %Generic.type: type = generic_class_type @Generic [concrete]
  84. // CHECK:STDOUT: %Generic.generic: %Generic.type = struct_value () [concrete]
  85. // CHECK:STDOUT: %Generic: type = class_type @Generic, @Generic(%T) [symbolic]
  86. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  87. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  88. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @Generic.%Destroy.impl_witness_table, @Generic.as.Destroy.impl(%T) [symbolic]
  89. // CHECK:STDOUT: %ptr.881: type = ptr_type %Generic [symbolic]
  90. // CHECK:STDOUT: %pattern_type.b64: type = pattern_type %ptr.881 [symbolic]
  91. // CHECK:STDOUT: %Generic.as.Destroy.impl.Op.type: type = fn_type @Generic.as.Destroy.impl.Op, @Generic.as.Destroy.impl(%T) [symbolic]
  92. // CHECK:STDOUT: %Generic.as.Destroy.impl.Op: %Generic.as.Destroy.impl.Op.type = struct_value () [symbolic]
  93. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  94. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  95. // CHECK:STDOUT: }
  96. // CHECK:STDOUT:
  97. // CHECK:STDOUT: imports {
  98. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  99. // CHECK:STDOUT: .Destroy = %Core.Destroy
  100. // CHECK:STDOUT: import Core//prelude
  101. // CHECK:STDOUT: import Core//prelude/...
  102. // CHECK:STDOUT: }
  103. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  104. // CHECK:STDOUT: }
  105. // CHECK:STDOUT:
  106. // CHECK:STDOUT: file {
  107. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  108. // CHECK:STDOUT: .Core = imports.%Core
  109. // CHECK:STDOUT: .Generic = %Generic.decl.loc4
  110. // CHECK:STDOUT: }
  111. // CHECK:STDOUT: %Core.import = import Core
  112. // CHECK:STDOUT: %Generic.decl.loc4: %Generic.type = class_decl @Generic [concrete = constants.%Generic.generic] {
  113. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  114. // CHECK:STDOUT: } {
  115. // CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  116. // CHECK:STDOUT: %T.loc4_15.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T)]
  117. // CHECK:STDOUT: }
  118. // CHECK:STDOUT: %Generic.decl.loc6: %Generic.type = class_decl @Generic [concrete = constants.%Generic.generic] {
  119. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  120. // CHECK:STDOUT: } {
  121. // CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  122. // CHECK:STDOUT: %T.loc6: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T)]
  123. // CHECK:STDOUT: }
  124. // CHECK:STDOUT: }
  125. // CHECK:STDOUT:
  126. // CHECK:STDOUT: generic impl @Generic.as.Destroy.impl(@Generic.%T.loc6: type) {
  127. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  128. // CHECK:STDOUT: %Generic: type = class_type @Generic, @Generic(%T) [symbolic = %Generic (constants.%Generic)]
  129. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @Generic.%Destroy.impl_witness_table, @Generic.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness)]
  130. // CHECK:STDOUT:
  131. // CHECK:STDOUT: !definition:
  132. // CHECK:STDOUT: %Generic.as.Destroy.impl.Op.type: type = fn_type @Generic.as.Destroy.impl.Op, @Generic.as.Destroy.impl(%T) [symbolic = %Generic.as.Destroy.impl.Op.type (constants.%Generic.as.Destroy.impl.Op.type)]
  133. // CHECK:STDOUT: %Generic.as.Destroy.impl.Op: @Generic.as.Destroy.impl.%Generic.as.Destroy.impl.Op.type (%Generic.as.Destroy.impl.Op.type) = struct_value () [symbolic = %Generic.as.Destroy.impl.Op (constants.%Generic.as.Destroy.impl.Op)]
  134. // CHECK:STDOUT:
  135. // CHECK:STDOUT: impl: @Generic.%Self.ref as constants.%Destroy.type {
  136. // CHECK:STDOUT: %Generic.as.Destroy.impl.Op.decl: @Generic.as.Destroy.impl.%Generic.as.Destroy.impl.Op.type (%Generic.as.Destroy.impl.Op.type) = fn_decl @Generic.as.Destroy.impl.Op [symbolic = @Generic.as.Destroy.impl.%Generic.as.Destroy.impl.Op (constants.%Generic.as.Destroy.impl.Op)] {
  137. // CHECK:STDOUT: %self.patt: @Generic.as.Destroy.impl.Op.%pattern_type (%pattern_type.b64) = binding_pattern self [concrete]
  138. // CHECK:STDOUT: %self.param_patt: @Generic.as.Destroy.impl.Op.%pattern_type (%pattern_type.b64) = value_param_pattern %self.patt, call_param0 [concrete]
  139. // CHECK:STDOUT: %.loc6_25.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  140. // CHECK:STDOUT: } {
  141. // CHECK:STDOUT: %self.param: @Generic.as.Destroy.impl.Op.%ptr (%ptr.881) = value_param call_param0
  142. // CHECK:STDOUT: %.loc6_25.2: type = splice_block %Self.ref [symbolic = %Generic (constants.%Generic)] {
  143. // CHECK:STDOUT: %.loc6_25.3: type = specific_constant constants.%Generic, @Generic(constants.%T) [symbolic = %Generic (constants.%Generic)]
  144. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc6_25.3 [symbolic = %Generic (constants.%Generic)]
  145. // CHECK:STDOUT: }
  146. // CHECK:STDOUT: %self: @Generic.as.Destroy.impl.Op.%ptr (%ptr.881) = bind_name self, %self.param
  147. // CHECK:STDOUT: }
  148. // CHECK:STDOUT:
  149. // CHECK:STDOUT: !members:
  150. // CHECK:STDOUT: .Op = %Generic.as.Destroy.impl.Op.decl
  151. // CHECK:STDOUT: witness = @Generic.%Destroy.impl_witness
  152. // CHECK:STDOUT: }
  153. // CHECK:STDOUT: }
  154. // CHECK:STDOUT:
  155. // CHECK:STDOUT: generic class @Generic(%T.loc4_15.2: type) {
  156. // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_15.1 (constants.%T)]
  157. // CHECK:STDOUT:
  158. // CHECK:STDOUT: !definition:
  159. // CHECK:STDOUT:
  160. // CHECK:STDOUT: class {
  161. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Generic [symbolic = @Generic.as.Destroy.impl.%Generic (constants.%Generic)]
  162. // CHECK:STDOUT: impl_decl @Generic.as.Destroy.impl [concrete] {} {}
  163. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@Generic.as.Destroy.impl.%Generic.as.Destroy.impl.Op.decl), @Generic.as.Destroy.impl [concrete]
  164. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @Generic.as.Destroy.impl(constants.%T) [symbolic = @Generic.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness)]
  165. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  166. // CHECK:STDOUT: complete_type_witness = %complete_type
  167. // CHECK:STDOUT:
  168. // CHECK:STDOUT: !members:
  169. // CHECK:STDOUT: .Self = constants.%Generic
  170. // CHECK:STDOUT: }
  171. // CHECK:STDOUT: }
  172. // CHECK:STDOUT:
  173. // CHECK:STDOUT: generic fn @Generic.as.Destroy.impl.Op(@Generic.%T.loc6: type) {
  174. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  175. // CHECK:STDOUT: %Generic: type = class_type @Generic, @Generic(%T) [symbolic = %Generic (constants.%Generic)]
  176. // CHECK:STDOUT: %ptr: type = ptr_type %Generic [symbolic = %ptr (constants.%ptr.881)]
  177. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.b64)]
  178. // CHECK:STDOUT:
  179. // CHECK:STDOUT: !definition:
  180. // CHECK:STDOUT:
  181. // CHECK:STDOUT: fn(%self.param: @Generic.as.Destroy.impl.Op.%ptr (%ptr.881)) = "no_op";
  182. // CHECK:STDOUT: }
  183. // CHECK:STDOUT:
  184. // CHECK:STDOUT: specific @Generic(constants.%T) {
  185. // CHECK:STDOUT: %T.loc4_15.1 => constants.%T
  186. // CHECK:STDOUT: }
  187. // CHECK:STDOUT:
  188. // CHECK:STDOUT: specific @Generic.as.Destroy.impl(constants.%T) {
  189. // CHECK:STDOUT: %T => constants.%T
  190. // CHECK:STDOUT: %Generic => constants.%Generic
  191. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness
  192. // CHECK:STDOUT: }
  193. // CHECK:STDOUT:
  194. // CHECK:STDOUT: specific @Generic.as.Destroy.impl.Op(constants.%T) {
  195. // CHECK:STDOUT: %T => constants.%T
  196. // CHECK:STDOUT: %Generic => constants.%Generic
  197. // CHECK:STDOUT: %ptr => constants.%ptr.881
  198. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b64
  199. // CHECK:STDOUT: }
  200. // CHECK:STDOUT:
  201. // CHECK:STDOUT: --- fail_mismatch_param_list.carbon
  202. // CHECK:STDOUT:
  203. // CHECK:STDOUT: constants {
  204. // CHECK:STDOUT: %A.466: type = class_type @A.loc4 [concrete]
  205. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self]
  206. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  207. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  208. // CHECK:STDOUT: %A.type: type = generic_class_type @A.loc12 [concrete]
  209. // CHECK:STDOUT: %A.generic: %A.type = struct_value () [concrete]
  210. // CHECK:STDOUT: %A.130: type = class_type @A.loc12, @A.loc12(%T) [symbolic]
  211. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  212. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  213. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @A.loc12.%Destroy.impl_witness_table, @A.as.Destroy.impl(%T) [symbolic]
  214. // CHECK:STDOUT: %ptr.ca9: type = ptr_type %A.130 [symbolic]
  215. // CHECK:STDOUT: %pattern_type.09b: type = pattern_type %ptr.ca9 [symbolic]
  216. // CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op, @A.as.Destroy.impl(%T) [symbolic]
  217. // CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [symbolic]
  218. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  219. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  220. // CHECK:STDOUT: }
  221. // CHECK:STDOUT:
  222. // CHECK:STDOUT: imports {
  223. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  224. // CHECK:STDOUT: .Destroy = %Core.Destroy
  225. // CHECK:STDOUT: import Core//prelude
  226. // CHECK:STDOUT: import Core//prelude/...
  227. // CHECK:STDOUT: }
  228. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  229. // CHECK:STDOUT: }
  230. // CHECK:STDOUT:
  231. // CHECK:STDOUT: file {
  232. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  233. // CHECK:STDOUT: .Core = imports.%Core
  234. // CHECK:STDOUT: .A = %A.decl.loc4
  235. // CHECK:STDOUT: }
  236. // CHECK:STDOUT: %Core.import = import Core
  237. // CHECK:STDOUT: %A.decl.loc4: type = class_decl @A.loc4 [concrete = constants.%A.466] {} {}
  238. // CHECK:STDOUT: %A.decl.loc12: %A.type = class_decl @A.loc12 [concrete = constants.%A.generic] {
  239. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  240. // CHECK:STDOUT: } {
  241. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  242. // CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_9.1 (constants.%T)]
  243. // CHECK:STDOUT: }
  244. // CHECK:STDOUT: }
  245. // CHECK:STDOUT:
  246. // CHECK:STDOUT: generic impl @A.as.Destroy.impl(@A.loc12.%T.loc12_9.2: type) {
  247. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  248. // CHECK:STDOUT: %A: type = class_type @A.loc12, @A.loc12(%T) [symbolic = %A (constants.%A.130)]
  249. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @A.loc12.%Destroy.impl_witness_table, @A.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness)]
  250. // CHECK:STDOUT:
  251. // CHECK:STDOUT: !definition:
  252. // CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op, @A.as.Destroy.impl(%T) [symbolic = %A.as.Destroy.impl.Op.type (constants.%A.as.Destroy.impl.Op.type)]
  253. // CHECK:STDOUT: %A.as.Destroy.impl.Op: @A.as.Destroy.impl.%A.as.Destroy.impl.Op.type (%A.as.Destroy.impl.Op.type) = struct_value () [symbolic = %A.as.Destroy.impl.Op (constants.%A.as.Destroy.impl.Op)]
  254. // CHECK:STDOUT:
  255. // CHECK:STDOUT: impl: @A.loc12.%Self.ref as constants.%Destroy.type {
  256. // CHECK:STDOUT: %A.as.Destroy.impl.Op.decl: @A.as.Destroy.impl.%A.as.Destroy.impl.Op.type (%A.as.Destroy.impl.Op.type) = fn_decl @A.as.Destroy.impl.Op [symbolic = @A.as.Destroy.impl.%A.as.Destroy.impl.Op (constants.%A.as.Destroy.impl.Op)] {
  257. // CHECK:STDOUT: %self.patt: @A.as.Destroy.impl.Op.%pattern_type (%pattern_type.09b) = binding_pattern self [concrete]
  258. // CHECK:STDOUT: %self.param_patt: @A.as.Destroy.impl.Op.%pattern_type (%pattern_type.09b) = value_param_pattern %self.patt, call_param0 [concrete]
  259. // CHECK:STDOUT: %.loc12_19.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  260. // CHECK:STDOUT: } {
  261. // CHECK:STDOUT: %self.param: @A.as.Destroy.impl.Op.%ptr (%ptr.ca9) = value_param call_param0
  262. // CHECK:STDOUT: %.loc12_19.2: type = splice_block %Self.ref [symbolic = %A (constants.%A.130)] {
  263. // CHECK:STDOUT: %.loc12_19.3: type = specific_constant constants.%A.130, @A.loc12(constants.%T) [symbolic = %A (constants.%A.130)]
  264. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc12_19.3 [symbolic = %A (constants.%A.130)]
  265. // CHECK:STDOUT: }
  266. // CHECK:STDOUT: %self: @A.as.Destroy.impl.Op.%ptr (%ptr.ca9) = bind_name self, %self.param
  267. // CHECK:STDOUT: }
  268. // CHECK:STDOUT:
  269. // CHECK:STDOUT: !members:
  270. // CHECK:STDOUT: .Op = %A.as.Destroy.impl.Op.decl
  271. // CHECK:STDOUT: witness = @A.loc12.%Destroy.impl_witness
  272. // CHECK:STDOUT: }
  273. // CHECK:STDOUT: }
  274. // CHECK:STDOUT:
  275. // CHECK:STDOUT: class @A.loc4;
  276. // CHECK:STDOUT:
  277. // CHECK:STDOUT: generic class @A.loc12(%T.loc12_9.2: type) {
  278. // CHECK:STDOUT: %T.loc12_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_9.1 (constants.%T)]
  279. // CHECK:STDOUT:
  280. // CHECK:STDOUT: !definition:
  281. // CHECK:STDOUT:
  282. // CHECK:STDOUT: class {
  283. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A.130 [symbolic = @A.as.Destroy.impl.%A (constants.%A.130)]
  284. // CHECK:STDOUT: impl_decl @A.as.Destroy.impl [concrete] {} {}
  285. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@A.as.Destroy.impl.%A.as.Destroy.impl.Op.decl), @A.as.Destroy.impl [concrete]
  286. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @A.as.Destroy.impl(constants.%T) [symbolic = @A.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness)]
  287. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  288. // CHECK:STDOUT: complete_type_witness = %complete_type
  289. // CHECK:STDOUT:
  290. // CHECK:STDOUT: !members:
  291. // CHECK:STDOUT: .Self = constants.%A.130
  292. // CHECK:STDOUT: }
  293. // CHECK:STDOUT: }
  294. // CHECK:STDOUT:
  295. // CHECK:STDOUT: generic fn @A.as.Destroy.impl.Op(@A.loc12.%T.loc12_9.2: type) {
  296. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  297. // CHECK:STDOUT: %A: type = class_type @A.loc12, @A.loc12(%T) [symbolic = %A (constants.%A.130)]
  298. // CHECK:STDOUT: %ptr: type = ptr_type %A [symbolic = %ptr (constants.%ptr.ca9)]
  299. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.09b)]
  300. // CHECK:STDOUT:
  301. // CHECK:STDOUT: !definition:
  302. // CHECK:STDOUT:
  303. // CHECK:STDOUT: fn(%self.param: @A.as.Destroy.impl.Op.%ptr (%ptr.ca9)) = "no_op";
  304. // CHECK:STDOUT: }
  305. // CHECK:STDOUT:
  306. // CHECK:STDOUT: specific @A.loc12(constants.%T) {
  307. // CHECK:STDOUT: %T.loc12_9.1 => constants.%T
  308. // CHECK:STDOUT: }
  309. // CHECK:STDOUT:
  310. // CHECK:STDOUT: specific @A.as.Destroy.impl(constants.%T) {
  311. // CHECK:STDOUT: %T => constants.%T
  312. // CHECK:STDOUT: %A => constants.%A.130
  313. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness
  314. // CHECK:STDOUT: }
  315. // CHECK:STDOUT:
  316. // CHECK:STDOUT: specific @A.as.Destroy.impl.Op(constants.%T) {
  317. // CHECK:STDOUT: %T => constants.%T
  318. // CHECK:STDOUT: %A => constants.%A.130
  319. // CHECK:STDOUT: %ptr => constants.%ptr.ca9
  320. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.09b
  321. // CHECK:STDOUT: }
  322. // CHECK:STDOUT:
  323. // CHECK:STDOUT: --- fail_mismatch_implicit_param_list.carbon
  324. // CHECK:STDOUT:
  325. // CHECK:STDOUT: constants {
  326. // CHECK:STDOUT: %A: type = class_type @A [concrete]
  327. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  328. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  329. // CHECK:STDOUT: %Destroy.impl_witness.b44: <witness> = impl_witness @A.%Destroy.impl_witness_table [concrete]
  330. // CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete]
  331. // CHECK:STDOUT: %pattern_type.5f8: type = pattern_type %ptr.6db [concrete]
  332. // CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op [concrete]
  333. // CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [concrete]
  334. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  335. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  336. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self]
  337. // CHECK:STDOUT: %N.9e6: %A = bind_symbolic_name N, 0 [symbolic]
  338. // CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete]
  339. // CHECK:STDOUT: %B.type.844c0f.1: type = generic_class_type @B.loc6 [concrete]
  340. // CHECK:STDOUT: %B.generic.ba299b.1: %B.type.844c0f.1 = struct_value () [concrete]
  341. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  342. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  343. // CHECK:STDOUT: %N.f22: %T = bind_symbolic_name N, 1 [symbolic]
  344. // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic]
  345. // CHECK:STDOUT: %B.type.844c0f.2: type = generic_class_type @B.loc14 [concrete]
  346. // CHECK:STDOUT: %B.generic.ba299b.2: %B.type.844c0f.2 = struct_value () [concrete]
  347. // CHECK:STDOUT: %B.828: type = class_type @B.loc14, @B.loc14(%T, %N.f22) [symbolic]
  348. // CHECK:STDOUT: %Destroy.impl_witness.33b: <witness> = impl_witness @B.loc14.%Destroy.impl_witness_table, @B.as.Destroy.impl(%T, %N.f22) [symbolic]
  349. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
  350. // CHECK:STDOUT: %ptr.9e8: type = ptr_type %B.828 [symbolic]
  351. // CHECK:STDOUT: %pattern_type.a6d: type = pattern_type %ptr.9e8 [symbolic]
  352. // CHECK:STDOUT: %B.as.Destroy.impl.Op.type: type = fn_type @B.as.Destroy.impl.Op, @B.as.Destroy.impl(%T, %N.f22) [symbolic]
  353. // CHECK:STDOUT: %B.as.Destroy.impl.Op: %B.as.Destroy.impl.Op.type = struct_value () [symbolic]
  354. // CHECK:STDOUT: }
  355. // CHECK:STDOUT:
  356. // CHECK:STDOUT: imports {
  357. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  358. // CHECK:STDOUT: .Destroy = %Core.Destroy
  359. // CHECK:STDOUT: import Core//prelude
  360. // CHECK:STDOUT: import Core//prelude/...
  361. // CHECK:STDOUT: }
  362. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  363. // CHECK:STDOUT: }
  364. // CHECK:STDOUT:
  365. // CHECK:STDOUT: file {
  366. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  367. // CHECK:STDOUT: .Core = imports.%Core
  368. // CHECK:STDOUT: .A = %A.decl
  369. // CHECK:STDOUT: .B = %B.decl.loc6
  370. // CHECK:STDOUT: }
  371. // CHECK:STDOUT: %Core.import = import Core
  372. // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {}
  373. // CHECK:STDOUT: %B.decl.loc6: %B.type.844c0f.1 = class_decl @B.loc6 [concrete = constants.%B.generic.ba299b.1] {
  374. // CHECK:STDOUT: %N.patt: %pattern_type.c10 = symbolic_binding_pattern N, 0 [concrete]
  375. // CHECK:STDOUT: } {
  376. // CHECK:STDOUT: %.loc6: type = splice_block %A.ref [concrete = constants.%A] {
  377. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  378. // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
  379. // CHECK:STDOUT: }
  380. // CHECK:STDOUT: %N.loc6_9.2: %A = bind_symbolic_name N, 0 [symbolic = %N.loc6_9.1 (constants.%N.9e6)]
  381. // CHECK:STDOUT: }
  382. // CHECK:STDOUT: %B.decl.loc14: %B.type.844c0f.2 = class_decl @B.loc14 [concrete = constants.%B.generic.ba299b.2] {
  383. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  384. // CHECK:STDOUT: %N.patt: @B.loc14.%pattern_type (%pattern_type.7dc) = symbolic_binding_pattern N, 1 [concrete]
  385. // CHECK:STDOUT: } {
  386. // CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  387. // CHECK:STDOUT: %T.loc14_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.1 (constants.%T)]
  388. // CHECK:STDOUT: %.loc14: type = splice_block %T.ref [symbolic = %T.loc14_9.1 (constants.%T)] {
  389. // CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  390. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_9.2 [symbolic = %T.loc14_9.1 (constants.%T)]
  391. // CHECK:STDOUT: }
  392. // CHECK:STDOUT: %N.loc14_19.2: @B.loc14.%T.loc14_9.1 (%T) = bind_symbolic_name N, 1 [symbolic = %N.loc14_19.1 (constants.%N.f22)]
  393. // CHECK:STDOUT: }
  394. // CHECK:STDOUT: }
  395. // CHECK:STDOUT:
  396. // CHECK:STDOUT: impl @A.as.Destroy.impl: @A.%Self.ref as constants.%Destroy.type {
  397. // CHECK:STDOUT: %A.as.Destroy.impl.Op.decl: %A.as.Destroy.impl.Op.type = fn_decl @A.as.Destroy.impl.Op [concrete = constants.%A.as.Destroy.impl.Op] {
  398. // CHECK:STDOUT: %self.patt: %pattern_type.5f8 = binding_pattern self [concrete]
  399. // CHECK:STDOUT: %self.param_patt: %pattern_type.5f8 = value_param_pattern %self.patt, call_param0 [concrete]
  400. // CHECK:STDOUT: %.loc4: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  401. // CHECK:STDOUT: } {
  402. // CHECK:STDOUT: %self.param: %ptr.6db = value_param call_param0
  403. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [concrete = constants.%A]
  404. // CHECK:STDOUT: %self: %ptr.6db = bind_name self, %self.param
  405. // CHECK:STDOUT: }
  406. // CHECK:STDOUT:
  407. // CHECK:STDOUT: !members:
  408. // CHECK:STDOUT: .Op = %A.as.Destroy.impl.Op.decl
  409. // CHECK:STDOUT: witness = @A.%Destroy.impl_witness
  410. // CHECK:STDOUT: }
  411. // CHECK:STDOUT:
  412. // CHECK:STDOUT: generic impl @B.as.Destroy.impl(@B.loc14.%T.loc14_9.2: type, @B.loc14.%N.loc14_19.2: @B.loc14.%T.loc14_9.1 (%T)) {
  413. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  414. // CHECK:STDOUT: %N: @B.as.Destroy.impl.%T (%T) = bind_symbolic_name N, 1 [symbolic = %N (constants.%N.f22)]
  415. // CHECK:STDOUT: %B: type = class_type @B.loc14, @B.loc14(%T, %N) [symbolic = %B (constants.%B.828)]
  416. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @B.loc14.%Destroy.impl_witness_table, @B.as.Destroy.impl(%T, %N) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.33b)]
  417. // CHECK:STDOUT:
  418. // CHECK:STDOUT: !definition:
  419. // CHECK:STDOUT: %B.as.Destroy.impl.Op.type: type = fn_type @B.as.Destroy.impl.Op, @B.as.Destroy.impl(%T, %N) [symbolic = %B.as.Destroy.impl.Op.type (constants.%B.as.Destroy.impl.Op.type)]
  420. // CHECK:STDOUT: %B.as.Destroy.impl.Op: @B.as.Destroy.impl.%B.as.Destroy.impl.Op.type (%B.as.Destroy.impl.Op.type) = struct_value () [symbolic = %B.as.Destroy.impl.Op (constants.%B.as.Destroy.impl.Op)]
  421. // CHECK:STDOUT:
  422. // CHECK:STDOUT: impl: @B.loc14.%Self.ref as constants.%Destroy.type {
  423. // CHECK:STDOUT: %B.as.Destroy.impl.Op.decl: @B.as.Destroy.impl.%B.as.Destroy.impl.Op.type (%B.as.Destroy.impl.Op.type) = fn_decl @B.as.Destroy.impl.Op [symbolic = @B.as.Destroy.impl.%B.as.Destroy.impl.Op (constants.%B.as.Destroy.impl.Op)] {
  424. // CHECK:STDOUT: %self.patt: @B.as.Destroy.impl.Op.%pattern_type (%pattern_type.a6d) = binding_pattern self [concrete]
  425. // CHECK:STDOUT: %self.param_patt: @B.as.Destroy.impl.Op.%pattern_type (%pattern_type.a6d) = value_param_pattern %self.patt, call_param0 [concrete]
  426. // CHECK:STDOUT: %.loc14_26.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  427. // CHECK:STDOUT: } {
  428. // CHECK:STDOUT: %self.param: @B.as.Destroy.impl.Op.%ptr (%ptr.9e8) = value_param call_param0
  429. // CHECK:STDOUT: %.loc14_26.2: type = splice_block %Self.ref [symbolic = %B (constants.%B.828)] {
  430. // CHECK:STDOUT: %.loc14_26.3: type = specific_constant constants.%B.828, @B.loc14(constants.%T, constants.%N.f22) [symbolic = %B (constants.%B.828)]
  431. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc14_26.3 [symbolic = %B (constants.%B.828)]
  432. // CHECK:STDOUT: }
  433. // CHECK:STDOUT: %self: @B.as.Destroy.impl.Op.%ptr (%ptr.9e8) = bind_name self, %self.param
  434. // CHECK:STDOUT: }
  435. // CHECK:STDOUT:
  436. // CHECK:STDOUT: !members:
  437. // CHECK:STDOUT: .Op = %B.as.Destroy.impl.Op.decl
  438. // CHECK:STDOUT: witness = @B.loc14.%Destroy.impl_witness
  439. // CHECK:STDOUT: }
  440. // CHECK:STDOUT: }
  441. // CHECK:STDOUT:
  442. // CHECK:STDOUT: class @A {
  443. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [concrete = constants.%A]
  444. // CHECK:STDOUT: impl_decl @A.as.Destroy.impl [concrete] {} {}
  445. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@A.as.Destroy.impl.%A.as.Destroy.impl.Op.decl), @A.as.Destroy.impl [concrete]
  446. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.b44]
  447. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  448. // CHECK:STDOUT: complete_type_witness = %complete_type
  449. // CHECK:STDOUT:
  450. // CHECK:STDOUT: !members:
  451. // CHECK:STDOUT: .Self = constants.%A
  452. // CHECK:STDOUT: }
  453. // CHECK:STDOUT:
  454. // CHECK:STDOUT: generic class @B.loc6(%N.loc6_9.2: %A) {
  455. // CHECK:STDOUT: %N.loc6_9.1: %A = bind_symbolic_name N, 0 [symbolic = %N.loc6_9.1 (constants.%N.9e6)]
  456. // CHECK:STDOUT:
  457. // CHECK:STDOUT: class;
  458. // CHECK:STDOUT: }
  459. // CHECK:STDOUT:
  460. // CHECK:STDOUT: generic class @B.loc14(%T.loc14_9.2: type, %N.loc14_19.2: @B.loc14.%T.loc14_9.1 (%T)) {
  461. // CHECK:STDOUT: %T.loc14_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.1 (constants.%T)]
  462. // CHECK:STDOUT: %N.loc14_19.1: @B.loc14.%T.loc14_9.1 (%T) = bind_symbolic_name N, 1 [symbolic = %N.loc14_19.1 (constants.%N.f22)]
  463. // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc14_9.1 [symbolic = %pattern_type (constants.%pattern_type.7dc)]
  464. // CHECK:STDOUT:
  465. // CHECK:STDOUT: !definition:
  466. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.loc14_9.1 [symbolic = %require_complete (constants.%require_complete)]
  467. // CHECK:STDOUT:
  468. // CHECK:STDOUT: class {
  469. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B.828 [symbolic = @B.as.Destroy.impl.%B (constants.%B.828)]
  470. // CHECK:STDOUT: impl_decl @B.as.Destroy.impl [concrete] {} {}
  471. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@B.as.Destroy.impl.%B.as.Destroy.impl.Op.decl), @B.as.Destroy.impl [concrete]
  472. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @B.as.Destroy.impl(constants.%T, constants.%N.f22) [symbolic = @B.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.33b)]
  473. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  474. // CHECK:STDOUT: complete_type_witness = %complete_type
  475. // CHECK:STDOUT:
  476. // CHECK:STDOUT: !members:
  477. // CHECK:STDOUT: .Self = constants.%B.828
  478. // CHECK:STDOUT: }
  479. // CHECK:STDOUT: }
  480. // CHECK:STDOUT:
  481. // CHECK:STDOUT: fn @A.as.Destroy.impl.Op(%self.param: %ptr.6db) = "no_op";
  482. // CHECK:STDOUT:
  483. // CHECK:STDOUT: generic fn @B.as.Destroy.impl.Op(@B.loc14.%T.loc14_9.2: type, @B.loc14.%N.loc14_19.2: @B.loc14.%T.loc14_9.1 (%T)) {
  484. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  485. // CHECK:STDOUT: %N: @B.as.Destroy.impl.Op.%T (%T) = bind_symbolic_name N, 1 [symbolic = %N (constants.%N.f22)]
  486. // CHECK:STDOUT: %B: type = class_type @B.loc14, @B.loc14(%T, %N) [symbolic = %B (constants.%B.828)]
  487. // CHECK:STDOUT: %ptr: type = ptr_type %B [symbolic = %ptr (constants.%ptr.9e8)]
  488. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.a6d)]
  489. // CHECK:STDOUT:
  490. // CHECK:STDOUT: !definition:
  491. // CHECK:STDOUT:
  492. // CHECK:STDOUT: fn(%self.param: @B.as.Destroy.impl.Op.%ptr (%ptr.9e8)) = "no_op";
  493. // CHECK:STDOUT: }
  494. // CHECK:STDOUT:
  495. // CHECK:STDOUT: specific @B.loc6(constants.%N.9e6) {
  496. // CHECK:STDOUT: %N.loc6_9.1 => constants.%N.9e6
  497. // CHECK:STDOUT: }
  498. // CHECK:STDOUT:
  499. // CHECK:STDOUT: specific @B.loc14(constants.%T, constants.%N.f22) {
  500. // CHECK:STDOUT: %T.loc14_9.1 => constants.%T
  501. // CHECK:STDOUT: %N.loc14_19.1 => constants.%N.f22
  502. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dc
  503. // CHECK:STDOUT: }
  504. // CHECK:STDOUT:
  505. // CHECK:STDOUT: specific @B.as.Destroy.impl(constants.%T, constants.%N.f22) {
  506. // CHECK:STDOUT: %T => constants.%T
  507. // CHECK:STDOUT: %N => constants.%N.f22
  508. // CHECK:STDOUT: %B => constants.%B.828
  509. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.33b
  510. // CHECK:STDOUT: }
  511. // CHECK:STDOUT:
  512. // CHECK:STDOUT: specific @B.as.Destroy.impl.Op(constants.%T, constants.%N.f22) {
  513. // CHECK:STDOUT: %T => constants.%T
  514. // CHECK:STDOUT: %N => constants.%N.f22
  515. // CHECK:STDOUT: %B => constants.%B.828
  516. // CHECK:STDOUT: %ptr => constants.%ptr.9e8
  517. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a6d
  518. // CHECK:STDOUT: }
  519. // CHECK:STDOUT:
  520. // CHECK:STDOUT: --- fail_mismatch_param_count.carbon
  521. // CHECK:STDOUT:
  522. // CHECK:STDOUT: constants {
  523. // CHECK:STDOUT: %A: type = class_type @A [concrete]
  524. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  525. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  526. // CHECK:STDOUT: %Destroy.impl_witness.b44: <witness> = impl_witness @A.%Destroy.impl_witness_table [concrete]
  527. // CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete]
  528. // CHECK:STDOUT: %pattern_type.5f8: type = pattern_type %ptr.6db [concrete]
  529. // CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op [concrete]
  530. // CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [concrete]
  531. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  532. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  533. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self]
  534. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  535. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  536. // CHECK:STDOUT: %C.type.e6e560.1: type = generic_class_type @C.loc6 [concrete]
  537. // CHECK:STDOUT: %C.generic.965b12.1: %C.type.e6e560.1 = struct_value () [concrete]
  538. // CHECK:STDOUT: %U: %A = bind_symbolic_name U, 1 [symbolic]
  539. // CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete]
  540. // CHECK:STDOUT: %C.type.e6e560.2: type = generic_class_type @C.loc14 [concrete]
  541. // CHECK:STDOUT: %C.generic.965b12.2: %C.type.e6e560.2 = struct_value () [concrete]
  542. // CHECK:STDOUT: %C.3d8: type = class_type @C.loc14, @C.loc14(%T, %U) [symbolic]
  543. // CHECK:STDOUT: %Destroy.impl_witness.f90: <witness> = impl_witness @C.loc14.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T, %U) [symbolic]
  544. // CHECK:STDOUT: %ptr.8f5: type = ptr_type %C.3d8 [symbolic]
  545. // CHECK:STDOUT: %pattern_type.d5b: type = pattern_type %ptr.8f5 [symbolic]
  546. // CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%T, %U) [symbolic]
  547. // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [symbolic]
  548. // CHECK:STDOUT: }
  549. // CHECK:STDOUT:
  550. // CHECK:STDOUT: imports {
  551. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  552. // CHECK:STDOUT: .Destroy = %Core.Destroy
  553. // CHECK:STDOUT: import Core//prelude
  554. // CHECK:STDOUT: import Core//prelude/...
  555. // CHECK:STDOUT: }
  556. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  557. // CHECK:STDOUT: }
  558. // CHECK:STDOUT:
  559. // CHECK:STDOUT: file {
  560. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  561. // CHECK:STDOUT: .Core = imports.%Core
  562. // CHECK:STDOUT: .A = %A.decl
  563. // CHECK:STDOUT: .C = %C.decl.loc6
  564. // CHECK:STDOUT: }
  565. // CHECK:STDOUT: %Core.import = import Core
  566. // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {}
  567. // CHECK:STDOUT: %C.decl.loc6: %C.type.e6e560.1 = class_decl @C.loc6 [concrete = constants.%C.generic.965b12.1] {
  568. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  569. // CHECK:STDOUT: } {
  570. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  571. // CHECK:STDOUT: %T.loc6_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.1 (constants.%T)]
  572. // CHECK:STDOUT: }
  573. // CHECK:STDOUT: %C.decl.loc14: %C.type.e6e560.2 = class_decl @C.loc14 [concrete = constants.%C.generic.965b12.2] {
  574. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  575. // CHECK:STDOUT: %U.patt: %pattern_type.c10 = symbolic_binding_pattern U, 1 [concrete]
  576. // CHECK:STDOUT: } {
  577. // CHECK:STDOUT: %.Self.1: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  578. // CHECK:STDOUT: %T.loc14_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.1 (constants.%T)]
  579. // CHECK:STDOUT: %.loc14: type = splice_block %A.ref [concrete = constants.%A] {
  580. // CHECK:STDOUT: %.Self.2: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  581. // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
  582. // CHECK:STDOUT: }
  583. // CHECK:STDOUT: %U.loc14_19.2: %A = bind_symbolic_name U, 1 [symbolic = %U.loc14_19.1 (constants.%U)]
  584. // CHECK:STDOUT: }
  585. // CHECK:STDOUT: }
  586. // CHECK:STDOUT:
  587. // CHECK:STDOUT: impl @A.as.Destroy.impl: @A.%Self.ref as constants.%Destroy.type {
  588. // CHECK:STDOUT: %A.as.Destroy.impl.Op.decl: %A.as.Destroy.impl.Op.type = fn_decl @A.as.Destroy.impl.Op [concrete = constants.%A.as.Destroy.impl.Op] {
  589. // CHECK:STDOUT: %self.patt: %pattern_type.5f8 = binding_pattern self [concrete]
  590. // CHECK:STDOUT: %self.param_patt: %pattern_type.5f8 = value_param_pattern %self.patt, call_param0 [concrete]
  591. // CHECK:STDOUT: %.loc4: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  592. // CHECK:STDOUT: } {
  593. // CHECK:STDOUT: %self.param: %ptr.6db = value_param call_param0
  594. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [concrete = constants.%A]
  595. // CHECK:STDOUT: %self: %ptr.6db = bind_name self, %self.param
  596. // CHECK:STDOUT: }
  597. // CHECK:STDOUT:
  598. // CHECK:STDOUT: !members:
  599. // CHECK:STDOUT: .Op = %A.as.Destroy.impl.Op.decl
  600. // CHECK:STDOUT: witness = @A.%Destroy.impl_witness
  601. // CHECK:STDOUT: }
  602. // CHECK:STDOUT:
  603. // CHECK:STDOUT: generic impl @C.as.Destroy.impl(@C.loc14.%T.loc14_9.2: type, @C.loc14.%U.loc14_19.2: %A) {
  604. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  605. // CHECK:STDOUT: %U: %A = bind_symbolic_name U, 1 [symbolic = %U (constants.%U)]
  606. // CHECK:STDOUT: %C: type = class_type @C.loc14, @C.loc14(%T, %U) [symbolic = %C (constants.%C.3d8)]
  607. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @C.loc14.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T, %U) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.f90)]
  608. // CHECK:STDOUT:
  609. // CHECK:STDOUT: !definition:
  610. // CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op, @C.as.Destroy.impl(%T, %U) [symbolic = %C.as.Destroy.impl.Op.type (constants.%C.as.Destroy.impl.Op.type)]
  611. // CHECK:STDOUT: %C.as.Destroy.impl.Op: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = struct_value () [symbolic = %C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)]
  612. // CHECK:STDOUT:
  613. // CHECK:STDOUT: impl: @C.loc14.%Self.ref as constants.%Destroy.type {
  614. // CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: @C.as.Destroy.impl.%C.as.Destroy.impl.Op.type (%C.as.Destroy.impl.Op.type) = fn_decl @C.as.Destroy.impl.Op [symbolic = @C.as.Destroy.impl.%C.as.Destroy.impl.Op (constants.%C.as.Destroy.impl.Op)] {
  615. // CHECK:STDOUT: %self.patt: @C.as.Destroy.impl.Op.%pattern_type (%pattern_type.d5b) = binding_pattern self [concrete]
  616. // CHECK:STDOUT: %self.param_patt: @C.as.Destroy.impl.Op.%pattern_type (%pattern_type.d5b) = value_param_pattern %self.patt, call_param0 [concrete]
  617. // CHECK:STDOUT: %.loc14_26.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  618. // CHECK:STDOUT: } {
  619. // CHECK:STDOUT: %self.param: @C.as.Destroy.impl.Op.%ptr (%ptr.8f5) = value_param call_param0
  620. // CHECK:STDOUT: %.loc14_26.2: type = splice_block %Self.ref [symbolic = %C (constants.%C.3d8)] {
  621. // CHECK:STDOUT: %.loc14_26.3: type = specific_constant constants.%C.3d8, @C.loc14(constants.%T, constants.%U) [symbolic = %C (constants.%C.3d8)]
  622. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc14_26.3 [symbolic = %C (constants.%C.3d8)]
  623. // CHECK:STDOUT: }
  624. // CHECK:STDOUT: %self: @C.as.Destroy.impl.Op.%ptr (%ptr.8f5) = bind_name self, %self.param
  625. // CHECK:STDOUT: }
  626. // CHECK:STDOUT:
  627. // CHECK:STDOUT: !members:
  628. // CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
  629. // CHECK:STDOUT: witness = @C.loc14.%Destroy.impl_witness
  630. // CHECK:STDOUT: }
  631. // CHECK:STDOUT: }
  632. // CHECK:STDOUT:
  633. // CHECK:STDOUT: class @A {
  634. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [concrete = constants.%A]
  635. // CHECK:STDOUT: impl_decl @A.as.Destroy.impl [concrete] {} {}
  636. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@A.as.Destroy.impl.%A.as.Destroy.impl.Op.decl), @A.as.Destroy.impl [concrete]
  637. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.b44]
  638. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  639. // CHECK:STDOUT: complete_type_witness = %complete_type
  640. // CHECK:STDOUT:
  641. // CHECK:STDOUT: !members:
  642. // CHECK:STDOUT: .Self = constants.%A
  643. // CHECK:STDOUT: }
  644. // CHECK:STDOUT:
  645. // CHECK:STDOUT: generic class @C.loc6(%T.loc6_9.2: type) {
  646. // CHECK:STDOUT: %T.loc6_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.1 (constants.%T)]
  647. // CHECK:STDOUT:
  648. // CHECK:STDOUT: class;
  649. // CHECK:STDOUT: }
  650. // CHECK:STDOUT:
  651. // CHECK:STDOUT: generic class @C.loc14(%T.loc14_9.2: type, %U.loc14_19.2: %A) {
  652. // CHECK:STDOUT: %T.loc14_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.1 (constants.%T)]
  653. // CHECK:STDOUT: %U.loc14_19.1: %A = bind_symbolic_name U, 1 [symbolic = %U.loc14_19.1 (constants.%U)]
  654. // CHECK:STDOUT:
  655. // CHECK:STDOUT: !definition:
  656. // CHECK:STDOUT:
  657. // CHECK:STDOUT: class {
  658. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C.3d8 [symbolic = @C.as.Destroy.impl.%C (constants.%C.3d8)]
  659. // CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
  660. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
  661. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @C.as.Destroy.impl(constants.%T, constants.%U) [symbolic = @C.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.f90)]
  662. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  663. // CHECK:STDOUT: complete_type_witness = %complete_type
  664. // CHECK:STDOUT:
  665. // CHECK:STDOUT: !members:
  666. // CHECK:STDOUT: .Self = constants.%C.3d8
  667. // CHECK:STDOUT: }
  668. // CHECK:STDOUT: }
  669. // CHECK:STDOUT:
  670. // CHECK:STDOUT: fn @A.as.Destroy.impl.Op(%self.param: %ptr.6db) = "no_op";
  671. // CHECK:STDOUT:
  672. // CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(@C.loc14.%T.loc14_9.2: type, @C.loc14.%U.loc14_19.2: %A) {
  673. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  674. // CHECK:STDOUT: %U: %A = bind_symbolic_name U, 1 [symbolic = %U (constants.%U)]
  675. // CHECK:STDOUT: %C: type = class_type @C.loc14, @C.loc14(%T, %U) [symbolic = %C (constants.%C.3d8)]
  676. // CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.8f5)]
  677. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.d5b)]
  678. // CHECK:STDOUT:
  679. // CHECK:STDOUT: !definition:
  680. // CHECK:STDOUT:
  681. // CHECK:STDOUT: fn(%self.param: @C.as.Destroy.impl.Op.%ptr (%ptr.8f5)) = "no_op";
  682. // CHECK:STDOUT: }
  683. // CHECK:STDOUT:
  684. // CHECK:STDOUT: specific @C.loc6(constants.%T) {
  685. // CHECK:STDOUT: %T.loc6_9.1 => constants.%T
  686. // CHECK:STDOUT: }
  687. // CHECK:STDOUT:
  688. // CHECK:STDOUT: specific @C.loc14(constants.%T, constants.%U) {
  689. // CHECK:STDOUT: %T.loc14_9.1 => constants.%T
  690. // CHECK:STDOUT: %U.loc14_19.1 => constants.%U
  691. // CHECK:STDOUT: }
  692. // CHECK:STDOUT:
  693. // CHECK:STDOUT: specific @C.as.Destroy.impl(constants.%T, constants.%U) {
  694. // CHECK:STDOUT: %T => constants.%T
  695. // CHECK:STDOUT: %U => constants.%U
  696. // CHECK:STDOUT: %C => constants.%C.3d8
  697. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.f90
  698. // CHECK:STDOUT: }
  699. // CHECK:STDOUT:
  700. // CHECK:STDOUT: specific @C.as.Destroy.impl.Op(constants.%T, constants.%U) {
  701. // CHECK:STDOUT: %T => constants.%T
  702. // CHECK:STDOUT: %U => constants.%U
  703. // CHECK:STDOUT: %C => constants.%C.3d8
  704. // CHECK:STDOUT: %ptr => constants.%ptr.8f5
  705. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d5b
  706. // CHECK:STDOUT: }
  707. // CHECK:STDOUT:
  708. // CHECK:STDOUT: --- fail_mismatch_param_type.carbon
  709. // CHECK:STDOUT:
  710. // CHECK:STDOUT: constants {
  711. // CHECK:STDOUT: %A: type = class_type @A [concrete]
  712. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  713. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  714. // CHECK:STDOUT: %Destroy.impl_witness.b44: <witness> = impl_witness @A.%Destroy.impl_witness_table [concrete]
  715. // CHECK:STDOUT: %ptr.6db: type = ptr_type %A [concrete]
  716. // CHECK:STDOUT: %pattern_type.5f8: type = pattern_type %ptr.6db [concrete]
  717. // CHECK:STDOUT: %A.as.Destroy.impl.Op.type: type = fn_type @A.as.Destroy.impl.Op [concrete]
  718. // CHECK:STDOUT: %A.as.Destroy.impl.Op: %A.as.Destroy.impl.Op.type = struct_value () [concrete]
  719. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  720. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  721. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self]
  722. // CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic]
  723. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  724. // CHECK:STDOUT: %D.type.bbd080.1: type = generic_class_type @D.loc6 [concrete]
  725. // CHECK:STDOUT: %D.generic.4e2319.1: %D.type.bbd080.1 = struct_value () [concrete]
  726. // CHECK:STDOUT: %T.9e6: %A = bind_symbolic_name T, 0 [symbolic]
  727. // CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete]
  728. // CHECK:STDOUT: %D.type.bbd080.2: type = generic_class_type @D.loc14 [concrete]
  729. // CHECK:STDOUT: %D.generic.4e2319.2: %D.type.bbd080.2 = struct_value () [concrete]
  730. // CHECK:STDOUT: %D.384: type = class_type @D.loc14, @D.loc14(%T.9e6) [symbolic]
  731. // CHECK:STDOUT: %Destroy.impl_witness.7b8: <witness> = impl_witness @D.loc14.%Destroy.impl_witness_table, @D.as.Destroy.impl(%T.9e6) [symbolic]
  732. // CHECK:STDOUT: %ptr.988: type = ptr_type %D.384 [symbolic]
  733. // CHECK:STDOUT: %pattern_type.146: type = pattern_type %ptr.988 [symbolic]
  734. // CHECK:STDOUT: %D.as.Destroy.impl.Op.type: type = fn_type @D.as.Destroy.impl.Op, @D.as.Destroy.impl(%T.9e6) [symbolic]
  735. // CHECK:STDOUT: %D.as.Destroy.impl.Op: %D.as.Destroy.impl.Op.type = struct_value () [symbolic]
  736. // CHECK:STDOUT: }
  737. // CHECK:STDOUT:
  738. // CHECK:STDOUT: imports {
  739. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  740. // CHECK:STDOUT: .Destroy = %Core.Destroy
  741. // CHECK:STDOUT: import Core//prelude
  742. // CHECK:STDOUT: import Core//prelude/...
  743. // CHECK:STDOUT: }
  744. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  745. // CHECK:STDOUT: }
  746. // CHECK:STDOUT:
  747. // CHECK:STDOUT: file {
  748. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  749. // CHECK:STDOUT: .Core = imports.%Core
  750. // CHECK:STDOUT: .A = %A.decl
  751. // CHECK:STDOUT: .D = %D.decl.loc6
  752. // CHECK:STDOUT: }
  753. // CHECK:STDOUT: %Core.import = import Core
  754. // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {}
  755. // CHECK:STDOUT: %D.decl.loc6: %D.type.bbd080.1 = class_decl @D.loc6 [concrete = constants.%D.generic.4e2319.1] {
  756. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  757. // CHECK:STDOUT: } {
  758. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  759. // CHECK:STDOUT: %T.loc6_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.1 (constants.%T.8b3)]
  760. // CHECK:STDOUT: }
  761. // CHECK:STDOUT: %D.decl.loc14: %D.type.bbd080.2 = class_decl @D.loc14 [concrete = constants.%D.generic.4e2319.2] {
  762. // CHECK:STDOUT: %T.patt: %pattern_type.c10 = symbolic_binding_pattern T, 0 [concrete]
  763. // CHECK:STDOUT: } {
  764. // CHECK:STDOUT: %.loc14: type = splice_block %A.ref [concrete = constants.%A] {
  765. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  766. // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
  767. // CHECK:STDOUT: }
  768. // CHECK:STDOUT: %T.loc14_9.2: %A = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.1 (constants.%T.9e6)]
  769. // CHECK:STDOUT: }
  770. // CHECK:STDOUT: }
  771. // CHECK:STDOUT:
  772. // CHECK:STDOUT: impl @A.as.Destroy.impl: @A.%Self.ref as constants.%Destroy.type {
  773. // CHECK:STDOUT: %A.as.Destroy.impl.Op.decl: %A.as.Destroy.impl.Op.type = fn_decl @A.as.Destroy.impl.Op [concrete = constants.%A.as.Destroy.impl.Op] {
  774. // CHECK:STDOUT: %self.patt: %pattern_type.5f8 = binding_pattern self [concrete]
  775. // CHECK:STDOUT: %self.param_patt: %pattern_type.5f8 = value_param_pattern %self.patt, call_param0 [concrete]
  776. // CHECK:STDOUT: %.loc4: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  777. // CHECK:STDOUT: } {
  778. // CHECK:STDOUT: %self.param: %ptr.6db = value_param call_param0
  779. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [concrete = constants.%A]
  780. // CHECK:STDOUT: %self: %ptr.6db = bind_name self, %self.param
  781. // CHECK:STDOUT: }
  782. // CHECK:STDOUT:
  783. // CHECK:STDOUT: !members:
  784. // CHECK:STDOUT: .Op = %A.as.Destroy.impl.Op.decl
  785. // CHECK:STDOUT: witness = @A.%Destroy.impl_witness
  786. // CHECK:STDOUT: }
  787. // CHECK:STDOUT:
  788. // CHECK:STDOUT: generic impl @D.as.Destroy.impl(@D.loc14.%T.loc14_9.2: %A) {
  789. // CHECK:STDOUT: %T: %A = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.9e6)]
  790. // CHECK:STDOUT: %D: type = class_type @D.loc14, @D.loc14(%T) [symbolic = %D (constants.%D.384)]
  791. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @D.loc14.%Destroy.impl_witness_table, @D.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.7b8)]
  792. // CHECK:STDOUT:
  793. // CHECK:STDOUT: !definition:
  794. // CHECK:STDOUT: %D.as.Destroy.impl.Op.type: type = fn_type @D.as.Destroy.impl.Op, @D.as.Destroy.impl(%T) [symbolic = %D.as.Destroy.impl.Op.type (constants.%D.as.Destroy.impl.Op.type)]
  795. // CHECK:STDOUT: %D.as.Destroy.impl.Op: @D.as.Destroy.impl.%D.as.Destroy.impl.Op.type (%D.as.Destroy.impl.Op.type) = struct_value () [symbolic = %D.as.Destroy.impl.Op (constants.%D.as.Destroy.impl.Op)]
  796. // CHECK:STDOUT:
  797. // CHECK:STDOUT: impl: @D.loc14.%Self.ref as constants.%Destroy.type {
  798. // CHECK:STDOUT: %D.as.Destroy.impl.Op.decl: @D.as.Destroy.impl.%D.as.Destroy.impl.Op.type (%D.as.Destroy.impl.Op.type) = fn_decl @D.as.Destroy.impl.Op [symbolic = @D.as.Destroy.impl.%D.as.Destroy.impl.Op (constants.%D.as.Destroy.impl.Op)] {
  799. // CHECK:STDOUT: %self.patt: @D.as.Destroy.impl.Op.%pattern_type (%pattern_type.146) = binding_pattern self [concrete]
  800. // CHECK:STDOUT: %self.param_patt: @D.as.Destroy.impl.Op.%pattern_type (%pattern_type.146) = value_param_pattern %self.patt, call_param0 [concrete]
  801. // CHECK:STDOUT: %.loc14_16.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  802. // CHECK:STDOUT: } {
  803. // CHECK:STDOUT: %self.param: @D.as.Destroy.impl.Op.%ptr (%ptr.988) = value_param call_param0
  804. // CHECK:STDOUT: %.loc14_16.2: type = splice_block %Self.ref [symbolic = %D (constants.%D.384)] {
  805. // CHECK:STDOUT: %.loc14_16.3: type = specific_constant constants.%D.384, @D.loc14(constants.%T.9e6) [symbolic = %D (constants.%D.384)]
  806. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc14_16.3 [symbolic = %D (constants.%D.384)]
  807. // CHECK:STDOUT: }
  808. // CHECK:STDOUT: %self: @D.as.Destroy.impl.Op.%ptr (%ptr.988) = bind_name self, %self.param
  809. // CHECK:STDOUT: }
  810. // CHECK:STDOUT:
  811. // CHECK:STDOUT: !members:
  812. // CHECK:STDOUT: .Op = %D.as.Destroy.impl.Op.decl
  813. // CHECK:STDOUT: witness = @D.loc14.%Destroy.impl_witness
  814. // CHECK:STDOUT: }
  815. // CHECK:STDOUT: }
  816. // CHECK:STDOUT:
  817. // CHECK:STDOUT: class @A {
  818. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [concrete = constants.%A]
  819. // CHECK:STDOUT: impl_decl @A.as.Destroy.impl [concrete] {} {}
  820. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@A.as.Destroy.impl.%A.as.Destroy.impl.Op.decl), @A.as.Destroy.impl [concrete]
  821. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.b44]
  822. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  823. // CHECK:STDOUT: complete_type_witness = %complete_type
  824. // CHECK:STDOUT:
  825. // CHECK:STDOUT: !members:
  826. // CHECK:STDOUT: .Self = constants.%A
  827. // CHECK:STDOUT: }
  828. // CHECK:STDOUT:
  829. // CHECK:STDOUT: generic class @D.loc6(%T.loc6_9.2: type) {
  830. // CHECK:STDOUT: %T.loc6_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_9.1 (constants.%T.8b3)]
  831. // CHECK:STDOUT:
  832. // CHECK:STDOUT: class;
  833. // CHECK:STDOUT: }
  834. // CHECK:STDOUT:
  835. // CHECK:STDOUT: generic class @D.loc14(%T.loc14_9.2: %A) {
  836. // CHECK:STDOUT: %T.loc14_9.1: %A = bind_symbolic_name T, 0 [symbolic = %T.loc14_9.1 (constants.%T.9e6)]
  837. // CHECK:STDOUT:
  838. // CHECK:STDOUT: !definition:
  839. // CHECK:STDOUT:
  840. // CHECK:STDOUT: class {
  841. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%D.384 [symbolic = @D.as.Destroy.impl.%D (constants.%D.384)]
  842. // CHECK:STDOUT: impl_decl @D.as.Destroy.impl [concrete] {} {}
  843. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@D.as.Destroy.impl.%D.as.Destroy.impl.Op.decl), @D.as.Destroy.impl [concrete]
  844. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @D.as.Destroy.impl(constants.%T.9e6) [symbolic = @D.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness.7b8)]
  845. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  846. // CHECK:STDOUT: complete_type_witness = %complete_type
  847. // CHECK:STDOUT:
  848. // CHECK:STDOUT: !members:
  849. // CHECK:STDOUT: .Self = constants.%D.384
  850. // CHECK:STDOUT: }
  851. // CHECK:STDOUT: }
  852. // CHECK:STDOUT:
  853. // CHECK:STDOUT: fn @A.as.Destroy.impl.Op(%self.param: %ptr.6db) = "no_op";
  854. // CHECK:STDOUT:
  855. // CHECK:STDOUT: generic fn @D.as.Destroy.impl.Op(@D.loc14.%T.loc14_9.2: %A) {
  856. // CHECK:STDOUT: %T: %A = bind_symbolic_name T, 0 [symbolic = %T (constants.%T.9e6)]
  857. // CHECK:STDOUT: %D: type = class_type @D.loc14, @D.loc14(%T) [symbolic = %D (constants.%D.384)]
  858. // CHECK:STDOUT: %ptr: type = ptr_type %D [symbolic = %ptr (constants.%ptr.988)]
  859. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.146)]
  860. // CHECK:STDOUT:
  861. // CHECK:STDOUT: !definition:
  862. // CHECK:STDOUT:
  863. // CHECK:STDOUT: fn(%self.param: @D.as.Destroy.impl.Op.%ptr (%ptr.988)) = "no_op";
  864. // CHECK:STDOUT: }
  865. // CHECK:STDOUT:
  866. // CHECK:STDOUT: specific @D.loc6(constants.%T.8b3) {
  867. // CHECK:STDOUT: %T.loc6_9.1 => constants.%T.8b3
  868. // CHECK:STDOUT: }
  869. // CHECK:STDOUT:
  870. // CHECK:STDOUT: specific @D.loc14(constants.%T.9e6) {
  871. // CHECK:STDOUT: %T.loc14_9.1 => constants.%T.9e6
  872. // CHECK:STDOUT: }
  873. // CHECK:STDOUT:
  874. // CHECK:STDOUT: specific @D.as.Destroy.impl(constants.%T.9e6) {
  875. // CHECK:STDOUT: %T => constants.%T.9e6
  876. // CHECK:STDOUT: %D => constants.%D.384
  877. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.7b8
  878. // CHECK:STDOUT: }
  879. // CHECK:STDOUT:
  880. // CHECK:STDOUT: specific @D.as.Destroy.impl.Op(constants.%T.9e6) {
  881. // CHECK:STDOUT: %T => constants.%T.9e6
  882. // CHECK:STDOUT: %D => constants.%D.384
  883. // CHECK:STDOUT: %ptr => constants.%ptr.988
  884. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.146
  885. // CHECK:STDOUT: }
  886. // CHECK:STDOUT:
  887. // CHECK:STDOUT: --- fail_mismatch_param_name.carbon
  888. // CHECK:STDOUT:
  889. // CHECK:STDOUT: constants {
  890. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self]
  891. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  892. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  893. // CHECK:STDOUT: %E.type.b0f8dc.1: type = generic_class_type @E.loc4 [concrete]
  894. // CHECK:STDOUT: %E.generic.f281ba.1: %E.type.b0f8dc.1 = struct_value () [concrete]
  895. // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
  896. // CHECK:STDOUT: %E.type.b0f8dc.2: type = generic_class_type @E.loc12 [concrete]
  897. // CHECK:STDOUT: %E.generic.f281ba.2: %E.type.b0f8dc.2 = struct_value () [concrete]
  898. // CHECK:STDOUT: %E.ec9c10.2: type = class_type @E.loc12, @E.loc12(%U) [symbolic]
  899. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  900. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  901. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @E.loc12.%Destroy.impl_witness_table, @E.as.Destroy.impl(%U) [symbolic]
  902. // CHECK:STDOUT: %ptr.878: type = ptr_type %E.ec9c10.2 [symbolic]
  903. // CHECK:STDOUT: %pattern_type.3d9: type = pattern_type %ptr.878 [symbolic]
  904. // CHECK:STDOUT: %E.as.Destroy.impl.Op.type: type = fn_type @E.as.Destroy.impl.Op, @E.as.Destroy.impl(%U) [symbolic]
  905. // CHECK:STDOUT: %E.as.Destroy.impl.Op: %E.as.Destroy.impl.Op.type = struct_value () [symbolic]
  906. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  907. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  908. // CHECK:STDOUT: }
  909. // CHECK:STDOUT:
  910. // CHECK:STDOUT: imports {
  911. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  912. // CHECK:STDOUT: .Destroy = %Core.Destroy
  913. // CHECK:STDOUT: import Core//prelude
  914. // CHECK:STDOUT: import Core//prelude/...
  915. // CHECK:STDOUT: }
  916. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  917. // CHECK:STDOUT: }
  918. // CHECK:STDOUT:
  919. // CHECK:STDOUT: file {
  920. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  921. // CHECK:STDOUT: .Core = imports.%Core
  922. // CHECK:STDOUT: .E = %E.decl.loc4
  923. // CHECK:STDOUT: }
  924. // CHECK:STDOUT: %Core.import = import Core
  925. // CHECK:STDOUT: %E.decl.loc4: %E.type.b0f8dc.1 = class_decl @E.loc4 [concrete = constants.%E.generic.f281ba.1] {
  926. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  927. // CHECK:STDOUT: } {
  928. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  929. // CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)]
  930. // CHECK:STDOUT: }
  931. // CHECK:STDOUT: %E.decl.loc12: %E.type.b0f8dc.2 = class_decl @E.loc12 [concrete = constants.%E.generic.f281ba.2] {
  932. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 0 [concrete]
  933. // CHECK:STDOUT: } {
  934. // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  935. // CHECK:STDOUT: %U.loc12_9.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc12_9.1 (constants.%U)]
  936. // CHECK:STDOUT: }
  937. // CHECK:STDOUT: }
  938. // CHECK:STDOUT:
  939. // CHECK:STDOUT: generic impl @E.as.Destroy.impl(@E.loc12.%U.loc12_9.2: type) {
  940. // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)]
  941. // CHECK:STDOUT: %E: type = class_type @E.loc12, @E.loc12(%U) [symbolic = %E (constants.%E.ec9c10.2)]
  942. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness @E.loc12.%Destroy.impl_witness_table, @E.as.Destroy.impl(%U) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness)]
  943. // CHECK:STDOUT:
  944. // CHECK:STDOUT: !definition:
  945. // CHECK:STDOUT: %E.as.Destroy.impl.Op.type: type = fn_type @E.as.Destroy.impl.Op, @E.as.Destroy.impl(%U) [symbolic = %E.as.Destroy.impl.Op.type (constants.%E.as.Destroy.impl.Op.type)]
  946. // CHECK:STDOUT: %E.as.Destroy.impl.Op: @E.as.Destroy.impl.%E.as.Destroy.impl.Op.type (%E.as.Destroy.impl.Op.type) = struct_value () [symbolic = %E.as.Destroy.impl.Op (constants.%E.as.Destroy.impl.Op)]
  947. // CHECK:STDOUT:
  948. // CHECK:STDOUT: impl: @E.loc12.%Self.ref as constants.%Destroy.type {
  949. // CHECK:STDOUT: %E.as.Destroy.impl.Op.decl: @E.as.Destroy.impl.%E.as.Destroy.impl.Op.type (%E.as.Destroy.impl.Op.type) = fn_decl @E.as.Destroy.impl.Op [symbolic = @E.as.Destroy.impl.%E.as.Destroy.impl.Op (constants.%E.as.Destroy.impl.Op)] {
  950. // CHECK:STDOUT: %self.patt: @E.as.Destroy.impl.Op.%pattern_type (%pattern_type.3d9) = binding_pattern self [concrete]
  951. // CHECK:STDOUT: %self.param_patt: @E.as.Destroy.impl.Op.%pattern_type (%pattern_type.3d9) = value_param_pattern %self.patt, call_param0 [concrete]
  952. // CHECK:STDOUT: %.loc12_19.1: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  953. // CHECK:STDOUT: } {
  954. // CHECK:STDOUT: %self.param: @E.as.Destroy.impl.Op.%ptr (%ptr.878) = value_param call_param0
  955. // CHECK:STDOUT: %.loc12_19.2: type = splice_block %Self.ref [symbolic = %E (constants.%E.ec9c10.2)] {
  956. // CHECK:STDOUT: %.loc12_19.3: type = specific_constant constants.%E.ec9c10.2, @E.loc12(constants.%U) [symbolic = %E (constants.%E.ec9c10.2)]
  957. // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc12_19.3 [symbolic = %E (constants.%E.ec9c10.2)]
  958. // CHECK:STDOUT: }
  959. // CHECK:STDOUT: %self: @E.as.Destroy.impl.Op.%ptr (%ptr.878) = bind_name self, %self.param
  960. // CHECK:STDOUT: }
  961. // CHECK:STDOUT:
  962. // CHECK:STDOUT: !members:
  963. // CHECK:STDOUT: .Op = %E.as.Destroy.impl.Op.decl
  964. // CHECK:STDOUT: witness = @E.loc12.%Destroy.impl_witness
  965. // CHECK:STDOUT: }
  966. // CHECK:STDOUT: }
  967. // CHECK:STDOUT:
  968. // CHECK:STDOUT: generic class @E.loc4(%T.loc4_9.2: type) {
  969. // CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.1 (constants.%T)]
  970. // CHECK:STDOUT:
  971. // CHECK:STDOUT: class;
  972. // CHECK:STDOUT: }
  973. // CHECK:STDOUT:
  974. // CHECK:STDOUT: generic class @E.loc12(%U.loc12_9.2: type) {
  975. // CHECK:STDOUT: %U.loc12_9.1: type = bind_symbolic_name U, 0 [symbolic = %U.loc12_9.1 (constants.%U)]
  976. // CHECK:STDOUT:
  977. // CHECK:STDOUT: !definition:
  978. // CHECK:STDOUT:
  979. // CHECK:STDOUT: class {
  980. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E.ec9c10.2 [symbolic = @E.as.Destroy.impl.%E (constants.%E.ec9c10.2)]
  981. // CHECK:STDOUT: impl_decl @E.as.Destroy.impl [concrete] {} {}
  982. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@E.as.Destroy.impl.%E.as.Destroy.impl.Op.decl), @E.as.Destroy.impl [concrete]
  983. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table, @E.as.Destroy.impl(constants.%U) [symbolic = @E.as.Destroy.impl.%Destroy.impl_witness (constants.%Destroy.impl_witness)]
  984. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  985. // CHECK:STDOUT: complete_type_witness = %complete_type
  986. // CHECK:STDOUT:
  987. // CHECK:STDOUT: !members:
  988. // CHECK:STDOUT: .Self = constants.%E.ec9c10.2
  989. // CHECK:STDOUT: }
  990. // CHECK:STDOUT: }
  991. // CHECK:STDOUT:
  992. // CHECK:STDOUT: generic fn @E.as.Destroy.impl.Op(@E.loc12.%U.loc12_9.2: type) {
  993. // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)]
  994. // CHECK:STDOUT: %E: type = class_type @E.loc12, @E.loc12(%U) [symbolic = %E (constants.%E.ec9c10.2)]
  995. // CHECK:STDOUT: %ptr: type = ptr_type %E [symbolic = %ptr (constants.%ptr.878)]
  996. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [symbolic = %pattern_type (constants.%pattern_type.3d9)]
  997. // CHECK:STDOUT:
  998. // CHECK:STDOUT: !definition:
  999. // CHECK:STDOUT:
  1000. // CHECK:STDOUT: fn(%self.param: @E.as.Destroy.impl.Op.%ptr (%ptr.878)) = "no_op";
  1001. // CHECK:STDOUT: }
  1002. // CHECK:STDOUT:
  1003. // CHECK:STDOUT: specific @E.loc4(constants.%T) {
  1004. // CHECK:STDOUT: %T.loc4_9.1 => constants.%T
  1005. // CHECK:STDOUT: }
  1006. // CHECK:STDOUT:
  1007. // CHECK:STDOUT: specific @E.loc12(constants.%U) {
  1008. // CHECK:STDOUT: %U.loc12_9.1 => constants.%U
  1009. // CHECK:STDOUT: }
  1010. // CHECK:STDOUT:
  1011. // CHECK:STDOUT: specific @E.as.Destroy.impl(constants.%U) {
  1012. // CHECK:STDOUT: %U => constants.%U
  1013. // CHECK:STDOUT: %E => constants.%E.ec9c10.2
  1014. // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness
  1015. // CHECK:STDOUT: }
  1016. // CHECK:STDOUT:
  1017. // CHECK:STDOUT: specific @E.as.Destroy.impl.Op(constants.%U) {
  1018. // CHECK:STDOUT: %U => constants.%U
  1019. // CHECK:STDOUT: %E => constants.%E.ec9c10.2
  1020. // CHECK:STDOUT: %ptr => constants.%ptr.878
  1021. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3d9
  1022. // CHECK:STDOUT: }
  1023. // CHECK:STDOUT: