[Checkers] Question about resolving type variables
mahmood at MIT.EDU
Sat Mar 22 21:47:18 EDT 2008
Currently, type variables are inferred from the actual arguments
passed if possible. Unfortunately, this may lead to unexpected
results, namely violating backward compatibility. Consider:
List<String> lst = Arrays.asList("1", "m", "n");
Currently, this will issue a type compatibility error, as the return
type of 'Arrays.asList(...)' is List<@Interned String> which is not a
subtype of List<String>.
How do you we should handle this case?
More information about the checkers