mirror of
https://github.com/golang/go
synced 2024-11-25 11:07:59 -07:00
- removed misleading comment in bug041.go
- removed bug042.go - not a bug according to updated spec R=r DELTA=43 (5 added, 36 deleted, 2 changed) OCL=14008 CL=14010
This commit is contained in:
parent
3963fe3b32
commit
7924b3862d
@ -13,11 +13,3 @@ type S struct {
|
||||
func main() {
|
||||
var s S;
|
||||
}
|
||||
|
||||
/*
|
||||
Another problem with implicit forward declarations (as in this program on line 6)
|
||||
is that it is not clear in which scope the type (here "T") should be declared.
|
||||
This is the main reason why we should not allow implicit forward declarations at all,
|
||||
and instead have an explicit type forward declaration. For more on this subject
|
||||
see bug042.go.
|
||||
*/
|
||||
|
@ -1,28 +0,0 @@
|
||||
// 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;
|
||||
}
|
||||
|
||||
/*
|
||||
Per discussion w/ Ken, some time ago, we came to the conclusion that explicit
|
||||
forward declarations (as on line 5 in this program) are preferrable over
|
||||
implicit forward declarations because they make it explicit in which scope a
|
||||
type is to be declared fully, eventually. As an aside, the machinery for it is
|
||||
almost free in the compiler (one extra 'if' as far as I can tell).
|
||||
*/
|
@ -71,10 +71,6 @@ BUG: compilation succeeds incorrectly
|
||||
=========== bugs/bug041.go
|
||||
BUG: compilation succeeds incorrectly
|
||||
|
||||
=========== bugs/bug042.go
|
||||
bugs/bug042.go:6: syntax error
|
||||
BUG: compilation should succeed
|
||||
|
||||
=========== bugs/bug046.go
|
||||
bugs/bug046.go:7: illegal <this> pointer
|
||||
BUG: known to fail incorrectly
|
||||
@ -136,8 +132,8 @@ outer loop top k 1
|
||||
k not zero
|
||||
panic on line 310 PC=0x1362
|
||||
0x1362?zi
|
||||
main·main(1, 0, 1606414952, ...)
|
||||
main·main(0x1, 0x7fff5fbff268, 0x0, ...)
|
||||
main·main(1, 0, 1606416392, ...)
|
||||
main·main(0x1, 0x7fff5fbff808, 0x0, ...)
|
||||
BUG: crashes
|
||||
Trace/BPT trap ./$A.out
|
||||
|
||||
@ -192,6 +188,11 @@ Bus error $G $D/$F.go
|
||||
4882
|
||||
BUG: succeeds incorrectly
|
||||
|
||||
=========== bugs/bug087.go
|
||||
bugs/bug087.go:8: illegal combination of literals LEN 9
|
||||
bugs/bug087.go:8: illegal combination of literals LEN 9
|
||||
BUG: fails incorrectly
|
||||
|
||||
=========== fixedbugs/bug025.go
|
||||
fixedbugs/bug025.go:7: variable exported but not defined: Foo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user