[249] false highlighted error

Hi,

the following code is highlighted as an error in R#:

class MyCollection : CollectionBase, IMyCollection
{
#region IMyCollection Members

int IMyCollection.Count
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}

#endregion
}

internal interface IMyCollection
{
int Count
{
get;set;
}
}

class MyCollection
{
public void GenericMethod]]>(T param) where T:MyCollection
{
Debug.Write(param.Count);
}
}

At the last line, it will show the error:
Ambigious reference:
int Count (in CollectionBase)
int Count (in IMyCollection)

Regards,

Wiebe Tijsma

1 comment
Comment actions Permalink

Thank you for the feedback.
This will be fixed shortly

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Wiebe Tijsma" <wiebeREMOVE@CAPITALStijsma.com> wrote in message
news:e5k14b$q7k$1@is.intellij.net...

Hi,

>

the following code is highlighted as an error in R#:

>

class MyCollection : CollectionBase, IMyCollection
{
#region IMyCollection Members

>

int IMyCollection.Count
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}

>

#endregion
}

>

internal interface IMyCollection
{
int Count
{
get;set;
}
}

>

class MyCollection
{
public void GenericMethod<T>(T param) where T:MyCollection
{
Debug.Write(param.Count);
}
}

>

At the last line, it will show the error:
Ambigious reference:
int Count (in CollectionBase)
int Count (in IMyCollection)

>

Regards,

>

Wiebe Tijsma



0

Please sign in to leave a comment.