This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 201148 - [Pull Up Method] No enclosing instance of the type is accessible in scope (compilation error)
Summary: [Pull Up Method] No enclosing instance of the type is accessible in scope (co...
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.0.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-20 02:32 UTC by rohitgheyi
Modified: 2015-09-17 11:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rohitgheyi 2011-08-20 02:32:42 UTC
NetBeans IDE 7.0.1 (Build 201107282000)

Steps to reproduce: apply Pull Up Method refactoring on the following program:

public class A {
  public long k() {
    return 3;
  }
}
public class B extends A {
  public long m() {
    return B.this.k();
  }
}

Pull Up Method refactoring produces the uncompilable code below:

public class A {
  public long k() {
    return 3;
  }
  public long m() {
    return B.this.k();
  }
}
public class B extends A {}
Comment 1 Martin Balin 2015-09-17 11:16:00 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.