summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/transform/Constructors.scala
diff options
context:
space:
mode:
authorSimon Ochsenreither <simon@ochsenreither.de>2013-06-19 03:37:49 +0200
committerSimon Ochsenreither <simon@ochsenreither.de>2013-06-19 16:54:56 +0200
commitf94d86ed9e27c57c5996dbb022b350d32fa6698f (patch)
treeb53e79f04f9466a589098d6fbf85f57315e7d4f3 /src/compiler/scala/tools/nsc/transform/Constructors.scala
parent70a93f52c3efafe604d6547b335cc361deff4f29 (diff)
downloadscala-f94d86ed9e27c57c5996dbb022b350d32fa6698f.tar.gz
scala-f94d86ed9e27c57c5996dbb022b350d32fa6698f.tar.bz2
scala-f94d86ed9e27c57c5996dbb022b350d32fa6698f.zip
SI-7592 Replace s.t.n.u.TreeSet with s.c.m.TreeSet
This means - migrating usages from the compiler-specific implementation to the one in the standard library - removing the now unused compiler-specific implementation
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/Constructors.scala')
-rw-r--r--src/compiler/scala/tools/nsc/transform/Constructors.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Constructors.scala b/src/compiler/scala/tools/nsc/transform/Constructors.scala
index 75fb043070..7dfa7cdf8d 100644
--- a/src/compiler/scala/tools/nsc/transform/Constructors.scala
+++ b/src/compiler/scala/tools/nsc/transform/Constructors.scala
@@ -9,7 +9,6 @@ package transform
import scala.collection.{ mutable, immutable }
import scala.collection.mutable.ListBuffer
import symtab.Flags._
-import util.TreeSet
/** This phase converts classes with parameters into Java-like classes with
* fields, which are assigned to from constructors.
@@ -239,7 +238,8 @@ abstract class Constructors extends Transform with ast.TreeDSL {
// ----------- avoid making parameter-accessor fields for symbols accessed only within the primary constructor --------------
// A sorted set of symbols that are known to be accessed outside the primary constructor.
- val accessedSyms = new TreeSet[Symbol]((x, y) => x isLess y)
+ val ord = Ordering.fromLessThan[Symbol](_ isLess _)
+ val accessedSyms = mutable.TreeSet.empty[Symbol](ord)
// a list of outer accessor symbols and their bodies
var outerAccessors: List[(Symbol, Tree)] = List()
@@ -271,7 +271,7 @@ abstract class Constructors extends Transform with ast.TreeDSL {
case Select(_, _) =>
if (!mustbeKept(tree.symbol)) {
debuglog("accessedSyms += " + tree.symbol.fullName)
- accessedSyms addEntry tree.symbol
+ accessedSyms += tree.symbol
}
super.traverse(tree)
case _ =>