Skip to content

fix Issue 19959 - Eponymous template FQN's re-state the template name#10846

Open
rainers wants to merge 1 commit into
dlang:masterfrom
rainers:issue_19959
Open

fix Issue 19959 - Eponymous template FQN's re-state the template name#10846
rainers wants to merge 1 commit into
dlang:masterfrom
rainers:issue_19959

Conversation

@rainers

@rainers rainers commented Feb 27, 2020

Copy link
Copy Markdown
Member

2 caveats:

@dlang-bot

Copy link
Copy Markdown

Thanks for your pull request, @rainers!

Bugzilla references

Auto-close Bugzilla Severity Description
19959 enhancement Eponymous template FQN's re-state the template name

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#10846"

@rainers rainers force-pushed the issue_19959 branch 2 times, most recently from b23fae7 to bb5da86 Compare February 28, 2020 08:13
Comment thread src/dmd/dsymbol.d Outdated
if (Dsymbol.oneMembers(ti.members, &sym, ident) && sym is p)
continue;

if (auto td = pparent.isTemplateDeclaration())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the logic is duplicated, I suggest moving the check in a function that receives a ScopeDsymbol (or a template function that receives a template instance or a template declaration) so that we save some lines of code.

@rainers

rainers commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Rebased now. Two more issues:

  • typeid(T).name also changes, so this might break code, e.g. when using this for serialization
  • dsymbolsem imported from dsymbol: maybe oneMembers() should be moved into dsymbol as it does not require semantics (though the result might change by running it)

@rainers

rainers commented Jul 3, 2026

Copy link
Copy Markdown
Member Author
  • typeid(T).name also changes

Not for structs, as the name is demangled from the mangled type name in that case.

don't show the identifier again for oneMember template instances and declarations.
@thewilsonator

Copy link
Copy Markdown
Contributor

json output changes, too.

DAutotest fails, what it is acutely testing I am not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants