-
Notifications
You must be signed in to change notification settings - Fork 344
Open
Labels
bug 🐛An unexpected issue that highlights incorrect behaviorAn unexpected issue that highlights incorrect behavior
Description
Describe the bug
If a class implements an interface that itself inherits INotifyPropertyChanged
or INotifyPropertyChanging
but does not implement the interface methods, code-generation aborts.
Current tests only test diagnostics for an implementation of INotifyPropertyChanged
/ INotifyPropertyChanging
:
dotnet/tests/CommunityToolkit.Mvvm.SourceGenerators.UnitTests/Test_SourceGeneratorsDiagnostics.cs
Lines 33 to 37 in 7b53ae2
[INotifyPropertyChanged] | |
public partial class SampleViewModel : INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler? PropertyChanged; | |
} |
Regression
No response
Steps to reproduce
interface IStuff : INotifyPropertyChanged {
// ...
}
[ObservableObject]
class B : BaseClass, IStuff {
// No implementation of INotifyPropertyChanged
// source generation
}
Expected behavior
The implementation of INotifyPropertyChanged
should be generated.
Screenshots
No response
IDE and version
VS 2022
IDE version
No response
Nuget packages
- CommunityToolkit.Mvvm (aka MVVM Toolkit)
Nuget package version(s)
8.2.2
Additional context
Similar to #620 but slightly different scenario
Help us help you
Yes, I'd like to be assigned to work on this item
mklemarczyk
Metadata
Metadata
Assignees
Labels
bug 🐛An unexpected issue that highlights incorrect behaviorAn unexpected issue that highlights incorrect behavior