mirror of
https://github.com/golang/go
synced 2024-11-12 01:10:21 -07:00
bug189
R=ken OCL=33745 CL=33745
This commit is contained in:
parent
ac9d833c1e
commit
ef3e6810b8
@ -1608,6 +1608,8 @@ typecheckcomplit(Node **np)
|
||||
ll->n->left->typecheck = 1;
|
||||
f = f->down;
|
||||
}
|
||||
if(f != nil)
|
||||
yyerror("too few values in struct initializer");
|
||||
} else {
|
||||
// keyed list
|
||||
for(ll=n->list; ll; ll=ll->next) {
|
||||
|
@ -13,5 +13,5 @@ type S struct {
|
||||
func main() {
|
||||
s1 := S{a: 7}; // ok - field is named
|
||||
s3 := S{7, 11}; // ok - all fields have values
|
||||
s2 := S{7}; // bug - should not compile since not all fields have values
|
||||
s2 := S{7}; // ERROR "too few"
|
||||
}
|
@ -157,9 +157,6 @@ BUG: errchk: command succeeded unexpectedly
|
||||
=========== bugs/bug187.go
|
||||
BUG: 0 1
|
||||
|
||||
=========== bugs/bug189.go
|
||||
BUG: errchk: command succeeded unexpectedly
|
||||
|
||||
=========== bugs/bug190.go
|
||||
bugs/bug190.go:11: invalid recursive type []S
|
||||
bugs/bug190.go:16: invalid recursive type S
|
||||
|
Loading…
Reference in New Issue
Block a user