You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Strip parents of inner class from concrete elements
When "transforming" an inner class into an inner trait, we need to adapt its parents as well.
When declaring its parents, a trait cannot call their constructor, therefore the different Apply and other trees should be pruned from them.
For example:
```
inline trait A:
class InnerA extends Object
```
will result in the following code after Inlining:
```
inline trait A:
trait InnerA$trait extends Object
type InnerA <: InnerA$trait
```
The tree for `Object` in the first case is
```
Apply(Select(New(Ident(Object)),<init>),List())
```
but if we make InnerA a trait instead, it is simply
```
Ident(Object)
```
The goal is therefore to strip the different "concrete" elements of the parents when transforming a class into a trait.
0 commit comments