Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1-rc-1
-
None
-
None
Description
The following code
class PrimeSupport { static isPrime(Number candidate){ true } static isPrime(Float candidate) { false } static isPrime(Double candidate) { false } static isPrime(BigDecimal candidate) { false } } use(PrimeSupport) { println 13.isPrime() println 13.2.isPrime() }
returns true and true with JDK 1.5 and 1.6, Groovy 1.1-Beta3 and HEAD.
With JDK1.4 it return true and false with Groovy 1.1-Beta3, but with
HEAD it also returns true and true.
My understanding is that it should return true and false. Is my
understanding wrong?