You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
ccrewrite generates special 'async closure', moves postcondition for task-based method there (both with async keyword and without it) and 'chains' a call to CheckPost from this class with resulting task.
This behavior is critical, because async postconditions should be checked only when the task completes, but the logic is wrong for async postconditions in generic methods:
In this case synchronous postcondition is emitted:
// after rewritingclassFoo{publicstaticasyncTask<T>FooAsync()whereT:class{// some stuff generated by C# compilervartask= ...RewriterMethods.Ensure(task.Result!=null,"Contract.Result<T>() != null");returndefault(T);}}