D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20059 - mismatched function return type inference should give location of inferred type
Summary: mismatched function return type inference should give location of inferred type
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 enhancement
Assignee: No Owner
URL:
Keywords: diagnostic, pull
Depends on:
Blocks:
 
Reported: 2019-07-17 07:40 UTC by Nicholas Wilson
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nicholas Wilson 2019-07-17 07:40:43 UTC
Currently the error message looks like

fail_compilation/ice10212.d(12): Error: mismatched function return type inference of `int function() pure nothrow @nogc @safe` and `int`
and doesn't tell you where it inferred that the return type of the function is int.

it should say 

fail_compilation/ice10212.d(12): Error: mismatched function return type inference of int function() pure nothrow @nogc @safe and int (inferred at fail_compilation/ice10212.d(12))
Comment 1 Dlang Bot 2019-07-17 08:10:04 UTC
@thewilsonator created dlang/dmd pull request #10190 "Fix issue 20059 - mismatched function return type inference should gi…" fixing this issue:

- Fix issue 20059 - mismatched function return type inference should give location of inferred type

https://github.com/dlang/dmd/pull/10190
Comment 2 Dlang Bot 2019-07-18 05:22:49 UTC
dlang/dmd pull request #10190 "Fix issue 20059 - mismatched function return type inference should gi…" was merged into master:

- 6429854c8df733e18e0ce30a6649f46edaf54871 by Nicholas Lindsay Wilson:
  Fix issue 20059 - mismatched function return type inference should give location of inferred type

https://github.com/dlang/dmd/pull/10190