I have this function
func daysIn[m Integer, y IntegerYear, r Integer](month m, year y) r {
if month == 2 && isLeapYear(year) {
return 29
}
return r(daysInMonth[month])
}
and in some cases when using daysIn, I get the compiler error that r cannot be inferred. In this case specifying all types like this
if days > daysIn[int, int, int](m, y) {}
resolves the issue, but is it possible to only specify r in those cases?
is there something like this maybe?
if days > daysIn[r: int](m, y) {}