You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue was created at git.key-project.org where the discussions are preserved.
Description
Currently long literals in JML must not have a trailing 'l' or 'L'.
The syntax of number literals in JML should be the same as in Java.
Interestingly, one exception exists: Assignments to ghost fields (initialisation and via set-statement) actually require the trailing 'l' or 'L', if the value exceeds the int range.
Reproducible
always
Steps to reproduce
Try to load the following class:
class LiteralTest {
static long longLiteral = 0x100000000L; // accepted by parser
/*@ normal_behavior
@ ensures \result == 0x100000000L; // not accepted by parser
(at)*/
static long test() {
return longLiteral;
}
}
This results in an SLTranslationException: Mismatched token at line 5:38 'L'
This issue was created at git.key-project.org where the discussions are preserved.
Description
Currently long literals in JML must not have a trailing 'l' or 'L'.
The syntax of number literals in JML should be the same as in Java.
Interestingly, one exception exists: Assignments to ghost fields (initialisation and via set-statement) actually require the trailing 'l' or 'L', if the value exceeds the int range.
Reproducible
always
Steps to reproduce
Try to load the following class:
This results in an SLTranslationException:
Mismatched token at line 5:38 'L'
Information:
The text was updated successfully, but these errors were encountered: