Bug 355441 - illegal bytecode for team constructor with declared lifting and field access
Summary: illegal bytecode for team constructor with declared lifting and field access
Status: NEW
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 2.0   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-22 16:51 EDT by Stephan Herrmann CLA
Modified: 2011-08-22 17:02 EDT (History)
0 users

See Also:


Attachments
Test (3.44 KB, patch)
2011-08-22 17:02 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2011-08-22 16:51:41 EDT
The following teams:

team class T1 {
    protected class R playedBy B {}
    private R f;
    T1(R r) { this.f = r; }
}
team class T2 extends T1 {
    T1(B as R r) { super(b); }
}

produce ilegal bytecode causing an IllegalAccessError at runtime.
Apparently we try to access field f from a contructor that has
been copied from T1 to T2.

Even if the field has default visibility the compiler has problems
with generating a valid stack map attribute.
Comment 1 Stephan Herrmann CLA 2011-08-22 17:02:35 EDT
Created attachment 201957 [details]
Test

Here are two tests to witness the issues at hand.