Closed
Description
Instead of passing a T
we could pass a DartObject
which we guarantee (using the type matcher) will represent a T
.
The API for using it is not as nice (.getField('name')
instead of .name
) but it would mean we don't have a contract we can't always satisfy and it makes the code simpler.
I'm not completely convinced we should do this, but it's worth discussing. There has been talk about getting more reliable instantiation from DartObject
in the analyzer itself - but this hasn't gone anywhere and is unlikely to for a while, so I'm not sure we should bank on it.
Metadata
Metadata
Assignees
Labels
No labels