func TestCheckCompositeLitExprA1NilIntKInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{nil, 1: 1}`, env,
		`cannot convert nil to type int`,
		`array index 2 out of bounds [0:1]`,
	)
}
Test A1{nil, 1: 1}
package eval
import (
	"testing"
	"reflect"
)
func TestCheckCompositeLitExprA1XX(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectType(t, `a1{}`, env, reflect.TypeOf(a1{}))
}
func TestCheckCompositeLitExprA1XInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectType(t, `a1{1}`, env, reflect.TypeOf(a1{1}))
}
func TestCheckCompositeLitExprA1XString(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{"a"}`, env,
		`cannot convert "a" to type int`,
		`cannot use "a" (type string) as type int in array element`,
	)
}
func TestCheckCompositeLitExprA1XNil(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{nil}`, env,
		`cannot convert nil to type int`,
	)
}
func TestCheckCompositeLitExprA1XIntKInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{1: 1}`, env,
		`array index 2 out of bounds [0:1]`,
	)
}
func TestCheckCompositeLitExprA1XIntKString(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{1: "a"}`, env,
		`array index 2 out of bounds [0:1]`,
		`cannot convert "a" to type int`,
		`cannot use "a" (type string) as type int in array element`,
	)
}
func TestCheckCompositeLitExprA1XFloatKInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{float32(1.5): 1}`, env,
		`array index must be non-negative integer constant`,
	)
}
func TestCheckCompositeLitExprA1XAKInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{a: 1}`, env,
		`undefined: a`,
		`array index must be non-negative integer constant`,
	)
}
func TestCheckCompositeLitExprA1XAKString(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{a: "a"}`, env,
		`undefined: a`,
		`array index must be non-negative integer constant`,
		`cannot convert "a" to type int`,
		`cannot use "a" (type string) as type int in array element`,
	)
}
func TestCheckCompositeLitExprA1XBKInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{b: 1}`, env,
		`undefined: b`,
		`array index must be non-negative integer constant`,
	)
}
func TestCheckCompositeLitExprA1XCKInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{c: 1}`, env,
		`undefined: c`,
		`array index must be non-negative integer constant`,
	)
}
func TestCheckCompositeLitExprA1IntX(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectType(t, `a1{1}`, env, reflect.TypeOf(a1{1}))
}
func TestCheckCompositeLitExprA1IntInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{1, 1}`, env,
		`array index 2 out of bounds [0:1]`,
	)
}
func TestCheckCompositeLitExprA1IntString(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{1, "a"}`, env,
		`array index 2 out of bounds [0:1]`,
		`cannot convert "a" to type int`,
		`cannot use "a" (type string) as type int in array element`,
	)
}
func TestCheckCompositeLitExprA1IntNil(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{1, nil}`, env,
		`array index 2 out of bounds [0:1]`,
		`cannot convert nil to type int`,
	)
}
func TestCheckCompositeLitExprA1IntIntKInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{1, 1: 1}`, env,
		`array index 2 out of bounds [0:1]`,
	)
}
func TestCheckCompositeLitExprA1IntIntKString(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{1, 1: "a"}`, env,
		`array index 2 out of bounds [0:1]`,
		`cannot convert "a" to type int`,
		`cannot use "a" (type string) as type int in array element`,
	)
}
func TestCheckCompositeLitExprA1IntFloatKInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{1, float32(1.5): 1}`, env,
		`array index must be non-negative integer constant`,
	)
}
func TestCheckCompositeLitExprA1IntAKInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{1, a: 1}`, env,
		`undefined: a`,
		`array index must be non-negative integer constant`,
	)
}
func TestCheckCompositeLitExprA1IntAKString(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{1, a: "a"}`, env,
		`undefined: a`,
		`array index must be non-negative integer constant`,
		`cannot convert "a" to type int`,
		`cannot use "a" (type string) as type int in array element`,
	)
}
func TestCheckCompositeLitExprA1IntBKInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{1, b: 1}`, env,
		`undefined: b`,
		`array index must be non-negative integer constant`,
	)
}
func TestCheckCompositeLitExprA1IntCKInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{1, c: 1}`, env,
		`undefined: c`,
		`array index must be non-negative integer constant`,
	)
}
func TestCheckCompositeLitExprA1NilX(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{nil}`, env,
		`cannot convert nil to type int`,
	)
}
func TestCheckCompositeLitExprA1NilInt(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{nil, 1}`, env,
		`cannot convert nil to type int`,
		`array index 2 out of bounds [0:1]`,
	)
}
func TestCheckCompositeLitExprA1NilString(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{nil, "a"}`, env,
		`cannot convert nil to type int`,
		`array index 2 out of bounds [0:1]`,
		`cannot convert "a" to type int`,
		`cannot use "a" (type string) as type int in array element`,
	)
}
func TestCheckCompositeLitExprA1NilNil(t *testing.T) {
	type a1 [1]int
	type a2 [2]int
	type s1 struct{ a int }
	type s2 struct{ a, b int }
	env := MakeSimpleEnv()
	env.Types["a1"] = reflect.TypeOf(a1{})
	env.Types["a2"] = reflect.TypeOf(a2{})
	env.Types["s1"] = reflect.TypeOf(s1{})
	env.Types["s2"] = reflect.TypeOf(s2{})
	expectCheckError(t, `a1{nil, nil}`, env,
		`cannot convert nil to type int`,
		`array index 2 out of bounds [0:1]`,
		`cannot convert nil to type int`,
	)
}