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
Original bug ID: 5523 Reporter:@alainfrisch Assigned to:@garrigue Status: assigned (set by @garrigue on 2012-03-07T07:02:20Z) Resolution: open Priority: normal Severity: feature Target version: later Category: typing Tags: patch Monitored by:@ygrek
Bug description
It would be useful if the type-checker could report the inferred type for the sub-expression when a coercion is detected as being non-principal. It would make it simpler to copy and paste this type to the source code in order to make the coercion principal.
This makes sense, but there is an unfortunate difficulty:
warnings are strings, whereas printing a type requires a formatter.
Of course one can input a type to a string, but the layout may not
be as expected.
What about turning Warnings.message into a printer
(with a formatter argument), and using the standard trick to count the number of printed lines (i.e. redirecting the "newline" method of the formatter; should probably be done in Location.print_warning, by the way)?
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 5523
Reporter: @alainfrisch
Assigned to: @garrigue
Status: assigned (set by @garrigue on 2012-03-07T07:02:20Z)
Resolution: open
Priority: normal
Severity: feature
Target version: later
Category: typing
Tags: patch
Monitored by: @ygrek
Bug description
It would be useful if the type-checker could report the inferred type for the sub-expression when a coercion is detected as being non-principal. It would make it simpler to copy and paste this type to the source code in order to make the coercion principal.
File attachments
The text was updated successfully, but these errors were encountered: