melezov/proxykwai — Issue #2: Primitive return types clash
Author: melezov
Created: 2012-01-30 02:46:42+00:00
State: open

There will be problems whenever two methods are proxied under the same name with colliding primitive return types...

For instance:

parse(s: String): Long
parse(s: String): Int

Will not work since compiler likes to promote Byte > Short > Int > Long

Currently, the only sane solution is to use boxed versions of primitives whenever a clash seems possible:

parse(s: String): java.lang.Long
parse(s: String): java.lang.Integer