Join Slack
Powered by
Hi, Is it possible to create a read only property...
# announcements
j
jtonic
02/16/2018, 6:19 AM
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
groostav
02/16/2018, 8:21 AM
Unfortunately no, annotations are simply not designed for use with the type system like that.
j
jtonic
02/16/2018, 8:02 PM
Thank you. So the way to go is simply check for the annotation existence in the kClass<T>.
15
Views
Open in Slack
Previous
Next