[Issue 7372] Error provides too little information to diagnose the problem (error: undefined identifier)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 5 23:26:33 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=7372

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #14420 "Add supplemental scope info to mixin T; errors -
Fix issue 7372 - Error provides too little information to diagnose the problem
(error: undefined identifier)" was merged into master:

- 158c37c76ec15b0bb30866e1557cef936d614d5d by WebFreak001:
  Add supplemental scope info to mixin T; errors

  Fix issue 7372 - Error provides too little information to diagnose the
problem (error: undefined identifier)

  Mixin templates are often defined inside libraries and may require the
  definition of certain symbols alongside them (for example a text
  templating library mapping struct fields to HTML text blocks could
  attempt to simply access member variables) - Fixing compilation errors
  where such identifiers are not found would then usually not require
  code changes inside the library, but rather in the user code, where the
  mixin is written.

  So this PR adds a supplemental `parent scope from here: '...'` message,
  which may be used from IDEs to show errors on the mixin line or just for
  the user to read it in the command line and see where in the user code
  the error originates from.

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

--


More information about the Digitalmars-d-bugs mailing list