[m-rev.] diff: java switch on enums

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Aug 1 15:20:01 AEST 2011


Hi

On Mon, 1 Aug 2011, Peter Wang wrote:

> Branches: main
>
> A recent change caused the MLDS backend to generate Java switch statements for
> enumerations.  Mercury enumerations are represented by objects with an int
> field, and neither the object nor the field are valid within case labels.
> This fixes bug #209.
>
> compiler/mlds_to_java.m:
> 	Write the integer value of the enumeration constant directly in case
> 	labels.

Is this also an issue for the csharp backend, or does that handle things
differently?

Cheers,
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list