MVVM Source Generators: ObservablePropertyAttribute on member var named value
#4216
Labels
bug 🐛
An unexpected issue that highlights incorrect behavior
Completed 🔥
mvvm-toolkit 🧰
Issues/PRs for the Microsoft.Toolkit.Mvvm package
Milestone
Describe the bug
If you put the
ObservablePropertyAttribute
on a member var namedvalue
it successfully generates a source code for a property that does reference the member variable namedvalue
in the generated code as intended. Instead the member var namedvalue
gets shadowed by the property setter key wordvalue
and the value from the setter gets compared with its self and the member var does not get updated.Steps to Reproduce
Steps to reproduce the behavior:
Expected behavior
The member var
value
and any other keywords in the context of the generated code that could be names of vars are distinguished from keywords in the contexts of the the generated code, or something warns or errors out before such code can be compiled and/or ran, so that users of the generators are not caught off guard with a sneaky error.Screenshots
Environment
NuGet Package(s):
Package Version(s):
Windows 10 Build Number:
App min and target version:
Device form factor:
Visual Studio version:
Additional context
The text was updated successfully, but these errors were encountered: