Results for “java function return code example python error file site:bugs.java.com request”
bugs.java.com
Bug ID: JDK-4106143 About polymorphism: changing the return type...
According to the actual Java specification, the following code would produce a compiler error: < code> abstract class Aclass {. public abstract Number giveMeANumber()In fact, I see some advantage in allowing this kind of change. The following discussion gives two examples
bugs.java.com
Bug ID: JDK-4034116 Functions that return multiple values
It would be nice if functions could return more than one object for example. public (int, File) getData(int p_stuff){ return m_anInt, m_aFile; } ... File f; int i; (i, f) = getData(2); This save having to make an object just to hold the data.
bugs.java.com
Bug ID: JDK-8037789 Surprising more-specific results for lambda...
- If the return types are unrelated functional interface types (however this is defined -- see JDK-8037804), then the old logic says they're both more specific than the other, and the new logic says neither is more specific. Either way, ambiguity error.