2012-02-18 14:15:42 -07:00
|
|
|
// compile
|
2010-04-27 14:09:32 -06:00
|
|
|
|
|
|
|
// 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.
|
|
|
|
|
2012-02-03 12:43:24 -07:00
|
|
|
package bug267
|
2010-04-27 14:09:32 -06:00
|
|
|
|
|
|
|
type T []int
|
|
|
|
|
|
|
|
var a []bool
|
|
|
|
|
2021-07-28 13:59:14 -06:00
|
|
|
func f1() {
|
2010-04-27 14:09:32 -06:00
|
|
|
if a[T{42}[0]] {
|
|
|
|
}
|
|
|
|
// if (a[T{42}[0]]) {} // this compiles
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
6g bugs/bug267.go
|
|
|
|
bugs/bug267.go:14: syntax error: unexpected {, expecting :
|
|
|
|
*/
|