Skip to content

jextract: Support fully qualified type names#576

Merged
ktoso merged 2 commits intoswiftlang:mainfrom
sidepelican:self_module_name
Feb 27, 2026
Merged

jextract: Support fully qualified type names#576
ktoso merged 2 commits intoswiftlang:mainfrom
sidepelican:self_module_name

Conversation

@sidepelican
Copy link
Contributor

Currently, types containing a module prefix are not recognized correctly.
This is because it searches for the type including that module name.

public struct MyValue {}

// Not exported
public func fullQualifiedType() -> MyModule.MyValue

By utilizing the symbol table, I will change it so that if a known imported type name appears first, it can be searched by ignoring that part.

@sidepelican sidepelican requested a review from ktoso as a code owner February 27, 2026 07:25
}

let javaType: JavaType = .class(package: nil, name: swiftNominalType.nominalTypeDecl.name)
let javaType: JavaType = .class(package: nil, name: swiftNominalType.nominalTypeDecl.qualifiedName)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a secondary bug found incidentally🤣

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.

Looks great afaics, thank you!

@ktoso ktoso merged commit 2793d4a into swiftlang:main Feb 27, 2026
50 checks passed
@sidepelican sidepelican deleted the self_module_name branch February 27, 2026 07:46
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