Skip to content
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

"Ambiguous invocation" error after update #439

Closed
BernhardMaier opened this issue Aug 29, 2022 · 4 comments
Closed

"Ambiguous invocation" error after update #439

BernhardMaier opened this issue Aug 29, 2022 · 4 comments

Comments

@BernhardMaier
Copy link

Hey Vladimir,

i tried to update from 1.31.1 to 1.33.2 but it resulted it many errors. In general it's a Ambiguous invocation error on several extension methods, for example .Ensure() or .Tap(), when they are called async:

private static async Task<Result> UploadPdf(byte[] pdfAsBytes, BlobClient blobClient) =>
    await Result.Success(new MemoryStream(pdfAsBytes))
      .Tap(async pdfStream => await blobClient.UploadAsync(pdfStream, true));
Ambiguous invocation:

CSharpFunctionalExtensions.Result<System.IO.MemoryStream> Tap<MemoryStream>(
  this CSharpFunctionalExtensions.Result<System.IO.MemoryStream>,
  System.Action<System.IO.MemoryStream>)
(in class ResultExtensions)

System.Threading.Tasks.Task<CSharpFunctionalExtensions.Result<System.IO.MemoryStream>> Tap<MemoryStream>(
  this CSharpFunctionalExtensions.Result<System.IO.MemoryStream>,
  System.Func<System.IO.MemoryStream,System.Threading.Tasks.Task>)
(in class AsyncResultExtensionsRightOperand) 

System.Threading.Tasks.ValueTask<CSharpFunctionalExtensions.Result<System.IO.MemoryStream>> Tap<MemoryStream>(
  this CSharpFunctionalExtensions.Result<System.IO.MemoryStream>,
  System.Func<System.IO.MemoryStream,System.Threading.Tasks.ValueTask>)
(in class AsyncResultExtensionsRightOperand)

match

Do you already know about this issue or have a solution for it?
Thank you in advance.

@vkhorikov
Copy link
Owner

vkhorikov commented Aug 29, 2022

Please fall back to v1.31.1 for now. I'll be publishing a fix today or tomorrow for this with v1.31.3. See #433 for more details.

@BernhardMaier
Copy link
Author

Nice, thank you for the fast reply and fix 👍

@vkhorikov
Copy link
Owner

This should be working now with v2.33.3. @BernhardMaier could please try?

@BernhardMaier
Copy link
Author

Good news: v2.33.3 works like charm and build succeeds 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants