Skip to content

Commit

Permalink
Don't throw cce if actual element is not Typeable #EA-1460587 #SCL-23…
Browse files Browse the repository at this point in the history
…397 fixed
  • Loading branch information
SrTobi committed Jan 9, 2025
1 parent e6e1c7c commit 2157661
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,10 @@ package object collections {
@tailrec
private def isExpressionOfType(fqns: String*)(tpbl: Typeable): Boolean = tpbl match {
case Resolved(srr @ ScalaResolveResult(fun: ScFunction, _)) if fun.name == CommonNames.Apply =>
isExpressionOfType(fqns: _*)(
srr.getActualElement.asInstanceOf[Typeable]
)
srr.getActualElement match {
case element: Typeable => isExpressionOfType(fqns: _*)(element)
case _ => false
}
case Typeable(scType) => fqns.exists(conformsToTypeFromClass(scType, _)(scType.projectContext))
case _ => false
}
Expand Down

0 comments on commit 2157661

Please sign in to comment.