func TestCheckBinaryNonConstExprIntRemArray(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)`,
	)
}
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)`,
	)
}
func TestCheckBinaryNonConstExprIntAddMap(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := mapT{}; env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and eval.mapT)`,
	)
}
func TestCheckBinaryNonConstExprIntAddXinterfaceX(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := XinterfaceX(1); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and eval.XinterfaceX)`,
	)
}
func TestCheckBinaryNonConstExprIntAddInterfaceX(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := interfaceX(nil); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and eval.interfaceX)`,
	)
}
func TestCheckBinaryNonConstExprIntAddInterfaceY(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := interfaceY(nil); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and eval.interfaceY)`,
	)
}
func TestCheckBinaryNonConstExprIntAddInterfaceZ(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := interfaceZ(nil); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and eval.interfaceZ)`,
	)
}
func TestCheckBinaryNonConstExprIntAddPtr(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := (*int)(nil); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and *int)`,
	)
}
func TestCheckBinaryNonConstExprIntAddStruct(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := structT{}; env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and eval.structT)`,
	)
}
func TestCheckBinaryNonConstExprIntAddStructUncomp(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := structUncompT{}; env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a + b`, env,
		`invalid operation: a + b (mismatched types int and eval.structUncompT)`,
	)
}
func TestCheckBinaryNonConstExprIntAndConstInt(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	expectType(t, `a & 4`, env, reflect.TypeOf(a & 4))
}
func TestCheckBinaryNonConstExprIntAndConstRune(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	expectType(t, `a & '@'`, env, reflect.TypeOf(a & '@'))
}
func TestCheckBinaryNonConstExprIntAndConstFloat(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 TestCheckBinaryNonConstExprIntAndConstComplex(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 TestCheckBinaryNonConstExprIntAndConstBool(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 TestCheckBinaryNonConstExprIntAndConstString(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 TestCheckBinaryNonConstExprIntAndConstNil(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 TestCheckBinaryNonConstExprIntAndInt(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 TestCheckBinaryNonConstExprIntAndFloat32(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 TestCheckBinaryNonConstExprIntAndComplex128(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 TestCheckBinaryNonConstExprIntAndString(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 TestCheckBinaryNonConstExprIntAndBoolT(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 TestCheckBinaryNonConstExprIntAndSlice(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)`,
	)
}
func TestCheckBinaryNonConstExprIntAndArray(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)`,
	)
}
func TestCheckBinaryNonConstExprIntAndMap(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := mapT{}; env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a & b`, env,
		`invalid operation: a & b (mismatched types int and eval.mapT)`,
	)
}
func TestCheckBinaryNonConstExprIntAndXinterfaceX(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := XinterfaceX(1); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a & b`, env,
		`invalid operation: a & b (mismatched types int and eval.XinterfaceX)`,
	)
}
func TestCheckBinaryNonConstExprIntAndInterfaceX(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := interfaceX(nil); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a & b`, env,
		`invalid operation: a & b (mismatched types int and eval.interfaceX)`,
	)
}
func TestCheckBinaryNonConstExprIntAndInterfaceY(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := interfaceY(nil); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a & b`, env,
		`invalid operation: a & b (mismatched types int and eval.interfaceY)`,
	)
}
func TestCheckBinaryNonConstExprIntAndInterfaceZ(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := interfaceZ(nil); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a & b`, env,
		`invalid operation: a & b (mismatched types int and eval.interfaceZ)`,
	)
}
func TestCheckBinaryNonConstExprIntAndPtr(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := (*int)(nil); env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a & b`, env,
		`invalid operation: a & b (mismatched types int and *int)`,
	)
}
func TestCheckBinaryNonConstExprIntAndStruct(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := structT{}; env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a & b`, env,
		`invalid operation: a & b (mismatched types int and eval.structT)`,
	)
}
func TestCheckBinaryNonConstExprIntAndStructUncomp(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	b := structUncompT{}; env.Vars["b"] = reflect.ValueOf(&b)
	expectCheckError(t, `a & b`, env,
		`invalid operation: a & b (mismatched types int and eval.structUncompT)`,
	)
}
func TestCheckBinaryNonConstExprIntRemConstInt(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	expectType(t, `a % 4`, env, reflect.TypeOf(a % 4))
}
func TestCheckBinaryNonConstExprIntRemConstRune(t *testing.T) {
	env := makeCheckBinaryNonConstExprEnv()
	a := int(1); env.Vars["a"] = reflect.ValueOf(&a)
	expectType(t, `a % '@'`, env, reflect.TypeOf(a % '@'))
}
func TestCheckBinaryNonConstExprIntRemConstFloat(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 TestCheckBinaryNonConstExprIntRemConstComplex(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`,
		`division by zero`,
	)
}
func TestCheckBinaryNonConstExprIntRemConstBool(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 TestCheckBinaryNonConstExprIntRemConstString(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 TestCheckBinaryNonConstExprIntRemConstNil(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 TestCheckBinaryNonConstExprIntRemInt(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 TestCheckBinaryNonConstExprIntRemFloat32(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 TestCheckBinaryNonConstExprIntRemComplex128(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 TestCheckBinaryNonConstExprIntRemString(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 TestCheckBinaryNonConstExprIntRemBoolT(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 TestCheckBinaryNonConstExprIntRemSlice(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)`,
	)
}