Skip to content

Commit

Permalink
Fix some build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ncave committed Jun 13, 2024
1 parent 0913c0c commit 82b2502
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions src/Fable.Transforms/FSharp2Fable.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ open Identifiers
open Helpers
open Util

let inline private transformExprList com ctx xs =
let private transformExprList com ctx xs =
trampolineListMap (transformExpr com ctx []) xs

let inline private transformExprOpt com ctx opt =
let private transformExprOpt com ctx opt =
trampolineOptionMap (transformExpr com ctx []) opt

let private transformBaseConsCall
Expand Down Expand Up @@ -74,7 +74,7 @@ let private transformNewUnion com ctx r fsType (unionCase: FSharpUnionCase) (arg

| TypeScriptTaggedUnion(_, _, tagName, rule) ->
match argExprs with
| [ argExpr ] when not (FsUnionCase.HasNamedFields unionCase) -> argExpr
// | [ argExpr ] when not (FsUnionCase.HasNamedFields unionCase) -> argExpr
| _ ->
let isCompiledValue, tagExpr =
match FsUnionCase.CompiledValue unionCase with
Expand Down Expand Up @@ -1176,16 +1176,16 @@ let private transformExpr (com: IFableCompiler) (ctx: Context) appliedGenArgs fs

return Fable.Get(unionExpr, Fable.TupleIndex index, fieldType, r)
| TypeScriptTaggedUnion _ ->
if FsUnionCase.HasNamedFields unionCase then
let kind =
Fable.FieldInfo.Create(
FsField.FSharpFieldName field,
fieldType = makeType Map.empty field.FieldType
)
// if not (FsUnionCase.HasNamedFields unionCase) then
// return unionExpr
// else
let kind =
Fable.FieldInfo.Create(
FsField.FSharpFieldName field,
fieldType = makeType Map.empty field.FieldType
)

return Fable.Get(unionExpr, kind, fieldType, r)
else
return unionExpr
return Fable.Get(unionExpr, kind, fieldType, r)
| StringEnum _ ->
return
"StringEnum types cannot have fields"
Expand Down

0 comments on commit 82b2502

Please sign in to comment.