summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2012-11-01 12:07:26 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2012-11-01 12:07:26 -0700
commitb7d78d2d6e1d970e7ef2c02a3ad42b4356672971 (patch)
tree8f81137c48f0fc815be3207faafa5efe032a53df /src
parentea3b00e208b0df2deab22da57d28e17377e46e46 (diff)
parent0bb625b7823befafb170ef05f0493dd0a81a217a (diff)
downloadscala-b7d78d2d6e1d970e7ef2c02a3ad42b4356672971.tar.gz
scala-b7d78d2d6e1d970e7ef2c02a3ad42b4356672971.tar.bz2
scala-b7d78d2d6e1d970e7ef2c02a3ad42b4356672971.zip
Merge pull request #1540 from odersky/ticket/6500
Fixes SI-6500 by making erasure more regular.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/transform/Erasure.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala
index 3ac7dd2a8f..a581c6d734 100644
--- a/src/compiler/scala/tools/nsc/transform/Erasure.scala
+++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala
@@ -469,7 +469,7 @@ abstract class Erasure extends AddInterfaces
}
def checkPair(member: Symbol, other: Symbol) {
- val otpe = erasure(root)(other.tpe)
+ val otpe = specialErasure(root)(other.tpe)
val bridgeNeeded = afterErasure (
!(other.tpe =:= member.tpe) &&
!(deconstMap(other.tpe) =:= deconstMap(member.tpe)) &&
@@ -488,7 +488,7 @@ abstract class Erasure extends AddInterfaces
debuglog("generating bridge from %s (%s): %s to %s: %s".format(
other, flagsToString(newFlags),
otpe + other.locationString, member,
- erasure(root)(member.tpe) + member.locationString)
+ specialErasure(root)(member.tpe) + member.locationString)
)
// the parameter symbols need to have the new owner
@@ -1118,6 +1118,8 @@ abstract class Erasure extends AddInterfaces
} else {
// store exact array erasure in map to be retrieved later when we might
// need to do the cast in adaptMember
+ // Note: No specialErasure needed here because we simply cast, on
+ // elimination of SelectFromArray, no boxing or unboxing is done there.
treeCopy.Apply(
tree,
SelectFromArray(qual, name, erasure(tree.symbol)(qual.tpe)).copyAttrs(fn),