-
Notifications
You must be signed in to change notification settings - Fork 824
Fix [Experiment] #18915
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?
Fix [Experiment] #18915
Conversation
❗ Release notes requiredCaution No release notes found for the changed paths (see table below). Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format. The following format is recommended for this repository:
If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request. You can open this PR in browser to add release notes: open in github.dev
|
|> withDiagnostics [ | ||
(Error 1, Line 14, Col 41, Line 14, Col 42, "The type 'bool' does not match the type 'int'") | ||
(Error 1, Line 14, Col 41, Line 14, Col 42, "The type 'int' does not match the type 'bool'") | ||
(Error 1, Line 16, Col 32, Line 16, Col 33, "This expression was expected to have 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.
(Warning 464, Line 15, Col 35, Line 15, Col 42, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") | ||
(Error 5, Line 17, Col 1, Line 17, Col 5, "This field is not mutable") | ||
(Error 1, Line 17, Col 16, Line 17, Col 22, "The type 'decimal<Kg>' does not match the type 'float<Kg>'") | ||
(Error 1, Line 17, Col 16, Line 17, Col 22, "The type 'float<Kg>' does not match the type 'decimal<Kg>'") |
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.
Let's simplify this case a bit to

The situation is similar here, the expected type is explicitly specified and is decimal<Kg>
, but the error message threats it as the actual type.
Also note that the error range is on the second argument, not on the operator. This is due to the fact that in the error
ErrorFromAddingTypeEquation(...ConstraintSolverTypesNotInEqualityRelation(...m1), m2)
the wrong m is taken. But I would fix it in a separate PR.
(1, "Type mismatch. Expecting a\n 'outref<'T>' \nbut given a\n 'inref<'T>' \nThe type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In'") | ||
(1, "Type mismatch. Expecting a\n 'outref<'T>' \nbut given a\n 'inref<'T>' \nThe type 'ByRefKinds.In' does not match the type 'ByRefKinds.Out'") |
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.
No description provided.