Skip to content

Conversation

@nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Apr 24, 2024

An alternative implementation of #17329. This implementation uses a two-step approach to inlining the definitions. The basic design is discussed in section 5.3.2 of https://infoscience.epfl.ch/record/303591?ln=en.

The idea is to inline a trait

inline trait A: def f(x1: T1, ...): R = ...

into

class B extends A // def f(x1: T1, ...): R = super[A].f(x1, ...)

The TraitInlining transform will generate the definition that are in A but not in B. The super[A].f(x1, ...) will be treated as an inline call in the Inlining phase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants