History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-29747
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Andrey Simanovsky
Reporter: Vladimir Reshetnikov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ReSharper

Explicit implementation of constrained generic method

Created: 12 Oct 06 14:14   Updated: 12 Dec 06 21:02
Component/s: Code Insight
Fix Version/s: 2.5.1, 3.0
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 263
Fixed in build: 327


 Description  « Hide
interface IFace<T> 
{
    void Foo<S>() where S : T;
}

class Stuff : IFace<string>
{
  // Alt+Ins, Implement interface member, explicit
}

Result:

interface IFace<T> 
{
    void Foo<S>() where S : T;
}

class Stuff : IFace<string>
{
    void IFace<string>.Foo<S>() where S : string // error CS0460: Constraints for override and explicit interface implementation methods are inherited from the base method, so they cannot be specified directly
    {
        throw new NotImplementedException();
    }
}

Do not insert 'where' clause in explicit implementation.
Also, do not suggest to implement implicitly, if it would produce incorrect constraint (for example, sealed class constraint)



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.