[Issue 17374] Improve inferred attribute error message

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 16 13:46:25 UTC 2021


Steven Schveighoffer <schveiguy at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |schveiguy at gmail.com

--- Comment #2 from Steven Schveighoffer <schveiguy at gmail.com> ---
I think the entire stack from the failed typecheck to the lower-most inferred
function should be printed.

2 ways to do this: 1. run semantic again, but printing the inference results,
or 2. store the line/reason that causes the inference to go the unexpected way.

Note that all attribute inference should be similar (@safe, nothrow, etc), but
probably not dip1000 `scope` or `return` inference, since those aren't
necessarily viral, and typically don't have large stacks of similarly-inferred
templates to diagnose.


More information about the Digitalmars-d-bugs mailing list