Error codes · Scopes, tasks and resources
PW2004
scope_outlives_owner
The program must hold to this: a subscription cannot declare a scope that outlives its owner.
Reading the diagnostic
pw check prints the code in brackets, [PW2004], with the sentence above and the place in your program. Errors and diagnostics explains how to read one, and every code is listed with its rule.