mirror of
https://github.com/golang/go
synced 2024-11-25 04:57:56 -07:00
gc: bug280
Fixes #808. R=ken2 CC=golang-dev https://golang.org/cl/1273042
This commit is contained in:
parent
c95e11db56
commit
43c0a46ac6
@ -239,6 +239,8 @@ dowidth(Type *t)
|
||||
w = sizeof_Array;
|
||||
checkwidth(t->type);
|
||||
}
|
||||
else if(t->bound == -100)
|
||||
yyerror("use of [...] array outside of array literal");
|
||||
else
|
||||
fatal("dowidth %T", t); // probably [...]T
|
||||
break;
|
||||
|
13
test/fixedbugs/bug280.go
Normal file
13
test/fixedbugs/bug280.go
Normal file
@ -0,0 +1,13 @@
|
||||
// errchk $G $D/$F.go
|
||||
|
||||
// Copyright 2010 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.
|
||||
|
||||
// http://code.google.com/p/go/issues/detail?id=808
|
||||
|
||||
package main
|
||||
|
||||
type A [...]int // ERROR "outside of array literal"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user