Skip to content

Commit 630a2be

Browse files
committed
#1455 revert FSC witnesses
1 parent f0c220a commit 630a2be

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

src/compiler/WebSharper.Compiler.FSharp/CodeReader.fs

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -856,34 +856,7 @@ let rec transformExpression (env: Environment) (expr: FSharpExpr) =
856856
|> Seq.map (fun (i, (_, v, _)) -> i, tr v) |> List.ofSeq,
857857
tr body
858858
)
859-
| P.CallWithWitnesses(this, meth, typeGenerics, methodGenerics, witnesses, arguments) ->
860-
let env =
861-
match witnesses with
862-
| [] -> env
863-
| _ ->
864-
let ws =
865-
witnesses |> List.choose (
866-
function
867-
| P.WitnessArg _ -> None
868-
| NestedLambda(args, body) ->
869-
match body with
870-
| P.Call(callee, memb, _, _, _args) ->
871-
Some(memb.CompiledName, Option.isSome callee, args, body)
872-
| P.AnonRecordGet(_, calleeType, fieldIndex) ->
873-
let fieldName =
874-
calleeType.AnonRecordTypeDetails.SortedFieldNames[fieldIndex]
875-
Some("get_" + fieldName, true, args, body)
876-
| P.FSharpFieldGet(_, _, field) ->
877-
Some("get_" + field.Name, true, args, body)
878-
| _ -> None
879-
| _ -> None
880-
)
881-
|> List.rev
882-
env |> List.foldBack (fun (name, isInstance, args, body) env ->
883-
let argTypes = args |> List.map (fun (a: FSharpMemberOrFunctionOrValue) -> a.FullType)
884-
let trBody = body |> transformExpression env
885-
{ env with Witnesses = (name, isInstance, argTypes, trBody) :: env.Witnesses }
886-
) ws
859+
| P.Call(this, meth, typeGenerics, methodGenerics, arguments) ->
887860
let inline tr x = transformExpression env x
888861
let useInlineTypeArgs (ts: list<Type>) =
889862
match env.InlineTypeArgs with

0 commit comments

Comments
 (0)