You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for filing this issue @griesemer and Happy New Year to you and @findleyr!
I am currently at 90860e0 and it seems fixed; the result of this compilation using types2 seems to produce the desired result like this
go version devel go1.18-90860e0c31 Sat Jan 8 00:24:25 2022 +0000 darwin/amd64
package main
import "/foo"
main.go:2:8: could not import /foo (import path cannot be absolute path)
main.go:2:8: imported and not used: "/foo"
We're getting the correct could not import error with the compiler, but we shouldn't get an imported and not used error (after all it couldn't be imported in the first place). This still needs to be addressed but it's not crucial for 1.18. Moving to 1.19.
Also, `types2) (stand-alone) reports:
check_test.go:159: testdata/manual.go2:10:8: could not import /foo (can't find import: "/foo")
check_test.go:159: testdata/manual.go2:10:8: "/foo" imported but not used
griesemer
changed the title
go/types, types2: "import path cannot be absolute path" error not reported
go/types, types2: errors for absolute import path don't match (old) compiler, and are inconsistent with the compiler
Jan 8, 2022
For
the compiler reports:
Both
go/types
andtypes2
report:Generally, should review all import path errors.
cc: @findleyr
The text was updated successfully, but these errors were encountered: