From ea6429631dc9e2562597d1f203c1172b38089383 Mon Sep 17 00:00:00 2001 From: kasiaMarek Date: Fri, 13 Dec 2024 10:14:53 +0100 Subject: [PATCH] dealias type in selectable --- .../src/main/dotty/tools/pc/HoverProvider.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala b/presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala index d795eb6b6dc2..6aa0c3d7dc4d 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala @@ -186,7 +186,8 @@ object HoverProvider: case RefinedType(_, refName, tpe) if (name == refName.toString() || refName.toString() == nme.Fields.toString()) => val resultType = rest match - case Select(_, asInstanceOf) :: TypeApply(_, List(tpe)) :: _ if asInstanceOf == nme.asInstanceOfPM => tpe.tpe + case Select(_, asInstanceOf) :: TypeApply(_, List(tpe)) :: _ if asInstanceOf == nme.asInstanceOfPM => + tpe.tpe.widenTermRefExpr.deepDealias case _ if n == nme.selectDynamic => tpe.resultType case _ => tpe