fail_no_impl.carbon 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  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. // --- prelude.carbon
  7. package Core api;
  8. interface Negate {
  9. fn Op[self: Self]();
  10. }
  11. interface Add {
  12. fn Op[self: Self](other: Self) -> Self;
  13. }
  14. interface AddAssign {
  15. fn Op[addr self: Self*](other: Self);
  16. }
  17. interface Inc {
  18. fn Op[addr self: Self*]();
  19. }
  20. // --- fail_no_impl.carbon
  21. package User api;
  22. import Core;
  23. class C {};
  24. fn TestUnary(a: C) -> C {
  25. // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: ERROR: Cannot access member of interface Negate in type C that does not implement that interface.
  26. // CHECK:STDERR: return -a;
  27. // CHECK:STDERR: ^~
  28. // CHECK:STDERR:
  29. return -a;
  30. }
  31. fn TestBinary(a: C, b: C) -> C {
  32. // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: ERROR: Cannot access member of interface Add in type C that does not implement that interface.
  33. // CHECK:STDERR: return a + b;
  34. // CHECK:STDERR: ^~~~~
  35. // CHECK:STDERR:
  36. return a + b;
  37. }
  38. fn TestRef(b: C) {
  39. var a: C = {};
  40. // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:3: ERROR: Cannot access member of interface AddAssign in type C that does not implement that interface.
  41. // CHECK:STDERR: a += b;
  42. // CHECK:STDERR: ^~~~~~
  43. // CHECK:STDERR:
  44. a += b;
  45. // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+3]]:3: ERROR: Cannot access member of interface Inc in type C that does not implement that interface.
  46. // CHECK:STDERR: ++a;
  47. // CHECK:STDERR: ^~~
  48. ++a;
  49. }
  50. // CHECK:STDOUT: --- prelude.carbon
  51. // CHECK:STDOUT:
  52. // CHECK:STDOUT: constants {
  53. // CHECK:STDOUT: %.1: type = interface_type @Negate [template]
  54. // CHECK:STDOUT: %.2: type = assoc_entity_type @Negate, <function> [template]
  55. // CHECK:STDOUT: %.3: <associated <function> in Negate> = assoc_entity element0, @Negate.%Op [template]
  56. // CHECK:STDOUT: %.4: type = interface_type @Add [template]
  57. // CHECK:STDOUT: %.5: type = assoc_entity_type @Add, <function> [template]
  58. // CHECK:STDOUT: %.6: <associated <function> in Add> = assoc_entity element0, @Add.%Op [template]
  59. // CHECK:STDOUT: %.7: type = interface_type @AddAssign [template]
  60. // CHECK:STDOUT: %.8: type = ptr_type Self [symbolic]
  61. // CHECK:STDOUT: %.9: type = assoc_entity_type @AddAssign, <function> [template]
  62. // CHECK:STDOUT: %.10: <associated <function> in AddAssign> = assoc_entity element0, @AddAssign.%Op [template]
  63. // CHECK:STDOUT: %.11: type = interface_type @Inc [template]
  64. // CHECK:STDOUT: %.12: type = ptr_type Self [symbolic]
  65. // CHECK:STDOUT: %.13: type = assoc_entity_type @Inc, <function> [template]
  66. // CHECK:STDOUT: %.14: <associated <function> in Inc> = assoc_entity element0, @Inc.%Op [template]
  67. // CHECK:STDOUT: }
  68. // CHECK:STDOUT:
  69. // CHECK:STDOUT: file {
  70. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  71. // CHECK:STDOUT: .Negate = %Negate.decl
  72. // CHECK:STDOUT: .Add = %Add.decl
  73. // CHECK:STDOUT: .AddAssign = %AddAssign.decl
  74. // CHECK:STDOUT: .Inc = %Inc.decl
  75. // CHECK:STDOUT: }
  76. // CHECK:STDOUT: %Negate.decl: type = interface_decl @Negate [template = constants.%.1] {}
  77. // CHECK:STDOUT: %Add.decl: type = interface_decl @Add [template = constants.%.4] {}
  78. // CHECK:STDOUT: %AddAssign.decl: type = interface_decl @AddAssign [template = constants.%.7] {}
  79. // CHECK:STDOUT: %Inc.decl: type = interface_decl @Inc [template = constants.%.11] {}
  80. // CHECK:STDOUT: }
  81. // CHECK:STDOUT:
  82. // CHECK:STDOUT: interface @Negate {
  83. // CHECK:STDOUT: %Self: Negate = bind_symbolic_name Self [symbolic]
  84. // CHECK:STDOUT: %Op: <function> = fn_decl @Op.1 [template] {
  85. // CHECK:STDOUT: %Self.ref: Negate = name_ref Self, %Self [symbolic = %Self]
  86. // CHECK:STDOUT: %.loc5_15.1: type = facet_type_access %Self.ref [symbolic = %Self]
  87. // CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref, %.loc5_15.1 [symbolic = %Self]
  88. // CHECK:STDOUT: %self.loc5_9.1: Self = param self
  89. // CHECK:STDOUT: %self.loc5_9.2: Self = bind_name self, %self.loc5_9.1
  90. // CHECK:STDOUT: }
  91. // CHECK:STDOUT: %.loc5_22: <associated <function> in Negate> = assoc_entity element0, %Op [template = constants.%.3]
  92. // CHECK:STDOUT:
  93. // CHECK:STDOUT: !members:
  94. // CHECK:STDOUT: .Self = %Self
  95. // CHECK:STDOUT: .Op = %.loc5_22
  96. // CHECK:STDOUT: witness = (%Op)
  97. // CHECK:STDOUT: }
  98. // CHECK:STDOUT:
  99. // CHECK:STDOUT: interface @Add {
  100. // CHECK:STDOUT: %Self: Add = bind_symbolic_name Self [symbolic]
  101. // CHECK:STDOUT: %Op: <function> = fn_decl @Op.2 [template] {
  102. // CHECK:STDOUT: %Self.ref.loc8_15: Add = name_ref Self, %Self [symbolic = %Self]
  103. // CHECK:STDOUT: %.loc8_15.1: type = facet_type_access %Self.ref.loc8_15 [symbolic = %Self]
  104. // CHECK:STDOUT: %.loc8_15.2: type = converted %Self.ref.loc8_15, %.loc8_15.1 [symbolic = %Self]
  105. // CHECK:STDOUT: %self.loc8_9.1: Self = param self
  106. // CHECK:STDOUT: %self.loc8_9.2: Self = bind_name self, %self.loc8_9.1
  107. // CHECK:STDOUT: %Self.ref.loc8_28: Add = name_ref Self, %Self [symbolic = %Self]
  108. // CHECK:STDOUT: %.loc8_28.1: type = facet_type_access %Self.ref.loc8_28 [symbolic = %Self]
  109. // CHECK:STDOUT: %.loc8_28.2: type = converted %Self.ref.loc8_28, %.loc8_28.1 [symbolic = %Self]
  110. // CHECK:STDOUT: %other.loc8_21.1: Self = param other
  111. // CHECK:STDOUT: %other.loc8_21.2: Self = bind_name other, %other.loc8_21.1
  112. // CHECK:STDOUT: %Self.ref.loc8_37: Add = name_ref Self, %Self [symbolic = %Self]
  113. // CHECK:STDOUT: %.loc8_37.1: type = facet_type_access %Self.ref.loc8_37 [symbolic = %Self]
  114. // CHECK:STDOUT: %.loc8_37.2: type = converted %Self.ref.loc8_37, %.loc8_37.1 [symbolic = %Self]
  115. // CHECK:STDOUT: %return.var: ref Self = var <return slot>
  116. // CHECK:STDOUT: }
  117. // CHECK:STDOUT: %.loc8_41: <associated <function> in Add> = assoc_entity element0, %Op [template = constants.%.6]
  118. // CHECK:STDOUT:
  119. // CHECK:STDOUT: !members:
  120. // CHECK:STDOUT: .Self = %Self
  121. // CHECK:STDOUT: .Op = %.loc8_41
  122. // CHECK:STDOUT: witness = (%Op)
  123. // CHECK:STDOUT: }
  124. // CHECK:STDOUT:
  125. // CHECK:STDOUT: interface @AddAssign {
  126. // CHECK:STDOUT: %Self: AddAssign = bind_symbolic_name Self [symbolic]
  127. // CHECK:STDOUT: %Op: <function> = fn_decl @Op.3 [template] {
  128. // CHECK:STDOUT: %Self.ref.loc11_20: AddAssign = name_ref Self, %Self [symbolic = %Self]
  129. // CHECK:STDOUT: %.loc11_24.1: type = facet_type_access %Self.ref.loc11_20 [symbolic = %Self]
  130. // CHECK:STDOUT: %.loc11_20: type = converted %Self.ref.loc11_20, %.loc11_24.1 [symbolic = %Self]
  131. // CHECK:STDOUT: %.loc11_24.2: type = ptr_type Self [symbolic = constants.%.8]
  132. // CHECK:STDOUT: %self.loc11_14.1: Self* = param self
  133. // CHECK:STDOUT: %self.loc11_14.3: Self* = bind_name self, %self.loc11_14.1
  134. // CHECK:STDOUT: %.loc11_9: Self* = addr_pattern %self.loc11_14.3
  135. // CHECK:STDOUT: %Self.ref.loc11_34: AddAssign = name_ref Self, %Self [symbolic = %Self]
  136. // CHECK:STDOUT: %.loc11_34.1: type = facet_type_access %Self.ref.loc11_34 [symbolic = %Self]
  137. // CHECK:STDOUT: %.loc11_34.2: type = converted %Self.ref.loc11_34, %.loc11_34.1 [symbolic = %Self]
  138. // CHECK:STDOUT: %other.loc11_27.1: Self = param other
  139. // CHECK:STDOUT: %other.loc11_27.2: Self = bind_name other, %other.loc11_27.1
  140. // CHECK:STDOUT: }
  141. // CHECK:STDOUT: %.loc11_39: <associated <function> in AddAssign> = assoc_entity element0, %Op [template = constants.%.10]
  142. // CHECK:STDOUT:
  143. // CHECK:STDOUT: !members:
  144. // CHECK:STDOUT: .Self = %Self
  145. // CHECK:STDOUT: .Op = %.loc11_39
  146. // CHECK:STDOUT: witness = (%Op)
  147. // CHECK:STDOUT: }
  148. // CHECK:STDOUT:
  149. // CHECK:STDOUT: interface @Inc {
  150. // CHECK:STDOUT: %Self: Inc = bind_symbolic_name Self [symbolic]
  151. // CHECK:STDOUT: %Op: <function> = fn_decl @Op.4 [template] {
  152. // CHECK:STDOUT: %Self.ref: Inc = name_ref Self, %Self [symbolic = %Self]
  153. // CHECK:STDOUT: %.loc14_24.1: type = facet_type_access %Self.ref [symbolic = %Self]
  154. // CHECK:STDOUT: %.loc14_20: type = converted %Self.ref, %.loc14_24.1 [symbolic = %Self]
  155. // CHECK:STDOUT: %.loc14_24.2: type = ptr_type Self [symbolic = constants.%.12]
  156. // CHECK:STDOUT: %self.loc14_14.1: Self* = param self
  157. // CHECK:STDOUT: %self.loc14_14.3: Self* = bind_name self, %self.loc14_14.1
  158. // CHECK:STDOUT: %.loc14_9: Self* = addr_pattern %self.loc14_14.3
  159. // CHECK:STDOUT: }
  160. // CHECK:STDOUT: %.loc14_28: <associated <function> in Inc> = assoc_entity element0, %Op [template = constants.%.14]
  161. // CHECK:STDOUT:
  162. // CHECK:STDOUT: !members:
  163. // CHECK:STDOUT: .Self = %Self
  164. // CHECK:STDOUT: .Op = %.loc14_28
  165. // CHECK:STDOUT: witness = (%Op)
  166. // CHECK:STDOUT: }
  167. // CHECK:STDOUT:
  168. // CHECK:STDOUT: fn @Op.1[@Negate.%self.loc5_9.2: Self]();
  169. // CHECK:STDOUT:
  170. // CHECK:STDOUT: fn @Op.2[@Add.%self.loc8_9.2: Self](@Add.%other.loc8_21.2: Self) -> Self;
  171. // CHECK:STDOUT:
  172. // CHECK:STDOUT: fn @Op.3[addr @AddAssign.%self.loc11_14.3: Self*](@AddAssign.%other.loc11_27.2: Self);
  173. // CHECK:STDOUT:
  174. // CHECK:STDOUT: fn @Op.4[addr @Inc.%self.loc14_14.3: Self*]();
  175. // CHECK:STDOUT:
  176. // CHECK:STDOUT: --- fail_no_impl.carbon
  177. // CHECK:STDOUT:
  178. // CHECK:STDOUT: constants {
  179. // CHECK:STDOUT: %C: type = class_type @C [template]
  180. // CHECK:STDOUT: %.1: type = struct_type {} [template]
  181. // CHECK:STDOUT: %.2: type = tuple_type () [template]
  182. // CHECK:STDOUT: %.3: type = ptr_type {} [template]
  183. // CHECK:STDOUT: %.4: type = interface_type @Negate [template]
  184. // CHECK:STDOUT: %.5: type = assoc_entity_type @Negate, <function> [template]
  185. // CHECK:STDOUT: %.6: <associated <function> in Negate> = assoc_entity element0, file.%import_ref.5 [template]
  186. // CHECK:STDOUT: %.7: type = interface_type @Add [template]
  187. // CHECK:STDOUT: %.8: type = assoc_entity_type @Add, <function> [template]
  188. // CHECK:STDOUT: %.9: <associated <function> in Add> = assoc_entity element0, file.%import_ref.10 [template]
  189. // CHECK:STDOUT: %.10: C = struct_value () [template]
  190. // CHECK:STDOUT: %.11: type = interface_type @AddAssign [template]
  191. // CHECK:STDOUT: %.12: type = assoc_entity_type @AddAssign, <function> [template]
  192. // CHECK:STDOUT: %.13: <associated <function> in AddAssign> = assoc_entity element0, file.%import_ref.15 [template]
  193. // CHECK:STDOUT: %.14: type = interface_type @Inc [template]
  194. // CHECK:STDOUT: %.15: type = assoc_entity_type @Inc, <function> [template]
  195. // CHECK:STDOUT: %.16: <associated <function> in Inc> = assoc_entity element0, file.%import_ref.20 [template]
  196. // CHECK:STDOUT: }
  197. // CHECK:STDOUT:
  198. // CHECK:STDOUT: file {
  199. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  200. // CHECK:STDOUT: .Core = %Core
  201. // CHECK:STDOUT: .C = %C.decl
  202. // CHECK:STDOUT: .TestUnary = %TestUnary
  203. // CHECK:STDOUT: .TestBinary = %TestBinary
  204. // CHECK:STDOUT: .TestRef = %TestRef
  205. // CHECK:STDOUT: }
  206. // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
  207. // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
  208. // CHECK:STDOUT: %TestUnary: <function> = fn_decl @TestUnary [template] {
  209. // CHECK:STDOUT: %C.ref.loc8_17: type = name_ref C, %C.decl [template = constants.%C]
  210. // CHECK:STDOUT: %a.loc8_14.1: C = param a
  211. // CHECK:STDOUT: @TestUnary.%a: C = bind_name a, %a.loc8_14.1
  212. // CHECK:STDOUT: %C.ref.loc8_23: type = name_ref C, %C.decl [template = constants.%C]
  213. // CHECK:STDOUT: @TestUnary.%return: ref C = var <return slot>
  214. // CHECK:STDOUT: }
  215. // CHECK:STDOUT: %import_ref.1: type = import_ref ir1, inst+1, used [template = constants.%.4]
  216. // CHECK:STDOUT: %import_ref.2: <associated <function> in Negate> = import_ref ir1, inst+11, used [template = constants.%.6]
  217. // CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+3, unused
  218. // CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+9, unused
  219. // CHECK:STDOUT: %import_ref.5 = import_ref ir1, inst+9, unused
  220. // CHECK:STDOUT: %TestBinary: <function> = fn_decl @TestBinary [template] {
  221. // CHECK:STDOUT: %C.ref.loc16_18: type = name_ref C, %C.decl [template = constants.%C]
  222. // CHECK:STDOUT: %a.loc16_15.1: C = param a
  223. // CHECK:STDOUT: @TestBinary.%a: C = bind_name a, %a.loc16_15.1
  224. // CHECK:STDOUT: %C.ref.loc16_24: type = name_ref C, %C.decl [template = constants.%C]
  225. // CHECK:STDOUT: %b.loc16_21.1: C = param b
  226. // CHECK:STDOUT: @TestBinary.%b: C = bind_name b, %b.loc16_21.1
  227. // CHECK:STDOUT: %C.ref.loc16_30: type = name_ref C, %C.decl [template = constants.%C]
  228. // CHECK:STDOUT: @TestBinary.%return: ref C = var <return slot>
  229. // CHECK:STDOUT: }
  230. // CHECK:STDOUT: %import_ref.6: type = import_ref ir1, inst+13, used [template = constants.%.7]
  231. // CHECK:STDOUT: %import_ref.7: <associated <function> in Add> = import_ref ir1, inst+32, used [template = constants.%.9]
  232. // CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+15, unused
  233. // CHECK:STDOUT: %import_ref.9 = import_ref ir1, inst+30, unused
  234. // CHECK:STDOUT: %import_ref.10 = import_ref ir1, inst+30, unused
  235. // CHECK:STDOUT: %TestRef: <function> = fn_decl @TestRef [template] {
  236. // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, %C.decl [template = constants.%C]
  237. // CHECK:STDOUT: %b.loc24_12.1: C = param b
  238. // CHECK:STDOUT: @TestRef.%b: C = bind_name b, %b.loc24_12.1
  239. // CHECK:STDOUT: }
  240. // CHECK:STDOUT: %import_ref.11: type = import_ref ir1, inst+34, used [template = constants.%.11]
  241. // CHECK:STDOUT: %import_ref.12: <associated <function> in AddAssign> = import_ref ir1, inst+52, used [template = constants.%.13]
  242. // CHECK:STDOUT: %import_ref.13 = import_ref ir1, inst+36, unused
  243. // CHECK:STDOUT: %import_ref.14 = import_ref ir1, inst+50, unused
  244. // CHECK:STDOUT: %import_ref.15 = import_ref ir1, inst+50, unused
  245. // CHECK:STDOUT: %import_ref.16: type = import_ref ir1, inst+54, used [template = constants.%.14]
  246. // CHECK:STDOUT: %import_ref.17: <associated <function> in Inc> = import_ref ir1, inst+67, used [template = constants.%.16]
  247. // CHECK:STDOUT: %import_ref.18 = import_ref ir1, inst+56, unused
  248. // CHECK:STDOUT: %import_ref.19 = import_ref ir1, inst+65, unused
  249. // CHECK:STDOUT: %import_ref.20 = import_ref ir1, inst+65, unused
  250. // CHECK:STDOUT: }
  251. // CHECK:STDOUT:
  252. // CHECK:STDOUT: interface @Negate {
  253. // CHECK:STDOUT: !members:
  254. // CHECK:STDOUT: .Op = file.%import_ref.2
  255. // CHECK:STDOUT: .Self = file.%import_ref.3
  256. // CHECK:STDOUT: witness = (file.%import_ref.4)
  257. // CHECK:STDOUT: }
  258. // CHECK:STDOUT:
  259. // CHECK:STDOUT: interface @Add {
  260. // CHECK:STDOUT: !members:
  261. // CHECK:STDOUT: .Op = file.%import_ref.7
  262. // CHECK:STDOUT: .Self = file.%import_ref.8
  263. // CHECK:STDOUT: witness = (file.%import_ref.9)
  264. // CHECK:STDOUT: }
  265. // CHECK:STDOUT:
  266. // CHECK:STDOUT: interface @AddAssign {
  267. // CHECK:STDOUT: !members:
  268. // CHECK:STDOUT: .Op = file.%import_ref.12
  269. // CHECK:STDOUT: .Self = file.%import_ref.13
  270. // CHECK:STDOUT: witness = (file.%import_ref.14)
  271. // CHECK:STDOUT: }
  272. // CHECK:STDOUT:
  273. // CHECK:STDOUT: interface @Inc {
  274. // CHECK:STDOUT: !members:
  275. // CHECK:STDOUT: .Op = file.%import_ref.17
  276. // CHECK:STDOUT: .Self = file.%import_ref.18
  277. // CHECK:STDOUT: witness = (file.%import_ref.19)
  278. // CHECK:STDOUT: }
  279. // CHECK:STDOUT:
  280. // CHECK:STDOUT: class @C {
  281. // CHECK:STDOUT: !members:
  282. // CHECK:STDOUT: .Self = constants.%C
  283. // CHECK:STDOUT: }
  284. // CHECK:STDOUT:
  285. // CHECK:STDOUT: fn @TestUnary(%a: C) -> %return: C {
  286. // CHECK:STDOUT: !entry:
  287. // CHECK:STDOUT: %a.ref: C = name_ref a, %a
  288. // CHECK:STDOUT: %Negate.decl: invalid = interface_decl @Negate [template = constants.%.4] {}
  289. // CHECK:STDOUT: return <error>
  290. // CHECK:STDOUT: }
  291. // CHECK:STDOUT:
  292. // CHECK:STDOUT: fn @TestBinary(%a: C, %b: C) -> %return: C {
  293. // CHECK:STDOUT: !entry:
  294. // CHECK:STDOUT: %a.ref: C = name_ref a, %a
  295. // CHECK:STDOUT: %b.ref: C = name_ref b, %b
  296. // CHECK:STDOUT: %Add.decl: invalid = interface_decl @Add [template = constants.%.7] {}
  297. // CHECK:STDOUT: return <error>
  298. // CHECK:STDOUT: }
  299. // CHECK:STDOUT:
  300. // CHECK:STDOUT: fn @TestRef(%b: C) {
  301. // CHECK:STDOUT: !entry:
  302. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
  303. // CHECK:STDOUT: %a.var: ref C = var a
  304. // CHECK:STDOUT: %a: ref C = bind_name a, %a.var
  305. // CHECK:STDOUT: %.loc25_15.1: {} = struct_literal ()
  306. // CHECK:STDOUT: %.loc25_15.2: init C = class_init (), %a.var [template = constants.%.10]
  307. // CHECK:STDOUT: %.loc25_15.3: init C = converted %.loc25_15.1, %.loc25_15.2 [template = constants.%.10]
  308. // CHECK:STDOUT: assign %a.var, %.loc25_15.3
  309. // CHECK:STDOUT: %a.ref.loc30: ref C = name_ref a, %a
  310. // CHECK:STDOUT: %b.ref: C = name_ref b, %b
  311. // CHECK:STDOUT: %AddAssign.decl: invalid = interface_decl @AddAssign [template = constants.%.11] {}
  312. // CHECK:STDOUT: %a.ref.loc34: ref C = name_ref a, %a
  313. // CHECK:STDOUT: %Inc.decl: invalid = interface_decl @Inc [template = constants.%.14] {}
  314. // CHECK:STDOUT: return
  315. // CHECK:STDOUT: }
  316. // CHECK:STDOUT: