diff options
author | Martin Odersky <odersky@gmail.com> | 2014-10-11 19:09:48 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-10-12 10:52:41 +0200 |
commit | 8e9404b27bb73d16e2883ee682617011f9abc8fa (patch) | |
tree | 3875ea325f6d6f1cf05f7f7542279c1b07073c2b /src/dotty | |
parent | 1f0b25bf3099aebafeddc2c90f04e2d621f00814 (diff) | |
download | dotty-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')
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | 6 |
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 |