anchor.diff:                                          k (J.NewArray [cString ("$" + string j); cString n; e] :: es))
                                   |> snd
                                   <| []
  -                            | _ -> fail "Inline record not supported"
  +                            | JI.InlineRecord(name, record) ->
  +                                let tag =
  +                                    match discr with
  +                                    | JI.StandardField -> cInt i
  +                                    | _ -> cString name
  +                                encode (T.FromType record) >>= fun e ->
  +                                k (J.NewArray [tag; J.NewArray [J.NewArray [!~J.Null; !~J.Null; e]]] :: es)
  +                                //fail "Inline record not supported"
                       )
                       |> snd
                       <| []
  
positive.code:                         !r
                  o?("$") <- tag
                  cases.[tag] |> snd |> Array.iter (fun (from, ``to``, dec) ->
                      o?(from) <- dec () (x?(``to``)))
                  o))
  
      let Array decEl =
  
negative.code:                 let tagName, fields = cases.[tag]
                  if JS.TypeOf discr = JS.Kind.String then o?(discr) <- tagName
                  fields |> Array.iter (fun (from, ``to``, enc) ->
                      match from with
                      | null -> // inline record
                          let record = enc () (x?("$0"))
                          JS.ForEach record (fun f -> o?(f) <- record?(f); false)
                      | from -> // normal args
                          o?(``to``) <- enc () (x?(from)))
                  o))
  
      let Array (encEl: unit -> 'T -> obj) =
  