-
Notifications
You must be signed in to change notification settings - Fork 833
WIP: Improve error reporting: Recursive async functions #1180
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
Conversation
src/fsharp/TypeChecker.fs
Outdated
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.
Will misuses of "yield" now report an error about "return"? Test cases for that?
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.
Can we distinguish the two?
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.
uh just saw I didn't commit any of my tests. oups.
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.
@dsyme do you know a sample that would create infinite types using yield?!
And I think the code is only triggered from with CE that are not seq
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.
@Tarmil gave the following code sample.

So indeed we have a false positive. Adding as test case and trying to fix it.
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.
/// F# syntax: yield expr
/// F# syntax: return expr
/// Computation expressions only
| YieldOrReturn of (bool * bool) * SynExpr * range
@dsyme should we split that in ast.fs? Maybe in separate PR?
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.
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.
|
Awesome. The code looks just fine. I do still wonder if we should say something more than "types can't be unified", given we know there is a specific reason for this (one type would be included in the other, the types would be infinite etc.). |
|
yes we can improve on the wording. I just think we should avoid to talk about "infinite types" here. Even if this is the correct term it's probably a term that only very few people know. maybe we could use wording that talks about an "infinite loop while unifying". That is maybe a little less correct but I assume everyone has already seen an infinite loop. |
|
@forki Any idea why AppVeyor is no longer showing in the list of CI builds? |
|
I think I saw a comment from @otawfik-ms that he removed the appveyor trigger. |
|
@forki Oh, ok. @otawfik-ms can you confirm? I don't mind as long as what we have is reliable - I'm just a creature of habit and I'm used to AppVeyor. I haven't learned Jenkins yet, but I'll start. @otawfik-ms Can you make sure either @forki or myself or both have admin access on Jenkins please? And @KevinRansom too. Thanks. |
|
@dsyme @forki Jenkins is the main CI server for all dotnet projects now. Roslyn/other dotnet projects will be using it, with much better support for updates, parallel execution, and it is much faster (we are running all tests in CI now). |
3eaa065 to
3d90dee
Compare
|
just for fun, this is what elm gives for something similar: |
7c087f0 to
c0bbad6
Compare
|
ci_part2 failed: |
|
Yeah I'm trying like crazy to find the correct Regex. I think I tried like
|
|
@KevinRansom @enricosada any ideas why it doesn't match? |
9e8a92e to
3170fb0
Compare
|
this is seriously driving me nuts. I can't see the error in my regex. |
|
try multiple also span="(7,30)" is ok? i think the error message has more characters |
|
That's where it starts. Tbh I only want to check for the "consider" part.
|
|
Thanks so much Kevin. Didn't understand what was wrong.
|



This does two things: