-
Notifications
You must be signed in to change notification settings - Fork 805
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
FS0193: ConstraintSolver error #5580
Comments
Further reduced repro: type Complex = unit
type Polynomial () =
static member (*) (s: decimal, p: Polynomial) : Polynomial = failwith ""
static member (*) (s: Complex, p: Polynomial) : Polynomial = failwith ""
module Foo =
let test t (p: Polynomial) = (1.0 - t) * p Quick look shows that the error doesn't recover, so that's likely the bug. |
Leaking of this internal error is a regression. |
Is it solved with @TIHan's latest recovery fix?
Phillip Carter <[email protected]> schrieb am Di., 4. Sep. 2018,
17:59:
… Leaking of this internal error is a regression.
F# 4.0: ***@***.***/GlisteningBoilingQuagga
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5580 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNDeGPyky-h9LeOqq2aw6--_PTNZ3ks5uXqNUgaJpZM4WYEIq>
.
|
@forki it is not resolved with the recovery fix. I just tested it. |
I found the PR that caused this, and the exact changes: https://github.com/Microsoft/visualfsharp/pull/1650/files#diff-641da7c52ffc888699888ebd03559cb5R1285 I came across this by looking at all the history of changes in ConstraintSolver.fs. Reverting lines 1285 - 1288 will fix this issue. I need to look at this more to see what it is doing. |
Quote from @dsyme regarding #1650
It looks like we were aware of this internal error, but have no found a proper fix to resolve it. Reverting the PR causes other issues, so we have to figure out exactly what is going on to stop the internal error. |
Found another repro for this internal error. FAKE5 script:
Annotating |
Would be good to have a repro that wasn't a FAKE 5 script i.e. a normal F# project ZIP with exact version of Giraffe thanks |
Here it is: |
I'm getting a compiler error message of:
Reproduce steps
Minimal Example in Sharp Lab
Expected behavior
Compiler should report type constraint mismatch for the function
test
.Actual behavior
Compiler exception when solving the constraint.
Known workarounds
Deleting either of the
*
overloads forPolynomial
causes the compiler to display a sensible error. Replacing the float literals of1.0
&0.5
with decimal literals1.0m
&0.5m
fixes the compiler errors.The text was updated successfully, but these errors were encountered: