We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d8db01 commit 3f42377Copy full SHA for 3f42377
compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala
@@ -201,7 +201,7 @@ object DesugarEnums {
201
case TypeApply(_, targs) => targs.exists(typeHasRef)
202
case Select(nu, nme.CONSTRUCTOR) => parentHasRef(nu)
203
case New(tpt) => typeHasRef(tpt)
204
- case parent if parent.isType => typeHasRef(parent)
+ case parent => parent.isType && typeHasRef(parent)
205
}
206
207
parents.isEmpty || // a parent class that refers to type parameters will be generated in this case
0 commit comments