aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-10-11 19:09:48 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-10-12 10:52:41 +0200
commit8e9404b27bb73d16e2883ee682617011f9abc8fa (patch)
tree3875ea325f6d6f1cf05f7f7542279c1b07073c2b /src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
parent1f0b25bf3099aebafeddc2c90f04e2d621f00814 (diff)
downloaddotty-8e9404b27bb73d16e2883ee682617011f9abc8fa.tar.gz
dotty-8e9404b27bb73d16e2883ee682617011f9abc8fa.tar.bz2
dotty-8e9404b27bb73d16e2883ee682617011f9abc8fa.zip
Avoid capturing an old context in Classfile#typeParamCompleter
Previously caused an illegal backwards timetravel in bringForward when compiling all files in tools together twice.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/ClassfileParser.scala')
-rw-r--r--src/dotty/tools/dotc/core/pickling/ClassfileParser.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
index 193c872f1..67f825502 100644
--- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
+++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
@@ -226,7 +226,9 @@ class ClassfileParser(
while (!isDelimiter(sig(index))) { index += 1 }
sig.slice(start, index)
}
- def sig2type(tparams: immutable.Map[Name,Symbol], skiptvs: Boolean): Type = {
+ // Warning: sigToType contains nested completers which might be forced in a later run!
+ // So local methods need their own ctx parameters.
+ def sig2type(tparams: immutable.Map[Name,Symbol], skiptvs: Boolean)(implicit ctx: Context): Type = {
val tag = sig(index); index += 1
(tag: @switch) match {
case BYTE_TAG => defn.ByteType
@@ -321,7 +323,7 @@ class ClassfileParser(
}
} // sig2type(tparams, skiptvs)
- def sig2typeBounds(tparams: immutable.Map[Name, Symbol], skiptvs: Boolean): Type = {
+ def sig2typeBounds(tparams: immutable.Map[Name, Symbol], skiptvs: Boolean)(implicit ctx: Context): Type = {
val ts = new ListBuffer[Type]
while (sig(index) == ':') {
index += 1