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

Key: RSRP-33984
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Sergey Shkredov
Reporter: Corey Kosak
Votes: 0
Watchers: 0
Operations

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

"Inline variable" makes invalid code when using explicit interface implementation

Created: 01 Jan 07 07:46   Updated: Monday 17:50
Component/s: Refactorings - Inline Variable
Fix Version/s: 4.0
Security Level: Everybody (All jira users)

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

Build: 330
Fixed in build: 798


 Description  « Hide
ReSharper breaks this code when you ask it to inline the variable i
namespace Stuff {
  public class Program {
    private static void Main() {
      foreach(A a in new A[10]) {
        I i=a.MakeB();
        i.Blah(); //Inline variable turns this into invalid code
      }
    }

    private interface I {
      void Blah();
    }

    private class A {
      public B MakeB() {
        return new B();
      }
    }

    private class B : I {
      void I.Blah() {}
    }
  }
}


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