filtering SCALAC.MIXIN

Evgeny Mandrikov edited this page Jan 9, 2017 · 3 revisions

This page discusses a not yet available feature!

Description

Scala allows so called mixin-class composition. For technical reasons the methods from the mixin-class are copied into the target class.

Filtering

Methods from mixin-classes are completely removed.

Source Example

class A extends B with C

Bytecode Pattern

The methods of mixin-classes do have the same line number as a constructor.

Each mixin forwarder method always forwards to a synthetic static method in a class ending with $class. See this class in the Scala IDE debugger code for how to classify different Scala synthetic methods. The interesting method is isForwarderBytecode.