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
1) $ cat a.go b.go
package p
import . "unsafe"
var _ = Pointer(nil)
package p
import . "unsafe"
2) $ gotype a.go b.go
doesn't report an error
3) $ go tool 6g a.go b.go
b.go:3: imported and not used: "unsafe"
Issue: When dot-importing a package, the dot-imported objects are not cloned. But they
are marked when used so that the type-checker can detect that a dot-imported package was
used. Since the objects are shared, once an object from a dot-imported package is used,
that package is used no matter where else it's imported (for instance, it may be shared
via Configuration.Packages in another package).
The text was updated successfully, but these errors were encountered:
Related: since the type-checker sets obj.used flags for objects in other packages, it is
not safe to run two instances of the type-checker in parallel as they race calling
obj.used=true.
The text was updated successfully, but these errors were encountered: