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
SourcePropertySymbol
constructor sometimes sets the property twice
#35381
Comments
The code looks safe to me. We are inside a constructor and the previously assigned value is used only for the purpose of finding overridden/implemented methods. Also, the only part of the type that we are adjusting are custom modifiers, those in an overriding/implementing property have no impact what so ever on language semantics or on the way overridden/implemented methods are found. |
Could #35226 be a symptom of this issue? |
@gafter That issue looks like it might have been caused by the TypeSYmbolWithAnnotations race that we fixed, since it was reported back in April. I don't think we've seen a lot of crashes since then. |
The stack track for both of these issues point to a null type coming from |
But the TypeSymbolWithAnnotations problem was also in SourcePropertySymbol. What makes you think this particular piece of code is the problem, as opposed to the general race we fixed earlier? And why haven't we seen any crash reports since we fixed the TypeSymbolWithAnnotations race? |
In some error scenarios (bad overrides) we set the type of the property a second time.
The problem is that the first type matters (it causes side-effects) which are not undone when the type is set the second time.
See the constructor for
SourcePropertySymbol
:The text was updated successfully, but these errors were encountered: