Consider this example, when we have a trait and a class that uses this trait. But we want to override a trait’s method and also we want to call the initial trait’s method. How can we do it? We can’t use
static or anything like this because traits are only copy-and-paste code.
We can use traits conflict resolution mechanism. We can rename traits method name by using
as keyword. We can also change it visibility to remove it from the class public interface:
Now, this does the trick!