[Checkers] Question about resolving type variables

Mahmood Ali mahmood at MIT.EDU
Sat Mar 22 21:47:18 EDT 2008

Hi guys,

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?

- Mahmood

More information about the checkers mailing list