210: Incorrect error message: Cannot convert element type 'T' to iterator type...

Hello,

I have a class:

public class OrderByDatabaseValueList : List]]>
{
}


and when I declare a foreach statement:

foreach (OrderByDatabaseValue orderByDatabaseValue in
OrderByDatabaseValueList)
{
}


I get an incorrect Resharper parsing error message for 'OrderByDatabaseValue
orderByDatabaseValue':

"Cannot convert element type 'T' to iterator type
'DomainObjects.Core.Query.OrderByDatabaseValue'"



Regards,

Richard Beauchamp


2 comments
Comment actions Permalink

Bug is reproduced. Will be fixed in the next build

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Richard Beauchamp" <rbeauchamp@gmail.com> wrote in message
news:dlqc22$5i7$1@is.intellij.net...

Hello,

>

I have a class:

>

public class OrderByDatabaseValueList : List<OrderByDatabaseValue>
{
}

>
>

and when I declare a foreach statement:

>

foreach (OrderByDatabaseValue orderByDatabaseValue in
OrderByDatabaseValueList)
{
}

>
>

I get an incorrect Resharper parsing error message for
'OrderByDatabaseValue orderByDatabaseValue':

>

"Cannot convert element type 'T' to iterator type
'DomainObjects.Core.Query.OrderByDatabaseValue'"

>
>
>

Regards,

>

Richard Beauchamp



0
Comment actions Permalink

Same Error in 2016.2 EAP 5 when using foreach in .cshtml

Cannot convert element type 'T' to iterator type

 

When I use var instead of class name, the properties of the objects cannot be resolved.

 

 

0

Please sign in to leave a comment.