I cannot align generic type constraints

Answered

Hello, I use VS2015 and R# 2016.3.2. I set the following parameters to the C# Formatting style:

"Wrap multiple type parameter constraints" = "ChopAlways"

"Prefer wrap before first constraint" = "True"

"Place type parameter constraints on same line" = "False"

"Align Multiple contracts"=>"Type parameter constraints" = "True"

Settings file

After "reformat code" I want to get such result:

public void DoSomething<T1, T2>()
    where T1 : IDisposable
    where T2 : ICollection
{
}

But I get it:

public void DoSomething<T1, T2>() where T1 : IDisposable where T2 : ICollection
{
}

Where did I mistaken? What parameter I have to change?

1
2 comments
Official comment

Hello Egor,

It has been fixed in R# 2017.1 EAP builds https://youtrack.jetbrains.com/issue/RSRP-433842. 

Thanks! 

Avatar
Permanently deleted user

Thank you, Alexander!

0

Please sign in to leave a comment.