Skip to content

Conversation

augusto2112
Copy link

Before this patch, generic expression evaluation would only work for a single toplevel generic parameter. This patch expands its capabilities to allow for multiple generic parameters.

@augusto2112
Copy link
Author

@swift-ci test

@@ -91,6 +91,9 @@ class SwiftASTManipulatorBase {
swift::VarDecl::Introducer GetVarIntroducer() const;
bool GetIsCaptureList() const;
bool IsMetadataPointer() const { return m_name.str().startswith("$τ"); }
bool IsOutermostMetadataPointer() const {

Choose a reason for hiding this comment

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

Isn't depth 0 the innermost one?

Copy link
Author

Choose a reason for hiding this comment

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

Just double-checked, 0 is the outermost depth. From the Swift generics book: "The depth identifies a specific generic declaration, starting from zero for the top- level generic declaration and incrementing for each nested generic declaration."

Choose a reason for hiding this comment

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

Good to know!

Before this patch, generic expression evaluation would only work for a
single toplevel generic parameter. This patch expands its capabilities
to allow for multiple generic parameters.
@augusto2112
Copy link
Author

@swift-ci test

@augusto2112 augusto2112 merged commit 785c0b2 into swiftlang:stable/20220421 Dec 15, 2022
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