1
0
mirror of https://github.com/golang/go synced 2024-10-04 21:21:22 -06:00

go/importer: make For("gccgo", nil) not panic

Apparently we forgot to test this.

Fixes #15092

Change-Id: I33d4fef0f659dfbdfc1ebf8401e96610c8215592
Reviewed-on: https://go-review.googlesource.com/21860
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Alan Donovan 2016-04-11 18:39:46 -04:00
parent 501ddf7189
commit a119f88f2c

View File

@ -31,7 +31,7 @@ func For(compiler string, lookup Lookup) types.Importer {
return make(gcimports) return make(gcimports)
case "gccgo": case "gccgo":
if lookup == nil { if lookup != nil {
panic("gccgo importer for custom import path lookup not yet implemented") panic("gccgo importer for custom import path lookup not yet implemented")
} }