You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently when implementing Combine and Delay CE members the error reporting uses the the complete ranges of all the expressions involved. e.g.
Describe the solution you'd like
Instead of using the complete range, we should be using the ranges of the expressions after the first one as this are the expressions that we are trying to Combine
typeListBuilder()=memberthis.Yield(x)=[x]memberthis.For(m,f)=
m |> List.collect f
memberthis.Combine(a,b)=
List.concat [a;b]// member this.Delay(f) = f()letlistBuilder=new ListBuilder()letresult= listBuilder {leta=10yield a
iftruethen^^^^^^^^^^^^yield20^^^^^^^^else^^^^yield30^^^^^^^^}
Alternatively we can only uses the range for the places where we are actually using return or yield. For this we will need to use error recovery errorR but that might show errors hidden on purpose due to unhandled cases in the following phases.
typeListBuilder()=memberthis.Yield(x)=[x]memberthis.For(m,f)=
m |> List.collect f
memberthis.Combine(a,b)=
List.concat [a;b]// member this.Delay(f) = f()letlistBuilder=new ListBuilder()letresult= listBuilder {leta=10yield a
iftruethenyield20^^^^^elseyield30^^^^^}
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Is your feature request related to a problem? Please describe.
Currently when implementing
Combine and Delay
CE members the error reporting uses the the complete ranges of all the expressions involved. e.g.Describe the solution you'd like
Instead of using the complete range, we should be using the ranges of the expressions after the first one as this are the expressions that we are trying to
Combine
Alternatively we can only uses the range for the places where we are actually using
return
oryield
. For this we will need to use error recoveryerrorR
but that might show errors hidden on purpose due to unhandled cases in the following phases.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
If the issue is about:
Tracking
Error reporting improvements #1103"Tracking
meta issue: parser related changes #11481"Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: