We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4515dd commit ed5a15cCopy full SHA for ed5a15c
go/internal/gcimporter/iexport.go
@@ -251,7 +251,10 @@ func (p *iexporter) stringOff(s string) uint64 {
251
// pushDecl adds n to the declaration work queue, if not already present.
252
func (p *iexporter) pushDecl(obj types.Object) {
253
// Package unsafe is known to the compiler and predeclared.
254
- assert(obj.Pkg() != types.Unsafe)
+ // Caller should not ask us to do export it.
255
+ if obj.Pkg() == types.Unsafe {
256
+ panic("cannot export package unsafe")
257
+ }
258
259
if _, ok := p.declIndex[obj]; ok {
260
return
0 commit comments