Same named parts work with imports and shadowing. I think so, since the expanded trees are always parameters of methods, and the same-named parts are definitions in the method scope. So imports cannot shadow. On the other hand, imports can mess up things. because they can make things ambiguous. (Test case left as an exercise). I think it's not severe enough to require a more complicated solution, though.