mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 00:20:55 +07:00
forbid cast primitive to type parameter (IDEA-52484; IDEA-23260)
This commit is contained in:
@@ -81,4 +81,10 @@ class Casting {
|
||||
private static String[] parseArray(Object obj) {
|
||||
return obj.toString().split(",");
|
||||
}
|
||||
}
|
||||
|
||||
class CastPrimitiveToTypeParam<T> {
|
||||
T foo() {
|
||||
return <error descr="Inconvertible types; cannot cast 'int' to 'T'">(T)1</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user