| Issue 18: | Field read/assignment checks are not sufficient | |
| 2 people starred this issue and may be notified of changes. | Back to list |
There are not currently any checks to make sure that field reads and assignments happen while the receiver is sufficiently unpacked. May be tricky to do this while avoiding errors in unannotated code. Unpacking upon assignment could take advantage of this and avoid unpacking to roots that are too low.
Jul 22, 2009
Project Member
#1
nels.bec...@gmail.com
Jul 24, 2009
Hmm I thought we're doing this now
Jul 27, 2009
Well maybe, but check this out. In the following example we get only one error:
@States({"S1", "S2", "S3"})
public class RootTest {
@In("alive")
int aliveNode = 3;
@In("alive")
boolean answer;
@Share(guarantee="S1", use=Use.FIELDS)
void assignAlive() { // Error (No ctx avail) here
this.aliveNode = 5;
}
@Share(guarantee="S2", use=Use.FIELDS)
void readBoolean() {
if( answer ) { // No Error here
System.out.println("Yep");
return;
}
}
}
Shouldn't we get two errors? Does this suggest that this issue is not yet solved?
Jul 27, 2009
Yeah I think you may be right... weird. Difference between reading and writing? |