Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ResolveConflicts.java
anna f2c576c7de method refs: do not choose more specific method between methods with different number of params
(cherry picked from commit f986c7c3541f032da16736f43fd34c92337242c4)
2013-11-28 12:21:42 +01:00

12 lines
348 B
Java

interface Func<TIn, TOut>{
TOut run(TIn in);
}
class Main {
public static void main(final String[] args) {
<error descr="Incompatible types. Found: '<method reference>', required: 'Func<java.lang.Integer,java.lang.String>'">Func<Integer, String> func = Integer::toString;</error>
System.out.println(func.run(6));
}
}