Eugenio
08/02/2017, 5:43 PMabstract class A<T>
class B : A<Callable<String>>()
Then the correct @Metadata
annotation is generated on `B`:
@Metadata(
mv = {1, 1, 6},
bv = {1, 0, 1},
k = 1,
d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00030\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0004¨\u0006\u0005"},
d2 = {"LB;", "LA;", "Ljava/util/concurrent/Callable;", "", "()V", "production sources for module app_main"}
)
(notice the reference to Ljava/util/concurrent/Callable
)
Now when this code is compiled instead:
abstract class A<T>
inline fun <reified T> a() = object : A<T>() {}
val B = a<Callable<String>>()
Then this @Metadata
annotation is generated on the anonymous class:
@Metadata(
mv = {1, 1, 6},
bv = {1, 0, 1},
k = 1,
d1 = {"\u0000\r\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00028\u00000\u0001B\u0005¢\u0006\u0002\u0010\u0002¨\u0006\u0003"},
d2 = {"TestKt$a$1", "LA;", "()V", "production sources for module app_main"}
)
All type information is completely lost... Is that the intended behaviour? Can this be avoided?yole
08/03/2017, 7:50 AMEugenio
08/03/2017, 7:51 AMEugenio
08/03/2017, 8:52 AM