Skip to content

Recognize actor (distributed) methods and extensions as Async functions - #895

Merged
ktoso merged 11 commits into
swiftlang:mainfrom
AbdAlRahmanGad:actor-methods
Aug 21, 2026
Merged

Recognize actor (distributed) methods and extensions as Async functions#895
ktoso merged 11 commits into
swiftlang:mainfrom
AbdAlRahmanGad:actor-methods

Conversation

@AbdAlRahmanGad

@AbdAlRahmanGad AbdAlRahmanGad commented Aug 19, 2026

Copy link
Copy Markdown
Member

Fixes #837

Comment thread Sources/SwiftExtract/SwiftTypes/SwiftFunctionSignature.swift Outdated
@ktoso

ktoso commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Also a test with a nonisolated func and a @concurrent func inside the actors would be good, those are not isolated to the actor.

@AbdAlRahmanGad
AbdAlRahmanGad marked this pull request as ready for review August 20, 2026 10:04
@AbdAlRahmanGad AbdAlRahmanGad changed the title Recognize actor methods and extenstions as Async functions Recognize actor (distributed) methods and extensions as Async functions Aug 21, 2026
import SwiftJava

public distributed actor DistributedHi {
public typealias ActorSystem = LocalTestingDistributedActorSystem

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yup that’s right! Sorry I didn’t send a complete snippet earlier

@ktoso ktoso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Logic and tests looking good, nice work!

@ktoso
ktoso merged commit d3bdc82 into swiftlang:main Aug 21, 2026
42 checks passed
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.

jextract: allow importing (distributed) actor types, they're just classes with asynchronous code

2 participants