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

Cast after await gives me SA1008 : CSharp.Spacing : Invalid spacing around the opening parenthesis. #71

Open
Carpi68 opened this issue Apr 26, 2016 · 3 comments

Comments

@Carpi68
Copy link

Carpi68 commented Apr 26, 2016

I'm using version 4.7.59.0 with VS 2015 Professional. I have no R# installed.

Issue: I need to cast my await call like shown in this pseudo code:
await ((MyViewDataType)MyClass.ViewData).MyFunctionAsync();
But this gives me the warning SA1008 : CSharp.Spacing : Invalid spacing around the opening parenthesis.

Is there a way to modify the spacing rule to get this accepted?

@Carpi68 Carpi68 changed the title Cast afet await gives me SA1008 : CSharp.Spacing : Invalid spacing around the opening parenthesis. Cast after await gives me SA1008 : CSharp.Spacing : Invalid spacing around the opening parenthesis. Apr 26, 2016
@valentin-p
Copy link

I have a similar issue with a delegate after an async:
Func<Task> myDeletgate = async delegate () { await myFunc(); };

The warning is after the delegate:

SA1008: CSharp.Spacing : Invalid spacing around the opening parenthesis.

I expect this space after the delegate to not raise any warning "delegate ()".

@maykSVK
Copy link

maykSVK commented Apr 14, 2021

This is still an issue in 2021. Can you fix this?

@liquiduss
Copy link

Seems to still be the problem in 2023...

var actual = await ((IStammdatenExternalReadMain<FileContent>)instance).GetByIdAsync(readOptions);

SA1008 : CSharp.Spacing : Invalid spacing around the opening parenthesis.

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

4 participants