From f8d9a8129305c0286897554160dee8224bfabb71 Mon Sep 17 00:00:00 2001
From: "Paolo G. Giarrusso"
Date: Tue, 8 May 2018 21:27:11 +0200
Subject: [PATCH] Fix typo in SimpleIdentitySet
This might not affect correctness but will create a bigger set even if unneeded.
---
compiler/src/dotty/tools/dotc/util/SimpleIdentitySet.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/src/dotty/tools/dotc/util/SimpleIdentitySet.scala b/compiler/src/dotty/tools/dotc/util/SimpleIdentitySet.scala
index 29df005fc856..8968f7196f73 100644
--- a/compiler/src/dotty/tools/dotc/util/SimpleIdentitySet.scala
+++ b/compiler/src/dotty/tools/dotc/util/SimpleIdentitySet.scala
@@ -59,7 +59,7 @@ object SimpleIdentitySet {
private class Set3[+Elem <: AnyRef](x0: AnyRef, x1: AnyRef, x2: AnyRef) extends SimpleIdentitySet[Elem] {
def size = 3
def + [E >: Elem <: AnyRef](x: E): SimpleIdentitySet[E] =
- if (contains(this)) this
+ if (contains(x)) this
else {
val xs = new Array[AnyRef](4)
xs(0) = x0
@@ -113,4 +113,4 @@ object SimpleIdentitySet {
while (i < size) { f(xs(i).asInstanceOf[Elem]); i += 1 }
}
}
-}
\ No newline at end of file
+}