Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 483958 - No compilation issues when trying to access outer class method from an inner class
Summary: No compilation issues when trying to access outer class method from an inner ...
Status: RESOLVED DUPLICATE of bug 481186
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.4.2   Edit
Hardware: PC Windows 8
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-08 21:23 EST by Felipe Pontes CLA
Modified: 2016-10-28 17:58 EDT (History)
1 user (show)

See Also:


Attachments
Program (169 bytes, application/octet-stream)
2015-12-08 21:23 EST, Felipe Pontes CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felipe Pontes CLA 2015-12-08 21:23:53 EST
Created attachment 258525 [details]
Program

The following program doesn't present compilation error when compiling in ECJ but it must not be compilable.

Program

      public class A {
            private <T extends Object> long y(){
                  return y();
            }
            public class B extends A {
                  protected long y(Integer a){
                        return y();
                  }
            }
      }

Current Results

      No compilation issues.

Expected Results

      A.java:7: error: method y in class A.B cannot be applied to given types;
      return y();
             ^
  required: Integer
  found: no arguments
  reason: actual and formal argument lists differ in length
1 error

Configuration

	Software

		O.S.: Windows 8.1 64bits
		ECJ: org.eclipse.jdt.core_3.10.2.v20150120-1634.jar (Eclipse Luna 4.4.2)

	Hardware: Intel Core i5-2410M 2.3 GHz
Comment 1 Sasikanth Bharadwaj CLA 2015-12-09 23:34:20 EST
Same problem as reported in bug 481186, marking as duplicate

*** This bug has been marked as a duplicate of bug 481186 ***
Comment 2 Felipe Pontes CLA 2016-10-28 16:35:25 EDT
Lines coverage count reported by jacoco for this program (20.665) is different from lines coverage count reported for program of the bug 481186 (20.728). Wouldn't it be better to analyse if different source code lines is not causing a new bug?
Comment 3 Stephan Herrmann CLA 2016-10-28 17:58:41 EDT
(In reply to Felipe Pontes from comment #2)
> Lines coverage count reported by jacoco for this program (20.665) is
> different from lines coverage count reported for program of the bug 481186
> (20.728). Wouldn't it be better to analyse if different source code lines is
> not causing a new bug?

We try to fix bugs by understanding the semantics, not by statistics :)