From 292ce6844a212b47defc671c91396d7cec86833b Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 27 Aug 2014 08:55:21 +0200 Subject: Rebinding ThisTypes ThisTypes do escape. It seems that Scala 2 pickling produces ThisTypes that refer to base classes of the class being compiled. If the base class is in a separate compilation unit, this can lead to a stale class symbol in the ThisType. We solve this here by rebinding the class symbol in the ThisType. We should also explore the alternative: class ThisType(tref: TypeRef) ... That would do the rebinding as part of the generation denotation resolution mechanism. --- src/dotty/tools/dotc/config/ScalaSettings.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/config/ScalaSettings.scala') diff --git a/src/dotty/tools/dotc/config/ScalaSettings.scala b/src/dotty/tools/dotc/config/ScalaSettings.scala index 967a09543..177813555 100644 --- a/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -132,7 +132,7 @@ class ScalaSettings extends Settings.SettingGroup { val Ydumpclasses = StringSetting("-Ydump-classes", "dir", "Dump the generated bytecode to .class files (useful for reflective compilation that utilizes in-memory classloaders).", "") val Ynosqueeze = BooleanSetting("-Yno-squeeze", "Disable creation of compact code in matching.") val YstopAfter = PhasesSetting("-Ystop-after", "Stop after") withAbbreviation ("-stop") // backward compat - val YstopBefore = PhasesSetting("-Ystop-before", "Stop before", "erasure") // stop before erasure as long as we have not debugged it fully + val YstopBefore = PhasesSetting("-Ystop-before", "Stop before") // stop before erasure as long as we have not debugged it fully val refinementMethodDispatch = ChoiceSetting("-Ystruct-dispatch", "policy", "structural method dispatch policy", List("no-cache", "mono-cache", "poly-cache", "invoke-dynamic"), "poly-cache") val Yrangepos = BooleanSetting("-Yrangepos", "Use range positions for syntax trees.") val Ybuilderdebug = ChoiceSetting("-Ybuilder-debug", "manager", "Compile using the specified build manager.", List("none", "refined", "simple"), "none") -- cgit v1.2.3