Hi! I have a question related to reified parameter...
# kontributors
e
Hi! I have a question related to reified parameters. When this code is compiled:
Copy code
abstract class A<T>

class B : A<Callable<String>>()
Then the correct
@Metadata
annotation is generated on `B`:
Copy code
@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:
Copy code
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:
Copy code
@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?
y
no, I don’t think this is intended; you’re welcome to file a YouTrack issue
e
Oh that's a relief, thank you @yole!!