Skip to content

Commit d41bd9a

Browse files
Remove extra parentheses
1 parent 7e9d71d commit d41bd9a

File tree

12 files changed

+14
-14
lines changed

12 files changed

+14
-14
lines changed

compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
682682

683683
def isFinal: Boolean = sym.is(Flags.Final)
684684
def isStaticMember: Boolean = (sym ne NoSymbol) &&
685-
((sym.is(Flags.JavaStatic)) || toDenot(sym).hasAnnotation(ctx.definitions.ScalaStaticAnnot))
685+
(sym.is(Flags.JavaStatic) || toDenot(sym).hasAnnotation(ctx.definitions.ScalaStaticAnnot))
686686
// guard against no sumbol cause this code is executed to select which call type(static\dynamic) to use to call array.clone
687687

688688
def isBottomClass: Boolean = (sym ne defn.NullClass) && (sym ne defn.NothingClass)

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
285285
if (cls.classInfo.selfInfo ne NoType) ValDef(ctx.newSelfSym(cls))
286286
else EmptyValDef
287287
def isOwnTypeParam(stat: Tree) =
288-
(stat.symbol.is(TypeParam)) && stat.symbol.owner == cls
288+
stat.symbol.is(TypeParam) && stat.symbol.owner == cls
289289
val bodyTypeParams = body filter isOwnTypeParam map (_.symbol)
290290
val newTypeParams =
291291
for (tparam <- cls.typeParams if !(bodyTypeParams contains tparam))

compiler/src/dotty/tools/dotc/core/Denotations.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ object Denotations {
311311
def requiredMethod(pname: PreName, argTypes: List[Type])(implicit ctx: Context): TermSymbol = {
312312
val name = pname.toTermName
313313
info.member(name).requiredSymbol(i"method", name, this, argTypes) { x =>
314-
(x.is(Method)) && {
314+
x.is(Method) && {
315315
x.info.paramInfoss match {
316316
case paramInfos :: Nil => paramInfos.corresponds(argTypes)(_ =:= _)
317317
case _ => false
@@ -1340,7 +1340,7 @@ object Denotations {
13401340
* enter it.
13411341
*/
13421342
def missingHook(owner: Symbol, name: Name)(implicit ctx: Context): Symbol =
1343-
if ((owner.is(Package)) && name.isTermName)
1343+
if (owner.is(Package) && name.isTermName)
13441344
ctx.newCompletePackageSymbol(owner, name.asTermName).entered
13451345
else
13461346
NoSymbol

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ object SymDenotations {
14811481
*/
14821482
private def typeParamsFromDecls(implicit ctx: Context) =
14831483
unforcedDecls.filter(sym =>
1484-
(sym.is(TypeParam)) && sym.owner == symbol).asInstanceOf[List[TypeSymbol]]
1484+
sym.is(TypeParam) && sym.owner == symbol).asInstanceOf[List[TypeSymbol]]
14851485

14861486
/** The type parameters of this class */
14871487
override final def typeParams(implicit ctx: Context): List[TypeSymbol] = {

compiler/src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ object Symbols {
751751

752752
/** The source or class file from which this class was generated, null if not applicable. */
753753
override def associatedFile(implicit ctx: Context): AbstractFile =
754-
if (assocFile != null || (this.owner.is(PackageClass)) || this.isEffectiveRoot) assocFile
754+
if (assocFile != null || this.owner.is(PackageClass) || this.isEffectiveRoot) assocFile
755755
else super.associatedFile
756756

757757
private[this] var mySource: SourceFile = NoSource

compiler/src/dotty/tools/dotc/core/TypeErasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ object TypeErasure {
215215
}
216216

217217
/** Is `tp` an abstract type or polymorphic type parameter that has `Any`, `AnyVal`,
218-
* or a universal trait as upper bound and that.is(not) Java defined? Arrays of such types are
218+
* or a universal trait as upper bound and that is not Java defined? Arrays of such types are
219219
* erased to `Object` instead of `Object[]`.
220220
*/
221221
def isUnboundedGeneric(tp: Type)(implicit ctx: Context): Boolean = tp.dealias match {

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4327,7 +4327,7 @@ object Types {
43274327
case et: ExprType => true
43284328
case _ => false
43294329
}
4330-
if ((tp.cls.is(Trait)) || zeroParams(tp.cls.primaryConstructor.info)) tp // !!! needs to be adapted once traits have parameters
4330+
if (tp.cls.is(Trait) || zeroParams(tp.cls.primaryConstructor.info)) tp // !!! needs to be adapted once traits have parameters
43314331
else NoType
43324332
case tp: AppliedType =>
43334333
zeroParamClass(tp.superType)
@@ -5123,7 +5123,7 @@ object Types {
51235123
def apply(pre: Type, name: Name)(implicit ctx: Context): Boolean =
51245124
name.isTypeName && {
51255125
val mbr = pre.nonPrivateMember(name)
5126-
(mbr.symbol.is(Deferred)) && mbr.info.isInstanceOf[RealTypeBounds]
5126+
mbr.symbol.is(Deferred) && mbr.info.isInstanceOf[RealTypeBounds]
51275127
}
51285128
}
51295129

compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ object JavaParsers {
738738
} else {
739739
if (in.token == ENUM || definesInterface(in.token)) mods |= Flags.JavaStatic
740740
val decls = memberDecl(start, mods, parentToken, parentTParams)
741-
(if ((mods.is(Flags.JavaStatic)) || inInterface && !(decls exists (_.isInstanceOf[DefDef])))
741+
(if (mods.is(Flags.JavaStatic) || inInterface && !(decls exists (_.isInstanceOf[DefDef])))
742742
statics
743743
else
744744
members) ++= decls

compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
8383
* to the name of the owner.
8484
*/
8585
protected def hasMeaninglessName(sym: Symbol): Boolean = (
86-
(sym.is(Param)) && sym.owner.isSetter // x$1
86+
sym.is(Param) && sym.owner.isSetter // x$1
8787
|| sym.isClassConstructor // this
8888
|| (sym.name == nme.PACKAGE) // package
8989
)

compiler/src/dotty/tools/dotc/transform/TransformByNameApply.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ abstract class TransformByNameApply extends MiniPhase { thisPhase: DenotTransfor
2727

2828
/** If denotation had an ExprType before, it now gets a function type */
2929
protected def exprBecomesFunction(symd: SymDenotation)(implicit ctx: Context): Boolean =
30-
(symd.is(Param)) || symd.is(ParamAccessor, butNot = Method)
30+
symd.is(Param) || symd.is(ParamAccessor, butNot = Method)
3131

3232
protected def isByNameRef(tree: Tree)(implicit ctx: Context): Boolean = {
3333
val origDenot = originalDenotation(tree)

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
467467
}
468468
}
469469
val getterPrefix =
470-
if ((meth.is(Synthetic)) && meth.name == nme.apply) nme.CONSTRUCTOR else meth.name
470+
if (meth.is(Synthetic) && meth.name == nme.apply) nme.CONSTRUCTOR else meth.name
471471
def getterName = DefaultGetterName(getterPrefix, n)
472472
if (!meth.hasDefaultParams)
473473
EmptyTree

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ class Typer extends Namer
301301
curOwner
302302
effectiveOwner.thisType.select(name, defDenot)
303303
}
304-
if (!(curOwner.is(Package)) || isDefinedInCurrentUnit(defDenot))
304+
if (!curOwner.is(Package) || isDefinedInCurrentUnit(defDenot))
305305
result = checkNewOrShadowed(found, definition) // no need to go further out, we found highest prec entry
306306
else {
307307
if (ctx.scala2Mode && !foundUnderScala2.exists)

0 commit comments

Comments
 (0)