Skip to content

No diagnostic is emitted for duplicate commands across inherited types #274

@Sergio0694

Description

@Sergio0694

Describe the bug

See repro.

Regression

No

Steps to reproduce

[TestMethod]
public void MultipleICommandMethodOverloads_WithOverloadInBaseType()
{
    string source = @"
        using CommunityToolkit.Mvvm.Input;

        namespace MyApp
        {
            public partial class BaseViewModel
            {
                [ICommand]
                private void GreetUser()
                {
                }
            }

            public partial class SampleViewModel : BaseViewModel
            {
                [ICommand]
                private void GreetUser(object value)
                {
                }
            }
        }";

    VerifyGeneratedDiagnostics<ICommandGenerator>(source, "MVVMTK0023");
}

Expected behavior

MVVMTK0023 is emitted.

Metadata

Metadata

Assignees

Labels

bug 🐛An unexpected issue that highlights incorrect behaviormvvm-toolkit 🧰Issues/PRs for the MVVM Toolkit

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions