1
0
mirror of https://github.com/golang/go synced 2024-11-07 18:06:27 -07:00
go/test/fixedbugs/issue42284.dir/b.go
Cuong Manh Le 46ddf0873e [dev.unified] cmd/compile: export/import implicit attribute for conversion exprs
So they can be formatted more presicely, and make it easier in the
transition to Unified IR.

Updates #53058

Change-Id: I8b5a46db05a2e2822289458995b8653f0a3ffbbe
Reviewed-on: https://go-review.googlesource.com/c/go/+/410594
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2022-06-06 19:21:04 +00:00

19 lines
488 B
Go

// Copyright 2020 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 b
import "./a"
func g() {
h := a.E() // ERROR "inlining call to a.E" "T\(0\) does not escape"
h.M() // ERROR "devirtualizing h.M to a.T"
// BAD: T(0) could be stack allocated.
i := a.F(a.T(0)) // ERROR "inlining call to a.F" "a.T\(0\) escapes to heap"
// Testing that we do NOT devirtualize here:
i.M()
}