Why isn't it an error then?
# announcements
k
Why isn't it an error then?
d
Because it can work if you know what you are doing, maybe. But yes, it's a bit strange.
k
And it just doesn't inline it if it's not possible?
d
Well, in my example the compiler does not know that
bar
is to be inlined here, it just sees it as a normal virtual method and calls it. If the function relies on being inlined (e.g. using reified type parameters) things will blow up at runtime.
d
Ah, good to know, thanks