Bug 487861 - Invalid Java code generated when a default method of an interface is called by from a default method of its subinterface.
Summary: Invalid Java code generated when a default method of an interface is called b...
Status: NEW
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.9.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-16 05:11 EST by Norbert Sándor CLA
Modified: 2017-03-24 15:27 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Norbert Sándor CLA 2016-02-16 05:11:56 EST
StackOverflow: http://stackoverflow.com/questions/35424875/xtend-compilation-issues-with-static-nested-interfaces/35429392#35429392

Example code:

interface A {
    def void test() {}
    
    static interface B extends A {
        override test() {
            A.super.test();
        }
        def test2() {
            A.super.test();
        }
    }
}

Error: "Java problem: No enclosing instance of the type A is accessible in scope"

The Java version of the example code works as expected.
Comment 1 Christian Dietrich CLA 2017-03-24 15:27:04 EDT
A.super has type Object, not the outer A.

the problem is that the scope contains

A.super_1 => Interface and A.super => Object