show method parameters: ensure inference results on wrong overloads not cached (IDEA-177725)

This commit is contained in:
Anna.Kozlova
2017-10-17 11:48:38 +02:00
parent bffca304b9
commit 3b40515140
3 changed files with 48 additions and 6 deletions
@@ -0,0 +1,26 @@
import java.util.Collections;
import java.util.List;
public class Bug {
private static <TFrom, TTo> List<TTo> mapAsList(TFrom source, Class<TTo> toType) {
return Collections.singletonList((TTo) source);
}
private static <TFrom, TTo> List<TTo> mapAsList(TFrom source, Class<TTo> toType, boolean someOption) {
return Collections.singletonList((TTo) source);
}
private static class Foo {
public Foo(Long value, List<Long> values, List<Long> moreValues) {
}
}
public static void main(String[] args) {
new Foo(
1L,
mapAsList(2L, Long.class),
mapAsList(3L, Lo<caret>ng.class, true)
);
}
}