Reporter | Anthony Constantinou (spartacus) |
---|---|
Created | Mar 16, 2012 7:18:45 PM |
Updated | Mar 16, 2012 7:18:45 PM |
Priority | Normal |
Type | Unspecified |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Unassigned |
Subsystem | No subsystem |
Affected versions | No Affected versions |
Fixed in build | No Fixed in build |
With the following code resharper indicates an error on the cast in [IntAttribute((int)X.A)], saying "cannot convert source type int to target type int.
[IntAttribute((int)X.A)]
public class Y
{
}
public enum X
{
A,
}
[AttributeUsage(AttributeTargets.Class)]
class IntAttribute : Attribute
{
private int _val;
public IntAttribute(int val)
{
_val = val;
}
}
[IntAttribute((int)X.A)]
public class Y
{
}
public enum X
{
A,
}
[AttributeUsage(AttributeTargets.Class)]
class IntAttribute : Attribute
{
private int _val;
public IntAttribute(int val)
{
_val = val;
}
}