-
Notifications
You must be signed in to change notification settings - Fork 370
Closed
Labels
bug 🐛An unexpected issue that highlights incorrect behaviorAn unexpected issue that highlights incorrect behaviormvvm-toolkit 🧰Issues/PRs for the MVVM ToolkitIssues/PRs for the MVVM Toolkit
Description
Describe the bug
The forwarded attribute logic (for both observable properties and relay commands) can crash the generator in some invalid scenarios. We should instead emit a proper diagnostic and gracefully skip the current attribute, rather than crashing the generator.
Steps to reproduce
public partial class Foo : ObservableObject
{
[ObservableProperty]
[property: Test(TestAttribute.M)]
private int number;
}
public class TestAttribute : Attribute
{
public static string M => "";
}Expected behavior
This should skip the attribute and generate a diagnostic.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug 🐛An unexpected issue that highlights incorrect behaviorAn unexpected issue that highlights incorrect behaviormvvm-toolkit 🧰Issues/PRs for the MVVM ToolkitIssues/PRs for the MVVM Toolkit