Skip to content

Fix #3816: Protect against cycles when unpickling hk types #3941

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

Merged
merged 3 commits into from
Feb 2, 2018

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jan 29, 2018

No description provided.

sym.info = rhs.tpe match {
case _: TypeBounds | _: ClassInfo => checkNonCyclic(sym, rhs.tpe, reportErrors = false)
case _ => TypeAlias(rhs.tpe)
}
sym.resetFlag(Provisional)
Copy link
Member

Choose a reason for hiding this comment

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

how come we don't need to do something similar to ensureUpToDate in Namer#typeDefSig ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Frankly: I don't know. The other question is why we need to use abstracted in Namer but the same example passes OK in TreeUnpickler. I tried to remove abstracted in Namer, bu then i3816.scala would fail to compile. So the two cases are not the same. But I did not have the time to dig deeper.

@allanrenucci
Copy link
Contributor

Missing test case

@odersky
Copy link
Contributor Author

odersky commented Jan 30, 2018

test performance please

@dottybot
Copy link
Member

performance test scheduled: 1 job(s) in queue, 0 running.

@dottybot
Copy link
Member

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/3941/ to see the changes.

Benchmarks is based on merging with master (6d06cce)

@odersky odersky merged commit f8363e3 into scala:master Feb 2, 2018
@Blaisorblade Blaisorblade deleted the fix-#3816 branch August 7, 2018 16:32
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.

4 participants