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

Peter Wang novalazy at gmail.com
Mon Aug 1 15:46:58 AEST 2011


On 2011-08-01, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> 
> 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?

No, we use C# enums there.

Peter
--------------------------------------------------------------------------
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