-
Notifications
You must be signed in to change notification settings - Fork 832
Type checker: recover on checking binding parameter constraints #19046
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
|
|
||
| neg68.fsx(71,46,71,47): parse error FS0010: Unexpected symbol ')' in binding. Expected incomplete structured construct at or before this point or other token. | ||
| neg68.fsx(138,15,138,16): typecheck info FS3370: The use of '!' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change '!cell' to 'cell.Value'. | ||
|
|
||
| neg68.fsx(158,24,158,26): typecheck info FS3370: The use of ':=' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change 'cell := expr' to 'cell.Value <- expr'. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,7 +68,7 @@ type sRealTime | |
| [<Measure>] | ||
| type pixels | ||
|
|
||
| let G = 6.67e-11<m ^ 3 / (kg s^2))> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its not really a "neg" test anymore, isn't it? If you kept the superfluous paren to maintain this being a neg test, is the recovery same/better ?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it felt like this test doesn't test anything useful given how the errors flow in that file. I can remove it for sure. |
||
| let G = 6.67e-11<m ^ 3 / (kg s^2)> | ||
| let m_per_AU = 149597870691.0<m/AU> | ||
| let AU_per_m = 1.0/m_per_AU | ||
| let Pixels_per_AU = 200.0<pixels/AU> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,3 @@ | ||
| neg68.fsx(138,15,138,16): typecheck info FS3370: The use of '!' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change '!cell' to 'cell.Value'. | ||
|
|
||
| neg68.fsx(71,46,71,47): parse error FS0010: Unexpected symbol ')' in binding. Expected incomplete structured construct at or before this point or other token. | ||
|
|
||
| neg68.fsx(71,32,71,33): typecheck error FS0062: This construct is for ML compatibility. Consider using the '+' operator instead. This may require a type annotation to indicate it acts on strings. This message can be disabled using '--nowarn:62' or '#nowarn "62"'. | ||
|
|
||
| neg68.fsx(71,30,71,46): typecheck error FS0001: This expression was expected to have type | ||
| 'float' | ||
| but here has type | ||
| 'string' | ||
|
|
||
| neg68.fsx(71,30,71,31): typecheck error FS1133: No constructors are available for the type 'm' | ||
|
|
||
| neg68.fsx(71,43,71,44): typecheck error FS0062: This construct is for ML compatibility. Consider using the '+' operator instead. This may require a type annotation to indicate it acts on strings. This message can be disabled using '--nowarn:62' or '#nowarn "62"'. | ||
|
|
||
| neg68.fsx(71,39,71,45): typecheck error FS0001: The type 'string' does not match the type 'int' | ||
|
|
||
| neg68.fsx(71,39,71,41): typecheck error FS1133: No constructors are available for the type 'kg' | ||
|
|
||
| neg68.fsx(71,44,71,45): typecheck error FS0001: This expression was expected to have type | ||
| 'string' | ||
| but here has type | ||
| 'int' | ||
|
|
||
| neg68.fsx(123,40,123,41): typecheck error FS0001: The type 'bool' does not match the type 'float<'u>' | ||
|
|
||
| neg68.fsx(123,38,123,39): typecheck error FS0043: The type 'bool' does not match the type 'float<'u>' | ||
| neg68.fsx(158,24,158,26): typecheck info FS3370: The use of ':=' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change 'cell := expr' to 'cell.Value <- expr'. |
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.
Please add more explanation as code comment why it is fine to gave an all-catching try block here, this might not be obvious for future readers.
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's just like in other places where it felt safe to recover and continue To be honest, I don't even know what to write in such a comment so it wouldn't be just stating that we're recovering...