Community
Participate
Working Groups
For the following example program: public class Foo { public void bar(){ java.util.Dictionary dd = new java.util.Hashtable(); dd.put(new Object(), new Object()); } } the computed type constraints include: [dd] <= Decl(Dictionary:put(Object, Object)) which leads us to believe that the type of variable dd must be a subtype of Dictionary. However, what could have been computed is the less restrictive: [dd] <= Decl(Dictionary:put(Object, Object)) OR [dd] <= Decl(Map:put(Object, Object)) This would allow greater flexibility in the "Generalize Type" refactoring that I'm currently implementing. Specifically, we could have inferred that type java.util.Map is also allowed for variable dd in this case. -Frank
rootdef calculation bug?
Adam, are you looking at this ?
i'm not right now but i will take it home and think about it