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 swift optional newtype #72

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

josephsumabat
Copy link
Contributor

@josephsumabat josephsumabat commented Nov 7, 2023

Generate optional newtypes correctly, so the property itself is optional rather than the content of the Tagged type

@josephsumabat josephsumabat force-pushed the joseph/swift-optional-newtype-fix branch from 1872596 to 8c1eb9d Compare November 7, 2023 23:00
@josephsumabat josephsumabat force-pushed the joseph/swift-optional-newtype-fix branch from 8c1eb9d to 60e07a1 Compare November 7, 2023 23:08
@@ -1,4 +1,4 @@
struct Newtype {
typealias NewtypeTag = Tagged<Newtype, Int?>
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this test testing? Will a single Maybe still generate this question mark, because it should not

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 it does the right thing in your other PR - should we add a test for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the nested Maybe case

@sebastienwindal sebastienwindal self-requested a review December 13, 2023 21:38
@josephsumabat josephsumabat merged commit cb68ca2 into master Dec 13, 2023
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.

3 participants