mirror of
https://github.com/golang/go
synced 2024-11-17 01:34:52 -07:00
84e7cb0611
Pull the struct into a single line, since 6g reports the error on the last line of the struct definition and gccgo reports it on the first line. 6g: bug215.go:12: invalid recursive type A gccgo: bug215.go:12:6: error: invalid recursive type ‘A’ R=rsc https://golang.org/cl/180044
15 lines
373 B
Go
15 lines
373 B
Go
// errchk $G $D/$F.go
|
|
|
|
// Copyright 2009 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.
|
|
|
|
// Used to crash the compiler.
|
|
// http://code.google.com/p/go/issues/detail?id=158
|
|
|
|
package main
|
|
|
|
type A struct { a A } // ERROR "recursive"
|
|
func foo() { new(A).bar() }
|
|
func (a A) bar() {}
|