Would it kill the compiler to elaborate in its error message, here? Your explanation (@lukasa) makes sense, but there's really no way someone could be expected to deduce that from the compiler's output.
Cannot call mutating async function 'next()' on actor-isolated property 'frameIterator'
Why not?
- Is "mutating async function" relevant or merely describing the type of
next
?- Is the crux of the problem that the method is mutating?
- Is the crux of the problem that the method is async?
- Is the crux of the problem that the method has some special isolation requirement?
- Which actor is it referring to?
ActorSource
or the async iterator type itself? - Is the
frameIterator
stored property somehow not properly isolated to theActorSource
actor? - Is it something to do with the stored property being
lazy
?
I really wish the compiler would explain itself, rather than just make pithy statements.