Skip to content

[ModuleInterface] Print names for @usableFromInline struct properties #19465

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

Merged
merged 1 commit into from
Sep 26, 2018

Conversation

jrose-apple
Copy link
Contributor

Because they weren't 'public' we were treating them as layout-only properties and printing var _, but they get referenced in inlinable functions. We need the actual name!

Because they weren't 'public' we were treating them as layout-only
properties and printing `var _`, but they get referenced in inlinable
functions. We need the actual name!
@jrose-apple
Copy link
Contributor Author

@slavapestov This check comes up a lot. I wonder if it's worth making an accessor for, or if that's going to be a pitfall.

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor

@jrose-apple Is it not the same as getEffectiveAccess() >= Public?

@jrose-apple
Copy link
Contributor Author

No, that would include testable things too. This is still a Swift-level query, not a SIL-level query.

@jrose-apple
Copy link
Contributor Author

Hey. @swift-ci.

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor

@jrose-apple Do generated interfaces need to include effectively-public-because-of-enable-testable things? Because then anything that's @usableFromInline becomes effectively public by virtue of being internal.

@jrose-apple
Copy link
Contributor Author

Generated interfaces are currently not scoped for use for testable things, and testable things aren't checked for all the additional Sema rules today. But no one's been testing -enable-testing with -enable-resilience, so it wouldn't surprise me if there are holes because of that.

@jrose-apple
Copy link
Contributor Author

@slavapestov Any further comments for now?

@jrose-apple jrose-apple merged commit 61057b8 into swiftlang:master Sep 26, 2018
@jrose-apple jrose-apple deleted the namely branch September 26, 2018 21:57
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