empty_generic.carbon 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/named_constraint/empty_generic.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/named_constraint/empty_generic.carbon
  12. interface Z {}
  13. //@dump-sem-ir-begin
  14. constraint Empty(T:! type) {}
  15. fn F(T:! type, unused U:! Empty(T)) {}
  16. fn G(T:! Z, U:! Empty(T), V:! type) {
  17. F(T, {} as type);
  18. F(T, type);
  19. F(T, T);
  20. F(T, U);
  21. F(T, V);
  22. }
  23. //@dump-sem-ir-end
  24. // CHECK:STDOUT: --- empty_generic.carbon
  25. // CHECK:STDOUT:
  26. // CHECK:STDOUT: constants {
  27. // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
  28. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  29. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  30. // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
  31. // CHECK:STDOUT: %Empty.type.19a: type = generic_named_constaint_type @Empty [concrete]
  32. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  33. // CHECK:STDOUT: %empty_struct.019: %Empty.type.19a = struct_value () [concrete]
  34. // CHECK:STDOUT: %Empty.type.d682d6.1: type = facet_type <@Empty, @Empty(%T.67d)> [symbolic]
  35. // CHECK:STDOUT: %Self.31c17c.1: %Empty.type.d682d6.1 = symbolic_binding Self, 1 [symbolic]
  36. // CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type %Empty.type.d682d6.1 [symbolic]
  37. // CHECK:STDOUT: %U.e1f642.1: %Empty.type.d682d6.1 = symbolic_binding U, 1 [symbolic]
  38. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  39. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  40. // CHECK:STDOUT: %pattern_type.22b: type = pattern_type %Z.type [concrete]
  41. // CHECK:STDOUT: %T.ea3: %Z.type = symbolic_binding T, 0 [symbolic]
  42. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ea3 [symbolic]
  43. // CHECK:STDOUT: %Empty.type.d682d6.2: type = facet_type <@Empty, @Empty(%T.as_type)> [symbolic]
  44. // CHECK:STDOUT: %pattern_type.9a587c.2: type = pattern_type %Empty.type.d682d6.2 [symbolic]
  45. // CHECK:STDOUT: %U.e1f642.2: %Empty.type.d682d6.2 = symbolic_binding U, 1 [symbolic]
  46. // CHECK:STDOUT: %V: type = symbolic_binding V, 2 [symbolic]
  47. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  48. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  49. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  50. // CHECK:STDOUT: %empty_struct.a40: %empty_struct_type = struct_value () [concrete]
  51. // CHECK:STDOUT: %empty_struct.type.facet: %type = facet_value %empty_struct_type, () [concrete]
  52. // CHECK:STDOUT: %Empty.facet.76f: %Empty.type.d682d6.2 = facet_value %empty_struct_type, () [symbolic]
  53. // CHECK:STDOUT: %F.specific_fn.b60: <specific function> = specific_function %F, @F(%T.as_type, %Empty.facet.76f) [symbolic]
  54. // CHECK:STDOUT: %facet_value.2cb: %type = facet_value type, () [concrete]
  55. // CHECK:STDOUT: %Empty.facet.2cb: %Empty.type.d682d6.2 = facet_value type, () [symbolic]
  56. // CHECK:STDOUT: %F.specific_fn.992: <specific function> = specific_function %F, @F(%T.as_type, %Empty.facet.2cb) [symbolic]
  57. // CHECK:STDOUT: %Empty.facet.826: %Empty.type.d682d6.2 = facet_value %T.as_type, () [symbolic]
  58. // CHECK:STDOUT: %F.specific_fn.900: <specific function> = specific_function %F, @F(%T.as_type, %Empty.facet.826) [symbolic]
  59. // CHECK:STDOUT: %Self.31c17c.2: %Empty.type.d682d6.2 = symbolic_binding Self, 1 [symbolic]
  60. // CHECK:STDOUT: %F.specific_fn.1fe: <specific function> = specific_function %F, @F(%T.as_type, %U.e1f642.2) [symbolic]
  61. // CHECK:STDOUT: %facet_value.ed5: %type = facet_value %V, () [symbolic]
  62. // CHECK:STDOUT: %Empty.facet.ed5: %Empty.type.d682d6.2 = facet_value %V, () [symbolic]
  63. // CHECK:STDOUT: %F.specific_fn.0b3: <specific function> = specific_function %F, @F(%T.as_type, %Empty.facet.ed5) [symbolic]
  64. // CHECK:STDOUT: }
  65. // CHECK:STDOUT:
  66. // CHECK:STDOUT: file {
  67. // CHECK:STDOUT: %Empty.decl: %Empty.type.19a = constraint_decl @Empty [concrete = constants.%empty_struct.019] {
  68. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  69. // CHECK:STDOUT: } {
  70. // CHECK:STDOUT: %.loc16_22.1: type = splice_block %.loc16_22.2 [concrete = type] {
  71. // CHECK:STDOUT: <elided>
  72. // CHECK:STDOUT: %.loc16_22.2: type = type_literal type [concrete = type]
  73. // CHECK:STDOUT: }
  74. // CHECK:STDOUT: %T.loc16_19.2: type = symbolic_binding T, 0 [symbolic = %T.loc16_19.1 (constants.%T.67d)]
  75. // CHECK:STDOUT: }
  76. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  77. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  78. // CHECK:STDOUT: %U.patt: @F.%pattern_type (%pattern_type.9a587c.1) = symbolic_binding_pattern U, 1 [concrete]
  79. // CHECK:STDOUT: } {
  80. // CHECK:STDOUT: %.loc18_10.1: type = splice_block %.loc18_10.2 [concrete = type] {
  81. // CHECK:STDOUT: <elided>
  82. // CHECK:STDOUT: %.loc18_10.2: type = type_literal type [concrete = type]
  83. // CHECK:STDOUT: }
  84. // CHECK:STDOUT: %T.loc18_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc18_7.1 (constants.%T.67d)]
  85. // CHECK:STDOUT: %.loc18_34: type = splice_block %Empty.type.loc18_34.2 [symbolic = %Empty.type.loc18_34.1 (constants.%Empty.type.d682d6.1)] {
  86. // CHECK:STDOUT: <elided>
  87. // CHECK:STDOUT: %Empty.ref: %Empty.type.19a = name_ref Empty, file.%Empty.decl [concrete = constants.%empty_struct.019]
  88. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc18_7.2 [symbolic = %T.loc18_7.1 (constants.%T.67d)]
  89. // CHECK:STDOUT: %Empty.type.loc18_34.2: type = facet_type <@Empty, @Empty(constants.%T.67d)> [symbolic = %Empty.type.loc18_34.1 (constants.%Empty.type.d682d6.1)]
  90. // CHECK:STDOUT: }
  91. // CHECK:STDOUT: %U.loc18_24.2: @F.%Empty.type.loc18_34.1 (%Empty.type.d682d6.1) = symbolic_binding U, 1 [symbolic = %U.loc18_24.1 (constants.%U.e1f642.1)]
  92. // CHECK:STDOUT: }
  93. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  94. // CHECK:STDOUT: %T.patt: %pattern_type.22b = symbolic_binding_pattern T, 0 [concrete]
  95. // CHECK:STDOUT: %U.patt: @G.%pattern_type (%pattern_type.9a587c.2) = symbolic_binding_pattern U, 1 [concrete]
  96. // CHECK:STDOUT: %V.patt: %pattern_type.98f = symbolic_binding_pattern V, 2 [concrete]
  97. // CHECK:STDOUT: } {
  98. // CHECK:STDOUT: %.loc20_10: type = splice_block %Z.ref [concrete = constants.%Z.type] {
  99. // CHECK:STDOUT: <elided>
  100. // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
  101. // CHECK:STDOUT: }
  102. // CHECK:STDOUT: %T.loc20_7.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc20_7.1 (constants.%T.ea3)]
  103. // CHECK:STDOUT: %.loc20_24.1: type = splice_block %Empty.type.loc20_24.2 [symbolic = %Empty.type.loc20_24.1 (constants.%Empty.type.d682d6.2)] {
  104. // CHECK:STDOUT: <elided>
  105. // CHECK:STDOUT: %Empty.ref: %Empty.type.19a = name_ref Empty, file.%Empty.decl [concrete = constants.%empty_struct.019]
  106. // CHECK:STDOUT: %T.ref.loc20: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.ea3)]
  107. // CHECK:STDOUT: %T.as_type.loc20_24.2: type = facet_access_type %T.ref.loc20 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  108. // CHECK:STDOUT: %.loc20_24.2: type = converted %T.ref.loc20, %T.as_type.loc20_24.2 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  109. // CHECK:STDOUT: %Empty.type.loc20_24.2: type = facet_type <@Empty, @Empty(constants.%T.as_type)> [symbolic = %Empty.type.loc20_24.1 (constants.%Empty.type.d682d6.2)]
  110. // CHECK:STDOUT: }
  111. // CHECK:STDOUT: %U.loc20_14.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = symbolic_binding U, 1 [symbolic = %U.loc20_14.1 (constants.%U.e1f642.2)]
  112. // CHECK:STDOUT: %.loc20_31.1: type = splice_block %.loc20_31.2 [concrete = type] {
  113. // CHECK:STDOUT: <elided>
  114. // CHECK:STDOUT: %.loc20_31.2: type = type_literal type [concrete = type]
  115. // CHECK:STDOUT: }
  116. // CHECK:STDOUT: %V.loc20_28.2: type = symbolic_binding V, 2 [symbolic = %V.loc20_28.1 (constants.%V)]
  117. // CHECK:STDOUT: }
  118. // CHECK:STDOUT: }
  119. // CHECK:STDOUT:
  120. // CHECK:STDOUT: generic constraint @Empty(%T.loc16_19.2: type) {
  121. // CHECK:STDOUT: %T.loc16_19.1: type = symbolic_binding T, 0 [symbolic = %T.loc16_19.1 (constants.%T.67d)]
  122. // CHECK:STDOUT:
  123. // CHECK:STDOUT: !definition:
  124. // CHECK:STDOUT: %Empty.type: type = facet_type <@Empty, @Empty(%T.loc16_19.1)> [symbolic = %Empty.type (constants.%Empty.type.d682d6.1)]
  125. // CHECK:STDOUT: %Self.loc16_28.2: @Empty.%Empty.type (%Empty.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self.loc16_28.2 (constants.%Self.31c17c.1)]
  126. // CHECK:STDOUT:
  127. // CHECK:STDOUT: constraint {
  128. // CHECK:STDOUT: %Self.loc16_28.1: @Empty.%Empty.type (%Empty.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self.loc16_28.2 (constants.%Self.31c17c.1)]
  129. // CHECK:STDOUT: %Empty.WithSelf.decl = constraint_with_self_decl @Empty [concrete]
  130. // CHECK:STDOUT:
  131. // CHECK:STDOUT: !members:
  132. // CHECK:STDOUT: .Self = %Self.loc16_28.1
  133. // CHECK:STDOUT:
  134. // CHECK:STDOUT: !requires:
  135. // CHECK:STDOUT: }
  136. // CHECK:STDOUT: }
  137. // CHECK:STDOUT:
  138. // CHECK:STDOUT: generic fn @F(%T.loc18_7.2: type, %U.loc18_24.2: @F.%Empty.type.loc18_34.1 (%Empty.type.d682d6.1)) {
  139. // CHECK:STDOUT: %T.loc18_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc18_7.1 (constants.%T.67d)]
  140. // CHECK:STDOUT: %Empty.type.loc18_34.1: type = facet_type <@Empty, @Empty(%T.loc18_7.1)> [symbolic = %Empty.type.loc18_34.1 (constants.%Empty.type.d682d6.1)]
  141. // CHECK:STDOUT: %U.loc18_24.1: @F.%Empty.type.loc18_34.1 (%Empty.type.d682d6.1) = symbolic_binding U, 1 [symbolic = %U.loc18_24.1 (constants.%U.e1f642.1)]
  142. // CHECK:STDOUT: %pattern_type: type = pattern_type %Empty.type.loc18_34.1 [symbolic = %pattern_type (constants.%pattern_type.9a587c.1)]
  143. // CHECK:STDOUT:
  144. // CHECK:STDOUT: !definition:
  145. // CHECK:STDOUT:
  146. // CHECK:STDOUT: fn() {
  147. // CHECK:STDOUT: !entry:
  148. // CHECK:STDOUT: return
  149. // CHECK:STDOUT: }
  150. // CHECK:STDOUT: }
  151. // CHECK:STDOUT:
  152. // CHECK:STDOUT: generic fn @G(%T.loc20_7.2: %Z.type, %U.loc20_14.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2), %V.loc20_28.2: type) {
  153. // CHECK:STDOUT: %T.loc20_7.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc20_7.1 (constants.%T.ea3)]
  154. // CHECK:STDOUT: %T.as_type.loc20_24.1: type = facet_access_type %T.loc20_7.1 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  155. // CHECK:STDOUT: %Empty.type.loc20_24.1: type = facet_type <@Empty, @Empty(%T.as_type.loc20_24.1)> [symbolic = %Empty.type.loc20_24.1 (constants.%Empty.type.d682d6.2)]
  156. // CHECK:STDOUT: %U.loc20_14.1: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = symbolic_binding U, 1 [symbolic = %U.loc20_14.1 (constants.%U.e1f642.2)]
  157. // CHECK:STDOUT: %pattern_type: type = pattern_type %Empty.type.loc20_24.1 [symbolic = %pattern_type (constants.%pattern_type.9a587c.2)]
  158. // CHECK:STDOUT: %V.loc20_28.1: type = symbolic_binding V, 2 [symbolic = %V.loc20_28.1 (constants.%V)]
  159. // CHECK:STDOUT:
  160. // CHECK:STDOUT: !definition:
  161. // CHECK:STDOUT: %Empty.facet.loc21_18.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value constants.%empty_struct_type, () [symbolic = %Empty.facet.loc21_18.2 (constants.%Empty.facet.76f)]
  162. // CHECK:STDOUT: %F.specific_fn.loc21_3.2: <specific function> = specific_function constants.%F, @F(%T.as_type.loc20_24.1, %Empty.facet.loc21_18.2) [symbolic = %F.specific_fn.loc21_3.2 (constants.%F.specific_fn.b60)]
  163. // CHECK:STDOUT: %Empty.facet.loc22_12.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value type, () [symbolic = %Empty.facet.loc22_12.2 (constants.%Empty.facet.2cb)]
  164. // CHECK:STDOUT: %F.specific_fn.loc22_3.2: <specific function> = specific_function constants.%F, @F(%T.as_type.loc20_24.1, %Empty.facet.loc22_12.2) [symbolic = %F.specific_fn.loc22_3.2 (constants.%F.specific_fn.992)]
  165. // CHECK:STDOUT: %Empty.facet.loc23_9.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value %T.as_type.loc20_24.1, () [symbolic = %Empty.facet.loc23_9.2 (constants.%Empty.facet.826)]
  166. // CHECK:STDOUT: %F.specific_fn.loc23_3.2: <specific function> = specific_function constants.%F, @F(%T.as_type.loc20_24.1, %Empty.facet.loc23_9.2) [symbolic = %F.specific_fn.loc23_3.2 (constants.%F.specific_fn.900)]
  167. // CHECK:STDOUT: %F.specific_fn.loc24_3.2: <specific function> = specific_function constants.%F, @F(%T.as_type.loc20_24.1, %U.loc20_14.1) [symbolic = %F.specific_fn.loc24_3.2 (constants.%F.specific_fn.1fe)]
  168. // CHECK:STDOUT: %Empty.facet.loc25_9.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value %V.loc20_28.1, () [symbolic = %Empty.facet.loc25_9.2 (constants.%Empty.facet.ed5)]
  169. // CHECK:STDOUT: %F.specific_fn.loc25_3.2: <specific function> = specific_function constants.%F, @F(%T.as_type.loc20_24.1, %Empty.facet.loc25_9.2) [symbolic = %F.specific_fn.loc25_3.2 (constants.%F.specific_fn.0b3)]
  170. // CHECK:STDOUT:
  171. // CHECK:STDOUT: fn() {
  172. // CHECK:STDOUT: !entry:
  173. // CHECK:STDOUT: %F.ref.loc21: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
  174. // CHECK:STDOUT: %T.ref.loc21: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.ea3)]
  175. // CHECK:STDOUT: %.loc21_9: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct.a40]
  176. // CHECK:STDOUT: %.loc21_14: type = type_literal type [concrete = type]
  177. // CHECK:STDOUT: %.loc21_11: type = converted %.loc21_9, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  178. // CHECK:STDOUT: %T.as_type.loc21: type = facet_access_type %T.ref.loc21 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  179. // CHECK:STDOUT: %.loc21_18.1: type = converted %T.ref.loc21, %T.as_type.loc21 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  180. // CHECK:STDOUT: %Empty.facet.loc21_18.1: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value constants.%empty_struct_type, () [symbolic = %Empty.facet.loc21_18.2 (constants.%Empty.facet.76f)]
  181. // CHECK:STDOUT: %.loc21_18.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = converted constants.%empty_struct_type, %Empty.facet.loc21_18.1 [symbolic = %Empty.facet.loc21_18.2 (constants.%Empty.facet.76f)]
  182. // CHECK:STDOUT: %F.specific_fn.loc21_3.1: <specific function> = specific_function %F.ref.loc21, @F(constants.%T.as_type, constants.%Empty.facet.76f) [symbolic = %F.specific_fn.loc21_3.2 (constants.%F.specific_fn.b60)]
  183. // CHECK:STDOUT: %F.call.loc21: init %empty_tuple.type = call %F.specific_fn.loc21_3.1()
  184. // CHECK:STDOUT: %F.ref.loc22: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
  185. // CHECK:STDOUT: %T.ref.loc22: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.ea3)]
  186. // CHECK:STDOUT: %.loc22_8: type = type_literal type [concrete = type]
  187. // CHECK:STDOUT: %T.as_type.loc22: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  188. // CHECK:STDOUT: %.loc22_12.1: type = converted %T.ref.loc22, %T.as_type.loc22 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  189. // CHECK:STDOUT: %Empty.facet.loc22_12.1: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value type, () [symbolic = %Empty.facet.loc22_12.2 (constants.%Empty.facet.2cb)]
  190. // CHECK:STDOUT: %.loc22_12.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = converted type, %Empty.facet.loc22_12.1 [symbolic = %Empty.facet.loc22_12.2 (constants.%Empty.facet.2cb)]
  191. // CHECK:STDOUT: %F.specific_fn.loc22_3.1: <specific function> = specific_function %F.ref.loc22, @F(constants.%T.as_type, constants.%Empty.facet.2cb) [symbolic = %F.specific_fn.loc22_3.2 (constants.%F.specific_fn.992)]
  192. // CHECK:STDOUT: %F.call.loc22: init %empty_tuple.type = call %F.specific_fn.loc22_3.1()
  193. // CHECK:STDOUT: %F.ref.loc23: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
  194. // CHECK:STDOUT: %T.ref.loc23_5: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.ea3)]
  195. // CHECK:STDOUT: %T.ref.loc23_8: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.ea3)]
  196. // CHECK:STDOUT: %T.as_type.loc23_9.1: type = facet_access_type %T.ref.loc23_5 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  197. // CHECK:STDOUT: %.loc23_9.1: type = converted %T.ref.loc23_5, %T.as_type.loc23_9.1 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  198. // CHECK:STDOUT: %T.as_type.loc23_9.2: type = facet_access_type constants.%T.ea3 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  199. // CHECK:STDOUT: %Empty.facet.loc23_9.1: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value %T.as_type.loc23_9.2, () [symbolic = %Empty.facet.loc23_9.2 (constants.%Empty.facet.826)]
  200. // CHECK:STDOUT: %.loc23_9.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = converted constants.%T.ea3, %Empty.facet.loc23_9.1 [symbolic = %Empty.facet.loc23_9.2 (constants.%Empty.facet.826)]
  201. // CHECK:STDOUT: %F.specific_fn.loc23_3.1: <specific function> = specific_function %F.ref.loc23, @F(constants.%T.as_type, constants.%Empty.facet.826) [symbolic = %F.specific_fn.loc23_3.2 (constants.%F.specific_fn.900)]
  202. // CHECK:STDOUT: %F.call.loc23: init %empty_tuple.type = call %F.specific_fn.loc23_3.1()
  203. // CHECK:STDOUT: %F.ref.loc24: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
  204. // CHECK:STDOUT: %T.ref.loc24: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.ea3)]
  205. // CHECK:STDOUT: %U.ref: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = name_ref U, %U.loc20_14.2 [symbolic = %U.loc20_14.1 (constants.%U.e1f642.2)]
  206. // CHECK:STDOUT: %T.as_type.loc24: type = facet_access_type %T.ref.loc24 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  207. // CHECK:STDOUT: %.loc24: type = converted %T.ref.loc24, %T.as_type.loc24 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  208. // CHECK:STDOUT: %F.specific_fn.loc24_3.1: <specific function> = specific_function %F.ref.loc24, @F(constants.%T.as_type, constants.%U.e1f642.2) [symbolic = %F.specific_fn.loc24_3.2 (constants.%F.specific_fn.1fe)]
  209. // CHECK:STDOUT: %F.call.loc24: init %empty_tuple.type = call %F.specific_fn.loc24_3.1()
  210. // CHECK:STDOUT: %F.ref.loc25: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
  211. // CHECK:STDOUT: %T.ref.loc25: %Z.type = name_ref T, %T.loc20_7.2 [symbolic = %T.loc20_7.1 (constants.%T.ea3)]
  212. // CHECK:STDOUT: %V.ref: type = name_ref V, %V.loc20_28.2 [symbolic = %V.loc20_28.1 (constants.%V)]
  213. // CHECK:STDOUT: %T.as_type.loc25: type = facet_access_type %T.ref.loc25 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  214. // CHECK:STDOUT: %.loc25_9.1: type = converted %T.ref.loc25, %T.as_type.loc25 [symbolic = %T.as_type.loc20_24.1 (constants.%T.as_type)]
  215. // CHECK:STDOUT: %Empty.facet.loc25_9.1: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = facet_value constants.%V, () [symbolic = %Empty.facet.loc25_9.2 (constants.%Empty.facet.ed5)]
  216. // CHECK:STDOUT: %.loc25_9.2: @G.%Empty.type.loc20_24.1 (%Empty.type.d682d6.2) = converted constants.%V, %Empty.facet.loc25_9.1 [symbolic = %Empty.facet.loc25_9.2 (constants.%Empty.facet.ed5)]
  217. // CHECK:STDOUT: %F.specific_fn.loc25_3.1: <specific function> = specific_function %F.ref.loc25, @F(constants.%T.as_type, constants.%Empty.facet.ed5) [symbolic = %F.specific_fn.loc25_3.2 (constants.%F.specific_fn.0b3)]
  218. // CHECK:STDOUT: %F.call.loc25: init %empty_tuple.type = call %F.specific_fn.loc25_3.1()
  219. // CHECK:STDOUT: return
  220. // CHECK:STDOUT: }
  221. // CHECK:STDOUT: }
  222. // CHECK:STDOUT:
  223. // CHECK:STDOUT: specific @Empty(constants.%T.67d) {
  224. // CHECK:STDOUT: %T.loc16_19.1 => constants.%T.67d
  225. // CHECK:STDOUT: }
  226. // CHECK:STDOUT:
  227. // CHECK:STDOUT: specific @Empty.WithSelf(constants.%T.67d, constants.%Self.31c17c.1) {}
  228. // CHECK:STDOUT:
  229. // CHECK:STDOUT: specific @F(constants.%T.67d, constants.%U.e1f642.1) {
  230. // CHECK:STDOUT: %T.loc18_7.1 => constants.%T.67d
  231. // CHECK:STDOUT: %Empty.type.loc18_34.1 => constants.%Empty.type.d682d6.1
  232. // CHECK:STDOUT: %U.loc18_24.1 => constants.%U.e1f642.1
  233. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.1
  234. // CHECK:STDOUT: }
  235. // CHECK:STDOUT:
  236. // CHECK:STDOUT: specific @Empty(constants.%T.as_type) {
  237. // CHECK:STDOUT: %T.loc16_19.1 => constants.%T.as_type
  238. // CHECK:STDOUT:
  239. // CHECK:STDOUT: !definition:
  240. // CHECK:STDOUT: %Empty.type => constants.%Empty.type.d682d6.2
  241. // CHECK:STDOUT: %Self.loc16_28.2 => constants.%Self.31c17c.2
  242. // CHECK:STDOUT: }
  243. // CHECK:STDOUT:
  244. // CHECK:STDOUT: specific @G(constants.%T.ea3, constants.%U.e1f642.2, constants.%V) {
  245. // CHECK:STDOUT: %T.loc20_7.1 => constants.%T.ea3
  246. // CHECK:STDOUT: %T.as_type.loc20_24.1 => constants.%T.as_type
  247. // CHECK:STDOUT: %Empty.type.loc20_24.1 => constants.%Empty.type.d682d6.2
  248. // CHECK:STDOUT: %U.loc20_14.1 => constants.%U.e1f642.2
  249. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.2
  250. // CHECK:STDOUT: %V.loc20_28.1 => constants.%V
  251. // CHECK:STDOUT: }
  252. // CHECK:STDOUT:
  253. // CHECK:STDOUT: specific @Empty.WithSelf(constants.%T.as_type, constants.%empty_struct.type.facet) {
  254. // CHECK:STDOUT: !definition:
  255. // CHECK:STDOUT: }
  256. // CHECK:STDOUT:
  257. // CHECK:STDOUT: specific @F(constants.%T.as_type, constants.%Empty.facet.76f) {
  258. // CHECK:STDOUT: %T.loc18_7.1 => constants.%T.as_type
  259. // CHECK:STDOUT: %Empty.type.loc18_34.1 => constants.%Empty.type.d682d6.2
  260. // CHECK:STDOUT: %U.loc18_24.1 => constants.%Empty.facet.76f
  261. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.2
  262. // CHECK:STDOUT:
  263. // CHECK:STDOUT: !definition:
  264. // CHECK:STDOUT: }
  265. // CHECK:STDOUT:
  266. // CHECK:STDOUT: specific @Empty.WithSelf(constants.%T.as_type, constants.%facet_value.2cb) {
  267. // CHECK:STDOUT: !definition:
  268. // CHECK:STDOUT: }
  269. // CHECK:STDOUT:
  270. // CHECK:STDOUT: specific @F(constants.%T.as_type, constants.%Empty.facet.2cb) {
  271. // CHECK:STDOUT: %T.loc18_7.1 => constants.%T.as_type
  272. // CHECK:STDOUT: %Empty.type.loc18_34.1 => constants.%Empty.type.d682d6.2
  273. // CHECK:STDOUT: %U.loc18_24.1 => constants.%Empty.facet.2cb
  274. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.2
  275. // CHECK:STDOUT:
  276. // CHECK:STDOUT: !definition:
  277. // CHECK:STDOUT: }
  278. // CHECK:STDOUT:
  279. // CHECK:STDOUT: specific @Empty.WithSelf(constants.%T.as_type, constants.%T.ea3) {
  280. // CHECK:STDOUT: !definition:
  281. // CHECK:STDOUT: }
  282. // CHECK:STDOUT:
  283. // CHECK:STDOUT: specific @F(constants.%T.as_type, constants.%Empty.facet.826) {
  284. // CHECK:STDOUT: %T.loc18_7.1 => constants.%T.as_type
  285. // CHECK:STDOUT: %Empty.type.loc18_34.1 => constants.%Empty.type.d682d6.2
  286. // CHECK:STDOUT: %U.loc18_24.1 => constants.%Empty.facet.826
  287. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.2
  288. // CHECK:STDOUT:
  289. // CHECK:STDOUT: !definition:
  290. // CHECK:STDOUT: }
  291. // CHECK:STDOUT:
  292. // CHECK:STDOUT: specific @Empty.WithSelf(constants.%T.as_type, constants.%Self.31c17c.1) {
  293. // CHECK:STDOUT: !definition:
  294. // CHECK:STDOUT: }
  295. // CHECK:STDOUT:
  296. // CHECK:STDOUT: specific @F(constants.%T.as_type, constants.%U.e1f642.2) {
  297. // CHECK:STDOUT: %T.loc18_7.1 => constants.%T.as_type
  298. // CHECK:STDOUT: %Empty.type.loc18_34.1 => constants.%Empty.type.d682d6.2
  299. // CHECK:STDOUT: %U.loc18_24.1 => constants.%U.e1f642.2
  300. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.2
  301. // CHECK:STDOUT:
  302. // CHECK:STDOUT: !definition:
  303. // CHECK:STDOUT: }
  304. // CHECK:STDOUT:
  305. // CHECK:STDOUT: specific @Empty.WithSelf(constants.%T.as_type, constants.%facet_value.ed5) {
  306. // CHECK:STDOUT: !definition:
  307. // CHECK:STDOUT: }
  308. // CHECK:STDOUT:
  309. // CHECK:STDOUT: specific @F(constants.%T.as_type, constants.%Empty.facet.ed5) {
  310. // CHECK:STDOUT: %T.loc18_7.1 => constants.%T.as_type
  311. // CHECK:STDOUT: %Empty.type.loc18_34.1 => constants.%Empty.type.d682d6.2
  312. // CHECK:STDOUT: %U.loc18_24.1 => constants.%Empty.facet.ed5
  313. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a587c.2
  314. // CHECK:STDOUT:
  315. // CHECK:STDOUT: !definition:
  316. // CHECK:STDOUT: }
  317. // CHECK:STDOUT: