From ec573db6f5fb48f4bf55e1e444b0c66873c55296 Mon Sep 17 00:00:00 2001 From: Jan Chyb Date: Tue, 16 Apr 2024 15:44:30 +0200 Subject: [PATCH] Attempt to fix perf regression (TODO explain) --- compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala b/compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala index 8256a3cdbab1..45e39fa6b611 100644 --- a/compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala +++ b/compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala @@ -815,6 +815,7 @@ class OrderingConstraint(private val boundsMap: ParamBounds, newConstraint(hardVars = this.hardVars + tv) def instType(tvar: TypeVar): Type = entry(tvar.origin) match + case TypeBounds(lo, hi) if lo eq hi => lo case _: TypeBounds => NoType case tp: TypeParamRef => typeVarOfParam(tp).orElse(tp) case tp => tp