yields (with -Ydebug and -Ylog:inline)
Expected behavior would be inlining foo into bar. It all works if you change Foo to be a class instead of a trait.
I did some digging around and apparently ICode reading does not resolve methods bodies in traits:
Furthermore, it looks like class file reading will never load a trait's impl class (which actually contains the method bodies):
There's really no way to get at it:
The reason is that ClassPath.scala explicitly excludes these class files (ending in $class.class):
I believe this is a bug on its own - commenting out isValidName fixes the implClass behavior but not the inlining issue altogether.