File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import NameOps._
2828 * - inserts `.package` for selections of package object members
2929 * - checks the bounds of AppliedTypeTrees
3030 * - stubs out native methods
31+ * - removes java-defined ASTs
3132 */
3233class FirstTransform extends MiniPhaseTransform with IdentityDenotTransformer with AnnotationTransformer { thisTransformer =>
3334 import ast .tpd ._
@@ -84,7 +85,10 @@ class FirstTransform extends MiniPhaseTransform with IdentityDenotTransformer wi
8485 Thicket (stat :: newCompanion(stat.name.toTermName).trees)
8586 case stat => stat
8687 }
87- addMissingCompanions(reorder(stats))
88+
89+ def skipJava (stats : List [Tree ]): List [Tree ] = stats.filter(t => ! (t.symbol is Flags .JavaDefined ))
90+
91+ addMissingCompanions(reorder(skipJava(stats)))
8892 }
8993
9094 override def transformDefDef (ddef : DefDef )(implicit ctx : Context , info : TransformerInfo ) = {
You can’t perform that action at this time.
0 commit comments