Skip to content

Commit 3f42377

Browse files
committed
Fix search case
1 parent 2d8db01 commit 3f42377

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ object DesugarEnums {
201201
case TypeApply(_, targs) => targs.exists(typeHasRef)
202202
case Select(nu, nme.CONSTRUCTOR) => parentHasRef(nu)
203203
case New(tpt) => typeHasRef(tpt)
204-
case parent if parent.isType => typeHasRef(parent)
204+
case parent => parent.isType && typeHasRef(parent)
205205
}
206206

207207
parents.isEmpty || // a parent class that refers to type parameters will be generated in this case

0 commit comments

Comments
 (0)