72e14e2a23ba4e07dd8ecac1d2a0f307982e22fd 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. interface {
  8. name {
  9. name: "Has"
  10. }
  11. members {
  12. function {
  13. name {
  14. name: "Get"
  15. }
  16. param_pattern {
  17. }
  18. return_term {
  19. kind: Expression
  20. type {
  21. identifier {
  22. name: "T"
  23. }
  24. }
  25. }
  26. }
  27. }
  28. }
  29. }
  30. declarations {
  31. impl {
  32. kind: InternalImpl
  33. impl_type {
  34. int_type_literal {
  35. }
  36. }
  37. interface {
  38. call {
  39. function {
  40. identifier {
  41. name: "Has"
  42. }
  43. }
  44. argument {
  45. tuple_literal {
  46. fields {
  47. type_type_literal {
  48. }
  49. }
  50. }
  51. }
  52. }
  53. }
  54. members {
  55. function {
  56. name {
  57. name: "Get"
  58. }
  59. param_pattern {
  60. }
  61. return_term {
  62. kind: Expression
  63. type {
  64. type_type_literal {
  65. }
  66. }
  67. }
  68. body {
  69. statements {
  70. return_expression_statement {
  71. expression {
  72. identifier {
  73. name: "Self"
  74. }
  75. }
  76. }
  77. }
  78. }
  79. }
  80. }
  81. }
  82. }
  83. declarations {
  84. class_declaration {
  85. name {
  86. name: "WithType"
  87. }
  88. members {
  89. function {
  90. name {
  91. name: "Get"
  92. }
  93. param_pattern {
  94. }
  95. return_term {
  96. kind: Expression
  97. type {
  98. type_type_literal {
  99. }
  100. }
  101. }
  102. body {
  103. statements {
  104. return_expression_statement {
  105. expression {
  106. call {
  107. function {
  108. simple_member_access {
  109. field: "Get"
  110. object {
  111. identifier {
  112. name: "T"
  113. }
  114. }
  115. }
  116. }
  117. argument {
  118. tuple_literal {
  119. }
  120. }
  121. }
  122. }
  123. }
  124. }
  125. }
  126. }
  127. }
  128. type_params {
  129. fields {
  130. generic_binding {
  131. name: "T"
  132. type {
  133. call {
  134. function {
  135. identifier {
  136. name: "Has"
  137. }
  138. }
  139. argument {
  140. tuple_literal {
  141. fields {
  142. type_type_literal {
  143. }
  144. }
  145. }
  146. }
  147. }
  148. }
  149. }
  150. }
  151. }
  152. }
  153. }
  154. declarations {
  155. function {
  156. name {
  157. name: "Main"
  158. }
  159. param_pattern {
  160. }
  161. return_term {
  162. kind: Expression
  163. type {
  164. int_type_literal {
  165. }
  166. }
  167. }
  168. body {
  169. statements {
  170. variable_definition {
  171. pattern {
  172. binding_pattern {
  173. name: "v"
  174. type {
  175. expression_pattern {
  176. expression {
  177. call {
  178. function {
  179. simple_member_access {
  180. field: "Get"
  181. object {
  182. call {
  183. function {
  184. identifier {
  185. name: "WithType"
  186. }
  187. }
  188. argument {
  189. tuple_literal {
  190. fields {
  191. int_type_literal {
  192. }
  193. }
  194. }
  195. }
  196. }
  197. }
  198. }
  199. }
  200. argument {
  201. tuple_literal {
  202. }
  203. }
  204. }
  205. }
  206. }
  207. }
  208. }
  209. }
  210. init {
  211. int_literal {
  212. value: 0
  213. }
  214. }
  215. is_returned: false
  216. }
  217. }
  218. statements {
  219. return_expression_statement {
  220. expression {
  221. identifier {
  222. name: "v"
  223. }
  224. }
  225. }
  226. }
  227. }
  228. }
  229. }
  230. }