-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better ranges for CE let!
and use!
error reporting.
#17712
base: main
Are you sure you want to change the base?
Better ranges for CE let!
and use!
error reporting.
#17712
Conversation
❗ Release notes required
|
1f0ec69
to
d618bc8
Compare
61f0d94
to
e94d0b4
Compare
let!
and use!
error reporting.
SynExpr.LetOrUseBang(spBind, ($1 = "use"), true, $2, $4, [], SynExpr.ImplicitZero m, mAll, trivia) } | ||
|
||
| DO_BANG typedSequentialExpr IN opt_OBLOCKSEP typedSequentialExprBlock %prec expr_let | ||
{ let spBind = DebugPointAtBinding.NoneAtDo | ||
let trivia: SynExprLetOrUseBangTrivia = { EqualsRange = None } | ||
let trivia: SynExprLetOrUseBangTrivia = { LetOrUseBangKeyword = Range.Zero; EqualsRange = None } | ||
SynExpr.LetOrUseBang(spBind, false, true, SynPat.Const(SynConst.Unit, $2.Range), $2, [], $5, unionRanges (rhs parseState 1) $5.Range, trivia) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is confusing that we are using SynExpr.LetOrUseBang
to represent DO_BANG
neg61.fs(97,13,97,33): typecheck error FS3143: 'let!', 'use!' and 'do!' expressions may not be used in queries | ||
|
||
neg61.fs(102,13,102,28): typecheck error FS3145: This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now will show
- 1 error when
let!, use! and do!
are involved in queries. - 1 error for for anything else that is not allowed.
Note: we not longer show 2 errors at the same time which seems unnecessary specially when using let!, 'use! and 'do!
Description
Better ranges for CE
let!
anduse!
error reporting. Continuation of #17671Before
let!
in an CE builderlet!
in aquery
builderuse!
in an CE builderuse!
in aquery
builderAfter
let!
in an CE builderlet!
in aquery
builderuse!
in an CE builderuse!
in aquery
builderChecklist