func (i *Interpreter[any]) VisitUnaryExpr(expr Unary[any]) any {
right := i.evaluate(expr.Right)
switch expr.Operator.Type {
case MINUS:
switch any(right).(type) {
case int:
return -right.(int)
}
}
}
cannot use type switch on type parameter value any(right) (value of type any/* type parameter */ constrained by any)compilerInvalidTypeSwitch