int02h
10/16/2020, 8:42 AMval anim = if (Random.nextBoolean()) LinearOutSlowInInterpolator() else FastOutSlowInInterpolator()
LinearOutSlowInInterpolator
and FastOutSlowInInterpolator
are contained in Java library (actually android.jar) and have the same package-private super class LookupTableInterpolator
. So inferred type of anim
value is LookupTableInterpolator
.
I wonder why the compiler generates a warning instead of en error that LookupTableInterpolator
is inaccessible in this context. Because the code from above is compiled successfully but always fails at runtime. Is it possible to treat such warnings as errors?