expr icon indicating copy to clipboard operation
expr copied to clipboard

Feature request - automatic cast for integer

Open daisy1754 opened this issue 4 years ago • 0 comments

This expression with below function will cause the runtime error because of type - reflect: Call using int as type int64.

It would be nice if expr can automatically cast int to int64 in this case

User.AccountAge < MinutesToMillis(7)
func (e Env) MinutesToMillis(min int64) int64 {
	return int64(min * 60 * 1000)
}

daisy1754 avatar Dec 28 '21 00:12 daisy1754