File tree 1 file changed +5
-1
lines changed
src/dotty/tools/dotc/transform
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import NameOps._
28
28
* - inserts `.package` for selections of package object members
29
29
* - checks the bounds of AppliedTypeTrees
30
30
* - stubs out native methods
31
+ * - removes java-defined ASTs
31
32
*/
32
33
class FirstTransform extends MiniPhaseTransform with IdentityDenotTransformer with AnnotationTransformer { thisTransformer =>
33
34
import ast .tpd ._
@@ -84,7 +85,10 @@ class FirstTransform extends MiniPhaseTransform with IdentityDenotTransformer wi
84
85
Thicket (stat :: newCompanion(stat.name.toTermName).trees)
85
86
case stat => stat
86
87
}
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)))
88
92
}
89
93
90
94
override def transformDefDef (ddef : DefDef )(implicit ctx : Context , info : TransformerInfo ) = {
You can’t perform that action at this time.
0 commit comments