reactivemarbles / ObservableEvents

MIT License
120 stars 10 forks source link

Generating events for generic class fails due to to constraints order #166

Open oliverw opened 1 year ago

oliverw commented 1 year ago

The generated code for the class below fails to compile due to wrong re-ordering of the generic constraints:

public class ContentFlyout<TControl, TModel> : Flyout,
    IDisposable 
    where TControl: ReactiveUserControl<TModel>, new()
    where TModel : ReactiveObject
{
...
}
internal class RxContentFlyoutEvents<TControl, TModel> where TControl : new() , global::ReactiveUI.ReactiveUserControl<TModel>  where TModel : global::ReactiveUI.ReactiveObject 

InstanceEvents.SourceGenerated.cs(4,77,4,80): error CS0401: The new() constraint must be the last constraint specified