Debian Codegraph @

test/fixedbugs/bug509.go

raw
1 // compile
2
3 // Copyright 2020 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 // Gccgo mishandles a couple of alias cases.
8
9 package p
10
11 type S struct{}
12
13 func (*S) M() {}
14
15 type I interface {
16 M()
17 }
18
19 type A = *S
20
21 var V1 I
22 var _ = V1.(*S)
23 var _ = V1.(A)
24
25 func F() {
26 var v I
27 v = (*S)(nil)
28 v = A(nil)
29 _ = v
30 }