summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-11-30 17:13:52 +0000
committerPaul Phillips <paulp@improving.org>2010-11-30 17:13:52 +0000
commit81f38907b838caa64d26b4ea49efe938a3d0673f (patch)
tree06d272e24be36f359be3ea8b788491f0f26c30fd /src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
parent4be5e11cccace4974ed9a449052455392570139f (diff)
downloadscala-81f38907b838caa64d26b4ea49efe938a3d0673f.tar.gz
scala-81f38907b838caa64d26b4ea49efe938a3d0673f.tar.bz2
scala-81f38907b838caa64d26b4ea49efe938a3d0673f.zip
Found several minor thigns wrong with checkSens...
Found several minor thigns wrong with checkSensible, which tries to issue warnings for comparisons which will always be true or false. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/JavaPlatform.scala')
-rw-r--r--src/compiler/scala/tools/nsc/backend/JavaPlatform.scala8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/JavaPlatform.scala b/src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
index 8d77eef488..8373f9bfd6 100644
--- a/src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
+++ b/src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
@@ -33,12 +33,18 @@ trait JavaPlatform extends Platform[AbstractFile] {
def externalEqualsNumChar = getMember(BoxesRunTimeClass, "equalsNumChar")
def externalEqualsNumObject = getMember(BoxesRunTimeClass, "equalsNumObject")
+ /** We could get away with excluding BoxedBooleanClass for the
+ * purpose of equality testing since it need not compare equal
+ * to anything but other booleans, but it should be present in
+ * case this is put to other uses.
+ */
def isMaybeBoxed(sym: Symbol): Boolean = {
import definitions._
(sym == ObjectClass) ||
(sym == JavaSerializableClass) ||
(sym == ComparableClass) ||
(sym isNonBottomSubClass BoxedNumberClass) ||
- (sym isNonBottomSubClass BoxedCharacterClass)
+ (sym isNonBottomSubClass BoxedCharacterClass) ||
+ (sym isNonBottomSubClass BoxedBooleanClass)
}
}