aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/types2/api.go')
-rw-r--r--src/cmd/compile/internal/types2/api.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/types2/api.go b/src/cmd/compile/internal/types2/api.go
index b2938b84da1..6914e6c89f7 100644
--- a/src/cmd/compile/internal/types2/api.go
+++ b/src/cmd/compile/internal/types2/api.go
@@ -108,6 +108,11 @@ type ImporterFrom interface {
// A Config specifies the configuration for type checking.
// The zero value for Config is a ready-to-use default configuration.
type Config struct {
+ // Environment is the environment used for resolving global
+ // identifiers. If nil, the type checker will initialize this
+ // field with a newly created environment.
+ Environment *Environment
+
// GoVersion describes the accepted Go language version. The string
// must follow the format "go%d.%d" (e.g. "go1.12") or ist must be
// empty; an empty string indicates the latest language version.