anchor.diff:  
       | SynExpr.InterpolatedString (parts, _, m) ->
           checkLanguageFeatureError cenv.g.langVersion LanguageFeature.StringInterpolation m
  -
           CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy.Commit, env.AccessRights)
  -
           TcInterpolatedStringExpr cenv overallTy env m tpenv parts
   
       | SynExpr.Const (synConst, m) ->
  
positive.code:         let args', tpenv = TcExprsWithFlexes cenv env m tpenv flexes argTys args
          AddCxMethodConstraint env.DisplayEnv cenv.css m NoTrace traitInfo
          Expr.Op (TOp.TraitCall traitInfo, [], args', m), returnTy, tpenv
        )
  
      | SynExpr.LibraryOnlyUnionCaseFieldGet (e1, c, n, m) ->
        TcNonPropagatingExprLeafThenConvert cenv overallTy env m (fun () ->
          let e1', ty1, tpenv = TcExprOfUnknownType cenv env tpenv e1
          let mkf, ty2 = TcUnionCaseOrExnField cenv env ty1 m c n
                            ((fun (a, b) n -> mkUnionCaseFieldGetUnproven cenv.g (e1', a, b, n, m)),
                             (fun a n -> mkExnCaseFieldGet(e1', a, n, m)))
          mkf n, ty2, tpenv
        )
  
      | SynExpr.LibraryOnlyUnionCaseFieldSet (e1, c, n, e2, m) ->
          UnifyTypes cenv env m overallTy.Commit cenv.g.unit_ty
          let e1', ty1, tpenv = TcExprOfUnknownType cenv env tpenv e1
          let mkf, ty2 = TcUnionCaseOrExnField cenv env ty1 m c n
                            ((fun (a, b) n e2' ->
                               if not (isUnionCaseFieldMutable cenv.g a n) then errorR(Error(FSComp.SR.tcFieldIsNotMutable(), m))
                               mkUnionCaseFieldSet(e1', a, b, n, e2', m)),
                             (fun a n e2' ->
                               if not (isExnFieldMutable a n) then errorR(Error(FSComp.SR.tcFieldIsNotMutable(), m))
                               mkExnCaseFieldSet(e1', a, n, e2', m)))
          let e2', tpenv = TcExpr cenv (MustEqual ty2) env tpenv e2
          mkf n e2', tpenv
  
      | SynExpr.LibraryOnlyILAssembly (s, tyargs, args, rtys, m) ->
          let s = (s :?> ILInstr[])
          let argTys = NewInferenceTypes args
          let tyargs', tpenv = TcTypes cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tyargs
          // No subsumption at uses of IL assembly code
          let flexes = argTys |> List.map (fun _ -> false)
          let args', tpenv = TcExprsWithFlexes cenv env m tpenv flexes argTys args
          let rtys', tpenv = TcTypes cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv rtys
          let returnTy =
              match rtys' with
              | [] -> cenv.g.unit_ty
              | [ returnTy ] -> returnTy
              | _ -> error(InternalError("Only zero or one pushed items are permitted in IL assembly code", m))
          UnifyTypes cenv env m overallTy.Commit returnTy
          mkAsmExpr (Array.toList s, tyargs', args', rtys', m), tpenv
  
      | SynExpr.Quote (oper, raw, ast, isFromQueryExpression, m) ->
          CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy.Commit, env.AccessRights)
          TcQuotationExpr cenv overallTy env tpenv (oper, raw, ast, isFromQueryExpression, m)
  
      | SynExpr.YieldOrReturn ((isTrueYield, _), _, m)
      | SynExpr.YieldOrReturnFrom ((isTrueYield, _), _, m) when isTrueYield ->
          error(Error(FSComp.SR.tcConstructRequiresListArrayOrSequence(), m))
  
      | SynExpr.YieldOrReturn ((_, isTrueReturn), _, m)
      | SynExpr.YieldOrReturnFrom ((_, isTrueReturn), _, m) when isTrueReturn ->
          error(Error(FSComp.SR.tcConstructRequiresComputationExpressions(), m))
  
      | SynExpr.YieldOrReturn (_, _, m)
      | SynExpr.YieldOrReturnFrom (_, _, m)
      | SynExpr.ImplicitZero m ->
          error(Error(FSComp.SR.tcConstructRequiresSequenceOrComputations(), m))
  
      | SynExpr.DoBang (_, m)
      | SynExpr.LetOrUseBang  (range=m) ->
          error(Error(FSComp.SR.tcConstructRequiresComputationExpression(), m))
  
      | SynExpr.MatchBang (_, _, _, m) ->
          error(Error(FSComp.SR.tcConstructRequiresComputationExpression(), m))
  
      | SynExpr.IndexFromEnd (range=m)
      | SynExpr.IndexRange (range=m) ->
          error(Error(FSComp.SR.tcInvalidIndexerExpression(), m))
  
  // Converts 'a..b' to a call to the '(..)' operator in FSharp.Core
  // Converts 'a..b..c' to a call to the '(.. ..)' operator in FSharp.Core
  
negative.code:         )
  
      | SynExpr.ArrayOrList (isArray, args, m) ->
         TcExprArrayOrList cenv overallTy env tpenv (isArray, args, m)
  
      | SynExpr.New (superInit, synObjTy, arg, mNewExpr) ->
        let objTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.Use env tpenv synObjTy
  
        TcPropagatingExprLeafThenConvert cenv overallTy objTy env (* true *) mNewExpr (fun () ->
          TcNewExpr cenv env tpenv objTy (Some synObjTy.Range) superInit arg mNewExpr
        )
  
      | SynExpr.ObjExpr (synObjTy, argopt, binds, extraImpls, mNewExpr, m) ->
        TcExprObjectExpr cenv overallTy env tpenv (synObjTy, argopt, binds, extraImpls, mNewExpr, m)
  
      | SynExpr.Record (inherits, optOrigExpr, flds, mWholeExpr) ->
        TcExprRecord cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr)
  
      | SynExpr.While (spWhile, synGuardExpr, synBodyExpr, m) ->
          TcExprWhileLoop cenv overallTy env tpenv (spWhile, synGuardExpr, synBodyExpr, m)
  
      | SynExpr.For (spBind, id, _, start, dir, finish, body, m) ->
          TcExprIntegerForLoop cenv overallTy env tpenv (spBind, id, start, dir, finish, body, m)
  
      | SynExpr.ForEach (spForLoop, SeqExprOnly seqExprOnly, isFromSource, pat, enumSynExpr, bodySynExpr, m) ->
          assert isFromSource
          if seqExprOnly then warning (Error(FSComp.SR.tcExpressionRequiresSequence(), m))
          let enumSynExpr =
              match RewriteRangeExpr enumSynExpr with
              | Some e -> e
              | None -> enumSynExpr
          TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, m, spForLoop)
  
      | SynExpr.ComputationExpr (hasSeqBuilder, comp, m) ->
          let env = ExitFamilyRegion env
          cenv.TcSequenceExpressionEntry cenv env overallTy tpenv (hasSeqBuilder, comp) m
  
      | SynExpr.ArrayOrListComputed (isArray, comp, m) ->
          let env = ExitFamilyRegion env
          CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy.Commit, env.eAccessRights)
          cenv.TcArrayOrListComputedExpression cenv env overallTy tpenv (isArray, comp)  m
  
      | SynExpr.LetOrUse _ ->
          TcLinearExprs (TcExprThatCanBeCtorBody cenv) cenv env overallTy tpenv false synExpr (fun x -> x)
  
      | SynExpr.TryWith (synBodyExpr, _mTryToWith, synWithClauses, mWithToLast, mTryToLast, spTry, spWith) ->
          TcExprTryWith cenv overallTy env tpenv (synBodyExpr, _mTryToWith, synWithClauses, mWithToLast, mTryToLast, spTry, spWith)
  
      | SynExpr.TryFinally (synBodyExpr, synFinallyExpr, mTryToLast, spTry, spFinally) ->
          TcExprTryFinally cenv overallTy env tpenv (synBodyExpr, synFinallyExpr, mTryToLast, spTry, spFinally)
  
      | SynExpr.JoinIn (e1, mInToken, e2, mAll) ->
          TcExprJoinIn cenv overallTy env tpenv (e1, mInToken, e2, mAll)
  
      | SynExpr.ArbitraryAfterError (_debugStr, m) ->
          //solveTypAsError cenv env.DisplayEnv m overallTy
          mkDefault(m, overallTy.Commit), tpenv
  
      | SynExpr.DiscardAfterMissingQualificationAfterDot (e1, m) ->
          let _, _, tpenv = suppressErrorReporting (fun () -> TcExprOfUnknownTypeThen cenv env tpenv e1 [DelayedDot])
          mkDefault(m, overallTy.Commit), tpenv
  
      | SynExpr.FromParseError (e1, m) ->
          //solveTypAsError cenv env.DisplayEnv m overallTy
          let _, tpenv = suppressErrorReporting (fun () -> TcExpr cenv overallTy env tpenv e1)
          mkDefault(m, overallTy.Commit), tpenv
  
      | SynExpr.Sequential (sp, dir, synExpr1, synExpr2, m) ->
          TcExprSequential cenv overallTy env tpenv (synExpr, sp, dir, synExpr1, synExpr2, m)
  
      // Used to implement the type-directed 'implicit yield' rule for computation expressions
      | SynExpr.SequentialOrImplicitYield (sp, synExpr1, synExpr2, otherExpr, m) ->
          TcExprSequentialOrImplicitYield cenv overallTy env tpenv (sp, synExpr1, synExpr2, otherExpr, m)
  
      | SynExpr.Do (synInnerExpr, m) ->
          UnifyTypes cenv env m overallTy.Commit cenv.g.unit_ty
          TcStmtThatCantBeCtorBody cenv env tpenv synInnerExpr
  
      | SynExpr.IfThenElse _ ->
          TcLinearExprs (TcExprThatCanBeCtorBody cenv) cenv env overallTy tpenv false synExpr (fun x -> x)
  
      // This is for internal use in the libraries only
      | SynExpr.LibraryOnlyStaticOptimization (constraints, e2, e3, m) ->
          TcExprStaticOptimization cenv overallTy env tpenv (constraints, e2, e3, m)
  
      // e1.longId <- e2
      | SynExpr.DotSet (e1, lidwd, e2, mStmt) ->
          TcExprDotSet cenv overallTy env tpenv (e1, lidwd, e2, mStmt)
  
      // e1 <- e2
      | SynExpr.Set (e1, e2, mStmt) ->
          TcExprThen cenv overallTy env tpenv false e1 [MakeDelayedSet(e2, mStmt)]
  
      // e1.longId(e2) <- e3, very rarely used named property setters
      | SynExpr.DotNamedIndexedPropertySet (e1, lidwd, e2, e3, mStmt) ->
          TcExprDotNamedIndexedPropertySet cenv overallTy env tpenv (e1, lidwd, e2, e3, mStmt)
  
      | SynExpr.LongIdentSet (lidwd, e2, m) ->
          TcExprLongIdentSet cenv overallTy env tpenv (lidwd, e2, m)
  
      // Type.Items(e1) <- e2
      | SynExpr.NamedIndexedPropertySet (lidwd, e1, e2, mStmt) ->
          TcExprNamedIndexPropertySet cenv overallTy env tpenv (lidwd, e1, e2, mStmt)
  
      | SynExpr.TraitCall (tps, memSpfn, arg, m) ->
        TcExprTraitCall cenv overallTy env tpenv (tps, memSpfn, arg, m)
  
      | SynExpr.LibraryOnlyUnionCaseFieldGet (e1, c, n, m) ->
        TcExprUnionCaseFieldGet cenv overallTy env tpenv (e1, c, n, m)
  
      | SynExpr.LibraryOnlyUnionCaseFieldSet (e1, c, n, e2, m) ->
          TcExprUnionCaseFieldSet cenv overallTy env tpenv (e1, c, n, e2, m)
  
      | SynExpr.LibraryOnlyILAssembly (s, tyargs, args, rtys, m) ->
          TcExprILAssembly cenv overallTy env tpenv (s, tyargs, args, rtys, m)
  
      | SynExpr.Quote (oper, raw, ast, isFromQueryExpression, m) ->
          CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy.Commit, env.AccessRights)
          TcQuotationExpr cenv overallTy env tpenv (oper, raw, ast, isFromQueryExpression, m)
  
      | SynExpr.YieldOrReturn ((isTrueYield, _), _, m)
      | SynExpr.YieldOrReturnFrom ((isTrueYield, _), _, m) when isTrueYield ->
          error(Error(FSComp.SR.tcConstructRequiresListArrayOrSequence(), m))
  
      | SynExpr.YieldOrReturn ((_, isTrueReturn), _, m)
      | SynExpr.YieldOrReturnFrom ((_, isTrueReturn), _, m) when isTrueReturn ->
          error(Error(FSComp.SR.tcConstructRequiresComputationExpressions(), m))
  
      | SynExpr.YieldOrReturn (_, _, m)
      | SynExpr.YieldOrReturnFrom (_, _, m)
      | SynExpr.ImplicitZero m ->
          error(Error(FSComp.SR.tcConstructRequiresSequenceOrComputations(), m))
  
      | SynExpr.DoBang (_, m)
      | SynExpr.LetOrUseBang  (range=m) ->
          error(Error(FSComp.SR.tcConstructRequiresComputationExpression(), m))
  
      | SynExpr.MatchBang (_, _, _, m) ->
          error(Error(FSComp.SR.tcConstructRequiresComputationExpression(), m))
  
      | SynExpr.IndexFromEnd (range=m)
      | SynExpr.IndexRange (range=m) ->
          error(Error(FSComp.SR.tcInvalidIndexerExpression(), m))
  
  // (function[spMatch] pat1 -> expr1 ... | patN -> exprN)
  //
  //  -->
  //      (fun anonArg -> let[spMatch] anonVal = anonArg in pat1 -> expr1 ... | patN -> exprN)
  //
  // Note the presence of the "let" is visible in quotations regardless of the presence of sequence points, so
  //     <@ function x -> (x: int) @>
  // is
  //     Lambda (_arg2, Let (x, _arg2, x))
  and TcExprMatchLambda cenv overallTy env tpenv (isExnMatch, mArg, clauses, spMatch, m) =
      let domainTy, resultTy = UnifyFunctionType None cenv env.DisplayEnv m overallTy.Commit
      let idv1, idve1 = mkCompGenLocal mArg (cenv.synArgNameGenerator.New()) domainTy
      let envinner = ExitFamilyRegion env
      let idv2, matchExpr, tpenv = TcAndPatternCompileMatchClauses m mArg (if isExnMatch then Throw else ThrowIncompleteMatchException) cenv None domainTy (MustConvertTo (false, resultTy)) envinner tpenv clauses
      let overallExpr = mkMultiLambda m [idv1] ((mkLet spMatch m idv2 idve1 matchExpr), resultTy)
      overallExpr, tpenv
  
  and TcExprTypeAnnotated cenv overallTy env tpenv (synBodyExpr, synType, m) =
      let tgtTy, tpenv = TcTypeAndRecover cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv synType
      UnifyOverallType cenv env m overallTy tgtTy
      let bodyExpr, tpenv = TcExpr cenv (MustConvertTo (false, tgtTy)) env tpenv synBodyExpr
      let bodyExpr2 = TcAdjustExprForTypeDirectedConversions cenv overallTy tgtTy env (* true  *) m bodyExpr
      bodyExpr2, tpenv
  
  and TcExprTypeTest cenv overallTy env tpenv (synInnerExpr, tgtTy, m) =
      let innerExpr, srcTy, tpenv = TcExprOfUnknownType cenv env tpenv synInnerExpr
      UnifyTypes cenv env m overallTy.Commit cenv.g.bool_ty
      let tgtTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tgtTy
      TcRuntimeTypeTest (*isCast*)false (*isOperator*)true cenv env.DisplayEnv m tgtTy srcTy
      let expr = mkCallTypeTest cenv.g m tgtTy innerExpr
      expr, tpenv
  
  and TcExprUpcast cenv overallTy env tpenv (synExpr, synInnerExpr, m) =
      let innerExpr, srcTy, tpenv = TcExprOfUnknownType cenv env tpenv synInnerExpr
      let tgtTy, tpenv =
          match synExpr with
          | SynExpr.Upcast (_, tgtTy, m) ->
              let tgtTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tgtTy
              UnifyTypes cenv env m tgtTy overallTy.Commit
              tgtTy, tpenv
          | SynExpr.InferredUpcast _ ->
              overallTy.Commit, tpenv
          | _ -> failwith "upcast"
      TcStaticUpcast cenv env.DisplayEnv m tgtTy srcTy
      let expr = mkCoerceExpr(innerExpr, tgtTy, m, srcTy)
      expr, tpenv
  
  and TcExprDowncast cenv overallTy env tpenv (synExpr, synInnerExpr, m) =
      let innerExpr, srcTy, tpenv = TcExprOfUnknownType cenv env tpenv synInnerExpr
      let tgtTy, tpenv, isOperator =
          match synExpr with
          | SynExpr.Downcast (_, tgtTy, m) ->
              let tgtTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tgtTy
              UnifyTypes cenv env m tgtTy overallTy.Commit
              tgtTy, tpenv, true
          | SynExpr.InferredDowncast _ -> overallTy.Commit, tpenv, false
          | _ -> failwith "downcast"
      TcRuntimeTypeTest (*isCast*)true isOperator cenv env.DisplayEnv m tgtTy srcTy
  
      // TcRuntimeTypeTest ensures tgtTy is a nominal type. Hence we can insert a check here
      // based on the nullness semantics of the nominal type.
      let expr = mkCallUnbox cenv.g m tgtTy innerExpr
      expr, tpenv
  
  and TcExprLazy cenv overallTy env tpenv (synInnerExpr, m) =
      let innerTy = NewInferenceType ()
      UnifyTypes cenv env m overallTy.Commit (mkLazyTy cenv.g innerTy)
      let innerExpr, tpenv = TcExpr cenv (MustEqual innerTy) env tpenv synInnerExpr
      let expr = mkLazyDelayed cenv.g m innerTy (mkUnitDelayLambda cenv.g m innerExpr)
      expr, tpenv
  
  and TcExprTuple cenv overallTy env tpenv (isExplicitStruct, args, m) =
      TcPossiblyPropogatingExprLeafThenConvert (fun ty -> isAnyTupleTy cenv.g ty || isTyparTy cenv.g ty) cenv overallTy env m (fun overallTy ->
          let tupInfo, argTys = UnifyTupleTypeAndInferCharacteristics env.eContextInfo cenv env.DisplayEnv m overallTy isExplicitStruct args
  
          let flexes = argTys |> List.map (fun _ -> false)
          let args', tpenv = TcExprsWithFlexes cenv env m tpenv flexes argTys args
          let expr = mkAnyTupled cenv.g m tupInfo args' argTys
          expr, tpenv
      )
  
  and TcExprArrayOrList cenv overallTy env tpenv (isArray, args, m) =
      CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy.Commit, env.AccessRights)
      let argty = NewInferenceType ()
      let actualTy = if isArray then mkArrayType cenv.g argty else mkListTy cenv.g argty
  
      // Propagating type directed conversion, e.g. for 
      //     let x : seq<int64>  = [ 1; 2 ]
      // Consider also the case where there is no relation but an op_Implicit is enabled from List<_> to C
      //    let x : C = [ B(); B() ]
  
      TcPropagatingExprLeafThenConvert cenv overallTy actualTy env (* canAdhoc  *) m (fun () ->
  
          // Always allow subsumption if a nominal type is known prior to type checking any arguments
          let flex = not (isTyparTy cenv.g argty)
  