Closed GoogleCodeExporter closed 9 years ago
Original comment by DanelK...@gmail.com
on 30 Jun 2012 at 11:08
There's a similar issue if you use the default() keyword
[JsType(JsMode.Clr, Filename = "res/Default.js")]
enum Values
{
First,
Second,
Third
}
var valuesDefault = default(Values);
var valuesFirst = Values.First;
var intDefault = default(int);
new jQuery("body").append("valuesDefault " + valuesDefault + "<br/>");
new jQuery("body").append("valuesFirst " + valuesFirst + "<br/>");
new jQuery("body").append("intDefault " + intDefault + "<br/>");
Which results in:
valuesDefault null
valuesFirst First
intDefault 0
If you're deep into generic code it's useful to be able to default up values
and hard to work around in a generic manner.
/*Generated by SharpKit 5 v5.01.0000*/
Original comment by co...@gravill.com
on 3 May 2013 at 3:05
From my test, it seems that enum values are generated in constructors, is the
first issue still relevant?
Original comment by DanelK...@gmail.com
on 3 May 2013 at 3:17
The default keyword with enum bug is confirmed, it's a parser issue, I'll try
to patch it in the meantime
Original comment by DanelK...@gmail.com
on 3 May 2013 at 3:26
I didn't test the constructor, just tagged on my own issue which looked similar.
Original comment by co...@gravill.com
on 3 May 2013 at 3:31
Ok, issue is fixed, but it's best to always open new issues, we can merge them
afterwards if they're exactly the same. :-)
Original comment by DanelK...@gmail.com
on 3 May 2013 at 3:32
Original issue reported on code.google.com by
mmuur...@gmail.com
on 29 Jun 2012 at 9:56