ursus
10/30/2026, 3:12 AMfull value classes and them having no identity so === is a comp time error.. they also extend Any, right?
So if iO cast down to Any and then triple equals it… is that then undefined?Marat Akhin
10/30/2026, 10:21 AM=== visible through Any is implementation-defined, similarly to what currently happens for the same code, but with `@JvmInline value class`es. Whether you would observe the same or different boxes (and results of ===) depends on what the compiler does.
Before Valhalla comes on the JVM (and is supported on Android), that's what will happen. Afterwards === changes to being structural for value types on the JVM, and we have plans to support the same structural behavior on other platforms. Case in point: by the time full value classes are Stable, you would have mechanisms to ensure === works consistently between all relevant platforms.