We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 247b2c7 commit cd36837Copy full SHA for cd36837
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 in the odd case if there were an infinite cycle
82
for {
83
prefix <- prefixes
84
} {
0 commit comments