Skip to content

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

Open
@oliverw

Description

@oliverw

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions