1
0
mirror of https://github.com/golang/go synced 2024-11-15 03:00:36 -07:00
go/test/fixedbugs/bug505.go
Ian Lance Taylor 6222997047 test: add type alias test that caused gccgo to crash
Change-Id: I3b388e4ac05ace5b7768ade03df2bee5bcc26ba8
Reviewed-on: https://go-review.googlesource.com/73790
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2017-10-26 22:52:53 +00:00

21 lines
401 B
Go

// compile
// Copyright 2017 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.
// gccgo crashed compiling this file with a failed conversion to the
// alias type when constructing the composite literal.
package p
type I interface{ M() }
type A = I
type S struct {
f A
}
func F(i I) S {
return S{f: i}
}