Skip to content

Commit 49bae98

Browse files
test: add test that gccgo failed to compile
For #38125 Change-Id: Id6ef10d74f0f9dbad2851531e0fe019cd145cf7c Reviewed-on: https://go-review.googlesource.com/c/go/+/251168 Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
1 parent c8ea038 commit 49bae98

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

test/fixedbugs/issue38125.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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 mishandled embedded methods of type aliases.
8+
9+
package p
10+
11+
type I int
12+
13+
func (I) M() {}
14+
15+
type T = struct {
16+
I
17+
}
18+
19+
func F() {
20+
_ = T.M
21+
_ = struct { I }.M
22+
}

0 commit comments

Comments
 (0)