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
type.accessLevel returns empty string for all types that are not custom. #325
Comments
I believe extensions themselves do not have access level, at least SourceKit does not return such information (try The other problem is that Sourcery does not have any means to distinguish conformance to protocols through extensions in Depending on your use case maybe there is a better workaround for that. But if |
@Sajjon does this answer your question? |
@Sajjon could you please follow-up for @ilyapuchka's question? |
@ilyapuchka @Antondomashnev sorry for inactivity! We do not get any information at all since Sourcery does not work for UIKit types, but rather our own types, as discussed here. So we can close this one. |
What?
accessLevel
returns empty string for UIKit, Foundation and probably allApple
types.Environment
Swift
Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
Target: x86_64-apple-macosx10.9
Sourcery
0.6.0
Example
Given the stencil
Results in:
So my fix is using the macro
accessModifierOf
but printingpublic
and notPUBLIC
of course (just wrote that to highlight thattype.accessLevel
) returns an empty string.The text was updated successfully, but these errors were encountered: