diff options
| author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2022-08-08 01:10:18 +0700 |
|---|---|---|
| committer | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2022-09-02 06:22:23 +0000 |
| commit | ec2ea40b315e8b1a3d1dc8f7987584c4e2a00ef4 (patch) | |
| tree | 40ef46144a0c501807e0aab04f0ec1c669ff8499 /test/typeparam | |
| parent | 134cd34c07862aa8618e25d1d1279b4fd127c512 (diff) | |
| download | go-ec2ea40b315e8b1a3d1dc8f7987584c4e2a00ef4.tar.xz | |
cmd/compile: restrict //go:notinheap to runtime/internal/sys
So it won't be visible outside of runtime package. There are changes to
make tests happy:
- For test/directive*.go files, using "go:noinline" for testing misplaced
directives instead.
- Restrict test/fixedbugs/bug515.go for gccgo only.
- For test/notinheap{2,3}.go, using runtime/cgo.Incomplete for marking
the type as not-in-heap. Though it's somewhat clumsy, it's the easiest
way to keep the test errors for not-in-heap types until we can cleanup
further.
- test/typeparam/mdempsky/11.go is about defined type in user code marked
as go:notinheap, which can't happen after this CL, though.
Fixes #46731
Change-Id: I869f5b2230c8a2a363feeec042e7723bbc416e8e
Reviewed-on: https://go-review.googlesource.com/c/go/+/421882
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'test/typeparam')
| -rw-r--r-- | test/typeparam/mdempsky/11.go | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/test/typeparam/mdempsky/11.go b/test/typeparam/mdempsky/11.go deleted file mode 100644 index e86c038a10..0000000000 --- a/test/typeparam/mdempsky/11.go +++ /dev/null @@ -1,16 +0,0 @@ -// errorcheck - -// 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. - -// Reported by Cuong Manh Le. - -package p - -type a struct{} - -//go:notinheap -type b a - -var _ = (*b)(new(a)) // ERROR "cannot convert" |
