And what I want is to just call that method on som...
# announcements
p
And what I want is to just call that method on something like:
Copy code
override fun <T> getFoo() : T? { return fromBytes(byteArray) }
o
In this case, you would need a reifiable reference to T
p
True, but I cannot have one, right?
o
Maybe you could pass a
KClass<T>
though the constructor of the enclosing class?
p
Hmm I am not following 😕
o
getFoo is in a class, right?
p
yeap
o
then the common Java way of doing it has been to add an extra parameter to the constructor
hm
hold on, I just realised T is not part of the class, but of the function
p
Hehe that’s what is been killing me for some hours now 😞
Unfortunately I ended up providing the Class<T> through the method..