-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
17, 25
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
same with with Java 21
A DESCRIPTION OF THE PROBLEM :
Following simple expression does not compile:
Paths.get("".transform(s -> s));
Compiler should 'see' that the expression is of type String and compile to Path.get(String,String...).
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
try to compile
Paths.get("".transform(s -> s));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
compile without error
ACTUAL -
does not compile
---------- BEGIN SOURCE ----------
public static void main(final String[] args) {
Paths.get("".transform(s -> s));
}
---------- END SOURCE ----------
same with with Java 21
A DESCRIPTION OF THE PROBLEM :
Following simple expression does not compile:
Paths.get("".transform(s -> s));
Compiler should 'see' that the expression is of type String and compile to Path.get(String,String...).
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
try to compile
Paths.get("".transform(s -> s));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
compile without error
ACTUAL -
does not compile
---------- BEGIN SOURCE ----------
public static void main(final String[] args) {
Paths.get("".transform(s -> s));
}
---------- END SOURCE ----------