mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
not only static constants may be inlined by compiler: IDEA-115878 Constants search should work for final fields
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
Cleaning output files:
|
||||
out/production/IntNonStaticConstantChange/Server.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Server.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/IntNonStaticConstantChange/Client.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Client.java
|
||||
End of files
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class Server {
|
||||
final int var = 500;
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class Client {
|
||||
public static void main(String[] args) {
|
||||
System.out.println(new Server().var);
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class Server {
|
||||
final int var = 100;
|
||||
}
|
||||
@@ -799,7 +799,7 @@ public class Mappings {
|
||||
}
|
||||
|
||||
private class Differential {
|
||||
private static final int DESPERATE_MASK = Opcodes.ACC_STATIC | Opcodes.ACC_FINAL;
|
||||
private static final int DESPERATE_MASK = Opcodes.ACC_FINAL;
|
||||
|
||||
final Mappings myDelta;
|
||||
final Collection<File> myFilesToCompile;
|
||||
|
||||
@@ -60,6 +60,10 @@ public class FieldPropertyTest extends IncrementalTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testIntNonStaticConstantChange() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testLongConstantChange() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user