You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kotlin's infinite wisdom placed in the cleverness of the isX:boolean property naming convention is a gift that keeps on giving, this time when enabling <interfaces> for tables with boolean columns X and IS_X:
CREATETABLEt_11912 (
x INT,
is_x INT,
is_y INT
);
Generated code produces this compilation error:
[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.8.0:test-compile (test-compile) on project jooq-test-codegen-kotlin: Compilation failure: Compilation failure:
[ERROR] C:\Users\lukas\jOOQ\3.19\workspace\jOOQ-pro\jOOQ-test-codegen\jOOQ-test-codegen-kotlin\src\test\kotlin\org\jooq\codegen\test\ambiguouscolumnnames\db\tables\interfaces\IT_11912.kt:[15,5] Platform declaration clash: The following declarations have the same JVM signature (setX(Ljava/lang/Integer;)V):
[ERROR] fun `<set-isX>`(`<set-?>`: Int?): Unit defined in org.jooq.codegen.test.ambiguouscolumnnames.db.tables.interfaces.IT_11912
[ERROR] fun `<set-x>`(`<set-?>`: Int?): Unit defined in org.jooq.codegen.test.ambiguouscolumnnames.db.tables.interfaces.IT_11912
[ERROR] C:\Users\lukas\jOOQ\3.19\workspace\jOOQ-pro\jOOQ-test-codegen\jOOQ-test-codegen-kotlin\src\test\kotlin\org\jooq\codegen\test\ambiguouscolumnnames\db\tables\interfaces\IT_11912.kt:[16,5] Platform declaration clash: The following declarations have the same JVM signature (setX(Ljava/lang/Integer;)V):
[ERROR] fun `<set-isX>`(`<set-?>`: Int?): Unit defined in org.jooq.codegen.test.ambiguouscolumnnames.db.tables.interfaces.IT_11912
[ERROR] fun `<set-x>`(`<set-?>`: Int?): Unit defined in org.jooq.codegen.test.ambiguouscolumnnames.db.tables.interfaces.IT_11912
[ERROR] C:\Users\lukas\jOOQ\3.19\workspace\jOOQ-pro\jOOQ-test-codegen\jOOQ-test-codegen-kotlin\src\test\kotlin\org\jooq\codegen\test\ambiguouscolumnnames\db\tables\pojos\T_11912.kt:[15,5] Accidental override: The following declarations have the same JVM signature (setX(Ljava/lang/Integer;)V):
[ERROR] fun `<set-x>`(`<set-?>`: Int?): Unit defined in org.jooq.codegen.test.ambiguouscolumnnames.db.tables.pojos.T_11912
[ERROR] fun setX(`<set-?>`: Int?): Unit defined in org.jooq.codegen.test.ambiguouscolumnnames.db.tables.pojos.T_11912
[ERROR] C:\Users\lukas\jOOQ\3.19\workspace\jOOQ-pro\jOOQ-test-codegen\jOOQ-test-codegen-kotlin\src\test\kotlin\org\jooq\codegen\test\ambiguouscolumnnames\db\tables\records\T_11912Record.kt:[22,9] Accidental override: The following declarations have the same JVM signature (setX(Ljava/lang/Integer;)V):
[ERROR] fun `<set-x>`(value: Int?): Unit defined in org.jooq.codegen.test.ambiguouscolumnnames.db.tables.records.T_11912Record
[ERROR] fun setX(`<set-?>`: Int?): Unit defined in org.jooq.codegen.test.ambiguouscolumnnames.db.tables.records.T_11912Record
[ERROR] -> [Help 1]
The workaround is to use a generator strategy, of course, or to turn off <interfaces>
Kotlin's infinite wisdom placed in the cleverness of the
isX:boolean
property naming convention is a gift that keeps on giving, this time when enabling<interfaces>
for tables with boolean columnsX
andIS_X
:Generated code produces this compilation error:
The workaround is to use a generator strategy, of course, or to turn off
<interfaces>
See also:
The text was updated successfully, but these errors were encountered: