Skip to content

Commit 161cd84

Browse files
authored
x/typesutil: add Config.IgnoreFuncBodies (#1783)
1 parent 38aec77 commit 161cd84

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

x/typesutil/check.go

+4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ type Config struct {
7979

8080
// Mod represents a Go+ module (optional).
8181
Mod *gopmod.Module
82+
83+
// If IgnoreFuncBodies is set, skip compiling function bodies (optional).
84+
IgnoreFuncBodies bool
8285
}
8386

8487
// A Checker maintains the state of the type checker.
@@ -152,6 +155,7 @@ func (p *Checker) Files(goFiles []*goast.File, gopFiles []*ast.File) (err error)
152155
NoFileLine: true,
153156
NoAutoGenMain: true,
154157
NoSkipConstant: true,
158+
Outline: opts.IgnoreFuncBodies,
155159
})
156160
if err != nil {
157161
if onErr := conf.Error; onErr != nil {

0 commit comments

Comments
 (0)