File tree 1 file changed +6
-1
lines changed
src/dotty/tools/dotc/transform
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import DenotTransformers._
19
19
import typer .Checking
20
20
import Names .Name
21
21
import NameOps ._
22
+ import Flags
22
23
23
24
24
25
/** The first tree transform
@@ -28,6 +29,7 @@ import NameOps._
28
29
* - inserts `.package` for selections of package object members
29
30
* - checks the bounds of AppliedTypeTrees
30
31
* - stubs out native methods
32
+ * - removes java-defined ASTs
31
33
*/
32
34
class FirstTransform extends MiniPhaseTransform with IdentityDenotTransformer with AnnotationTransformer { thisTransformer =>
33
35
import ast .tpd ._
@@ -84,7 +86,10 @@ class FirstTransform extends MiniPhaseTransform with IdentityDenotTransformer wi
84
86
Thicket (stat :: newCompanion(stat.name.toTermName).trees)
85
87
case stat => stat
86
88
}
87
- addMissingCompanions(reorder(stats))
89
+
90
+ def skipJava (stats : List [Tree ]): List [Tree ] = stats.filter(t => ! (t.symbol is Flags .JavaDefined ))
91
+
92
+ addMissingCompanions(reorder(skipJava(stats)))
88
93
}
89
94
90
95
override def transformDefDef (ddef : DefDef )(implicit ctx : Context , info : TransformerInfo ) = {
You can’t perform that action at this time.
0 commit comments