This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gofrontend-dev] [PATCH 1/2, libgo] Add support for missing reflection functions to gccgo for ppc64, ppc64le in gcc 4.9


Not sure I would call it "easy" but I was able to reproduce the problem and then get it to work with this, at least in my testcase:

  f := func(a ...string) error {
switch t := mv.CallSlice([]reflect.Value{reflect.ValueOf(a)})[0].Interface().(type) {
                        case error:
                                return t
                        default:
                                return nil
                        }
                }

On 02/06/2015 05:05 PM, Ian Lance Taylor wrote:
On Fri, Feb 6, 2015 at 12:36 PM, Lynn A. Boger
<laboger@linux.vnet.ibm.com> wrote:
I was told by the testers that this patch did not work.  The error message
was:

panic: interface conversion: interface is nil, not error

goroutine 1 [running]:
client.$nested1
     /home/ubuntu/docker.mainline/src/github.com/docker/docker/api/
client/cli.go:66

github_com_docker_docker_api_client.Cmd.pN45_github_com_docker_docker_api_client.DockerCli
     /home/ubuntu/docker.mainline/src/github.com/docker/docker/api/
client/cli.go:84
main.main
     /home/ubuntu/docker/docker/docker.go:126

That's easy to fix....

Ian




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]