[ https://issues.apache.org/jira/browse/GROOVY-11289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles resolved GROOVY-11289.
----------------------------------
Fix Version/s: 5.0.0-alpha-6
Resolution: Fixed
https://github.com/apache/groovy/commit/cee537d4765aa0aa2f5ba47c5713255bbaf78432
> STC: error message for improper property initialization includes internal "<UnionType:"
> ---------------------------------------------------------------------------------------
>
> Key: GROOVY-11289
> URL: https://issues.apache.org/jira/browse/GROOVY-11289
> Project: Groovy
> Issue Type: Improvement
> Components: Static Type Checker
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 5.0.0-alpha-6
>
>
> Consider the following:
> {code:groovy}
> class C {
> void setP(java.util.regex.Matcher matcher) {}
> void setP(java.util.regex.Pattern pattern) {}
> }
> @groovy.transform.TypeChecked test() {
> new C(p: new Object())
> }
> {code}
> STC says "Cannot assign value of type java.lang.Object to variable of type <UnionType:java.util.regex.Matcher+java.util.regex.Pattern>"
--
This message was sent by Atlassian Jira
(v8.20.10#820010)