diff options
author | Martin Odersky <odersky@gmail.com> | 2014-02-09 16:19:45 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-02-09 16:24:30 +0100 |
commit | 9d924441fdeab3bbe0c6cca8c1ecce6ecf64a608 (patch) | |
tree | 7bfd0515195a83016bd03cbac0e54d49499e30aa /src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | |
parent | 6a6bc87871e1c6382da7023ab64c69391366c808 (diff) | |
download | dotty-9d924441fdeab3bbe0c6cca8c1ecce6ecf64a608.tar.gz dotty-9d924441fdeab3bbe0c6cca8c1ecce6ecf64a608.tar.bz2 dotty-9d924441fdeab3bbe0c6cca8c1ecce6ecf64a608.zip |
Making completer take an implicit context
As a first step, we make the complete method in LazyType take an implicit context parameter. This requires
a fairly large propagation of implicit contexts.
The implicit parameter is ignored for classes inheriting from CompleteInCreationContext (which until now are all completers). The next step will be to make the complete methods of selective lazy types take the current context, rather than the creation context.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/ClassfileParser.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala index 5edddc396..8745593f4 100644 --- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala +++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala @@ -163,9 +163,9 @@ class ClassfileParser( skipAttributes } - val memberCompleter = new LazyType { + val memberCompleter = new LazyType with CompleteInCreationContext { - def complete(denot: SymDenotation): Unit = { + def completeInCreationContext(denot: SymDenotation): Unit = { val oldbp = in.bp try { in.bp = denot.symbol.coord.toIndex @@ -337,8 +337,8 @@ class ClassfileParser( var tparams = classTParams - def typeParamCompleter(start: Int) = new LazyType { - def complete(denot: SymDenotation): Unit = { + def typeParamCompleter(start: Int) = new LazyType with CompleteInCreationContext { + def completeInCreationContext(denot: SymDenotation): Unit = { val savedIndex = index try { index = start |