Community
Participate
Working Groups
Usecases: Expected type in a for loop is either Iterable or an array. We cannot use MultiTypeReferences for this usecase as that would imply that the expected type is both an iterable and an array. Other opportunities: A string literal '123' could be either a String or a Number. 'c' could either be a String or a character. IntegerLiteral 12345 could be Integer, Long, Short (but not byte since it is to big) as well as BigInteger or BigDecimal. The type provider could return synonym type references for operations that return e.g. an array or a list. SynonymTypeReferences could have a primary type and a number of synonyms.
We already have something like a synonym type reference and it turned out to be only of limited value. In most cases we know which type was expected and therefore I don't see much benefit in enhancing the existing concepts further. Marked as resolved.
Requested via bug 522520. -M.