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

String constants in constraints generate invalid code #1327

Closed
TimLethbridge opened this Issue Jul 9, 2018 · 0 comments

Comments

@TimLethbridge
Member

TimLethbridge commented Jul 9, 2018

If the following code is in a constraint:

class X {
  String s1;
  [s1 != "cat"] // Constant comparisons
}

Then the resulting Java will not compile and will produce the following error

sc3.ump:21: error: ')' expected
      throw new RuntimeException("Please provide a valid s1 ["cat"object!=s1]");
                                                              ^
sc3.ump:21: error: ';' expected
      throw new RuntimeException("Please provide a valid s1 ["cat"object!=s1]");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment