Dan Willemsen | bc60c3c | 2021-12-15 01:09:00 -0800 | [diff] [blame] | 1 | // errorcheck |
2 | |||||
3 | // Copyright 2021 The Go Authors. All rights reserved. | ||||
4 | // Use of this source code is governed by a BSD-style | ||||
5 | // license that can be found in the LICENSE file. | ||||
6 | |||||
7 | // Reported by Cuong Manh Le. | ||||
8 | |||||
9 | package p | ||||
10 | |||||
11 | type a struct{} | ||||
12 | |||||
13 | //go:notinheap | ||||
14 | type b a | ||||
15 | |||||
16 | var _ = (*b)(new(a)) // ERROR "cannot convert" |