1// errorcheck
2
3// Copyright 2010 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7// This is a test case for issue 804.
8
9package main
10
11func f() [10]int {
12	return [10]int{}
13}
14
15var m map[int][10]int
16
17func main() {
18	f()[1] = 2	// ERROR "cannot|invalid"
19	f()[2:3][0] = 4	// ERROR "cannot|addressable"
20	var x = "abc"
21	x[2] = 3	// ERROR "cannot|invalid"
22	m[0][5] = 6  // ERROR "cannot|invalid"
23}
24