]> Cypherpunks repositories - gostls13.git/commitdiff
go/importer: make For("gccgo", nil) not panic
authorAlan Donovan <adonovan@google.com>
Mon, 11 Apr 2016 22:39:46 +0000 (18:39 -0400)
committerAlan Donovan <adonovan@google.com>
Tue, 12 Apr 2016 00:11:32 +0000 (00:11 +0000)
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>
src/go/importer/importer.go

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