-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Harden IDE some more #2932
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
Harden IDE some more #2932
Conversation
no errors were reported.
We get sometimes stake symbol error because a completer is run in its creation context, which comes from a previous run. This should not happen. Adding an assert to flag the erronenous completion when it happens.
val effectiveOwner = | ||
if (curOwner.isTerm && defDenot.symbol.isType) | ||
// Don't mix NoPrefix and thisType prefixes, since type comparer | ||
// would not detect types to be compatible. Note: If we replace the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of issue did you see before this change? Could this be boiled down to a test case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only in the applied type branch that this became an issue. We saw the same type parameter TypeRef once with a NoPrefix prefix, the other with a ThisType. They should be the same but subtype checking failed. We could make subtype checking more lenient, but I think it's better not to have variations how we construct these things. I believe the current scheme hides the difference because we follow an alias from TypeParamAccessor to TypeParam, that's why we did not see it so far.
Rebased to master. |
Parser could get into an infinite loop because `acceptStatSepUnlessAtEnd` did not make progress. I believe the concrete example was a string interpolator where we encounter a `{ ... )`.
I collected all IDE improvements here. Will submit the other improvements separately. |
More fixes that prevent crashes and infinite loops observed in the IDE.
Also, some more fundamental changes that I added here to test them out in isolation of the other work on applied types I am doing.