Replies: 3 comments 2 replies
-
Another thing to consider is |
Beta Was this translation helpful? Give feedback.
-
This just looks to me like use of an obsolete symbol within an obsolete context. That shouldn't produce obsolete diagnostics. The specification doesn't actually mention that obsolete diagnostics are suppressed when used inside an obsolete context. Therefore it seems like an implementation defined behavior and that the scenario you've outlined is a compiler bug. |
Beta Was this translation helpful? Give feedback.
-
Since the issue dotnet/roslyn#51071 has been closed, I really want to continue the discussion here. (According to the explanation in that issue, csharplang should be a better place to discuss this instead of roslyn.) If anyone thinks it's necessary I can write a proposal for this. I think the objectives and requirements are quite clear. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I have a Entity Framework model like this:
Now I would like to change to use another implementation of user so I marked the
User
class,User
property, andUserID
property in the above class as[Obsolete]
. The reference of theUser
class in theUser
property no longer shows the CS0618 warning because the property itself is also obsolete, but thenameof(User)
still shows the warning, although theUserID
is also obsolete. I would expect this warning to go off.Is there any reason it was not designed as so?
Beta Was this translation helpful? Give feedback.
All reactions