Repository navigation
Read nd and or as the operators they stand for - #866
Merged
Merged
Conversation
A `where` clause holding `and` stopped at the word and answered with the block that did not follow it, then with a type error about a body the parser never reached. The resolver has had the right answer since #213 and never got to give it: a bare name is only an expression where a statement can start, and a contract clause is not one. Across the eighteen recorded model runs the word reached the parser seventeen times and the resolver zero. DEED2020 now. The word is read in the operator's position, with the operator's precedence, so the clause is the one that was written and the fix is a word for a symbol. `not` goes in front of a value rather than between two and still reaches the resolver.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #865.
A
whereclause holdingandstopped at the word, answered with the blockthat did not follow it, and then with a type error about a body the parser
never reached. The resolver has had the right answer since #213 and never got
to give it: a bare name is only an expression where a statement can start, and
a contract clause is not one. Counted across the eighteen recorded model runs,
the word reached the parser seventeen times and the resolver zero.
The word is now read in the operator's position, with the operator's
precedence, so
n > 0 and n < 10 or n == 20parses to the tree the symbolswould have given. That is the part worth arguing about: reporting and stopping
would leave the same cascade, and reporting and dropping would leave a clause
that says less than the one that was written. The repair is a word for a
symbol with nothing else in it, so it is applied rather than offered.
Before and after on the program that found it:
deed fixwrites it and the file then checks clean.notis a different shape and is left where it is: it goes in front of a valuerather than between two, so it is still an expression the resolver sees. The
resolver test now says which half is whose.
Break checked: giving
andthe wrongBinaryOpfails the tree test by name.Investigated with AI assistance.