Commits

Slava Pestov committed 924e4c4e131
SILGen: Clean up lvalue re-abstraction a bit When we emit calls to getters and setters with emitApply(), the call emission code ends up re-abstracting the result of a getter or the parameter to a setter. As a result, getOrigFormalType() was incorrect for logical path components. This was worked around by only adding an OrigToSubst path component to an lvalue if the last path component was physical. This caused a problem in the following case: 1) There was an abstraction difference between the storage of the protocol requirement and the storage of the protocol witness 2) There was an abstraction difference between the storage of the protocol witness, and the fully-substituted type of the witness An example is when the witness is in a protocol extension, and uses 'Self' or some other associated type which is concrete and loadable in the conformance. Fix this properly by splitting up getStorageTypeData() into two functions, one used when adding physical path components and another one used for logical. As a result, we can now give the correct abstraction pattern to logical path components.