Commit 709e3a3f authored by Robert Griesemer's avatar Robert Griesemer

- tests for type forward declarations

SVN=121560
parent 5e77b0a8
// 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.
// $G $D/$F.go && echo BUG: compilation succeeds incorrectly
package main
type S struct {
p *T // BUG T never declared
}
func main() {
var s S;
}
// 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.
// $G $D/$F.go || echo BUG: compilation should succeed
package main
type T // BUG forward declaration should be accepted
type S struct {
p *T
}
type T struct {
p *S
}
func main() {
var s S;
}
......@@ -262,6 +262,13 @@ BUG: compilation succeeds incorrectly
=========== bugs/bug040.go
BUG: compilation succeeds incorrectly
=========== bugs/bug041.go
BUG: compilation succeeds incorrectly
=========== bugs/bug042.go
bugs/bug042.go:6: syntax error
BUG: compilation should succeed
=========== fixedbugs/bug000.go
=========== fixedbugs/bug005.go
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment