Support cross-module usages of @JvmRecord classes

The problem is that JvmRecord has SOURCE retention
Probably, increasing its retention might be a more reliable solution
(or in some other way serializing that the class is a record)

Just checking supertypes seems like a reasonable approximation:
only records kotlin are allowed to extend j.l.Record.
But the relevant diagnostic has been added only since 1.4.30,
so potentially there could have been exist a non-record class with
such supertype compiled by 1.4.20, but this case seems to be ill-formed
and marginal anyway.

For Java classes, it's irrelevant since they don't have member properties
(only synthetic extensions)

^KT-43677 In Progress
This commit is contained in:
Denis.Zharkov
2020-12-03 17:59:14 +03:00
parent ac0604377d
commit dc1a1c5821
10 changed files with 156 additions and 8 deletions
@@ -368,6 +368,14 @@ fun main(args: Array<String>) {
model("compileKotlinAgainstKotlin")
}
testClass<AbstractCompileKotlinAgainstKotlinJdk15Test> {
model("compileKotlinAgainstKotlinJdk15")
}
testClass<AbstractIrCompileKotlinAgainstKotlinJdk15Test> {
model("compileKotlinAgainstKotlinJdk15")
}
testClass<AbstractDescriptorRendererTest> {
model("renderer")
}