mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
Java Type Migration: warn on enum constant when the argument type can't be converted (IDEA-314701)
GitOrigin-RevId: c5f8a21262476077e456f6bf99c05622ba8c0006
This commit is contained in:
committed by
intellij-monorepo-bot
parent
19cf134f75
commit
a0e8b31187
@@ -48,6 +48,10 @@ public class TypeMigrationTest extends TypeMigrationTestBase {
|
||||
doTestFirstParamType("x", PsiTypes.longType());
|
||||
}
|
||||
|
||||
public void testEnumConstant() {
|
||||
doTestFirstParamType("Test", PsiTypes.byteType());
|
||||
}
|
||||
|
||||
public void testVarargsAndBoxing() {
|
||||
doTestFieldType("x", PsiTypes.longType());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Types:
|
||||
PsiParameter:i : byte
|
||||
|
||||
Conversions:
|
||||
|
||||
New expression type changes:
|
||||
Fails:
|
||||
1->byte
|
||||
@@ -0,0 +1,5 @@
|
||||
enum Test {
|
||||
A(1);
|
||||
|
||||
Test(byte i) {}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
enum Test {
|
||||
A(1);
|
||||
|
||||
Test(int i) {}
|
||||
}
|
||||
Reference in New Issue
Block a user