Skip to content

docs: add a section about formal vs lowered types in the SIL documentation #80114

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
Mar 19, 2025

Conversation

eeckstein
Copy link
Contributor

No description provided.

@eeckstein
Copy link
Contributor Author

@swift-ci smoke test

@atrick
Copy link
Contributor

atrick commented Mar 19, 2025

@eeckstein @slavapestov I've never seen documentation explain the most confusing part to me.
If I have a lowered type, and I walk that type or ask for one of its component types, won't I get back a formal type? So don't I need to explicitly ask for the lowered type every time I do that?
A lowered function type has formal parameter types right!

@eeckstein
Copy link
Contributor Author

So don't I need to explicitly ask for the lowered type every time I do that?

Yes I think so. For example, that's what's happening in SILType::getFieldType which gets the field types of e.g. a struct.

@meg-gupta
Copy link
Contributor

thanks!

@atrick
Copy link
Contributor

atrick commented Mar 19, 2025

Yes I think so. For example, that's what's happening in SILType::getFieldType

right, maybe it's worth saying something about that. I think that's where we had bugs

@eeckstein eeckstein merged commit 440ca7d into swiftlang:main Mar 19, 2025
3 checks passed
@eeckstein eeckstein deleted the document-types branch March 19, 2025 19: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.

4 participants