Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BridgeJS: Fix nested type resolution for MemberTypeSyntax (e.g., Networking.API.Method)#433

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@krodak
Copy link
Member

Issue

Currently for functions that would be using nested types like:

@JSfunc echoNetworkingAPIMethod(_ method:Networking.API.Method)->Networking.API.Method{}

We'd get following error:

error: Unsupported type: Networking.API.MethodHint: Only primitive types and types defined in the same module are allowed

Issue is that currentlylookupType(for only handlesIdentifierTypeSyntax, henceMemberTypeSyntax likeNetworking.API.Method would not be resolved to a valid declaration.

Fix

Centralized type resolution inTypeDeclResolver with a newresolve(_: TypeSyntax) API and used it inExportSwift to map nested enums/classes/actors toBridgeType. This should help with nested types resolution, while exported ABI remains unchanged for already-supported types.
New tests were added toprelude.mjs to confirm the fix.

@krodakkrodak self-assigned thisAug 26, 2025
Copy link
Member

@kateinoigakukunkateinoigakukun left a comment

Choose a reason for hiding this comment

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

Thanks!

@kateinoigakukunkateinoigakukun merged commitcb337e7 intoswiftwasm:mainAug 26, 2025
17 of 18 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@kateinoigakukunkateinoigakukunkateinoigakukun approved these changes

Assignees

@krodakkrodak

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@krodak@kateinoigakukun

[8]ページ先頭

©2009-2025 Movatter.jp