aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-09 17:26:10 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-09 17:26:10 +0200
commitd7c44086cc34eee7991753fc2ea284bdefed9670 (patch)
treef1b3461a042df1b7c65628ae57d7c1a613718cb8 /src/dotty/tools
parent9f80c0d2e87819f183cf54028824bd338d780dcd (diff)
downloaddotty-d7c44086cc34eee7991753fc2ea284bdefed9670.tar.gz
dotty-d7c44086cc34eee7991753fc2ea284bdefed9670.tar.bz2
dotty-d7c44086cc34eee7991753fc2ea284bdefed9670.zip
Add spaces around + in dotty source.
Diffstat (limited to 'src/dotty/tools')
-rw-r--r--src/dotty/tools/backend/jvm/DottyBackendInterface.scala4
-rw-r--r--src/dotty/tools/dotc/config/CompilerCommand.scala2
-rw-r--r--src/dotty/tools/dotc/core/StdNames.scala2
-rw-r--r--src/dotty/tools/dotc/core/SymbolLoaders.scala4
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala2
-rw-r--r--src/dotty/tools/dotc/core/pickling/AbstractFileReader.scala6
-rw-r--r--src/dotty/tools/dotc/core/pickling/ByteCodecs.scala2
-rw-r--r--src/dotty/tools/dotc/core/pickling/ClassfileParser.scala2
-rw-r--r--src/dotty/tools/dotc/core/pickling/PickleBuffer.scala2
-rw-r--r--src/dotty/tools/dotc/core/pickling/TastyBuffer.scala4
-rw-r--r--src/dotty/tools/dotc/core/pickling/TreeUnpickler.scala2
-rw-r--r--src/dotty/tools/dotc/core/pickling/UnPickler.scala6
-rw-r--r--src/dotty/tools/dotc/parsing/JavaParsers.scala2
-rw-r--r--src/dotty/tools/dotc/parsing/MarkupParsers.scala4
-rw-r--r--src/dotty/tools/dotc/parsing/Parsers.scala8
-rw-r--r--src/dotty/tools/dotc/parsing/Scanners.scala4
-rw-r--r--src/dotty/tools/dotc/transform/ExtensionMethods.scala8
-rw-r--r--src/dotty/tools/dotc/transform/PatternMatcher.scala24
-rw-r--r--src/dotty/tools/dotc/transform/SuperAccessors.scala2
-rw-r--r--src/dotty/tools/dotc/typer/ConstFold.scala8
-rw-r--r--src/dotty/tools/dotc/typer/FrontEnd.scala6
-rw-r--r--src/dotty/tools/dotc/typer/RefChecks.scala4
-rw-r--r--src/dotty/tools/dotc/util/NameTransformer.scala6
-rw-r--r--src/dotty/tools/dotc/util/SourcePosition.scala2
-rw-r--r--src/dotty/tools/io/ClassPath.scala6
25 files changed, 61 insertions, 61 deletions
diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
index 058511381..ee8d27137 100644
--- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
+++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
@@ -1026,8 +1026,8 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
val arity = field.meth.tpe.widenDealias.paramTypes.size - _1.size
val returnsUnit = field.meth.tpe.widenDealias.resultType.classSymbol == UnitClass
if(returnsUnit)
- ctx.requiredClass(("scala.compat.java8.JProcedure"+arity).toTermName)
- else ctx.requiredClass(("scala.compat.java8.JFunction"+arity).toTermName)
+ ctx.requiredClass(("scala.compat.java8.JProcedure" + arity).toTermName)
+ else ctx.requiredClass(("scala.compat.java8.JFunction" + arity).toTermName)
}
}
}
diff --git a/src/dotty/tools/dotc/config/CompilerCommand.scala b/src/dotty/tools/dotc/config/CompilerCommand.scala
index aa8e7abbf..629042291 100644
--- a/src/dotty/tools/dotc/config/CompilerCommand.scala
+++ b/src/dotty/tools/dotc/config/CompilerCommand.scala
@@ -25,7 +25,7 @@ object CompilerCommand extends DotClass {
| example: -Xprint:front,mixin prints the frontend and mixin phases.
| example: -Ylog:erasure+ logs the erasure phase and the phase after the erasure phase.
| This is useful because during the tree transform of phase X, we often
- | already are in phase X+1.
+ | already are in phase X + 1.
""".stripMargin.trim + "\n"
def shortUsage = s"Usage: $cmdName <options> <source files>"
diff --git a/src/dotty/tools/dotc/core/StdNames.scala b/src/dotty/tools/dotc/core/StdNames.scala
index 4f59bd453..a4471ebb4 100644
--- a/src/dotty/tools/dotc/core/StdNames.scala
+++ b/src/dotty/tools/dotc/core/StdNames.scala
@@ -709,7 +709,7 @@ object StdNames {
class ScalaTypeNames extends ScalaNames[TypeName] {
protected implicit def fromString(s: String): TypeName = typeName(s)
- @switch def syntheticTypeParamName(i: Int): TypeName = "T"+i
+ @switch def syntheticTypeParamName(i: Int): TypeName = "T" + i
def syntheticTypeParamNames(num: Int): List[TypeName] =
(0 until num).map(syntheticTypeParamName)(breakOut)
diff --git a/src/dotty/tools/dotc/core/SymbolLoaders.scala b/src/dotty/tools/dotc/core/SymbolLoaders.scala
index 8656a751b..0e8c9a41d 100644
--- a/src/dotty/tools/dotc/core/SymbolLoaders.scala
+++ b/src/dotty/tools/dotc/core/SymbolLoaders.scala
@@ -226,7 +226,7 @@ class ClassfileLoader(val classfile: AbstractFile) extends SymbolLoader {
override def sourceFileOrNull: AbstractFile = classfile
- def description = "class file "+ classfile.toString
+ def description = "class file " + classfile.toString
def rootDenots(rootDenot: ClassDenotation)(implicit ctx: Context): (ClassDenotation, ClassDenotation) = {
val linkedDenot = rootDenot.scalacLinkedClass.denot match {
@@ -258,7 +258,7 @@ class ClassfileLoader(val classfile: AbstractFile) extends SymbolLoader {
}
class SourcefileLoader(val srcfile: AbstractFile) extends SymbolLoader {
- def description = "source file "+ srcfile.toString
+ def description = "source file " + srcfile.toString
override def sourceFileOrNull = srcfile
def doComplete(root: SymDenotation)(implicit ctx: Context): Unit = unsupported("doComplete")
}
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index c655f1c52..e573de664 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -472,7 +472,7 @@ object Symbols {
override def toString: String =
if (lastDenot == null) s"Naked$prefixString#$id"
- else lastDenot.toString// +"#"+id // !!! DEBUG
+ else lastDenot.toString// + "#" + id // !!! DEBUG
def toText(printer: Printer): Text = printer.toText(this)
diff --git a/src/dotty/tools/dotc/core/pickling/AbstractFileReader.scala b/src/dotty/tools/dotc/core/pickling/AbstractFileReader.scala
index 5de7ab0cc..dbde8548f 100644
--- a/src/dotty/tools/dotc/core/pickling/AbstractFileReader.scala
+++ b/src/dotty/tools/dotc/core/pickling/AbstractFileReader.scala
@@ -60,13 +60,13 @@ class AbstractFileReader(val file: AbstractFile) {
/** extract a character at position bp from buf
*/
def getChar(mybp: Int): Char =
- (((buf(mybp) & 0xff) << 8) + (buf(mybp+1) & 0xff)).toChar
+ (((buf(mybp) & 0xff) << 8) + (buf(mybp + 1) & 0xff)).toChar
/** extract an integer at position bp from buf
*/
def getInt(mybp: Int): Int =
- ((buf(mybp ) & 0xff) << 24) + ((buf(mybp+1) & 0xff) << 16) +
- ((buf(mybp+2) & 0xff) << 8) + (buf(mybp+3) & 0xff)
+ ((buf(mybp ) & 0xff) << 24) + ((buf(mybp + 1) & 0xff) << 16) +
+ ((buf(mybp + 2) & 0xff) << 8) + (buf(mybp + 3) & 0xff)
/** extract a long integer at position bp from buf
*/
diff --git a/src/dotty/tools/dotc/core/pickling/ByteCodecs.scala b/src/dotty/tools/dotc/core/pickling/ByteCodecs.scala
index 0cffe43bc..8b3e49bd0 100644
--- a/src/dotty/tools/dotc/core/pickling/ByteCodecs.scala
+++ b/src/dotty/tools/dotc/core/pickling/ByteCodecs.scala
@@ -193,7 +193,7 @@ object ByteCodecs {
/**
* Destructively decodes array xs and returns the length of the decoded array.
*
- * Sometimes returns (length+1) of the decoded array. Example:
+ * Sometimes returns (length + 1) of the decoded array. Example:
*
* scala> val enc = reflect.generic.ByteCodecs.encode(Array(1,2,3))
* enc: Array[Byte] = Array(2, 5, 13, 1)
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
index 935c94055..a358fc2b0 100644
--- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
+++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
@@ -739,7 +739,7 @@ class ClassfileParser(
def originalName = pool.getName(name)
override def toString =
- originalName + " in " + outerName + "(" + externalName +")"
+ originalName + " in " + outerName + "(" + externalName + ")"
}
object innerClasses extends scala.collection.mutable.HashMap[Name, InnerClassEntry] {
diff --git a/src/dotty/tools/dotc/core/pickling/PickleBuffer.scala b/src/dotty/tools/dotc/core/pickling/PickleBuffer.scala
index 06d02d888..33ba4439b 100644
--- a/src/dotty/tools/dotc/core/pickling/PickleBuffer.scala
+++ b/src/dotty/tools/dotc/core/pickling/PickleBuffer.scala
@@ -69,7 +69,7 @@ class PickleBuffer(data: Array[Byte], from: Int, to: Int) {
def patchNat(pos: Int, x: Int): Unit = {
def patchNatPrefix(x: Int): Unit = {
writeByte(0)
- Array.copy(bytes, pos, bytes, pos+1, writeIndex - (pos+1))
+ Array.copy(bytes, pos, bytes, pos + 1, writeIndex - (pos + 1))
bytes(pos) = ((x & 0x7f) | 0x80).toByte
val y = x >>> 7
if (y != 0) patchNatPrefix(y)
diff --git a/src/dotty/tools/dotc/core/pickling/TastyBuffer.scala b/src/dotty/tools/dotc/core/pickling/TastyBuffer.scala
index 99ae331d0..a67722227 100644
--- a/src/dotty/tools/dotc/core/pickling/TastyBuffer.scala
+++ b/src/dotty/tools/dotc/core/pickling/TastyBuffer.scala
@@ -13,8 +13,8 @@ object TastyBuffer {
/** An address pointing to an index in a Tasty buffer's byte array */
case class Addr(val index: Int) extends AnyVal {
- def -(delta: Int): Addr = Addr(this.index - delta)
- def +(delta: Int): Addr = Addr(this.index + delta)
+ def - (delta: Int): Addr = Addr(this.index - delta)
+ def + (delta: Int): Addr = Addr(this.index + delta)
def relativeTo(base: Addr): Addr = this - base.index - AddrWidth
}
diff --git a/src/dotty/tools/dotc/core/pickling/TreeUnpickler.scala b/src/dotty/tools/dotc/core/pickling/TreeUnpickler.scala
index 07d3badf7..a58fc9071 100644
--- a/src/dotty/tools/dotc/core/pickling/TreeUnpickler.scala
+++ b/src/dotty/tools/dotc/core/pickling/TreeUnpickler.scala
@@ -491,7 +491,7 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table) {
false
}
}
- noInitss.forall(_)
+ noInitss.forall(_ == true)
}
/** Process package with given operation `op`. The operation takes as arguments
diff --git a/src/dotty/tools/dotc/core/pickling/UnPickler.scala b/src/dotty/tools/dotc/core/pickling/UnPickler.scala
index 7d220783b..3c3ec4a70 100644
--- a/src/dotty/tools/dotc/core/pickling/UnPickler.scala
+++ b/src/dotty/tools/dotc/core/pickling/UnPickler.scala
@@ -357,9 +357,9 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot:
val denot1 = denot.disambiguate(d => p(d.symbol))
val sym = denot1.symbol
if (denot.exists && !denot1.exists) { // !!!DEBUG
- val alts = denot.alternatives map (d => d+":"+d.info+"/"+d.signature)
+ val alts = denot.alternatives map (d => d + ":" + d.info + "/" + d.signature)
System.err.println(s"!!! disambiguation failure: $alts")
- val members = denot.alternatives.head.symbol.owner.info.decls.toList map (d => d+":"+d.info+"/"+d.signature)
+ val members = denot.alternatives.head.symbol.owner.info.decls.toList map (d => d + ":" + d.info + "/" + d.signature)
System.err.println(s"!!! all members: $members")
}
if (tag == EXTref) sym else sym.moduleClass
@@ -532,7 +532,7 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot:
inforef = readNat()
pw
}
- // println("reading type for "+denot) // !!! DEBUG
+ // println("reading type for " + denot) // !!! DEBUG
val tp = at(inforef, readType)
denot match {
case denot: ClassDenotation =>
diff --git a/src/dotty/tools/dotc/parsing/JavaParsers.scala b/src/dotty/tools/dotc/parsing/JavaParsers.scala
index ab805f261..4f3d20f45 100644
--- a/src/dotty/tools/dotc/parsing/JavaParsers.scala
+++ b/src/dotty/tools/dotc/parsing/JavaParsers.scala
@@ -314,7 +314,7 @@ object JavaParsers {
/*
TypeDef(
Modifiers(Flags.JavaDefined | Flags.Deferred),
- typeName("_$"+(wildnum += 1)),
+ typeName("_$" +(wildnum += 1)),
List(),
TypeBoundsTree(lo, hi))
*/
diff --git a/src/dotty/tools/dotc/parsing/MarkupParsers.scala b/src/dotty/tools/dotc/parsing/MarkupParsers.scala
index bcedd5bca..f648b9e2c 100644
--- a/src/dotty/tools/dotc/parsing/MarkupParsers.scala
+++ b/src/dotty/tools/dotc/parsing/MarkupParsers.scala
@@ -394,7 +394,7 @@ object MarkupParsers {
op
}
if (parser.in.token != RBRACE)
- reportSyntaxError(" expected end of Scala "+kind)
+ reportSyntaxError(" expected end of Scala " + kind)
res
}
@@ -450,7 +450,7 @@ object MarkupParsers {
case _ => // text
appendText(Position(start1, curOffset, start1), ts, xText)
// here xEmbeddedBlock might be true:
- // if (xEmbeddedBlock) throw new ApplicationError("after:"+text); // assert
+ // if (xEmbeddedBlock) throw new ApplicationError("after:" + text); // assert
}
true
}
diff --git a/src/dotty/tools/dotc/parsing/Parsers.scala b/src/dotty/tools/dotc/parsing/Parsers.scala
index 2bb6b974b..cbefb81fe 100644
--- a/src/dotty/tools/dotc/parsing/Parsers.scala
+++ b/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -184,11 +184,11 @@ object Parsers {
return
skippedParens.change(LBRACKET, -1)
case LBRACE =>
- skippedParens.change(LBRACE, +1)
+ skippedParens.change(LBRACE, + 1)
case LPAREN =>
- skippedParens.change(LPAREN, +1)
+ skippedParens.change(LPAREN, + 1)
case LBRACKET=>
- skippedParens.change(LBRACKET, +1)
+ skippedParens.change(LBRACKET, + 1)
case _ =>
if (mustStartStat &&
in.isAfterLineEnd() &&
@@ -1984,7 +1984,7 @@ object Parsers {
stats += defOrDcl(in.offset, Modifiers())
} else if (!isStatSep) {
syntaxErrorOrIncomplete(
- "illegal start of declaration"+
+ "illegal start of declaration" +
(if (inFunReturnType) " (possible cause: missing `=' in front of current method body)"
else ""))
}
diff --git a/src/dotty/tools/dotc/parsing/Scanners.scala b/src/dotty/tools/dotc/parsing/Scanners.scala
index 5eb8357a4..46274bcc9 100644
--- a/src/dotty/tools/dotc/parsing/Scanners.scala
+++ b/src/dotty/tools/dotc/parsing/Scanners.scala
@@ -290,7 +290,7 @@ object Scanners {
}
postProcessToken()
- // print("["+this+"]")
+ // print("[" + this +"]")
}
def postProcessToken() = {
@@ -375,7 +375,7 @@ object Scanners {
case ' ' | '\t' | '\n' | '{' | '(' | '>' if isNameStart(ch) || ch == '!' || ch == '?' =>
token = XMLSTART
case _ =>
- // Console.println("found '<', but last is '"+in.last+"'"); // DEBUG
+ // Console.println("found '<', but last is '" + in.last +"'"); // DEBUG
putChar('<')
getOperatorRest()
}
diff --git a/src/dotty/tools/dotc/transform/ExtensionMethods.scala b/src/dotty/tools/dotc/transform/ExtensionMethods.scala
index a006f04a7..26f26fc2f 100644
--- a/src/dotty/tools/dotc/transform/ExtensionMethods.scala
+++ b/src/dotty/tools/dotc/transform/ExtensionMethods.scala
@@ -88,12 +88,12 @@ class ExtensionMethods extends MiniPhaseTransform with DenotTransformer with Ful
case decl: MultiDenotation =>
val alts = decl.alternatives
val index = alts indexOf imeth.denot
- assert(index >= 0, alts+" does not contain "+imeth)
- def altName(index: Int) = (imeth.name+"$extension"+index).toTermName
+ assert(index >= 0, alts + " does not contain " + imeth)
+ def altName(index: Int) = (imeth.name + "$extension" + index).toTermName
altName(index) #:: ((0 until alts.length).toStream filter (index != _) map altName)
case decl =>
- assert(decl.exists, imeth.name+" not found in "+imeth.owner+"'s decls: "+imeth.owner.info.decls)
- Stream((imeth.name+"$extension").toTermName)
+ assert(decl.exists, imeth.name + " not found in " + imeth.owner + "'s decls: " + imeth.owner.info.decls)
+ Stream((imeth.name + "$extension").toTermName)
}
}
diff --git a/src/dotty/tools/dotc/transform/PatternMatcher.scala b/src/dotty/tools/dotc/transform/PatternMatcher.scala
index 9dd2e1113..3e5402eb4 100644
--- a/src/dotty/tools/dotc/transform/PatternMatcher.scala
+++ b/src/dotty/tools/dotc/transform/PatternMatcher.scala
@@ -325,7 +325,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
private[TreeMakers] def incorporateOuterRebinding(outerSubst: Rebindings): Unit = {
if (currSub ne null) {
- ctx.debuglog("BUG: incorporateOuterRebinding called more than once for "+ ((this, currSub, outerSubst)))
+ ctx.debuglog("BUG: incorporateOuterRebinding called more than once for " + ((this, currSub, outerSubst)))
Thread.dumpStack()
}
else currSub = outerSubst >> rebindings
@@ -364,7 +364,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
def chainBefore(next: Tree)(casegen: Casegen): Tree = // assert(next eq EmptyTree)
/*atPos(body.pos)*/(casegen.one(body)) // since SubstOnly treemakers are dropped, need to do it here
- override def toString = "B"+((body, matchPt))
+ override def toString = "B" + ((body, matchPt))
}
/**
@@ -532,7 +532,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
}
- override def toString = "X"+((extractor, nextBinder.name))
+ override def toString = "X" + ((extractor, nextBinder.name))
}
/**
@@ -584,7 +584,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
}
}
- override def toString = "P"+((prevBinder.name, extraCond getOrElse "", introducedRebindings))
+ override def toString = "P" + ((prevBinder.name, extraCond getOrElse "", introducedRebindings))
}
object IrrefutableExtractorTreeMaker {
@@ -706,7 +706,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
case class TypeTestTreeMaker(afterTest: Symbol, testedBinder: Symbol, expectedTp: Type, nextBinderTp: Type)(override val pos: Position, extractorArgTypeTest: Boolean = false) extends CondTreeMaker {
import TypeTestTreeMaker._
- ctx.debuglog("TTTM"+((prevBinder, extractorArgTypeTest, testedBinder, expectedTp, nextBinderTp)))
+ ctx.debuglog("TTTM" + ((prevBinder, extractorArgTypeTest, testedBinder, expectedTp, nextBinderTp)))
val prevBinder = testedBinder
@@ -802,7 +802,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
// dotty deviation
renderCondition(nonNullImpliedByTestChecker(binder)).asInstanceOf[Boolean]
- override def toString = "TT"+((expectedTp, testedBinder.name, nextBinderTp))
+ override def toString = "TT" + ((expectedTp, testedBinder.name, nextBinderTp))
}
// need to substitute to deal with existential types -- TODO: deal with existentials better, don't substitute (see RichClass during quick.comp)
@@ -814,7 +814,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
// equals need not be well-behaved, so don't intersect with pattern's (stabilized) type (unlike MaybeBoundTyped's accumType, where it's required)
val cond = codegen._equals(patTree, prevBinder)
val res = ref(prevBinder).ensureConforms(nextBinderTp)
- override def toString = "ET"+((prevBinder.name, patTree))
+ override def toString = "ET" + ((prevBinder.name, patTree))
}
case class AlternativesTreeMaker(prevBinder: Symbol, var altss: List[List[TreeMaker]], pos: Position) extends TreeMaker with NoNewBinders {
@@ -843,7 +843,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
val pos = guardTree.pos
def chainBefore(next: Tree)(casegen: Casegen): Tree = casegen.flatMapGuard(guardTree, next)
- override def toString = "G("+ guardTree +")"
+ override def toString = "G(" + guardTree + ")"
}
// combineExtractors changes the current substitution's of the tree makers in `treeMakers`
@@ -873,7 +873,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
def matchFailGen = matchFailGenOverride orElse Some((arg: Symbol) => Throw(New(defn.MatchErrorType, List(ref(arg)))))
- ctx.debuglog("combining cases: "+ (casesRebindingPropagated.map(_.mkString(" >> ")).mkString("{", "\n", "}")))
+ ctx.debuglog("combining cases: " + (casesRebindingPropagated.map(_.mkString(" >> ")).mkString("{", "\n", "}")))
val (suppression, requireSwitch): (Suppression, Boolean) =
/*if (settings.XnoPatmatAnalysis)*/ (Suppression.NoSuppression, false)
@@ -1173,7 +1173,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
/*if (phase.id >= currentRun.uncurryPhase.id)
devWarning(s"running translateMatch past uncurry (at $phase) on $selector match $cases")*/
- ctx.debuglog("translating "+ cases.mkString("{", "\n", "}"))
+ ctx.debuglog("translating " + cases.mkString("{", "\n", "}"))
//val start = if (Statistics.canEnable) Statistics.startTimer(patmatNanos) else null
@@ -1240,7 +1240,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
* 2) is easy -- it looks like: `translatePattern_1.flatMap(translatePattern_2....flatMap(translatePattern_N.flatMap(translateGuard.flatMap((x_i) => success(Xbody(x_i)))))...)`
* this must be right-leaning tree, as can be seen intuitively by considering the scope of bound variables:
* variables bound by pat_1 must be visible from the function inside the left-most flatMap right up to Xbody all the way on the right
- * 1) is tricky because translatePattern_i determines the shape of translatePattern_i+1:
+ * 1) is tricky because translatePattern_i determines the shape of translatePattern_i + 1:
* zoom in on `translatePattern_1.flatMap(translatePattern_2)` for example -- it actually looks more like:
* `translatePattern_1(x_scrut).flatMap((x_1) => {y_i -> x_1._i}translatePattern_2)`
*
@@ -1424,7 +1424,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
else genDrop(binder, expectedLength)
)
// this error-condition has already been checked by checkStarPatOK:
- // if(isSeq) assert(firstIndexingBinder + nbIndexingIndices + (if(lastIsStar) 1 else 0) == totalArity, "(resultInMonad, ts, subPatTypes, subPats)= "+(resultInMonad, ts, subPatTypes, subPats))
+ // if(isSeq) assert(firstIndexingBinder + nbIndexingIndices + (if(lastIsStar) 1 else 0) == totalArity, "(resultInMonad, ts, subPatTypes, subPats)= " +(resultInMonad, ts, subPatTypes, subPats))
// [1] there are `firstIndexingBinder` non-seq tuple elements preceding the Seq
// [2] then we have to index the binder that represents the sequence for the remaining subpatterns, except for...
diff --git a/src/dotty/tools/dotc/transform/SuperAccessors.scala b/src/dotty/tools/dotc/transform/SuperAccessors.scala
index b55628868..36f0acc83 100644
--- a/src/dotty/tools/dotc/transform/SuperAccessors.scala
+++ b/src/dotty/tools/dotc/transform/SuperAccessors.scala
@@ -72,7 +72,7 @@ class SuperAccessors extends MacroTransform with IdentityDenotTransformer { this
private val accDefs = mutable.Map[Symbol, ListBuffer[Tree]]()
private def storeAccessorDefinition(clazz: Symbol, tree: Tree) = {
- val buf = accDefs.getOrElse(clazz, sys.error("no acc def buf for "+clazz))
+ val buf = accDefs.getOrElse(clazz, sys.error("no acc def buf for " + clazz))
buf += tree
}
diff --git a/src/dotty/tools/dotc/typer/ConstFold.scala b/src/dotty/tools/dotc/typer/ConstFold.scala
index 7930b5d4a..ac1c7260b 100644
--- a/src/dotty/tools/dotc/typer/ConstFold.scala
+++ b/src/dotty/tools/dotc/typer/ConstFold.scala
@@ -65,10 +65,10 @@ object ConstFold {
case (nme.UNARY_~ , IntTag ) => Constant(~x.intValue)
case (nme.UNARY_~ , LongTag ) => Constant(~x.longValue)
- case (nme.UNARY_+ , IntTag ) => Constant(+x.intValue)
- case (nme.UNARY_+ , LongTag ) => Constant(+x.longValue)
- case (nme.UNARY_+ , FloatTag ) => Constant(+x.floatValue)
- case (nme.UNARY_+ , DoubleTag ) => Constant(+x.doubleValue)
+ case (nme.UNARY_+ , IntTag ) => Constant(x.intValue)
+ case (nme.UNARY_+ , LongTag ) => Constant(x.longValue)
+ case (nme.UNARY_+ , FloatTag ) => Constant(x.floatValue)
+ case (nme.UNARY_+ , DoubleTag ) => Constant(x.doubleValue)
case (nme.UNARY_- , IntTag ) => Constant(-x.intValue)
case (nme.UNARY_- , LongTag ) => Constant(-x.longValue)
diff --git a/src/dotty/tools/dotc/typer/FrontEnd.scala b/src/dotty/tools/dotc/typer/FrontEnd.scala
index 8ec5079e2..b3cc23ba4 100644
--- a/src/dotty/tools/dotc/typer/FrontEnd.scala
+++ b/src/dotty/tools/dotc/typer/FrontEnd.scala
@@ -27,19 +27,19 @@ class FrontEnd extends Phase {
unit.untpdTree =
if(unit.isJava) new JavaParser(unit.source).parse()
else new Parser(unit.source).parse()
- typr.println("parsed:\n"+unit.untpdTree.show)
+ typr.println("parsed:\n" + unit.untpdTree.show)
}
def enterSyms(implicit ctx: Context) = monitor("indexing") {
val unit = ctx.compilationUnit
ctx.typer.index(unit.untpdTree)
- typr.println("entered: "+unit.source)
+ typr.println("entered: " + unit.source)
}
def typeCheck(implicit ctx: Context) = monitor("typechecking") {
val unit = ctx.compilationUnit
unit.tpdTree = ctx.typer.typedExpr(unit.untpdTree)
- typr.println("typed: "+unit.source)
+ typr.println("typed: " + unit.source)
record("retainedUntypedTrees", unit.untpdTree.treeSize)
record("retainedTypedTrees", unit.tpdTree.treeSize)
}
diff --git a/src/dotty/tools/dotc/typer/RefChecks.scala b/src/dotty/tools/dotc/typer/RefChecks.scala
index 8a778a38d..2783f7f31 100644
--- a/src/dotty/tools/dotc/typer/RefChecks.scala
+++ b/src/dotty/tools/dotc/typer/RefChecks.scala
@@ -875,7 +875,7 @@ class RefChecks extends MiniPhase with SymTransformer { thisTransformer =>
def onSyms[T](f: List[Symbol] => T) = f(List(receiver, actual))
// @MAT normalize for consistency in error message, otherwise only part is normalized due to use of `typeSymbol`
- def typesString = normalizeAll(qual.tpe.widen)+" and "+normalizeAll(other.tpe.widen)
+ def typesString = normalizeAll(qual.tpe.widen)+" and " + normalizeAll(other.tpe.widen)
/* Symbols which limit the warnings we can issue since they may be value types */
val isMaybeValue = Set[Symbol](AnyClass, AnyRefClass, AnyValClass, ObjectClass, ComparableClass, JavaSerializableClass)
@@ -1384,7 +1384,7 @@ class RefChecks extends MiniPhase with SymTransformer { thisTransformer =>
tree
case treeInfo.WildcardStarArg(_) if !isRepeatedParamArg(tree) =>
- unit.error(tree.pos, "no `: _*' annotation allowed here\n"+
+ unit.error(tree.pos, "no `: _*' annotation allowed here\n" +
"(such annotations are only allowed in arguments to *-parameters)")
tree
diff --git a/src/dotty/tools/dotc/util/NameTransformer.scala b/src/dotty/tools/dotc/util/NameTransformer.scala
index 2c3520236..330d513fe 100644
--- a/src/dotty/tools/dotc/util/NameTransformer.scala
+++ b/src/dotty/tools/dotc/util/NameTransformer.scala
@@ -108,9 +108,9 @@ object NameTransformer {
var unicode = false
val c = name charAt i
if (c == '$' && i + 2 < len) {
- val ch1 = name.charAt(i+1)
+ val ch1 = name.charAt(i + 1)
if ('a' <= ch1 && ch1 <= 'z') {
- val ch2 = name.charAt(i+2)
+ val ch2 = name.charAt(i + 2)
if ('a' <= ch2 && ch2 <= 'z') {
ops = code2op((ch1 - 'a') * 26 + ch2 - 'a')
while ((ops ne null) && !name.startsWith(ops.code, i)) ops = ops.next
@@ -129,7 +129,7 @@ object NameTransformer {
((Character.isDigit(ch2)) ||
('A' <= ch2 && ch2 <= 'F'))) {
/* Skip past "$u", next four should be hexadecimal */
- val hex = name.substring(i+2, i+6)
+ val hex = name.substring(i + 2, i + 6)
try {
val str = Integer.parseInt(hex, 16).toChar
if (buf eq null) {
diff --git a/src/dotty/tools/dotc/util/SourcePosition.scala b/src/dotty/tools/dotc/util/SourcePosition.scala
index 3b16c3685..3d6352a1a 100644
--- a/src/dotty/tools/dotc/util/SourcePosition.scala
+++ b/src/dotty/tools/dotc/util/SourcePosition.scala
@@ -14,7 +14,7 @@ case class SourcePosition(source: SourceFile, pos: Position) {
def column: Int = source.column(point)
override def toString =
- if (source.exists) s"${source.file}:${line+1}"
+ if (source.exists) s"${source.file}:${line + 1}"
else s"(no source file, offset = ${pos.point})"
}
diff --git a/src/dotty/tools/io/ClassPath.scala b/src/dotty/tools/io/ClassPath.scala
index 055ee9f88..ecb063469 100644
--- a/src/dotty/tools/io/ClassPath.scala
+++ b/src/dotty/tools/io/ClassPath.scala
@@ -283,7 +283,7 @@ class SourcePath(dir: AbstractFile, val context: ClassPathContext) extends Class
}
lazy val (packages, classes) = traverse()
- override def toString() = "sourcepath: "+ dir.toString()
+ override def toString() = "sourcepath: " + dir.toString()
}
/**
@@ -310,7 +310,7 @@ class DirectoryClassPath(val dir: AbstractFile, val context: ClassPathContext) e
}
lazy val (packages, classes) = traverse()
- override def toString() = "directory classpath: "+ origin.getOrElse("?")
+ override def toString() = "directory classpath: " + origin.getOrElse("?")
}
class DeltaClassPath(original: MergedClassPath, subst: Map[ClassPath, ClassPath])
@@ -393,7 +393,7 @@ extends ClassPath {
println("ClassPath %s has %d entries and results in:\n".format(name, entries.size))
asClasspathString split ':' foreach (x => println(" " + x))
}
- override def toString() = "merged classpath "+ entries.mkString("(", "\n", ")")
+ override def toString() = "merged classpath " + entries.mkString("(", "\n", ")")
}
/**