summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-08-27 01:18:52 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-08-27 01:18:52 +1000
commitf6467d063167da3a34ac92957d3a308d2a230926 (patch)
tree9244a5542cc3b26b0a2b05e90c36e0744b971a05 /src
parent47908f19e064151140e32819c2edd9e68b34dd0c (diff)
downloadscala-f6467d063167da3a34ac92957d3a308d2a230926.tar.gz
scala-f6467d063167da3a34ac92957d3a308d2a230926.tar.bz2
scala-f6467d063167da3a34ac92957d3a308d2a230926.zip
SI-8823 Exclude specialized methods from extension method rewrite
If a value class extends a specialized class, it can sprout specialized members after the specialization info transformer has run. However, we only install extension methods for class members we know about at the extmethods phase. This commit simply disables rewiring calls to these methods in erasure to an extention method. This follows the approach taken from super accessors. Note: value class type parameters themselves currently are not allowed to be specialized.
Diffstat (limited to 'src')
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index b6cce4524b..ac7d2343fa 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -795,7 +795,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
info.firstParent.typeSymbol == AnyValClass && !isPrimitiveValueClass
final def isMethodWithExtension =
- isMethod && owner.isDerivedValueClass && !isParamAccessor && !isConstructor && !hasFlag(SUPERACCESSOR) && !isMacro
+ isMethod && owner.isDerivedValueClass && !isParamAccessor && !isConstructor && !hasFlag(SUPERACCESSOR) && !isMacro && !isSpecialized
final def isAnonymousFunction = isSynthetic && (name containsName tpnme.ANON_FUN_NAME)
final def isDefinedInPackage = effectiveOwner.isPackageClass