I am assuming that Scala compiler will inline the function after it has been overriden.
Asked
Active
Viewed 292 times
1 Answers
1
The optimizer for the JVM will simply refuse to inline any method that is not effectively final (either final itself, or in a sealed class or object, or stuff like that). So obviously it won't online an overridden method.
On JavaScript, the optimizer can inline overridden methods when it can prove some way or another that it has the right to do so. In some cases, yes, it will inline a method from a subclass.

sjrd
- 21,805
- 2
- 61
- 91