diff options
author | Paul Phillips <paulp@improving.org> | 2009-02-12 13:51:32 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-02-12 13:51:32 +0000 |
commit | 903933d7fd70478747e49a45634701942881d444 (patch) | |
tree | 65f52caf623d5b1c3cdf825fc93d1d69ab3e5f0a | |
parent | 40f7264305dc7d82d131f8f4d3a38875a879952e (diff) | |
download | scala-903933d7fd70478747e49a45634701942881d444.tar.gz scala-903933d7fd70478747e49a45634701942881d444.tar.bz2 scala-903933d7fd70478747e49a45634701942881d444.zip |
A few more very minor fixes based on input from...
A few more very minor fixes based on input from findbugs.
4 files changed, 4 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala index f6b3b3064c..02ae047476 100644 --- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala +++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala @@ -307,7 +307,7 @@ trait Symbols { //final def isMonomorphicType = isType && hasFlag(MONOMORPHIC) final def isError = hasFlag(IS_ERROR) final def isErroneous = isError || isInitialized && tpe.isErroneous - final def isTrait = isClass & hasFlag(TRAIT | notDEFERRED) // A virtual class becomes a trait (part of DEVIRTUALIZE) + final def isTrait = isClass && hasFlag(TRAIT | notDEFERRED) // A virtual class becomes a trait (part of DEVIRTUALIZE) final def isTypeParameterOrSkolem = isType && hasFlag(PARAM) final def isTypeSkolem = isSkolem && hasFlag(PARAM) final def isTypeParameter = isTypeParameterOrSkolem && !isSkolem diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index 99af3143e0..426a9d4a52 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -52,8 +52,7 @@ abstract class ClassfileParser { def parse(file: AbstractFile, root: Symbol) = try { def handleError(e: Exception) = { - if (e.isInstanceOf[AssertionError] || settings.debug.value) - e.printStackTrace() + if (settings.debug.value) e.printStackTrace() throw new IOException("class file '" + in.file + "' is broken\n(" + { if (e.getMessage() != null) e.getMessage() else e.getClass.toString diff --git a/src/compiler/scala/tools/nsc/transform/Reifiers.scala b/src/compiler/scala/tools/nsc/transform/Reifiers.scala index 224b20d44b..9a0a1b6526 100644 --- a/src/compiler/scala/tools/nsc/transform/Reifiers.scala +++ b/src/compiler/scala/tools/nsc/transform/Reifiers.scala @@ -62,7 +62,7 @@ trait Reifiers { val beforeArgs = reflect.PrefixedType(rpre, rsym) if (rargs.isEmpty) beforeArgs - else if (rpre == NoType || rsym == NoSymbol) + else if (rpre == reflect.NoType || rsym == reflect.NoSymbol) beforeArgs else reflect.AppliedType(beforeArgs, rargs) diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index c23853caed..533e80ec45 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -705,7 +705,7 @@ trait Typers { self: Analyzer => context.undetparams = context.undetparams ::: tparams1 adapt(tree1 setType restpe.substSym(tparams, tparams1), mode, pt) case mt: ImplicitMethodType if ((mode & (EXPRmode | FUNmode | LHSmode)) == EXPRmode) => // (4.1) - if (!context.undetparams.isEmpty & (mode & POLYmode) == 0) { // (9) + if (!context.undetparams.isEmpty && (mode & POLYmode) == 0) { // (9) val tparams = context.undetparams context.undetparams = List() inferExprInstance(tree, tparams, pt) |