1
0
mirror of https://github.com/golang/go synced 2024-11-05 17:46:16 -07:00
go/test/fixedbugs/issue46903.go
Cuong Manh Le b5b2cf519f go/types,types2: exclude tests that need cgo.Incomplete
Since when go/types,types2 do not know about build constraints, and
runtime/cgo.Incomplete is only available on platforms that support cgo.

These tests are also failing on aix with failure from linker, so disable
them on aix to make builder green. The fix for aix is tracked in #54814

Updates #46731
Updates #54814

Change-Id: I5d6f6e29a8196efc6c457ea64525350fc6b20309
Reviewed-on: https://go-review.googlesource.com/c/go/+/427394
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2022-09-01 15:27:07 +00:00

36 lines
605 B
Go

// run
//go:build goexperiment.unified && cgo && !aix
// TODO(mdempsky): Enable test unconditionally. This test should pass
// for non-unified mode too.
// Copyright 2021 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 main
import "runtime/cgo"
type A struct {
B
_ cgo.Incomplete
}
type B struct{ x byte }
type I interface{ M() *B }
func (p *B) M() *B { return p }
var (
a A
i I = &a
)
func main() {
got, want := i.M(), &a.B
if got != want {
println(got, "!=", want)
panic("FAIL")
}
}