81bfc600dcb7e3e016fffe7399b9186b0da24867 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. interface {
  8. name {
  9. name: "A"
  10. }
  11. members {
  12. let {
  13. pattern {
  14. generic_binding {
  15. name: "AResult"
  16. type {
  17. type_type_literal {
  18. }
  19. }
  20. }
  21. }
  22. }
  23. }
  24. }
  25. }
  26. declarations {
  27. interface {
  28. name {
  29. name: "B"
  30. }
  31. members {
  32. let {
  33. pattern {
  34. generic_binding {
  35. name: "BResult"
  36. type {
  37. call {
  38. function {
  39. identifier {
  40. name: "A"
  41. }
  42. }
  43. argument {
  44. tuple_literal {
  45. fields {
  46. identifier {
  47. name: "T"
  48. }
  49. }
  50. }
  51. }
  52. }
  53. }
  54. }
  55. }
  56. }
  57. }
  58. }
  59. }
  60. declarations {
  61. interface {
  62. name {
  63. name: "I"
  64. }
  65. members {
  66. let {
  67. pattern {
  68. generic_binding {
  69. name: "X"
  70. type {
  71. call {
  72. function {
  73. identifier {
  74. name: "B"
  75. }
  76. }
  77. argument {
  78. tuple_literal {
  79. fields {
  80. identifier {
  81. name: "T"
  82. }
  83. }
  84. }
  85. }
  86. }
  87. }
  88. }
  89. }
  90. }
  91. }
  92. members {
  93. let {
  94. pattern {
  95. generic_binding {
  96. name: "Y"
  97. type {
  98. simple_member_access {
  99. field: "AResult"
  100. object {
  101. simple_member_access {
  102. field: "BResult"
  103. object {
  104. identifier {
  105. name: "X"
  106. }
  107. }
  108. }
  109. }
  110. }
  111. }
  112. }
  113. }
  114. }
  115. }
  116. }
  117. }
  118. declarations {
  119. class_declaration {
  120. name {
  121. name: "CA"
  122. }
  123. members {
  124. impl {
  125. kind: InternalImpl
  126. impl_type {
  127. identifier {
  128. name: "Self"
  129. }
  130. }
  131. interface {
  132. where {
  133. base {
  134. call {
  135. function {
  136. identifier {
  137. name: "A"
  138. }
  139. }
  140. argument {
  141. tuple_literal {
  142. fields {
  143. int_type_literal {
  144. }
  145. }
  146. }
  147. }
  148. }
  149. }
  150. clauses {
  151. rewrite {
  152. member_name: "AResult"
  153. replacement {
  154. int_type_literal {
  155. }
  156. }
  157. }
  158. }
  159. }
  160. }
  161. }
  162. }
  163. }
  164. }
  165. declarations {
  166. class_declaration {
  167. name {
  168. name: "CB"
  169. }
  170. members {
  171. impl {
  172. kind: InternalImpl
  173. impl_type {
  174. identifier {
  175. name: "Self"
  176. }
  177. }
  178. interface {
  179. where {
  180. base {
  181. call {
  182. function {
  183. identifier {
  184. name: "B"
  185. }
  186. }
  187. argument {
  188. tuple_literal {
  189. fields {
  190. int_type_literal {
  191. }
  192. }
  193. }
  194. }
  195. }
  196. }
  197. clauses {
  198. rewrite {
  199. member_name: "BResult"
  200. replacement {
  201. identifier {
  202. name: "CA"
  203. }
  204. }
  205. }
  206. }
  207. }
  208. }
  209. }
  210. }
  211. }
  212. }
  213. declarations {
  214. class_declaration {
  215. name {
  216. name: "CI"
  217. }
  218. members {
  219. impl {
  220. kind: InternalImpl
  221. impl_type {
  222. identifier {
  223. name: "Self"
  224. }
  225. }
  226. interface {
  227. where {
  228. base {
  229. call {
  230. function {
  231. identifier {
  232. name: "I"
  233. }
  234. }
  235. argument {
  236. tuple_literal {
  237. fields {
  238. int_type_literal {
  239. }
  240. }
  241. }
  242. }
  243. }
  244. }
  245. clauses {
  246. rewrite {
  247. member_name: "X"
  248. replacement {
  249. identifier {
  250. name: "CB"
  251. }
  252. }
  253. }
  254. }
  255. clauses {
  256. rewrite {
  257. member_name: "Y"
  258. replacement {
  259. int_literal {
  260. value: 5
  261. }
  262. }
  263. }
  264. }
  265. }
  266. }
  267. }
  268. }
  269. }
  270. }
  271. declarations {
  272. function {
  273. name {
  274. name: "Main"
  275. }
  276. param_pattern {
  277. }
  278. return_term {
  279. kind: Expression
  280. type {
  281. int_type_literal {
  282. }
  283. }
  284. }
  285. body {
  286. statements {
  287. variable_definition {
  288. pattern {
  289. binding_pattern {
  290. name: "v"
  291. type {
  292. expression_pattern {
  293. expression {
  294. identifier {
  295. name: "CI"
  296. }
  297. }
  298. }
  299. }
  300. }
  301. }
  302. init {
  303. struct_literal {
  304. }
  305. }
  306. is_returned: false
  307. }
  308. }
  309. statements {
  310. return_expression_statement {
  311. expression {
  312. compound_member_access {
  313. object {
  314. identifier {
  315. name: "v"
  316. }
  317. }
  318. path {
  319. simple_member_access {
  320. field: "Y"
  321. object {
  322. call {
  323. function {
  324. identifier {
  325. name: "I"
  326. }
  327. }
  328. argument {
  329. tuple_literal {
  330. fields {
  331. int_type_literal {
  332. }
  333. }
  334. }
  335. }
  336. }
  337. }
  338. }
  339. }
  340. }
  341. }
  342. }
  343. }
  344. }
  345. }
  346. }
  347. }