@@ -1316,7 +1316,7 @@ type ResolvedUnion = {
13161316  caseUndefined:  bool 
13171317  typeofableTypes:  Set < Typeofable > 
13181318  caseArray:  Set < Type >  option 
1319-   caseEnum:  Set < Choice < EnumCase ,  Literal >> 
1319+   caseEnum:  Set < Choice < Enum  *   EnumCase,  Literal >> 
13201320  discriminatedUnions:  Map < string ,  Map < Literal ,  Type >> 
13211321  otherTypes:  Set < Type > 
13221322} 
@@ -1339,8 +1339,8 @@ module ResolvedUnion =
13391339          ru.caseEnum
13401340          |>  Set.toSeq
13411341          |>  Seq.map ( function 
1342-             |  Choice1Of2 {  name =  name;  value =  Some value }  ->  sprintf " %s  =%s "   name ( Literal.toString value) 
1343-             |  Choice1Of2 {  name =  name;  value =  None }  ->  sprintf " %s  =?"   name
1342+             |  Choice1Of2 ( {  name =  ty  },   {   name  =  name ;  value =  Some value })   ->  sprintf " %s . %s  =%s "  ty  name ( Literal.toString value) 
1343+             |  Choice1Of2 ( {  name =  ty  },   {   name  =  name ;  value =  None })   ->  sprintf " %s . %s  =?"  ty  name
13441344            |  Choice2Of2 l ->  Literal.toString l) 
13451345        yield  sprintf " enum<%s  >"   ( cases |>  String.concat "  | " ) 
13461346      for  k,  m in  ru.discriminatedUnions |>  Map.toSeq do 
@@ -1349,7 +1349,7 @@ module ResolvedUnion =
13491349    ] 
13501350    cases |>  String.concat "  | " 
13511351
1352-   let rec  private  getEnumFromUnion  ctx  ( u :  UnionType )  :  Set < Choice < EnumCase ,  Literal >>  *  UnionType  = 
1352+   let rec  private  getEnumFromUnion  ctx  ( u :  UnionType )  :  Set < Choice < Enum  *   EnumCase,  Literal >>  *  UnionType  = 
13531353    let  (| Dummy |)  _  =  [] 
13541354
13551355    let rec  go  t  = 
@@ -1365,9 +1365,9 @@ module ResolvedUnion =
13651365              let  bindings  =  Type.createBindings i.name loc a.typeParams tyargs
13661366              yield !  go ( a.target |>  Type.substTypeVar bindings ()) 
13671367            |  Definition.Enum e -> 
1368-               for  c in  e.cases do  yield  Choice1Of2 ( Choice1Of2 c ) 
1369-             |  Definition.EnumCase ( c,  _ )  -> 
1370-               yield  Choice1Of2 ( Choice1Of2 c ) 
1368+               for  c in  e.cases do  yield  Choice1Of2 ( Choice1Of2 ( e ,  c ) )
1369+             |  Definition.EnumCase ( c,  e )  -> 
1370+               yield  Choice1Of2 ( Choice1Of2 ( e ,  c ) )
13711371            |  Definition.Class _  ->  yield  Choice2Of2 t
13721372            |  _  ->  () 
13731373        |  TypeLiteral l ->  yield  Choice1Of2 ( Choice2Of2 l) 
0 commit comments