Skip to content

Commit d2abd90

Browse files
OlivierBlanvillainodersky
authored andcommitted
Remove extra parentheses
1 parent 818225e commit d2abd90

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
@@ -683,7 +683,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
683683

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

689689
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
@@ -289,7 +289,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
289289
if (cls.classInfo.selfInfo ne NoType) ValDef(ctx.newSelfSym(cls))
290290
else EmptyValDef
291291
def isOwnTypeParam(stat: Tree) =
292-
(stat.symbol.is(TypeParam)) && stat.symbol.owner == cls
292+
stat.symbol.is(TypeParam) && stat.symbol.owner == cls
293293
val bodyTypeParams = body filter isOwnTypeParam map (_.symbol)
294294
val newTypeParams =
295295
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
@@ -313,7 +313,7 @@ object Denotations {
313313
def requiredMethod(pname: PreName, argTypes: List[Type])(implicit ctx: Context): TermSymbol = {
314314
val name = pname.toTermName
315315
info.member(name).requiredSymbol(i"method", name, this, argTypes) { x =>
316-
(x.is(Method)) && {
316+
x.is(Method) && {
317317
x.info.paramInfoss match {
318318
case paramInfos :: Nil => paramInfos.corresponds(argTypes)(_ =:= _)
319319
case _ => false
@@ -1370,7 +1370,7 @@ object Denotations {
13701370
* enter it.
13711371
*/
13721372
def missingHook(owner: Symbol, name: Name)(implicit ctx: Context): Symbol =
1373-
if ((owner.is(Package)) && name.isTermName)
1373+
if (owner.is(Package) && name.isTermName)
13741374
ctx.newCompletePackageSymbol(owner, name.asTermName).entered
13751375
else
13761376
NoSymbol

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ object SymDenotations {
14961496
*/
14971497
private def typeParamsFromDecls(implicit ctx: Context) =
14981498
unforcedDecls.filter(sym =>
1499-
(sym.is(TypeParam)) && sym.owner == symbol).asInstanceOf[List[TypeSymbol]]
1499+
sym.is(TypeParam) && sym.owner == symbol).asInstanceOf[List[TypeSymbol]]
15001500

15011501
/** The type parameters of this class */
15021502
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
@@ -760,7 +760,7 @@ object Symbols {
760760

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

766766
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
@@ -232,7 +232,7 @@ object TypeErasure {
232232
}
233233

234234
/** Is `tp` an abstract type or polymorphic type parameter that has `Any`, `AnyVal`,
235-
* or a universal trait as upper bound and that.is(not) Java defined? Arrays of such types are
235+
* or a universal trait as upper bound and that is not Java defined? Arrays of such types are
236236
* erased to `Object` instead of `Object[]`.
237237
*/
238238
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
@@ -4325,7 +4325,7 @@ object Types {
43254325
case et: ExprType => true
43264326
case _ => false
43274327
}
4328-
if ((tp.cls.is(Trait)) || zeroParams(tp.cls.primaryConstructor.info)) tp // !!! needs to be adapted once traits have parameters
4328+
if (tp.cls.is(Trait) || zeroParams(tp.cls.primaryConstructor.info)) tp // !!! needs to be adapted once traits have parameters
43294329
else NoType
43304330
case tp: AppliedType =>
43314331
zeroParamClass(tp.superType)
@@ -5121,7 +5121,7 @@ object Types {
51215121
def apply(pre: Type, name: Name)(implicit ctx: Context): Boolean =
51225122
name.isTypeName && {
51235123
val mbr = pre.nonPrivateMember(name)
5124-
(mbr.symbol.is(Deferred)) && mbr.info.isInstanceOf[RealTypeBounds]
5124+
mbr.symbol.is(Deferred) && mbr.info.isInstanceOf[RealTypeBounds]
51255125
}
51265126
}
51275127

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
@@ -84,7 +84,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
8484
* to the name of the owner.
8585
*/
8686
protected def hasMeaninglessName(sym: Symbol): Boolean = (
87-
(sym.is(Param)) && sym.owner.isSetter // x$1
87+
sym.is(Param) && sym.owner.isSetter // x$1
8888
|| sym.isClassConstructor // this
8989
|| (sym.name == nme.PACKAGE) // package
9090
)

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)

0 commit comments

Comments
 (0)