diff options
author | Martin Odersky <odersky@gmail.com> | 2014-01-02 16:04:49 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-01-02 16:04:49 +0100 |
commit | 37002e9fb650510e16cd038c5d7026bed50060f9 (patch) | |
tree | daff067213353f2bad5107bbeeabc1fc29898d9b /src/dotty/tools/dotc | |
parent | 09fdc8ee5705a80c361d3c07c49a5a660809a222 (diff) | |
download | dotty-37002e9fb650510e16cd038c5d7026bed50060f9.tar.gz dotty-37002e9fb650510e16cd038c5d7026bed50060f9.tar.bz2 dotty-37002e9fb650510e16cd038c5d7026bed50060f9.zip |
Some cleanups.
Diffstat (limited to 'src/dotty/tools/dotc')
-rw-r--r-- | src/dotty/tools/dotc/core/Scopes.scala | 3 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/TypeComparer.scala | 2 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/UnPickler.scala | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Scopes.scala b/src/dotty/tools/dotc/core/Scopes.scala index ef1ddc8b3..06f9ea6c1 100644 --- a/src/dotty/tools/dotc/core/Scopes.scala +++ b/src/dotty/tools/dotc/core/Scopes.scala @@ -17,6 +17,7 @@ import Denotations._ import SymDenotations._ import printing.Texts._ import printing.Printer +import util.common._ import SymDenotations.NoDenotation import collection.mutable.ListBuffer @@ -342,7 +343,7 @@ object Scopes { */ def scopeTransform(owner: Symbol)(op: => MutableScope): MutableScope = op - val selectAll: SymDenotation => Boolean = Function.const(true) + val selectAll: SymDenotation => Boolean = alwaysTrue val selectPrivate: SymDenotation => Boolean = d => (d is Flags.Private) val selectNonPrivate: SymDenotation => Boolean = d => !(d is Flags.Private) diff --git a/src/dotty/tools/dotc/core/TypeComparer.scala b/src/dotty/tools/dotc/core/TypeComparer.scala index cc48f0308..0d3bf2e94 100644 --- a/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/src/dotty/tools/dotc/core/TypeComparer.scala @@ -971,7 +971,7 @@ class ExplainingTypeComparer(initctx: Context) extends TypeComparer(initctx) { } override def isSubType(tp1: Type, tp2: Type) = - traceIndented(s"${show(tp1)} <:< ${show(tp2)} ${tp1.getClass} ${tp2.getClass} ${if (frozenConstraint) "frozen" else ""}") { + traceIndented(s"${show(tp1)} <:< ${show(tp2)}${if (ctx.settings.verbose.value) s" ${tp1.getClass} ${tp2.getClass}" else ""}${if (frozenConstraint) " frozen" else ""}") { super.isSubType(tp1, tp2) } diff --git a/src/dotty/tools/dotc/core/pickling/UnPickler.scala b/src/dotty/tools/dotc/core/pickling/UnPickler.scala index ff142c21f..ba2845bd1 100644 --- a/src/dotty/tools/dotc/core/pickling/UnPickler.scala +++ b/src/dotty/tools/dotc/core/pickling/UnPickler.scala @@ -14,6 +14,7 @@ import ast.Trees, ast.tpd._, ast.untpd import printing.Texts._ import printing.Printer import io.AbstractFile +import util.common._ import scala.reflect.internal.pickling.PickleFormat._ import Decorators._ import scala.collection.{ mutable, immutable } @@ -318,7 +319,7 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot: protected def readTypeName(): TypeName = readName().toTypeName /** Read a symbol */ - protected def readSymbol(): Symbol = readDisambiguatedSymbol(scala.Function.const(true))() + protected def readSymbol(): Symbol = readDisambiguatedSymbol(alwaysTrue)() /** Read a symbol, with possible disambiguation */ protected def readDisambiguatedSymbol(p: Symbol => Boolean)(): Symbol = { |