https://kotlinlang.org logo
Title
g

Gavin Ray

08/17/2022, 8:22 PM
Hiya, wanted to share a regression using K2 with Kotlin 1.7.20-Beta It's related to Curiously-Recurring Template Pattern/"_F_-bounded quantification" in TestContainers classes:
New inference error [NewConstraintError at Incorporate TypeVariable(SELF) == CapturedType(*) from Fix variable TypeVariable(SELF) from position Fix variable TypeVariable(SELF): CapturedType(*) <!: ft<org/testcontainers/containers/MySQLContainer<ft<CapturedType(*) & Any, CapturedType(*)?>>, org/testcontainers/containers/MySQLContainer<ft<CapturedType(*) & Any, CapturedType(*)?>>?>]
Where that line is:
private val container = MySQLContainer(imageName).withInitScript(initScript)
And MySQL class definition is:
public class MySQLContainer<SELF extends MySQLContainer<SELF>> extends JdbcDatabaseContainer<SELF>
m

mglukhikh

08/18/2022, 6:35 AM
:thank-you: . Could you please create a :youtrack: issue?
g

Gavin Ray

08/18/2022, 4:47 PM
Sure 👍