Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367165

Summary: [Xtend] protected/public extensions not visible to subclasses
Product: [Tools] Xtend Reporter: Edwin Park <esp1>
Component: CoreAssignee: Project Inbox <xtend-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: btickets, sebastian.zarnekow, serano, sven.efftinge
Version: 2.2.0Flags: sven.efftinge: kepler+
Target Milestone: M5   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Edwin Park CLA 2011-12-20 05:30:32 EST
Build Identifier: 20110916-0149

If I declare an injected extension as protected or public, it is still not available to subclasses. It would be useful if extensions could be made available to subclasses. Otherwise having visibility modifiers for injected extensions don't make sense.

Reproducible: Always

Steps to Reproduce:
1. Create an Xtend class with a protected/public injected extension
2. Create another Xtend class which subclasses the first
3. Note that the protected/public extension in the superclass is not visible in the subclass
Comment 1 Sebastian Zarnekow CLA 2011-12-20 05:35:20 EST
We would have to use Java annotations to mark fields in the generated Java code as extension fields.
Comment 2 Sven Efftinge CLA 2013-06-17 05:17:01 EDT
@Extension annotation has been introduced in 2.4.1
Comment 3 Eclipse Webmaster CLA 2017-10-31 11:26:29 EDT
Requested via bug 522520.

-M.