rustboot: order of types in error message is not correct
Opened this issue · 1 comments
Deleted user commented
In a "mismatched types" error message the "found" and "expected" types are the wrong way around - for example if a function with an int arg is called with a uint the message is
error: mismatched types: expected uint but found int
it should be
error: mismatched types: expected int but found uint
See http://gist.github.com/564513#file_me.rs
The error message (a Type_error exception) stems ultimately from type.ml:187
Changing
| Some a, _ -> demand a b
to
| Some a, _ -> demand b a
in type.ml:185 makes it show the 'correct' message but I do not know if this is the proper fix.
pcwalton commented
Should be fixed now. Feel free to reopen if this reappears.