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 165000 - Internal compiler doesn't recognize indirect reference to 'this' in super call expression
Summary: Internal compiler doesn't recognize indirect reference to 'this' in super cal...
Status: RESOLVED DUPLICATE of bug 165001
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-12 20:38 UTC by matthies
Modified: 2009-05-13 14:56 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 matthies 2009-05-12 20:38:30 UTC
Example:

    public class Test
    {
        static class Outer
        {
            Outer(Inner inner) { }

            interface Inner { void f(); }
        }

        static class Foo extends Outer
        {
            Foo() { super(new Inner() { public void f() { Foo.this.notify(); } }); }
        }
    }

No error is shown in the editor, although the code is not legal.
Compiling with the external compiler (javac 1.6) correctly produces the following error message for the super() line:

    no enclosing instance of type Test.Foo is in scope
            Foo() { super(new Inner() { public void f() { Foo.this.notify(); } }); }
Comment 1 Jiri Prox 2009-05-13 14:56:56 UTC

*** This issue has been marked as a duplicate of 165001 ***