Commit Graph

5 Commits

Author SHA1 Message Date
Esteban Küber
b6494a7bb4 More accurately point at arguments 2023-08-26 19:25:46 +00:00
Michael Goulet
2c33dfea76 Don't sort strings right after we just sorted by types 2023-06-27 23:31:06 +00:00
Michael Howell
3f374128ee diagnostics: update test cases to refer to assoc fn with self as method 2023-02-22 08:40:47 -07:00
Robin Schroer
a3cf3822d2
Emit a hint for bad call return types due to generic arguments
When the return type of a function call depends on the type of an
argument, e.g.

```
fn foo<T>(x: T) -> T {
    x
}
```

and the expected type is set due to either an explicitly typed
binding, or because the call to the function is in a tail position
without semicolon, the current error implies that the argument in the
call has the wrong type.

This new hint highlights that the expected type doesn't match the
returned type, which matches the argument type, and that that's why
we're flagging the argument type.

Fixes #43608.
2023-01-13 13:34:55 +09:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00