-
-
Notifications
You must be signed in to change notification settings - Fork 767
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
EnumerableAsyncExtensions hides System.Linq extensions #545
Comments
Thanks, I think this is not a good method name and should be changed to |
Hello! As SelectAsync maybe? What do you think? |
For ***Async, we expect Task to be the return value. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello! We are faced with issue, that
EnumerableAsyncExtensions from namespace Cysharp.Threading.Tasks hides the System.Linq extensions
Case:
You are trying to get all the strings from the of List<string> with Select() method.
What you are excepting to get: IEnumerable<string>
What you are actually get: "Cannot convert expression type 'string' to return type 'Cysharp.Threading.Tasks.UniTask"
This happens because you have a using of Cysharp.Threading.Tasks namespace, that contains this extensions. Until you manually add the System.Linq usage into the file it will show you a error or potentially can cause an unexpected behaviour
Our suggestion is to not use Cysharp.Threading.Tasks namespace for extensions, but add the proper naming like Cysharp.Threading.Tasks.IEnumerable.Extensions (for example) to make usage of such extensions obvious for developers
Thank you!
The text was updated successfully, but these errors were encountered: