@@ -8469,8 +8469,8 @@ and TcMethodApplication
84698469
84708470 let denv = env.DisplayEnv
84718471
8472- let isSimpleFormalArg (isParamArrayArg, isOutArg, optArgInfo: OptionalArgInfo, reflArgInfo) =
8473- not isParamArrayArg && not isOutArg && not optArgInfo.IsOptional &&isNone reflArgInfo
8472+ let isSimpleFormalArg (isParamArrayArg, isOutArg, optArgInfo: OptionalArgInfo, reflArgInfo: ReflectedArgInfo ) =
8473+ not isParamArrayArg && not isOutArg && not optArgInfo.IsOptional &¬ reflArgInfo.AutoQuote
84748474
84758475 let callerObjArgTys = objArgs |> List.map (tyOfExpr cenv.g)
84768476
@@ -8877,17 +8877,21 @@ and TcMethodApplication
88778877 mkCallQuoteToLinqLambdaExpression cenv.g m delegateTy (Expr.Quote(expr, ref None, false, m, mkQuotedExprTy cenv.g delegateTy))
88788878
88798879 // auto conversions to quotations (to match auto conversions to LINQ expressions)
8880- elif reflArgInfo.IsSome && isQuotedExprTy cenv.g calledArgTy && not (isQuotedExprTy cenv.g callerArgTy) then
8881- if reflArgInfo.Value then
8880+ elif reflArgInfo.AutoQuote && isQuotedExprTy cenv.g calledArgTy && not (isQuotedExprTy cenv.g callerArgTy) then
8881+ match reflArgInfo with
8882+ | ReflectedArgInfo.Quote true ->
88828883 mkCallLiftValueWithDefn cenv.g m calledArgTy callerArgExpr
8883- else
8884+ | ReflectedArgInfo.Quote false ->
88848885 Expr.Quote(callerArgExpr, ref None, false, m, calledArgTy)
8886+ | ReflectedArgInfo.None -> failwith "unreachable" // unreachable due to reflArgInfo.AutoQuote condition
88858887
8886- elif reflArgInfo.IsSome && isRawQuotedExprTy cenv.g calledArgTy && not (isRawQuotedExprTy cenv.g callerArgTy) then
8887- if reflArgInfo.Value then
8888+ elif reflArgInfo.AutoQuote && isRawQuotedExprTy cenv.g calledArgTy && not (isRawQuotedExprTy cenv.g callerArgTy) then
8889+ match reflArgInfo with
8890+ | ReflectedArgInfo.Quote true ->
88888891 mkCallLiftValueWithDefnRaw cenv.g m calledArgTy callerArgExpr
8889- else
8892+ | ReflectedArgInfo.Quote false ->
88908893 Expr.Quote(callerArgExpr, ref None, false, m, calledArgTy)
8894+ | ReflectedArgInfo.None -> failwith "unreachable" // unreachable due to reflArgInfo.AutoQuote condition
88918895
88928896
88938897 // Note: out args do not need to be coerced
@@ -9103,7 +9107,7 @@ and TcMethodApplication
91039107 | AssignedPropSetter (pinfo,pminfo,pminst) ->
91049108 MethInfoChecks cenv.g cenv.amap true None [objExpr] ad m pminfo
91059109 let calledArgTy = List.head (List.head (pminfo.GetParamTypes(cenv.amap, m, pminst)))
9106- let argExpr = coerceExpr false calledArgTy None callerArgTy m argExpr
9110+ let argExpr = coerceExpr false calledArgTyReflectedArgInfo. None callerArgTy m argExpr
91079111 let mut = (if isStructTy cenv.g (tyOfExpr cenv.g objExpr) then DefinitelyMutates else PossiblyMutates)
91089112 let action = BuildPossiblyConditionalMethodCall cenv env mut m true pminfo NormalValUse pminst [objExpr] [argExpr] |> fst
91099113 action, Item.Property (pinfo.PropertyName, [pinfo])
@@ -9112,15 +9116,15 @@ and TcMethodApplication
91129116 // Get or set instance IL field
91139117 ILFieldInstanceChecks cenv.g cenv.amap ad m finfo
91149118 let calledArgTy = finfo.FieldType (cenv.amap, m)
9115- let argExpr = coerceExpr false calledArgTy None callerArgTy m argExpr
9119+ let argExpr = coerceExpr false calledArgTyReflectedArgInfo. None callerArgTy m argExpr
91169120 let action = BuildILFieldSet cenv.g m objExpr finfo argExpr
91179121 action, Item.ILField finfo
91189122
91199123 | AssignedRecdFieldSetter rfinfo ->
91209124 RecdFieldInstanceChecks cenv.g cenv.amap ad m rfinfo
91219125 let calledArgTy = rfinfo.FieldType
91229126 CheckRecdFieldMutation m denv rfinfo
9123- let argExpr = coerceExpr false calledArgTy None callerArgTy m argExpr
9127+ let argExpr = coerceExpr false calledArgTyReflectedArgInfo. None callerArgTy m argExpr
91249128 let action = BuildRecdFieldSet cenv.g m objExpr rfinfo argExpr
91259129 action, Item.RecdField rfinfo
91269130