I wonder why, unlike a Java record, in Kotlin a data class annotated with @Record can not be local.
Being able to use local records is a useful feature in particular in unit tests.
@Test
void testPoints() {
record Point(int x, int y) {}
...
}