Bug 50045 - ITD in inner class shadowing (already fixed in HEAD)
Summary: ITD in inner class shadowing (already fixed in HEAD)
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.1.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 1.2   Edit
Assignee: Jim Hugunin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-14 22:40 EST by Ron Bodkin CLA
Modified: 2016-08-31 15:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ron Bodkin CLA 2004-01-14 22:40:34 EST
This bug affects 1.1.1 but is fixed in CVS HEAD. 

The 1.1.1 compiler complains about:

import java.util.logging.Logger;

public aspect InnerShadow {
    private Logger Loggable.logger;
}

interface Loggable {}

class Foo implements Loggable {
    private Logger logger;// = LoggerFactory.getLoggerger("Foo");

    class Bar implements Loggable {
	public void baz() {
	    logger.info("test");
	}
    }
}
        
C:\devel\test\scope>ajc InnerShadow.aj
C:\devel\test\scope\InnerShadow.aj:14 The field logger is defined in an 
inherited type and an enclosing scope
logger.info("test");
^^^^^^

1 error
Comment 1 Ron Bodkin CLA 2004-01-14 22:41:46 EST
It was already fixed in HEAD before I encountered it :-)
Comment 2 Adrian Colyer CLA 2004-03-19 09:54:13 EST
updating target flag to indicate inclusion in 1.2 release.
Comment 3 Ian Pun CLA 2016-08-31 15:30:22 EDT
*** Bug 473677 has been marked as a duplicate of this bug. ***