method refs: infer 'diamond' if constructor ref type is raw (IDEA-142142)

This commit is contained in:
Anna Kozlova
2015-07-02 20:08:10 +03:00
parent e98517a060
commit fe400fc988
3 changed files with 23 additions and 0 deletions
@@ -0,0 +1,6 @@
import java.util.*;
class Test {
public Optional<Set<String>> foo(Optional<Set<String>> args) {
return args.map(HashSet::new).map(Collections::unmodifiableSet);
}
}