-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Discussion: #8965 (converted from previous champion issue #946)
Summary
Allow the partial modifier to appear in any position in a modifier list on a type or member declaration.
Allow the ref modifier to appear in any position in a modifier list on a struct declaration.
// All errors in this sample would be removed by adopting the proposal:
internal partial class C { }
partial internal class C { } // error
internal ref struct RS { }
ref internal struct RS { } // error
internal ref partial struct RS { }
internal partial ref struct RS { } // error
partial ref internal struct RS { } // error
partial class Program
{
public partial Program();
partial public Program() { } // error
public partial int Prop { get; set; }
partial public int Prop { get => field; set; } // error
public partial void Method();
partial public void Method() { } // error
partial public event Action Event; // error
public partial event Action Event { add { } remove { } }
}