You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No error for setter with self-referential, implicit any argument #48432
We don't get any errors, even with noImplicitAny set.
But arg has implicitly type any, because its type annotation refers to the type of the setter itself, and there are no getters.
🙂 Expected behavior
An error on prop2 or arg, at least under noImplicitAny.
Actually, an error is reported, but the error message is misleading and is reported as a global error because the logic attempts to report on the get accessor, but there isn't one. So, several things are wrong here.
Activity
ahejlsberg commentedon Mar 27, 2022
Actually, an error is reported, but the error message is misleading and is reported as a global error because the logic attempts to report on the get accessor, but there isn't one. So, several things are wrong here.