Skip to content

[clang-format] Unexpected whitespace in csharp formatting result #78666

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
magic-akari opened this issue Jan 19, 2024 · 0 comments · Fixed by #138631
Closed

[clang-format] Unexpected whitespace in csharp formatting result #78666

magic-akari opened this issue Jan 19, 2024 · 0 comments · Fixed by #138631
Assignees

Comments

@magic-akari
Copy link
Contributor

Search Words

  • clang-format
  • chsarp
  • c#

Version

clang-format --version
Homebrew clang-format version 17.0.6

Input

https://github.com/AvaloniaUI/Avalonia/blob/1c792b294f82b26396e4f91032a2b535ea9c0669/src/Avalonia.Controls/Button.cs#L512

namespace Avalonia.Controls
{
    public class Button : ContentControl, ICommandSource, IClickableControl
    {
        protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
        {
            var (oldFlyout, newFlyout) = change.GetOldAndNewValue<FlyoutBase?>();
        }
    }
}

Output

namespace Avalonia.Controls {
    public class Button : ContentControl, ICommandSource, IClickableControl {
        protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) {
            var (oldFlyout, newFlyout) = change.GetOldAndNewValue < FlyoutBase ? > ();
        }
    }
}

Note

Please pay attention to the whitespace surrounding FlyoutBase.

This issue occurs in version 17, and it does not exist in version 16.

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

Successfully merging a pull request may close this issue.

3 participants