fail_impl_bad_assoc_fn.carbon 91 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385
  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+10]]:5: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch]
  50. // CHECK:STDERR: fn F(b: bool);
  51. // CHECK:STDERR: ^~~~~~~~~~~~~~
  52. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: note: calling function declared here [InCallToEntity]
  53. // CHECK:STDERR: fn F(b: bool);
  54. // CHECK:STDERR: ^~~~~~~~~~~~~~
  55. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-50]]:15: note: while building thunk to match the signature of this function [ThunkSignature]
  56. // CHECK:STDERR: interface I { fn F(); }
  57. // CHECK:STDERR: ^~~~~~~
  58. // CHECK:STDERR:
  59. fn F(b: bool);
  60. }
  61. }
  62. class FExtraImplicitParam {
  63. impl as I {
  64. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+10]]:5: error: missing object argument in method call [MissingObjectInMethodCall]
  65. // CHECK:STDERR: fn F[self: Self]();
  66. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
  67. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: note: calling function declared here [InCallToFunction]
  68. // CHECK:STDERR: fn F[self: Self]();
  69. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
  70. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-66]]:15: note: while building thunk to match the signature of this function [ThunkSignature]
  71. // CHECK:STDERR: interface I { fn F(); }
  72. // CHECK:STDERR: ^~~~~~~
  73. // CHECK:STDERR:
  74. fn F[self: Self]();
  75. }
  76. }
  77. // TODO: Should this be permitted?
  78. class FExtraReturnType {
  79. impl as I {
  80. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: function redeclaration differs because return type is `bool` [FunctionRedeclReturnTypeDiffers]
  81. // CHECK:STDERR: fn F() -> bool;
  82. // CHECK:STDERR: ^~~~~~~~~~~~~~~
  83. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-80]]:15: note: previously declared with no return type [FunctionRedeclReturnTypePreviousNoReturn]
  84. // CHECK:STDERR: interface I { fn F(); }
  85. // CHECK:STDERR: ^~~~~~~
  86. // CHECK:STDERR:
  87. fn F() -> bool;
  88. }
  89. }
  90. interface J { fn F[self: bool](b: bool) -> bool; }
  91. class FMissingParam {
  92. impl as J {
  93. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+10]]:5: error: 1 argument passed to function expecting 0 arguments [CallArgCountMismatch]
  94. // CHECK:STDERR: fn F[self: bool]() -> bool;
  95. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  96. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: note: calling function declared here [InCallToEntity]
  97. // CHECK:STDERR: fn F[self: bool]() -> bool;
  98. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  99. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-10]]:15: note: while building thunk to match the signature of this function [ThunkSignature]
  100. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  101. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  102. // CHECK:STDERR:
  103. fn F[self: bool]() -> bool;
  104. }
  105. }
  106. class FMissingImplicitParam {
  107. impl as J {
  108. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: member name of type `<type of F>` in compound member access is not an instance member or an interface member [CompoundMemberAccessDoesNotUseBase]
  109. // CHECK:STDERR: fn F(b: bool) -> bool;
  110. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
  111. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-23]]:15: note: while building thunk to match the signature of this function [ThunkSignature]
  112. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  113. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  114. // CHECK:STDERR:
  115. fn F(b: bool) -> bool;
  116. }
  117. }
  118. class FMissingReturnType {
  119. impl as J {
  120. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+16]]:5: error: cannot implicitly convert expression of type `()` to `bool` [ConversionFailure]
  121. // CHECK:STDERR: fn F[self: bool](b: bool);
  122. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
  123. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+13]]:5: note: type `()` does not implement interface `Core.ImplicitAs(bool)` [MissingImplInMemberAccessNote]
  124. // CHECK:STDERR: fn F[self: bool](b: bool);
  125. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
  126. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-39]]:15: note: while building thunk to match the signature of this function [ThunkSignature]
  127. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  128. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  129. // CHECK:STDERR:
  130. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-43]]:32: error: cannot implicitly convert expression of type `bool` to `FDifferentParamType` [ConversionFailure]
  131. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  132. // CHECK:STDERR: ^~~~~~~
  133. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-46]]:32: note: type `bool` does not implement interface `Core.ImplicitAs(FDifferentParamType)` [MissingImplInMemberAccessNote]
  134. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  135. // CHECK:STDERR: ^~~~~~~
  136. fn F[self: bool](b: bool);
  137. }
  138. }
  139. class FDifferentParamType {
  140. impl as J {
  141. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+13]]:22: note: initializing function parameter [InCallToFunctionParam]
  142. // CHECK:STDERR: fn F[self: bool](b: Self) -> bool;
  143. // CHECK:STDERR: ^~~~~~~
  144. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-58]]:15: note: while building thunk to match the signature of this function [ThunkSignature]
  145. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  146. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  147. // CHECK:STDERR:
  148. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-62]]:20: error: cannot implicitly convert expression of type `bool` to `FDifferentImplicitParamType` [ConversionFailure]
  149. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  150. // CHECK:STDERR: ^~~~~~~~~~
  151. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-65]]:20: note: type `bool` does not implement interface `Core.ImplicitAs(FDifferentImplicitParamType)` [MissingImplInMemberAccessNote]
  152. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  153. // CHECK:STDERR: ^~~~~~~~~~
  154. fn F[self: bool](b: Self) -> bool;
  155. }
  156. }
  157. class FDifferentImplicitParamType {
  158. impl as J {
  159. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: note: initializing function parameter [InCallToFunctionParam]
  160. // CHECK:STDERR: fn F[self: Self](b: bool) -> bool;
  161. // CHECK:STDERR: ^~~~~~~~~~
  162. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-77]]:15: note: while building thunk to match the signature of this function [ThunkSignature]
  163. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  164. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  165. // CHECK:STDERR:
  166. fn F[self: Self](b: bool) -> bool;
  167. }
  168. }
  169. class FDifferentReturnType {
  170. impl as J {
  171. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+10]]:5: error: cannot implicitly convert expression of type `FDifferentReturnType` to `bool` [ConversionFailure]
  172. // CHECK:STDERR: fn F[self: bool](b: bool) -> Self;
  173. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  174. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: note: type `FDifferentReturnType` does not implement interface `Core.ImplicitAs(bool)` [MissingImplInMemberAccessNote]
  175. // CHECK:STDERR: fn F[self: bool](b: bool) -> Self;
  176. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  177. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-93]]:15: note: while building thunk to match the signature of this function [ThunkSignature]
  178. // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
  179. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  180. // CHECK:STDERR:
  181. fn F[self: bool](b: bool) -> Self;
  182. }
  183. }
  184. interface SelfNested {
  185. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+6]]:8: error: cannot implicitly convert expression of type `SelfNestedBadParam` to `i32` [ConversionFailure]
  186. // CHECK:STDERR: fn F(x: (Self*, {.x: Self, .y: i32})) -> array(Self, 4);
  187. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  188. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+3]]:8: note: type `SelfNestedBadParam` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
  189. // CHECK:STDERR: fn F(x: (Self*, {.x: Self, .y: i32})) -> array(Self, 4);
  190. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  191. fn F(x: (Self*, {.x: Self, .y: i32})) -> array(Self, 4);
  192. }
  193. class SelfNestedBadParam {
  194. impl as SelfNested {
  195. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: note: initializing function parameter [InCallToFunctionParam]
  196. // CHECK:STDERR: fn F(x: (SelfNestedBadParam*, {.x: i32, .y: i32})) -> array(SelfNestedBadParam, 4);
  197. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  198. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-8]]:3: note: while building thunk to match the signature of this function [ThunkSignature]
  199. // CHECK:STDERR: fn F(x: (Self*, {.x: Self, .y: i32})) -> array(Self, 4);
  200. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  201. // CHECK:STDERR:
  202. fn F(x: (SelfNestedBadParam*, {.x: i32, .y: i32})) -> array(SelfNestedBadParam, 4);
  203. }
  204. }
  205. class SelfNestedBadReturnType {
  206. impl as SelfNested {
  207. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+10]]:5: error: cannot implicitly convert expression of type `array(SelfNestedBadParam, 4)` to `array(SelfNestedBadReturnType, 4)` [ConversionFailure]
  208. // CHECK:STDERR: fn F(x: (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32})) -> array(SelfNestedBadParam, 4);
  209. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  210. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: note: type `array(SelfNestedBadParam, 4)` does not implement interface `Core.ImplicitAs(array(SelfNestedBadReturnType, 4))` [MissingImplInMemberAccessNote]
  211. // CHECK:STDERR: fn F(x: (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32})) -> array(SelfNestedBadParam, 4);
  212. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  213. // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-24]]:3: note: while building thunk to match the signature of this function [ThunkSignature]
  214. // CHECK:STDERR: fn F(x: (Self*, {.x: Self, .y: i32})) -> array(Self, 4);
  215. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  216. // CHECK:STDERR:
  217. fn F(x: (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32})) -> array(SelfNestedBadParam, 4);
  218. }
  219. }
  220. // CHECK:STDOUT: --- fail_impl_bad_assoc_fn.carbon
  221. // CHECK:STDOUT:
  222. // CHECK:STDOUT: constants {
  223. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  224. // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
  225. // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete]
  226. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  227. // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete]
  228. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  229. // CHECK:STDOUT: %assoc0.82e: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete]
  230. // CHECK:STDOUT: %NoF: type = class_type @NoF [concrete]
  231. // CHECK:STDOUT: %I.impl_witness.901: <witness> = impl_witness @NoF.%I.impl_witness_table [concrete]
  232. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  233. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  234. // CHECK:STDOUT: %FNotFunction: type = class_type @FNotFunction [concrete]
  235. // CHECK:STDOUT: %I.impl_witness.44e: <witness> = impl_witness @FNotFunction.%I.impl_witness_table [concrete]
  236. // CHECK:STDOUT: %F.70c: type = class_type @F.25 [concrete]
  237. // CHECK:STDOUT: %PossiblyF.type: type = fn_type @PossiblyF [concrete]
  238. // CHECK:STDOUT: %PossiblyF: %PossiblyF.type = struct_value () [concrete]
  239. // CHECK:STDOUT: %FAlias: type = class_type @FAlias [concrete]
  240. // CHECK:STDOUT: %I.impl_witness.c80: <witness> = impl_witness @FAlias.%I.impl_witness_table [concrete]
  241. // CHECK:STDOUT: %FExtraParam: type = class_type @FExtraParam [concrete]
  242. // CHECK:STDOUT: %I.impl_witness.1f3: <witness> = impl_witness @FExtraParam.%I.impl_witness_table [concrete]
  243. // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
  244. // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
  245. // CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete]
  246. // CHECK:STDOUT: %F.type.44ef8c.1: type = fn_type @F.2 [concrete]
  247. // CHECK:STDOUT: %F.424e9e.1: %F.type.44ef8c.1 = struct_value () [concrete]
  248. // CHECK:STDOUT: %I.facet.fa4: %I.type = facet_value %FExtraParam, (%I.impl_witness.1f3) [concrete]
  249. // CHECK:STDOUT: %F.type.44ef8c.2: type = fn_type @F.3 [concrete]
  250. // CHECK:STDOUT: %F.424e9e.2: %F.type.44ef8c.2 = struct_value () [concrete]
  251. // CHECK:STDOUT: %FExtraImplicitParam: type = class_type @FExtraImplicitParam [concrete]
  252. // CHECK:STDOUT: %I.impl_witness.a7b: <witness> = impl_witness @FExtraImplicitParam.%I.impl_witness_table [concrete]
  253. // CHECK:STDOUT: %pattern_type.8ae: type = pattern_type %FExtraImplicitParam [concrete]
  254. // CHECK:STDOUT: %F.type.e1abdd.1: type = fn_type @F.4 [concrete]
  255. // CHECK:STDOUT: %F.6ff574.1: %F.type.e1abdd.1 = struct_value () [concrete]
  256. // CHECK:STDOUT: %I.facet.ee5: %I.type = facet_value %FExtraImplicitParam, (%I.impl_witness.a7b) [concrete]
  257. // CHECK:STDOUT: %F.type.e1abdd.2: type = fn_type @F.5 [concrete]
  258. // CHECK:STDOUT: %F.6ff574.2: %F.type.e1abdd.2 = struct_value () [concrete]
  259. // CHECK:STDOUT: %FExtraReturnType: type = class_type @FExtraReturnType [concrete]
  260. // CHECK:STDOUT: %I.impl_witness.59a: <witness> = impl_witness @FExtraReturnType.%I.impl_witness_table [concrete]
  261. // CHECK:STDOUT: %F.type.387: type = fn_type @F.6 [concrete]
  262. // CHECK:STDOUT: %F.df5: %F.type.387 = struct_value () [concrete]
  263. // CHECK:STDOUT: %I.facet.d5c: %I.type = facet_value %FExtraReturnType, (%I.impl_witness.59a) [concrete]
  264. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  265. // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
  266. // CHECK:STDOUT: %F.type.c14: type = fn_type @F.7 [concrete]
  267. // CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete]
  268. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  269. // CHECK:STDOUT: %assoc0.922: %J.assoc_type = assoc_entity element0, @J.%F.decl [concrete]
  270. // CHECK:STDOUT: %FMissingParam: type = class_type @FMissingParam [concrete]
  271. // CHECK:STDOUT: %J.impl_witness.4e9: <witness> = impl_witness @FMissingParam.%J.impl_witness_table [concrete]
  272. // CHECK:STDOUT: %F.type.69596c.1: type = fn_type @F.8 [concrete]
  273. // CHECK:STDOUT: %F.738f31.1: %F.type.69596c.1 = struct_value () [concrete]
  274. // CHECK:STDOUT: %J.facet.94c: %J.type = facet_value %FMissingParam, (%J.impl_witness.4e9) [concrete]
  275. // CHECK:STDOUT: %F.type.69596c.2: type = fn_type @F.9 [concrete]
  276. // CHECK:STDOUT: %F.738f31.2: %F.type.69596c.2 = struct_value () [concrete]
  277. // CHECK:STDOUT: %FMissingImplicitParam: type = class_type @FMissingImplicitParam [concrete]
  278. // CHECK:STDOUT: %J.impl_witness.841: <witness> = impl_witness @FMissingImplicitParam.%J.impl_witness_table [concrete]
  279. // CHECK:STDOUT: %F.type.d97cef.1: type = fn_type @F.10 [concrete]
  280. // CHECK:STDOUT: %F.01de92.1: %F.type.d97cef.1 = struct_value () [concrete]
  281. // CHECK:STDOUT: %J.facet.e7e: %J.type = facet_value %FMissingImplicitParam, (%J.impl_witness.841) [concrete]
  282. // CHECK:STDOUT: %F.type.d97cef.2: type = fn_type @F.11 [concrete]
  283. // CHECK:STDOUT: %F.01de92.2: %F.type.d97cef.2 = struct_value () [concrete]
  284. // CHECK:STDOUT: %FMissingReturnType: type = class_type @FMissingReturnType [concrete]
  285. // CHECK:STDOUT: %J.impl_witness.e75: <witness> = impl_witness @FMissingReturnType.%J.impl_witness_table [concrete]
  286. // CHECK:STDOUT: %F.type.123d7a.1: type = fn_type @F.12 [concrete]
  287. // CHECK:STDOUT: %F.c7d02d.1: %F.type.123d7a.1 = struct_value () [concrete]
  288. // CHECK:STDOUT: %J.facet.974: %J.type = facet_value %FMissingReturnType, (%J.impl_witness.e75) [concrete]
  289. // CHECK:STDOUT: %F.type.123d7a.2: type = fn_type @F.13 [concrete]
  290. // CHECK:STDOUT: %F.c7d02d.2: %F.type.123d7a.2 = struct_value () [concrete]
  291. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  292. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  293. // CHECK:STDOUT: %FDifferentParamType: type = class_type @FDifferentParamType [concrete]
  294. // CHECK:STDOUT: %J.impl_witness.cbe: <witness> = impl_witness @FDifferentParamType.%J.impl_witness_table [concrete]
  295. // CHECK:STDOUT: %pattern_type.b90: type = pattern_type %FDifferentParamType [concrete]
  296. // CHECK:STDOUT: %F.type.6b537d.1: type = fn_type @F.14 [concrete]
  297. // CHECK:STDOUT: %F.04313a.1: %F.type.6b537d.1 = struct_value () [concrete]
  298. // CHECK:STDOUT: %J.facet.37e: %J.type = facet_value %FDifferentParamType, (%J.impl_witness.cbe) [concrete]
  299. // CHECK:STDOUT: %F.type.6b537d.2: type = fn_type @F.15 [concrete]
  300. // CHECK:STDOUT: %F.04313a.2: %F.type.6b537d.2 = struct_value () [concrete]
  301. // CHECK:STDOUT: %FDifferentImplicitParamType: type = class_type @FDifferentImplicitParamType [concrete]
  302. // CHECK:STDOUT: %J.impl_witness.af2: <witness> = impl_witness @FDifferentImplicitParamType.%J.impl_witness_table [concrete]
  303. // CHECK:STDOUT: %pattern_type.9cc: type = pattern_type %FDifferentImplicitParamType [concrete]
  304. // CHECK:STDOUT: %F.type.d6232a.1: type = fn_type @F.16 [concrete]
  305. // CHECK:STDOUT: %F.886f70.1: %F.type.d6232a.1 = struct_value () [concrete]
  306. // CHECK:STDOUT: %J.facet.bf1: %J.type = facet_value %FDifferentImplicitParamType, (%J.impl_witness.af2) [concrete]
  307. // CHECK:STDOUT: %F.type.d6232a.2: type = fn_type @F.17 [concrete]
  308. // CHECK:STDOUT: %F.886f70.2: %F.type.d6232a.2 = struct_value () [concrete]
  309. // CHECK:STDOUT: %FDifferentReturnType: type = class_type @FDifferentReturnType [concrete]
  310. // CHECK:STDOUT: %J.impl_witness.bc1: <witness> = impl_witness @FDifferentReturnType.%J.impl_witness_table [concrete]
  311. // CHECK:STDOUT: %pattern_type.8ee: type = pattern_type %FDifferentReturnType [concrete]
  312. // CHECK:STDOUT: %F.type.d3b58f.1: type = fn_type @F.18 [concrete]
  313. // CHECK:STDOUT: %F.be86c9.1: %F.type.d3b58f.1 = struct_value () [concrete]
  314. // CHECK:STDOUT: %J.facet.67f: %J.type = facet_value %FDifferentReturnType, (%J.impl_witness.bc1) [concrete]
  315. // CHECK:STDOUT: %F.type.d3b58f.2: type = fn_type @F.19 [concrete]
  316. // CHECK:STDOUT: %F.be86c9.2: %F.type.d3b58f.2 = struct_value () [concrete]
  317. // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [concrete]
  318. // CHECK:STDOUT: %Self.2ff: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic]
  319. // CHECK:STDOUT: %Self.as_type.e1e: type = facet_access_type %Self.2ff [symbolic]
  320. // CHECK:STDOUT: %ptr.e87: type = ptr_type %Self.as_type.e1e [symbolic]
  321. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  322. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  323. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  324. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  325. // CHECK:STDOUT: %struct_type.x.y.81e: type = struct_type {.x: %Self.as_type.e1e, .y: %i32} [symbolic]
  326. // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete]
  327. // CHECK:STDOUT: %tuple.type.229: type = tuple_type (%ptr.e87, %struct_type.x.y.81e) [symbolic]
  328. // CHECK:STDOUT: %pattern_type.ced: type = pattern_type %tuple.type.229 [symbolic]
  329. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete]
  330. // CHECK:STDOUT: %array_type.873: type = array_type %int_4, %Self.as_type.e1e [symbolic]
  331. // CHECK:STDOUT: %pattern_type.c7e: type = pattern_type %array_type.873 [symbolic]
  332. // CHECK:STDOUT: %F.type.6ed: type = fn_type @F.20 [concrete]
  333. // CHECK:STDOUT: %F.998: %F.type.6ed = struct_value () [concrete]
  334. // CHECK:STDOUT: %SelfNested.assoc_type: type = assoc_entity_type @SelfNested [concrete]
  335. // CHECK:STDOUT: %assoc0.beb: %SelfNested.assoc_type = assoc_entity element0, @SelfNested.%F.decl [concrete]
  336. // CHECK:STDOUT: %SelfNestedBadParam: type = class_type @SelfNestedBadParam [concrete]
  337. // CHECK:STDOUT: %SelfNested.impl_witness.e31: <witness> = impl_witness @SelfNestedBadParam.%SelfNested.impl_witness_table [concrete]
  338. // CHECK:STDOUT: %ptr.4cd: type = ptr_type %SelfNestedBadParam [concrete]
  339. // CHECK:STDOUT: %struct_type.x.y.871: type = struct_type {.x: %i32, .y: %i32} [concrete]
  340. // CHECK:STDOUT: %tuple.type.a7d: type = tuple_type (%ptr.4cd, %struct_type.x.y.871) [concrete]
  341. // CHECK:STDOUT: %pattern_type.714: type = pattern_type %tuple.type.a7d [concrete]
  342. // CHECK:STDOUT: %array_type.a41: type = array_type %int_4, %SelfNestedBadParam [concrete]
  343. // CHECK:STDOUT: %pattern_type.1f1: type = pattern_type %array_type.a41 [concrete]
  344. // CHECK:STDOUT: %F.type.f90165.1: type = fn_type @F.21 [concrete]
  345. // CHECK:STDOUT: %F.fa8d04.1: %F.type.f90165.1 = struct_value () [concrete]
  346. // CHECK:STDOUT: %SelfNested.facet.608: %SelfNested.type = facet_value %SelfNestedBadParam, (%SelfNested.impl_witness.e31) [concrete]
  347. // CHECK:STDOUT: %struct_type.x.y.a89: type = struct_type {.x: %SelfNestedBadParam, .y: %i32} [concrete]
  348. // CHECK:STDOUT: %tuple.type.9c9: type = tuple_type (%ptr.4cd, %struct_type.x.y.a89) [concrete]
  349. // CHECK:STDOUT: %pattern_type.a5c: type = pattern_type %tuple.type.9c9 [concrete]
  350. // CHECK:STDOUT: %F.type.f90165.2: type = fn_type @F.22 [concrete]
  351. // CHECK:STDOUT: %F.fa8d04.2: %F.type.f90165.2 = struct_value () [concrete]
  352. // CHECK:STDOUT: %SelfNestedBadReturnType: type = class_type @SelfNestedBadReturnType [concrete]
  353. // CHECK:STDOUT: %SelfNested.impl_witness.d5e: <witness> = impl_witness @SelfNestedBadReturnType.%SelfNested.impl_witness_table [concrete]
  354. // CHECK:STDOUT: %ptr.612: type = ptr_type %SelfNestedBadReturnType [concrete]
  355. // CHECK:STDOUT: %struct_type.x.y.ac5: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [concrete]
  356. // CHECK:STDOUT: %tuple.type.eb9: type = tuple_type (%ptr.612, %struct_type.x.y.ac5) [concrete]
  357. // CHECK:STDOUT: %pattern_type.23f: type = pattern_type %tuple.type.eb9 [concrete]
  358. // CHECK:STDOUT: %F.type.0e7d1d.1: type = fn_type @F.23 [concrete]
  359. // CHECK:STDOUT: %F.0bc78a.1: %F.type.0e7d1d.1 = struct_value () [concrete]
  360. // CHECK:STDOUT: %SelfNested.facet.766: %SelfNested.type = facet_value %SelfNestedBadReturnType, (%SelfNested.impl_witness.d5e) [concrete]
  361. // CHECK:STDOUT: %array_type.126: type = array_type %int_4, %SelfNestedBadReturnType [concrete]
  362. // CHECK:STDOUT: %pattern_type.f56: type = pattern_type %array_type.126 [concrete]
  363. // CHECK:STDOUT: %F.type.0e7d1d.2: type = fn_type @F.24 [concrete]
  364. // CHECK:STDOUT: %F.0bc78a.2: %F.type.0e7d1d.2 = struct_value () [concrete]
  365. // CHECK:STDOUT: }
  366. // CHECK:STDOUT:
  367. // CHECK:STDOUT: imports {
  368. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  369. // CHECK:STDOUT: .Bool = %Core.Bool
  370. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  371. // CHECK:STDOUT: .Int = %Core.Int
  372. // CHECK:STDOUT: import Core//prelude
  373. // CHECK:STDOUT: import Core//prelude/...
  374. // CHECK:STDOUT: }
  375. // CHECK:STDOUT: %Core.Bool: %Bool.type = import_ref Core//prelude/types/bool, Bool, loaded [concrete = constants.%Bool]
  376. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  377. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  378. // CHECK:STDOUT: }
  379. // CHECK:STDOUT:
  380. // CHECK:STDOUT: file {
  381. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  382. // CHECK:STDOUT: .Core = imports.%Core
  383. // CHECK:STDOUT: .I = %I.decl
  384. // CHECK:STDOUT: .NoF = %NoF.decl
  385. // CHECK:STDOUT: .FNotFunction = %FNotFunction.decl
  386. // CHECK:STDOUT: .PossiblyF = %PossiblyF.decl
  387. // CHECK:STDOUT: .FAlias = %FAlias.decl
  388. // CHECK:STDOUT: .FExtraParam = %FExtraParam.decl
  389. // CHECK:STDOUT: .FExtraImplicitParam = %FExtraImplicitParam.decl
  390. // CHECK:STDOUT: .FExtraReturnType = %FExtraReturnType.decl
  391. // CHECK:STDOUT: .J = %J.decl
  392. // CHECK:STDOUT: .FMissingParam = %FMissingParam.decl
  393. // CHECK:STDOUT: .FMissingImplicitParam = %FMissingImplicitParam.decl
  394. // CHECK:STDOUT: .FMissingReturnType = %FMissingReturnType.decl
  395. // CHECK:STDOUT: .FDifferentParamType = %FDifferentParamType.decl
  396. // CHECK:STDOUT: .FDifferentImplicitParamType = %FDifferentImplicitParamType.decl
  397. // CHECK:STDOUT: .FDifferentReturnType = %FDifferentReturnType.decl
  398. // CHECK:STDOUT: .SelfNested = %SelfNested.decl
  399. // CHECK:STDOUT: .SelfNestedBadParam = %SelfNestedBadParam.decl
  400. // CHECK:STDOUT: .SelfNestedBadReturnType = %SelfNestedBadReturnType.decl
  401. // CHECK:STDOUT: }
  402. // CHECK:STDOUT: %Core.import = import Core
  403. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  404. // CHECK:STDOUT: %NoF.decl: type = class_decl @NoF [concrete = constants.%NoF] {} {}
  405. // CHECK:STDOUT: %FNotFunction.decl: type = class_decl @FNotFunction [concrete = constants.%FNotFunction] {} {}
  406. // CHECK:STDOUT: %PossiblyF.decl: %PossiblyF.type = fn_decl @PossiblyF [concrete = constants.%PossiblyF] {} {}
  407. // CHECK:STDOUT: %FAlias.decl: type = class_decl @FAlias [concrete = constants.%FAlias] {} {}
  408. // CHECK:STDOUT: %FExtraParam.decl: type = class_decl @FExtraParam [concrete = constants.%FExtraParam] {} {}
  409. // CHECK:STDOUT: %FExtraImplicitParam.decl: type = class_decl @FExtraImplicitParam [concrete = constants.%FExtraImplicitParam] {} {}
  410. // CHECK:STDOUT: %FExtraReturnType.decl: type = class_decl @FExtraReturnType [concrete = constants.%FExtraReturnType] {} {}
  411. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  412. // CHECK:STDOUT: %FMissingParam.decl: type = class_decl @FMissingParam [concrete = constants.%FMissingParam] {} {}
  413. // CHECK:STDOUT: %FMissingImplicitParam.decl: type = class_decl @FMissingImplicitParam [concrete = constants.%FMissingImplicitParam] {} {}
  414. // CHECK:STDOUT: %FMissingReturnType.decl: type = class_decl @FMissingReturnType [concrete = constants.%FMissingReturnType] {} {}
  415. // CHECK:STDOUT: %FDifferentParamType.decl: type = class_decl @FDifferentParamType [concrete = constants.%FDifferentParamType] {} {}
  416. // CHECK:STDOUT: %FDifferentImplicitParamType.decl: type = class_decl @FDifferentImplicitParamType [concrete = constants.%FDifferentImplicitParamType] {} {}
  417. // CHECK:STDOUT: %FDifferentReturnType.decl: type = class_decl @FDifferentReturnType [concrete = constants.%FDifferentReturnType] {} {}
  418. // CHECK:STDOUT: %SelfNested.decl: type = interface_decl @SelfNested [concrete = constants.%SelfNested.type] {} {}
  419. // CHECK:STDOUT: %SelfNestedBadParam.decl: type = class_decl @SelfNestedBadParam [concrete = constants.%SelfNestedBadParam] {} {}
  420. // CHECK:STDOUT: %SelfNestedBadReturnType.decl: type = class_decl @SelfNestedBadReturnType [concrete = constants.%SelfNestedBadReturnType] {} {}
  421. // CHECK:STDOUT: }
  422. // CHECK:STDOUT:
  423. // CHECK:STDOUT: interface @I {
  424. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
  425. // CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] {} {}
  426. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.82e]
  427. // CHECK:STDOUT:
  428. // CHECK:STDOUT: !members:
  429. // CHECK:STDOUT: .Self = %Self
  430. // CHECK:STDOUT: .F = %assoc0
  431. // CHECK:STDOUT: witness = (%F.decl)
  432. // CHECK:STDOUT: }
  433. // CHECK:STDOUT:
  434. // CHECK:STDOUT: interface @J {
  435. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
  436. // CHECK:STDOUT: %F.decl: %F.type.c14 = fn_decl @F.7 [concrete = constants.%F.b71] {
  437. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
  438. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete]
  439. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
  440. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1 [concrete]
  441. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
  442. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete]
  443. // CHECK:STDOUT: } {
  444. // CHECK:STDOUT: %bool.make_type.loc99_44: init type = call constants.%Bool() [concrete = bool]
  445. // CHECK:STDOUT: %.loc99_44.1: type = value_of_initializer %bool.make_type.loc99_44 [concrete = bool]
  446. // CHECK:STDOUT: %.loc99_44.2: type = converted %bool.make_type.loc99_44, %.loc99_44.1 [concrete = bool]
  447. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  448. // CHECK:STDOUT: %.loc99_26.1: type = splice_block %.loc99_26.3 [concrete = bool] {
  449. // CHECK:STDOUT: %bool.make_type.loc99_26: init type = call constants.%Bool() [concrete = bool]
  450. // CHECK:STDOUT: %.loc99_26.2: type = value_of_initializer %bool.make_type.loc99_26 [concrete = bool]
  451. // CHECK:STDOUT: %.loc99_26.3: type = converted %bool.make_type.loc99_26, %.loc99_26.2 [concrete = bool]
  452. // CHECK:STDOUT: }
  453. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  454. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  455. // CHECK:STDOUT: %.loc99_35.1: type = splice_block %.loc99_35.3 [concrete = bool] {
  456. // CHECK:STDOUT: %bool.make_type.loc99_35: init type = call constants.%Bool() [concrete = bool]
  457. // CHECK:STDOUT: %.loc99_35.2: type = value_of_initializer %bool.make_type.loc99_35 [concrete = bool]
  458. // CHECK:STDOUT: %.loc99_35.3: type = converted %bool.make_type.loc99_35, %.loc99_35.2 [concrete = bool]
  459. // CHECK:STDOUT: }
  460. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  461. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  462. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  463. // CHECK:STDOUT: }
  464. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.922]
  465. // CHECK:STDOUT:
  466. // CHECK:STDOUT: !members:
  467. // CHECK:STDOUT: .Self = %Self
  468. // CHECK:STDOUT: .F = %assoc0
  469. // CHECK:STDOUT: witness = (%F.decl)
  470. // CHECK:STDOUT: }
  471. // CHECK:STDOUT:
  472. // CHECK:STDOUT: interface @SelfNested {
  473. // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2ff]
  474. // CHECK:STDOUT: %F.decl: %F.type.6ed = fn_decl @F.20 [concrete = constants.%F.998] {
  475. // CHECK:STDOUT: %x.patt: @F.20.%pattern_type.loc207_8 (%pattern_type.ced) = binding_pattern x [concrete]
  476. // CHECK:STDOUT: %x.param_patt: @F.20.%pattern_type.loc207_8 (%pattern_type.ced) = value_param_pattern %x.patt, call_param0 [concrete]
  477. // CHECK:STDOUT: %return.patt: @F.20.%pattern_type.loc207_41 (%pattern_type.c7e) = return_slot_pattern [concrete]
  478. // CHECK:STDOUT: %return.param_patt: @F.20.%pattern_type.loc207_41 (%pattern_type.c7e) = out_param_pattern %return.patt, call_param1 [concrete]
  479. // CHECK:STDOUT: } {
  480. // CHECK:STDOUT: %Self.ref.loc207_50: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)]
  481. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4]
  482. // CHECK:STDOUT: %Self.as_type.loc207_50: type = facet_access_type %Self.ref.loc207_50 [symbolic = %Self.as_type.loc207_16.1 (constants.%Self.as_type.e1e)]
  483. // CHECK:STDOUT: %.loc207_50: type = converted %Self.ref.loc207_50, %Self.as_type.loc207_50 [symbolic = %Self.as_type.loc207_16.1 (constants.%Self.as_type.e1e)]
  484. // CHECK:STDOUT: %array_type.loc207_57.2: type = array_type %int_4, %.loc207_50 [symbolic = %array_type.loc207_57.1 (constants.%array_type.873)]
  485. // CHECK:STDOUT: %x.param: @F.20.%tuple.type (%tuple.type.229) = value_param call_param0
  486. // CHECK:STDOUT: %.loc207_38.1: type = splice_block %.loc207_38.3 [symbolic = %tuple.type (constants.%tuple.type.229)] {
  487. // CHECK:STDOUT: %Self.ref.loc207_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)]
  488. // CHECK:STDOUT: %Self.as_type.loc207_16.2: type = facet_access_type %Self.ref.loc207_12 [symbolic = %Self.as_type.loc207_16.1 (constants.%Self.as_type.e1e)]
  489. // CHECK:STDOUT: %.loc207_16: type = converted %Self.ref.loc207_12, %Self.as_type.loc207_16.2 [symbolic = %Self.as_type.loc207_16.1 (constants.%Self.as_type.e1e)]
  490. // CHECK:STDOUT: %ptr.loc207_16.2: type = ptr_type %.loc207_16 [symbolic = %ptr.loc207_16.1 (constants.%ptr.e87)]
  491. // CHECK:STDOUT: %Self.ref.loc207_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2ff)]
  492. // CHECK:STDOUT: %Self.as_type.loc207_24: type = facet_access_type %Self.ref.loc207_24 [symbolic = %Self.as_type.loc207_16.1 (constants.%Self.as_type.e1e)]
  493. // CHECK:STDOUT: %.loc207_24: type = converted %Self.ref.loc207_24, %Self.as_type.loc207_24 [symbolic = %Self.as_type.loc207_16.1 (constants.%Self.as_type.e1e)]
  494. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  495. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  496. // CHECK:STDOUT: %struct_type.x.y.loc207_37.2: type = struct_type {.x: @F.20.%Self.as_type.loc207_16.1 (%Self.as_type.e1e), .y: %i32} [symbolic = %struct_type.x.y.loc207_37.1 (constants.%struct_type.x.y.81e)]
  497. // CHECK:STDOUT: %.loc207_38.2: %tuple.type.24b = tuple_literal (%ptr.loc207_16.2, %struct_type.x.y.loc207_37.2)
  498. // CHECK:STDOUT: %.loc207_38.3: type = converted %.loc207_38.2, constants.%tuple.type.229 [symbolic = %tuple.type (constants.%tuple.type.229)]
  499. // CHECK:STDOUT: }
  500. // CHECK:STDOUT: %x: @F.20.%tuple.type (%tuple.type.229) = bind_name x, %x.param
  501. // CHECK:STDOUT: %return.param: ref @F.20.%array_type.loc207_57.1 (%array_type.873) = out_param call_param1
  502. // CHECK:STDOUT: %return: ref @F.20.%array_type.loc207_57.1 (%array_type.873) = return_slot %return.param
  503. // CHECK:STDOUT: }
  504. // CHECK:STDOUT: %assoc0: %SelfNested.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.beb]
  505. // CHECK:STDOUT:
  506. // CHECK:STDOUT: !members:
  507. // CHECK:STDOUT: .Self = %Self
  508. // CHECK:STDOUT: .F = %assoc0
  509. // CHECK:STDOUT: witness = (%F.decl)
  510. // CHECK:STDOUT: }
  511. // CHECK:STDOUT:
  512. // CHECK:STDOUT: impl @impl.0c9: %Self.ref as %I.ref {
  513. // CHECK:STDOUT: !members:
  514. // CHECK:STDOUT: .F = <poisoned>
  515. // CHECK:STDOUT: witness = @NoF.%I.impl_witness
  516. // CHECK:STDOUT: }
  517. // CHECK:STDOUT:
  518. // CHECK:STDOUT: impl @impl.b55: %Self.ref as %I.ref {
  519. // CHECK:STDOUT: %F.decl: type = class_decl @F.25 [concrete = constants.%F.70c] {} {}
  520. // CHECK:STDOUT:
  521. // CHECK:STDOUT: !members:
  522. // CHECK:STDOUT: .F = %F.decl
  523. // CHECK:STDOUT: witness = @FNotFunction.%I.impl_witness
  524. // CHECK:STDOUT: }
  525. // CHECK:STDOUT:
  526. // CHECK:STDOUT: impl @impl.199: %Self.ref as %I.ref {
  527. // CHECK:STDOUT: %PossiblyF.ref: %PossiblyF.type = name_ref PossiblyF, file.%PossiblyF.decl [concrete = constants.%PossiblyF]
  528. // CHECK:STDOUT: %F: %PossiblyF.type = bind_alias F, file.%PossiblyF.decl [concrete = constants.%PossiblyF]
  529. // CHECK:STDOUT:
  530. // CHECK:STDOUT: !members:
  531. // CHECK:STDOUT: .PossiblyF = <poisoned>
  532. // CHECK:STDOUT: .F = %F
  533. // CHECK:STDOUT: witness = @FAlias.%I.impl_witness
  534. // CHECK:STDOUT: }
  535. // CHECK:STDOUT:
  536. // CHECK:STDOUT: impl @impl.ddd: %Self.ref as %I.ref {
  537. // CHECK:STDOUT: %F.decl.loc65_18.1: %F.type.44ef8c.1 = fn_decl @F.2 [concrete = constants.%F.424e9e.1] {
  538. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
  539. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param0 [concrete]
  540. // CHECK:STDOUT: } {
  541. // CHECK:STDOUT: %b.param: bool = value_param call_param0
  542. // CHECK:STDOUT: %.loc65_13.1: type = splice_block %.loc65_13.3 [concrete = bool] {
  543. // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
  544. // CHECK:STDOUT: %.loc65_13.2: type = value_of_initializer %bool.make_type [concrete = bool]
  545. // CHECK:STDOUT: %.loc65_13.3: type = converted %bool.make_type, %.loc65_13.2 [concrete = bool]
  546. // CHECK:STDOUT: }
  547. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  548. // CHECK:STDOUT: }
  549. // CHECK:STDOUT: %F.decl.loc65_18.2: %F.type.44ef8c.2 = fn_decl @F.3 [concrete = constants.%F.424e9e.2] {} {}
  550. // CHECK:STDOUT:
  551. // CHECK:STDOUT: !members:
  552. // CHECK:STDOUT: .F = %F.decl.loc65_18.1
  553. // CHECK:STDOUT: witness = @FExtraParam.%I.impl_witness
  554. // CHECK:STDOUT: }
  555. // CHECK:STDOUT:
  556. // CHECK:STDOUT: impl @impl.698: %Self.ref as %I.ref {
  557. // CHECK:STDOUT: %F.decl.loc81_23.1: %F.type.e1abdd.1 = fn_decl @F.4 [concrete = constants.%F.6ff574.1] {
  558. // CHECK:STDOUT: %self.patt: %pattern_type.8ae = binding_pattern self [concrete]
  559. // CHECK:STDOUT: %self.param_patt: %pattern_type.8ae = value_param_pattern %self.patt, call_param0 [concrete]
  560. // CHECK:STDOUT: } {
  561. // CHECK:STDOUT: %self.param: %FExtraImplicitParam = value_param call_param0
  562. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [concrete = constants.%FExtraImplicitParam]
  563. // CHECK:STDOUT: %self: %FExtraImplicitParam = bind_name self, %self.param
  564. // CHECK:STDOUT: }
  565. // CHECK:STDOUT: %F.decl.loc81_23.2: %F.type.e1abdd.2 = fn_decl @F.5 [concrete = constants.%F.6ff574.2] {} {}
  566. // CHECK:STDOUT:
  567. // CHECK:STDOUT: !members:
  568. // CHECK:STDOUT: .F = %F.decl.loc81_23.1
  569. // CHECK:STDOUT: witness = @FExtraImplicitParam.%I.impl_witness
  570. // CHECK:STDOUT: }
  571. // CHECK:STDOUT:
  572. // CHECK:STDOUT: impl @impl.77b: %Self.ref as %I.ref {
  573. // CHECK:STDOUT: %F.decl: %F.type.387 = fn_decl @F.6 [concrete = constants.%F.df5] {
  574. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
  575. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param0 [concrete]
  576. // CHECK:STDOUT: } {
  577. // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
  578. // CHECK:STDOUT: %.loc95_15.1: type = value_of_initializer %bool.make_type [concrete = bool]
  579. // CHECK:STDOUT: %.loc95_15.2: type = converted %bool.make_type, %.loc95_15.1 [concrete = bool]
  580. // CHECK:STDOUT: %return.param: ref bool = out_param call_param0
  581. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  582. // CHECK:STDOUT: }
  583. // CHECK:STDOUT:
  584. // CHECK:STDOUT: !members:
  585. // CHECK:STDOUT: .F = %F.decl
  586. // CHECK:STDOUT: witness = @FExtraReturnType.%I.impl_witness
  587. // CHECK:STDOUT: }
  588. // CHECK:STDOUT:
  589. // CHECK:STDOUT: impl @impl.5cf: %Self.ref as %J.ref {
  590. // CHECK:STDOUT: %F.decl.loc113_31.1: %F.type.69596c.1 = fn_decl @F.8 [concrete = constants.%F.738f31.1] {
  591. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
  592. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete]
  593. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
  594. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param1 [concrete]
  595. // CHECK:STDOUT: } {
  596. // CHECK:STDOUT: %bool.make_type.loc113_27: init type = call constants.%Bool() [concrete = bool]
  597. // CHECK:STDOUT: %.loc113_27.1: type = value_of_initializer %bool.make_type.loc113_27 [concrete = bool]
  598. // CHECK:STDOUT: %.loc113_27.2: type = converted %bool.make_type.loc113_27, %.loc113_27.1 [concrete = bool]
  599. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  600. // CHECK:STDOUT: %.loc113_16.1: type = splice_block %.loc113_16.3 [concrete = bool] {
  601. // CHECK:STDOUT: %bool.make_type.loc113_16: init type = call constants.%Bool() [concrete = bool]
  602. // CHECK:STDOUT: %.loc113_16.2: type = value_of_initializer %bool.make_type.loc113_16 [concrete = bool]
  603. // CHECK:STDOUT: %.loc113_16.3: type = converted %bool.make_type.loc113_16, %.loc113_16.2 [concrete = bool]
  604. // CHECK:STDOUT: }
  605. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  606. // CHECK:STDOUT: %return.param: ref bool = out_param call_param1
  607. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  608. // CHECK:STDOUT: }
  609. // CHECK:STDOUT: %F.decl.loc113_31.2: %F.type.69596c.2 = fn_decl @F.9 [concrete = constants.%F.738f31.2] {
  610. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
  611. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete]
  612. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
  613. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1 [concrete]
  614. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
  615. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete]
  616. // CHECK:STDOUT: } {
  617. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  618. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  619. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  620. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  621. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  622. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  623. // CHECK:STDOUT: }
  624. // CHECK:STDOUT:
  625. // CHECK:STDOUT: !members:
  626. // CHECK:STDOUT: .F = %F.decl.loc113_31.1
  627. // CHECK:STDOUT: witness = @FMissingParam.%J.impl_witness
  628. // CHECK:STDOUT: }
  629. // CHECK:STDOUT:
  630. // CHECK:STDOUT: impl @impl.bac: %Self.ref as %J.ref {
  631. // CHECK:STDOUT: %F.decl.loc126_26.1: %F.type.d97cef.1 = fn_decl @F.10 [concrete = constants.%F.01de92.1] {
  632. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
  633. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param0 [concrete]
  634. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
  635. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param1 [concrete]
  636. // CHECK:STDOUT: } {
  637. // CHECK:STDOUT: %bool.make_type.loc126_22: init type = call constants.%Bool() [concrete = bool]
  638. // CHECK:STDOUT: %.loc126_22.1: type = value_of_initializer %bool.make_type.loc126_22 [concrete = bool]
  639. // CHECK:STDOUT: %.loc126_22.2: type = converted %bool.make_type.loc126_22, %.loc126_22.1 [concrete = bool]
  640. // CHECK:STDOUT: %b.param: bool = value_param call_param0
  641. // CHECK:STDOUT: %.loc126_13.1: type = splice_block %.loc126_13.3 [concrete = bool] {
  642. // CHECK:STDOUT: %bool.make_type.loc126_13: init type = call constants.%Bool() [concrete = bool]
  643. // CHECK:STDOUT: %.loc126_13.2: type = value_of_initializer %bool.make_type.loc126_13 [concrete = bool]
  644. // CHECK:STDOUT: %.loc126_13.3: type = converted %bool.make_type.loc126_13, %.loc126_13.2 [concrete = bool]
  645. // CHECK:STDOUT: }
  646. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  647. // CHECK:STDOUT: %return.param: ref bool = out_param call_param1
  648. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  649. // CHECK:STDOUT: }
  650. // CHECK:STDOUT: %F.decl.loc126_26.2: %F.type.d97cef.2 = fn_decl @F.11 [concrete = constants.%F.01de92.2] {
  651. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
  652. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete]
  653. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
  654. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1 [concrete]
  655. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
  656. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete]
  657. // CHECK:STDOUT: } {
  658. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  659. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  660. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  661. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  662. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  663. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  664. // CHECK:STDOUT: }
  665. // CHECK:STDOUT:
  666. // CHECK:STDOUT: !members:
  667. // CHECK:STDOUT: .F = %F.decl.loc126_26.1
  668. // CHECK:STDOUT: witness = @FMissingImplicitParam.%J.impl_witness
  669. // CHECK:STDOUT: }
  670. // CHECK:STDOUT:
  671. // CHECK:STDOUT: impl @impl.1a7: %Self.ref as %J.ref {
  672. // CHECK:STDOUT: %F.decl.loc148_30.1: %F.type.123d7a.1 = fn_decl @F.12 [concrete = constants.%F.c7d02d.1] {
  673. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
  674. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete]
  675. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
  676. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1 [concrete]
  677. // CHECK:STDOUT: } {
  678. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  679. // CHECK:STDOUT: %.loc148_16.1: type = splice_block %.loc148_16.3 [concrete = bool] {
  680. // CHECK:STDOUT: %bool.make_type.loc148_16: init type = call constants.%Bool() [concrete = bool]
  681. // CHECK:STDOUT: %.loc148_16.2: type = value_of_initializer %bool.make_type.loc148_16 [concrete = bool]
  682. // CHECK:STDOUT: %.loc148_16.3: type = converted %bool.make_type.loc148_16, %.loc148_16.2 [concrete = bool]
  683. // CHECK:STDOUT: }
  684. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  685. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  686. // CHECK:STDOUT: %.loc148_25.1: type = splice_block %.loc148_25.3 [concrete = bool] {
  687. // CHECK:STDOUT: %bool.make_type.loc148_25: init type = call constants.%Bool() [concrete = bool]
  688. // CHECK:STDOUT: %.loc148_25.2: type = value_of_initializer %bool.make_type.loc148_25 [concrete = bool]
  689. // CHECK:STDOUT: %.loc148_25.3: type = converted %bool.make_type.loc148_25, %.loc148_25.2 [concrete = bool]
  690. // CHECK:STDOUT: }
  691. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  692. // CHECK:STDOUT: }
  693. // CHECK:STDOUT: %F.decl.loc148_30.2: %F.type.123d7a.2 = fn_decl @F.13 [concrete = constants.%F.c7d02d.2] {
  694. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
  695. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete]
  696. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
  697. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1 [concrete]
  698. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
  699. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete]
  700. // CHECK:STDOUT: } {
  701. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  702. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  703. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  704. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  705. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  706. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  707. // CHECK:STDOUT: }
  708. // CHECK:STDOUT:
  709. // CHECK:STDOUT: !members:
  710. // CHECK:STDOUT: .F = %F.decl.loc148_30.1
  711. // CHECK:STDOUT: witness = @FMissingReturnType.%J.impl_witness
  712. // CHECK:STDOUT: }
  713. // CHECK:STDOUT:
  714. // CHECK:STDOUT: impl @impl.f2b: %Self.ref as %J.ref {
  715. // CHECK:STDOUT: %F.decl.loc167_38.1: %F.type.6b537d.1 = fn_decl @F.14 [concrete = constants.%F.04313a.1] {
  716. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
  717. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete]
  718. // CHECK:STDOUT: %b.patt: %pattern_type.b90 = binding_pattern b [concrete]
  719. // CHECK:STDOUT: %b.param_patt: %pattern_type.b90 = value_param_pattern %b.patt, call_param1 [concrete]
  720. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
  721. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete]
  722. // CHECK:STDOUT: } {
  723. // CHECK:STDOUT: %bool.make_type.loc167_34: init type = call constants.%Bool() [concrete = bool]
  724. // CHECK:STDOUT: %.loc167_34.1: type = value_of_initializer %bool.make_type.loc167_34 [concrete = bool]
  725. // CHECK:STDOUT: %.loc167_34.2: type = converted %bool.make_type.loc167_34, %.loc167_34.1 [concrete = bool]
  726. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  727. // CHECK:STDOUT: %.loc167_16.1: type = splice_block %.loc167_16.3 [concrete = bool] {
  728. // CHECK:STDOUT: %bool.make_type.loc167_16: init type = call constants.%Bool() [concrete = bool]
  729. // CHECK:STDOUT: %.loc167_16.2: type = value_of_initializer %bool.make_type.loc167_16 [concrete = bool]
  730. // CHECK:STDOUT: %.loc167_16.3: type = converted %bool.make_type.loc167_16, %.loc167_16.2 [concrete = bool]
  731. // CHECK:STDOUT: }
  732. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  733. // CHECK:STDOUT: %b.param: %FDifferentParamType = value_param call_param1
  734. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [concrete = constants.%FDifferentParamType]
  735. // CHECK:STDOUT: %b: %FDifferentParamType = bind_name b, %b.param
  736. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  737. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  738. // CHECK:STDOUT: }
  739. // CHECK:STDOUT: %F.decl.loc167_38.2: %F.type.6b537d.2 = fn_decl @F.15 [concrete = constants.%F.04313a.2] {
  740. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
  741. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete]
  742. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
  743. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1 [concrete]
  744. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
  745. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete]
  746. // CHECK:STDOUT: } {
  747. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  748. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  749. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  750. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  751. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  752. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  753. // CHECK:STDOUT: }
  754. // CHECK:STDOUT:
  755. // CHECK:STDOUT: !members:
  756. // CHECK:STDOUT: .F = %F.decl.loc167_38.1
  757. // CHECK:STDOUT: witness = @FDifferentParamType.%J.impl_witness
  758. // CHECK:STDOUT: }
  759. // CHECK:STDOUT:
  760. // CHECK:STDOUT: impl @impl.db4: %Self.ref as %J.ref {
  761. // CHECK:STDOUT: %F.decl.loc180_38.1: %F.type.d6232a.1 = fn_decl @F.16 [concrete = constants.%F.886f70.1] {
  762. // CHECK:STDOUT: %self.patt: %pattern_type.9cc = binding_pattern self [concrete]
  763. // CHECK:STDOUT: %self.param_patt: %pattern_type.9cc = value_param_pattern %self.patt, call_param0 [concrete]
  764. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
  765. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1 [concrete]
  766. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
  767. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete]
  768. // CHECK:STDOUT: } {
  769. // CHECK:STDOUT: %bool.make_type.loc180_34: init type = call constants.%Bool() [concrete = bool]
  770. // CHECK:STDOUT: %.loc180_34.1: type = value_of_initializer %bool.make_type.loc180_34 [concrete = bool]
  771. // CHECK:STDOUT: %.loc180_34.2: type = converted %bool.make_type.loc180_34, %.loc180_34.1 [concrete = bool]
  772. // CHECK:STDOUT: %self.param: %FDifferentImplicitParamType = value_param call_param0
  773. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [concrete = constants.%FDifferentImplicitParamType]
  774. // CHECK:STDOUT: %self: %FDifferentImplicitParamType = bind_name self, %self.param
  775. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  776. // CHECK:STDOUT: %.loc180_25.1: type = splice_block %.loc180_25.3 [concrete = bool] {
  777. // CHECK:STDOUT: %bool.make_type.loc180_25: init type = call constants.%Bool() [concrete = bool]
  778. // CHECK:STDOUT: %.loc180_25.2: type = value_of_initializer %bool.make_type.loc180_25 [concrete = bool]
  779. // CHECK:STDOUT: %.loc180_25.3: type = converted %bool.make_type.loc180_25, %.loc180_25.2 [concrete = bool]
  780. // CHECK:STDOUT: }
  781. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  782. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  783. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  784. // CHECK:STDOUT: }
  785. // CHECK:STDOUT: %F.decl.loc180_38.2: %F.type.d6232a.2 = fn_decl @F.17 [concrete = constants.%F.886f70.2] {
  786. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
  787. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete]
  788. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
  789. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1 [concrete]
  790. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
  791. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete]
  792. // CHECK:STDOUT: } {
  793. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  794. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  795. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  796. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  797. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  798. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  799. // CHECK:STDOUT: }
  800. // CHECK:STDOUT:
  801. // CHECK:STDOUT: !members:
  802. // CHECK:STDOUT: .F = %F.decl.loc180_38.1
  803. // CHECK:STDOUT: witness = @FDifferentImplicitParamType.%J.impl_witness
  804. // CHECK:STDOUT: }
  805. // CHECK:STDOUT:
  806. // CHECK:STDOUT: impl @impl.fcc: %Self.ref as %J.ref {
  807. // CHECK:STDOUT: %F.decl.loc196_38.1: %F.type.d3b58f.1 = fn_decl @F.18 [concrete = constants.%F.be86c9.1] {
  808. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
  809. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete]
  810. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
  811. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1 [concrete]
  812. // CHECK:STDOUT: %return.patt: %pattern_type.8ee = return_slot_pattern [concrete]
  813. // CHECK:STDOUT: %return.param_patt: %pattern_type.8ee = out_param_pattern %return.patt, call_param2 [concrete]
  814. // CHECK:STDOUT: } {
  815. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [concrete = constants.%FDifferentReturnType]
  816. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  817. // CHECK:STDOUT: %.loc196_16.1: type = splice_block %.loc196_16.3 [concrete = bool] {
  818. // CHECK:STDOUT: %bool.make_type.loc196_16: init type = call constants.%Bool() [concrete = bool]
  819. // CHECK:STDOUT: %.loc196_16.2: type = value_of_initializer %bool.make_type.loc196_16 [concrete = bool]
  820. // CHECK:STDOUT: %.loc196_16.3: type = converted %bool.make_type.loc196_16, %.loc196_16.2 [concrete = bool]
  821. // CHECK:STDOUT: }
  822. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  823. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  824. // CHECK:STDOUT: %.loc196_25.1: type = splice_block %.loc196_25.3 [concrete = bool] {
  825. // CHECK:STDOUT: %bool.make_type.loc196_25: init type = call constants.%Bool() [concrete = bool]
  826. // CHECK:STDOUT: %.loc196_25.2: type = value_of_initializer %bool.make_type.loc196_25 [concrete = bool]
  827. // CHECK:STDOUT: %.loc196_25.3: type = converted %bool.make_type.loc196_25, %.loc196_25.2 [concrete = bool]
  828. // CHECK:STDOUT: }
  829. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  830. // CHECK:STDOUT: %return.param: ref %FDifferentReturnType = out_param call_param2
  831. // CHECK:STDOUT: %return: ref %FDifferentReturnType = return_slot %return.param
  832. // CHECK:STDOUT: }
  833. // CHECK:STDOUT: %F.decl.loc196_38.2: %F.type.d3b58f.2 = fn_decl @F.19 [concrete = constants.%F.be86c9.2] {
  834. // CHECK:STDOUT: %self.patt: %pattern_type.831 = binding_pattern self [concrete]
  835. // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete]
  836. // CHECK:STDOUT: %b.patt: %pattern_type.831 = binding_pattern b [concrete]
  837. // CHECK:STDOUT: %b.param_patt: %pattern_type.831 = value_param_pattern %b.patt, call_param1 [concrete]
  838. // CHECK:STDOUT: %return.patt: %pattern_type.831 = return_slot_pattern [concrete]
  839. // CHECK:STDOUT: %return.param_patt: %pattern_type.831 = out_param_pattern %return.patt, call_param2 [concrete]
  840. // CHECK:STDOUT: } {
  841. // CHECK:STDOUT: %self.param: bool = value_param call_param0
  842. // CHECK:STDOUT: %self: bool = bind_name self, %self.param
  843. // CHECK:STDOUT: %b.param: bool = value_param call_param1
  844. // CHECK:STDOUT: %b: bool = bind_name b, %b.param
  845. // CHECK:STDOUT: %return.param: ref bool = out_param call_param2
  846. // CHECK:STDOUT: %return: ref bool = return_slot %return.param
  847. // CHECK:STDOUT: }
  848. // CHECK:STDOUT:
  849. // CHECK:STDOUT: !members:
  850. // CHECK:STDOUT: .F = %F.decl.loc196_38.1
  851. // CHECK:STDOUT: witness = @FDifferentReturnType.%J.impl_witness
  852. // CHECK:STDOUT: }
  853. // CHECK:STDOUT:
  854. // CHECK:STDOUT: impl @impl.6a5: %Self.ref as %SelfNested.ref {
  855. // CHECK:STDOUT: %F.decl.loc219_87.1: %F.type.f90165.1 = fn_decl @F.21 [concrete = constants.%F.fa8d04.1] {
  856. // CHECK:STDOUT: %x.patt: %pattern_type.714 = binding_pattern x [concrete]
  857. // CHECK:STDOUT: %x.param_patt: %pattern_type.714 = value_param_pattern %x.patt, call_param0 [concrete]
  858. // CHECK:STDOUT: %return.patt: %pattern_type.1f1 = return_slot_pattern [concrete]
  859. // CHECK:STDOUT: %return.param_patt: %pattern_type.1f1 = out_param_pattern %return.patt, call_param1 [concrete]
  860. // CHECK:STDOUT: } {
  861. // CHECK:STDOUT: %SelfNestedBadParam.ref.loc219_65: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam]
  862. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4]
  863. // CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam.ref.loc219_65 [concrete = constants.%array_type.a41]
  864. // CHECK:STDOUT: %x.param: %tuple.type.a7d = value_param call_param0
  865. // CHECK:STDOUT: %.loc219_53.1: type = splice_block %.loc219_53.3 [concrete = constants.%tuple.type.a7d] {
  866. // CHECK:STDOUT: %SelfNestedBadParam.ref.loc219_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam]
  867. // CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadParam.ref.loc219_14 [concrete = constants.%ptr.4cd]
  868. // CHECK:STDOUT: %int_32.loc219_40: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  869. // CHECK:STDOUT: %i32.loc219_40: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  870. // CHECK:STDOUT: %int_32.loc219_49: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  871. // CHECK:STDOUT: %i32.loc219_49: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  872. // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %i32, .y: %i32} [concrete = constants.%struct_type.x.y.871]
  873. // CHECK:STDOUT: %.loc219_53.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y)
  874. // CHECK:STDOUT: %.loc219_53.3: type = converted %.loc219_53.2, constants.%tuple.type.a7d [concrete = constants.%tuple.type.a7d]
  875. // CHECK:STDOUT: }
  876. // CHECK:STDOUT: %x: %tuple.type.a7d = bind_name x, %x.param
  877. // CHECK:STDOUT: %return.param: ref %array_type.a41 = out_param call_param1
  878. // CHECK:STDOUT: %return: ref %array_type.a41 = return_slot %return.param
  879. // CHECK:STDOUT: }
  880. // CHECK:STDOUT: %F.decl.loc219_87.2: %F.type.f90165.2 = fn_decl @F.22 [concrete = constants.%F.fa8d04.2] {
  881. // CHECK:STDOUT: %x.patt: %pattern_type.a5c = binding_pattern x [concrete]
  882. // CHECK:STDOUT: %x.param_patt: %pattern_type.a5c = value_param_pattern %x.patt, call_param0 [concrete]
  883. // CHECK:STDOUT: %return.patt: %pattern_type.1f1 = return_slot_pattern [concrete]
  884. // CHECK:STDOUT: %return.param_patt: %pattern_type.1f1 = out_param_pattern %return.patt, call_param1 [concrete]
  885. // CHECK:STDOUT: } {
  886. // CHECK:STDOUT: %x.param: %tuple.type.9c9 = value_param call_param0
  887. // CHECK:STDOUT: %x: %tuple.type.9c9 = bind_name x, %x.param
  888. // CHECK:STDOUT: %return.param: ref %array_type.a41 = out_param call_param1
  889. // CHECK:STDOUT: %return: ref %array_type.a41 = return_slot %return.param
  890. // CHECK:STDOUT: }
  891. // CHECK:STDOUT:
  892. // CHECK:STDOUT: !members:
  893. // CHECK:STDOUT: .SelfNestedBadParam = <poisoned>
  894. // CHECK:STDOUT: .F = %F.decl.loc219_87.1
  895. // CHECK:STDOUT: witness = @SelfNestedBadParam.%SelfNested.impl_witness
  896. // CHECK:STDOUT: }
  897. // CHECK:STDOUT:
  898. // CHECK:STDOUT: impl @impl.bfc: %Self.ref as %SelfNested.ref {
  899. // CHECK:STDOUT: %F.decl.loc235_112.1: %F.type.0e7d1d.1 = fn_decl @F.23 [concrete = constants.%F.0bc78a.1] {
  900. // CHECK:STDOUT: %x.patt: %pattern_type.23f = binding_pattern x [concrete]
  901. // CHECK:STDOUT: %x.param_patt: %pattern_type.23f = value_param_pattern %x.patt, call_param0 [concrete]
  902. // CHECK:STDOUT: %return.patt: %pattern_type.1f1 = return_slot_pattern [concrete]
  903. // CHECK:STDOUT: %return.param_patt: %pattern_type.1f1 = out_param_pattern %return.patt, call_param1 [concrete]
  904. // CHECK:STDOUT: } {
  905. // CHECK:STDOUT: %SelfNestedBadParam.ref: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [concrete = constants.%SelfNestedBadParam]
  906. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4]
  907. // CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam.ref [concrete = constants.%array_type.a41]
  908. // CHECK:STDOUT: %x.param: %tuple.type.eb9 = value_param call_param0
  909. // CHECK:STDOUT: %.loc235_78.1: type = splice_block %.loc235_78.3 [concrete = constants.%tuple.type.eb9] {
  910. // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc235_14: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [concrete = constants.%SelfNestedBadReturnType]
  911. // CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadReturnType.ref.loc235_14 [concrete = constants.%ptr.612]
  912. // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc235_45: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [concrete = constants.%SelfNestedBadReturnType]
  913. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  914. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  915. // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [concrete = constants.%struct_type.x.y.ac5]
  916. // CHECK:STDOUT: %.loc235_78.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y)
  917. // CHECK:STDOUT: %.loc235_78.3: type = converted %.loc235_78.2, constants.%tuple.type.eb9 [concrete = constants.%tuple.type.eb9]
  918. // CHECK:STDOUT: }
  919. // CHECK:STDOUT: %x: %tuple.type.eb9 = bind_name x, %x.param
  920. // CHECK:STDOUT: %return.param: ref %array_type.a41 = out_param call_param1
  921. // CHECK:STDOUT: %return: ref %array_type.a41 = return_slot %return.param
  922. // CHECK:STDOUT: }
  923. // CHECK:STDOUT: %F.decl.loc235_112.2: %F.type.0e7d1d.2 = fn_decl @F.24 [concrete = constants.%F.0bc78a.2] {
  924. // CHECK:STDOUT: %x.patt: %pattern_type.23f = binding_pattern x [concrete]
  925. // CHECK:STDOUT: %x.param_patt: %pattern_type.23f = value_param_pattern %x.patt, call_param0 [concrete]
  926. // CHECK:STDOUT: %return.patt: %pattern_type.f56 = return_slot_pattern [concrete]
  927. // CHECK:STDOUT: %return.param_patt: %pattern_type.f56 = out_param_pattern %return.patt, call_param1 [concrete]
  928. // CHECK:STDOUT: } {
  929. // CHECK:STDOUT: %x.param: %tuple.type.eb9 = value_param call_param0
  930. // CHECK:STDOUT: %x: %tuple.type.eb9 = bind_name x, %x.param
  931. // CHECK:STDOUT: %return.param: ref %array_type.126 = out_param call_param1
  932. // CHECK:STDOUT: %return: ref %array_type.126 = return_slot %return.param
  933. // CHECK:STDOUT: }
  934. // CHECK:STDOUT:
  935. // CHECK:STDOUT: !members:
  936. // CHECK:STDOUT: .SelfNestedBadReturnType = <poisoned>
  937. // CHECK:STDOUT: .SelfNestedBadParam = <poisoned>
  938. // CHECK:STDOUT: .F = %F.decl.loc235_112.1
  939. // CHECK:STDOUT: witness = @SelfNestedBadReturnType.%SelfNested.impl_witness
  940. // CHECK:STDOUT: }
  941. // CHECK:STDOUT:
  942. // CHECK:STDOUT: class @NoF {
  943. // CHECK:STDOUT: impl_decl @impl.0c9 [concrete] {} {
  944. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%NoF [concrete = constants.%NoF]
  945. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  946. // CHECK:STDOUT: }
  947. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @impl.0c9 [concrete]
  948. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.901]
  949. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  950. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  951. // CHECK:STDOUT: complete_type_witness = %complete_type
  952. // CHECK:STDOUT:
  953. // CHECK:STDOUT: !members:
  954. // CHECK:STDOUT: .Self = constants.%NoF
  955. // CHECK:STDOUT: .I = <poisoned>
  956. // CHECK:STDOUT: }
  957. // CHECK:STDOUT:
  958. // CHECK:STDOUT: class @FNotFunction {
  959. // CHECK:STDOUT: impl_decl @impl.b55 [concrete] {} {
  960. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FNotFunction [concrete = constants.%FNotFunction]
  961. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  962. // CHECK:STDOUT: }
  963. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @impl.b55 [concrete]
  964. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.44e]
  965. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  966. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  967. // CHECK:STDOUT: complete_type_witness = %complete_type
  968. // CHECK:STDOUT:
  969. // CHECK:STDOUT: !members:
  970. // CHECK:STDOUT: .Self = constants.%FNotFunction
  971. // CHECK:STDOUT: .I = <poisoned>
  972. // CHECK:STDOUT: }
  973. // CHECK:STDOUT:
  974. // CHECK:STDOUT: class @F.25;
  975. // CHECK:STDOUT:
  976. // CHECK:STDOUT: class @FAlias {
  977. // CHECK:STDOUT: impl_decl @impl.199 [concrete] {} {
  978. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FAlias [concrete = constants.%FAlias]
  979. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  980. // CHECK:STDOUT: }
  981. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @impl.199 [concrete]
  982. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.c80]
  983. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  984. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  985. // CHECK:STDOUT: complete_type_witness = %complete_type
  986. // CHECK:STDOUT:
  987. // CHECK:STDOUT: !members:
  988. // CHECK:STDOUT: .Self = constants.%FAlias
  989. // CHECK:STDOUT: .I = <poisoned>
  990. // CHECK:STDOUT: .PossiblyF = <poisoned>
  991. // CHECK:STDOUT: }
  992. // CHECK:STDOUT:
  993. // CHECK:STDOUT: class @FExtraParam {
  994. // CHECK:STDOUT: impl_decl @impl.ddd [concrete] {} {
  995. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraParam [concrete = constants.%FExtraParam]
  996. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  997. // CHECK:STDOUT: }
  998. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.ddd.%F.decl.loc65_18.2), @impl.ddd [concrete]
  999. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.1f3]
  1000. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1001. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1002. // CHECK:STDOUT: complete_type_witness = %complete_type
  1003. // CHECK:STDOUT:
  1004. // CHECK:STDOUT: !members:
  1005. // CHECK:STDOUT: .Self = constants.%FExtraParam
  1006. // CHECK:STDOUT: .I = <poisoned>
  1007. // CHECK:STDOUT: }
  1008. // CHECK:STDOUT:
  1009. // CHECK:STDOUT: class @FExtraImplicitParam {
  1010. // CHECK:STDOUT: impl_decl @impl.698 [concrete] {} {
  1011. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [concrete = constants.%FExtraImplicitParam]
  1012. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  1013. // CHECK:STDOUT: }
  1014. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@impl.698.%F.decl.loc81_23.2), @impl.698 [concrete]
  1015. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.a7b]
  1016. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1017. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1018. // CHECK:STDOUT: complete_type_witness = %complete_type
  1019. // CHECK:STDOUT:
  1020. // CHECK:STDOUT: !members:
  1021. // CHECK:STDOUT: .Self = constants.%FExtraImplicitParam
  1022. // CHECK:STDOUT: .I = <poisoned>
  1023. // CHECK:STDOUT: }
  1024. // CHECK:STDOUT:
  1025. // CHECK:STDOUT: class @FExtraReturnType {
  1026. // CHECK:STDOUT: impl_decl @impl.77b [concrete] {} {
  1027. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraReturnType [concrete = constants.%FExtraReturnType]
  1028. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  1029. // CHECK:STDOUT: }
  1030. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (<error>), @impl.77b [concrete]
  1031. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.59a]
  1032. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1033. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1034. // CHECK:STDOUT: complete_type_witness = %complete_type
  1035. // CHECK:STDOUT:
  1036. // CHECK:STDOUT: !members:
  1037. // CHECK:STDOUT: .Self = constants.%FExtraReturnType
  1038. // CHECK:STDOUT: .I = <poisoned>
  1039. // CHECK:STDOUT: }
  1040. // CHECK:STDOUT:
  1041. // CHECK:STDOUT: class @FMissingParam {
  1042. // CHECK:STDOUT: impl_decl @impl.5cf [concrete] {} {
  1043. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingParam [concrete = constants.%FMissingParam]
  1044. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1045. // CHECK:STDOUT: }
  1046. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.5cf.%F.decl.loc113_31.2), @impl.5cf [concrete]
  1047. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.4e9]
  1048. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1049. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1050. // CHECK:STDOUT: complete_type_witness = %complete_type
  1051. // CHECK:STDOUT:
  1052. // CHECK:STDOUT: !members:
  1053. // CHECK:STDOUT: .Self = constants.%FMissingParam
  1054. // CHECK:STDOUT: .J = <poisoned>
  1055. // CHECK:STDOUT: }
  1056. // CHECK:STDOUT:
  1057. // CHECK:STDOUT: class @FMissingImplicitParam {
  1058. // CHECK:STDOUT: impl_decl @impl.bac [concrete] {} {
  1059. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingImplicitParam [concrete = constants.%FMissingImplicitParam]
  1060. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1061. // CHECK:STDOUT: }
  1062. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.bac.%F.decl.loc126_26.2), @impl.bac [concrete]
  1063. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.841]
  1064. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1065. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1066. // CHECK:STDOUT: complete_type_witness = %complete_type
  1067. // CHECK:STDOUT:
  1068. // CHECK:STDOUT: !members:
  1069. // CHECK:STDOUT: .Self = constants.%FMissingImplicitParam
  1070. // CHECK:STDOUT: .J = <poisoned>
  1071. // CHECK:STDOUT: }
  1072. // CHECK:STDOUT:
  1073. // CHECK:STDOUT: class @FMissingReturnType {
  1074. // CHECK:STDOUT: impl_decl @impl.1a7 [concrete] {} {
  1075. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingReturnType [concrete = constants.%FMissingReturnType]
  1076. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1077. // CHECK:STDOUT: }
  1078. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.1a7.%F.decl.loc148_30.2), @impl.1a7 [concrete]
  1079. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.e75]
  1080. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1081. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1082. // CHECK:STDOUT: complete_type_witness = %complete_type
  1083. // CHECK:STDOUT:
  1084. // CHECK:STDOUT: !members:
  1085. // CHECK:STDOUT: .Self = constants.%FMissingReturnType
  1086. // CHECK:STDOUT: .J = <poisoned>
  1087. // CHECK:STDOUT: }
  1088. // CHECK:STDOUT:
  1089. // CHECK:STDOUT: class @FDifferentParamType {
  1090. // CHECK:STDOUT: impl_decl @impl.f2b [concrete] {} {
  1091. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [concrete = constants.%FDifferentParamType]
  1092. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1093. // CHECK:STDOUT: }
  1094. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.f2b.%F.decl.loc167_38.2), @impl.f2b [concrete]
  1095. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.cbe]
  1096. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1097. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1098. // CHECK:STDOUT: complete_type_witness = %complete_type
  1099. // CHECK:STDOUT:
  1100. // CHECK:STDOUT: !members:
  1101. // CHECK:STDOUT: .Self = constants.%FDifferentParamType
  1102. // CHECK:STDOUT: .J = <poisoned>
  1103. // CHECK:STDOUT: }
  1104. // CHECK:STDOUT:
  1105. // CHECK:STDOUT: class @FDifferentImplicitParamType {
  1106. // CHECK:STDOUT: impl_decl @impl.db4 [concrete] {} {
  1107. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [concrete = constants.%FDifferentImplicitParamType]
  1108. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1109. // CHECK:STDOUT: }
  1110. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.db4.%F.decl.loc180_38.2), @impl.db4 [concrete]
  1111. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.af2]
  1112. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1113. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1114. // CHECK:STDOUT: complete_type_witness = %complete_type
  1115. // CHECK:STDOUT:
  1116. // CHECK:STDOUT: !members:
  1117. // CHECK:STDOUT: .Self = constants.%FDifferentImplicitParamType
  1118. // CHECK:STDOUT: .J = <poisoned>
  1119. // CHECK:STDOUT: }
  1120. // CHECK:STDOUT:
  1121. // CHECK:STDOUT: class @FDifferentReturnType {
  1122. // CHECK:STDOUT: impl_decl @impl.fcc [concrete] {} {
  1123. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [concrete = constants.%FDifferentReturnType]
  1124. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  1125. // CHECK:STDOUT: }
  1126. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@impl.fcc.%F.decl.loc196_38.2), @impl.fcc [concrete]
  1127. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness.bc1]
  1128. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1129. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1130. // CHECK:STDOUT: complete_type_witness = %complete_type
  1131. // CHECK:STDOUT:
  1132. // CHECK:STDOUT: !members:
  1133. // CHECK:STDOUT: .Self = constants.%FDifferentReturnType
  1134. // CHECK:STDOUT: .J = <poisoned>
  1135. // CHECK:STDOUT: }
  1136. // CHECK:STDOUT:
  1137. // CHECK:STDOUT: class @SelfNestedBadParam {
  1138. // CHECK:STDOUT: impl_decl @impl.6a5 [concrete] {} {
  1139. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadParam [concrete = constants.%SelfNestedBadParam]
  1140. // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type]
  1141. // CHECK:STDOUT: }
  1142. // CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (@impl.6a5.%F.decl.loc219_87.2), @impl.6a5 [concrete]
  1143. // CHECK:STDOUT: %SelfNested.impl_witness: <witness> = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.e31]
  1144. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1145. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1146. // CHECK:STDOUT: complete_type_witness = %complete_type
  1147. // CHECK:STDOUT:
  1148. // CHECK:STDOUT: !members:
  1149. // CHECK:STDOUT: .Self = constants.%SelfNestedBadParam
  1150. // CHECK:STDOUT: .SelfNested = <poisoned>
  1151. // CHECK:STDOUT: .SelfNestedBadParam = <poisoned>
  1152. // CHECK:STDOUT: }
  1153. // CHECK:STDOUT:
  1154. // CHECK:STDOUT: class @SelfNestedBadReturnType {
  1155. // CHECK:STDOUT: impl_decl @impl.bfc [concrete] {} {
  1156. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadReturnType [concrete = constants.%SelfNestedBadReturnType]
  1157. // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type]
  1158. // CHECK:STDOUT: }
  1159. // CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (@impl.bfc.%F.decl.loc235_112.2), @impl.bfc [concrete]
  1160. // CHECK:STDOUT: %SelfNested.impl_witness: <witness> = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.d5e]
  1161. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  1162. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  1163. // CHECK:STDOUT: complete_type_witness = %complete_type
  1164. // CHECK:STDOUT:
  1165. // CHECK:STDOUT: !members:
  1166. // CHECK:STDOUT: .Self = constants.%SelfNestedBadReturnType
  1167. // CHECK:STDOUT: .SelfNested = <poisoned>
  1168. // CHECK:STDOUT: .SelfNestedBadReturnType = <poisoned>
  1169. // CHECK:STDOUT: .SelfNestedBadParam = <poisoned>
  1170. // CHECK:STDOUT: }
  1171. // CHECK:STDOUT:
  1172. // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) {
  1173. // CHECK:STDOUT: fn();
  1174. // CHECK:STDOUT: }
  1175. // CHECK:STDOUT:
  1176. // CHECK:STDOUT: fn @PossiblyF();
  1177. // CHECK:STDOUT:
  1178. // CHECK:STDOUT: fn @F.2(%b.param: bool);
  1179. // CHECK:STDOUT:
  1180. // CHECK:STDOUT: fn @F.3() {
  1181. // CHECK:STDOUT: !entry:
  1182. // CHECK:STDOUT: return
  1183. // CHECK:STDOUT: }
  1184. // CHECK:STDOUT:
  1185. // CHECK:STDOUT: fn @F.4(%self.param: %FExtraImplicitParam);
  1186. // CHECK:STDOUT:
  1187. // CHECK:STDOUT: fn @F.5() {
  1188. // CHECK:STDOUT: !entry:
  1189. // CHECK:STDOUT: %F.call: init %empty_tuple.type = call @impl.698.%F.decl.loc81_23.1(<error>)
  1190. // CHECK:STDOUT: return
  1191. // CHECK:STDOUT: }
  1192. // CHECK:STDOUT:
  1193. // CHECK:STDOUT: fn @F.6() -> bool;
  1194. // CHECK:STDOUT:
  1195. // CHECK:STDOUT: generic fn @F.7(@J.%Self: %J.type) {
  1196. // CHECK:STDOUT: fn(%self.param: bool, %b.param: bool) -> bool;
  1197. // CHECK:STDOUT: }
  1198. // CHECK:STDOUT:
  1199. // CHECK:STDOUT: fn @F.8(%self.param: bool) -> bool;
  1200. // CHECK:STDOUT:
  1201. // CHECK:STDOUT: fn @F.9(%self.param: bool, %b.param: bool) -> bool {
  1202. // CHECK:STDOUT: !entry:
  1203. // CHECK:STDOUT: %self.ref: bool = name_ref self, %self.param
  1204. // CHECK:STDOUT: %F.bound: <bound method> = bound_method %self.ref, @impl.5cf.%F.decl.loc113_31.1
  1205. // CHECK:STDOUT: %b.ref: bool = name_ref b, %b.param
  1206. // CHECK:STDOUT: return <error>
  1207. // CHECK:STDOUT: }
  1208. // CHECK:STDOUT:
  1209. // CHECK:STDOUT: fn @F.10(%b.param: bool) -> bool;
  1210. // CHECK:STDOUT:
  1211. // CHECK:STDOUT: fn @F.11(%self.param: bool, %b.param: bool) -> bool {
  1212. // CHECK:STDOUT: !entry:
  1213. // CHECK:STDOUT: %self.ref: bool = name_ref self, %self.param
  1214. // CHECK:STDOUT: %b.ref: bool = name_ref b, %b.param
  1215. // CHECK:STDOUT: %F.call: init bool = call @impl.bac.%F.decl.loc126_26.1(%b.ref)
  1216. // CHECK:STDOUT: %.loc126_26.1: bool = value_of_initializer %F.call
  1217. // CHECK:STDOUT: %.loc126_26.2: bool = converted %F.call, %.loc126_26.1
  1218. // CHECK:STDOUT: return %.loc126_26.2
  1219. // CHECK:STDOUT: }
  1220. // CHECK:STDOUT:
  1221. // CHECK:STDOUT: fn @F.12(%self.param: bool, %b.param: bool);
  1222. // CHECK:STDOUT:
  1223. // CHECK:STDOUT: fn @F.13(%self.param: bool, %b.param: bool) -> bool {
  1224. // CHECK:STDOUT: !entry:
  1225. // CHECK:STDOUT: %self.ref: bool = name_ref self, %self.param
  1226. // CHECK:STDOUT: %F.bound: <bound method> = bound_method %self.ref, @impl.1a7.%F.decl.loc148_30.1
  1227. // CHECK:STDOUT: %b.ref: bool = name_ref b, %b.param
  1228. // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.bound(%self.ref, %b.ref)
  1229. // CHECK:STDOUT: %.loc148: bool = converted %F.call, <error> [concrete = <error>]
  1230. // CHECK:STDOUT: return <error>
  1231. // CHECK:STDOUT: }
  1232. // CHECK:STDOUT:
  1233. // CHECK:STDOUT: fn @F.14(%self.param: bool, %b.param: %FDifferentParamType) -> bool;
  1234. // CHECK:STDOUT:
  1235. // CHECK:STDOUT: fn @F.15(%self.param: bool, %b.param: bool) -> bool {
  1236. // CHECK:STDOUT: !entry:
  1237. // CHECK:STDOUT: %self.ref: bool = name_ref self, %self.param
  1238. // CHECK:STDOUT: %F.bound: <bound method> = bound_method %self.ref, @impl.f2b.%F.decl.loc167_38.1
  1239. // CHECK:STDOUT: %b.ref: bool = name_ref b, %b.param
  1240. // CHECK:STDOUT: %.loc99: %FDifferentParamType = converted %b.ref, <error> [concrete = <error>]
  1241. // CHECK:STDOUT: %F.call: init bool = call %F.bound(%self.ref, <error>)
  1242. // CHECK:STDOUT: %.loc167_38.1: bool = value_of_initializer %F.call
  1243. // CHECK:STDOUT: %.loc167_38.2: bool = converted %F.call, %.loc167_38.1
  1244. // CHECK:STDOUT: return %.loc167_38.2
  1245. // CHECK:STDOUT: }
  1246. // CHECK:STDOUT:
  1247. // CHECK:STDOUT: fn @F.16(%self.param: %FDifferentImplicitParamType, %b.param: bool) -> bool;
  1248. // CHECK:STDOUT:
  1249. // CHECK:STDOUT: fn @F.17(%self.param: bool, %b.param: bool) -> bool {
  1250. // CHECK:STDOUT: !entry:
  1251. // CHECK:STDOUT: %self.ref: bool = name_ref self, %self.param
  1252. // CHECK:STDOUT: %F.bound: <bound method> = bound_method %self.ref, @impl.db4.%F.decl.loc180_38.1
  1253. // CHECK:STDOUT: %b.ref: bool = name_ref b, %b.param
  1254. // CHECK:STDOUT: %.loc99: %FDifferentImplicitParamType = converted %self.ref, <error> [concrete = <error>]
  1255. // CHECK:STDOUT: %F.call: init bool = call %F.bound(<error>, %b.ref)
  1256. // CHECK:STDOUT: %.loc180_38.1: bool = value_of_initializer %F.call
  1257. // CHECK:STDOUT: %.loc180_38.2: bool = converted %F.call, %.loc180_38.1
  1258. // CHECK:STDOUT: return %.loc180_38.2
  1259. // CHECK:STDOUT: }
  1260. // CHECK:STDOUT:
  1261. // CHECK:STDOUT: fn @F.18(%self.param: bool, %b.param: bool) -> %return.param: %FDifferentReturnType;
  1262. // CHECK:STDOUT:
  1263. // CHECK:STDOUT: fn @F.19(%self.param: bool, %b.param: bool) -> bool {
  1264. // CHECK:STDOUT: !entry:
  1265. // CHECK:STDOUT: %self.ref: bool = name_ref self, %self.param
  1266. // CHECK:STDOUT: %F.bound: <bound method> = bound_method %self.ref, @impl.fcc.%F.decl.loc196_38.1
  1267. // CHECK:STDOUT: %b.ref: bool = name_ref b, %b.param
  1268. // CHECK:STDOUT: %.loc196_38.1: ref %FDifferentReturnType = temporary_storage
  1269. // CHECK:STDOUT: %F.call: init %FDifferentReturnType = call %F.bound(%self.ref, %b.ref) to %.loc196_38.1
  1270. // CHECK:STDOUT: %.loc196_38.2: bool = converted %F.call, <error> [concrete = <error>]
  1271. // CHECK:STDOUT: return <error>
  1272. // CHECK:STDOUT: }
  1273. // CHECK:STDOUT:
  1274. // CHECK:STDOUT: generic fn @F.20(@SelfNested.%Self: %SelfNested.type) {
  1275. // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2ff)]
  1276. // CHECK:STDOUT: %Self.as_type.loc207_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc207_16.1 (constants.%Self.as_type.e1e)]
  1277. // CHECK:STDOUT: %ptr.loc207_16.1: type = ptr_type %Self.as_type.loc207_16.1 [symbolic = %ptr.loc207_16.1 (constants.%ptr.e87)]
  1278. // CHECK:STDOUT: %struct_type.x.y.loc207_37.1: type = struct_type {.x: @F.20.%Self.as_type.loc207_16.1 (%Self.as_type.e1e), .y: %i32} [symbolic = %struct_type.x.y.loc207_37.1 (constants.%struct_type.x.y.81e)]
  1279. // CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc207_16.1, %struct_type.x.y.loc207_37.1) [symbolic = %tuple.type (constants.%tuple.type.229)]
  1280. // CHECK:STDOUT: %pattern_type.loc207_8: type = pattern_type %tuple.type [symbolic = %pattern_type.loc207_8 (constants.%pattern_type.ced)]
  1281. // CHECK:STDOUT: %array_type.loc207_57.1: type = array_type constants.%int_4, %Self.as_type.loc207_16.1 [symbolic = %array_type.loc207_57.1 (constants.%array_type.873)]
  1282. // CHECK:STDOUT: %pattern_type.loc207_41: type = pattern_type %array_type.loc207_57.1 [symbolic = %pattern_type.loc207_41 (constants.%pattern_type.c7e)]
  1283. // CHECK:STDOUT:
  1284. // CHECK:STDOUT: fn(%x.param: @F.20.%tuple.type (%tuple.type.229)) -> @F.20.%array_type.loc207_57.1 (%array_type.873);
  1285. // CHECK:STDOUT: }
  1286. // CHECK:STDOUT:
  1287. // CHECK:STDOUT: fn @F.21(%x.param: %tuple.type.a7d) -> %return.param: %array_type.a41;
  1288. // CHECK:STDOUT:
  1289. // CHECK:STDOUT: fn @F.22(%x.param: %tuple.type.9c9) -> %return.param: %array_type.a41 {
  1290. // CHECK:STDOUT: !entry:
  1291. // CHECK:STDOUT: %x.ref: %tuple.type.9c9 = name_ref x, %x.param
  1292. // CHECK:STDOUT: %.loc207_41: ref %array_type.a41 = splice_block %return {}
  1293. // CHECK:STDOUT: %tuple.elem0: %ptr.4cd = tuple_access %x.ref, element0
  1294. // CHECK:STDOUT: %tuple.elem1: %struct_type.x.y.a89 = tuple_access %x.ref, element1
  1295. // CHECK:STDOUT: %.loc207_9.1: %SelfNestedBadParam = struct_access %tuple.elem1, element0
  1296. // CHECK:STDOUT: %.loc207_9.2: %i32 = converted %.loc207_9.1, <error> [concrete = <error>]
  1297. // CHECK:STDOUT: %F.call: init %array_type.a41 = call @impl.6a5.%F.decl.loc219_87.1(<error>) to %.loc207_41
  1298. // CHECK:STDOUT: return %F.call to %return
  1299. // CHECK:STDOUT: }
  1300. // CHECK:STDOUT:
  1301. // CHECK:STDOUT: fn @F.23(%x.param: %tuple.type.eb9) -> %return.param: %array_type.a41;
  1302. // CHECK:STDOUT:
  1303. // CHECK:STDOUT: fn @F.24(%x.param: %tuple.type.eb9) -> %return.param: %array_type.126 {
  1304. // CHECK:STDOUT: !entry:
  1305. // CHECK:STDOUT: %x.ref: %tuple.type.eb9 = name_ref x, %x.param
  1306. // CHECK:STDOUT: %.loc235_112.1: ref %array_type.a41 = temporary_storage
  1307. // CHECK:STDOUT: %F.call: init %array_type.a41 = call @impl.bfc.%F.decl.loc235_112.1(%x.ref) to %.loc235_112.1
  1308. // CHECK:STDOUT: %.loc235_112.2: %array_type.126 = converted %F.call, <error> [concrete = <error>]
  1309. // CHECK:STDOUT: return <error> to %return
  1310. // CHECK:STDOUT: }
  1311. // CHECK:STDOUT:
  1312. // CHECK:STDOUT: specific @F.1(constants.%Self.826) {}
  1313. // CHECK:STDOUT:
  1314. // CHECK:STDOUT: specific @F.1(constants.%I.facet.fa4) {}
  1315. // CHECK:STDOUT:
  1316. // CHECK:STDOUT: specific @F.1(constants.%I.facet.ee5) {}
  1317. // CHECK:STDOUT:
  1318. // CHECK:STDOUT: specific @F.1(constants.%I.facet.d5c) {}
  1319. // CHECK:STDOUT:
  1320. // CHECK:STDOUT: specific @F.7(constants.%Self.ccd) {}
  1321. // CHECK:STDOUT:
  1322. // CHECK:STDOUT: specific @F.7(constants.%J.facet.94c) {}
  1323. // CHECK:STDOUT:
  1324. // CHECK:STDOUT: specific @F.7(constants.%J.facet.e7e) {}
  1325. // CHECK:STDOUT:
  1326. // CHECK:STDOUT: specific @F.7(constants.%J.facet.974) {}
  1327. // CHECK:STDOUT:
  1328. // CHECK:STDOUT: specific @F.7(constants.%J.facet.37e) {}
  1329. // CHECK:STDOUT:
  1330. // CHECK:STDOUT: specific @F.7(constants.%J.facet.bf1) {}
  1331. // CHECK:STDOUT:
  1332. // CHECK:STDOUT: specific @F.7(constants.%J.facet.67f) {}
  1333. // CHECK:STDOUT:
  1334. // CHECK:STDOUT: specific @F.20(constants.%Self.2ff) {
  1335. // CHECK:STDOUT: %Self => constants.%Self.2ff
  1336. // CHECK:STDOUT: %Self.as_type.loc207_16.1 => constants.%Self.as_type.e1e
  1337. // CHECK:STDOUT: %ptr.loc207_16.1 => constants.%ptr.e87
  1338. // CHECK:STDOUT: %struct_type.x.y.loc207_37.1 => constants.%struct_type.x.y.81e
  1339. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.229
  1340. // CHECK:STDOUT: %pattern_type.loc207_8 => constants.%pattern_type.ced
  1341. // CHECK:STDOUT: %array_type.loc207_57.1 => constants.%array_type.873
  1342. // CHECK:STDOUT: %pattern_type.loc207_41 => constants.%pattern_type.c7e
  1343. // CHECK:STDOUT: }
  1344. // CHECK:STDOUT:
  1345. // CHECK:STDOUT: specific @F.20(constants.%SelfNested.facet.608) {
  1346. // CHECK:STDOUT: %Self => constants.%SelfNested.facet.608
  1347. // CHECK:STDOUT: %Self.as_type.loc207_16.1 => constants.%SelfNestedBadParam
  1348. // CHECK:STDOUT: %ptr.loc207_16.1 => constants.%ptr.4cd
  1349. // CHECK:STDOUT: %struct_type.x.y.loc207_37.1 => constants.%struct_type.x.y.a89
  1350. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.9c9
  1351. // CHECK:STDOUT: %pattern_type.loc207_8 => constants.%pattern_type.a5c
  1352. // CHECK:STDOUT: %array_type.loc207_57.1 => constants.%array_type.a41
  1353. // CHECK:STDOUT: %pattern_type.loc207_41 => constants.%pattern_type.1f1
  1354. // CHECK:STDOUT: }
  1355. // CHECK:STDOUT:
  1356. // CHECK:STDOUT: specific @F.20(constants.%SelfNested.facet.766) {
  1357. // CHECK:STDOUT: %Self => constants.%SelfNested.facet.766
  1358. // CHECK:STDOUT: %Self.as_type.loc207_16.1 => constants.%SelfNestedBadReturnType
  1359. // CHECK:STDOUT: %ptr.loc207_16.1 => constants.%ptr.612
  1360. // CHECK:STDOUT: %struct_type.x.y.loc207_37.1 => constants.%struct_type.x.y.ac5
  1361. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.eb9
  1362. // CHECK:STDOUT: %pattern_type.loc207_8 => constants.%pattern_type.23f
  1363. // CHECK:STDOUT: %array_type.loc207_57.1 => constants.%array_type.126
  1364. // CHECK:STDOUT: %pattern_type.loc207_41 => constants.%pattern_type.f56
  1365. // CHECK:STDOUT: }
  1366. // CHECK:STDOUT: