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

Fill in extended existential support for type(of:) and mirror #72943

Merged
merged 3 commits into from
Apr 11, 2024

Conversation

tbkka
Copy link
Contributor

@tbkka tbkka commented Apr 10, 2024

type(of:) now returns the dynamic type of the contents of an extended existential (just like it does for a regular existential)

Mirror can now reflect fields of a value stored inside an extended existential (just like it can with a regular existential). This requires type(of:) support, since Mirror internals use that to determine how to reflect a value.

Resolves rdar://102906195

type(of:) now returns the dynamic type of the contents of
an extended existential (just like it does for a regular existential)

Mirror can now reflect fields of a value stored inside an extended
existential (just like it can with a regular existential).  This
requires type(of:) support, since Mirror internals use that to
determine how to reflect a value.

Resolves rdar://102906195
@tbkka tbkka requested a review from slavapestov April 10, 2024 00:44
@tbkka tbkka requested review from a team, mikeash and al45tair as code owners April 10, 2024 00:44
}
}

mirrors.test("Extended Existential (metatype)") {
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 Can you think of a better way to verify the mirror support here? I have checked in a debugger that it does actually hit the expected case inside the Mirror implementation.

@tbkka
Copy link
Contributor Author

tbkka commented Apr 10, 2024

@swift-ci Please test

@tbkka
Copy link
Contributor Author

tbkka commented Apr 10, 2024

@swift-ci Please test

@tbkka tbkka merged commit 9f2acb2 into swiftlang:main Apr 11, 2024
5 checks passed
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.

1 participant