Finish the migration from ImportedTypeName over to TranslatedType#8
Merged
Conversation
TranslatedType captures more information about how the type is represented in Swift, Java, and the intermediate stages in between.
When determining how to translate a Swift nominal type for Java, go through the nominal lookup mechanism so we will (1) only find types that we actually know about, rather than guessing, and (2) lazily form the imported type record so we can handle seeing types out-of-order.
Member
Author
|
@ktoso I'm going to go ahead and merge this, because I have a follow-up PR that benefits from being separate. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
TranslatedTypecaptures more information about how the type is represented in Swift, Java, and the intermediate stages in between. Migrate all remaining functionality fromImportedTypeNametoTranslatedType.Start resolving translated types through a centralized "lookup" mechanism rather than assuming that the types named in Swift are always going to have Java counterparts. For now, this means we won't try to translate functions that reference types that we don't know will be imported into Java. In the future, it means we'll be able to reason about these types to (e.g.) pass arguments and return values of those types correctly across the Swift/Java barrier.