var d string = "hel" // try to get different pointer
d = d + "lo"
- // exp/ssa/interp can't handle unsafe.Pointer.
- if os.Getenv("GOSSAINTERP") != "" {
+ // go.tools/ssa/interp can't handle unsafe.Pointer.
+ if os.Getenv("GOSSAINTERP") == "" {
if stringptr(c) == stringptr(d) {
panic("compiler too smart -- got same string")
}
{
var x = struct {
x int
- _ []int
+ _ string
y float64
_ float64
z int
// Comparison of structs should have a good message
use(t3 == t3) // ERROR "struct|expected"
- use(t4 == t4) // ok; the []int is a blank field
+ use(t4 == t4) // ERROR "cannot be compared|non-comparable"
// Slices, functions, and maps too.
var x []int