Skip to content

Wrong async generation after a null coalesce in 0.8.2.11 #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fredericDelaporte opened this issue Aug 24, 2019 · 2 comments
Closed

Wrong async generation after a null coalesce in 0.8.2.11 #133

fredericDelaporte opened this issue Aug 24, 2019 · 2 comments
Labels

Comments

@fredericDelaporte
Copy link

fredericDelaporte commented Aug 24, 2019

Following code:

cacheBatcher?.ExecuteBatch();
PutCacheableResults();

Is generated with 0.8.2.11 as:

if (executeBatchTask != null)
{
	await (executeBatchTask).ConfigureAwait(false);
	await (PutCacheableResultsAsync(cancellationToken)).ConfigureAwait(false);
}

The null check has taken then next call, which it should not do.

This has been seen by running the async generator on the 5.2.x branch. It does not seem to happen with 0.14.0 or 0.1.5.0 or 0.16.2, but I have not used the exact same code to check that, and I have not seen an issue matching the trouble I report here.
Oddly, the trouble also occurs with 0.8.2.9, although the PR having introduced it was using that version.

@maca88 maca88 added the bug label Aug 25, 2019
@maca88
Copy link
Owner

maca88 commented Aug 25, 2019

I've backported the new logic from #117, which fixes the issue and released 0.8.2.12.

@maca88 maca88 closed this as completed Aug 25, 2019
@fredericDelaporte
Copy link
Author

Thanks!

fredericDelaporte added a commit to fredericDelaporte/nhibernate-core that referenced this issue Aug 25, 2019
This fix the generation bug which previously had to be reverted after
each generation, see maca88/AsyncGenerator#133.
fredericDelaporte added a commit to nhibernate/nhibernate-core that referenced this issue Sep 3, 2019
This fix the generation bug which previously had to be reverted after
each generation, see maca88/AsyncGenerator#133.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants