mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
accept narrowing conversion from byte[] to T< extends Serializable> (IDEA-113225)
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Test {
|
||||
public <T extends Serializable> void foo(byte[] data) {
|
||||
T foo = (T) data;
|
||||
}
|
||||
|
||||
public <T extends Serializable & Runnable> void bar(byte[] data) {
|
||||
T bar = <error descr="Inconvertible types; cannot cast 'byte[]' to 'T'">(T) data</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user