Skip to content

Conversation

@rintaro
Copy link
Member

@rintaro rintaro commented Jul 30, 2025

Limited generic parameter support in JExtract

  • Integrate SwiftLexicalLookup for unqualified type lookups. This is required to find the generic parameter declaration from parameter types.
  • Introduce SwiftTypeLookupContext as a facade for SwiftLexicalLookup and a cached conversion from Syntax to SwiftTypeDeclaration instance. This wraps and replaces SwiftSymbolTable.
  • Introduce SwiftGenericParameterDeclaration as a subclass of SwiftTypeDeclaration to represent generic parameters.
  • Store generic parameters and requirements in SwiftFunctionSignature.
  • SwiftType.representativeConcreteTypeIn() for getting Data from T: DataProtocol type.

@rintaro rintaro force-pushed the jextract-generic-parameters branch 2 times, most recently from 1a7df9e to 51b5ab6 Compare July 30, 2025 20:09
Copy link
Collaborator

@ktoso ktoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very exciting, looking good! :-)

@rintaro rintaro force-pushed the jextract-generic-parameters branch from 024b932 to 131f09f Compare July 30, 2025 23:35
* Integrate `SwiftLexicalLookup` for unqualified type lookups
* Introduce `SwiftTypeLookupContext` as a facade for `SwiftLexicalLookup`
  and a cached conversion from Syntax to `SwiftTypeDeclaration`
  instance. This wraps and replaces `SwiftSymbolTable`.
* Introduce `SwiftGenericParameterDeclration` as a subclass of
  `SwiftTypeDeclaration` to represent generic parameters.
* Store generic parameters and requirements in `SwiftFunctionSignature`.
* `SwiftType.representativeConcreteTypeIn()` for getting `Data` from
  `T: DataProtocol` type.
@rintaro rintaro force-pushed the jextract-generic-parameters branch from 131f09f to 7fcdbe8 Compare July 31, 2025 00:03
@rintaro rintaro marked this pull request as ready for review July 31, 2025 00:04
@ktoso ktoso merged commit 7f24d62 into swiftlang:main Jul 31, 2025
29 checks passed
@rintaro rintaro deleted the jextract-generic-parameters branch July 31, 2025 03:05
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.

2 participants