Java: basic support for Valhalla Value Classes (IDEA-364548)

GitOrigin-RevId: 93b0394866aae35772ccc90e7de822af8a94c6ce
This commit is contained in:
Bas Leijdekkers
2024-12-18 18:05:29 +00:00
committed by intellij-monorepo-bot
parent 36b258bc98
commit 2b32d9bb56
41 changed files with 526 additions and 148 deletions
@@ -10,16 +10,16 @@ class Main {
final ComplexVBHierarchy localVb = new ComplexVBHierarchy();
final Object objectVb = new ComplexVBHierarchy();
synchronized (<warning descr="Attempt to synchronize on an instance of a value-based class">vb</warning>) {}
synchronized (<warning descr="Attempt to synchronize on an instance of a value-based class">localVb</warning>) {}
synchronized (<warning descr="Attempt to synchronize on an instance of a value-based class">objectVb</warning>) {}
synchronized (<warning descr="Synchronization on instance of value-based class">vb</warning>) {}
synchronized (<warning descr="Synchronization on instance of value-based class">localVb</warning>) {}
synchronized (<warning descr="Synchronization on instance of value-based class">objectVb</warning>) {}
synchronized (ComplexVBHierarchy.class) {}
f(vb);
g(vb);
}
void f(ComplexVBHierarchy vb) {
synchronized (<warning descr="Attempt to synchronize on an instance of a value-based class">vb</warning>) {}
synchronized (<warning descr="Synchronization on instance of value-based class">vb</warning>) {}
}
void g(Object vb) {