Skip to content

Instantly share code, notes, and snippets.

@NikolaiRuhe
Last active March 21, 2023 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NikolaiRuhe/5fee0c9d874a138b1118074ef3048e72 to your computer and use it in GitHub Desktop.
Save NikolaiRuhe/5fee0c9d874a138b1118074ef3048e72 to your computer and use it in GitHub Desktop.
actor A {
var iterator: AsyncStream<Void>.Iterator
init() {
iterator = AsyncStream<Void> { _ in }.makeAsyncIterator()
}
func f() async {
await iterator.next() // Cannot call mutating async function 'next()' on actor-isolated property 'iterator'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment