Hm, I tried this example and it compiles as an enum as expected.
What version of F# are you using? Maybe you could try downloading the latest version from the MSR downloads page: [link:research.microsoft.com]

BTW: You can very easily test if the F# generates an enum or not using FSI. This is what my version of F# prints:

1
2
3
4
5
6
7
8
 
> type RightAnswer =  | Yes = 0 | No = 1;;
type RightAnswer = 
  |  Yes  =  0
  |  No  =  1

> typeof<RightAnswer>.IsEnum;;
val it : bool = true
By on 7/30/2007 10:06 AM ()

Thanks, in v 1.9.2.7 it work.

By on 7/31/2007 1:01 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper