Skip to content

Innermost hasAwaitStarted catch block is a no-op and could be omitted #145

@jnm2

Description

@jnm2

How can !hasAwaitStarted_a_1_1 in the catch block ever not evaluate to false? It's not assigned anywhere else.

try
{
hasAwaitStarted_a_1_1 = true;
await a_1_1;
}
catch
{
if (!hasAwaitStarted_a_1_1)
{
_ = a_1_1.AsTask().ContinueWith(failedTask => _ = failedTask.Exception, global::System.Threading.Tasks.TaskContinuationOptions.OnlyOnFaulted);
}
throw;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions