zatonovo/lambda.r

Type constraints that use numeric fail for integers

Closed this issue · 1 comments

The reason Is that an integer does not inherit from numeric in S3.

> class(as.integer(4))
[1] "integer"
> is.integer(as.integer(4))
[1] TRUE
> is.numeric(as.integer(4))
[1] TRUE

Instead what is needed is to convert a numeric reference to is.numeric(), the same way that Function maps to is.function().

Fixed in 1.1.4