aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-09 18:14:25 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-09 23:13:51 +0200
commit74957b3b20aae3a0a2c7a41000c5a1424586f412 (patch)
treeeb26dcb0cf2cf992ebf8d2eb763d03ff6da8634d /src/dotty/tools/backend/jvm/DottyBackendInterface.scala
parentd0804782ba6956b1f906e646d14e3547adcaa23a (diff)
downloaddotty-74957b3b20aae3a0a2c7a41000c5a1424586f412.tar.gz
dotty-74957b3b20aae3a0a2c7a41000c5a1424586f412.tar.bz2
dotty-74957b3b20aae3a0a2c7a41000c5a1424586f412.zip
Ensure spaces after `if` in Dotty source.
Diffstat (limited to 'src/dotty/tools/backend/jvm/DottyBackendInterface.scala')
-rw-r--r--src/dotty/tools/backend/jvm/DottyBackendInterface.scala14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
index ee8d27137..e9c8dbc80 100644
--- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
+++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
@@ -376,7 +376,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
def shouldEmitJumpAfterLabels = true
def dumpClasses: Option[String] =
- if(ctx.settings.Ydumpclasses.isDefault) None
+ if (ctx.settings.Ydumpclasses.isDefault) None
else Some(ctx.settings.Ydumpclasses.value)
def mainClass: Option[String] =
@@ -423,7 +423,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
case TermRef(prefix: ThisType, name) =>
Some(tpd.This(prefix.cls).select(i.symbol))
case TermRef(NoPrefix, name) =>
- if(i.symbol is Flags.Method) Some(This(i.symbol.enclosingClass).select(i.symbol)) // workaround #342 todo: remove after fixed
+ if (i.symbol is Flags.Method) Some(This(i.symbol.enclosingClass).select(i.symbol)) // workaround #342 todo: remove after fixed
else None
case _ => None
}
@@ -663,7 +663,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
def companionSymbol: Symbol = if (sym is Flags.Module) companionClass else companionModule
def moduleClass: Symbol = toDenot(sym).moduleClass
def enclosingClassSym: Symbol = {
- if(this.isClass) {
+ if (this.isClass) {
val ct = ctx.withPhase(ctx.flattenPhase.prev)
toDenot(sym)(ct).owner.enclosingClass(ct)
}
@@ -792,7 +792,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
t.info match {
case _ =>
- if(!t.symbol.isClass) nonClassTypeRefToBType(t.symbol) // See comment on nonClassTypeRefToBType
+ if (!t.symbol.isClass) nonClassTypeRefToBType(t.symbol) // See comment on nonClassTypeRefToBType
else primitiveOrClassToBType(t.symbol) // Common reference to a type such as scala.Int or java.lang.String
}
case Types.ClassInfo(_, sym, _, _, _) => primitiveOrClassToBType(sym) // We get here, for example, for genLoadModule, which invokes toTypeKind(moduleClassSymbol.info)
@@ -942,7 +942,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
def _3: Tree = field.rhs
override def unapply(s: LabelDef): DottyBackendInterface.this.LabelDef.type = {
- if(s.symbol is Flags.Label) this.field = s
+ if (s.symbol is Flags.Label) this.field = s
else this.field = null
this
}
@@ -1021,11 +1021,11 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
def _2 = field.meth
def _3 = {
val t = field.tpt.tpe.typeSymbol
- if(t.exists) t
+ if (t.exists) t
else {
val arity = field.meth.tpe.widenDealias.paramTypes.size - _1.size
val returnsUnit = field.meth.tpe.widenDealias.resultType.classSymbol == UnitClass
- if(returnsUnit)
+ if (returnsUnit)
ctx.requiredClass(("scala.compat.java8.JProcedure" + arity).toTermName)
else ctx.requiredClass(("scala.compat.java8.JFunction" + arity).toTermName)
}