b55695cb397c83a01e77b4979eadc71307bf5bb5 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. compilation_unit {
  2. package_statement {
  3. package_name: "ExplorerTest"
  4. }
  5. is_api: true
  6. declarations {
  7. interface {
  8. name {
  9. name: "HasFoo"
  10. }
  11. members {
  12. function {
  13. name {
  14. name: "Foo"
  15. }
  16. param_pattern {
  17. }
  18. return_term {
  19. kind: Omitted
  20. }
  21. }
  22. }
  23. }
  24. }
  25. declarations {
  26. constraint {
  27. name {
  28. name: "ImplAsHasFoo"
  29. }
  30. members {
  31. interface_impl {
  32. impl_type {
  33. identifier {
  34. name: "Self"
  35. }
  36. }
  37. constraint {
  38. identifier {
  39. name: "HasFoo"
  40. }
  41. }
  42. }
  43. }
  44. }
  45. }
  46. declarations {
  47. function {
  48. name {
  49. name: "CallFoo"
  50. }
  51. deduced_parameters {
  52. name: "T"
  53. type {
  54. identifier {
  55. name: "ImplAsHasFoo"
  56. }
  57. }
  58. }
  59. param_pattern {
  60. fields {
  61. binding_pattern {
  62. name: "x"
  63. type {
  64. expression_pattern {
  65. expression {
  66. identifier {
  67. name: "T"
  68. }
  69. }
  70. }
  71. }
  72. }
  73. }
  74. }
  75. return_term {
  76. kind: Omitted
  77. }
  78. body {
  79. statements {
  80. expression_statement {
  81. expression {
  82. call {
  83. function {
  84. compound_member_access {
  85. object {
  86. identifier {
  87. name: "x"
  88. }
  89. }
  90. path {
  91. simple_member_access {
  92. field: "Foo"
  93. object {
  94. identifier {
  95. name: "HasFoo"
  96. }
  97. }
  98. }
  99. }
  100. }
  101. }
  102. argument {
  103. tuple_literal {
  104. }
  105. }
  106. }
  107. }
  108. }
  109. }
  110. statements {
  111. expression_statement {
  112. expression {
  113. call {
  114. function {
  115. simple_member_access {
  116. field: "Foo"
  117. object {
  118. identifier {
  119. name: "x"
  120. }
  121. }
  122. }
  123. }
  124. argument {
  125. tuple_literal {
  126. }
  127. }
  128. }
  129. }
  130. }
  131. }
  132. }
  133. }
  134. }
  135. declarations {
  136. function {
  137. name {
  138. name: "Main"
  139. }
  140. param_pattern {
  141. }
  142. return_term {
  143. kind: Expression
  144. type {
  145. int_type_literal {
  146. }
  147. }
  148. }
  149. body {
  150. statements {
  151. return_expression_statement {
  152. expression {
  153. int_literal {
  154. value: 0
  155. }
  156. }
  157. }
  158. }
  159. }
  160. }
  161. }
  162. }