summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-06-26 02:50:53 +0000
committerPaul Phillips <paulp@improving.org>2009-06-26 02:50:53 +0000
commit26adfa06101a0744c235cdab0cc67a133e9978ab (patch)
treef671ba07fed7cab6e7d883e198ffcf200ab69daf /src
parentd0452d00c91350dfcb829ad890181d826c9ab9c8 (diff)
downloadscala-26adfa06101a0744c235cdab0cc67a133e9978ab.tar.gz
scala-26adfa06101a0744c235cdab0cc67a133e9978ab.tar.bz2
scala-26adfa06101a0744c235cdab0cc67a133e9978ab.zip
Hopefully fix for inadvertant stability failure...
Hopefully fix for inadvertant stability failure introduced in r18118.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala
index b57f4b48f9..5809b56f30 100644
--- a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala
@@ -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()
}