diff options
-rw-r--r-- | src/reflect/scala/reflect/internal/Symbols.scala | 2 | ||||
-rw-r--r-- | test/files/run/t8823.scala | 10 |
2 files changed, 11 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 diff --git a/test/files/run/t8823.scala b/test/files/run/t8823.scala new file mode 100644 index 0000000000..0ac653566a --- /dev/null +++ b/test/files/run/t8823.scala @@ -0,0 +1,10 @@ +class Tuple2Int(val encoding: Long) extends AnyVal with Product2[Int, Int] { + def canEqual(that: Any) = false + def _1: Int = 1 + def _2: Int = 2 +} + +object Test extends App { + assert(new Tuple2Int(0)._1 == 1) + assert(new Tuple2Int(0)._2 == 2) +} |