fail_impl_bad_assoc_fn.carbon 76 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187
  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/impl/fail_impl_bad_assoc_fn.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon
  10. interface I { fn F(); }
  11. class NoF {
  12. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:3: error: missing implementation of F in impl of interface I [ImplMissingFunction]
  13. // CHECK:STDERR: impl as I {}
  14. // CHECK:STDERR: ^~~~~~~~~~~
  15. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-6]]:15: note: associated function F declared here [AssociatedFunctionHere]
  16. // CHECK:STDERR: interface I { fn F(); }
  17. // CHECK:STDERR: ^~~~~~~
  18. // CHECK:STDERR:
  19. impl as I {}
  20. }
  21. class FNotFunction {
  22. impl as I {
  23. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: associated function F implemented by non-function [ImplFunctionWithNonFunction]
  24. // CHECK:STDERR: class F;
  25. // CHECK:STDERR: ^~~~~~~~
  26. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-18]]:15: note: associated function F declared here [AssociatedFunctionHere]
  27. // CHECK:STDERR: interface I { fn F(); }
  28. // CHECK:STDERR: ^~~~~~~
  29. // CHECK:STDERR:
  30. class F;
  31. }
  32. }
  33. fn PossiblyF();
  34. // TODO: Should this be permitted?
  35. class FAlias {
  36. impl as I {
  37. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:11: error: associated function F implemented by non-function [ImplFunctionWithNonFunction]
  38. // CHECK:STDERR: alias F = PossiblyF;
  39. // CHECK:STDERR: ^
  40. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-34]]:15: note: associated function F declared here [AssociatedFunctionHere]
  41. // CHECK:STDERR: interface I { fn F(); }
  42. // CHECK:STDERR: ^~~~~~~
  43. // CHECK:STDERR:
  44. alias F = PossiblyF;
  45. }
  46. }
  47. class FExtraParam {
  48. impl as I {
  49. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: redeclaration differs because of parameter count of 1 [RedeclParamCountDiffers]
  50. // CHECK:STDERR: fn F(b: bool);
  51. // CHECK:STDERR: ^~~~~~~~~~~~~~
  52. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-47]]:15: note: previously declared with parameter count of 0 [RedeclParamCountPrevious]
  53. // CHECK:STDERR: interface I { fn F(); }
  54. // CHECK:STDERR: ^~~~~~~
  55. // CHECK:STDERR:
  56. fn F(b: bool);
  57. }
  58. }
  59. class FExtraImplicitParam {
  60. impl as I {
  61. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: redeclaration differs because of implicit parameter list [RedeclParamListDiffers]
  62. // CHECK:STDERR: fn F[self: Self]();
  63. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
  64. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-60]]:15: note: previously declared without implicit parameter list [RedeclParamListPrevious]
  65. // CHECK:STDERR: interface I { fn F(); }
  66. // CHECK:STDERR: ^~~~~~~
  67. // CHECK:STDERR:
  68. fn F[self: Self]();
  69. }
  70. }
  71. // TODO: Should this be permitted?
  72. class FExtraReturnType {
  73. impl as I {
  74. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: function redeclaration differs because return type is `bool` [FunctionRedeclReturnTypeDiffers]
  75. // CHECK:STDERR: fn F() -> bool;
  76. // CHECK:STDERR: ^~~~~~~~~~~~~~~
  77. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-74]]:15: note: previously declared with no return type [FunctionRedeclReturnTypePreviousNoReturn]
  78. // CHECK:STDERR: interface I { fn F(); }
  79. // CHECK:STDERR: ^~~~~~~
  80. // CHECK:STDERR:
  81. fn F() -> bool;
  82. }
  83. }
  84. interface J { fn F[self: bool](b: bool) -> bool; }
  85. class FMissingParam {
  86. impl as J {
  87. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: redeclaration differs because of parameter count of 0 [RedeclParamCountDiffers]
  88. // CHECK:STDERR: fn F[self: bool]() -> bool;
  89. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  90. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-7]]:15: note: previously declared with parameter count of 1 [RedeclParamCountPrevious]
  91. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  92. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  93. // CHECK:STDERR:
  94. fn F[self: bool]() -> bool;
  95. }
  96. }
  97. class FMissingImplicitParam {
  98. impl as J {
  99. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: redeclaration differs because of missing implicit parameter list [RedeclParamListDiffers]
  100. // CHECK:STDERR: fn F(b: bool) -> bool;
  101. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
  102. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-20]]:15: note: previously declared with implicit parameter list [RedeclParamListPrevious]
  103. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  104. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  105. // CHECK:STDERR:
  106. fn F(b: bool) -> bool;
  107. }
  108. }
  109. class FMissingReturnType {
  110. impl as J {
  111. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: function redeclaration differs because no return type is provided [FunctionRedeclReturnTypeDiffersNoReturn]
  112. // CHECK:STDERR: fn F[self: bool](b: bool);
  113. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
  114. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-33]]:15: note: previously declared with return type `bool` [FunctionRedeclReturnTypePrevious]
  115. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  116. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  117. // CHECK:STDERR:
  118. fn F[self: bool](b: bool);
  119. }
  120. }
  121. class FDifferentParamType {
  122. impl as J {
  123. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:22: error: type `<pattern for FDifferentParamType>` of parameter 1 in redeclaration differs from previous parameter type `<pattern for bool>` [RedeclParamDiffersType]
  124. // CHECK:STDERR: fn F[self: bool](b: Self) -> bool;
  125. // CHECK:STDERR: ^~~~~~~
  126. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-46]]:32: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
  127. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  128. // CHECK:STDERR: ^~~~~~~
  129. // CHECK:STDERR:
  130. fn F[self: bool](b: Self) -> bool;
  131. }
  132. }
  133. class FDifferentImplicitParamType {
  134. impl as J {
  135. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: error: type `<pattern for FDifferentImplicitParamType>` of implicit parameter 1 in redeclaration differs from previous parameter type `<pattern for bool>` [RedeclParamDiffersType]
  136. // CHECK:STDERR: fn F[self: Self](b: bool) -> bool;
  137. // CHECK:STDERR: ^~~~~~~~~~
  138. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-59]]:20: note: previous declaration's corresponding implicit parameter here [RedeclParamPrevious]
  139. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  140. // CHECK:STDERR: ^~~~~~~~~~
  141. // CHECK:STDERR:
  142. fn F[self: Self](b: bool) -> bool;
  143. }
  144. }
  145. class FDifferentReturnType {
  146. impl as J {
  147. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: function redeclaration differs because return type is `FDifferentReturnType` [FunctionRedeclReturnTypeDiffers]
  148. // CHECK:STDERR: fn F[self: bool](b: bool) -> Self;
  149. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  150. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-72]]:15: note: previously declared with return type `bool` [FunctionRedeclReturnTypePrevious]
  151. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  152. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  153. // CHECK:STDERR:
  154. fn F[self: bool](b: bool) -> Self;
  155. }
  156. }
  157. // TODO: This should probably be permitted.
  158. class FDifferentParamName {
  159. impl as J {
  160. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:22: error: redeclaration differs at parameter 1 [RedeclParamDiffers]
  161. // CHECK:STDERR: fn F[self: bool](not_b: bool) -> bool;
  162. // CHECK:STDERR: ^~~~~~~~~~~
  163. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-86]]:32: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
  164. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  165. // CHECK:STDERR: ^~~~~~~
  166. // CHECK:STDERR:
  167. fn F[self: bool](not_b: bool) -> bool;
  168. }
  169. }
  170. interface SelfNested {
  171. fn F(x: (Self*, {.x: Self, .y: i32})) -> array(Self, 4);
  172. }
  173. class SelfNestedBadParam {
  174. impl as SelfNested {
  175. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: error: type `<pattern for (SelfNestedBadParam*, {.x: i32, .y: i32})>` of parameter 1 in redeclaration differs from previous parameter type `<pattern for (SelfNestedBadParam*, {.x: SelfNestedBadParam, .y: i32})>` [RedeclParamDiffersType]
  176. // CHECK:STDERR: fn F(x: (SelfNestedBadParam*, {.x: i32, .y: i32})) -> array(SelfNestedBadParam, 4);
  177. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  178. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-8]]:8: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
  179. // CHECK:STDERR: fn F(x: (Self*, {.x: Self, .y: i32})) -> array(Self, 4);
  180. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  181. // CHECK:STDERR:
  182. fn F(x: (SelfNestedBadParam*, {.x: i32, .y: i32})) -> array(SelfNestedBadParam, 4);
  183. }
  184. }
  185. class SelfNestedBadReturnType {
  186. impl as SelfNested {
  187. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: function redeclaration differs because return type is `array(SelfNestedBadParam, 4)` [FunctionRedeclReturnTypeDiffers]
  188. // CHECK:STDERR: fn F(x: (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32})) -> array(SelfNestedBadParam, 4);
  189. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  190. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-21]]:3: note: previously declared with return type `array(SelfNestedBadReturnType, 4)` [FunctionRedeclReturnTypePrevious]
  191. // CHECK:STDERR: fn F(x: (Self*, {.x: Self, .y: i32})) -> array(Self, 4);
  192. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  193. // CHECK:STDERR:
  194. fn F(x: (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32})) -> array(SelfNestedBadParam, 4);
  195. }
  196. }
  197. // CHECK:STDOUT: --- fail_impl_bad_assoc_fn.carbon
  198. // CHECK:STDOUT:
  199. // CHECK:STDOUT: constants {
  200. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  201. // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
  202. // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete]
  203. // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete]
  204. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  205. // CHECK:STDOUT: %assoc0.82e: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete]
  206. // CHECK:STDOUT: %NoF: type = class_type @NoF [concrete]
  207. // CHECK:STDOUT: %I.impl_witness.901: <witness> = impl_witness @NoF.%I.impl_witness_table [concrete]
  208. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  209. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  210. // CHECK:STDOUT: %FNotFunction: type = class_type @FNotFunction [concrete]
  211. // CHECK:STDOUT: %I.impl_witness.44e: <witness> = impl_witness @FNotFunction.%I.impl_witness_table [concrete]
  212. // CHECK:STDOUT: %F.70c: type = class_type @F.16 [concrete]
  213. // CHECK:STDOUT: %PossiblyF.type: type = fn_type @PossiblyF [concrete]
  214. // CHECK:STDOUT: %PossiblyF: %PossiblyF.type = struct_value () [concrete]
  215. // CHECK:STDOUT: %FAlias: type = class_type @FAlias [concrete]
  216. // CHECK:STDOUT: %I.impl_witness.c80: <witness> = impl_witness @FAlias.%I.impl_witness_table [concrete]
  217. // CHECK:STDOUT: %FExtraParam: type = class_type @FExtraParam [concrete]
  218. // CHECK:STDOUT: %I.impl_witness.f6b: <witness> = impl_witness @FExtraParam.%I.impl_witness_table [concrete]
  219. // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
  220. // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
  221. // CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
  222. // CHECK:STDOUT: %F.type.44e: type = fn_type @F.2 [concrete]
  223. // CHECK:STDOUT: %F.424: %F.type.44e = struct_value () [concrete]
  224. // CHECK:STDOUT: %I.facet.86d: %I.type = facet_value %FExtraParam, (%I.impl_witness.f6b) [concrete]
  225. // CHECK:STDOUT: %FExtraImplicitParam: type = class_type @FExtraImplicitParam [concrete]
  226. // CHECK:STDOUT: %I.impl_witness.e58: <witness> = impl_witness @FExtraImplicitParam.%I.impl_witness_table [concrete]
  227. // CHECK:STDOUT: %pattern_type.8ae: type = pattern_type %FExtraImplicitParam [concrete]
  228. // CHECK:STDOUT: %F.type.e1a: type = fn_type @F.3 [concrete]
  229. // CHECK:STDOUT: %F.6ff: %F.type.e1a = struct_value () [concrete]
  230. // CHECK:STDOUT: %I.facet.919: %I.type = facet_value %FExtraImplicitParam, (%I.impl_witness.e58) [concrete]
  231. // CHECK:STDOUT: %FExtraReturnType: type = class_type @FExtraReturnType [concrete]
  232. // CHECK:STDOUT: %I.impl_witness.59a: <witness> = impl_witness @FExtraReturnType.%I.impl_witness_table [concrete]
  233. // CHECK:STDOUT: %F.type.387: type = fn_type @F.4 [concrete]
  234. // CHECK:STDOUT: %F.df5: %F.type.387 = struct_value () [concrete]
  235. // CHECK:STDOUT: %I.facet.d5c: %I.type = facet_value %FExtraReturnType, (%I.impl_witness.59a) [concrete]
  236. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  237. // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
  238. // CHECK:STDOUT: %F.type.c14: type = fn_type @F.5 [concrete]
  239. // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete]
  240. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  241. // CHECK:STDOUT: %assoc0.922: %J.assoc_type = assoc_entity element0, @J.%F.decl [concrete]
  242. // CHECK:STDOUT: %FMissingParam: type = class_type @FMissingParam [concrete]
  243. // CHECK:STDOUT: %J.impl_witness.b4b: <witness> = impl_witness @FMissingParam.%J.impl_witness_table [concrete]
  244. // CHECK:STDOUT: %F.type.695: type = fn_type @F.6 [concrete]
  245. // CHECK:STDOUT: %F.738: %F.type.695 = struct_value () [concrete]
  246. // CHECK:STDOUT: %J.facet.97d: %J.type = facet_value %FMissingParam, (%J.impl_witness.b4b) [concrete]
  247. // CHECK:STDOUT: %FMissingImplicitParam: type = class_type @FMissingImplicitParam [concrete]
  248. // CHECK:STDOUT: %J.impl_witness.c79: <witness> = impl_witness @FMissingImplicitParam.%J.impl_witness_table [concrete]
  249. // CHECK:STDOUT: %F.type.d97: type = fn_type @F.7 [concrete]
  250. // CHECK:STDOUT: %F.01d: %F.type.d97 = struct_value () [concrete]
  251. // CHECK:STDOUT: %J.facet.0d0: %J.type = facet_value %FMissingImplicitParam, (%J.impl_witness.c79) [concrete]
  252. // CHECK:STDOUT: %FMissingReturnType: type = class_type @FMissingReturnType [concrete]
  253. // CHECK:STDOUT: %J.impl_witness.39b: <witness> = impl_witness @FMissingReturnType.%J.impl_witness_table [concrete]
  254. // CHECK:STDOUT: %F.type.123: type = fn_type @F.8 [concrete]
  255. // CHECK:STDOUT: %F.c7d: %F.type.123 = struct_value () [concrete]
  256. // CHECK:STDOUT: %J.facet.97a: %J.type = facet_value %FMissingReturnType, (%J.impl_witness.39b) [concrete]
  257. // CHECK:STDOUT: %FDifferentParamType: type = class_type @FDifferentParamType [concrete]
  258. // CHECK:STDOUT: %J.impl_witness.eab: <witness> = impl_witness @FDifferentParamType.%J.impl_witness_table [concrete]
  259. // CHECK:STDOUT: %pattern_type.b90: type = pattern_type %FDifferentParamType [concrete]
  260. // CHECK:STDOUT: %F.type.6b5: type = fn_type @F.9 [concrete]
  261. // CHECK:STDOUT: %F.043: %F.type.6b5 = struct_value () [concrete]
  262. // CHECK:STDOUT: %J.facet.955: %J.type = facet_value %FDifferentParamType, (%J.impl_witness.eab) [concrete]
  263. // CHECK:STDOUT: %FDifferentImplicitParamType: type = class_type @FDifferentImplicitParamType [concrete]
  264. // CHECK:STDOUT: %J.impl_witness.103: <witness> = impl_witness @FDifferentImplicitParamType.%J.impl_witness_table [concrete]
  265. // CHECK:STDOUT: %pattern_type.9cc: type = pattern_type %FDifferentImplicitParamType [concrete]
  266. // CHECK:STDOUT: %F.type.d62: type = fn_type @F.10 [concrete]
  267. // CHECK:STDOUT: %F.886: %F.type.d62 = struct_value () [concrete]
  268. // CHECK:STDOUT: %J.facet.130: %J.type = facet_value %FDifferentImplicitParamType, (%J.impl_witness.103) [concrete]
  269. // CHECK:STDOUT: %FDifferentReturnType: type = class_type @FDifferentReturnType [concrete]
  270. // CHECK:STDOUT: %J.impl_witness.6f7: <witness> = impl_witness @FDifferentReturnType.%J.impl_witness_table [concrete]
  271. // CHECK:STDOUT: %pattern_type.8ee: type = pattern_type %FDifferentReturnType [concrete]
  272. // CHECK:STDOUT: %F.type.d3b: type = fn_type @F.11 [concrete]
  273. // CHECK:STDOUT: %F.be8: %F.type.d3b = struct_value () [concrete]
  274. // CHECK:STDOUT: %J.facet.1a7: %J.type = facet_value %FDifferentReturnType, (%J.impl_witness.6f7) [concrete]
  275. // CHECK:STDOUT: %FDifferentParamName: type = class_type @FDifferentParamName [concrete]
  276. // CHECK:STDOUT: %J.impl_witness.3ab: <witness> = impl_witness @FDifferentParamName.%J.impl_witness_table [concrete]
  277. // CHECK:STDOUT: %F.type.d19: type = fn_type @F.12 [concrete]
  278. // CHECK:STDOUT: %F.669: %F.type.d19 = struct_value () [concrete]
  279. // CHECK:STDOUT: %J.facet.366: %J.type = facet_value %FDifferentParamName, (%J.impl_witness.3ab) [concrete]
  280. // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [concrete]
  281. // CHECK:STDOUT: %Self.2ff: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic]
  282. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.2ff [symbolic]
  283. // CHECK:STDOUT: %ptr.e87: type = ptr_type %Self.as_type [symbolic]
  284. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  285. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  286. // CHECK:STDOUT: %struct_type.x.y.81e: type = struct_type {.x: %Self.as_type, .y: %i32} [symbolic]
  287. // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete]
  288. // CHECK:STDOUT: %tuple.type.229: type = tuple_type (%ptr.e87, %struct_type.x.y.81e) [symbolic]
  289. // CHECK:STDOUT: %pattern_type.ced: type = pattern_type %tuple.type.229 [symbolic]
  290. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete]
  291. // CHECK:STDOUT: %array_type.873: type = array_type %int_4, %Self.as_type [symbolic]
  292. // CHECK:STDOUT: %pattern_type.c7e: type = pattern_type %array_type.873 [symbolic]
  293. // CHECK:STDOUT: %F.type.6ed: type = fn_type @F.13 [concrete]
  294. // CHECK:STDOUT: %F.998: %F.type.6ed = struct_value () [concrete]
  295. // CHECK:STDOUT: %SelfNested.assoc_type: type = assoc_entity_type @SelfNested [concrete]
  296. // CHECK:STDOUT: %assoc0.beb: %SelfNested.assoc_type = assoc_entity element0, @SelfNested.%F.decl [concrete]
  297. // CHECK:STDOUT: %SelfNestedBadParam: type = class_type @SelfNestedBadParam [concrete]
  298. // CHECK:STDOUT: %SelfNested.impl_witness.21a: <witness> = impl_witness @SelfNestedBadParam.%SelfNested.impl_witness_table [concrete]
  299. // CHECK:STDOUT: %ptr.4cd: type = ptr_type %SelfNestedBadParam [concrete]
  300. // CHECK:STDOUT: %struct_type.x.y.871: type = struct_type {.x: %i32, .y: %i32} [concrete]
  301. // CHECK:STDOUT: %tuple.type.a7d: type = tuple_type (%ptr.4cd, %struct_type.x.y.871) [concrete]
  302. // CHECK:STDOUT: %pattern_type.714: type = pattern_type %tuple.type.a7d [concrete]
  303. // CHECK:STDOUT: %array_type.a41: type = array_type %int_4, %SelfNestedBadParam [concrete]
  304. // CHECK:STDOUT: %pattern_type.1f1: type = pattern_type %array_type.a41 [concrete]
  305. // CHECK:STDOUT: %F.type.f90: type = fn_type @F.14 [concrete]
  306. // CHECK:STDOUT: %F.fa8: %F.type.f90 = struct_value () [concrete]
  307. // CHECK:STDOUT: %SelfNested.facet.9f5: %SelfNested.type = facet_value %SelfNestedBadParam, (%SelfNested.impl_witness.21a) [concrete]
  308. // CHECK:STDOUT: %struct_type.x.y.a89: type = struct_type {.x: %SelfNestedBadParam, .y: %i32} [concrete]
  309. // CHECK:STDOUT: %tuple.type.9c9: type = tuple_type (%ptr.4cd, %struct_type.x.y.a89) [concrete]
  310. // CHECK:STDOUT: %pattern_type.a5c: type = pattern_type %tuple.type.9c9 [concrete]
  311. // CHECK:STDOUT: %SelfNestedBadReturnType: type = class_type @SelfNestedBadReturnType [concrete]
  312. // CHECK:STDOUT: %SelfNested.impl_witness.b10: <witness> = impl_witness @SelfNestedBadReturnType.%SelfNested.impl_witness_table [concrete]
  313. // CHECK:STDOUT: %ptr.612: type = ptr_type %SelfNestedBadReturnType [concrete]
  314. // CHECK:STDOUT: %struct_type.x.y.ac5: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [concrete]
  315. // CHECK:STDOUT: %tuple.type.eb9: type = tuple_type (%ptr.612, %struct_type.x.y.ac5) [concrete]
  316. // CHECK:STDOUT: %pattern_type.23f: type = pattern_type %tuple.type.eb9 [concrete]
  317. // CHECK:STDOUT: %F.type.0e7: type = fn_type @F.15 [concrete]
  318. // CHECK:STDOUT: %F.0bc: %F.type.0e7 = struct_value () [concrete]
  319. // CHECK:STDOUT: %SelfNested.facet.3bd: %SelfNested.type = facet_value %SelfNestedBadReturnType, (%SelfNested.impl_witness.b10) [concrete]
  320. // CHECK:STDOUT: %array_type.126: type = array_type %int_4, %SelfNestedBadReturnType [concrete]
  321. // CHECK:STDOUT: %pattern_type.f56: type = pattern_type %array_type.126 [concrete]
  322. // CHECK:STDOUT: }
  323. // CHECK:STDOUT:
  324. // CHECK:STDOUT: imports {
  325. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  326. // CHECK:STDOUT: .Bool = %Core.Bool
  327. // CHECK:STDOUT: .Int = %Core.Int
  328. // CHECK:STDOUT: import Core//prelude
  329. // CHECK:STDOUT: import Core//prelude/...
  330. // CHECK:STDOUT: }
  331. // CHECK:STDOUT: }
  332. // CHECK:STDOUT:
  333. // CHECK:STDOUT: file {
  334. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  335. // CHECK:STDOUT: .Core = imports.%Core
  336. // CHECK:STDOUT: .I = %I.decl
  337. // CHECK:STDOUT: .NoF = %NoF.decl
  338. // CHECK:STDOUT: .FNotFunction = %FNotFunction.decl
  339. // CHECK:STDOUT: .PossiblyF = %PossiblyF.decl
  340. // CHECK:STDOUT: .FAlias = %FAlias.decl
  341. // CHECK:STDOUT: .FExtraParam = %FExtraParam.decl
  342. // CHECK:STDOUT: .FExtraImplicitParam = %FExtraImplicitParam.decl
  343. // CHECK:STDOUT: .FExtraReturnType = %FExtraReturnType.decl
  344. // CHECK:STDOUT: .J = %J.decl
  345. // CHECK:STDOUT: .FMissingParam = %FMissingParam.decl
  346. // CHECK:STDOUT: .FMissingImplicitParam = %FMissingImplicitParam.decl
  347. // CHECK:STDOUT: .FMissingReturnType = %FMissingReturnType.decl
  348. // CHECK:STDOUT: .FDifferentParamType = %FDifferentParamType.decl
  349. // CHECK:STDOUT: .FDifferentImplicitParamType = %FDifferentImplicitParamType.decl
  350. // CHECK:STDOUT: .FDifferentReturnType = %FDifferentReturnType.decl
  351. // CHECK:STDOUT: .FDifferentParamName = %FDifferentParamName.decl
  352. // CHECK:STDOUT: .SelfNested = %SelfNested.decl
  353. // CHECK:STDOUT: .SelfNestedBadParam = %SelfNestedBadParam.decl
  354. // CHECK:STDOUT: .SelfNestedBadReturnType = %SelfNestedBadReturnType.decl
  355. // CHECK:STDOUT: }
  356. // CHECK:STDOUT: %Core.import = import Core
  357. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  358. // CHECK:STDOUT: %NoF.decl: type = class_decl @NoF [concrete = constants.%NoF] {} {}
  359. // CHECK:STDOUT: %FNotFunction.decl: type = class_decl @FNotFunction [concrete = constants.%FNotFunction] {} {}
  360. // CHECK:STDOUT: %PossiblyF.decl: %PossiblyF.type = fn_decl @PossiblyF [concrete = constants.%PossiblyF] {} {}
  361. // CHECK:STDOUT: %FAlias.decl: type = class_decl @FAlias [concrete = constants.%FAlias] {} {}
  362. // CHECK:STDOUT: %FExtraParam.decl: type = class_decl @FExtraParam [concrete = constants.%FExtraParam] {} {}
  363. // CHECK:STDOUT: %FExtraImplicitParam.decl: type = class_decl @FExtraImplicitParam [concrete = constants.%FExtraImplicitParam] {} {}
  364. // CHECK:STDOUT: %FExtraReturnType.decl: type = class_decl @FExtraReturnType [concrete = constants.%FExtraReturnType] {} {}
  365. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  366. // CHECK:STDOUT: %FMissingParam.decl: type = class_decl @FMissingParam [concrete = constants.%FMissingParam] {} {}
  367. // CHECK:STDOUT: %FMissingImplicitParam.decl: type = class_decl @FMissingImplicitParam [concrete = constants.%FMissingImplicitParam] {} {}
  368. // CHECK:STDOUT: %FMissingReturnType.decl: type = class_decl @FMissingReturnType [concrete = constants.%FMissingReturnType] {} {}
  369. // CHECK:STDOUT: %FDifferentParamType.decl: type = class_decl @FDifferentParamType [concrete = constants.%FDifferentParamType] {} {}
  370. // CHECK:STDOUT: %FDifferentImplicitParamType.decl: type = class_decl @FDifferentImplicitParamType [concrete = constants.%FDifferentImplicitParamType] {} {}
  371. // CHECK:STDOUT: %FDifferentReturnType.decl: type = class_decl @FDifferentReturnType [concrete = constants.%FDifferentReturnType] {} {}
  372. // CHECK:STDOUT: %FDifferentParamName.decl: type = class_decl @FDifferentParamName [concrete = constants.%FDifferentParamName] {} {}
  373. // CHECK:STDOUT: %SelfNested.decl: type = interface_decl @SelfNested [concrete = constants.%SelfNested.type] {} {}
  374. // CHECK:STDOUT: %SelfNestedBadParam.decl: type = class_decl @SelfNestedBadParam [concrete = constants.%SelfNestedBadParam] {} {}
  375. // CHECK:STDOUT: %SelfNestedBadReturnType.decl: type = class_decl @SelfNestedBadReturnType [concrete = constants.%SelfNestedBadReturnType] {} {}
  376. // CHECK:STDOUT: }
  377. // CHECK:STDOUT:
  378. // CHECK:STDOUT: interface @I {
  379. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
  380. // CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] {} {}
  381. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.82e]
  382. // CHECK:STDOUT:
  383. // CHECK:STDOUT: !members:
  384. // CHECK:STDOUT: .Self = %Self
  385. // CHECK:STDOUT: .F = %assoc0
  386. // CHECK:STDOUT: witness = (%F.decl)
  387. // CHECK:STDOUT: }
  388. // CHECK:STDOUT:
  389. // CHECK:STDOUT: interface @J {
  390. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
  391. // CHECK:STDOUT: %F.decl: %F.type.c14 = fn_decl @F.5 [concrete = constants.%F.b71] {
  392. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self
  393. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0
  394. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b
  395. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1
  396. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern
  397. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2
  398. // CHECK:STDOUT: } {
  399. // CHECK:STDOUT: %bool.make_type.loc93_44: init type = call constants.%Bool() [concrete = bool]
  400. // CHECK:STDOUT: %.loc93_44.1: type = value_of_initializer %bool.make_type.loc93_44 [concrete = bool]
  401. // CHECK:STDOUT: %.loc93_44.2: type = converted %bool.make_type.loc93_44, %.loc93_44.1 [concrete = bool]
  402. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  403. // CHECK:STDOUT: %.loc93_26.1: type = splice_block %.loc93_26.3 [concrete = bool] {
  404. // CHECK:STDOUT: %bool.make_type.loc93_26: init type = call constants.%Bool() [concrete = bool]
  405. // CHECK:STDOUT: %.loc93_26.2: type = value_of_initializer %bool.make_type.loc93_26 [concrete = bool]
  406. // CHECK:STDOUT: %.loc93_26.3: type = converted %bool.make_type.loc93_26, %.loc93_26.2 [concrete = bool]
  407. // CHECK:STDOUT: }
  408. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  409. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  410. // CHECK:STDOUT: %.loc93_35.1: type = splice_block %.loc93_35.3 [concrete = bool] {
  411. // CHECK:STDOUT: %bool.make_type.loc93_35: init type = call constants.%Bool() [concrete = bool]
  412. // CHECK:STDOUT: %.loc93_35.2: type = value_of_initializer %bool.make_type.loc93_35 [concrete = bool]
  413. // CHECK:STDOUT: %.loc93_35.3: type = converted %bool.make_type.loc93_35, %.loc93_35.2 [concrete = bool]
  414. // CHECK:STDOUT: }
  415. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  416. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  417. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  418. // CHECK:STDOUT: }
  419. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.922]
  420. // CHECK:STDOUT:
  421. // CHECK:STDOUT: !members:
  422. // CHECK:STDOUT: .Self = %Self
  423. // CHECK:STDOUT: .F = %assoc0
  424. // CHECK:STDOUT: witness = (%F.decl)
  425. // CHECK:STDOUT: }
  426. // CHECK:STDOUT:
  427. // CHECK:STDOUT: interface @SelfNested {
  428. // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2ff]
  429. // CHECK:STDOUT: %F.decl: %F.type.6ed = fn_decl @F.13 [concrete = constants.%F.998] {
  430. // CHECK:STDOUT: %x.patt: @F.13.%pattern_type.loc188_8 (%pattern_type.ced) = binding_pattern x
  431. // CHECK:STDOUT: %x.param_patt: @F.13.%pattern_type.loc188_8 (%pattern_type.ced) = value_param_pattern %x.patt, call_param0
  432. // CHECK:STDOUT: %return.patt: @F.13.%pattern_type.loc188_41 (%pattern_type.c7e) = return_slot_pattern
  433. // CHECK:STDOUT: %return.param_patt: @F.13.%pattern_type.loc188_41 (%pattern_type.c7e) = out_param_pattern %return.patt, call_param1
  434. // CHECK:STDOUT: } {
  435. // CHECK:STDOUT: %Self.ref.loc188_50: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)]
  436. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4]
  437. // CHECK:STDOUT: %Self.as_type.loc188_50: type = facet_access_type %Self.ref.loc188_50 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)]
  438. // CHECK:STDOUT: %.loc188_50: type = converted %Self.ref.loc188_50, %Self.as_type.loc188_50 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)]
  439. // CHECK:STDOUT: %array_type.loc188_57.2: type = array_type %int_4, %.loc188_50 [symbolic = %array_type.loc188_57.1 (constants.%array_type.873)]
  440. // CHECK:STDOUT: %x.param: @F.13.%tuple.type (%tuple.type.229) = value_param call_param0
  441. // CHECK:STDOUT: %.loc188_38.1: type = splice_block %.loc188_38.3 [symbolic = %tuple.type (constants.%tuple.type.229)] {
  442. // CHECK:STDOUT: %Self.ref.loc188_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)]
  443. // CHECK:STDOUT: %Self.as_type.loc188_16.2: type = facet_access_type %Self.ref.loc188_12 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)]
  444. // CHECK:STDOUT: %.loc188_16: type = converted %Self.ref.loc188_12, %Self.as_type.loc188_16.2 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)]
  445. // CHECK:STDOUT: %ptr.loc188_16.2: type = ptr_type %.loc188_16 [symbolic = %ptr.loc188_16.1 (constants.%ptr.e87)]
  446. // CHECK:STDOUT: %Self.ref.loc188_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)]
  447. // CHECK:STDOUT: %Self.as_type.loc188_24: type = facet_access_type %Self.ref.loc188_24 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)]
  448. // CHECK:STDOUT: %.loc188_24: type = converted %Self.ref.loc188_24, %Self.as_type.loc188_24 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)]
  449. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  450. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  451. // CHECK:STDOUT: %struct_type.x.y.loc188_37.2: type = struct_type {.x: @F.13.%Self.as_type.loc188_16.1 (%Self.as_type), .y: %i32} [symbolic = %struct_type.x.y.loc188_37.1 (constants.%struct_type.x.y.81e)]
  452. // CHECK:STDOUT: %.loc188_38.2: %tuple.type.24b = tuple_literal (%ptr.loc188_16.2, %struct_type.x.y.loc188_37.2)
  453. // CHECK:STDOUT: %.loc188_38.3: type = converted %.loc188_38.2, constants.%tuple.type.229 [symbolic = %tuple.type (constants.%tuple.type.229)]
  454. // CHECK:STDOUT: }
  455. // CHECK:STDOUT: %x: @F.13.%tuple.type (%tuple.type.229) = bind_name x, %x.param
  456. // CHECK:STDOUT: %return.param: ref @F.13.%array_type.loc188_57.1 (%array_type.873) = out_param call_param1
  457. // CHECK:STDOUT: %return: ref @F.13.%array_type.loc188_57.1 (%array_type.873) = return_slot %return.param
  458. // CHECK:STDOUT: }
  459. // CHECK:STDOUT: %assoc0: %SelfNested.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.beb]
  460. // CHECK:STDOUT:
  461. // CHECK:STDOUT: !members:
  462. // CHECK:STDOUT: .Self = %Self
  463. // CHECK:STDOUT: .F = %assoc0
  464. // CHECK:STDOUT: witness = (%F.decl)
  465. // CHECK:STDOUT: }
  466. // CHECK:STDOUT:
  467. // CHECK:STDOUT: impl @impl.0c9: %Self.ref as %I.ref {
  468. // CHECK:STDOUT: !members:
  469. // CHECK:STDOUT: .F = <poisoned>
  470. // CHECK:STDOUT: witness = @NoF.%I.impl_witness
  471. // CHECK:STDOUT: }
  472. // CHECK:STDOUT:
  473. // CHECK:STDOUT: impl @impl.b55: %Self.ref as %I.ref {
  474. // CHECK:STDOUT: %F.decl: type = class_decl @F.16 [concrete = constants.%F.70c] {} {}
  475. // CHECK:STDOUT:
  476. // CHECK:STDOUT: !members:
  477. // CHECK:STDOUT: .F = %F.decl
  478. // CHECK:STDOUT: witness = @FNotFunction.%I.impl_witness
  479. // CHECK:STDOUT: }
  480. // CHECK:STDOUT:
  481. // CHECK:STDOUT: impl @impl.199: %Self.ref as %I.ref {
  482. // CHECK:STDOUT: %PossiblyF.ref: %PossiblyF.type = name_ref PossiblyF, file.%PossiblyF.decl [concrete = constants.%PossiblyF]
  483. // CHECK:STDOUT: %F: %PossiblyF.type = bind_alias F, file.%PossiblyF.decl [concrete = constants.%PossiblyF]
  484. // CHECK:STDOUT:
  485. // CHECK:STDOUT: !members:
  486. // CHECK:STDOUT: .PossiblyF = <poisoned>
  487. // CHECK:STDOUT: .F = %F
  488. // CHECK:STDOUT: witness = @FAlias.%I.impl_witness
  489. // CHECK:STDOUT: }
  490. // CHECK:STDOUT:
  491. // CHECK:STDOUT: impl @impl.ddd: %Self.ref as %I.ref {
  492. // CHECK:STDOUT: %F.decl: %F.type.44e = fn_decl @F.2 [concrete = constants.%F.424] {
  493. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b
  494. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param0
  495. // CHECK:STDOUT: } {
  496. // CHECK:STDOUT: %b.param: bool = value_param call_param0
  497. // CHECK:STDOUT: %.loc62_13.1: type = splice_block %.loc62_13.3 [concrete = bool] {
  498. // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
  499. // CHECK:STDOUT: %.loc62_13.2: type = value_of_initializer %bool.make_type [concrete = bool]
  500. // CHECK:STDOUT: %.loc62_13.3: type = converted %bool.make_type, %.loc62_13.2 [concrete = bool]
  501. // CHECK:STDOUT: }
  502. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  503. // CHECK:STDOUT: }
  504. // CHECK:STDOUT:
  505. // CHECK:STDOUT: !members:
  506. // CHECK:STDOUT: .F = %F.decl
  507. // CHECK:STDOUT: witness = @FExtraParam.%I.impl_witness
  508. // CHECK:STDOUT: }
  509. // CHECK:STDOUT:
  510. // CHECK:STDOUT: impl @impl.698: %Self.ref as %I.ref {
  511. // CHECK:STDOUT: %F.decl: %F.type.e1a = fn_decl @F.3 [concrete = constants.%F.6ff] {
  512. // CHECK:STDOUT: %self.patt: %pattern_type.8ae = binding_pattern self
  513. // CHECK:STDOUT: %self.param_patt: %pattern_type.8ae = value_param_pattern %self.patt, call_param0
  514. // CHECK:STDOUT: } {
  515. // CHECK:STDOUT: %self.param: %FExtraImplicitParam = value_param call_param0
  516. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [concrete = constants.%FExtraImplicitParam]
  517. // CHECK:STDOUT: %self: %FExtraImplicitParam = bind_name self, %self.param
  518. // CHECK:STDOUT: }
  519. // CHECK:STDOUT:
  520. // CHECK:STDOUT: !members:
  521. // CHECK:STDOUT: .F = %F.decl
  522. // CHECK:STDOUT: witness = @FExtraImplicitParam.%I.impl_witness
  523. // CHECK:STDOUT: }
  524. // CHECK:STDOUT:
  525. // CHECK:STDOUT: impl @impl.77b: %Self.ref as %I.ref {
  526. // CHECK:STDOUT: %F.decl: %F.type.387 = fn_decl @F.4 [concrete = constants.%F.df5] {
  527. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern
  528. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param0
  529. // CHECK:STDOUT: } {
  530. // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
  531. // CHECK:STDOUT: %.loc89_15.1: type = value_of_initializer %bool.make_type [concrete = bool]
  532. // CHECK:STDOUT: %.loc89_15.2: type = converted %bool.make_type, %.loc89_15.1 [concrete = bool]
  533. // CHECK:STDOUT: %return.param: ref bool = out_param call_param0
  534. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  535. // CHECK:STDOUT: }
  536. // CHECK:STDOUT:
  537. // CHECK:STDOUT: !members:
  538. // CHECK:STDOUT: .F = %F.decl
  539. // CHECK:STDOUT: witness = @FExtraReturnType.%I.impl_witness
  540. // CHECK:STDOUT: }
  541. // CHECK:STDOUT:
  542. // CHECK:STDOUT: impl @impl.5cf: %Self.ref as %J.ref {
  543. // CHECK:STDOUT: %F.decl: %F.type.695 = fn_decl @F.6 [concrete = constants.%F.738] {
  544. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self
  545. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0
  546. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern
  547. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param1
  548. // CHECK:STDOUT: } {
  549. // CHECK:STDOUT: %bool.make_type.loc104_27: init type = call constants.%Bool() [concrete = bool]
  550. // CHECK:STDOUT: %.loc104_27.1: type = value_of_initializer %bool.make_type.loc104_27 [concrete = bool]
  551. // CHECK:STDOUT: %.loc104_27.2: type = converted %bool.make_type.loc104_27, %.loc104_27.1 [concrete = bool]
  552. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  553. // CHECK:STDOUT: %.loc104_16.1: type = splice_block %.loc104_16.3 [concrete = bool] {
  554. // CHECK:STDOUT: %bool.make_type.loc104_16: init type = call constants.%Bool() [concrete = bool]
  555. // CHECK:STDOUT: %.loc104_16.2: type = value_of_initializer %bool.make_type.loc104_16 [concrete = bool]
  556. // CHECK:STDOUT: %.loc104_16.3: type = converted %bool.make_type.loc104_16, %.loc104_16.2 [concrete = bool]
  557. // CHECK:STDOUT: }
  558. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  559. // CHECK:STDOUT: %return.param: ref bool = out_param call_param1
  560. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  561. // CHECK:STDOUT: }
  562. // CHECK:STDOUT:
  563. // CHECK:STDOUT: !members:
  564. // CHECK:STDOUT: .F = %F.decl
  565. // CHECK:STDOUT: witness = @FMissingParam.%J.impl_witness
  566. // CHECK:STDOUT: }
  567. // CHECK:STDOUT:
  568. // CHECK:STDOUT: impl @impl.bac: %Self.ref as %J.ref {
  569. // CHECK:STDOUT: %F.decl: %F.type.d97 = fn_decl @F.7 [concrete = constants.%F.01d] {
  570. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b
  571. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param0
  572. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern
  573. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param1
  574. // CHECK:STDOUT: } {
  575. // CHECK:STDOUT: %bool.make_type.loc117_22: init type = call constants.%Bool() [concrete = bool]
  576. // CHECK:STDOUT: %.loc117_22.1: type = value_of_initializer %bool.make_type.loc117_22 [concrete = bool]
  577. // CHECK:STDOUT: %.loc117_22.2: type = converted %bool.make_type.loc117_22, %.loc117_22.1 [concrete = bool]
  578. // CHECK:STDOUT: %b.param: bool = value_param call_param0
  579. // CHECK:STDOUT: %.loc117_13.1: type = splice_block %.loc117_13.3 [concrete = bool] {
  580. // CHECK:STDOUT: %bool.make_type.loc117_13: init type = call constants.%Bool() [concrete = bool]
  581. // CHECK:STDOUT: %.loc117_13.2: type = value_of_initializer %bool.make_type.loc117_13 [concrete = bool]
  582. // CHECK:STDOUT: %.loc117_13.3: type = converted %bool.make_type.loc117_13, %.loc117_13.2 [concrete = bool]
  583. // CHECK:STDOUT: }
  584. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  585. // CHECK:STDOUT: %return.param: ref bool = out_param call_param1
  586. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  587. // CHECK:STDOUT: }
  588. // CHECK:STDOUT:
  589. // CHECK:STDOUT: !members:
  590. // CHECK:STDOUT: .F = %F.decl
  591. // CHECK:STDOUT: witness = @FMissingImplicitParam.%J.impl_witness
  592. // CHECK:STDOUT: }
  593. // CHECK:STDOUT:
  594. // CHECK:STDOUT: impl @impl.1a7: %Self.ref as %J.ref {
  595. // CHECK:STDOUT: %F.decl: %F.type.123 = fn_decl @F.8 [concrete = constants.%F.c7d] {
  596. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self
  597. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0
  598. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b
  599. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1
  600. // CHECK:STDOUT: } {
  601. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  602. // CHECK:STDOUT: %.loc130_16.1: type = splice_block %.loc130_16.3 [concrete = bool] {
  603. // CHECK:STDOUT: %bool.make_type.loc130_16: init type = call constants.%Bool() [concrete = bool]
  604. // CHECK:STDOUT: %.loc130_16.2: type = value_of_initializer %bool.make_type.loc130_16 [concrete = bool]
  605. // CHECK:STDOUT: %.loc130_16.3: type = converted %bool.make_type.loc130_16, %.loc130_16.2 [concrete = bool]
  606. // CHECK:STDOUT: }
  607. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  608. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  609. // CHECK:STDOUT: %.loc130_25.1: type = splice_block %.loc130_25.3 [concrete = bool] {
  610. // CHECK:STDOUT: %bool.make_type.loc130_25: init type = call constants.%Bool() [concrete = bool]
  611. // CHECK:STDOUT: %.loc130_25.2: type = value_of_initializer %bool.make_type.loc130_25 [concrete = bool]
  612. // CHECK:STDOUT: %.loc130_25.3: type = converted %bool.make_type.loc130_25, %.loc130_25.2 [concrete = bool]
  613. // CHECK:STDOUT: }
  614. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  615. // CHECK:STDOUT: }
  616. // CHECK:STDOUT:
  617. // CHECK:STDOUT: !members:
  618. // CHECK:STDOUT: .F = %F.decl
  619. // CHECK:STDOUT: witness = @FMissingReturnType.%J.impl_witness
  620. // CHECK:STDOUT: }
  621. // CHECK:STDOUT:
  622. // CHECK:STDOUT: impl @impl.f2b: %Self.ref as %J.ref {
  623. // CHECK:STDOUT: %F.decl: %F.type.6b5 = fn_decl @F.9 [concrete = constants.%F.043] {
  624. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self
  625. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0
  626. // CHECK:STDOUT: %b.patt: %pattern_type.b90 = binding_pattern b
  627. // CHECK:STDOUT: %b.param_patt: %pattern_type.b90 = value_param_pattern %b.patt, call_param1
  628. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern
  629. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2
  630. // CHECK:STDOUT: } {
  631. // CHECK:STDOUT: %bool.make_type.loc143_34: init type = call constants.%Bool() [concrete = bool]
  632. // CHECK:STDOUT: %.loc143_34.1: type = value_of_initializer %bool.make_type.loc143_34 [concrete = bool]
  633. // CHECK:STDOUT: %.loc143_34.2: type = converted %bool.make_type.loc143_34, %.loc143_34.1 [concrete = bool]
  634. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  635. // CHECK:STDOUT: %.loc143_16.1: type = splice_block %.loc143_16.3 [concrete = bool] {
  636. // CHECK:STDOUT: %bool.make_type.loc143_16: init type = call constants.%Bool() [concrete = bool]
  637. // CHECK:STDOUT: %.loc143_16.2: type = value_of_initializer %bool.make_type.loc143_16 [concrete = bool]
  638. // CHECK:STDOUT: %.loc143_16.3: type = converted %bool.make_type.loc143_16, %.loc143_16.2 [concrete = bool]
  639. // CHECK:STDOUT: }
  640. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  641. // CHECK:STDOUT: %b.param: %FDifferentParamType = value_param call_param1
  642. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [concrete = constants.%FDifferentParamType]
  643. // CHECK:STDOUT: %b: %FDifferentParamType = bind_name b, %b.param
  644. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  645. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  646. // CHECK:STDOUT: }
  647. // CHECK:STDOUT:
  648. // CHECK:STDOUT: !members:
  649. // CHECK:STDOUT: .F = %F.decl
  650. // CHECK:STDOUT: witness = @FDifferentParamType.%J.impl_witness
  651. // CHECK:STDOUT: }
  652. // CHECK:STDOUT:
  653. // CHECK:STDOUT: impl @impl.db4: %Self.ref as %J.ref {
  654. // CHECK:STDOUT: %F.decl: %F.type.d62 = fn_decl @F.10 [concrete = constants.%F.886] {
  655. // CHECK:STDOUT: %self.patt: %pattern_type.9cc = binding_pattern self
  656. // CHECK:STDOUT: %self.param_patt: %pattern_type.9cc = value_param_pattern %self.patt, call_param0
  657. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b
  658. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1
  659. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern
  660. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2
  661. // CHECK:STDOUT: } {
  662. // CHECK:STDOUT: %bool.make_type.loc156_34: init type = call constants.%Bool() [concrete = bool]
  663. // CHECK:STDOUT: %.loc156_34.1: type = value_of_initializer %bool.make_type.loc156_34 [concrete = bool]
  664. // CHECK:STDOUT: %.loc156_34.2: type = converted %bool.make_type.loc156_34, %.loc156_34.1 [concrete = bool]
  665. // CHECK:STDOUT: %self.param: %FDifferentImplicitParamType = value_param call_param0
  666. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [concrete = constants.%FDifferentImplicitParamType]
  667. // CHECK:STDOUT: %self: %FDifferentImplicitParamType = bind_name self, %self.param
  668. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  669. // CHECK:STDOUT: %.loc156_25.1: type = splice_block %.loc156_25.3 [concrete = bool] {
  670. // CHECK:STDOUT: %bool.make_type.loc156_25: init type = call constants.%Bool() [concrete = bool]
  671. // CHECK:STDOUT: %.loc156_25.2: type = value_of_initializer %bool.make_type.loc156_25 [concrete = bool]
  672. // CHECK:STDOUT: %.loc156_25.3: type = converted %bool.make_type.loc156_25, %.loc156_25.2 [concrete = bool]
  673. // CHECK:STDOUT: }
  674. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  675. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  676. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  677. // CHECK:STDOUT: }
  678. // CHECK:STDOUT:
  679. // CHECK:STDOUT: !members:
  680. // CHECK:STDOUT: .F = %F.decl
  681. // CHECK:STDOUT: witness = @FDifferentImplicitParamType.%J.impl_witness
  682. // CHECK:STDOUT: }
  683. // CHECK:STDOUT:
  684. // CHECK:STDOUT: impl @impl.fcc: %Self.ref as %J.ref {
  685. // CHECK:STDOUT: %F.decl: %F.type.d3b = fn_decl @F.11 [concrete = constants.%F.be8] {
  686. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self
  687. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0
  688. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b
  689. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1
  690. // CHECK:STDOUT: %return.patt: %pattern_type.8ee = return_slot_pattern
  691. // CHECK:STDOUT: %return.param_patt: %pattern_type.8ee = out_param_pattern %return.patt, call_param2
  692. // CHECK:STDOUT: } {
  693. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [concrete = constants.%FDifferentReturnType]
  694. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  695. // CHECK:STDOUT: %.loc169_16.1: type = splice_block %.loc169_16.3 [concrete = bool] {
  696. // CHECK:STDOUT: %bool.make_type.loc169_16: init type = call constants.%Bool() [concrete = bool]
  697. // CHECK:STDOUT: %.loc169_16.2: type = value_of_initializer %bool.make_type.loc169_16 [concrete = bool]
  698. // CHECK:STDOUT: %.loc169_16.3: type = converted %bool.make_type.loc169_16, %.loc169_16.2 [concrete = bool]
  699. // CHECK:STDOUT: }
  700. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  701. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  702. // CHECK:STDOUT: %.loc169_25.1: type = splice_block %.loc169_25.3 [concrete = bool] {
  703. // CHECK:STDOUT: %bool.make_type.loc169_25: init type = call constants.%Bool() [concrete = bool]
  704. // CHECK:STDOUT: %.loc169_25.2: type = value_of_initializer %bool.make_type.loc169_25 [concrete = bool]
  705. // CHECK:STDOUT: %.loc169_25.3: type = converted %bool.make_type.loc169_25, %.loc169_25.2 [concrete = bool]
  706. // CHECK:STDOUT: }
  707. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  708. // CHECK:STDOUT: %return.param: ref %FDifferentReturnType = out_param call_param2
  709. // CHECK:STDOUT: %return: ref %FDifferentReturnType = return_slot %return.param
  710. // CHECK:STDOUT: }
  711. // CHECK:STDOUT:
  712. // CHECK:STDOUT: !members:
  713. // CHECK:STDOUT: .F = %F.decl
  714. // CHECK:STDOUT: witness = @FDifferentReturnType.%J.impl_witness
  715. // CHECK:STDOUT: }
  716. // CHECK:STDOUT:
  717. // CHECK:STDOUT: impl @impl.c5d: %Self.ref as %J.ref {
  718. // CHECK:STDOUT: %F.decl: %F.type.d19 = fn_decl @F.12 [concrete = constants.%F.669] {
  719. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self
  720. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0
  721. // CHECK:STDOUT: %not_b.patt: %pattern_type.831 = binding_pattern not_b
  722. // CHECK:STDOUT: %not_b.param_patt: %pattern_type.831 = value_param_pattern %not_b.patt, call_param1
  723. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern
  724. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2
  725. // CHECK:STDOUT: } {
  726. // CHECK:STDOUT: %bool.make_type.loc183_38: init type = call constants.%Bool() [concrete = bool]
  727. // CHECK:STDOUT: %.loc183_38.1: type = value_of_initializer %bool.make_type.loc183_38 [concrete = bool]
  728. // CHECK:STDOUT: %.loc183_38.2: type = converted %bool.make_type.loc183_38, %.loc183_38.1 [concrete = bool]
  729. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  730. // CHECK:STDOUT: %.loc183_16.1: type = splice_block %.loc183_16.3 [concrete = bool] {
  731. // CHECK:STDOUT: %bool.make_type.loc183_16: init type = call constants.%Bool() [concrete = bool]
  732. // CHECK:STDOUT: %.loc183_16.2: type = value_of_initializer %bool.make_type.loc183_16 [concrete = bool]
  733. // CHECK:STDOUT: %.loc183_16.3: type = converted %bool.make_type.loc183_16, %.loc183_16.2 [concrete = bool]
  734. // CHECK:STDOUT: }
  735. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  736. // CHECK:STDOUT: %not_b.param: bool = value_param call_param1
  737. // CHECK:STDOUT: %.loc183_29.1: type = splice_block %.loc183_29.3 [concrete = bool] {
  738. // CHECK:STDOUT: %bool.make_type.loc183_29: init type = call constants.%Bool() [concrete = bool]
  739. // CHECK:STDOUT: %.loc183_29.2: type = value_of_initializer %bool.make_type.loc183_29 [concrete = bool]
  740. // CHECK:STDOUT: %.loc183_29.3: type = converted %bool.make_type.loc183_29, %.loc183_29.2 [concrete = bool]
  741. // CHECK:STDOUT: }
  742. // CHECK:STDOUT: %not_b: bool = bind_name not_b, %not_b.param
  743. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  744. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  745. // CHECK:STDOUT: }
  746. // CHECK:STDOUT:
  747. // CHECK:STDOUT: !members:
  748. // CHECK:STDOUT: .F = %F.decl
  749. // CHECK:STDOUT: witness = @FDifferentParamName.%J.impl_witness
  750. // CHECK:STDOUT: }
  751. // CHECK:STDOUT:
  752. // CHECK:STDOUT: impl @impl.6a5: %Self.ref as %SelfNested.ref {
  753. // CHECK:STDOUT: %F.decl: %F.type.f90 = fn_decl @F.14 [concrete = constants.%F.fa8] {
  754. // CHECK:STDOUT: %x.patt: %pattern_type.714 = binding_pattern x
  755. // CHECK:STDOUT: %x.param_patt: %pattern_type.714 = value_param_pattern %x.patt, call_param0
  756. // CHECK:STDOUT: %return.patt: %pattern_type.1f1 = return_slot_pattern
  757. // CHECK:STDOUT: %return.param_patt: %pattern_type.1f1 = out_param_pattern %return.patt, call_param1
  758. // CHECK:STDOUT: } {
  759. // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_65: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam]
  760. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4]
  761. // CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam.ref.loc200_65 [concrete = constants.%array_type.a41]
  762. // CHECK:STDOUT: %x.param: %tuple.type.a7d = value_param call_param0
  763. // CHECK:STDOUT: %.loc200_53.1: type = splice_block %.loc200_53.3 [concrete = constants.%tuple.type.a7d] {
  764. // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam]
  765. // CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadParam.ref.loc200_14 [concrete = constants.%ptr.4cd]
  766. // CHECK:STDOUT: %int_32.loc200_40: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  767. // CHECK:STDOUT: %i32.loc200_40: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  768. // CHECK:STDOUT: %int_32.loc200_49: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  769. // CHECK:STDOUT: %i32.loc200_49: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  770. // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %i32, .y: %i32} [concrete = constants.%struct_type.x.y.871]
  771. // CHECK:STDOUT: %.loc200_53.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y)
  772. // CHECK:STDOUT: %.loc200_53.3: type = converted %.loc200_53.2, constants.%tuple.type.a7d [concrete = constants.%tuple.type.a7d]
  773. // CHECK:STDOUT: }
  774. // CHECK:STDOUT: %x: %tuple.type.a7d = bind_name x, %x.param
  775. // CHECK:STDOUT: %return.param: ref %array_type.a41 = out_param call_param1
  776. // CHECK:STDOUT: %return: ref %array_type.a41 = return_slot %return.param
  777. // CHECK:STDOUT: }
  778. // CHECK:STDOUT:
  779. // CHECK:STDOUT: !members:
  780. // CHECK:STDOUT: .SelfNestedBadParam = <poisoned>
  781. // CHECK:STDOUT: .F = %F.decl
  782. // CHECK:STDOUT: witness = @SelfNestedBadParam.%SelfNested.impl_witness
  783. // CHECK:STDOUT: }
  784. // CHECK:STDOUT:
  785. // CHECK:STDOUT: impl @impl.bfc: %Self.ref as %SelfNested.ref {
  786. // CHECK:STDOUT: %F.decl: %F.type.0e7 = fn_decl @F.15 [concrete = constants.%F.0bc] {
  787. // CHECK:STDOUT: %x.patt: %pattern_type.23f = binding_pattern x
  788. // CHECK:STDOUT: %x.param_patt: %pattern_type.23f = value_param_pattern %x.patt, call_param0
  789. // CHECK:STDOUT: %return.patt: %pattern_type.1f1 = return_slot_pattern
  790. // CHECK:STDOUT: %return.param_patt: %pattern_type.1f1 = out_param_pattern %return.patt, call_param1
  791. // CHECK:STDOUT: } {
  792. // CHECK:STDOUT: %SelfNestedBadParam.ref: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam]
  793. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4]
  794. // CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam.ref [concrete = constants.%array_type.a41]
  795. // CHECK:STDOUT: %x.param: %tuple.type.eb9 = value_param call_param0
  796. // CHECK:STDOUT: %.loc213_78.1: type = splice_block %.loc213_78.3 [concrete = constants.%tuple.type.eb9] {
  797. // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc213_14: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [concrete = constants.%SelfNestedBadReturnType]
  798. // CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadReturnType.ref.loc213_14 [concrete = constants.%ptr.612]
  799. // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc213_45: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [concrete = constants.%SelfNestedBadReturnType]
  800. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  801. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  802. // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [concrete = constants.%struct_type.x.y.ac5]
  803. // CHECK:STDOUT: %.loc213_78.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y)
  804. // CHECK:STDOUT: %.loc213_78.3: type = converted %.loc213_78.2, constants.%tuple.type.eb9 [concrete = constants.%tuple.type.eb9]
  805. // CHECK:STDOUT: }
  806. // CHECK:STDOUT: %x: %tuple.type.eb9 = bind_name x, %x.param
  807. // CHECK:STDOUT: %return.param: ref %array_type.a41 = out_param call_param1
  808. // CHECK:STDOUT: %return: ref %array_type.a41 = return_slot %return.param
  809. // CHECK:STDOUT: }
  810. // CHECK:STDOUT:
  811. // CHECK:STDOUT: !members:
  812. // CHECK:STDOUT: .SelfNestedBadReturnType = <poisoned>
  813. // CHECK:STDOUT: .SelfNestedBadParam = <poisoned>
  814. // CHECK:STDOUT: .F = %F.decl
  815. // CHECK:STDOUT: witness = @SelfNestedBadReturnType.%SelfNested.impl_witness
  816. // CHECK:STDOUT: }
  817. // CHECK:STDOUT:
  818. // CHECK:STDOUT: class @NoF {
  819. // CHECK:STDOUT: impl_decl @impl.0c9 [concrete] {} {
  820. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%NoF [concrete = constants.%NoF]
  821. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  822. // CHECK:STDOUT: }
  823. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @impl.0c9 [concrete]
  824. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.901]
  825. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  826. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  827. // CHECK:STDOUT: complete_type_witness = %complete_type
  828. // CHECK:STDOUT:
  829. // CHECK:STDOUT: !members:
  830. // CHECK:STDOUT: .Self = constants.%NoF
  831. // CHECK:STDOUT: .I = <poisoned>
  832. // CHECK:STDOUT: }
  833. // CHECK:STDOUT:
  834. // CHECK:STDOUT: class @FNotFunction {
  835. // CHECK:STDOUT: impl_decl @impl.b55 [concrete] {} {
  836. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FNotFunction [concrete = constants.%FNotFunction]
  837. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  838. // CHECK:STDOUT: }
  839. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @impl.b55 [concrete]
  840. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.44e]
  841. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  842. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  843. // CHECK:STDOUT: complete_type_witness = %complete_type
  844. // CHECK:STDOUT:
  845. // CHECK:STDOUT: !members:
  846. // CHECK:STDOUT: .Self = constants.%FNotFunction
  847. // CHECK:STDOUT: .I = <poisoned>
  848. // CHECK:STDOUT: }
  849. // CHECK:STDOUT:
  850. // CHECK:STDOUT: class @F.16;
  851. // CHECK:STDOUT:
  852. // CHECK:STDOUT: class @FAlias {
  853. // CHECK:STDOUT: impl_decl @impl.199 [concrete] {} {
  854. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FAlias [concrete = constants.%FAlias]
  855. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  856. // CHECK:STDOUT: }
  857. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @impl.199 [concrete]
  858. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.c80]
  859. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  860. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  861. // CHECK:STDOUT: complete_type_witness = %complete_type
  862. // CHECK:STDOUT:
  863. // CHECK:STDOUT: !members:
  864. // CHECK:STDOUT: .Self = constants.%FAlias
  865. // CHECK:STDOUT: .I = <poisoned>
  866. // CHECK:STDOUT: .PossiblyF = <poisoned>
  867. // CHECK:STDOUT: }
  868. // CHECK:STDOUT:
  869. // CHECK:STDOUT: class @FExtraParam {
  870. // CHECK:STDOUT: impl_decl @impl.ddd [concrete] {} {
  871. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraParam [concrete = constants.%FExtraParam]
  872. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  873. // CHECK:STDOUT: }
  874. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @impl.ddd [concrete]
  875. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.f6b]
  876. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  877. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  878. // CHECK:STDOUT: complete_type_witness = %complete_type
  879. // CHECK:STDOUT:
  880. // CHECK:STDOUT: !members:
  881. // CHECK:STDOUT: .Self = constants.%FExtraParam
  882. // CHECK:STDOUT: .I = <poisoned>
  883. // CHECK:STDOUT: }
  884. // CHECK:STDOUT:
  885. // CHECK:STDOUT: class @FExtraImplicitParam {
  886. // CHECK:STDOUT: impl_decl @impl.698 [concrete] {} {
  887. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [concrete = constants.%FExtraImplicitParam]
  888. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  889. // CHECK:STDOUT: }
  890. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @impl.698 [concrete]
  891. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.e58]
  892. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  893. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  894. // CHECK:STDOUT: complete_type_witness = %complete_type
  895. // CHECK:STDOUT:
  896. // CHECK:STDOUT: !members:
  897. // CHECK:STDOUT: .Self = constants.%FExtraImplicitParam
  898. // CHECK:STDOUT: .I = <poisoned>
  899. // CHECK:STDOUT: }
  900. // CHECK:STDOUT:
  901. // CHECK:STDOUT: class @FExtraReturnType {
  902. // CHECK:STDOUT: impl_decl @impl.77b [concrete] {} {
  903. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraReturnType [concrete = constants.%FExtraReturnType]
  904. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  905. // CHECK:STDOUT: }
  906. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @impl.77b [concrete]
  907. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.59a]
  908. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  909. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  910. // CHECK:STDOUT: complete_type_witness = %complete_type
  911. // CHECK:STDOUT:
  912. // CHECK:STDOUT: !members:
  913. // CHECK:STDOUT: .Self = constants.%FExtraReturnType
  914. // CHECK:STDOUT: .I = <poisoned>
  915. // CHECK:STDOUT: }
  916. // CHECK:STDOUT:
  917. // CHECK:STDOUT: class @FMissingParam {
  918. // CHECK:STDOUT: impl_decl @impl.5cf [concrete] {} {
  919. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingParam [concrete = constants.%FMissingParam]
  920. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  921. // CHECK:STDOUT: }
  922. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (<error>), @impl.5cf [concrete]
  923. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.b4b]
  924. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  925. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  926. // CHECK:STDOUT: complete_type_witness = %complete_type
  927. // CHECK:STDOUT:
  928. // CHECK:STDOUT: !members:
  929. // CHECK:STDOUT: .Self = constants.%FMissingParam
  930. // CHECK:STDOUT: .J = <poisoned>
  931. // CHECK:STDOUT: }
  932. // CHECK:STDOUT:
  933. // CHECK:STDOUT: class @FMissingImplicitParam {
  934. // CHECK:STDOUT: impl_decl @impl.bac [concrete] {} {
  935. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingImplicitParam [concrete = constants.%FMissingImplicitParam]
  936. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  937. // CHECK:STDOUT: }
  938. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (<error>), @impl.bac [concrete]
  939. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.c79]
  940. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  941. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  942. // CHECK:STDOUT: complete_type_witness = %complete_type
  943. // CHECK:STDOUT:
  944. // CHECK:STDOUT: !members:
  945. // CHECK:STDOUT: .Self = constants.%FMissingImplicitParam
  946. // CHECK:STDOUT: .J = <poisoned>
  947. // CHECK:STDOUT: }
  948. // CHECK:STDOUT:
  949. // CHECK:STDOUT: class @FMissingReturnType {
  950. // CHECK:STDOUT: impl_decl @impl.1a7 [concrete] {} {
  951. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingReturnType [concrete = constants.%FMissingReturnType]
  952. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  953. // CHECK:STDOUT: }
  954. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (<error>), @impl.1a7 [concrete]
  955. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.39b]
  956. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  957. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  958. // CHECK:STDOUT: complete_type_witness = %complete_type
  959. // CHECK:STDOUT:
  960. // CHECK:STDOUT: !members:
  961. // CHECK:STDOUT: .Self = constants.%FMissingReturnType
  962. // CHECK:STDOUT: .J = <poisoned>
  963. // CHECK:STDOUT: }
  964. // CHECK:STDOUT:
  965. // CHECK:STDOUT: class @FDifferentParamType {
  966. // CHECK:STDOUT: impl_decl @impl.f2b [concrete] {} {
  967. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [concrete = constants.%FDifferentParamType]
  968. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  969. // CHECK:STDOUT: }
  970. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (<error>), @impl.f2b [concrete]
  971. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.eab]
  972. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  973. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  974. // CHECK:STDOUT: complete_type_witness = %complete_type
  975. // CHECK:STDOUT:
  976. // CHECK:STDOUT: !members:
  977. // CHECK:STDOUT: .Self = constants.%FDifferentParamType
  978. // CHECK:STDOUT: .J = <poisoned>
  979. // CHECK:STDOUT: }
  980. // CHECK:STDOUT:
  981. // CHECK:STDOUT: class @FDifferentImplicitParamType {
  982. // CHECK:STDOUT: impl_decl @impl.db4 [concrete] {} {
  983. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [concrete = constants.%FDifferentImplicitParamType]
  984. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  985. // CHECK:STDOUT: }
  986. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (<error>), @impl.db4 [concrete]
  987. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.103]
  988. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  989. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  990. // CHECK:STDOUT: complete_type_witness = %complete_type
  991. // CHECK:STDOUT:
  992. // CHECK:STDOUT: !members:
  993. // CHECK:STDOUT: .Self = constants.%FDifferentImplicitParamType
  994. // CHECK:STDOUT: .J = <poisoned>
  995. // CHECK:STDOUT: }
  996. // CHECK:STDOUT:
  997. // CHECK:STDOUT: class @FDifferentReturnType {
  998. // CHECK:STDOUT: impl_decl @impl.fcc [concrete] {} {
  999. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [concrete = constants.%FDifferentReturnType]
  1000. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1001. // CHECK:STDOUT: }
  1002. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (<error>), @impl.fcc [concrete]
  1003. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.6f7]
  1004. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1005. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1006. // CHECK:STDOUT: complete_type_witness = %complete_type
  1007. // CHECK:STDOUT:
  1008. // CHECK:STDOUT: !members:
  1009. // CHECK:STDOUT: .Self = constants.%FDifferentReturnType
  1010. // CHECK:STDOUT: .J = <poisoned>
  1011. // CHECK:STDOUT: }
  1012. // CHECK:STDOUT:
  1013. // CHECK:STDOUT: class @FDifferentParamName {
  1014. // CHECK:STDOUT: impl_decl @impl.c5d [concrete] {} {
  1015. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamName [concrete = constants.%FDifferentParamName]
  1016. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1017. // CHECK:STDOUT: }
  1018. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (<error>), @impl.c5d [concrete]
  1019. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.3ab]
  1020. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1021. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1022. // CHECK:STDOUT: complete_type_witness = %complete_type
  1023. // CHECK:STDOUT:
  1024. // CHECK:STDOUT: !members:
  1025. // CHECK:STDOUT: .Self = constants.%FDifferentParamName
  1026. // CHECK:STDOUT: .J = <poisoned>
  1027. // CHECK:STDOUT: }
  1028. // CHECK:STDOUT:
  1029. // CHECK:STDOUT: class @SelfNestedBadParam {
  1030. // CHECK:STDOUT: impl_decl @impl.6a5 [concrete] {} {
  1031. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadParam [concrete = constants.%SelfNestedBadParam]
  1032. // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type]
  1033. // CHECK:STDOUT: }
  1034. // CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (<error>), @impl.6a5 [concrete]
  1035. // CHECK:STDOUT: %SelfNested.impl_witness: <witness> = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.21a]
  1036. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1037. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1038. // CHECK:STDOUT: complete_type_witness = %complete_type
  1039. // CHECK:STDOUT:
  1040. // CHECK:STDOUT: !members:
  1041. // CHECK:STDOUT: .Self = constants.%SelfNestedBadParam
  1042. // CHECK:STDOUT: .SelfNested = <poisoned>
  1043. // CHECK:STDOUT: .SelfNestedBadParam = <poisoned>
  1044. // CHECK:STDOUT: }
  1045. // CHECK:STDOUT:
  1046. // CHECK:STDOUT: class @SelfNestedBadReturnType {
  1047. // CHECK:STDOUT: impl_decl @impl.bfc [concrete] {} {
  1048. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadReturnType [concrete = constants.%SelfNestedBadReturnType]
  1049. // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type]
  1050. // CHECK:STDOUT: }
  1051. // CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (<error>), @impl.bfc [concrete]
  1052. // CHECK:STDOUT: %SelfNested.impl_witness: <witness> = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.b10]
  1053. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1054. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1055. // CHECK:STDOUT: complete_type_witness = %complete_type
  1056. // CHECK:STDOUT:
  1057. // CHECK:STDOUT: !members:
  1058. // CHECK:STDOUT: .Self = constants.%SelfNestedBadReturnType
  1059. // CHECK:STDOUT: .SelfNested = <poisoned>
  1060. // CHECK:STDOUT: .SelfNestedBadReturnType = <poisoned>
  1061. // CHECK:STDOUT: .SelfNestedBadParam = <poisoned>
  1062. // CHECK:STDOUT: }
  1063. // CHECK:STDOUT:
  1064. // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) {
  1065. // CHECK:STDOUT: fn();
  1066. // CHECK:STDOUT: }
  1067. // CHECK:STDOUT:
  1068. // CHECK:STDOUT: fn @PossiblyF();
  1069. // CHECK:STDOUT:
  1070. // CHECK:STDOUT: fn @F.2(%b.param: bool);
  1071. // CHECK:STDOUT:
  1072. // CHECK:STDOUT: fn @F.3(%self.param: %FExtraImplicitParam);
  1073. // CHECK:STDOUT:
  1074. // CHECK:STDOUT: fn @F.4() -> bool;
  1075. // CHECK:STDOUT:
  1076. // CHECK:STDOUT: generic fn @F.5(@J.%Self: %J.type) {
  1077. // CHECK:STDOUT: fn(%self.param: bool, %b.param: bool) -> bool;
  1078. // CHECK:STDOUT: }
  1079. // CHECK:STDOUT:
  1080. // CHECK:STDOUT: fn @F.6(%self.param: bool) -> bool;
  1081. // CHECK:STDOUT:
  1082. // CHECK:STDOUT: fn @F.7(%b.param: bool) -> bool;
  1083. // CHECK:STDOUT:
  1084. // CHECK:STDOUT: fn @F.8(%self.param: bool, %b.param: bool);
  1085. // CHECK:STDOUT:
  1086. // CHECK:STDOUT: fn @F.9(%self.param: bool, %b.param: %FDifferentParamType) -> bool;
  1087. // CHECK:STDOUT:
  1088. // CHECK:STDOUT: fn @F.10(%self.param: %FDifferentImplicitParamType, %b.param: bool) -> bool;
  1089. // CHECK:STDOUT:
  1090. // CHECK:STDOUT: fn @F.11(%self.param: bool, %b.param: bool) -> %FDifferentReturnType;
  1091. // CHECK:STDOUT:
  1092. // CHECK:STDOUT: fn @F.12(%self.param: bool, %not_b.param: bool) -> bool;
  1093. // CHECK:STDOUT:
  1094. // CHECK:STDOUT: generic fn @F.13(@SelfNested.%Self: %SelfNested.type) {
  1095. // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2ff)]
  1096. // CHECK:STDOUT: %Self.as_type.loc188_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)]
  1097. // CHECK:STDOUT: %ptr.loc188_16.1: type = ptr_type %Self.as_type.loc188_16.1 [symbolic = %ptr.loc188_16.1 (constants.%ptr.e87)]
  1098. // CHECK:STDOUT: %struct_type.x.y.loc188_37.1: type = struct_type {.x: @F.13.%Self.as_type.loc188_16.1 (%Self.as_type), .y: %i32} [symbolic = %struct_type.x.y.loc188_37.1 (constants.%struct_type.x.y.81e)]
  1099. // CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc188_16.1, %struct_type.x.y.loc188_37.1) [symbolic = %tuple.type (constants.%tuple.type.229)]
  1100. // CHECK:STDOUT: %pattern_type.loc188_8: type = pattern_type %tuple.type [symbolic = %pattern_type.loc188_8 (constants.%pattern_type.ced)]
  1101. // CHECK:STDOUT: %array_type.loc188_57.1: type = array_type constants.%int_4, %Self.as_type.loc188_16.1 [symbolic = %array_type.loc188_57.1 (constants.%array_type.873)]
  1102. // CHECK:STDOUT: %pattern_type.loc188_41: type = pattern_type %array_type.loc188_57.1 [symbolic = %pattern_type.loc188_41 (constants.%pattern_type.c7e)]
  1103. // CHECK:STDOUT:
  1104. // CHECK:STDOUT: fn(%x.param: @F.13.%tuple.type (%tuple.type.229)) -> @F.13.%array_type.loc188_57.1 (%array_type.873);
  1105. // CHECK:STDOUT: }
  1106. // CHECK:STDOUT:
  1107. // CHECK:STDOUT: fn @F.14(%x.param: %tuple.type.a7d) -> %array_type.a41;
  1108. // CHECK:STDOUT:
  1109. // CHECK:STDOUT: fn @F.15(%x.param: %tuple.type.eb9) -> %array_type.a41;
  1110. // CHECK:STDOUT:
  1111. // CHECK:STDOUT: specific @F.1(constants.%Self.826) {}
  1112. // CHECK:STDOUT:
  1113. // CHECK:STDOUT: specific @F.1(constants.%I.facet.86d) {}
  1114. // CHECK:STDOUT:
  1115. // CHECK:STDOUT: specific @F.1(constants.%I.facet.919) {}
  1116. // CHECK:STDOUT:
  1117. // CHECK:STDOUT: specific @F.1(constants.%I.facet.d5c) {}
  1118. // CHECK:STDOUT:
  1119. // CHECK:STDOUT: specific @F.5(constants.%Self.ccd) {}
  1120. // CHECK:STDOUT:
  1121. // CHECK:STDOUT: specific @F.5(constants.%J.facet.97d) {}
  1122. // CHECK:STDOUT:
  1123. // CHECK:STDOUT: specific @F.5(constants.%J.facet.0d0) {}
  1124. // CHECK:STDOUT:
  1125. // CHECK:STDOUT: specific @F.5(constants.%J.facet.97a) {}
  1126. // CHECK:STDOUT:
  1127. // CHECK:STDOUT: specific @F.5(constants.%J.facet.955) {}
  1128. // CHECK:STDOUT:
  1129. // CHECK:STDOUT: specific @F.5(constants.%J.facet.130) {}
  1130. // CHECK:STDOUT:
  1131. // CHECK:STDOUT: specific @F.5(constants.%J.facet.1a7) {}
  1132. // CHECK:STDOUT:
  1133. // CHECK:STDOUT: specific @F.5(constants.%J.facet.366) {}
  1134. // CHECK:STDOUT:
  1135. // CHECK:STDOUT: specific @F.13(constants.%Self.2ff) {
  1136. // CHECK:STDOUT: %Self => constants.%Self.2ff
  1137. // CHECK:STDOUT: %Self.as_type.loc188_16.1 => constants.%Self.as_type
  1138. // CHECK:STDOUT: %ptr.loc188_16.1 => constants.%ptr.e87
  1139. // CHECK:STDOUT: %struct_type.x.y.loc188_37.1 => constants.%struct_type.x.y.81e
  1140. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.229
  1141. // CHECK:STDOUT: %pattern_type.loc188_8 => constants.%pattern_type.ced
  1142. // CHECK:STDOUT: %array_type.loc188_57.1 => constants.%array_type.873
  1143. // CHECK:STDOUT: %pattern_type.loc188_41 => constants.%pattern_type.c7e
  1144. // CHECK:STDOUT: }
  1145. // CHECK:STDOUT:
  1146. // CHECK:STDOUT: specific @F.13(constants.%SelfNested.facet.9f5) {
  1147. // CHECK:STDOUT: %Self => constants.%SelfNested.facet.9f5
  1148. // CHECK:STDOUT: %Self.as_type.loc188_16.1 => constants.%SelfNestedBadParam
  1149. // CHECK:STDOUT: %ptr.loc188_16.1 => constants.%ptr.4cd
  1150. // CHECK:STDOUT: %struct_type.x.y.loc188_37.1 => constants.%struct_type.x.y.a89
  1151. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.9c9
  1152. // CHECK:STDOUT: %pattern_type.loc188_8 => constants.%pattern_type.a5c
  1153. // CHECK:STDOUT: %array_type.loc188_57.1 => constants.%array_type.a41
  1154. // CHECK:STDOUT: %pattern_type.loc188_41 => constants.%pattern_type.1f1
  1155. // CHECK:STDOUT: }
  1156. // CHECK:STDOUT:
  1157. // CHECK:STDOUT: specific @F.13(constants.%SelfNested.facet.3bd) {
  1158. // CHECK:STDOUT: %Self => constants.%SelfNested.facet.3bd
  1159. // CHECK:STDOUT: %Self.as_type.loc188_16.1 => constants.%SelfNestedBadReturnType
  1160. // CHECK:STDOUT: %ptr.loc188_16.1 => constants.%ptr.612
  1161. // CHECK:STDOUT: %struct_type.x.y.loc188_37.1 => constants.%struct_type.x.y.ac5
  1162. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.eb9
  1163. // CHECK:STDOUT: %pattern_type.loc188_8 => constants.%pattern_type.23f
  1164. // CHECK:STDOUT: %array_type.loc188_57.1 => constants.%array_type.126
  1165. // CHECK:STDOUT: %pattern_type.loc188_41 => constants.%pattern_type.f56
  1166. // CHECK:STDOUT: }
  1167. // CHECK:STDOUT: