func TestCheckBinaryNonConstExprIntAddArray(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := arrayT{}; env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and eval.arrayT)`,
	)
}
Test Int + Array
package eval
import (
	"testing"
	"reflect"
)
type interfaceX interface { x() }
type interfaceY interface { x() }
type interfaceZ interface { z() }
type XinterfaceX int
func (XinterfaceX) x() {}
type arrayT [2]int
type mapT map[int]int
type sliceT []int
type structT struct {
	a int
	_ []int
}
type structUncompT struct {
	a int
	b []int
}
func makeCheckBinaryNonConstExprEnv() *SimpleEnv {
	env := MakeSimpleEnv()
	env.Types["interfaceX"] = reflect.TypeOf(new(interfaceX)).Elem()
	env.Types["interfaceY"] = reflect.TypeOf(new(interfaceY)).Elem()
	env.Types["interfaceZ"] = reflect.TypeOf(new(interfaceZ)).Elem()
	env.Types["XinterfaceX"] = reflect.TypeOf(XinterfaceX(0))
	env.Types["arrayT"] = reflect.TypeOf(arrayT{})
	env.Types["mapT"] = reflect.TypeOf(mapT{})
	env.Types["sliceT"] = reflect.TypeOf(sliceT{})
	env.Types["structT"] = reflect.TypeOf(structT{})
	env.Types["structUncompT"] = reflect.TypeOf(structUncompT{})
	return env
}
func TestCheckBinaryNonConstExprIntAddConstInt(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	expectType(t, `a + 4`, env, reflect.TypeOf(a + 4))
}
func TestCheckBinaryNonConstExprIntAddConstRune(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	expectType(t, `a + '@'`, env, reflect.TypeOf(a + '@'))
}
func TestCheckBinaryNonConstExprIntAddConstFloat(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	expectType(t, `a + 2.0`, env, reflect.TypeOf(a + 2.0))
}
func TestCheckBinaryNonConstExprIntAddConstComplex(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	expectCheckError(t, `a + 8.0i`, env,
		`constant 0+8i truncated to real`,
	)
}
func TestCheckBinaryNonConstExprIntAddConstBool(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	expectCheckError(t, `a + true`, env,
		`cannot convert true to type int`,
		`invalid operation: a + true (mismatched types int and bool)`,
	)
}
func TestCheckBinaryNonConstExprIntAddConstString(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	expectCheckError(t, `a + "abc"`, env,
		`cannot convert "abc" to type int`,
		`invalid operation: a + "abc" (mismatched types int and string)`,
	)
}
func TestCheckBinaryNonConstExprIntAddConstNil(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	expectCheckError(t, `a + nil`, env,
		`cannot convert nil to type int`,
	)
}
func TestCheckBinaryNonConstExprIntAddInt(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := int(1); env.Vars["b"] = reflect.ValueOf(&b)
	expectType(t, `a + b`, env, reflect.TypeOf(a + b))
}
func TestCheckBinaryNonConstExprIntAddFloat32(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := float32(1.5); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and float32)`,
	)
}
func TestCheckBinaryNonConstExprIntAddComplex128(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := complex128(1i); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and complex128)`,
	)
}
func TestCheckBinaryNonConstExprIntAddString(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := string("abc"); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and string)`,
	)
}
func TestCheckBinaryNonConstExprIntAddBoolT(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := bool(true); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and bool)`,
	)
}
func TestCheckBinaryNonConstExprIntAddSlice(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := sliceT(nil); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and eval.sliceT)`,
	)
}