File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,7 @@ object Flags {
361
361
/** Labeled with `unused` modifier (unused value) */
362
362
final val UnusedCommon = commonFlag(42 , " unused" )
363
363
final val Unused = UnusedCommon .toTermFlags
364
+ final val UnusedType = UnusedCommon .toTypeFlags
364
365
365
366
// Flags following this one are not pickled
366
367
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class UnusedChecks extends MiniPhase {
25
25
/* Tree transform */
26
26
27
27
override def transformTypeDef (tree : TypeDef )(implicit ctx : Context ): tree.type = {
28
- if (tree.symbol.is(UnusedCommon ))
28
+ if (tree.symbol.is(UnusedType ))
29
29
ctx.error(tree.symbol.showKind + " cannot be unused" , tree.pos)
30
30
tree
31
31
}
You can’t perform that action at this time.
0 commit comments