diff options
author | Martin Odersky <odersky@gmail.com> | 2012-09-19 16:19:56 +0200 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-09-20 09:41:34 -0700 |
commit | e171d6d969fe7ce0dd2fd7a7679d6edb08c7579c (patch) | |
tree | f54e7991ce2dcc601f65ed0191b4260d7e6b21ee /src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala | |
parent | b94ae90110412e8af1e65230053c0e8aa26cd2d7 (diff) | |
download | scala-e171d6d969fe7ce0dd2fd7a7679d6edb08c7579c.tar.gz scala-e171d6d969fe7ce0dd2fd7a7679d6edb08c7579c.tar.bz2 scala-e171d6d969fe7ce0dd2fd7a7679d6edb08c7579c.zip |
Value classes: eliminated half-boxing
We now apply erasure of value classes everywhere. previously,
erasure was disabled in the value class itself. This led to
irregegularities and bugs. See test run/valueclasses-pavlov.scala
for something that led to a ClassCastException before.
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala b/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala index 0820d3e714..c72fd3681f 100644 --- a/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala +++ b/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala @@ -70,7 +70,8 @@ abstract class ExtensionMethods extends Transform with TypingTransformers { val companionInfo = imeth.owner.companionModule.info val candidates = extensionNames(imeth) map (companionInfo.decl(_)) val matching = candidates filter (alt => normalize(alt.tpe, imeth.owner) matches imeth.tpe) - assert(matching.nonEmpty, "no extension method found for "+imeth+" among "+candidates+"/"+extensionNames(imeth)) + assert(matching.nonEmpty, + s"no extension method found for $imeth:${imeth.tpe}+among ${candidates map (c => c.name+":"+c.tpe)} / ${extensionNames(imeth)}") matching.head } |