Bug 32421 - can't resolve nested public interfaces
Summary: can't resolve nested public interfaces
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 2000
: P2 critical (vote)
Target Milestone: ---   Edit
Assignee: Jim Hugunin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-20 17:33 EST by Ron Bodkin CLA
Modified: 2003-03-06 17:03 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ron Bodkin CLA 2003-02-20 17:33:37 EST
This may be caused by the bug as 32399

file TransactionTest.java:
import sub.ExecutionMonitor;

public class TransactionTest {
    static Transaction theTransaction;

    private void assertCommitted() {
        theTransaction.getCount("method-execution", "commit");
    }

    static aspect MonitorTest {
        declare parents: Transaction implements ExecutionMonitor.MonitoredItem;
    }
}

class Transaction {
}

file sub/ExecutionMonitor.aj:
package sub;

public aspect ExecutionMonitor {
    public interface MonitoredItem {
        int getCount(String eventType, String eventName);
    }

    public int MonitoredItem.getCount(String eventType, String eventName) {
            return 0;
    } 
}         

sample compilation:
C:\devel>ajc -1.4 TransactionTest.java sub\ExecutionMonitor.aj
can't bind type name 'ExecutionMonitor$MonitoredItem'
C:/devel/TransactionTest.java:7: The method getCount(java.lang.String, java.lang
.String) is undefined for the type Transaction
theTransaction.getCount("method-execution", "commit");
               ^^^^^^^^

2 errors
Comment 1 Jim Hugunin CLA 2003-03-06 17:03:27 EST
fixed in current tree, test in bugs/interfaceNames/*