env GO111MODULE=on
[!symlink] skip

symlink dir.go -> dir

# Issue #39841: symlinks to directories should be ignored, not treated as source files.
go list -f '{{range .GoFiles}}{{.}}{{"\n"}}{{end}}' .
stdout 'p\.go$'
! stdout 'dir\.go$'

-- go.mod --
module example.com
go 1.15
-- p.go --
package p
-- dir/README.txt --
This file exists to ensure that dir is a directory.
