Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Issue 23087 - getLinkage trait regression for overloads with v2.100.0-rc.1 #14072

Merged
merged 1 commit into from May 4, 2022

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented May 4, 2022

Since #13942, function linkages are not resolved early, and the use of getOverloads as per this test creates a new FuncAliasDeclaration for the __ctor overload, which leaves the linkage unset. Running functionSemantic on the alias doesn't set the linkage either, because _scope is null for function aliases as well.

There's two ways to possibly go about this:

  1. Copy/propagate the linkage from FuncDeclaration to FuncAliasDeclaration immediately after new'ing it.
  2. Get the underlying FuncDeclaration from this alias at the point of reading the linkage.

This patch does the latter (2).

@ibuclaw ibuclaw added Bug Fix Easy Review Industry Applies to PRs pertaining to industry applications of D labels May 4, 2022
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Auto-close Bugzilla Severity Description
23087 regression getLinkage trait regression for overloads with v2.100.0-rc.1

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 "stable + dmd#14072"

@ibuclaw ibuclaw requested a review from kinke May 4, 2022 13:39
@adamdruppe
Copy link
Contributor

oh dmd how i love you

Copy link
Contributor

@kinke kinke left a comment

Choose a reason for hiding this comment

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

Oh wow, super-quick analysis and fix, thx a lot!

@kinke kinke merged commit 62582de into dlang:stable May 4, 2022
@ibuclaw ibuclaw deleted the issue23087 branch May 4, 2022 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Easy Review Industry Applies to PRs pertaining to industry applications of D
Projects
None yet
6 participants