From 92638bf5d3a5668920d0a40a4b24a6a97f982b3f Mon Sep 17 00:00:00 2001 From: Alexander Aprelev Date: Thu, 22 Sep 2022 07:45:41 +0000 Subject: [PATCH] [docs] Update Isolate.spawn doc to remove top-level function/static method restriction. The restriction was lifted in https://github.com/dart-lang/sdk/commit/5f9ec9f52ac5788cdb0dc1bbde12b5298bd0cfd8. Fixes https://github.com/dart-lang/sdk/issues/50009 TESt=ci Change-Id: I5a6c063fe558d4dd305ec4c78bf998f4f3750c89 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260403 Reviewed-by: Martin Kustermann Commit-Queue: Alexander Aprelev --- sdk/lib/isolate/isolate.dart | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart index 11cd17fa29d..3a7a0d908f3 100644 --- a/sdk/lib/isolate/isolate.dart +++ b/sdk/lib/isolate/isolate.dart @@ -293,15 +293,11 @@ class Isolate { /// The entry-point function is invoked in the new isolate with [message] /// as the only argument. /// - /// The function must be a top-level function or a static method - /// that can be called with a single argument, - /// that is, a compile-time constant function value - /// which accepts at least one positional parameter + /// The function must be such that it can be called with a single argument, + /// that is, a function which accepts at least one positional parameter /// and has at most one required positional parameter. /// The function may accept any number of optional parameters, /// as long as it *can* be called with just a single argument. - /// The function must not be the value of a function expression - /// or an instance method tear-off. /// /// Usually the initial [message] contains a [SendPort] so /// that the spawner and spawnee can communicate with each other.