Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Consider the following:
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()) }
STC says "Cannot assign value of type java.lang.Object to variable of type <UnionType:java.util.regex.Matcher+java.util.regex.Pattern>"