From: Ian Lance Taylor Date: Tue, 2 Feb 2010 00:26:50 +0000 (-0800) Subject: Fix for gccgo, which uses a package prefix. X-Git-Tag: weekly.2010-02-04~37 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9a65381b77bb7d8e58e8b4a258ec54119b36a720;p=gostls13.git Fix for gccgo, which uses a package prefix. R=rsc CC=golang-dev https://golang.org/cl/198046 --- diff --git a/test/fixedbugs/bug248.dir/bug2.go b/test/fixedbugs/bug248.dir/bug2.go index d562bf6041..4e02b5d9a7 100644 --- a/test/fixedbugs/bug248.dir/bug2.go +++ b/test/fixedbugs/bug248.dir/bug2.go @@ -37,11 +37,11 @@ func main() { // check that reflect paths are correct, // meaning that reflect data for v0, v1 didn't get confused. - // path is full (rooted) path name. check suffix only. - if s := reflect.Typeof(v0).PkgPath(); !strings.HasSuffix(s, "/bug0") { + // path is full (rooted) path name. check suffix for gc, prefix for gccgo + if s := reflect.Typeof(v0).PkgPath(); !strings.HasSuffix(s, "/bug0") && !strings.HasPrefix(s, "bug0") { panicln("bad v0 path", len(s), s) } - if s := reflect.Typeof(v1).PkgPath(); !strings.HasSuffix(s, "/bug1") { + if s := reflect.Typeof(v1).PkgPath(); !strings.HasSuffix(s, "/bug1") && !strings.HasPrefix(s, "bug1") { panicln("bad v1 path", s) }