[jOOQ/jOOQ#12440] Compilation error in KotlinGenerator generated code

when @set:JvmName is applied to overriding property
This commit is contained in:
Lukas Eder 2021-09-17 10:04:35 +02:00
parent 3b1e76a5b7
commit 84b01f3398

View File

@ -7288,8 +7288,14 @@ public class JavaGenerator extends AbstractGenerator {
if (kotlin
&& generateKotlinSetterJvmNameAnnotationsOnIsPrefix()
&& column instanceof ColumnDefinition
&& P_IS.matcher(getStrategy().getJavaMemberName(column, mode)).matches())
&& P_IS.matcher(getStrategy().getJavaMemberName(column, mode)).matches()) {
// [#12440] And if we have interfaces, we'll run into https://youtrack.jetbrains.com/issue/KT-31420
if (generateInterfaces())
out.println("@Suppress(\"INAPPLICABLE_JVM_NAME\")");
out.println("@set:JvmName(\"%s\")", getStrategy().getJavaSetterName(column, mode));
}
}
private String nullableAnnotation(JavaWriter out) {