import.carbon 141 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584
  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. // AUTOUPDATE
  6. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/generic/import.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/generic/import.carbon
  10. // --- foo.carbon
  11. library "[[@TEST_NAME]]";
  12. class Class(T:! type);
  13. class CompleteClass(T:! type) {
  14. var n: i32;
  15. fn F() -> i32 { return 0; }
  16. }
  17. fn F() -> CompleteClass(i32);
  18. // --- foo.impl.carbon
  19. impl library "[[@TEST_NAME]]";
  20. class Class(T:! type) {
  21. var x: T;
  22. }
  23. fn F() -> CompleteClass(i32) {
  24. return {.n = 1};
  25. }
  26. // --- use_foo.carbon
  27. library "[[@TEST_NAME]]";
  28. import library "foo";
  29. fn UseMethod() -> i32 {
  30. var v: CompleteClass(i32) = F();
  31. return v.F();
  32. }
  33. fn UseField() -> i32 {
  34. var v: CompleteClass(i32) = F();
  35. return v.n;
  36. }
  37. // --- fail_generic_arg_mismatch.carbon
  38. library "[[@TEST_NAME]]";
  39. import library "foo";
  40. fn Use() {
  41. // TODO: Include the generic arguments in the formatted type name.
  42. // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+7]]:3: error: cannot implicitly convert from `CompleteClass(i32)` to `CompleteClass(i32*)` [ImplicitAsConversionFailure]
  43. // CHECK:STDERR: var v: CompleteClass(i32*) = F();
  44. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  45. // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+4]]:3: note: type `CompleteClass(i32)` does not implement interface `ImplicitAs(CompleteClass(i32*))` [MissingImplInMemberAccessNote]
  46. // CHECK:STDERR: var v: CompleteClass(i32*) = F();
  47. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  48. // CHECK:STDERR:
  49. var v: CompleteClass(i32*) = F();
  50. }
  51. // --- fail_foo.impl.carbon
  52. impl library "[[@TEST_NAME]]";
  53. // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+8]]:13: error: redeclaration differs at parameter 1 [RedeclParamDiffers]
  54. // CHECK:STDERR: class Class(U:! type) {
  55. // CHECK:STDERR: ^~~~~~~~
  56. // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE-5]]:6: in import [InImport]
  57. // CHECK:STDERR: foo.carbon:4:13: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
  58. // CHECK:STDERR: class Class(T:! type);
  59. // CHECK:STDERR: ^~~~~~~~
  60. // CHECK:STDERR:
  61. class Class(U:! type) {
  62. // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+3]]:10: error: name `T` not found [NameNotFound]
  63. // CHECK:STDERR: var x: T;
  64. // CHECK:STDERR: ^
  65. var x: T;
  66. }
  67. // CHECK:STDOUT: --- foo.carbon
  68. // CHECK:STDOUT:
  69. // CHECK:STDOUT: constants {
  70. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  71. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  72. // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
  73. // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
  74. // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template]
  75. // CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template]
  76. // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
  77. // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
  78. // CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
  79. // CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
  80. // CHECK:STDOUT: %i32: type = int_type signed, %.1 [template]
  81. // CHECK:STDOUT: %.2: type = unbound_element_type %CompleteClass.2, %i32 [symbolic]
  82. // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic]
  83. // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic]
  84. // CHECK:STDOUT: %.3: type = struct_type {.n: %i32} [template]
  85. // CHECK:STDOUT: %.4: <witness> = complete_type_witness %.3 [template]
  86. // CHECK:STDOUT: %.5: Core.IntLiteral = int_value 0 [template]
  87. // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
  88. // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template]
  89. // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
  90. // CHECK:STDOUT: %.25: <witness> = interface_witness (%Convert.14) [template]
  91. // CHECK:STDOUT: %.26: <bound method> = bound_method %.5, %Convert.14 [template]
  92. // CHECK:STDOUT: %.27: <specific function> = specific_function %.26, @Convert.2(%.1) [template]
  93. // CHECK:STDOUT: %.28: %i32 = int_value 0 [template]
  94. // CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%i32) [template]
  95. // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template]
  96. // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
  97. // CHECK:STDOUT: }
  98. // CHECK:STDOUT:
  99. // CHECK:STDOUT: imports {
  100. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  101. // CHECK:STDOUT: .Int = %import_ref.1
  102. // CHECK:STDOUT: .ImplicitAs = %import_ref.2
  103. // CHECK:STDOUT: import Core//prelude
  104. // CHECK:STDOUT: import Core//prelude/...
  105. // CHECK:STDOUT: }
  106. // CHECK:STDOUT: }
  107. // CHECK:STDOUT:
  108. // CHECK:STDOUT: file {
  109. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  110. // CHECK:STDOUT: .Core = imports.%Core
  111. // CHECK:STDOUT: .Class = %Class.decl
  112. // CHECK:STDOUT: .CompleteClass = %CompleteClass.decl
  113. // CHECK:STDOUT: .F = %F.decl
  114. // CHECK:STDOUT: }
  115. // CHECK:STDOUT: %Core.import = import Core
  116. // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
  117. // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)]
  118. // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param<invalid> [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)]
  119. // CHECK:STDOUT: } {
  120. // CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
  121. // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)]
  122. // CHECK:STDOUT: }
  123. // CHECK:STDOUT: %CompleteClass.decl: %CompleteClass.type = class_decl @CompleteClass [template = constants.%CompleteClass.1] {
  124. // CHECK:STDOUT: %T.patt.loc6_21.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_21.2 (constants.%T.patt)]
  125. // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc6_21.1, runtime_param<invalid> [symbolic = %T.patt.loc6_21.2 (constants.%T.patt)]
  126. // CHECK:STDOUT: } {
  127. // CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
  128. // CHECK:STDOUT: %T.loc6_21.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_21.2 (constants.%T)]
  129. // CHECK:STDOUT: }
  130. // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {
  131. // CHECK:STDOUT: %return.patt: %CompleteClass.3 = return_slot_pattern
  132. // CHECK:STDOUT: %return.param_patt: %CompleteClass.3 = out_param_pattern %return.patt, runtime_param0
  133. // CHECK:STDOUT: } {
  134. // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, file.%CompleteClass.decl [template = constants.%CompleteClass.1]
  135. // CHECK:STDOUT: %.loc11_25: Core.IntLiteral = int_value 32 [template = constants.%.1]
  136. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_25) [template = constants.%i32]
  137. // CHECK:STDOUT: %.loc11_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
  138. // CHECK:STDOUT: %.loc11_24.2: type = converted %int.make_type_signed, %.loc11_24.1 [template = constants.%i32]
  139. // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3]
  140. // CHECK:STDOUT: %return.param: ref %CompleteClass.3 = out_param runtime_param0
  141. // CHECK:STDOUT: %return: ref %CompleteClass.3 = return_slot %return.param
  142. // CHECK:STDOUT: }
  143. // CHECK:STDOUT: }
  144. // CHECK:STDOUT:
  145. // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type) {
  146. // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)]
  147. // CHECK:STDOUT: %T.patt.loc4_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)]
  148. // CHECK:STDOUT:
  149. // CHECK:STDOUT: class;
  150. // CHECK:STDOUT: }
  151. // CHECK:STDOUT:
  152. // CHECK:STDOUT: generic class @CompleteClass(%T.loc6_21.1: type) {
  153. // CHECK:STDOUT: %T.loc6_21.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc6_21.2 (constants.%T)]
  154. // CHECK:STDOUT: %T.patt.loc6_21.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_21.2 (constants.%T.patt)]
  155. // CHECK:STDOUT:
  156. // CHECK:STDOUT: !definition:
  157. // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T.loc6_21.2) [symbolic = %CompleteClass (constants.%CompleteClass.2)]
  158. // CHECK:STDOUT: %.loc7_8.2: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.loc7_8.2 (constants.%.2)]
  159. // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T.loc6_21.2) [symbolic = %F.type (constants.%F.type.1)]
  160. // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)]
  161. // CHECK:STDOUT:
  162. // CHECK:STDOUT: class {
  163. // CHECK:STDOUT: %.loc7_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
  164. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc7_10.1) [template = constants.%i32]
  165. // CHECK:STDOUT: %.loc7_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
  166. // CHECK:STDOUT: %.loc7_10.3: type = converted %int.make_type_signed, %.loc7_10.2 [template = constants.%i32]
  167. // CHECK:STDOUT: %.loc7_8.1: @CompleteClass.%.loc7_8.2 (%.2) = field_decl n, element0 [template]
  168. // CHECK:STDOUT: %F.decl: @CompleteClass.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @CompleteClass.%F (constants.%F.1)] {
  169. // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
  170. // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0
  171. // CHECK:STDOUT: } {
  172. // CHECK:STDOUT: %.loc8_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
  173. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_13.1) [template = constants.%i32]
  174. // CHECK:STDOUT: %.loc8_13.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
  175. // CHECK:STDOUT: %.loc8_13.3: type = converted %int.make_type_signed, %.loc8_13.2 [template = constants.%i32]
  176. // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0
  177. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  178. // CHECK:STDOUT: }
  179. // CHECK:STDOUT: %.loc9: <witness> = complete_type_witness %.3 [template = constants.%.4]
  180. // CHECK:STDOUT:
  181. // CHECK:STDOUT: !members:
  182. // CHECK:STDOUT: .Self = constants.%CompleteClass.2
  183. // CHECK:STDOUT: .n = %.loc7_8.1
  184. // CHECK:STDOUT: .F = %F.decl
  185. // CHECK:STDOUT: }
  186. // CHECK:STDOUT: }
  187. // CHECK:STDOUT:
  188. // CHECK:STDOUT: generic fn @F.1(@CompleteClass.%T.loc6_21.1: type) {
  189. // CHECK:STDOUT: !definition:
  190. // CHECK:STDOUT:
  191. // CHECK:STDOUT: fn() -> %i32 {
  192. // CHECK:STDOUT: !entry:
  193. // CHECK:STDOUT: %.loc8_26: Core.IntLiteral = int_value 0 [template = constants.%.5]
  194. // CHECK:STDOUT: %.loc8_27.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14]
  195. // CHECK:STDOUT: %.loc8_27.2: <bound method> = bound_method %.loc8_26, %.loc8_27.1 [template = constants.%.26]
  196. // CHECK:STDOUT: %.loc8_27.3: <specific function> = specific_function %.loc8_27.2, @Convert.2(constants.%.1) [template = constants.%.27]
  197. // CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc8_27.3(%.loc8_26) [template = constants.%.28]
  198. // CHECK:STDOUT: %.loc8_27.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.28]
  199. // CHECK:STDOUT: %.loc8_27.5: %i32 = converted %.loc8_26, %.loc8_27.4 [template = constants.%.28]
  200. // CHECK:STDOUT: return %.loc8_27.5
  201. // CHECK:STDOUT: }
  202. // CHECK:STDOUT: }
  203. // CHECK:STDOUT:
  204. // CHECK:STDOUT: fn @F.2() -> %CompleteClass.3;
  205. // CHECK:STDOUT:
  206. // CHECK:STDOUT: specific @Class(constants.%T) {
  207. // CHECK:STDOUT: %T.loc4_13.2 => constants.%T
  208. // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%T
  209. // CHECK:STDOUT: }
  210. // CHECK:STDOUT:
  211. // CHECK:STDOUT: specific @CompleteClass(constants.%T) {
  212. // CHECK:STDOUT: %T.loc6_21.2 => constants.%T
  213. // CHECK:STDOUT: %T.patt.loc6_21.2 => constants.%T
  214. // CHECK:STDOUT:
  215. // CHECK:STDOUT: !definition:
  216. // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2
  217. // CHECK:STDOUT: %.loc7_8.2 => constants.%.2
  218. // CHECK:STDOUT: %F.type => constants.%F.type.1
  219. // CHECK:STDOUT: %F => constants.%F.1
  220. // CHECK:STDOUT: }
  221. // CHECK:STDOUT:
  222. // CHECK:STDOUT: specific @F.1(constants.%T) {}
  223. // CHECK:STDOUT:
  224. // CHECK:STDOUT: specific @CompleteClass(%T.loc6_21.2) {
  225. // CHECK:STDOUT: %T.loc6_21.2 => constants.%T
  226. // CHECK:STDOUT: %T.patt.loc6_21.2 => constants.%T
  227. // CHECK:STDOUT: }
  228. // CHECK:STDOUT:
  229. // CHECK:STDOUT: specific @CompleteClass(constants.%i32) {
  230. // CHECK:STDOUT: %T.loc6_21.2 => constants.%i32
  231. // CHECK:STDOUT: %T.patt.loc6_21.2 => constants.%i32
  232. // CHECK:STDOUT: }
  233. // CHECK:STDOUT:
  234. // CHECK:STDOUT: --- foo.impl.carbon
  235. // CHECK:STDOUT:
  236. // CHECK:STDOUT: constants {
  237. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  238. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic]
  239. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
  240. // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
  241. // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic]
  242. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
  243. // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic]
  244. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
  245. // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
  246. // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
  247. // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
  248. // CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
  249. // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.10 [symbolic]
  250. // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic]
  251. // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic]
  252. // CHECK:STDOUT: %.3: <witness> = interface_witness (%Convert.2) [symbolic]
  253. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic]
  254. // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic]
  255. // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic]
  256. // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
  257. // CHECK:STDOUT: %.4: <witness> = interface_witness (%Convert.3) [symbolic]
  258. // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
  259. // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic]
  260. // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
  261. // CHECK:STDOUT: %.5: <witness> = interface_witness (%Convert.4) [symbolic]
  262. // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
  263. // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
  264. // CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template]
  265. // CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.17 [template]
  266. // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic]
  267. // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
  268. // CHECK:STDOUT: %.8: <witness> = interface_witness (%Convert.6) [symbolic]
  269. // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
  270. // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic]
  271. // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
  272. // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
  273. // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic]
  274. // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
  275. // CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic]
  276. // CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.27 [symbolic]
  277. // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic]
  278. // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
  279. // CHECK:STDOUT: %.11: <witness> = interface_witness (%Convert.8) [symbolic]
  280. // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic]
  281. // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic]
  282. // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic]
  283. // CHECK:STDOUT: %.12: <witness> = interface_witness (%Convert.9) [symbolic]
  284. // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template]
  285. // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic]
  286. // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
  287. // CHECK:STDOUT: %.13: <witness> = interface_witness (%Convert.10) [symbolic]
  288. // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
  289. // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template]
  290. // CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template]
  291. // CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.34 [template]
  292. // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic]
  293. // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic]
  294. // CHECK:STDOUT: %.16: <witness> = interface_witness (%Convert.12) [symbolic]
  295. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  296. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  297. // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
  298. // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
  299. // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic]
  300. // CHECK:STDOUT: %.17: type = unbound_element_type %Class.2, %T [symbolic]
  301. // CHECK:STDOUT: %.18: type = struct_type {.x: %T} [symbolic]
  302. // CHECK:STDOUT: %.19: <witness> = complete_type_witness %.18 [symbolic]
  303. // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template]
  304. // CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template]
  305. // CHECK:STDOUT: %.20: Core.IntLiteral = int_value 32 [template]
  306. // CHECK:STDOUT: %i32: type = int_type signed, %.20 [template]
  307. // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
  308. // CHECK:STDOUT: %.23: type = unbound_element_type %CompleteClass.2, %i32 [symbolic]
  309. // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic]
  310. // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic]
  311. // CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
  312. // CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
  313. // CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%i32) [template]
  314. // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template]
  315. // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
  316. // CHECK:STDOUT: %.24: type = unbound_element_type %CompleteClass.3, %i32 [template]
  317. // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @CompleteClass(%i32) [template]
  318. // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template]
  319. // CHECK:STDOUT: %.26: Core.IntLiteral = int_value 1 [template]
  320. // CHECK:STDOUT: %.27: type = struct_type {.n: Core.IntLiteral} [template]
  321. // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template]
  322. // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
  323. // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template]
  324. // CHECK:STDOUT: %.28: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template]
  325. // CHECK:STDOUT: %.29: %.28 = assoc_entity element0, imports.%import_ref.10 [template]
  326. // CHECK:STDOUT: %.30: %.1 = assoc_entity element0, imports.%import_ref.43 [symbolic]
  327. // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.20) [template]
  328. // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template]
  329. // CHECK:STDOUT: %.31: <witness> = interface_witness (%Convert.14) [template]
  330. // CHECK:STDOUT: %.32: <bound method> = bound_method %.26, %Convert.14 [template]
  331. // CHECK:STDOUT: %.33: <specific function> = specific_function %.32, @Convert.2(%.20) [template]
  332. // CHECK:STDOUT: %.34: %i32 = int_value 1 [template]
  333. // CHECK:STDOUT: %struct: %CompleteClass.3 = struct_value (%.34) [template]
  334. // CHECK:STDOUT: }
  335. // CHECK:STDOUT:
  336. // CHECK:STDOUT: imports {
  337. // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.1]
  338. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  339. // CHECK:STDOUT: .Int = %import_ref.41
  340. // CHECK:STDOUT: .ImplicitAs = %import_ref.42
  341. // CHECK:STDOUT: import Core//prelude
  342. // CHECK:STDOUT: import Core//prelude/...
  343. // CHECK:STDOUT: }
  344. // CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+77, unloaded
  345. // CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.1) = import_ref Main//foo, inst+78, loaded [symbolic = @ImplicitAs.%.2 (constants.%.30)]
  346. // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+79, unloaded
  347. // CHECK:STDOUT: %import_ref.7: type = import_ref Main//foo, inst+121, loaded [template = Core.IntLiteral]
  348. // CHECK:STDOUT: %import_ref.8: type = import_ref Main//foo, inst+122, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)]
  349. // CHECK:STDOUT: %import_ref.9: <witness> = import_ref Main//foo, inst+123, loaded [symbolic = @impl.1.%.1 (constants.%.3)]
  350. // CHECK:STDOUT: %import_ref.10 = import_ref Main//foo, inst+94, unloaded
  351. // CHECK:STDOUT: %import_ref.11: type = import_ref Main//foo, inst+151, loaded [template = Core.IntLiteral]
  352. // CHECK:STDOUT: %import_ref.12: type = import_ref Main//foo, inst+152, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
  353. // CHECK:STDOUT: %import_ref.13 = import_ref Main//foo, inst+153, unloaded
  354. // CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+180, loaded [symbolic = @impl.3.%iN (constants.%iN)]
  355. // CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+181, loaded [template = constants.%ImplicitAs.type.5]
  356. // CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+182, unloaded
  357. // CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+212, loaded [symbolic = @impl.4.%uN (constants.%uN)]
  358. // CHECK:STDOUT: %import_ref.19: type = import_ref Main//foo, inst+213, loaded [template = constants.%ImplicitAs.type.5]
  359. // CHECK:STDOUT: %import_ref.20 = import_ref Main//foo, inst+214, unloaded
  360. // CHECK:STDOUT: %import_ref.21 = import_ref Main//foo, inst+244, unloaded
  361. // CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+245, unloaded
  362. // CHECK:STDOUT: %import_ref.23 = import_ref Main//foo, inst+246, unloaded
  363. // CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+252, loaded [template = Core.IntLiteral]
  364. // CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+253, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
  365. // CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+254, unloaded
  366. // CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+269, unloaded
  367. // CHECK:STDOUT: %import_ref.28: type = import_ref Main//foo, inst+306, loaded [template = Core.IntLiteral]
  368. // CHECK:STDOUT: %import_ref.29: type = import_ref Main//foo, inst+307, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
  369. // CHECK:STDOUT: %import_ref.30 = import_ref Main//foo, inst+308, unloaded
  370. // CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+335, loaded [symbolic = @impl.7.%iN (constants.%iN)]
  371. // CHECK:STDOUT: %import_ref.32: type = import_ref Main//foo, inst+336, loaded [template = constants.%As.type.5]
  372. // CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+337, unloaded
  373. // CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+367, loaded [symbolic = @impl.8.%uN (constants.%uN)]
  374. // CHECK:STDOUT: %import_ref.36: type = import_ref Main//foo, inst+368, loaded [template = constants.%As.type.5]
  375. // CHECK:STDOUT: %import_ref.37 = import_ref Main//foo, inst+369, unloaded
  376. // CHECK:STDOUT: %import_ref.38 = import_ref Main//foo, inst+25, unloaded
  377. // CHECK:STDOUT: %import_ref.39 = import_ref Main//foo, inst+44, unloaded
  378. // CHECK:STDOUT: %import_ref.40 = import_ref Main//foo, inst+53, unloaded
  379. // CHECK:STDOUT: }
  380. // CHECK:STDOUT:
  381. // CHECK:STDOUT: file {
  382. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  383. // CHECK:STDOUT: .Class = %Class.decl
  384. // CHECK:STDOUT: .CompleteClass = imports.%import_ref.2
  385. // CHECK:STDOUT: .F = %F.decl
  386. // CHECK:STDOUT: .Core = imports.%Core
  387. // CHECK:STDOUT: }
  388. // CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
  389. // CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
  390. // CHECK:STDOUT: %Core.import = import Core
  391. // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.1] {
  392. // CHECK:STDOUT: %T.patt.loc4: type = symbolic_binding_pattern T, 0 [symbolic = constants.%T.patt]
  393. // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4, runtime_param<invalid> [symbolic = constants.%T.patt]
  394. // CHECK:STDOUT: } {
  395. // CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
  396. // CHECK:STDOUT: %T.loc4: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T]
  397. // CHECK:STDOUT: }
  398. // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {
  399. // CHECK:STDOUT: %return.patt: %CompleteClass.3 = return_slot_pattern
  400. // CHECK:STDOUT: %return.param_patt: %CompleteClass.3 = out_param_pattern %return.patt, runtime_param0
  401. // CHECK:STDOUT: } {
  402. // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.1]
  403. // CHECK:STDOUT: %.loc8_25: Core.IntLiteral = int_value 32 [template = constants.%.20]
  404. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_25) [template = constants.%i32]
  405. // CHECK:STDOUT: %.loc8_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
  406. // CHECK:STDOUT: %.loc8_24.2: type = converted %int.make_type_signed, %.loc8_24.1 [template = constants.%i32]
  407. // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3]
  408. // CHECK:STDOUT: %return.param: ref %CompleteClass.3 = out_param runtime_param0
  409. // CHECK:STDOUT: %return: ref %CompleteClass.3 = return_slot %return.param
  410. // CHECK:STDOUT: }
  411. // CHECK:STDOUT: }
  412. // CHECK:STDOUT:
  413. // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
  414. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  415. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
  416. // CHECK:STDOUT:
  417. // CHECK:STDOUT: !definition:
  418. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
  419. // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
  420. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
  421. // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
  422. // CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)]
  423. // CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.2)]
  424. // CHECK:STDOUT:
  425. // CHECK:STDOUT: interface {
  426. // CHECK:STDOUT: !members:
  427. // CHECK:STDOUT: .Self = imports.%import_ref.4
  428. // CHECK:STDOUT: .Convert = imports.%import_ref.5
  429. // CHECK:STDOUT: witness = (imports.%import_ref.6)
  430. // CHECK:STDOUT: }
  431. // CHECK:STDOUT: }
  432. // CHECK:STDOUT:
  433. // CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
  434. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  435. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
  436. // CHECK:STDOUT:
  437. // CHECK:STDOUT: !definition:
  438. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
  439. // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
  440. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)]
  441. // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
  442. // CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)]
  443. // CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.27 [symbolic = %.2 (constants.%.10)]
  444. // CHECK:STDOUT:
  445. // CHECK:STDOUT: interface {
  446. // CHECK:STDOUT: !members:
  447. // CHECK:STDOUT: .Self = imports.%import_ref.21
  448. // CHECK:STDOUT: .Convert = imports.%import_ref.22
  449. // CHECK:STDOUT: witness = (imports.%import_ref.23)
  450. // CHECK:STDOUT: }
  451. // CHECK:STDOUT: }
  452. // CHECK:STDOUT:
  453. // CHECK:STDOUT: generic impl @impl.1(constants.%N: Core.IntLiteral) {
  454. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  455. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  456. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  457. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3)]
  458. // CHECK:STDOUT:
  459. // CHECK:STDOUT: !definition:
  460. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)]
  461. // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)]
  462. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)]
  463. // CHECK:STDOUT:
  464. // CHECK:STDOUT: impl: imports.%import_ref.7 as imports.%import_ref.8 {
  465. // CHECK:STDOUT: !members:
  466. // CHECK:STDOUT: witness = imports.%import_ref.9
  467. // CHECK:STDOUT: }
  468. // CHECK:STDOUT: }
  469. // CHECK:STDOUT:
  470. // CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
  471. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  472. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  473. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  474. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
  475. // CHECK:STDOUT:
  476. // CHECK:STDOUT: !definition:
  477. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
  478. // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
  479. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)]
  480. // CHECK:STDOUT:
  481. // CHECK:STDOUT: impl: imports.%import_ref.11 as imports.%import_ref.12 {
  482. // CHECK:STDOUT: !members:
  483. // CHECK:STDOUT: witness = imports.%import_ref.13
  484. // CHECK:STDOUT: }
  485. // CHECK:STDOUT: }
  486. // CHECK:STDOUT:
  487. // CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
  488. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  489. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  490. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  491. // CHECK:STDOUT:
  492. // CHECK:STDOUT: !definition:
  493. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
  494. // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
  495. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)]
  496. // CHECK:STDOUT:
  497. // CHECK:STDOUT: impl: imports.%import_ref.14 as imports.%import_ref.15 {
  498. // CHECK:STDOUT: !members:
  499. // CHECK:STDOUT: witness = imports.%import_ref.16
  500. // CHECK:STDOUT: }
  501. // CHECK:STDOUT: }
  502. // CHECK:STDOUT:
  503. // CHECK:STDOUT: generic impl @impl.4(constants.%N: Core.IntLiteral) {
  504. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  505. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  506. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  507. // CHECK:STDOUT:
  508. // CHECK:STDOUT: !definition:
  509. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
  510. // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
  511. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)]
  512. // CHECK:STDOUT:
  513. // CHECK:STDOUT: impl: imports.%import_ref.18 as imports.%import_ref.19 {
  514. // CHECK:STDOUT: !members:
  515. // CHECK:STDOUT: witness = imports.%import_ref.20
  516. // CHECK:STDOUT: }
  517. // CHECK:STDOUT: }
  518. // CHECK:STDOUT:
  519. // CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
  520. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  521. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  522. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  523. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%iN)> [symbolic = %As.type (constants.%As.type.3)]
  524. // CHECK:STDOUT:
  525. // CHECK:STDOUT: !definition:
  526. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)]
  527. // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
  528. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)]
  529. // CHECK:STDOUT:
  530. // CHECK:STDOUT: impl: imports.%import_ref.24 as imports.%import_ref.25 {
  531. // CHECK:STDOUT: !members:
  532. // CHECK:STDOUT: witness = imports.%import_ref.26
  533. // CHECK:STDOUT: }
  534. // CHECK:STDOUT: }
  535. // CHECK:STDOUT:
  536. // CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
  537. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  538. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  539. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  540. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%uN)> [symbolic = %As.type (constants.%As.type.4)]
  541. // CHECK:STDOUT:
  542. // CHECK:STDOUT: !definition:
  543. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)]
  544. // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)]
  545. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)]
  546. // CHECK:STDOUT:
  547. // CHECK:STDOUT: impl: imports.%import_ref.28 as imports.%import_ref.29 {
  548. // CHECK:STDOUT: !members:
  549. // CHECK:STDOUT: witness = imports.%import_ref.30
  550. // CHECK:STDOUT: }
  551. // CHECK:STDOUT: }
  552. // CHECK:STDOUT:
  553. // CHECK:STDOUT: generic impl @impl.7(constants.%N: Core.IntLiteral) {
  554. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  555. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  556. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  557. // CHECK:STDOUT:
  558. // CHECK:STDOUT: !definition:
  559. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
  560. // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
  561. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)]
  562. // CHECK:STDOUT:
  563. // CHECK:STDOUT: impl: imports.%import_ref.31 as imports.%import_ref.32 {
  564. // CHECK:STDOUT: !members:
  565. // CHECK:STDOUT: witness = imports.%import_ref.33
  566. // CHECK:STDOUT: }
  567. // CHECK:STDOUT: }
  568. // CHECK:STDOUT:
  569. // CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
  570. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  571. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  572. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  573. // CHECK:STDOUT:
  574. // CHECK:STDOUT: !definition:
  575. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)]
  576. // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)]
  577. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)]
  578. // CHECK:STDOUT:
  579. // CHECK:STDOUT: impl: imports.%import_ref.35 as imports.%import_ref.36 {
  580. // CHECK:STDOUT: !members:
  581. // CHECK:STDOUT: witness = imports.%import_ref.37
  582. // CHECK:STDOUT: }
  583. // CHECK:STDOUT: }
  584. // CHECK:STDOUT:
  585. // CHECK:STDOUT: generic class @Class(constants.%T: type) {
  586. // CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)]
  587. // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.1 (constants.%T.patt)]
  588. // CHECK:STDOUT:
  589. // CHECK:STDOUT: !definition:
  590. // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.1) [symbolic = %Class (constants.%Class.2)]
  591. // CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.1 (%T) [symbolic = %.loc5_8.2 (constants.%.17)]
  592. // CHECK:STDOUT: %.loc6_1.2: type = struct_type {.x: @Class.%T.1 (%T)} [symbolic = %.loc6_1.2 (constants.%.18)]
  593. // CHECK:STDOUT: %.loc6_1.3: <witness> = complete_type_witness @Class.%.loc6_1.2 (%.18) [symbolic = %.loc6_1.3 (constants.%.19)]
  594. // CHECK:STDOUT:
  595. // CHECK:STDOUT: class {
  596. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = %T.1 (constants.%T)]
  597. // CHECK:STDOUT: %.loc5_8.1: @Class.%.loc5_8.2 (%.17) = field_decl x, element0 [template]
  598. // CHECK:STDOUT: %.loc6_1.1: <witness> = complete_type_witness %.18 [symbolic = %.loc6_1.3 (constants.%.19)]
  599. // CHECK:STDOUT:
  600. // CHECK:STDOUT: !members:
  601. // CHECK:STDOUT: .Self = constants.%Class.2
  602. // CHECK:STDOUT: .x = %.loc5_8.1
  603. // CHECK:STDOUT: }
  604. // CHECK:STDOUT: }
  605. // CHECK:STDOUT:
  606. // CHECK:STDOUT: generic class @CompleteClass(constants.%T: type) {
  607. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  608. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
  609. // CHECK:STDOUT:
  610. // CHECK:STDOUT: !definition:
  611. // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.2)]
  612. // CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.1 (constants.%.23)]
  613. // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)]
  614. // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)]
  615. // CHECK:STDOUT:
  616. // CHECK:STDOUT: class {
  617. // CHECK:STDOUT: !members:
  618. // CHECK:STDOUT: .Self = imports.%import_ref.38
  619. // CHECK:STDOUT: .n = imports.%import_ref.39
  620. // CHECK:STDOUT: .F = imports.%import_ref.40
  621. // CHECK:STDOUT: }
  622. // CHECK:STDOUT: }
  623. // CHECK:STDOUT:
  624. // CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) {
  625. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  626. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
  627. // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
  628. // CHECK:STDOUT:
  629. // CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest);
  630. // CHECK:STDOUT: }
  631. // CHECK:STDOUT:
  632. // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
  633. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  634. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  635. // CHECK:STDOUT:
  636. // CHECK:STDOUT: !definition:
  637. // CHECK:STDOUT:
  638. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%iN (%iN) = "int.convert_checked";
  639. // CHECK:STDOUT: }
  640. // CHECK:STDOUT:
  641. // CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
  642. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  643. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  644. // CHECK:STDOUT:
  645. // CHECK:STDOUT: !definition:
  646. // CHECK:STDOUT:
  647. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%uN (%uN) = "int.convert_checked";
  648. // CHECK:STDOUT: }
  649. // CHECK:STDOUT:
  650. // CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
  651. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  652. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  653. // CHECK:STDOUT:
  654. // CHECK:STDOUT: !definition:
  655. // CHECK:STDOUT:
  656. // CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
  657. // CHECK:STDOUT: }
  658. // CHECK:STDOUT:
  659. // CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
  660. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  661. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  662. // CHECK:STDOUT:
  663. // CHECK:STDOUT: !definition:
  664. // CHECK:STDOUT:
  665. // CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
  666. // CHECK:STDOUT: }
  667. // CHECK:STDOUT:
  668. // CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.3: @As.%As.type (%As.type.2)) {
  669. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  670. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
  671. // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
  672. // CHECK:STDOUT:
  673. // CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest);
  674. // CHECK:STDOUT: }
  675. // CHECK:STDOUT:
  676. // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
  677. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  678. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  679. // CHECK:STDOUT:
  680. // CHECK:STDOUT: !definition:
  681. // CHECK:STDOUT:
  682. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%iN (%iN) = "int.convert_checked";
  683. // CHECK:STDOUT: }
  684. // CHECK:STDOUT:
  685. // CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
  686. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  687. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  688. // CHECK:STDOUT:
  689. // CHECK:STDOUT: !definition:
  690. // CHECK:STDOUT:
  691. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%uN (%uN) = "int.convert_checked";
  692. // CHECK:STDOUT: }
  693. // CHECK:STDOUT:
  694. // CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
  695. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  696. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  697. // CHECK:STDOUT:
  698. // CHECK:STDOUT: !definition:
  699. // CHECK:STDOUT:
  700. // CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
  701. // CHECK:STDOUT: }
  702. // CHECK:STDOUT:
  703. // CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
  704. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  705. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  706. // CHECK:STDOUT:
  707. // CHECK:STDOUT: !definition:
  708. // CHECK:STDOUT:
  709. // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
  710. // CHECK:STDOUT: }
  711. // CHECK:STDOUT:
  712. // CHECK:STDOUT: generic fn @F.1(constants.%T: type) {
  713. // CHECK:STDOUT: !definition:
  714. // CHECK:STDOUT:
  715. // CHECK:STDOUT: fn() -> %i32;
  716. // CHECK:STDOUT: }
  717. // CHECK:STDOUT:
  718. // CHECK:STDOUT: fn @F.2() -> %return: %CompleteClass.3 {
  719. // CHECK:STDOUT: !entry:
  720. // CHECK:STDOUT: %.loc9_16: Core.IntLiteral = int_value 1 [template = constants.%.26]
  721. // CHECK:STDOUT: %.loc9_17.1: %.27 = struct_literal (%.loc9_16)
  722. // CHECK:STDOUT: %.loc9_17.2: %Convert.type.13 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14]
  723. // CHECK:STDOUT: %.loc9_17.3: <bound method> = bound_method %.loc9_16, %.loc9_17.2 [template = constants.%.32]
  724. // CHECK:STDOUT: %.loc9_17.4: <specific function> = specific_function %.loc9_17.3, @Convert.2(constants.%.20) [template = constants.%.33]
  725. // CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_17.4(%.loc9_16) [template = constants.%.34]
  726. // CHECK:STDOUT: %.loc9_17.5: init %i32 = converted %.loc9_16, %int.convert_checked [template = constants.%.34]
  727. // CHECK:STDOUT: %.loc9_17.6: ref %i32 = class_element_access %return, element0
  728. // CHECK:STDOUT: %.loc9_17.7: init %i32 = initialize_from %.loc9_17.5 to %.loc9_17.6 [template = constants.%.34]
  729. // CHECK:STDOUT: %.loc9_17.8: init %CompleteClass.3 = class_init (%.loc9_17.7), %return [template = constants.%struct]
  730. // CHECK:STDOUT: %.loc9_18: init %CompleteClass.3 = converted %.loc9_17.1, %.loc9_17.8 [template = constants.%struct]
  731. // CHECK:STDOUT: return %.loc9_18 to %return
  732. // CHECK:STDOUT: }
  733. // CHECK:STDOUT:
  734. // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
  735. // CHECK:STDOUT: %Dest => constants.%Dest
  736. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  737. // CHECK:STDOUT: }
  738. // CHECK:STDOUT:
  739. // CHECK:STDOUT: specific @ImplicitAs(constants.%iN) {
  740. // CHECK:STDOUT: %Dest => constants.%iN
  741. // CHECK:STDOUT: %Dest.patt => constants.%iN
  742. // CHECK:STDOUT: }
  743. // CHECK:STDOUT:
  744. // CHECK:STDOUT: specific @ImplicitAs(%Dest) {
  745. // CHECK:STDOUT: %Dest => constants.%Dest
  746. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  747. // CHECK:STDOUT: }
  748. // CHECK:STDOUT:
  749. // CHECK:STDOUT: specific @ImplicitAs(@impl.1.%iN) {
  750. // CHECK:STDOUT: %Dest => constants.%iN
  751. // CHECK:STDOUT: %Dest.patt => constants.%iN
  752. // CHECK:STDOUT: }
  753. // CHECK:STDOUT:
  754. // CHECK:STDOUT: specific @impl.1(constants.%N) {
  755. // CHECK:STDOUT: %N => constants.%N
  756. // CHECK:STDOUT: %N.patt => constants.%N
  757. // CHECK:STDOUT: %iN => constants.%iN
  758. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
  759. // CHECK:STDOUT: }
  760. // CHECK:STDOUT:
  761. // CHECK:STDOUT: specific @impl.1(%N) {
  762. // CHECK:STDOUT: %N => constants.%N
  763. // CHECK:STDOUT: %N.patt => constants.%N
  764. // CHECK:STDOUT: %iN => constants.%iN
  765. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
  766. // CHECK:STDOUT: }
  767. // CHECK:STDOUT:
  768. // CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {
  769. // CHECK:STDOUT: %Dest => constants.%Dest
  770. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  771. // CHECK:STDOUT: }
  772. // CHECK:STDOUT:
  773. // CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) {
  774. // CHECK:STDOUT: %Dest => constants.%Dest
  775. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
  776. // CHECK:STDOUT: %Self => constants.%Self.1
  777. // CHECK:STDOUT: }
  778. // CHECK:STDOUT:
  779. // CHECK:STDOUT: specific @Convert.2(constants.%N) {
  780. // CHECK:STDOUT: %N => constants.%N
  781. // CHECK:STDOUT: %iN => constants.%iN
  782. // CHECK:STDOUT: }
  783. // CHECK:STDOUT:
  784. // CHECK:STDOUT: specific @ImplicitAs(constants.%uN) {
  785. // CHECK:STDOUT: %Dest => constants.%uN
  786. // CHECK:STDOUT: %Dest.patt => constants.%uN
  787. // CHECK:STDOUT: }
  788. // CHECK:STDOUT:
  789. // CHECK:STDOUT: specific @ImplicitAs(@impl.2.%uN) {
  790. // CHECK:STDOUT: %Dest => constants.%uN
  791. // CHECK:STDOUT: %Dest.patt => constants.%uN
  792. // CHECK:STDOUT: }
  793. // CHECK:STDOUT:
  794. // CHECK:STDOUT: specific @impl.2(constants.%N) {
  795. // CHECK:STDOUT: %N => constants.%N
  796. // CHECK:STDOUT: %N.patt => constants.%N
  797. // CHECK:STDOUT: %uN => constants.%uN
  798. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
  799. // CHECK:STDOUT: }
  800. // CHECK:STDOUT:
  801. // CHECK:STDOUT: specific @impl.2(%N) {
  802. // CHECK:STDOUT: %N => constants.%N
  803. // CHECK:STDOUT: %N.patt => constants.%N
  804. // CHECK:STDOUT: %uN => constants.%uN
  805. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
  806. // CHECK:STDOUT: }
  807. // CHECK:STDOUT:
  808. // CHECK:STDOUT: specific @Convert.3(constants.%N) {
  809. // CHECK:STDOUT: %N => constants.%N
  810. // CHECK:STDOUT: %uN => constants.%uN
  811. // CHECK:STDOUT: }
  812. // CHECK:STDOUT:
  813. // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
  814. // CHECK:STDOUT: %Dest => Core.IntLiteral
  815. // CHECK:STDOUT: %Dest.patt => Core.IntLiteral
  816. // CHECK:STDOUT:
  817. // CHECK:STDOUT: !definition:
  818. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
  819. // CHECK:STDOUT: %Self => constants.%Self.2
  820. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
  821. // CHECK:STDOUT: %Convert => constants.%Convert.5
  822. // CHECK:STDOUT: %.1 => constants.%.6
  823. // CHECK:STDOUT: %.2 => constants.%.7
  824. // CHECK:STDOUT: }
  825. // CHECK:STDOUT:
  826. // CHECK:STDOUT: specific @impl.3(constants.%N) {
  827. // CHECK:STDOUT: %N => constants.%N
  828. // CHECK:STDOUT: %N.patt => constants.%N
  829. // CHECK:STDOUT: %iN => constants.%iN
  830. // CHECK:STDOUT: }
  831. // CHECK:STDOUT:
  832. // CHECK:STDOUT: specific @impl.3(%N) {
  833. // CHECK:STDOUT: %N => constants.%N
  834. // CHECK:STDOUT: %N.patt => constants.%N
  835. // CHECK:STDOUT: %iN => constants.%iN
  836. // CHECK:STDOUT: }
  837. // CHECK:STDOUT:
  838. // CHECK:STDOUT: specific @Convert.4(constants.%N) {
  839. // CHECK:STDOUT: %N => constants.%N
  840. // CHECK:STDOUT: %iN => constants.%iN
  841. // CHECK:STDOUT: }
  842. // CHECK:STDOUT:
  843. // CHECK:STDOUT: specific @impl.4(constants.%N) {
  844. // CHECK:STDOUT: %N => constants.%N
  845. // CHECK:STDOUT: %N.patt => constants.%N
  846. // CHECK:STDOUT: %uN => constants.%uN
  847. // CHECK:STDOUT: }
  848. // CHECK:STDOUT:
  849. // CHECK:STDOUT: specific @impl.4(%N) {
  850. // CHECK:STDOUT: %N => constants.%N
  851. // CHECK:STDOUT: %N.patt => constants.%N
  852. // CHECK:STDOUT: %uN => constants.%uN
  853. // CHECK:STDOUT: }
  854. // CHECK:STDOUT:
  855. // CHECK:STDOUT: specific @Convert.5(constants.%N) {
  856. // CHECK:STDOUT: %N => constants.%N
  857. // CHECK:STDOUT: %uN => constants.%uN
  858. // CHECK:STDOUT: }
  859. // CHECK:STDOUT:
  860. // CHECK:STDOUT: specific @As(constants.%Dest) {
  861. // CHECK:STDOUT: %Dest => constants.%Dest
  862. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  863. // CHECK:STDOUT: }
  864. // CHECK:STDOUT:
  865. // CHECK:STDOUT: specific @As(constants.%iN) {
  866. // CHECK:STDOUT: %Dest => constants.%iN
  867. // CHECK:STDOUT: %Dest.patt => constants.%iN
  868. // CHECK:STDOUT: }
  869. // CHECK:STDOUT:
  870. // CHECK:STDOUT: specific @As(%Dest) {
  871. // CHECK:STDOUT: %Dest => constants.%Dest
  872. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  873. // CHECK:STDOUT: }
  874. // CHECK:STDOUT:
  875. // CHECK:STDOUT: specific @As(@impl.5.%iN) {
  876. // CHECK:STDOUT: %Dest => constants.%iN
  877. // CHECK:STDOUT: %Dest.patt => constants.%iN
  878. // CHECK:STDOUT: }
  879. // CHECK:STDOUT:
  880. // CHECK:STDOUT: specific @impl.5(constants.%N) {
  881. // CHECK:STDOUT: %N => constants.%N
  882. // CHECK:STDOUT: %N.patt => constants.%N
  883. // CHECK:STDOUT: %iN => constants.%iN
  884. // CHECK:STDOUT: %As.type => constants.%As.type.3
  885. // CHECK:STDOUT: }
  886. // CHECK:STDOUT:
  887. // CHECK:STDOUT: specific @impl.5(%N) {
  888. // CHECK:STDOUT: %N => constants.%N
  889. // CHECK:STDOUT: %N.patt => constants.%N
  890. // CHECK:STDOUT: %iN => constants.%iN
  891. // CHECK:STDOUT: %As.type => constants.%As.type.3
  892. // CHECK:STDOUT: }
  893. // CHECK:STDOUT:
  894. // CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
  895. // CHECK:STDOUT: %Dest => constants.%Dest
  896. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  897. // CHECK:STDOUT: }
  898. // CHECK:STDOUT:
  899. // CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.3) {
  900. // CHECK:STDOUT: %Dest => constants.%Dest
  901. // CHECK:STDOUT: %As.type => constants.%As.type.2
  902. // CHECK:STDOUT: %Self => constants.%Self.3
  903. // CHECK:STDOUT: }
  904. // CHECK:STDOUT:
  905. // CHECK:STDOUT: specific @Convert.7(constants.%N) {
  906. // CHECK:STDOUT: %N => constants.%N
  907. // CHECK:STDOUT: %iN => constants.%iN
  908. // CHECK:STDOUT: }
  909. // CHECK:STDOUT:
  910. // CHECK:STDOUT: specific @As(constants.%uN) {
  911. // CHECK:STDOUT: %Dest => constants.%uN
  912. // CHECK:STDOUT: %Dest.patt => constants.%uN
  913. // CHECK:STDOUT: }
  914. // CHECK:STDOUT:
  915. // CHECK:STDOUT: specific @As(@impl.6.%uN) {
  916. // CHECK:STDOUT: %Dest => constants.%uN
  917. // CHECK:STDOUT: %Dest.patt => constants.%uN
  918. // CHECK:STDOUT: }
  919. // CHECK:STDOUT:
  920. // CHECK:STDOUT: specific @impl.6(constants.%N) {
  921. // CHECK:STDOUT: %N => constants.%N
  922. // CHECK:STDOUT: %N.patt => constants.%N
  923. // CHECK:STDOUT: %uN => constants.%uN
  924. // CHECK:STDOUT: %As.type => constants.%As.type.4
  925. // CHECK:STDOUT: }
  926. // CHECK:STDOUT:
  927. // CHECK:STDOUT: specific @impl.6(%N) {
  928. // CHECK:STDOUT: %N => constants.%N
  929. // CHECK:STDOUT: %N.patt => constants.%N
  930. // CHECK:STDOUT: %uN => constants.%uN
  931. // CHECK:STDOUT: %As.type => constants.%As.type.4
  932. // CHECK:STDOUT: }
  933. // CHECK:STDOUT:
  934. // CHECK:STDOUT: specific @Convert.8(constants.%N) {
  935. // CHECK:STDOUT: %N => constants.%N
  936. // CHECK:STDOUT: %uN => constants.%uN
  937. // CHECK:STDOUT: }
  938. // CHECK:STDOUT:
  939. // CHECK:STDOUT: specific @As(Core.IntLiteral) {
  940. // CHECK:STDOUT: %Dest => Core.IntLiteral
  941. // CHECK:STDOUT: %Dest.patt => Core.IntLiteral
  942. // CHECK:STDOUT:
  943. // CHECK:STDOUT: !definition:
  944. // CHECK:STDOUT: %As.type => constants.%As.type.5
  945. // CHECK:STDOUT: %Self => constants.%Self.4
  946. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11
  947. // CHECK:STDOUT: %Convert => constants.%Convert.11
  948. // CHECK:STDOUT: %.1 => constants.%.14
  949. // CHECK:STDOUT: %.2 => constants.%.15
  950. // CHECK:STDOUT: }
  951. // CHECK:STDOUT:
  952. // CHECK:STDOUT: specific @impl.7(constants.%N) {
  953. // CHECK:STDOUT: %N => constants.%N
  954. // CHECK:STDOUT: %N.patt => constants.%N
  955. // CHECK:STDOUT: %iN => constants.%iN
  956. // CHECK:STDOUT: }
  957. // CHECK:STDOUT:
  958. // CHECK:STDOUT: specific @impl.7(%N) {
  959. // CHECK:STDOUT: %N => constants.%N
  960. // CHECK:STDOUT: %N.patt => constants.%N
  961. // CHECK:STDOUT: %iN => constants.%iN
  962. // CHECK:STDOUT: }
  963. // CHECK:STDOUT:
  964. // CHECK:STDOUT: specific @Convert.9(constants.%N) {
  965. // CHECK:STDOUT: %N => constants.%N
  966. // CHECK:STDOUT: %iN => constants.%iN
  967. // CHECK:STDOUT: }
  968. // CHECK:STDOUT:
  969. // CHECK:STDOUT: specific @impl.8(constants.%N) {
  970. // CHECK:STDOUT: %N => constants.%N
  971. // CHECK:STDOUT: %N.patt => constants.%N
  972. // CHECK:STDOUT: %uN => constants.%uN
  973. // CHECK:STDOUT: }
  974. // CHECK:STDOUT:
  975. // CHECK:STDOUT: specific @impl.8(%N) {
  976. // CHECK:STDOUT: %N => constants.%N
  977. // CHECK:STDOUT: %N.patt => constants.%N
  978. // CHECK:STDOUT: %uN => constants.%uN
  979. // CHECK:STDOUT: }
  980. // CHECK:STDOUT:
  981. // CHECK:STDOUT: specific @Convert.10(constants.%N) {
  982. // CHECK:STDOUT: %N => constants.%N
  983. // CHECK:STDOUT: %uN => constants.%uN
  984. // CHECK:STDOUT: }
  985. // CHECK:STDOUT:
  986. // CHECK:STDOUT: specific @Class(constants.%T) {
  987. // CHECK:STDOUT: %T.1 => constants.%T
  988. // CHECK:STDOUT: %T.patt.1 => constants.%T
  989. // CHECK:STDOUT: }
  990. // CHECK:STDOUT:
  991. // CHECK:STDOUT: specific @Class(%T.1) {
  992. // CHECK:STDOUT: %T.1 => constants.%T
  993. // CHECK:STDOUT: %T.patt.1 => constants.%T
  994. // CHECK:STDOUT: }
  995. // CHECK:STDOUT:
  996. // CHECK:STDOUT: specific @CompleteClass(constants.%T) {
  997. // CHECK:STDOUT: %T => constants.%T
  998. // CHECK:STDOUT: %T.patt => constants.%T
  999. // CHECK:STDOUT:
  1000. // CHECK:STDOUT: !definition:
  1001. // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2
  1002. // CHECK:STDOUT: %.1 => constants.%.23
  1003. // CHECK:STDOUT: %F.type => constants.%F.type.1
  1004. // CHECK:STDOUT: %F => constants.%F.1
  1005. // CHECK:STDOUT: }
  1006. // CHECK:STDOUT:
  1007. // CHECK:STDOUT: specific @CompleteClass(%T) {
  1008. // CHECK:STDOUT: %T => constants.%T
  1009. // CHECK:STDOUT: %T.patt => constants.%T
  1010. // CHECK:STDOUT: }
  1011. // CHECK:STDOUT:
  1012. // CHECK:STDOUT: specific @F.1(constants.%T) {}
  1013. // CHECK:STDOUT:
  1014. // CHECK:STDOUT: specific @CompleteClass(constants.%i32) {
  1015. // CHECK:STDOUT: %T => constants.%i32
  1016. // CHECK:STDOUT: %T.patt => constants.%i32
  1017. // CHECK:STDOUT:
  1018. // CHECK:STDOUT: !definition:
  1019. // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3
  1020. // CHECK:STDOUT: %.1 => constants.%.24
  1021. // CHECK:STDOUT: %F.type => constants.%F.type.3
  1022. // CHECK:STDOUT: %F => constants.%F.3
  1023. // CHECK:STDOUT: }
  1024. // CHECK:STDOUT:
  1025. // CHECK:STDOUT: specific @ImplicitAs(constants.%i32) {
  1026. // CHECK:STDOUT: %Dest => constants.%i32
  1027. // CHECK:STDOUT: %Dest.patt => constants.%i32
  1028. // CHECK:STDOUT:
  1029. // CHECK:STDOUT: !definition:
  1030. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6
  1031. // CHECK:STDOUT: %Self => constants.%Self.2
  1032. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13
  1033. // CHECK:STDOUT: %Convert => constants.%Convert.13
  1034. // CHECK:STDOUT: %.1 => constants.%.28
  1035. // CHECK:STDOUT: %.2 => constants.%.29
  1036. // CHECK:STDOUT: }
  1037. // CHECK:STDOUT:
  1038. // CHECK:STDOUT: specific @impl.1(constants.%.20) {
  1039. // CHECK:STDOUT: %N => constants.%.20
  1040. // CHECK:STDOUT: %N.patt => constants.%.20
  1041. // CHECK:STDOUT: %iN => constants.%i32
  1042. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6
  1043. // CHECK:STDOUT:
  1044. // CHECK:STDOUT: !definition:
  1045. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.14
  1046. // CHECK:STDOUT: %Convert => constants.%Convert.14
  1047. // CHECK:STDOUT: %.1 => constants.%.31
  1048. // CHECK:STDOUT: }
  1049. // CHECK:STDOUT:
  1050. // CHECK:STDOUT: specific @Convert.2(constants.%.20) {
  1051. // CHECK:STDOUT: %N => constants.%.20
  1052. // CHECK:STDOUT: %iN => constants.%i32
  1053. // CHECK:STDOUT:
  1054. // CHECK:STDOUT: !definition:
  1055. // CHECK:STDOUT: }
  1056. // CHECK:STDOUT:
  1057. // CHECK:STDOUT: --- use_foo.carbon
  1058. // CHECK:STDOUT:
  1059. // CHECK:STDOUT: constants {
  1060. // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
  1061. // CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
  1062. // CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
  1063. // CHECK:STDOUT: %i32: type = int_type signed, %.1 [template]
  1064. // CHECK:STDOUT: %UseMethod.type: type = fn_type @UseMethod [template]
  1065. // CHECK:STDOUT: %UseMethod: %UseMethod.type = struct_value () [template]
  1066. // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template]
  1067. // CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template]
  1068. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  1069. // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
  1070. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  1071. // CHECK:STDOUT: %.4: type = unbound_element_type %CompleteClass.2, %i32 [symbolic]
  1072. // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic]
  1073. // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic]
  1074. // CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%i32) [template]
  1075. // CHECK:STDOUT: %.5: type = unbound_element_type %CompleteClass.3, %i32 [template]
  1076. // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @CompleteClass(%i32) [template]
  1077. // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
  1078. // CHECK:STDOUT: %F.type.3: type = fn_type @F.2 [template]
  1079. // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template]
  1080. // CHECK:STDOUT: %.7: <specific function> = specific_function %F.2, @F.1(%i32) [template]
  1081. // CHECK:STDOUT: %UseField.type: type = fn_type @UseField [template]
  1082. // CHECK:STDOUT: %UseField: %UseField.type = struct_value () [template]
  1083. // CHECK:STDOUT: }
  1084. // CHECK:STDOUT:
  1085. // CHECK:STDOUT: imports {
  1086. // CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+9, unloaded
  1087. // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.1]
  1088. // CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+413, loaded [template = constants.%F.3]
  1089. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  1090. // CHECK:STDOUT: .Int = %import_ref.4
  1091. // CHECK:STDOUT: import Core//prelude
  1092. // CHECK:STDOUT: import Core//prelude/...
  1093. // CHECK:STDOUT: }
  1094. // CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+25, unloaded
  1095. // CHECK:STDOUT: %import_ref.6: @CompleteClass.%.1 (%.4) = import_ref Main//foo, inst+44, loaded [template = %.1]
  1096. // CHECK:STDOUT: %import_ref.7: @CompleteClass.%F.type (%F.type.1) = import_ref Main//foo, inst+53, loaded [symbolic = @CompleteClass.%F (constants.%F.1)]
  1097. // CHECK:STDOUT: }
  1098. // CHECK:STDOUT:
  1099. // CHECK:STDOUT: file {
  1100. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  1101. // CHECK:STDOUT: .Class = imports.%import_ref.1
  1102. // CHECK:STDOUT: .CompleteClass = imports.%import_ref.2
  1103. // CHECK:STDOUT: .F = imports.%import_ref.3
  1104. // CHECK:STDOUT: .Core = imports.%Core
  1105. // CHECK:STDOUT: .UseMethod = %UseMethod.decl
  1106. // CHECK:STDOUT: .UseField = %UseField.decl
  1107. // CHECK:STDOUT: }
  1108. // CHECK:STDOUT: %Core.import = import Core
  1109. // CHECK:STDOUT: %default.import = import <invalid>
  1110. // CHECK:STDOUT: %UseMethod.decl: %UseMethod.type = fn_decl @UseMethod [template = constants.%UseMethod] {
  1111. // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
  1112. // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0
  1113. // CHECK:STDOUT: } {
  1114. // CHECK:STDOUT: %.loc5_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
  1115. // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_19.1) [template = constants.%i32]
  1116. // CHECK:STDOUT: %.loc5_19.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32]
  1117. // CHECK:STDOUT: %.loc5_19.3: type = converted %int.make_type_signed.loc5, %.loc5_19.2 [template = constants.%i32]
  1118. // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0
  1119. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  1120. // CHECK:STDOUT: }
  1121. // CHECK:STDOUT: %UseField.decl: %UseField.type = fn_decl @UseField [template = constants.%UseField] {
  1122. // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
  1123. // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0
  1124. // CHECK:STDOUT: } {
  1125. // CHECK:STDOUT: %.loc10_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1]
  1126. // CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%.loc10_18.1) [template = constants.%i32]
  1127. // CHECK:STDOUT: %.loc10_18.2: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32]
  1128. // CHECK:STDOUT: %.loc10_18.3: type = converted %int.make_type_signed.loc10, %.loc10_18.2 [template = constants.%i32]
  1129. // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0
  1130. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  1131. // CHECK:STDOUT: }
  1132. // CHECK:STDOUT: }
  1133. // CHECK:STDOUT:
  1134. // CHECK:STDOUT: generic class @CompleteClass(constants.%T: type) {
  1135. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  1136. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
  1137. // CHECK:STDOUT:
  1138. // CHECK:STDOUT: !definition:
  1139. // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.2)]
  1140. // CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.1 (constants.%.4)]
  1141. // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)]
  1142. // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)]
  1143. // CHECK:STDOUT:
  1144. // CHECK:STDOUT: class {
  1145. // CHECK:STDOUT: !members:
  1146. // CHECK:STDOUT: .Self = imports.%import_ref.5
  1147. // CHECK:STDOUT: .n = imports.%import_ref.6
  1148. // CHECK:STDOUT: .F = imports.%import_ref.7
  1149. // CHECK:STDOUT: }
  1150. // CHECK:STDOUT: }
  1151. // CHECK:STDOUT:
  1152. // CHECK:STDOUT: fn @UseMethod() -> %i32 {
  1153. // CHECK:STDOUT: !entry:
  1154. // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.1]
  1155. // CHECK:STDOUT: %.loc6_24: Core.IntLiteral = int_value 32 [template = constants.%.1]
  1156. // CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_24) [template = constants.%i32]
  1157. // CHECK:STDOUT: %.loc6_23.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32]
  1158. // CHECK:STDOUT: %.loc6_23.2: type = converted %int.make_type_signed.loc6, %.loc6_23.1 [template = constants.%i32]
  1159. // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3]
  1160. // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v
  1161. // CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var
  1162. // CHECK:STDOUT: %F.ref.loc6: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3]
  1163. // CHECK:STDOUT: %.loc6_7: ref %CompleteClass.3 = splice_block %v.var {}
  1164. // CHECK:STDOUT: %F.call.loc6: init %CompleteClass.3 = call %F.ref.loc6() to %.loc6_7
  1165. // CHECK:STDOUT: assign %v.var, %F.call.loc6
  1166. // CHECK:STDOUT: %v.ref: ref %CompleteClass.3 = name_ref v, %v
  1167. // CHECK:STDOUT: %.loc7_11.1: %F.type.2 = specific_constant imports.%import_ref.7, @CompleteClass(constants.%i32) [template = constants.%F.2]
  1168. // CHECK:STDOUT: %F.ref.loc7: %F.type.2 = name_ref F, %.loc7_11.1 [template = constants.%F.2]
  1169. // CHECK:STDOUT: %.loc7_11.2: <specific function> = specific_function %F.ref.loc7, @F.1(constants.%i32) [template = constants.%.7]
  1170. // CHECK:STDOUT: %F.call.loc7: init %i32 = call %.loc7_11.2()
  1171. // CHECK:STDOUT: %.loc7_15.1: %i32 = value_of_initializer %F.call.loc7
  1172. // CHECK:STDOUT: %.loc7_15.2: %i32 = converted %F.call.loc7, %.loc7_15.1
  1173. // CHECK:STDOUT: return %.loc7_15.2
  1174. // CHECK:STDOUT: }
  1175. // CHECK:STDOUT:
  1176. // CHECK:STDOUT: generic fn @F.1(constants.%T: type) {
  1177. // CHECK:STDOUT: !definition:
  1178. // CHECK:STDOUT:
  1179. // CHECK:STDOUT: fn() -> %i32;
  1180. // CHECK:STDOUT: }
  1181. // CHECK:STDOUT:
  1182. // CHECK:STDOUT: fn @F.2() -> %CompleteClass.3;
  1183. // CHECK:STDOUT:
  1184. // CHECK:STDOUT: fn @UseField() -> %i32 {
  1185. // CHECK:STDOUT: !entry:
  1186. // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.1]
  1187. // CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 32 [template = constants.%.1]
  1188. // CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_24) [template = constants.%i32]
  1189. // CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32]
  1190. // CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11, %.loc11_23.1 [template = constants.%i32]
  1191. // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3]
  1192. // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v
  1193. // CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var
  1194. // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3]
  1195. // CHECK:STDOUT: %.loc11_7: ref %CompleteClass.3 = splice_block %v.var {}
  1196. // CHECK:STDOUT: %F.call: init %CompleteClass.3 = call %F.ref() to %.loc11_7
  1197. // CHECK:STDOUT: assign %v.var, %F.call
  1198. // CHECK:STDOUT: %v.ref: ref %CompleteClass.3 = name_ref v, %v
  1199. // CHECK:STDOUT: %n.ref: %.5 = name_ref n, imports.%import_ref.6 [template = imports.%.1]
  1200. // CHECK:STDOUT: %.loc12_11.1: ref %i32 = class_element_access %v.ref, element0
  1201. // CHECK:STDOUT: %.loc12_11.2: %i32 = bind_value %.loc12_11.1
  1202. // CHECK:STDOUT: return %.loc12_11.2
  1203. // CHECK:STDOUT: }
  1204. // CHECK:STDOUT:
  1205. // CHECK:STDOUT: specific @CompleteClass(constants.%T) {
  1206. // CHECK:STDOUT: %T => constants.%T
  1207. // CHECK:STDOUT: %T.patt => constants.%T
  1208. // CHECK:STDOUT:
  1209. // CHECK:STDOUT: !definition:
  1210. // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2
  1211. // CHECK:STDOUT: %.1 => constants.%.4
  1212. // CHECK:STDOUT: %F.type => constants.%F.type.1
  1213. // CHECK:STDOUT: %F => constants.%F.1
  1214. // CHECK:STDOUT: }
  1215. // CHECK:STDOUT:
  1216. // CHECK:STDOUT: specific @CompleteClass(%T) {
  1217. // CHECK:STDOUT: %T => constants.%T
  1218. // CHECK:STDOUT: %T.patt => constants.%T
  1219. // CHECK:STDOUT: }
  1220. // CHECK:STDOUT:
  1221. // CHECK:STDOUT: specific @F.1(constants.%T) {}
  1222. // CHECK:STDOUT:
  1223. // CHECK:STDOUT: specific @CompleteClass(constants.%i32) {
  1224. // CHECK:STDOUT: %T => constants.%i32
  1225. // CHECK:STDOUT: %T.patt => constants.%i32
  1226. // CHECK:STDOUT:
  1227. // CHECK:STDOUT: !definition:
  1228. // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3
  1229. // CHECK:STDOUT: %.1 => constants.%.5
  1230. // CHECK:STDOUT: %F.type => constants.%F.type.2
  1231. // CHECK:STDOUT: %F => constants.%F.2
  1232. // CHECK:STDOUT: }
  1233. // CHECK:STDOUT:
  1234. // CHECK:STDOUT: specific @F.1(constants.%i32) {
  1235. // CHECK:STDOUT: !definition:
  1236. // CHECK:STDOUT: }
  1237. // CHECK:STDOUT:
  1238. // CHECK:STDOUT: --- fail_generic_arg_mismatch.carbon
  1239. // CHECK:STDOUT:
  1240. // CHECK:STDOUT: constants {
  1241. // CHECK:STDOUT: %Use.type: type = fn_type @Use [template]
  1242. // CHECK:STDOUT: %Use: %Use.type = struct_value () [template]
  1243. // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template]
  1244. // CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template]
  1245. // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template]
  1246. // CHECK:STDOUT: %i32: type = int_type signed, %.1 [template]
  1247. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  1248. // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic]
  1249. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  1250. // CHECK:STDOUT: %.4: type = unbound_element_type %CompleteClass.2, %i32 [symbolic]
  1251. // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic]
  1252. // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic]
  1253. // CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
  1254. // CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
  1255. // CHECK:STDOUT: %.5: type = ptr_type %i32 [template]
  1256. // CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%.5) [template]
  1257. // CHECK:STDOUT: %.6: type = unbound_element_type %CompleteClass.3, %i32 [template]
  1258. // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @CompleteClass(%.5) [template]
  1259. // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
  1260. // CHECK:STDOUT: %F.type.3: type = fn_type @F.2 [template]
  1261. // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template]
  1262. // CHECK:STDOUT: %CompleteClass.4: type = class_type @CompleteClass, @CompleteClass(%i32) [template]
  1263. // CHECK:STDOUT: %.8: type = unbound_element_type %CompleteClass.4, %i32 [template]
  1264. // CHECK:STDOUT: %F.type.4: type = fn_type @F.1, @CompleteClass(%i32) [template]
  1265. // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template]
  1266. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
  1267. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
  1268. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  1269. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic]
  1270. // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic]
  1271. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
  1272. // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2, @impl.1(%N) [symbolic]
  1273. // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
  1274. // CHECK:STDOUT: %.14: <witness> = interface_witness (%Convert.3) [symbolic]
  1275. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic]
  1276. // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic]
  1277. // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3, @impl.2(%N) [symbolic]
  1278. // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
  1279. // CHECK:STDOUT: %.15: <witness> = interface_witness (%Convert.4) [symbolic]
  1280. // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
  1281. // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.4, @impl.3(%N) [symbolic]
  1282. // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [symbolic]
  1283. // CHECK:STDOUT: %.16: <witness> = interface_witness (%Convert.5) [symbolic]
  1284. // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5, @impl.4(%N) [symbolic]
  1285. // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
  1286. // CHECK:STDOUT: %.19: <witness> = interface_witness (%Convert.7) [symbolic]
  1287. // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
  1288. // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic]
  1289. // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
  1290. // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
  1291. // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6, @As(%Dest) [symbolic]
  1292. // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
  1293. // CHECK:STDOUT: %.20: type = assoc_entity_type %As.type.2, %Convert.type.8 [symbolic]
  1294. // CHECK:STDOUT: %.21: %.20 = assoc_entity element0, imports.%import_ref.33 [symbolic]
  1295. // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.7, @impl.5(%N) [symbolic]
  1296. // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic]
  1297. // CHECK:STDOUT: %.22: <witness> = interface_witness (%Convert.9) [symbolic]
  1298. // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic]
  1299. // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.8, @impl.6(%N) [symbolic]
  1300. // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
  1301. // CHECK:STDOUT: %.23: <witness> = interface_witness (%Convert.10) [symbolic]
  1302. // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template]
  1303. // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.9, @impl.7(%N) [symbolic]
  1304. // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [symbolic]
  1305. // CHECK:STDOUT: %.24: <witness> = interface_witness (%Convert.11) [symbolic]
  1306. // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
  1307. // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template]
  1308. // CHECK:STDOUT: %.25: type = assoc_entity_type %As.type.5, %Convert.type.12 [template]
  1309. // CHECK:STDOUT: %.26: %.25 = assoc_entity element0, imports.%import_ref.40 [template]
  1310. // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.10, @impl.8(%N) [symbolic]
  1311. // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [symbolic]
  1312. // CHECK:STDOUT: %.27: <witness> = interface_witness (%Convert.13) [symbolic]
  1313. // CHECK:STDOUT: }
  1314. // CHECK:STDOUT:
  1315. // CHECK:STDOUT: imports {
  1316. // CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+9, unloaded
  1317. // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.1]
  1318. // CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+413, loaded [template = constants.%F.3]
  1319. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  1320. // CHECK:STDOUT: .Int = %import_ref.7
  1321. // CHECK:STDOUT: .ImplicitAs = %import_ref.8
  1322. // CHECK:STDOUT: import Core//prelude
  1323. // CHECK:STDOUT: import Core//prelude/...
  1324. // CHECK:STDOUT: }
  1325. // CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+25, unloaded
  1326. // CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+44, unloaded
  1327. // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+53, unloaded
  1328. // CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+121, loaded [template = Core.IntLiteral]
  1329. // CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+122, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
  1330. // CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+123, unloaded
  1331. // CHECK:STDOUT: %import_ref.17: type = import_ref Main//foo, inst+151, loaded [template = Core.IntLiteral]
  1332. // CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+152, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.5)]
  1333. // CHECK:STDOUT: %import_ref.19 = import_ref Main//foo, inst+153, unloaded
  1334. // CHECK:STDOUT: %import_ref.20: type = import_ref Main//foo, inst+180, loaded [symbolic = @impl.3.%iN (constants.%iN)]
  1335. // CHECK:STDOUT: %import_ref.21: type = import_ref Main//foo, inst+181, loaded [template = constants.%ImplicitAs.type.6]
  1336. // CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+182, unloaded
  1337. // CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+212, loaded [symbolic = @impl.4.%uN (constants.%uN)]
  1338. // CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+213, loaded [template = constants.%ImplicitAs.type.6]
  1339. // CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+214, unloaded
  1340. // CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+244, unloaded
  1341. // CHECK:STDOUT: %import_ref.28 = import_ref Main//foo, inst+245, unloaded
  1342. // CHECK:STDOUT: %import_ref.29 = import_ref Main//foo, inst+246, unloaded
  1343. // CHECK:STDOUT: %import_ref.30: type = import_ref Main//foo, inst+252, loaded [template = Core.IntLiteral]
  1344. // CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+253, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
  1345. // CHECK:STDOUT: %import_ref.32 = import_ref Main//foo, inst+254, unloaded
  1346. // CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+269, unloaded
  1347. // CHECK:STDOUT: %import_ref.34: type = import_ref Main//foo, inst+306, loaded [template = Core.IntLiteral]
  1348. // CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+307, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
  1349. // CHECK:STDOUT: %import_ref.36 = import_ref Main//foo, inst+308, unloaded
  1350. // CHECK:STDOUT: %import_ref.37: type = import_ref Main//foo, inst+335, loaded [symbolic = @impl.7.%iN (constants.%iN)]
  1351. // CHECK:STDOUT: %import_ref.38: type = import_ref Main//foo, inst+336, loaded [template = constants.%As.type.5]
  1352. // CHECK:STDOUT: %import_ref.39 = import_ref Main//foo, inst+337, unloaded
  1353. // CHECK:STDOUT: %import_ref.41: type = import_ref Main//foo, inst+367, loaded [symbolic = @impl.8.%uN (constants.%uN)]
  1354. // CHECK:STDOUT: %import_ref.42: type = import_ref Main//foo, inst+368, loaded [template = constants.%As.type.5]
  1355. // CHECK:STDOUT: %import_ref.43 = import_ref Main//foo, inst+369, unloaded
  1356. // CHECK:STDOUT: }
  1357. // CHECK:STDOUT:
  1358. // CHECK:STDOUT: file {
  1359. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  1360. // CHECK:STDOUT: .Class = imports.%import_ref.1
  1361. // CHECK:STDOUT: .CompleteClass = imports.%import_ref.2
  1362. // CHECK:STDOUT: .F = imports.%import_ref.3
  1363. // CHECK:STDOUT: .Core = imports.%Core
  1364. // CHECK:STDOUT: .Use = %Use.decl
  1365. // CHECK:STDOUT: }
  1366. // CHECK:STDOUT: %Core.import = import Core
  1367. // CHECK:STDOUT: %default.import = import <invalid>
  1368. // CHECK:STDOUT: %Use.decl: %Use.type = fn_decl @Use [template = constants.%Use] {} {}
  1369. // CHECK:STDOUT: }
  1370. // CHECK:STDOUT:
  1371. // CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
  1372. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  1373. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
  1374. // CHECK:STDOUT:
  1375. // CHECK:STDOUT: !definition:
  1376. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
  1377. // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
  1378. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.8)]
  1379. // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
  1380. // CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.8) [symbolic = %.1 (constants.%.20)]
  1381. // CHECK:STDOUT: %.2: @As.%.1 (%.20) = assoc_entity element0, imports.%import_ref.33 [symbolic = %.2 (constants.%.21)]
  1382. // CHECK:STDOUT:
  1383. // CHECK:STDOUT: interface {
  1384. // CHECK:STDOUT: !members:
  1385. // CHECK:STDOUT: .Self = imports.%import_ref.27
  1386. // CHECK:STDOUT: .Convert = imports.%import_ref.28
  1387. // CHECK:STDOUT: witness = (imports.%import_ref.29)
  1388. // CHECK:STDOUT: }
  1389. // CHECK:STDOUT: }
  1390. // CHECK:STDOUT:
  1391. // CHECK:STDOUT: generic impl @impl.1(constants.%N: Core.IntLiteral) {
  1392. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1393. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  1394. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  1395. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
  1396. // CHECK:STDOUT:
  1397. // CHECK:STDOUT: !definition:
  1398. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
  1399. // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
  1400. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)]
  1401. // CHECK:STDOUT:
  1402. // CHECK:STDOUT: impl: imports.%import_ref.14 as imports.%import_ref.15 {
  1403. // CHECK:STDOUT: !members:
  1404. // CHECK:STDOUT: witness = imports.%import_ref.16
  1405. // CHECK:STDOUT: }
  1406. // CHECK:STDOUT: }
  1407. // CHECK:STDOUT:
  1408. // CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
  1409. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1410. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  1411. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  1412. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.5)]
  1413. // CHECK:STDOUT:
  1414. // CHECK:STDOUT: !definition:
  1415. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
  1416. // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
  1417. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.15)]
  1418. // CHECK:STDOUT:
  1419. // CHECK:STDOUT: impl: imports.%import_ref.17 as imports.%import_ref.18 {
  1420. // CHECK:STDOUT: !members:
  1421. // CHECK:STDOUT: witness = imports.%import_ref.19
  1422. // CHECK:STDOUT: }
  1423. // CHECK:STDOUT: }
  1424. // CHECK:STDOUT:
  1425. // CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
  1426. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1427. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  1428. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  1429. // CHECK:STDOUT:
  1430. // CHECK:STDOUT: !definition:
  1431. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.5)]
  1432. // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.5) = struct_value () [symbolic = %Convert (constants.%Convert.5)]
  1433. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)]
  1434. // CHECK:STDOUT:
  1435. // CHECK:STDOUT: impl: imports.%import_ref.20 as imports.%import_ref.21 {
  1436. // CHECK:STDOUT: !members:
  1437. // CHECK:STDOUT: witness = imports.%import_ref.22
  1438. // CHECK:STDOUT: }
  1439. // CHECK:STDOUT: }
  1440. // CHECK:STDOUT:
  1441. // CHECK:STDOUT: generic impl @impl.4(constants.%N: Core.IntLiteral) {
  1442. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1443. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  1444. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  1445. // CHECK:STDOUT:
  1446. // CHECK:STDOUT: !definition:
  1447. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.7)]
  1448. // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
  1449. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.19)]
  1450. // CHECK:STDOUT:
  1451. // CHECK:STDOUT: impl: imports.%import_ref.24 as imports.%import_ref.25 {
  1452. // CHECK:STDOUT: !members:
  1453. // CHECK:STDOUT: witness = imports.%import_ref.26
  1454. // CHECK:STDOUT: }
  1455. // CHECK:STDOUT: }
  1456. // CHECK:STDOUT:
  1457. // CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
  1458. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1459. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  1460. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  1461. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%iN)> [symbolic = %As.type (constants.%As.type.3)]
  1462. // CHECK:STDOUT:
  1463. // CHECK:STDOUT: !definition:
  1464. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.9)]
  1465. // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)]
  1466. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.22)]
  1467. // CHECK:STDOUT:
  1468. // CHECK:STDOUT: impl: imports.%import_ref.30 as imports.%import_ref.31 {
  1469. // CHECK:STDOUT: !members:
  1470. // CHECK:STDOUT: witness = imports.%import_ref.32
  1471. // CHECK:STDOUT: }
  1472. // CHECK:STDOUT: }
  1473. // CHECK:STDOUT:
  1474. // CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
  1475. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1476. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  1477. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  1478. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%uN)> [symbolic = %As.type (constants.%As.type.4)]
  1479. // CHECK:STDOUT:
  1480. // CHECK:STDOUT: !definition:
  1481. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
  1482. // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
  1483. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.23)]
  1484. // CHECK:STDOUT:
  1485. // CHECK:STDOUT: impl: imports.%import_ref.34 as imports.%import_ref.35 {
  1486. // CHECK:STDOUT: !members:
  1487. // CHECK:STDOUT: witness = imports.%import_ref.36
  1488. // CHECK:STDOUT: }
  1489. // CHECK:STDOUT: }
  1490. // CHECK:STDOUT:
  1491. // CHECK:STDOUT: generic impl @impl.7(constants.%N: Core.IntLiteral) {
  1492. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1493. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  1494. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  1495. // CHECK:STDOUT:
  1496. // CHECK:STDOUT: !definition:
  1497. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.11)]
  1498. // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.11) = struct_value () [symbolic = %Convert (constants.%Convert.11)]
  1499. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.24)]
  1500. // CHECK:STDOUT:
  1501. // CHECK:STDOUT: impl: imports.%import_ref.37 as imports.%import_ref.38 {
  1502. // CHECK:STDOUT: !members:
  1503. // CHECK:STDOUT: witness = imports.%import_ref.39
  1504. // CHECK:STDOUT: }
  1505. // CHECK:STDOUT: }
  1506. // CHECK:STDOUT:
  1507. // CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
  1508. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1509. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  1510. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  1511. // CHECK:STDOUT:
  1512. // CHECK:STDOUT: !definition:
  1513. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.13)]
  1514. // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.13) = struct_value () [symbolic = %Convert (constants.%Convert.13)]
  1515. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.27)]
  1516. // CHECK:STDOUT:
  1517. // CHECK:STDOUT: impl: imports.%import_ref.41 as imports.%import_ref.42 {
  1518. // CHECK:STDOUT: !members:
  1519. // CHECK:STDOUT: witness = imports.%import_ref.43
  1520. // CHECK:STDOUT: }
  1521. // CHECK:STDOUT: }
  1522. // CHECK:STDOUT:
  1523. // CHECK:STDOUT: generic class @CompleteClass(constants.%T: type) {
  1524. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  1525. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
  1526. // CHECK:STDOUT:
  1527. // CHECK:STDOUT: !definition:
  1528. // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.2)]
  1529. // CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.1 (constants.%.4)]
  1530. // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)]
  1531. // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)]
  1532. // CHECK:STDOUT:
  1533. // CHECK:STDOUT: class {
  1534. // CHECK:STDOUT: !members:
  1535. // CHECK:STDOUT: .Self = imports.%import_ref.4
  1536. // CHECK:STDOUT: .n = imports.%import_ref.5
  1537. // CHECK:STDOUT: .F = imports.%import_ref.6
  1538. // CHECK:STDOUT: }
  1539. // CHECK:STDOUT: }
  1540. // CHECK:STDOUT:
  1541. // CHECK:STDOUT: fn @Use() {
  1542. // CHECK:STDOUT: !entry:
  1543. // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.1]
  1544. // CHECK:STDOUT: %.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%.1]
  1545. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_24) [template = constants.%i32]
  1546. // CHECK:STDOUT: %.loc14_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32]
  1547. // CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_signed, %.loc14_27.1 [template = constants.%i32]
  1548. // CHECK:STDOUT: %.loc14_27.3: type = ptr_type %i32 [template = constants.%.5]
  1549. // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%.5) [template = constants.%CompleteClass.3]
  1550. // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v
  1551. // CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var
  1552. // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3]
  1553. // CHECK:STDOUT: %.loc14_33: ref %CompleteClass.4 = temporary_storage
  1554. // CHECK:STDOUT: %F.call: init %CompleteClass.4 = call %F.ref() to %.loc14_33
  1555. // CHECK:STDOUT: %.loc14_35: %CompleteClass.3 = converted %F.call, <error> [template = <error>]
  1556. // CHECK:STDOUT: assign %v.var, <error>
  1557. // CHECK:STDOUT: return
  1558. // CHECK:STDOUT: }
  1559. // CHECK:STDOUT:
  1560. // CHECK:STDOUT: generic fn @F.1(constants.%T: type) {
  1561. // CHECK:STDOUT: !definition:
  1562. // CHECK:STDOUT:
  1563. // CHECK:STDOUT: fn() -> %i32;
  1564. // CHECK:STDOUT: }
  1565. // CHECK:STDOUT:
  1566. // CHECK:STDOUT: fn @F.2() -> %CompleteClass.4;
  1567. // CHECK:STDOUT:
  1568. // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
  1569. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1570. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  1571. // CHECK:STDOUT:
  1572. // CHECK:STDOUT: !definition:
  1573. // CHECK:STDOUT:
  1574. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%iN (%iN) = "int.convert_checked";
  1575. // CHECK:STDOUT: }
  1576. // CHECK:STDOUT:
  1577. // CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
  1578. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1579. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  1580. // CHECK:STDOUT:
  1581. // CHECK:STDOUT: !definition:
  1582. // CHECK:STDOUT:
  1583. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%uN (%uN) = "int.convert_checked";
  1584. // CHECK:STDOUT: }
  1585. // CHECK:STDOUT:
  1586. // CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
  1587. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1588. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  1589. // CHECK:STDOUT:
  1590. // CHECK:STDOUT: !definition:
  1591. // CHECK:STDOUT:
  1592. // CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
  1593. // CHECK:STDOUT: }
  1594. // CHECK:STDOUT:
  1595. // CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
  1596. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1597. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  1598. // CHECK:STDOUT:
  1599. // CHECK:STDOUT: !definition:
  1600. // CHECK:STDOUT:
  1601. // CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
  1602. // CHECK:STDOUT: }
  1603. // CHECK:STDOUT:
  1604. // CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.3: @As.%As.type (%As.type.2)) {
  1605. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  1606. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
  1607. // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
  1608. // CHECK:STDOUT:
  1609. // CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest);
  1610. // CHECK:STDOUT: }
  1611. // CHECK:STDOUT:
  1612. // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
  1613. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1614. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  1615. // CHECK:STDOUT:
  1616. // CHECK:STDOUT: !definition:
  1617. // CHECK:STDOUT:
  1618. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%iN (%iN) = "int.convert_checked";
  1619. // CHECK:STDOUT: }
  1620. // CHECK:STDOUT:
  1621. // CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
  1622. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1623. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  1624. // CHECK:STDOUT:
  1625. // CHECK:STDOUT: !definition:
  1626. // CHECK:STDOUT:
  1627. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%uN (%uN) = "int.convert_checked";
  1628. // CHECK:STDOUT: }
  1629. // CHECK:STDOUT:
  1630. // CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
  1631. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1632. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  1633. // CHECK:STDOUT:
  1634. // CHECK:STDOUT: !definition:
  1635. // CHECK:STDOUT:
  1636. // CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
  1637. // CHECK:STDOUT: }
  1638. // CHECK:STDOUT:
  1639. // CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
  1640. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  1641. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  1642. // CHECK:STDOUT:
  1643. // CHECK:STDOUT: !definition:
  1644. // CHECK:STDOUT:
  1645. // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
  1646. // CHECK:STDOUT: }
  1647. // CHECK:STDOUT:
  1648. // CHECK:STDOUT: specific @CompleteClass(constants.%T) {
  1649. // CHECK:STDOUT: %T => constants.%T
  1650. // CHECK:STDOUT: %T.patt => constants.%T
  1651. // CHECK:STDOUT:
  1652. // CHECK:STDOUT: !definition:
  1653. // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2
  1654. // CHECK:STDOUT: %.1 => constants.%.4
  1655. // CHECK:STDOUT: %F.type => constants.%F.type.1
  1656. // CHECK:STDOUT: %F => constants.%F.1
  1657. // CHECK:STDOUT: }
  1658. // CHECK:STDOUT:
  1659. // CHECK:STDOUT: specific @CompleteClass(%T) {
  1660. // CHECK:STDOUT: %T => constants.%T
  1661. // CHECK:STDOUT: %T.patt => constants.%T
  1662. // CHECK:STDOUT: }
  1663. // CHECK:STDOUT:
  1664. // CHECK:STDOUT: specific @F.1(constants.%T) {}
  1665. // CHECK:STDOUT:
  1666. // CHECK:STDOUT: specific @CompleteClass(constants.%.5) {
  1667. // CHECK:STDOUT: %T => constants.%.5
  1668. // CHECK:STDOUT: %T.patt => constants.%.5
  1669. // CHECK:STDOUT:
  1670. // CHECK:STDOUT: !definition:
  1671. // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3
  1672. // CHECK:STDOUT: %.1 => constants.%.6
  1673. // CHECK:STDOUT: %F.type => constants.%F.type.2
  1674. // CHECK:STDOUT: %F => constants.%F.2
  1675. // CHECK:STDOUT: }
  1676. // CHECK:STDOUT:
  1677. // CHECK:STDOUT: specific @CompleteClass(constants.%i32) {
  1678. // CHECK:STDOUT: %T => constants.%i32
  1679. // CHECK:STDOUT: %T.patt => constants.%i32
  1680. // CHECK:STDOUT:
  1681. // CHECK:STDOUT: !definition:
  1682. // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.4
  1683. // CHECK:STDOUT: %.1 => constants.%.8
  1684. // CHECK:STDOUT: %F.type => constants.%F.type.4
  1685. // CHECK:STDOUT: %F => constants.%F.4
  1686. // CHECK:STDOUT: }
  1687. // CHECK:STDOUT:
  1688. // CHECK:STDOUT: specific @impl.1(constants.%N) {
  1689. // CHECK:STDOUT: %N => constants.%N
  1690. // CHECK:STDOUT: %N.patt => constants.%N
  1691. // CHECK:STDOUT: %iN => constants.%iN
  1692. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
  1693. // CHECK:STDOUT: }
  1694. // CHECK:STDOUT:
  1695. // CHECK:STDOUT: specific @impl.1(%N) {
  1696. // CHECK:STDOUT: %N => constants.%N
  1697. // CHECK:STDOUT: %N.patt => constants.%N
  1698. // CHECK:STDOUT: %iN => constants.%iN
  1699. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
  1700. // CHECK:STDOUT: }
  1701. // CHECK:STDOUT:
  1702. // CHECK:STDOUT: specific @Convert.2(constants.%N) {
  1703. // CHECK:STDOUT: %N => constants.%N
  1704. // CHECK:STDOUT: %iN => constants.%iN
  1705. // CHECK:STDOUT: }
  1706. // CHECK:STDOUT:
  1707. // CHECK:STDOUT: specific @impl.2(constants.%N) {
  1708. // CHECK:STDOUT: %N => constants.%N
  1709. // CHECK:STDOUT: %N.patt => constants.%N
  1710. // CHECK:STDOUT: %uN => constants.%uN
  1711. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
  1712. // CHECK:STDOUT: }
  1713. // CHECK:STDOUT:
  1714. // CHECK:STDOUT: specific @impl.2(%N) {
  1715. // CHECK:STDOUT: %N => constants.%N
  1716. // CHECK:STDOUT: %N.patt => constants.%N
  1717. // CHECK:STDOUT: %uN => constants.%uN
  1718. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
  1719. // CHECK:STDOUT: }
  1720. // CHECK:STDOUT:
  1721. // CHECK:STDOUT: specific @Convert.3(constants.%N) {
  1722. // CHECK:STDOUT: %N => constants.%N
  1723. // CHECK:STDOUT: %uN => constants.%uN
  1724. // CHECK:STDOUT: }
  1725. // CHECK:STDOUT:
  1726. // CHECK:STDOUT: specific @impl.3(constants.%N) {
  1727. // CHECK:STDOUT: %N => constants.%N
  1728. // CHECK:STDOUT: %N.patt => constants.%N
  1729. // CHECK:STDOUT: %iN => constants.%iN
  1730. // CHECK:STDOUT: }
  1731. // CHECK:STDOUT:
  1732. // CHECK:STDOUT: specific @impl.3(%N) {
  1733. // CHECK:STDOUT: %N => constants.%N
  1734. // CHECK:STDOUT: %N.patt => constants.%N
  1735. // CHECK:STDOUT: %iN => constants.%iN
  1736. // CHECK:STDOUT: }
  1737. // CHECK:STDOUT:
  1738. // CHECK:STDOUT: specific @Convert.4(constants.%N) {
  1739. // CHECK:STDOUT: %N => constants.%N
  1740. // CHECK:STDOUT: %iN => constants.%iN
  1741. // CHECK:STDOUT: }
  1742. // CHECK:STDOUT:
  1743. // CHECK:STDOUT: specific @impl.4(constants.%N) {
  1744. // CHECK:STDOUT: %N => constants.%N
  1745. // CHECK:STDOUT: %N.patt => constants.%N
  1746. // CHECK:STDOUT: %uN => constants.%uN
  1747. // CHECK:STDOUT: }
  1748. // CHECK:STDOUT:
  1749. // CHECK:STDOUT: specific @impl.4(%N) {
  1750. // CHECK:STDOUT: %N => constants.%N
  1751. // CHECK:STDOUT: %N.patt => constants.%N
  1752. // CHECK:STDOUT: %uN => constants.%uN
  1753. // CHECK:STDOUT: }
  1754. // CHECK:STDOUT:
  1755. // CHECK:STDOUT: specific @Convert.5(constants.%N) {
  1756. // CHECK:STDOUT: %N => constants.%N
  1757. // CHECK:STDOUT: %uN => constants.%uN
  1758. // CHECK:STDOUT: }
  1759. // CHECK:STDOUT:
  1760. // CHECK:STDOUT: specific @As(constants.%Dest) {
  1761. // CHECK:STDOUT: %Dest => constants.%Dest
  1762. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  1763. // CHECK:STDOUT: }
  1764. // CHECK:STDOUT:
  1765. // CHECK:STDOUT: specific @As(constants.%iN) {
  1766. // CHECK:STDOUT: %Dest => constants.%iN
  1767. // CHECK:STDOUT: %Dest.patt => constants.%iN
  1768. // CHECK:STDOUT: }
  1769. // CHECK:STDOUT:
  1770. // CHECK:STDOUT: specific @As(%Dest) {
  1771. // CHECK:STDOUT: %Dest => constants.%Dest
  1772. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  1773. // CHECK:STDOUT: }
  1774. // CHECK:STDOUT:
  1775. // CHECK:STDOUT: specific @As(@impl.5.%iN) {
  1776. // CHECK:STDOUT: %Dest => constants.%iN
  1777. // CHECK:STDOUT: %Dest.patt => constants.%iN
  1778. // CHECK:STDOUT: }
  1779. // CHECK:STDOUT:
  1780. // CHECK:STDOUT: specific @impl.5(constants.%N) {
  1781. // CHECK:STDOUT: %N => constants.%N
  1782. // CHECK:STDOUT: %N.patt => constants.%N
  1783. // CHECK:STDOUT: %iN => constants.%iN
  1784. // CHECK:STDOUT: %As.type => constants.%As.type.3
  1785. // CHECK:STDOUT: }
  1786. // CHECK:STDOUT:
  1787. // CHECK:STDOUT: specific @impl.5(%N) {
  1788. // CHECK:STDOUT: %N => constants.%N
  1789. // CHECK:STDOUT: %N.patt => constants.%N
  1790. // CHECK:STDOUT: %iN => constants.%iN
  1791. // CHECK:STDOUT: %As.type => constants.%As.type.3
  1792. // CHECK:STDOUT: }
  1793. // CHECK:STDOUT:
  1794. // CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
  1795. // CHECK:STDOUT: %Dest => constants.%Dest
  1796. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  1797. // CHECK:STDOUT: }
  1798. // CHECK:STDOUT:
  1799. // CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.3) {
  1800. // CHECK:STDOUT: %Dest => constants.%Dest
  1801. // CHECK:STDOUT: %As.type => constants.%As.type.2
  1802. // CHECK:STDOUT: %Self => constants.%Self.3
  1803. // CHECK:STDOUT: }
  1804. // CHECK:STDOUT:
  1805. // CHECK:STDOUT: specific @Convert.7(constants.%N) {
  1806. // CHECK:STDOUT: %N => constants.%N
  1807. // CHECK:STDOUT: %iN => constants.%iN
  1808. // CHECK:STDOUT: }
  1809. // CHECK:STDOUT:
  1810. // CHECK:STDOUT: specific @As(constants.%uN) {
  1811. // CHECK:STDOUT: %Dest => constants.%uN
  1812. // CHECK:STDOUT: %Dest.patt => constants.%uN
  1813. // CHECK:STDOUT: }
  1814. // CHECK:STDOUT:
  1815. // CHECK:STDOUT: specific @As(@impl.6.%uN) {
  1816. // CHECK:STDOUT: %Dest => constants.%uN
  1817. // CHECK:STDOUT: %Dest.patt => constants.%uN
  1818. // CHECK:STDOUT: }
  1819. // CHECK:STDOUT:
  1820. // CHECK:STDOUT: specific @impl.6(constants.%N) {
  1821. // CHECK:STDOUT: %N => constants.%N
  1822. // CHECK:STDOUT: %N.patt => constants.%N
  1823. // CHECK:STDOUT: %uN => constants.%uN
  1824. // CHECK:STDOUT: %As.type => constants.%As.type.4
  1825. // CHECK:STDOUT: }
  1826. // CHECK:STDOUT:
  1827. // CHECK:STDOUT: specific @impl.6(%N) {
  1828. // CHECK:STDOUT: %N => constants.%N
  1829. // CHECK:STDOUT: %N.patt => constants.%N
  1830. // CHECK:STDOUT: %uN => constants.%uN
  1831. // CHECK:STDOUT: %As.type => constants.%As.type.4
  1832. // CHECK:STDOUT: }
  1833. // CHECK:STDOUT:
  1834. // CHECK:STDOUT: specific @Convert.8(constants.%N) {
  1835. // CHECK:STDOUT: %N => constants.%N
  1836. // CHECK:STDOUT: %uN => constants.%uN
  1837. // CHECK:STDOUT: }
  1838. // CHECK:STDOUT:
  1839. // CHECK:STDOUT: specific @As(Core.IntLiteral) {
  1840. // CHECK:STDOUT: %Dest => Core.IntLiteral
  1841. // CHECK:STDOUT: %Dest.patt => Core.IntLiteral
  1842. // CHECK:STDOUT:
  1843. // CHECK:STDOUT: !definition:
  1844. // CHECK:STDOUT: %As.type => constants.%As.type.5
  1845. // CHECK:STDOUT: %Self => constants.%Self.4
  1846. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.12
  1847. // CHECK:STDOUT: %Convert => constants.%Convert.12
  1848. // CHECK:STDOUT: %.1 => constants.%.25
  1849. // CHECK:STDOUT: %.2 => constants.%.26
  1850. // CHECK:STDOUT: }
  1851. // CHECK:STDOUT:
  1852. // CHECK:STDOUT: specific @impl.7(constants.%N) {
  1853. // CHECK:STDOUT: %N => constants.%N
  1854. // CHECK:STDOUT: %N.patt => constants.%N
  1855. // CHECK:STDOUT: %iN => constants.%iN
  1856. // CHECK:STDOUT: }
  1857. // CHECK:STDOUT:
  1858. // CHECK:STDOUT: specific @impl.7(%N) {
  1859. // CHECK:STDOUT: %N => constants.%N
  1860. // CHECK:STDOUT: %N.patt => constants.%N
  1861. // CHECK:STDOUT: %iN => constants.%iN
  1862. // CHECK:STDOUT: }
  1863. // CHECK:STDOUT:
  1864. // CHECK:STDOUT: specific @Convert.9(constants.%N) {
  1865. // CHECK:STDOUT: %N => constants.%N
  1866. // CHECK:STDOUT: %iN => constants.%iN
  1867. // CHECK:STDOUT: }
  1868. // CHECK:STDOUT:
  1869. // CHECK:STDOUT: specific @impl.8(constants.%N) {
  1870. // CHECK:STDOUT: %N => constants.%N
  1871. // CHECK:STDOUT: %N.patt => constants.%N
  1872. // CHECK:STDOUT: %uN => constants.%uN
  1873. // CHECK:STDOUT: }
  1874. // CHECK:STDOUT:
  1875. // CHECK:STDOUT: specific @impl.8(%N) {
  1876. // CHECK:STDOUT: %N => constants.%N
  1877. // CHECK:STDOUT: %N.patt => constants.%N
  1878. // CHECK:STDOUT: %uN => constants.%uN
  1879. // CHECK:STDOUT: }
  1880. // CHECK:STDOUT:
  1881. // CHECK:STDOUT: specific @Convert.10(constants.%N) {
  1882. // CHECK:STDOUT: %N => constants.%N
  1883. // CHECK:STDOUT: %uN => constants.%uN
  1884. // CHECK:STDOUT: }
  1885. // CHECK:STDOUT:
  1886. // CHECK:STDOUT: --- fail_foo.impl.carbon
  1887. // CHECK:STDOUT:
  1888. // CHECK:STDOUT: constants {
  1889. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  1890. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic]
  1891. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
  1892. // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
  1893. // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic]
  1894. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
  1895. // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic]
  1896. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
  1897. // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
  1898. // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic]
  1899. // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
  1900. // CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
  1901. // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.10 [symbolic]
  1902. // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic]
  1903. // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic]
  1904. // CHECK:STDOUT: %.3: <witness> = interface_witness (%Convert.2) [symbolic]
  1905. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic]
  1906. // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic]
  1907. // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic]
  1908. // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic]
  1909. // CHECK:STDOUT: %.4: <witness> = interface_witness (%Convert.3) [symbolic]
  1910. // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template]
  1911. // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic]
  1912. // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic]
  1913. // CHECK:STDOUT: %.5: <witness> = interface_witness (%Convert.4) [symbolic]
  1914. // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template]
  1915. // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template]
  1916. // CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template]
  1917. // CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.17 [template]
  1918. // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic]
  1919. // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic]
  1920. // CHECK:STDOUT: %.8: <witness> = interface_witness (%Convert.6) [symbolic]
  1921. // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic]
  1922. // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic]
  1923. // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic]
  1924. // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic]
  1925. // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic]
  1926. // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic]
  1927. // CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic]
  1928. // CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.27 [symbolic]
  1929. // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic]
  1930. // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic]
  1931. // CHECK:STDOUT: %.11: <witness> = interface_witness (%Convert.8) [symbolic]
  1932. // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic]
  1933. // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic]
  1934. // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic]
  1935. // CHECK:STDOUT: %.12: <witness> = interface_witness (%Convert.9) [symbolic]
  1936. // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template]
  1937. // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic]
  1938. // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic]
  1939. // CHECK:STDOUT: %.13: <witness> = interface_witness (%Convert.10) [symbolic]
  1940. // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template]
  1941. // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template]
  1942. // CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template]
  1943. // CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.34 [template]
  1944. // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic]
  1945. // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic]
  1946. // CHECK:STDOUT: %.16: <witness> = interface_witness (%Convert.12) [symbolic]
  1947. // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
  1948. // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic]
  1949. // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
  1950. // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
  1951. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  1952. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  1953. // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template]
  1954. // CHECK:STDOUT: %.17: %.type = struct_value () [template]
  1955. // CHECK:STDOUT: %.18: type = class_type @.1, @.1(%U) [symbolic]
  1956. // CHECK:STDOUT: }
  1957. // CHECK:STDOUT:
  1958. // CHECK:STDOUT: imports {
  1959. // CHECK:STDOUT: %import_ref.1: %Class.type = import_ref Main//foo, inst+9, loaded [template = constants.%Class.1]
  1960. // CHECK:STDOUT: %import_ref.2 = import_ref Main//foo, inst+20, unloaded
  1961. // CHECK:STDOUT: %import_ref.3 = import_ref Main//foo, inst+413, unloaded
  1962. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  1963. // CHECK:STDOUT: import Core//prelude
  1964. // CHECK:STDOUT: import Core//prelude/...
  1965. // CHECK:STDOUT: }
  1966. // CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+77, unloaded
  1967. // CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+78, unloaded
  1968. // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+79, unloaded
  1969. // CHECK:STDOUT: %import_ref.7: type = import_ref Main//foo, inst+121, loaded [template = Core.IntLiteral]
  1970. // CHECK:STDOUT: %import_ref.8: type = import_ref Main//foo, inst+122, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)]
  1971. // CHECK:STDOUT: %import_ref.9 = import_ref Main//foo, inst+123, unloaded
  1972. // CHECK:STDOUT: %import_ref.10 = import_ref Main//foo, inst+94, unloaded
  1973. // CHECK:STDOUT: %import_ref.11: type = import_ref Main//foo, inst+151, loaded [template = Core.IntLiteral]
  1974. // CHECK:STDOUT: %import_ref.12: type = import_ref Main//foo, inst+152, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)]
  1975. // CHECK:STDOUT: %import_ref.13 = import_ref Main//foo, inst+153, unloaded
  1976. // CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+180, loaded [symbolic = @impl.3.%iN (constants.%iN)]
  1977. // CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+181, loaded [template = constants.%ImplicitAs.type.5]
  1978. // CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+182, unloaded
  1979. // CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+212, loaded [symbolic = @impl.4.%uN (constants.%uN)]
  1980. // CHECK:STDOUT: %import_ref.19: type = import_ref Main//foo, inst+213, loaded [template = constants.%ImplicitAs.type.5]
  1981. // CHECK:STDOUT: %import_ref.20 = import_ref Main//foo, inst+214, unloaded
  1982. // CHECK:STDOUT: %import_ref.21 = import_ref Main//foo, inst+244, unloaded
  1983. // CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+245, unloaded
  1984. // CHECK:STDOUT: %import_ref.23 = import_ref Main//foo, inst+246, unloaded
  1985. // CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+252, loaded [template = Core.IntLiteral]
  1986. // CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+253, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)]
  1987. // CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+254, unloaded
  1988. // CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+269, unloaded
  1989. // CHECK:STDOUT: %import_ref.28: type = import_ref Main//foo, inst+306, loaded [template = Core.IntLiteral]
  1990. // CHECK:STDOUT: %import_ref.29: type = import_ref Main//foo, inst+307, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)]
  1991. // CHECK:STDOUT: %import_ref.30 = import_ref Main//foo, inst+308, unloaded
  1992. // CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+335, loaded [symbolic = @impl.7.%iN (constants.%iN)]
  1993. // CHECK:STDOUT: %import_ref.32: type = import_ref Main//foo, inst+336, loaded [template = constants.%As.type.5]
  1994. // CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+337, unloaded
  1995. // CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+367, loaded [symbolic = @impl.8.%uN (constants.%uN)]
  1996. // CHECK:STDOUT: %import_ref.36: type = import_ref Main//foo, inst+368, loaded [template = constants.%As.type.5]
  1997. // CHECK:STDOUT: %import_ref.37 = import_ref Main//foo, inst+369, unloaded
  1998. // CHECK:STDOUT: }
  1999. // CHECK:STDOUT:
  2000. // CHECK:STDOUT: file {
  2001. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  2002. // CHECK:STDOUT: .Class = imports.%import_ref.1
  2003. // CHECK:STDOUT: .CompleteClass = imports.%import_ref.2
  2004. // CHECK:STDOUT: .F = imports.%import_ref.3
  2005. // CHECK:STDOUT: .Core = imports.%Core
  2006. // CHECK:STDOUT: }
  2007. // CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
  2008. // CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
  2009. // CHECK:STDOUT: %Core.import = import Core
  2010. // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.17] {
  2011. // CHECK:STDOUT: %U.patt.loc12_13.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_13.2 (constants.%U.patt)]
  2012. // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc12_13.1, runtime_param<invalid> [symbolic = %U.patt.loc12_13.2 (constants.%U.patt)]
  2013. // CHECK:STDOUT: } {
  2014. // CHECK:STDOUT: %U.param: type = value_param runtime_param<invalid>
  2015. // CHECK:STDOUT: %U.loc12_13.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc12_13.2 (constants.%U)]
  2016. // CHECK:STDOUT: }
  2017. // CHECK:STDOUT: }
  2018. // CHECK:STDOUT:
  2019. // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
  2020. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  2021. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
  2022. // CHECK:STDOUT:
  2023. // CHECK:STDOUT: !definition:
  2024. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
  2025. // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
  2026. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
  2027. // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
  2028. // CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)]
  2029. // CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.2)]
  2030. // CHECK:STDOUT:
  2031. // CHECK:STDOUT: interface {
  2032. // CHECK:STDOUT: !members:
  2033. // CHECK:STDOUT: .Self = imports.%import_ref.4
  2034. // CHECK:STDOUT: .Convert = imports.%import_ref.5
  2035. // CHECK:STDOUT: witness = (imports.%import_ref.6)
  2036. // CHECK:STDOUT: }
  2037. // CHECK:STDOUT: }
  2038. // CHECK:STDOUT:
  2039. // CHECK:STDOUT: generic interface @As(constants.%Dest: type) {
  2040. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  2041. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
  2042. // CHECK:STDOUT:
  2043. // CHECK:STDOUT: !definition:
  2044. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
  2045. // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
  2046. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)]
  2047. // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)]
  2048. // CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)]
  2049. // CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.27 [symbolic = %.2 (constants.%.10)]
  2050. // CHECK:STDOUT:
  2051. // CHECK:STDOUT: interface {
  2052. // CHECK:STDOUT: !members:
  2053. // CHECK:STDOUT: .Self = imports.%import_ref.21
  2054. // CHECK:STDOUT: .Convert = imports.%import_ref.22
  2055. // CHECK:STDOUT: witness = (imports.%import_ref.23)
  2056. // CHECK:STDOUT: }
  2057. // CHECK:STDOUT: }
  2058. // CHECK:STDOUT:
  2059. // CHECK:STDOUT: generic impl @impl.1(constants.%N: Core.IntLiteral) {
  2060. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2061. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  2062. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  2063. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%iN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3)]
  2064. // CHECK:STDOUT:
  2065. // CHECK:STDOUT: !definition:
  2066. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)]
  2067. // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)]
  2068. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)]
  2069. // CHECK:STDOUT:
  2070. // CHECK:STDOUT: impl: imports.%import_ref.7 as imports.%import_ref.8 {
  2071. // CHECK:STDOUT: !members:
  2072. // CHECK:STDOUT: witness = imports.%import_ref.9
  2073. // CHECK:STDOUT: }
  2074. // CHECK:STDOUT: }
  2075. // CHECK:STDOUT:
  2076. // CHECK:STDOUT: generic impl @impl.2(constants.%N: Core.IntLiteral) {
  2077. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2078. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  2079. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  2080. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.4)]
  2081. // CHECK:STDOUT:
  2082. // CHECK:STDOUT: !definition:
  2083. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)]
  2084. // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)]
  2085. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)]
  2086. // CHECK:STDOUT:
  2087. // CHECK:STDOUT: impl: imports.%import_ref.11 as imports.%import_ref.12 {
  2088. // CHECK:STDOUT: !members:
  2089. // CHECK:STDOUT: witness = imports.%import_ref.13
  2090. // CHECK:STDOUT: }
  2091. // CHECK:STDOUT: }
  2092. // CHECK:STDOUT:
  2093. // CHECK:STDOUT: generic impl @impl.3(constants.%N: Core.IntLiteral) {
  2094. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2095. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  2096. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  2097. // CHECK:STDOUT:
  2098. // CHECK:STDOUT: !definition:
  2099. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)]
  2100. // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)]
  2101. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)]
  2102. // CHECK:STDOUT:
  2103. // CHECK:STDOUT: impl: imports.%import_ref.14 as imports.%import_ref.15 {
  2104. // CHECK:STDOUT: !members:
  2105. // CHECK:STDOUT: witness = imports.%import_ref.16
  2106. // CHECK:STDOUT: }
  2107. // CHECK:STDOUT: }
  2108. // CHECK:STDOUT:
  2109. // CHECK:STDOUT: generic impl @impl.4(constants.%N: Core.IntLiteral) {
  2110. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2111. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  2112. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  2113. // CHECK:STDOUT:
  2114. // CHECK:STDOUT: !definition:
  2115. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)]
  2116. // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)]
  2117. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)]
  2118. // CHECK:STDOUT:
  2119. // CHECK:STDOUT: impl: imports.%import_ref.18 as imports.%import_ref.19 {
  2120. // CHECK:STDOUT: !members:
  2121. // CHECK:STDOUT: witness = imports.%import_ref.20
  2122. // CHECK:STDOUT: }
  2123. // CHECK:STDOUT: }
  2124. // CHECK:STDOUT:
  2125. // CHECK:STDOUT: generic impl @impl.5(constants.%N: Core.IntLiteral) {
  2126. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2127. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  2128. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  2129. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%iN)> [symbolic = %As.type (constants.%As.type.3)]
  2130. // CHECK:STDOUT:
  2131. // CHECK:STDOUT: !definition:
  2132. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)]
  2133. // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)]
  2134. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)]
  2135. // CHECK:STDOUT:
  2136. // CHECK:STDOUT: impl: imports.%import_ref.24 as imports.%import_ref.25 {
  2137. // CHECK:STDOUT: !members:
  2138. // CHECK:STDOUT: witness = imports.%import_ref.26
  2139. // CHECK:STDOUT: }
  2140. // CHECK:STDOUT: }
  2141. // CHECK:STDOUT:
  2142. // CHECK:STDOUT: generic impl @impl.6(constants.%N: Core.IntLiteral) {
  2143. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2144. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  2145. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  2146. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%uN)> [symbolic = %As.type (constants.%As.type.4)]
  2147. // CHECK:STDOUT:
  2148. // CHECK:STDOUT: !definition:
  2149. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)]
  2150. // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)]
  2151. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)]
  2152. // CHECK:STDOUT:
  2153. // CHECK:STDOUT: impl: imports.%import_ref.28 as imports.%import_ref.29 {
  2154. // CHECK:STDOUT: !members:
  2155. // CHECK:STDOUT: witness = imports.%import_ref.30
  2156. // CHECK:STDOUT: }
  2157. // CHECK:STDOUT: }
  2158. // CHECK:STDOUT:
  2159. // CHECK:STDOUT: generic impl @impl.7(constants.%N: Core.IntLiteral) {
  2160. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2161. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  2162. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  2163. // CHECK:STDOUT:
  2164. // CHECK:STDOUT: !definition:
  2165. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)]
  2166. // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)]
  2167. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)]
  2168. // CHECK:STDOUT:
  2169. // CHECK:STDOUT: impl: imports.%import_ref.31 as imports.%import_ref.32 {
  2170. // CHECK:STDOUT: !members:
  2171. // CHECK:STDOUT: witness = imports.%import_ref.33
  2172. // CHECK:STDOUT: }
  2173. // CHECK:STDOUT: }
  2174. // CHECK:STDOUT:
  2175. // CHECK:STDOUT: generic impl @impl.8(constants.%N: Core.IntLiteral) {
  2176. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2177. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)]
  2178. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  2179. // CHECK:STDOUT:
  2180. // CHECK:STDOUT: !definition:
  2181. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)]
  2182. // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)]
  2183. // CHECK:STDOUT: %.1: <witness> = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)]
  2184. // CHECK:STDOUT:
  2185. // CHECK:STDOUT: impl: imports.%import_ref.35 as imports.%import_ref.36 {
  2186. // CHECK:STDOUT: !members:
  2187. // CHECK:STDOUT: witness = imports.%import_ref.37
  2188. // CHECK:STDOUT: }
  2189. // CHECK:STDOUT: }
  2190. // CHECK:STDOUT:
  2191. // CHECK:STDOUT: generic class @Class(constants.%T: type) {
  2192. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  2193. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
  2194. // CHECK:STDOUT:
  2195. // CHECK:STDOUT: class;
  2196. // CHECK:STDOUT: }
  2197. // CHECK:STDOUT:
  2198. // CHECK:STDOUT: generic class @.1(%U.loc12_13.1: type) {
  2199. // CHECK:STDOUT: %U.loc12_13.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc12_13.2 (constants.%U)]
  2200. // CHECK:STDOUT: %U.patt.loc12_13.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_13.2 (constants.%U.patt)]
  2201. // CHECK:STDOUT:
  2202. // CHECK:STDOUT: !definition:
  2203. // CHECK:STDOUT:
  2204. // CHECK:STDOUT: class {
  2205. // CHECK:STDOUT: %T.ref: <error> = name_ref T, <error> [template = <error>]
  2206. // CHECK:STDOUT: %.loc16: <error> = field_decl x, element0 [template]
  2207. // CHECK:STDOUT: %.loc17: <witness> = complete_type_witness <error> [template = <error>]
  2208. // CHECK:STDOUT:
  2209. // CHECK:STDOUT: !members:
  2210. // CHECK:STDOUT: .Self = constants.%.18
  2211. // CHECK:STDOUT: .x = %.loc16
  2212. // CHECK:STDOUT: }
  2213. // CHECK:STDOUT: }
  2214. // CHECK:STDOUT:
  2215. // CHECK:STDOUT: generic fn @Convert.1(constants.%Dest: type, constants.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) {
  2216. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  2217. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)]
  2218. // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
  2219. // CHECK:STDOUT:
  2220. // CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest);
  2221. // CHECK:STDOUT: }
  2222. // CHECK:STDOUT:
  2223. // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) {
  2224. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2225. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  2226. // CHECK:STDOUT:
  2227. // CHECK:STDOUT: !definition:
  2228. // CHECK:STDOUT:
  2229. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.2.%iN (%iN) = "int.convert_checked";
  2230. // CHECK:STDOUT: }
  2231. // CHECK:STDOUT:
  2232. // CHECK:STDOUT: generic fn @Convert.3(constants.%N: Core.IntLiteral) {
  2233. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2234. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  2235. // CHECK:STDOUT:
  2236. // CHECK:STDOUT: !definition:
  2237. // CHECK:STDOUT:
  2238. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.3.%uN (%uN) = "int.convert_checked";
  2239. // CHECK:STDOUT: }
  2240. // CHECK:STDOUT:
  2241. // CHECK:STDOUT: generic fn @Convert.4(constants.%N: Core.IntLiteral) {
  2242. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2243. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  2244. // CHECK:STDOUT:
  2245. // CHECK:STDOUT: !definition:
  2246. // CHECK:STDOUT:
  2247. // CHECK:STDOUT: fn[%self.param_patt: @Convert.4.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
  2248. // CHECK:STDOUT: }
  2249. // CHECK:STDOUT:
  2250. // CHECK:STDOUT: generic fn @Convert.5(constants.%N: Core.IntLiteral) {
  2251. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2252. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  2253. // CHECK:STDOUT:
  2254. // CHECK:STDOUT: !definition:
  2255. // CHECK:STDOUT:
  2256. // CHECK:STDOUT: fn[%self.param_patt: @Convert.5.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
  2257. // CHECK:STDOUT: }
  2258. // CHECK:STDOUT:
  2259. // CHECK:STDOUT: generic fn @Convert.6(constants.%Dest: type, constants.%Self.3: @As.%As.type (%As.type.2)) {
  2260. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  2261. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)]
  2262. // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)]
  2263. // CHECK:STDOUT:
  2264. // CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest);
  2265. // CHECK:STDOUT: }
  2266. // CHECK:STDOUT:
  2267. // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) {
  2268. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2269. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  2270. // CHECK:STDOUT:
  2271. // CHECK:STDOUT: !definition:
  2272. // CHECK:STDOUT:
  2273. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.7.%iN (%iN) = "int.convert_checked";
  2274. // CHECK:STDOUT: }
  2275. // CHECK:STDOUT:
  2276. // CHECK:STDOUT: generic fn @Convert.8(constants.%N: Core.IntLiteral) {
  2277. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2278. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  2279. // CHECK:STDOUT:
  2280. // CHECK:STDOUT: !definition:
  2281. // CHECK:STDOUT:
  2282. // CHECK:STDOUT: fn[%self.param_patt: Core.IntLiteral]() -> @Convert.8.%uN (%uN) = "int.convert_checked";
  2283. // CHECK:STDOUT: }
  2284. // CHECK:STDOUT:
  2285. // CHECK:STDOUT: generic fn @Convert.9(constants.%N: Core.IntLiteral) {
  2286. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2287. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)]
  2288. // CHECK:STDOUT:
  2289. // CHECK:STDOUT: !definition:
  2290. // CHECK:STDOUT:
  2291. // CHECK:STDOUT: fn[%self.param_patt: @Convert.9.%iN (%iN)]() -> Core.IntLiteral = "int.convert_checked";
  2292. // CHECK:STDOUT: }
  2293. // CHECK:STDOUT:
  2294. // CHECK:STDOUT: generic fn @Convert.10(constants.%N: Core.IntLiteral) {
  2295. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  2296. // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic = %uN (constants.%uN)]
  2297. // CHECK:STDOUT:
  2298. // CHECK:STDOUT: !definition:
  2299. // CHECK:STDOUT:
  2300. // CHECK:STDOUT: fn[%self.param_patt: @Convert.10.%uN (%uN)]() -> Core.IntLiteral = "int.convert_checked";
  2301. // CHECK:STDOUT: }
  2302. // CHECK:STDOUT:
  2303. // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
  2304. // CHECK:STDOUT: %Dest => constants.%Dest
  2305. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  2306. // CHECK:STDOUT: }
  2307. // CHECK:STDOUT:
  2308. // CHECK:STDOUT: specific @ImplicitAs(constants.%iN) {
  2309. // CHECK:STDOUT: %Dest => constants.%iN
  2310. // CHECK:STDOUT: %Dest.patt => constants.%iN
  2311. // CHECK:STDOUT: }
  2312. // CHECK:STDOUT:
  2313. // CHECK:STDOUT: specific @ImplicitAs(%Dest) {
  2314. // CHECK:STDOUT: %Dest => constants.%Dest
  2315. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  2316. // CHECK:STDOUT: }
  2317. // CHECK:STDOUT:
  2318. // CHECK:STDOUT: specific @ImplicitAs(@impl.1.%iN) {
  2319. // CHECK:STDOUT: %Dest => constants.%iN
  2320. // CHECK:STDOUT: %Dest.patt => constants.%iN
  2321. // CHECK:STDOUT: }
  2322. // CHECK:STDOUT:
  2323. // CHECK:STDOUT: specific @impl.1(constants.%N) {
  2324. // CHECK:STDOUT: %N => constants.%N
  2325. // CHECK:STDOUT: %N.patt => constants.%N
  2326. // CHECK:STDOUT: %iN => constants.%iN
  2327. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
  2328. // CHECK:STDOUT: }
  2329. // CHECK:STDOUT:
  2330. // CHECK:STDOUT: specific @impl.1(%N) {
  2331. // CHECK:STDOUT: %N => constants.%N
  2332. // CHECK:STDOUT: %N.patt => constants.%N
  2333. // CHECK:STDOUT: %iN => constants.%iN
  2334. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3
  2335. // CHECK:STDOUT: }
  2336. // CHECK:STDOUT:
  2337. // CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {
  2338. // CHECK:STDOUT: %Dest => constants.%Dest
  2339. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  2340. // CHECK:STDOUT: }
  2341. // CHECK:STDOUT:
  2342. // CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.1) {
  2343. // CHECK:STDOUT: %Dest => constants.%Dest
  2344. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2
  2345. // CHECK:STDOUT: %Self => constants.%Self.1
  2346. // CHECK:STDOUT: }
  2347. // CHECK:STDOUT:
  2348. // CHECK:STDOUT: specific @Convert.2(constants.%N) {
  2349. // CHECK:STDOUT: %N => constants.%N
  2350. // CHECK:STDOUT: %iN => constants.%iN
  2351. // CHECK:STDOUT: }
  2352. // CHECK:STDOUT:
  2353. // CHECK:STDOUT: specific @ImplicitAs(constants.%uN) {
  2354. // CHECK:STDOUT: %Dest => constants.%uN
  2355. // CHECK:STDOUT: %Dest.patt => constants.%uN
  2356. // CHECK:STDOUT: }
  2357. // CHECK:STDOUT:
  2358. // CHECK:STDOUT: specific @ImplicitAs(@impl.2.%uN) {
  2359. // CHECK:STDOUT: %Dest => constants.%uN
  2360. // CHECK:STDOUT: %Dest.patt => constants.%uN
  2361. // CHECK:STDOUT: }
  2362. // CHECK:STDOUT:
  2363. // CHECK:STDOUT: specific @impl.2(constants.%N) {
  2364. // CHECK:STDOUT: %N => constants.%N
  2365. // CHECK:STDOUT: %N.patt => constants.%N
  2366. // CHECK:STDOUT: %uN => constants.%uN
  2367. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
  2368. // CHECK:STDOUT: }
  2369. // CHECK:STDOUT:
  2370. // CHECK:STDOUT: specific @impl.2(%N) {
  2371. // CHECK:STDOUT: %N => constants.%N
  2372. // CHECK:STDOUT: %N.patt => constants.%N
  2373. // CHECK:STDOUT: %uN => constants.%uN
  2374. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4
  2375. // CHECK:STDOUT: }
  2376. // CHECK:STDOUT:
  2377. // CHECK:STDOUT: specific @Convert.3(constants.%N) {
  2378. // CHECK:STDOUT: %N => constants.%N
  2379. // CHECK:STDOUT: %uN => constants.%uN
  2380. // CHECK:STDOUT: }
  2381. // CHECK:STDOUT:
  2382. // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
  2383. // CHECK:STDOUT: %Dest => Core.IntLiteral
  2384. // CHECK:STDOUT: %Dest.patt => Core.IntLiteral
  2385. // CHECK:STDOUT:
  2386. // CHECK:STDOUT: !definition:
  2387. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.5
  2388. // CHECK:STDOUT: %Self => constants.%Self.2
  2389. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5
  2390. // CHECK:STDOUT: %Convert => constants.%Convert.5
  2391. // CHECK:STDOUT: %.1 => constants.%.6
  2392. // CHECK:STDOUT: %.2 => constants.%.7
  2393. // CHECK:STDOUT: }
  2394. // CHECK:STDOUT:
  2395. // CHECK:STDOUT: specific @impl.3(constants.%N) {
  2396. // CHECK:STDOUT: %N => constants.%N
  2397. // CHECK:STDOUT: %N.patt => constants.%N
  2398. // CHECK:STDOUT: %iN => constants.%iN
  2399. // CHECK:STDOUT: }
  2400. // CHECK:STDOUT:
  2401. // CHECK:STDOUT: specific @impl.3(%N) {
  2402. // CHECK:STDOUT: %N => constants.%N
  2403. // CHECK:STDOUT: %N.patt => constants.%N
  2404. // CHECK:STDOUT: %iN => constants.%iN
  2405. // CHECK:STDOUT: }
  2406. // CHECK:STDOUT:
  2407. // CHECK:STDOUT: specific @Convert.4(constants.%N) {
  2408. // CHECK:STDOUT: %N => constants.%N
  2409. // CHECK:STDOUT: %iN => constants.%iN
  2410. // CHECK:STDOUT: }
  2411. // CHECK:STDOUT:
  2412. // CHECK:STDOUT: specific @impl.4(constants.%N) {
  2413. // CHECK:STDOUT: %N => constants.%N
  2414. // CHECK:STDOUT: %N.patt => constants.%N
  2415. // CHECK:STDOUT: %uN => constants.%uN
  2416. // CHECK:STDOUT: }
  2417. // CHECK:STDOUT:
  2418. // CHECK:STDOUT: specific @impl.4(%N) {
  2419. // CHECK:STDOUT: %N => constants.%N
  2420. // CHECK:STDOUT: %N.patt => constants.%N
  2421. // CHECK:STDOUT: %uN => constants.%uN
  2422. // CHECK:STDOUT: }
  2423. // CHECK:STDOUT:
  2424. // CHECK:STDOUT: specific @Convert.5(constants.%N) {
  2425. // CHECK:STDOUT: %N => constants.%N
  2426. // CHECK:STDOUT: %uN => constants.%uN
  2427. // CHECK:STDOUT: }
  2428. // CHECK:STDOUT:
  2429. // CHECK:STDOUT: specific @As(constants.%Dest) {
  2430. // CHECK:STDOUT: %Dest => constants.%Dest
  2431. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  2432. // CHECK:STDOUT: }
  2433. // CHECK:STDOUT:
  2434. // CHECK:STDOUT: specific @As(constants.%iN) {
  2435. // CHECK:STDOUT: %Dest => constants.%iN
  2436. // CHECK:STDOUT: %Dest.patt => constants.%iN
  2437. // CHECK:STDOUT: }
  2438. // CHECK:STDOUT:
  2439. // CHECK:STDOUT: specific @As(%Dest) {
  2440. // CHECK:STDOUT: %Dest => constants.%Dest
  2441. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  2442. // CHECK:STDOUT: }
  2443. // CHECK:STDOUT:
  2444. // CHECK:STDOUT: specific @As(@impl.5.%iN) {
  2445. // CHECK:STDOUT: %Dest => constants.%iN
  2446. // CHECK:STDOUT: %Dest.patt => constants.%iN
  2447. // CHECK:STDOUT: }
  2448. // CHECK:STDOUT:
  2449. // CHECK:STDOUT: specific @impl.5(constants.%N) {
  2450. // CHECK:STDOUT: %N => constants.%N
  2451. // CHECK:STDOUT: %N.patt => constants.%N
  2452. // CHECK:STDOUT: %iN => constants.%iN
  2453. // CHECK:STDOUT: %As.type => constants.%As.type.3
  2454. // CHECK:STDOUT: }
  2455. // CHECK:STDOUT:
  2456. // CHECK:STDOUT: specific @impl.5(%N) {
  2457. // CHECK:STDOUT: %N => constants.%N
  2458. // CHECK:STDOUT: %N.patt => constants.%N
  2459. // CHECK:STDOUT: %iN => constants.%iN
  2460. // CHECK:STDOUT: %As.type => constants.%As.type.3
  2461. // CHECK:STDOUT: }
  2462. // CHECK:STDOUT:
  2463. // CHECK:STDOUT: specific @As(@Convert.6.%Dest) {
  2464. // CHECK:STDOUT: %Dest => constants.%Dest
  2465. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  2466. // CHECK:STDOUT: }
  2467. // CHECK:STDOUT:
  2468. // CHECK:STDOUT: specific @Convert.6(constants.%Dest, constants.%Self.3) {
  2469. // CHECK:STDOUT: %Dest => constants.%Dest
  2470. // CHECK:STDOUT: %As.type => constants.%As.type.2
  2471. // CHECK:STDOUT: %Self => constants.%Self.3
  2472. // CHECK:STDOUT: }
  2473. // CHECK:STDOUT:
  2474. // CHECK:STDOUT: specific @Convert.7(constants.%N) {
  2475. // CHECK:STDOUT: %N => constants.%N
  2476. // CHECK:STDOUT: %iN => constants.%iN
  2477. // CHECK:STDOUT: }
  2478. // CHECK:STDOUT:
  2479. // CHECK:STDOUT: specific @As(constants.%uN) {
  2480. // CHECK:STDOUT: %Dest => constants.%uN
  2481. // CHECK:STDOUT: %Dest.patt => constants.%uN
  2482. // CHECK:STDOUT: }
  2483. // CHECK:STDOUT:
  2484. // CHECK:STDOUT: specific @As(@impl.6.%uN) {
  2485. // CHECK:STDOUT: %Dest => constants.%uN
  2486. // CHECK:STDOUT: %Dest.patt => constants.%uN
  2487. // CHECK:STDOUT: }
  2488. // CHECK:STDOUT:
  2489. // CHECK:STDOUT: specific @impl.6(constants.%N) {
  2490. // CHECK:STDOUT: %N => constants.%N
  2491. // CHECK:STDOUT: %N.patt => constants.%N
  2492. // CHECK:STDOUT: %uN => constants.%uN
  2493. // CHECK:STDOUT: %As.type => constants.%As.type.4
  2494. // CHECK:STDOUT: }
  2495. // CHECK:STDOUT:
  2496. // CHECK:STDOUT: specific @impl.6(%N) {
  2497. // CHECK:STDOUT: %N => constants.%N
  2498. // CHECK:STDOUT: %N.patt => constants.%N
  2499. // CHECK:STDOUT: %uN => constants.%uN
  2500. // CHECK:STDOUT: %As.type => constants.%As.type.4
  2501. // CHECK:STDOUT: }
  2502. // CHECK:STDOUT:
  2503. // CHECK:STDOUT: specific @Convert.8(constants.%N) {
  2504. // CHECK:STDOUT: %N => constants.%N
  2505. // CHECK:STDOUT: %uN => constants.%uN
  2506. // CHECK:STDOUT: }
  2507. // CHECK:STDOUT:
  2508. // CHECK:STDOUT: specific @As(Core.IntLiteral) {
  2509. // CHECK:STDOUT: %Dest => Core.IntLiteral
  2510. // CHECK:STDOUT: %Dest.patt => Core.IntLiteral
  2511. // CHECK:STDOUT:
  2512. // CHECK:STDOUT: !definition:
  2513. // CHECK:STDOUT: %As.type => constants.%As.type.5
  2514. // CHECK:STDOUT: %Self => constants.%Self.4
  2515. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11
  2516. // CHECK:STDOUT: %Convert => constants.%Convert.11
  2517. // CHECK:STDOUT: %.1 => constants.%.14
  2518. // CHECK:STDOUT: %.2 => constants.%.15
  2519. // CHECK:STDOUT: }
  2520. // CHECK:STDOUT:
  2521. // CHECK:STDOUT: specific @impl.7(constants.%N) {
  2522. // CHECK:STDOUT: %N => constants.%N
  2523. // CHECK:STDOUT: %N.patt => constants.%N
  2524. // CHECK:STDOUT: %iN => constants.%iN
  2525. // CHECK:STDOUT: }
  2526. // CHECK:STDOUT:
  2527. // CHECK:STDOUT: specific @impl.7(%N) {
  2528. // CHECK:STDOUT: %N => constants.%N
  2529. // CHECK:STDOUT: %N.patt => constants.%N
  2530. // CHECK:STDOUT: %iN => constants.%iN
  2531. // CHECK:STDOUT: }
  2532. // CHECK:STDOUT:
  2533. // CHECK:STDOUT: specific @Convert.9(constants.%N) {
  2534. // CHECK:STDOUT: %N => constants.%N
  2535. // CHECK:STDOUT: %iN => constants.%iN
  2536. // CHECK:STDOUT: }
  2537. // CHECK:STDOUT:
  2538. // CHECK:STDOUT: specific @impl.8(constants.%N) {
  2539. // CHECK:STDOUT: %N => constants.%N
  2540. // CHECK:STDOUT: %N.patt => constants.%N
  2541. // CHECK:STDOUT: %uN => constants.%uN
  2542. // CHECK:STDOUT: }
  2543. // CHECK:STDOUT:
  2544. // CHECK:STDOUT: specific @impl.8(%N) {
  2545. // CHECK:STDOUT: %N => constants.%N
  2546. // CHECK:STDOUT: %N.patt => constants.%N
  2547. // CHECK:STDOUT: %uN => constants.%uN
  2548. // CHECK:STDOUT: }
  2549. // CHECK:STDOUT:
  2550. // CHECK:STDOUT: specific @Convert.10(constants.%N) {
  2551. // CHECK:STDOUT: %N => constants.%N
  2552. // CHECK:STDOUT: %uN => constants.%uN
  2553. // CHECK:STDOUT: }
  2554. // CHECK:STDOUT:
  2555. // CHECK:STDOUT: specific @Class(constants.%T) {
  2556. // CHECK:STDOUT: %T => constants.%T
  2557. // CHECK:STDOUT: %T.patt => constants.%T
  2558. // CHECK:STDOUT: }
  2559. // CHECK:STDOUT:
  2560. // CHECK:STDOUT: specific @.1(constants.%U) {
  2561. // CHECK:STDOUT: %U.loc12_13.2 => constants.%U
  2562. // CHECK:STDOUT: %U.patt.loc12_13.2 => constants.%U
  2563. // CHECK:STDOUT: }
  2564. // CHECK:STDOUT: