bcc2dd95b1484870236d97145082f091d04420e8 3.8 KB

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