-
Notifications
You must be signed in to change notification settings - Fork 342
Partial ObservableProperty in ObservableObject shows error CS0229 ambiguity between property and property #1056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
ConfirmationI am also experiencing this issue in the same conditions. Steps to ReproduceI have an
When I attempt to access this property in my
My IDE shows this error:
Environment DetailsIDE:
CommunityToolkit:
.NET Info:
|
That's very weird. I also can't repro and I never saw this happen. |
UpdateOddly enough, I have another Class Implementations
|
@Sergio0694 |
Looks like updating to Visual Studio 2022 preview 17.14 fixes this issue: |
I have the same bug in VS Community v17.13.5 |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I'm developing a WinUI application with Community Toolkit MVVM 8.4.0.
I switched the properties in my application to use the new format. Here's one example:
And this is a simplified version of the constructor for the object:
public partial class Item(bool returned) : ObservableObject
This all works as expected and compiles fine but all uses of the property elsewhere show the Compiler Error CS0229. In this case it shows:
Ambiguity between Item.Returned and Item.Returned.
I only have the one property called Returned.
As I said, it all compiles fine and works correctly but I'm not able to get rid of the error.
Regression
No response
Steps to reproduce
Create a class with the type ObservableObject and create a partial Observable Property. Use it elsewhere in the app.
Example:
Then access the property somewhere else in the app.
Example:
This shows the compiler error.
Expected behavior
I would like to remove the false alarm.
Screenshots
IDE and version
VS 2022
IDE version
Version 17.13.1
Nuget packages
Nuget package version(s)
8.4.0
Additional context
No response
Help us help you
Yes, but only if others can assist
The text was updated successfully, but these errors were encountered: