Skip to content

Conversation

nate-chandler
Copy link
Contributor

When a type is appended to the mangling, if that type has a type parameter, provide the relevant generic signature with it.

rdar://161968922

When a type is appended to the mangling, if that type has a type
parameter, provide the relevant generic signature with it.

rdar://161968922
@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test

auto canTy = substTy->getCanonicalType();
appendType(canTy, nullptr);

GenericSignature signature;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@slavapestov Is there a better way to obtain this† signature?

† Or the one this ought to be.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have no idea what this function is doing, but calling GenericSignature::get() directly with a bunch of random requirements is unlikely to be meaningful.

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the given sig is the generic signature of the callee. We also need to pass down the generic signature of the caller.

Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't figure out a nice way to plumb this down. GenericSpecializationMangler is a tangled mess. This should work though: #84765

@nate-chandler nate-chandler marked this pull request as ready for review October 7, 2025 21:56
@nate-chandler nate-chandler requested review from slavapestov and removed request for eeckstein and jckarter October 7, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants