59f5bff3c89e6ae504001fd40e25570fa68f4816 7.4 KB

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