Files
carbon-lang/explorer/fuzzing/fuzzer_corpus/634aba8b73bb4c4c12485ac91c2b3dcb631358d0
T
Richard Smith 4fa71e32f5 Add support for most kinds of declarations to be declared and used as namespace members (#2575)
Support for global variables is still missing; they're a bit more tricky because they use a pattern to introduce their name.

Prior to this change, explorer heavily relied on name comparisons to determine whether two declarations declare the same entity. Some of those instances are fixed in this PR, but more remain to be fixed, and some TODOs are added for some harder-to-fix instances.
2023-02-08 13:21:15 -08:00

105 lines
1.7 KiB
Plaintext

compilation_unit {
package_statement {
package_name: "ExplorerTest"
}
is_api: true
declarations {
interface {
name {
name: "X"
}
members {
function {
name {
name: "F"
}
param_pattern {
}
return_term {
kind: Expression
type {
type_type_literal {
}
}
}
}
}
}
}
declarations {
function {
name {
name: "G"
}
deduced_parameters {
name: "T"
type {
identifier {
name: "X"
}
}
}
param_pattern {
}
return_term {
kind: Expression
type {
call {
function {
simple_member_access {
field: "F"
object {
identifier {
name: "T"
}
}
}
}
argument {
tuple_literal {
}
}
}
}
}
body {
statements {
return_expression_statement {
expression {
struct_literal {
}
}
}
}
}
}
}
declarations {
function {
name {
name: "Main"
}
param_pattern {
}
return_term {
kind: Expression
type {
int_type_literal {
}
}
}
body {
statements {
return_expression_statement {
expression {
int_literal {
value: 0
}
}
}
}
}
}
}
}