summaryrefslogtreecommitdiff
path: root/test/files/run/Course-2002-13.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-02-04 12:26:42 +0000
committerPaul Phillips <paulp@improving.org>2010-02-04 12:26:42 +0000
commit9ee1f2f3b8ed91897bb298592f8a600ff5e4622d (patch)
treea2959e3eeaecb558d13a279404d35fb174df7ee7 /test/files/run/Course-2002-13.scala
parent93277ea0201f139e829cfd7248142a0c5898d9ce (diff)
downloadscala-9ee1f2f3b8ed91897bb298592f8a600ff5e4622d.tar.gz
scala-9ee1f2f3b8ed91897bb298592f8a600ff5e4622d.tar.bz2
scala-9ee1f2f3b8ed91897bb298592f8a600ff5e4622d.zip
Unique's seeming victory is overruled by commit...
Unique's seeming victory is overruled by committee. It is "distinct", not "unique", wherein lies the nub. No review.
Diffstat (limited to 'test/files/run/Course-2002-13.scala')
-rw-r--r--test/files/run/Course-2002-13.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/run/Course-2002-13.scala b/test/files/run/Course-2002-13.scala
index fa5390e534..c016d41a90 100644
--- a/test/files/run/Course-2002-13.scala
+++ b/test/files/run/Course-2002-13.scala
@@ -66,7 +66,7 @@ object Terms {
override def toString() =
a + (if (ts.isEmpty) "" else ts.mkString("(", ",", ")"));
def map(s: Subst): Term = Con(a, ts map (t => t map s));
- def tyvars = (ts flatMap (t => t.tyvars)).unique;
+ def tyvars = (ts flatMap (t => t.tyvars)).distinct;
}
private var count = 0;
@@ -113,7 +113,7 @@ object Programs {
case class Clause(lhs: Term, rhs: List[Term]) {
def tyvars =
- (lhs.tyvars ::: (rhs flatMap (t => t.tyvars))).unique;
+ (lhs.tyvars ::: (rhs flatMap (t => t.tyvars))).distinct;
def newInstance = {
var s: Subst = List();
for (val a <- tyvars) { s = Binding(a, newVar(a)) :: s }