Hopefully fix for inadvertant stability failure introduced in r18118.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@18119 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
6959576bc7
commit
23f5c43f50
|
@ -225,19 +225,19 @@ trait SyntheticMethods extends ast.TreeDSL {
|
|||
}
|
||||
|
||||
// methods for case classes only
|
||||
def classMethods = Map(
|
||||
def classMethods = List(
|
||||
Object_hashCode -> (() => forwardingMethod(nme.hashCode_)),
|
||||
Object_toString -> (() => forwardingMethod(nme.toString_)),
|
||||
Object_equals -> (() => equalsClassMethod)
|
||||
)
|
||||
// methods for case objects only
|
||||
def objectMethods = Map(
|
||||
def objectMethods = List(
|
||||
Object_toString -> (() => moduleToStringMethod)
|
||||
)
|
||||
// methods for both classes and objects
|
||||
def everywhereMethods = {
|
||||
val accessors = clazz.caseFieldAccessors
|
||||
Map(
|
||||
List(
|
||||
Product_productPrefix -> (() => productPrefixMethod),
|
||||
Product_productArity -> (() => productArityMethod(accessors.length)),
|
||||
Product_productElement -> (() => productElementMethod(accessors))
|
||||
|
@ -251,8 +251,8 @@ trait SyntheticMethods extends ast.TreeDSL {
|
|||
if (otherEquals.owner != clazz && (otherEquals hasFlag SYNTHETICMETH)) ts += equalsModuleMethod
|
||||
}
|
||||
|
||||
val map = (if (clazz.isModuleClass) objectMethods else classMethods) ++ everywhereMethods
|
||||
for ((m, impl) <- map ; if !hasOverridingImplementation(m))
|
||||
val methods = (if (clazz.isModuleClass) objectMethods else classMethods) ++ everywhereMethods
|
||||
for ((m, impl) <- methods ; if !hasOverridingImplementation(m))
|
||||
ts += impl()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue