Ok, I have looked into this one in detail. The issue was triggered by "NS" (Nathanael?) in update 5700 (which Ken was unsure if it ever got properly reviewed btw) were he changed "self selectionAsStream" to "self selection string" in #evaluateSelection.
The result of that change is that instead of passing a ReadStream with a position into the full text, it passes only the selected code into the Parser. That works fine until the Compiler starts to try to givinng feedback using instvar requestor.
Those methods, like for example when it tries to correct a selector (this one was caught by Frank's patch) or when it reports a compilation error (not caught by Frank's patch) then thinks that the position it has are absolute and can be used in messages to requestor. But they are now relative.
Also, I note that there is still a sender of #selectionAsStream, namely when you choose "debug it". Given Frank's patch that case is now instead broken.
My conclusion: 1. Nathanael just did this little change as a side thought, otherwise he wouldn't have missed the other sender of #selectionAsStream. 2. If we indeed want the Parser to work like this then we need to fix quite a few places more - Frank's patch just isn't enough.
Recommendation:
Unless someone stands up and fixes this thoroughly so that there are no more senders of selectionAsStream ("debug it" works too), and syntax errrors are also fixed to work etcetc, I think we should back this change out and revert back to "self selectionAsStream".
regards, Gran
squeak-dev@lists.squeakfoundation.org