Henrique Mota created GROOVY-10868:
--------------------------------------
Summary: Cannot find matching method when using generics
Key: GROOVY-10868
URL: https://issues.apache.org/jira/browse/GROOVY-10868
Project: Groovy
Issue Type: Improvement
Components: Static Type Checker
Affects Versions: 3.0.13, 3.0.12, 3.0.11
Reporter: Henrique Mota
Attachments: image-2022-12-13-09-09-35-876.png
I'm having a problem with versions after 3.0.10 when generics is used in return.
{code:java}
PostgreSQLContainer postgreSQLContainer = new
PostgreSQLContainer('postgres:13.4')
.withDatabaseName(POSTGRESQL_DB)
.withUsername(POSTGRESQL_USER)
.withPassword(POSTGRESQL_PASS)
.withReuse(!IS_JENKINS_BUILD)
.withTmpFs(['/var/lib/postgresql/data': 'rw']) as PostgreSQLContainer
{code}
{code:java}
TcIntegrationSpec.groovy: 34: [Static type checking] - Cannot find matching
method
org.testcontainers.containers.PostgreSQLContainer#withUsername(java.lang.String).
Please check if the declared type is correct and if the method exists.
@ line 34, column 17.
.withUsername(POSTGRESQL_USER)
^ {code}
!image-2022-12-13-09-09-35-876.png!
I believe the problem is related to a problem
https://issues.apache.org/jira/browse/GROOVY-10054
--
This message was sent by Atlassian Jira
(v8.20.10#820010)