mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-23 05:13:48 +00:00
Branches: main
Fix another bug with --eliminate-local-vars on the java grade.
Previously we had fixed a problem in which an integer constant could appear in
place of a character constant in the generated java code when
--eliminate-local-vars was used. The same problem occurs for enumeration
constants.
compiler/ml_unify_gen.m:
Add an explicit cast when generating an integer constant which is not
really an integer.
Factor out some common code.
tests/hard_coded/elim_local_var_char.exp:
tests/hard_coded/elim_local_var_char.m:
Extend test case for enumerations.
3 lines
10 B
Plaintext
3 lines
10 B
Plaintext
a!
|
|
orange
|