My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 72: Guarantee of sub state does not imply guarantee of super state
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  nels.bec...@gmail.com
Closed:  Jul 2009


 
Project Member Reported by nels.bec...@gmail.com, Jul 24, 2009
In the following code, Plural issues an error when I think that it should 
not:

@Refine({@States({"SuperState"}),
  @States(refined="SuperState", value={"SubState"})})
public class NestedStateImplications {

  @Unique(requires="SuperState")
  void foo() {}
	
  static void bar(@Unique(requires="SubState")
      NestedStateImplications nsi) {
    nsi.foo(); // OKAY, Plural gives no errors, seems correct.
  }

	
  @Share(guarantee="SuperState")
  void qux() {}

  static void oik(@Share(guarantee="SubState") 
      NestedStateImplications nsi) {
    nsi.qux(); // ERROR, Plural issues and error, isn't this okay?
  }
}
Jul 24, 2009
Project Member #1 nels.bec...@gmail.com
Okay, I now think I understand why this is not an error:

The qux method cannot have a guarantee to a lower node because then it believes it is 
free to change the state of object, which obviously it is not.

This is going to make some of my other examples harder though... :-(
Status: Invalid

Powered by Google Project Hosting