Can you elaborate? The two concepts do not really interact with each other.
m
marstran
03/29/2019, 11:06 AM
You can only reify type parameters on inline functions. So type parameters on the class level can't be reified.
👍 1
s
sindrenm
03/29/2019, 11:06 AM
EDIT: What they said. ⬆️
Reified generics types are a feature that comes with inline functions which let's you “circumvent” type erasure. It doesn't really have anything to do with whether a class is sealed, abstract, open, closed, what-have-you …
j
Jacques Smuts
03/29/2019, 12:11 PM
I do understand that basic concept, and I figured that this was the case.
But I would like it if I could somehow instantiate a class that takes a Generic type input without needing to also pass the class reference.
I have tasted reified type’s convenience in my functions and now I want it in my classes 😅
k
karelpeeters
03/29/2019, 1:08 PM
Write a reified factory function that then calls an uglier constructor.