[
https://issues.apache.org/jira/browse/GROOVY-5485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles resolved GROOVY-5485.
---------------------------------
Resolution: Fixed
No STC error for script in Groovy 4
> Better static compilation error message for primitive reassignment
> ------------------------------------------------------------------
>
> Key: GROOVY-5485
> URL: https://issues.apache.org/jira/browse/GROOVY-5485
> Project: Groovy
> Issue Type: Improvement
> Components: Compiler
> Affects Versions: 2.0-rc-1
> Reporter: Peter Ledbrook
> Priority: Major
> Attachments: test-static.groovy
>
>
> See the attached script. Basically, running it produces this error:
> {noformat}
> [Static type checking] - Cannot find matching method
> test-static#plus(java.lang.Object, int)
> {noformat}
> when in fact, the variable passed in as the first argument should be inferred
> as an 'int', and the re-assignment of an object to `runningTotal` should be
> recognised.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)