New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler crashes when a guard has a function with two parameters #1162

Closed
TimLethbridge opened this Issue Nov 24, 2017 · 0 comments

Comments

@TimLethbridge
Member

TimLethbridge commented Nov 24, 2017

If a guard has a function with two parameters, it crashes the compiler!

class A {
  Status {
    S3 {
      // two parameters for the guard do not compile
      s() [checkGuard(a, b)] -> S1;
      s1();
    }
  }
}

This problem was flagged by @gmussbacher gunter.mussbacher@mcgill.ca and is a high priority for his work

A more complete example is:

class A {
  Status {
    S1 {
      // one parameter for the guard works
      e1(B myB) [checkGuard(myB)] -> S2;
    }
    S2 {
      // one parameter for the guard works
      e2(B myB, B mySecondB) [checkGuard(myB)] -> S3;
    }
    S3 {
      // two parameters for the guard do not compile
      e2(B myB, B mySecondB) [checkGuard(myB, mySecondB)] -> S1;
    }
  }
  private boolean checkGuard(B myB) {
    return true;
  } 
  private boolean checkGuard(B myB, B mySecondB) {
    return true;
  }
}
class B {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment