[
https://issues.apache.org/jira/browse/GROOVY-11746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18017301#comment-18017301
]
ASF GitHub Bot commented on GROOVY-11746:
-----------------------------------------
eric-milles commented on PR #2286:
URL: https://github.com/apache/groovy/pull/2286#issuecomment-3240264236
`NamedRecord` and `NamedTuple` made use of `@POJO` and overloads of
`getAt(String)`. I will circle back with a separate ticket and test case to
try and capture what I think is going on. I don't think a POJO should be
including extension methods. That aside, a call to `super.getAt(name)` should
probably not make use of extension methods outside of traits.
> Specific method call failing static compile in Groovy5 but not Groovy4
> ----------------------------------------------------------------------
>
> Key: GROOVY-11746
> URL: https://issues.apache.org/jira/browse/GROOVY-11746
> Project: Groovy
> Issue Type: Bug
> Components: Static compilation
> Affects Versions: 5.0.0
> Reporter: Aleks Tamarkin
> Assignee: Eric Milles
> Priority: Major
>
> The following code works on Groovy4 but not Groovy5
> {code:java}
> @Grab('org.apache.pdfbox:pdfbox:3.0.5')
> import org.apache.pdfbox.pdmodel.PDPageContentStream
> import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject
> import groovy.transform.CompileStatic
> @CompileStatic
> def doesNotCompile(PDPageContentStream stream, PDImageXObject pdImage, float
> x, float y, float width, float height) {
> stream.drawImage(pdImage, x, y, width, height)
> }{code}
> It fails with the errorĀ
> {code:java}
> [Static type checking] - Cannot find matching method
> org.apache.pdfbox.pdmodel.PDPageContentStream#drawImage(org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject,
> float, float, float, float). Please check if the declared type is correct
> and if the method exists.
> at line: 9, column: 5 {code}
> I cannot reproduce this specific issue outside Apache PdfBox
--
This message was sent by Atlassian Jira
(v8.20.10#820010)