Why not? IntelliJ can do exactly that for Java code -- right-click on a variable and choose "dataflow to here". Even in large projects, it's practically instantaneous. Of course, in Java you don't need that much information for autocompletion since you can just look at the static types.
The same kind of global dataflow analysis would have to be approximate in a dynamic language, but I'd still expect it to be better than nothing.