From 08ee3f40e288f8654e33c6447204ef96a9647085 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 18 Apr 2019 14:51:24 +0200 Subject: [PATCH] Experiment: Use immutable.Set for TypeVars To compare with #6331. --- compiler/src/dotty/tools/dotc/core/TyperState.scala | 2 +- compiler/src/dotty/tools/dotc/core/Types.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/core/TyperState.scala b/compiler/src/dotty/tools/dotc/core/TyperState.scala index 5274a2beef9d..d562e3d708d8 100644 --- a/compiler/src/dotty/tools/dotc/core/TyperState.scala +++ b/compiler/src/dotty/tools/dotc/core/TyperState.scala @@ -80,7 +80,7 @@ class TyperState(private val previous: TyperState /* | Null */) { def uninstVars: Seq[TypeVar] = constraint.uninstVars /** The set of uninstantiated type variables which have this state as their owning state */ - private[this] var myOwnedVars: TypeVars = SimpleIdentitySet.empty + private[this] var myOwnedVars: TypeVars = collection.immutable.Set.empty def ownedVars: TypeVars = myOwnedVars def ownedVars_=(vs: TypeVars): Unit = myOwnedVars = vs diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index d403aa1dd183..c469e5e47fe1 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -3757,7 +3757,7 @@ object Types { } } - type TypeVars = SimpleIdentitySet[TypeVar] + type TypeVars = collection.immutable.Set[TypeVar] // ------ MatchType ---------------------------------------------------------------