Forums

clr array covariance?

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Re: clr array covariance?

Postby hopscc » Thu Jul 16, 2009 5:07 am

If I remember correctly I was enquiring after similar handling for a list literal as that I provided for an array literal.
- same as what gautier posted but without the casting....

Code: Select all
l as List<of IFoo> = [ Bar(), Bar() ]
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: clr array covariance?

Postby Charles » Thu Jul 16, 2009 11:30 am

Okay. I assume that would also kick in for passing an argument where the type is List<of IFoo>.

In terms of implementation, I think the Expr.contextType is what needs to be examined to enable the compiler to get the type if the list right.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Previous

Return to Discussion

Who is online

Users browsing this forum: No registered users and 74 guests

cron