[Sema] Validate that @_inheritActorContext is used only on @Sendable/sending and async/@isolated(any) parameters

This commit is contained in:
Pavel Yaskevich
2025-05-13 16:41:05 -07:00
parent 6c911f5d42
commit 17b8f7ef12
5 changed files with 55 additions and 250 deletions

View File

@@ -257,5 +257,5 @@ struct AnyEraser: EraserProto {
init<T: EraserProto>(erasing: T) {}
}
func takeNone(@_inheritActorContext param: () async -> ()) { }
func takeAlways(@_inheritActorContext(always) param: () async -> ()) { }
func takeNone(@_inheritActorContext param: @Sendable () async -> ()) { }
func takeAlways(@_inheritActorContext(always) param: sending @isolated(any) () -> ()) { }