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 50ad597 commit 0c3e520Copy full SHA for 0c3e520
compiler/src/dotty/tools/dotc/transform/UnusedDecls.scala
@@ -40,10 +40,11 @@ class ErasedDecls extends MiniPhase with InfoTransformer {
40
41
/* Info transform */
42
43
- override def transformInfo(tp: Type, sym: Symbol)(implicit ctx: Context): Type = tp match {
44
- case tp: ClassInfo =>
45
- if (tp.classSymbol.is(JavaDefined) || !tp.decls.iterator.exists(_.is(Erased))) tp
46
- else tp.derivedClassInfo(decls = tp.decls.filteredScope(!_.is(Erased)))
47
- case _ => tp
+ override def transformInfo(tp: Type, sym: Symbol)(implicit ctx: Context): Type = {
+ if (sym.is(JavaDefined) || sym.is(Scala2x)) tp
+ else tp match {
+ case tp: ClassInfo => tp.derivedClassInfo(decls = tp.decls.filteredScope(!_.is(Erased)))
+ case _ => tp
48
+ }
49
}
50
0 commit comments