Skip to content
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 #2787

Merged
merged 3 commits into from
Jun 22, 2017
Merged

Harden IDE some more #2787

merged 3 commits into from
Jun 22, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jun 20, 2017

I came across two more sources of crashes when doing heavy editing on Types.scala

  • tpd.TreeAccumulator hit again an untyped tree. I believe this is because the tree was left in because of an error in a previous run. Because the error was in a previous run, we cannot take
    reporter.hasErrors as a test to avoid the crash.

  • I got a StaleSymbolError through another path as before.

@odersky odersky requested a review from smarter June 20, 2017 14:27
// in case of errors it may be that typed trees point to untyped ones.
// The can still traverse inside such trees, either in the run where errors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing word between "The" and "can"?

@@ -1538,7 +1538,8 @@ object Types {
else recomputeMember(d) // symbol could have been overridden, recompute membership
else {
val newd = loadDenot
if (newd.exists) newd else d.staleSymbolError
if (newd.exists || ctx.mode.is(Mode.Interactive)) newd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this going to fail with a NoDenotation error later on? If you really want to return the old denotation this should be d, not newd

@odersky odersky merged commit 7381e9d into scala:master Jun 22, 2017
@allanrenucci allanrenucci deleted the change-harden-ide branch December 14, 2017 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants