We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 247b2c7 commit 7f5aa62Copy full SHA for 7f5aa62
compiler/src/dotty/tools/dotc/transform/CheckUnused.scala
@@ -78,6 +78,7 @@ class CheckUnused extends MiniPhase:
78
override def prepareForIdent(tree: tpd.Ident)(using Context): Context =
79
if tree.symbol.exists then
80
val prefixes = LazyList.iterate(tree.typeOpt.normalizedPrefix)(_.normalizedPrefix).takeWhile(_ != NoType)
81
+ .take(10) // Failsafe for the odd case if there was an infinite cycle
82
for {
83
prefix <- prefixes
84
} {
0 commit comments