Time: 22 March 2020, 12:09:37.99656 am
Reverts Morphic-ct.1606, which attempted to solve an issue around interactive parser selections on the wrong way and introduced a new regression.
To reproduce this new regression, in an interactive environment (no automatic variable declarations! u could use an empty browser, for example), try to printIt:
Answer the UnknownVariable dialog with "declare method temp".
| x |
| x |
Let me explain:
In Morphic-ct.1606, we reverted any selection change that occured during the interactive compilation. While this is fine for warnings that can be accepted only, by that change we neglected the fact that certain parser notifications actually modify the source and thus need to permanently adjust the selection. This is what we depend on for a correct functionality of #declareTemp:at: and others. See also #correct:from:to:.
Instead, the actual bug occurs in the parser, where #queryUndefined forgets to reset the selection after the UndefinedVariable warning has been skipped. Other error correction tools know how to do this correctly, for example #correctVariable:interval:. This bug will be fixed in straightly the next commit. Sorry for the trouble! Load together with Compiler-ct.423 only.
=============== Diff against Morphic-eem.1638 ===============
Item was changed:
----- Method: TextEditor>>evaluateSelectionAndDo: (in category 'do-its') -----
"Treat the current selection as an expression; evaluate it and invoke aBlock with the result."
+ | result rcvr ctxt |
- | result rcvr ctxt selectionInterval |
self lineSelectAndEmptyCheck: [^ nil].