| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347 |
- compilation_unit {
- package_statement {
- package_name: "ExplorerTest"
- }
- is_api: true
- declarations {
- interface {
- name {
- name: "A"
- }
- members {
- let {
- pattern {
- generic_binding {
- name: "AResult"
- type {
- type_type_literal {
- }
- }
- }
- }
- }
- }
- }
- }
- declarations {
- interface {
- name {
- name: "B"
- }
- members {
- let {
- pattern {
- generic_binding {
- name: "BResult"
- type {
- call {
- function {
- identifier {
- name: "A"
- }
- }
- argument {
- tuple_literal {
- fields {
- identifier {
- name: "T"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- declarations {
- interface {
- name {
- name: "I"
- }
- members {
- let {
- pattern {
- generic_binding {
- name: "X"
- type {
- call {
- function {
- identifier {
- name: "B"
- }
- }
- argument {
- tuple_literal {
- fields {
- identifier {
- name: "T"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- members {
- let {
- pattern {
- generic_binding {
- name: "Y"
- type {
- simple_member_access {
- field: "AResult"
- object {
- simple_member_access {
- field: "BResult"
- object {
- identifier {
- name: "X"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- declarations {
- class_declaration {
- name {
- name: "CA"
- }
- members {
- impl {
- kind: InternalImpl
- impl_type {
- identifier {
- name: "Self"
- }
- }
- interface {
- where {
- base {
- call {
- function {
- identifier {
- name: "A"
- }
- }
- argument {
- tuple_literal {
- fields {
- int_type_literal {
- }
- }
- }
- }
- }
- }
- clauses {
- rewrite {
- member_name: "AResult"
- replacement {
- int_type_literal {
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- declarations {
- class_declaration {
- name {
- name: "CB"
- }
- members {
- impl {
- kind: InternalImpl
- impl_type {
- identifier {
- name: "Self"
- }
- }
- interface {
- where {
- base {
- call {
- function {
- identifier {
- name: "B"
- }
- }
- argument {
- tuple_literal {
- fields {
- int_type_literal {
- }
- }
- }
- }
- }
- }
- clauses {
- rewrite {
- member_name: "BResult"
- replacement {
- identifier {
- name: "CA"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- declarations {
- class_declaration {
- name {
- name: "CI"
- }
- members {
- impl {
- kind: InternalImpl
- impl_type {
- identifier {
- name: "Self"
- }
- }
- interface {
- where {
- base {
- call {
- function {
- identifier {
- name: "I"
- }
- }
- argument {
- tuple_literal {
- fields {
- int_type_literal {
- }
- }
- }
- }
- }
- }
- clauses {
- rewrite {
- member_name: "X"
- replacement {
- identifier {
- name: "CB"
- }
- }
- }
- }
- clauses {
- rewrite {
- member_name: "Y"
- replacement {
- int_literal {
- value: 5
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- declarations {
- function {
- name {
- name: "Main"
- }
- param_pattern {
- }
- return_term {
- kind: Expression
- type {
- int_type_literal {
- }
- }
- }
- body {
- statements {
- variable_definition {
- pattern {
- binding_pattern {
- name: "v"
- type {
- expression_pattern {
- expression {
- identifier {
- name: "CI"
- }
- }
- }
- }
- }
- }
- init {
- struct_literal {
- }
- }
- is_returned: false
- }
- }
- statements {
- return_expression_statement {
- expression {
- compound_member_access {
- object {
- identifier {
- name: "v"
- }
- }
- path {
- simple_member_access {
- field: "Y"
- object {
- call {
- function {
- identifier {
- name: "I"
- }
- }
- argument {
- tuple_literal {
- fields {
- int_type_literal {
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
|