mirror of
https://github.com/golang/go
synced 2024-09-04 23:44:16 +00:00
cmd/compile: add regress test for #20682
Minimal reconstruction of reported failure case. Manually verified that test fails with CL 45911 reverted. Change-Id: Ia5d11500d91b46ba1eb5d841db3987edb9136c39 Reviewed-on: https://go-review.googlesource.com/45970 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
827be89a69
commit
6e549d2dfd
13
test/fixedbugs/issue20682.dir/p.go
Normal file
13
test/fixedbugs/issue20682.dir/p.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Copyright 2017 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package p
|
||||
|
||||
import "strings"
|
||||
|
||||
type T struct{}
|
||||
|
||||
func (T) M() {
|
||||
strings.HasPrefix("", "")
|
||||
}
|
13
test/fixedbugs/issue20682.dir/q.go
Normal file
13
test/fixedbugs/issue20682.dir/q.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Copyright 2017 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package q
|
||||
|
||||
import "./p"
|
||||
|
||||
type T struct{}
|
||||
|
||||
func (T) M() interface{} {
|
||||
return &p.T{}
|
||||
}
|
11
test/fixedbugs/issue20682.dir/r.go
Normal file
11
test/fixedbugs/issue20682.dir/r.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
// Copyright 2017 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package r
|
||||
|
||||
import "./q"
|
||||
|
||||
type T struct {
|
||||
q.T
|
||||
}
|
7
test/fixedbugs/issue20682.go
Normal file
7
test/fixedbugs/issue20682.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
// compiledir
|
||||
|
||||
// Copyright 2017 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package ignored
|
Loading…
Reference in a new issue