Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit a258886

Browse files
committed
[WIP] Fable support update
1 parent 630efa2 commit a258886

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/fsharp/TastOps.fs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5264,8 +5264,13 @@ let mkTyAppExpr m (f,fty) tyargs = match tyargs with [] -> f | _ -> primMkApp (f
52645264
//--------------------------------------------------------------------------
52655265

52665266
let rec accTargetsOfDecisionTree tree acc =
5267+
#if FABLE_COMPILER
5268+
let f (opt: DecisionTree option) acc = if (Option.isSome opt) then (accTargetsOfDecisionTree opt.Value acc) else acc
5269+
#else
5270+
let f (opt: DecisionTree option) acc = Option.foldBack accTargetsOfDecisionTree opt acc
5271+
#endif
52675272
match tree with
5268-
| TDSwitch (_,edges,dflt,_) -> List.foldBack (fun (c:DecisionTreeCase) -> accTargetsOfDecisionTree c.CaseTree) edges (Option.foldBack accTargetsOfDecisionTree dflt acc)
5273+
| TDSwitch (_,edges,dflt,_) -> List.foldBack (fun (c:DecisionTreeCase) -> accTargetsOfDecisionTree c.CaseTree) edges (f dflt acc)
52695274
| TDSuccess (_,i) -> i::acc
52705275
| TDBind (_,rest) -> accTargetsOfDecisionTree rest acc
52715276

0 commit comments

Comments
 (0)