[ https://issues.apache.org/jira/browse/GROOVY-11289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles reassigned GROOVY-11289: ------------------------------------ Assignee: Eric Milles > 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 > > 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)