Closed
Description
Nothing inferred in polymorphic, method with empty parameter list but Int
inferred when method is parameterless.
minimized code
object Test {
def meth[R <: Int]() : R = ???
def main(args: Array[String]): Unit = {
val person: Int = meth()
}
}
expectation
It should work the same either with or without a parameter list.
object Test {
def meth[R <: Int]: R = ???
def main(args: Array[String]): Unit = {
val person: Int = meth
}
}