func (suite *TypeCheckerTestSuite) TestInvalidOperandsCheckerForInvalidBinaryOperationWithStrings() { exampleExpr := expr.NewAnd(expr.NewStringLiteral("Test A"), expr.NewStringLiteral("Test B")) suite.testThatNumberOfErrorsOfPassedTypeArePresentForExpr(exampleExpr, errors.OperandWithUnexpectedTypeError{}, 2) }
func NewAndNode(lhs attrib, rhs attrib, sourcePosInfo attrib) (interfaces.Expr, error) { expr := expr.NewAnd(lhs.(interfaces.Expr), rhs.(interfaces.Expr)) expr.SetSourceInfo(sourcePosInfo.(token.Pos)) return expr, nil }