Hi, Is it possible to create a read only property...
# announcements
j
Hi, Is it possible to create a read only property delegate where the R is a type with specific annotation? Something like
Copy code
ReadOnlyProperty<in R, out T> where where T : @Component Any
?
g
Unfortunately no, annotations are simply not designed for use with the type system like that.
j
Thank you. So the way to go is simply check for the annotation existence in the kClass<T>.