-
-
Notifications
You must be signed in to change notification settings - Fork 621
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 associatedtype generics #1345
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
acbe0c3
Preliminary associatedtype support
art-divin 7d69e1b
Implemented associatedtype support with generic requirements
art-divin 722a139
Fixed failing test
art-divin c6e3922
Squashed commit of the following:
art-divin e3bf9ac
Removed test code
art-divin fbcc880
Removed comment
art-divin 93da284
Updated Linux classes
art-divin 339379f
update internal boilerplate code.
art-divin a15d058
Updated generated code
art-divin 1277046
Removed warnings
art-divin 4e6aab9
Updated expected file
art-divin dda591f
Updated expected file
art-divin 404e50d
Adjusted protocol type for Linux
art-divin 56c7c16
Removed protocol composition due to Swift compiler crash under Linux
art-divin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@art-divin i'm digging into a regression that I have run into and I want to confirm if this change is the culprit or not...
I have the following example:
For the
Bar
associated type inside theFoo
protocol, this change causestypeMap["Bar"]
to be set toFooValue
.When I dump the parsed AST for
Baz
, I get expected values from the type of the stored variable, but I get the wrong type from the initialiser parameter:I have a hunch that the issue comes in two parts:
typeName
the same way that the store variable does:I can try to dig further, or put this into an issue, but I wanted to check to see if this is something that you're actively aware of atm?
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @liamnichols ,
amazing work! Very nice of you sharing this 🤝
Sounds like it, there were and still are a number of features related to associated types which are not supported at all.
Previously they were completely ignored when mocks were being generated during to missing metadata.
If you can, sure, that would be awesome -> creating an issue, digging further... Sounds like a plan!
To answer your question, I am not aware of this regression and I really appreciate the code sample of things not working as expected in your comment here.
If you would be able to at least provide "Expected" and "Actual" sections in your issue, say, if you cannot fix this at your convenience,
it would play a crucial role in speeding up the investigation and the fix in future. 🙏