diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index d3b1e26497f..3f25d32e0b1 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -6669,7 +6669,6 @@ and TcTyparExprThen (cenv: cenv) overallTy env tpenv synTypar m delayed = | DelayedDotLookup (ident :: rest, m2) :: delayed2 -> let ad = env.eAccessRights let tp, tpenv = TcTypar cenv env NoNewTypars tpenv synTypar - let mExprAndLongId = unionRanges synTypar.Range ident.idRange let ty = mkTyparTy tp let lookupKind = LookupKind.Expr LookupIsInstance.Ambivalent let item, _rest = ResolveLongIdentInType cenv.tcSink cenv.nameResolver env.NameEnv lookupKind ident.idRange ad ident IgnoreOverrides TypeNameResolutionInfo.Default ty @@ -6678,7 +6677,7 @@ and TcTyparExprThen (cenv: cenv) overallTy env tpenv synTypar m delayed = | [] -> delayed2 | _ -> DelayedDotLookup (rest, m2) :: delayed2 CallNameResolutionSink cenv.tcSink (ident.idRange, env.NameEnv, item, emptyTyparInst, ItemOccurrence.Use, env.AccessRights) - TcItemThen cenv overallTy env tpenv ([], item, mExprAndLongId, ident.idRange, [], AfterResolution.DoNothing) (Some ty) delayed3 + TcItemThen cenv overallTy env tpenv ([], item, ident.idRange, [], AfterResolution.DoNothing) (Some ty) delayed3 //TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed item mItem rest afterResolution | _ -> let (SynTypar(_, q, _)) = synTypar @@ -8667,7 +8666,7 @@ and TcNameOfExpr (cenv: cenv) env tpenv (synArg: SynExpr) = let nameResolutionResult = ResolveLongIdentAsExprAndComputeRange cenv.tcSink cenv.nameResolver (rangeOfLid longId) ad env.eNameResEnv typeNameResInfo longId None let resolvesAsExpr = match nameResolutionResult with - | Result (tinstEnclosing, item, mItem, mItemIdent, rest, afterRes) + | Result (_, item, _, _, _ as res) when (match item with | Item.DelegateCtor _ @@ -8678,7 +8677,7 @@ and TcNameOfExpr (cenv: cenv) env tpenv (synArg: SynExpr) = | _ -> true | _ -> true) -> let overallTy = match overallTyOpt with None -> MustEqual (NewInferenceType g) | Some t -> t - let _, _ = TcItemThen cenv overallTy env tpenv (tinstEnclosing, item, mItem, mItemIdent, rest, afterRes) None delayed + let _, _ = TcItemThen cenv overallTy env tpenv res None delayed true | _ -> false @@ -8905,18 +8904,18 @@ and TcLongIdentThen (cenv: cenv) (overallTy: OverallTy) env tpenv (SynLongIdent( let ad = env.eAccessRights let typeNameResInfo = GetLongIdentTypeNameInfo delayed - let (tinstEnclosing, item, mItem, mItemIdent, rest, afterResolution) = + let nameResolutionResult = let maybeAppliedArgExpr = DelayedItem.maybeAppliedArgForPreferExtensionOverProperty delayed ResolveLongIdentAsExprAndComputeRange cenv.tcSink cenv.nameResolver (rangeOfLid longId) ad env.eNameResEnv typeNameResInfo longId maybeAppliedArgExpr |> ForceRaise - TcItemThen cenv overallTy env tpenv (tinstEnclosing, item, mItem, mItemIdent, rest, afterResolution) None delayed + TcItemThen cenv overallTy env tpenv nameResolutionResult None delayed //------------------------------------------------------------------------- // Typecheck "item+projections" //------------------------------------------------------------------------- *) -// mItem = range of all resolved long-ident segments; mItemIdent = terminal ident only (for diagnostic ranges) -and TcItemThen (cenv: cenv) (overallTy: OverallTy) env tpenv (tinstEnclosing, item, mItem, mItemIdent, rest, afterResolution) staticTyOpt delayed = +// mItem = range of the terminal identifier (for diagnostic and expression ranges) +and TcItemThen (cenv: cenv) (overallTy: OverallTy) env tpenv (tinstEnclosing, item, mItem, rest, afterResolution) staticTyOpt delayed = let delayed = delayRest rest mItem delayed match item with // x where x is a union case or active pattern result tag. @@ -8927,13 +8926,13 @@ and TcItemThen (cenv: cenv) (overallTy: OverallTy) env tpenv (tinstEnclosing, it TcTypeItemThen cenv overallTy env nm ty tpenv mItem tinstEnclosing delayed | Item.MethodGroup (methodName, minfos, _) -> - TcMethodItemThen cenv overallTy env item methodName minfos tpenv mItem mItemIdent afterResolution staticTyOpt delayed + TcMethodItemThen cenv overallTy env item methodName minfos tpenv mItem afterResolution staticTyOpt delayed | Item.Trait traitInfo -> TcTraitItemThen cenv overallTy env None traitInfo tpenv mItem delayed | Item.CtorGroup(nm, minfos) -> - TcCtorItemThen cenv overallTy env item nm minfos tinstEnclosing tpenv mItem mItemIdent afterResolution delayed + TcCtorItemThen cenv overallTy env item nm minfos tinstEnclosing tpenv mItem afterResolution delayed | Item.ImplicitOp(id, sln) -> TcImplicitOpItemThen cenv overallTy env id sln tpenv mItem delayed @@ -8945,7 +8944,7 @@ and TcItemThen (cenv: cenv) (overallTy: OverallTy) env tpenv (tinstEnclosing, it TcValueItemThen cenv overallTy env vref tpenv mItem afterResolution delayed | Item.Property (nm, pinfos, _) -> - TcPropertyItemThen cenv overallTy env nm pinfos tpenv mItem mItemIdent afterResolution staticTyOpt delayed + TcPropertyItemThen cenv overallTy env nm pinfos tpenv mItem afterResolution staticTyOpt delayed | Item.ILField finfo -> TcILFieldItemThen cenv overallTy env finfo tpenv mItem delayed @@ -9156,8 +9155,8 @@ and TcTypeItemThen (cenv: cenv) overallTy env nm ty tpenv mItem tinstEnclosing d let item = Item.Types(nm, [ty]) CallNameResolutionSink cenv.tcSink (mExprAndTypeArgs, env.NameEnv, item, emptyTyparInst, ItemOccurrence.Use, env.eAccessRights) let typeNameResInfo = GetLongIdentTypeNameInfo otherDelayed - let item, mItem, mItemIdent, rest, afterResolution = ResolveExprDotLongIdentAndComputeRange cenv.tcSink cenv.nameResolver (unionRanges mExprAndTypeArgs mLongId) ad env.eNameResEnv ty longId typeNameResInfo IgnoreOverrides true None - TcItemThen cenv overallTy env tpenv ((argsOfAppTy g ty), item, mItem, mItemIdent, rest, afterResolution) None otherDelayed + let item, mItem, rest, afterResolution = ResolveExprDotLongIdentAndComputeRange cenv.tcSink cenv.nameResolver (unionRanges mExprAndTypeArgs mLongId) ad env.eNameResEnv ty longId typeNameResInfo IgnoreOverrides true None + TcItemThen cenv overallTy env tpenv ((argsOfAppTy g ty), item, mItem, rest, afterResolution) None otherDelayed | DelayedTypeApp(tyargs, _mTypeArgs, mExprAndTypeArgs) :: _delayed' -> // A case where we have an incomplete name e.g. 'Foo.' - we still want to report it to VS! @@ -9177,13 +9176,13 @@ and TcTypeItemThen (cenv: cenv) overallTy env nm ty tpenv mItem tinstEnclosing d else error(Error(FSComp.SR.tcInvalidUseOfTypeName(), mItem)) -and TcMethodItemThen (cenv: cenv) overallTy env item methodName minfos tpenv mItem mItemIdent afterResolution staticTyOpt delayed = +and TcMethodItemThen (cenv: cenv) overallTy env item methodName minfos tpenv mItem afterResolution staticTyOpt delayed = let ad = env.eAccessRights // Static method calls Type.Foo(arg1, ..., argn) let meths = List.map (fun minfo -> minfo, None) minfos match delayed with | DelayedApp (atomicFlag, _, _, arg, mExprAndArg) :: otherDelayed -> - TcMethodApplicationThen cenv env overallTy None tpenv None [] mExprAndArg mItemIdent methodName ad NeverMutates false meths afterResolution NormalValUse [arg] atomicFlag staticTyOpt otherDelayed + TcMethodApplicationThen cenv env overallTy None tpenv None [] mExprAndArg mItem methodName ad NeverMutates false meths afterResolution NormalValUse [arg] atomicFlag staticTyOpt otherDelayed | DelayedTypeApp(tys, mTypeArgs, mExprAndTypeArgs) :: otherDelayed -> @@ -9197,9 +9196,9 @@ and TcMethodItemThen (cenv: cenv) overallTy env item methodName minfos tpenv mIt match otherDelayed with | DelayedApp(atomicFlag, _, _, arg, mExprAndArg) :: otherDelayed -> - TcMethodApplicationThen cenv env overallTy None tpenv None [] mExprAndArg mItemIdent methodName ad NeverMutates false [(minfoAfterStaticArguments, None)] afterResolution NormalValUse [arg] atomicFlag staticTyOpt otherDelayed + TcMethodApplicationThen cenv env overallTy None tpenv None [] mExprAndArg mItem methodName ad NeverMutates false [(minfoAfterStaticArguments, None)] afterResolution NormalValUse [arg] atomicFlag staticTyOpt otherDelayed | _ -> - TcMethodApplicationThen cenv env overallTy None tpenv None [] mExprAndTypeArgs mItemIdent methodName ad NeverMutates false [(minfoAfterStaticArguments, None)] afterResolution NormalValUse [] ExprAtomicFlag.Atomic staticTyOpt otherDelayed + TcMethodApplicationThen cenv env overallTy None tpenv None [] mExprAndTypeArgs mItem methodName ad NeverMutates false [(minfoAfterStaticArguments, None)] afterResolution NormalValUse [] ExprAtomicFlag.Atomic staticTyOpt otherDelayed | None -> #endif @@ -9213,18 +9212,18 @@ and TcMethodItemThen (cenv: cenv) overallTy env item methodName minfos tpenv mIt match otherDelayed with | DelayedApp(atomicFlag, _, _, arg, mExprAndArg) :: otherDelayed -> - TcMethodApplicationThen cenv env overallTy None tpenv (Some tyargs) [] mExprAndArg mItemIdent methodName ad NeverMutates false meths afterResolution NormalValUse [arg] atomicFlag staticTyOpt otherDelayed + TcMethodApplicationThen cenv env overallTy None tpenv (Some tyargs) [] mExprAndArg mItem methodName ad NeverMutates false meths afterResolution NormalValUse [arg] atomicFlag staticTyOpt otherDelayed | _ -> - TcMethodApplicationThen cenv env overallTy None tpenv (Some tyargs) [] mExprAndTypeArgs mItemIdent methodName ad NeverMutates false meths afterResolution NormalValUse [] ExprAtomicFlag.Atomic staticTyOpt otherDelayed + TcMethodApplicationThen cenv env overallTy None tpenv (Some tyargs) [] mExprAndTypeArgs mItem methodName ad NeverMutates false meths afterResolution NormalValUse [] ExprAtomicFlag.Atomic staticTyOpt otherDelayed | _ -> #if !NO_TYPEPROVIDERS if not minfos.IsEmpty && minfos[0].ProvidedStaticParameterInfo.IsSome then error(Error(FSComp.SR.etMissingStaticArgumentsToMethod(), mItem)) #endif - TcMethodApplicationThen cenv env overallTy None tpenv None [] mItem mItemIdent methodName ad NeverMutates false meths afterResolution NormalValUse [] ExprAtomicFlag.Atomic staticTyOpt delayed + TcMethodApplicationThen cenv env overallTy None tpenv None [] mItem mItem methodName ad NeverMutates false meths afterResolution NormalValUse [] ExprAtomicFlag.Atomic staticTyOpt delayed -and TcCtorItemThen (cenv: cenv) overallTy env item nm minfos tinstEnclosing tpenv mItem mItemIdent afterResolution delayed = +and TcCtorItemThen (cenv: cenv) overallTy env item nm minfos tinstEnclosing tpenv mItem afterResolution delayed = #if !NO_TYPEPROVIDERS let g = cenv.g let ad = env.eAccessRights @@ -9238,7 +9237,7 @@ and TcCtorItemThen (cenv: cenv) overallTy env item nm minfos tinstEnclosing tpen | DelayedApp(_, _, _, arg, mExprAndArg) :: otherDelayed -> CallExprHasTypeSink cenv.tcSink (mExprAndArg, env.NameEnv, objTy, env.eAccessRights) - TcCtorCall true cenv env tpenv overallTy objTy (Some mItemIdent) item false [arg] mExprAndArg otherDelayed (Some afterResolution) + TcCtorCall true cenv env tpenv overallTy objTy (Some mItem) item false [arg] mExprAndArg otherDelayed (Some afterResolution) | DelayedTypeApp(tyargs, _mTypeArgs, mExprAndTypeArgs) :: DelayedApp(_, _, _, arg, mExprAndArg) :: otherDelayed -> @@ -9259,7 +9258,7 @@ and TcCtorItemThen (cenv: cenv) overallTy env item nm minfos tinstEnclosing tpen item, minfos minfosAfterTyArgs |> List.iter (fun minfo -> UnifyTypes cenv env mExprAndTypeArgs minfo.ApparentEnclosingType objTyAfterTyArgs) - TcCtorCall true cenv env tpenv overallTy objTyAfterTyArgs (Some mItemIdent) itemAfterTyArgs false [arg] mExprAndArg otherDelayed (Some afterResolution) + TcCtorCall true cenv env tpenv overallTy objTyAfterTyArgs (Some mItem) itemAfterTyArgs false [arg] mExprAndArg otherDelayed (Some afterResolution) | DelayedTypeApp(tyargs, _mTypeArgs, mExprAndTypeArgs) :: otherDelayed -> @@ -9270,11 +9269,11 @@ and TcCtorItemThen (cenv: cenv) overallTy env item nm minfos tinstEnclosing tpen CallNameResolutionSink cenv.tcSink (mExprAndTypeArgs, env.NameEnv, resolvedItem, emptyTyparInst, ItemOccurrence.Use, env.eAccessRights) minfos |> List.iter (fun minfo -> UnifyTypes cenv env mExprAndTypeArgs minfo.ApparentEnclosingType objTy) - TcCtorCall true cenv env tpenv overallTy objTy (Some mItemIdent) item false [] mExprAndTypeArgs otherDelayed (Some afterResolution) + TcCtorCall true cenv env tpenv overallTy objTy (Some mItem) item false [] mExprAndTypeArgs otherDelayed (Some afterResolution) | _ -> - TcCtorCall true cenv env tpenv overallTy objTy (Some mItemIdent) item false [] mItem delayed (Some afterResolution) + TcCtorCall true cenv env tpenv overallTy objTy (Some mItem) item false [] mItem delayed (Some afterResolution) and TcTraitItemThen (cenv: cenv) overallTy env objOpt traitInfo tpenv mItem delayed = let g = cenv.g @@ -9580,7 +9579,7 @@ and TcValueItemThen cenv overallTy env vref tpenv mItem afterResolution delayed PropagateThenTcDelayed cenv overallTy env tpenv mItem vexpFlex vexpFlex.Type ExprAtomicFlag.Atomic delayed -and TcPropertyItemThen cenv overallTy env nm pinfos tpenv mItem mItemIdent afterResolution staticTyOpt delayed = +and TcPropertyItemThen cenv overallTy env nm pinfos tpenv mItem afterResolution staticTyOpt delayed = let g = cenv.g let ad = env.eAccessRights @@ -9618,19 +9617,19 @@ and TcPropertyItemThen cenv overallTy env nm pinfos tpenv mItem mItemIdent after // x.P <- ... byref setter if isNil meths then error (Error (FSComp.SR.tcPropertyIsNotReadable nm, mItem)) - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt [] mItem mItemIdent nm ad NeverMutates true meths afterResolution NormalValUse args ExprAtomicFlag.Atomic staticTyOpt delayed + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt [] mItem mItem nm ad NeverMutates true meths afterResolution NormalValUse args ExprAtomicFlag.Atomic staticTyOpt delayed else let args = if pinfo.IsIndexer then args else [] if isNil meths then errorR (Error (FSComp.SR.tcPropertyCannotBeSet1 nm, mItem)) // Note: static calls never mutate a struct object argument - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt [] mStmt mItemIdent nm ad NeverMutates true meths afterResolution NormalValUse (args@[expr2]) ExprAtomicFlag.NonAtomic staticTyOpt otherDelayed + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt [] mStmt mItem nm ad NeverMutates true meths afterResolution NormalValUse (args@[expr2]) ExprAtomicFlag.NonAtomic staticTyOpt otherDelayed | _ -> // Static Property Get (possibly indexer) let meths = pinfos |> GettersOfPropInfos if isNil meths then error (Error (FSComp.SR.tcPropertyIsNotReadable nm, mItem)) // Note: static calls never mutate a struct object argument - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt [] mItem mItemIdent nm ad NeverMutates true meths afterResolution NormalValUse args ExprAtomicFlag.Atomic staticTyOpt delayed + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt [] mItem mItem nm ad NeverMutates true meths afterResolution NormalValUse args ExprAtomicFlag.Atomic staticTyOpt delayed and TcILFieldItemThen cenv overallTy env finfo tpenv mItem delayed = let g = cenv.g @@ -9756,10 +9755,10 @@ and TcLookupThen cenv overallTy env tpenv mObjExpr objExpr objExprTy longId dela CanonicalizePartialInferenceProblem cenv.css env.DisplayEnv mExprAndLongId (freeInTypeLeftToRight g false objExprTy) let maybeAppliedArgExpr = DelayedItem.maybeAppliedArgForPreferExtensionOverProperty delayed - let item, mItem, mItemIdent, rest, afterResolution = ResolveExprDotLongIdentAndComputeRange cenv.tcSink cenv.nameResolver mExprAndLongId ad env.NameEnv objExprTy longId TypeNameResolutionInfo.Default findFlag false maybeAppliedArgExpr - TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed item mItem mItemIdent rest afterResolution + let item, mItem, rest, afterResolution = ResolveExprDotLongIdentAndComputeRange cenv.tcSink cenv.nameResolver mExprAndLongId ad env.NameEnv objExprTy longId TypeNameResolutionInfo.Default findFlag false maybeAppliedArgExpr + TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed item mItem rest afterResolution -and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed item mItem mItemIdent rest afterResolution = +and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed item mItem rest afterResolution = let g = cenv.g let ad = env.eAccessRights let objArgs = [objExpr] @@ -9785,7 +9784,7 @@ and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed let item = Item.MethodGroup(methodName, [minfoAfterStaticArguments], Some minfos[0]) CallNameResolutionSinkReplacing cenv.tcSink (mExprAndItem, env.NameEnv, item, [], ItemOccurrence.Use, env.eAccessRights) - TcMethodApplicationThen cenv env overallTy None tpenv None objArgs mExprAndItem mItemIdent methodName ad mutates false [(minfoAfterStaticArguments, None)] afterResolution NormalValUse args atomicFlag None delayed + TcMethodApplicationThen cenv env overallTy None tpenv None objArgs mExprAndItem mItem methodName ad mutates false [(minfoAfterStaticArguments, None)] afterResolution NormalValUse args atomicFlag None delayed | None -> if not minfos.IsEmpty && minfos[0].ProvidedStaticParameterInfo.IsSome then error(Error(FSComp.SR.etMissingStaticArgumentsToMethod(), mItem)) @@ -9794,7 +9793,7 @@ and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed let tyArgsOpt, tpenv = TcMemberTyArgsOpt cenv env tpenv tyArgsOpt let meths = minfos |> List.map (fun minfo -> minfo, None) - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mExprAndItem mItemIdent methodName ad mutates false meths afterResolution NormalValUse args atomicFlag None delayed + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mExprAndItem mItem methodName ad mutates false meths afterResolution NormalValUse args atomicFlag None delayed | Item.Property (nm, pinfos, _) -> // Instance property @@ -9822,7 +9821,7 @@ and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed errorR (Error (FSComp.SR.tcPropertyCannotBeSet1 nm, mItem)) // x.P <- ... byref setter if isNil meths then error (Error (FSComp.SR.tcPropertyIsNotReadable nm, mItem)) - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mExprAndItem mItemIdent nm ad PossiblyMutates true meths afterResolution NormalValUse args atomicFlag None delayed + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mExprAndItem mItem nm ad PossiblyMutates true meths afterResolution NormalValUse args atomicFlag None delayed else if g.langVersion.SupportsFeature(LanguageFeature.RequiredPropertiesSupport) && pinfo.IsSetterInitOnly then @@ -9830,12 +9829,12 @@ and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed let args = if pinfo.IsIndexer then args else [] let mut = (if isStructTy g (tyOfExpr g objExpr) then DefinitelyMutates else PossiblyMutates) - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mStmt mItemIdent nm ad mut true meths afterResolution NormalValUse (args @ [expr2]) atomicFlag None [] + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mStmt mItem nm ad mut true meths afterResolution NormalValUse (args @ [expr2]) atomicFlag None [] | _ -> // Instance property getter let meths = GettersOfPropInfos pinfos if isNil meths then error (Error (FSComp.SR.tcPropertyIsNotReadable nm, mItem)) - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mExprAndItem mItemIdent nm ad PossiblyMutates true meths afterResolution NormalValUse args atomicFlag None delayed + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mExprAndItem mItem nm ad PossiblyMutates true meths afterResolution NormalValUse args atomicFlag None delayed | Item.RecdField rfinfo -> // Get or set instance F# field or literal diff --git a/src/Compiler/Checking/NameResolution.fs b/src/Compiler/Checking/NameResolution.fs index b9b35bad26f..6114bcedc20 100644 --- a/src/Compiler/Checking/NameResolution.fs +++ b/src/Compiler/Checking/NameResolution.fs @@ -4291,8 +4291,7 @@ let ResolveLongIdentAsExprAndComputeRange (sink: TcResultsSink) (ncenv: NameReso // #16621 match refinedItem with | Item.Property(_, pinfos, _) -> - let propIdentRange = if rest.IsEmpty then (List.last lid).idRange else itemRange - RegisterUnionCaseTesterForProperty sink propIdentRange pinfos + RegisterUnionCaseTesterForProperty sink itemIdentRange pinfos | _ -> () let callSinkWithSpecificOverload (minfo: MethInfo, pinfoOpt: PropInfo option, tpinst) = @@ -4319,7 +4318,7 @@ let ResolveLongIdentAsExprAndComputeRange (sink: TcResultsSink) (ncenv: NameReso callSink (item, emptyTyparInst) AfterResolution.DoNothing - success (tinstEnclosing, item, itemRange, itemIdentRange, rest, afterResolution) + success (tinstEnclosing, item, itemIdentRange, rest, afterResolution) [] let (|NonOverridable|_|) namedItem = @@ -4367,8 +4366,7 @@ let ResolveExprDotLongIdentAndComputeRange (sink: TcResultsSink) (ncenv: NameRes // #16621 match refinedItem with | Item.Property(_, pinfos, _) -> - let propIdentRange = if rest.IsEmpty then (List.last lid).idRange else itemRange - RegisterUnionCaseTesterForProperty sink propIdentRange pinfos + RegisterUnionCaseTesterForProperty sink itemIdentRange pinfos | _ -> () let callSinkWithSpecificOverload (minfo: MethInfo, pinfoOpt: PropInfo option, tpinst) = @@ -4389,7 +4387,7 @@ let ResolveExprDotLongIdentAndComputeRange (sink: TcResultsSink) (ncenv: NameRes callSink (unrefinedItem, emptyTyparInst) AfterResolution.DoNothing - item, itemRange, itemIdentRange, rest, afterResolution + item, itemIdentRange, rest, afterResolution //------------------------------------------------------------------------- diff --git a/src/Compiler/Checking/NameResolution.fsi b/src/Compiler/Checking/NameResolution.fsi index 1dc02a2245b..2746200d165 100755 --- a/src/Compiler/Checking/NameResolution.fsi +++ b/src/Compiler/Checking/NameResolution.fsi @@ -878,7 +878,7 @@ val internal ResolvePartialLongIdentToClassOrRecdFields: val internal ResolveRecordOrClassFieldsOfType: NameResolver -> range -> AccessorDomain -> TType -> bool -> Item list /// Resolve a long identifier occurring in an expression position. -/// Also returns the terminal identifier range for error diagnostics (#14284). +/// Returns the terminal identifier range for diagnostics and expression ranges (#14284). val internal ResolveLongIdentAsExprAndComputeRange: sink: TcResultsSink -> ncenv: NameResolver -> @@ -888,10 +888,10 @@ val internal ResolveLongIdentAsExprAndComputeRange: typeNameResInfo: TypeNameResolutionInfo -> lid: Ident list -> maybeAppliedArgExpr: SynExpr option -> - ResultOrException + ResultOrException /// Resolve a long identifier occurring in an expression position, qualified by a type. -/// Also returns the terminal identifier range for error diagnostics (#14284). +/// Returns the terminal identifier range for diagnostics and expression ranges (#14284). val internal ResolveExprDotLongIdentAndComputeRange: sink: TcResultsSink -> ncenv: NameResolver -> @@ -904,7 +904,7 @@ val internal ResolveExprDotLongIdentAndComputeRange: findFlag: FindMemberFlag -> staticOnly: bool -> maybeAppliedArgExpr: SynExpr option -> - Item * range * range * Ident list * AfterResolution + Item * range * Ident list * AfterResolution /// A generator of type instantiations used when no more specific type instantiation is known. val FakeInstantiationGenerator: range -> Typar list -> TType list diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/Basic/Basic.fs index f76552ba8d9..3a283f18cc0 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/Basic/Basic.fs @@ -57,8 +57,8 @@ module AccessibilityAnnotations_Basic = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 1094, Line 18, Col 17, Line 18, Col 41, "The value 'somePrivateField' is not accessible from this code location") - (Error 1094, Line 19, Col 17, Line 19, Col 42, "The value 'somePrivateMethod' is not accessible from this code location") + (Error 1094, Line 18, Col 25, Line 18, Col 41, "The value 'somePrivateField' is not accessible from this code location") + (Error 1094, Line 19, Col 25, Line 19, Col 42, "The value 'somePrivateMethod' is not accessible from this code location") (Error 491, Line 23, Col 17, Line 23, Col 34, "The member or object constructor 'PrivateMethod' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") ] @@ -70,11 +70,11 @@ module AccessibilityAnnotations_Basic = |> shouldFail |> withDiagnostics [ (Error 1092, Line 26, Col 19, Line 26, Col 32, "The type 'PrivateModule' is not accessible from this code location") - (Error 1094, Line 26, Col 17, Line 26, Col 34, "The value 'x' is not accessible from this code location") + (Error 1094, Line 26, Col 33, Line 26, Col 34, "The value 'x' is not accessible from this code location") (Error 1092, Line 27, Col 19, Line 27, Col 32, "The type 'PrivateModule' is not accessible from this code location") - (Error 1094, Line 27, Col 17, Line 27, Col 34, "The value 'f' is not accessible from this code location") - (Error 1094, Line 29, Col 17, Line 29, Col 20, "The value 'y' is not accessible from this code location") - (Error 1094, Line 30, Col 17, Line 30, Col 20, "The value 'g' is not accessible from this code location") + (Error 1094, Line 27, Col 33, Line 27, Col 34, "The value 'f' is not accessible from this code location") + (Error 1094, Line 29, Col 19, Line 29, Col 20, "The value 'y' is not accessible from this code location") + (Error 1094, Line 30, Col 19, Line 30, Col 20, "The value 'g' is not accessible from this code location") ] //SOURCE=E_privateThingsInaccessible03.fs SCFLAGS="--test:ErrorRanges" # E_privateThingsInaccessible03.fs @@ -85,7 +85,7 @@ module AccessibilityAnnotations_Basic = |> shouldFail |> withDiagnostics [ (Error 1092, Line 11, Col 15, Line 11, Col 28, "The type 'PrivateModule' is not accessible from this code location") - (Error 1094, Line 11, Col 13, Line 11, Col 30, "The value 'x' is not accessible from this code location") + (Error 1094, Line 11, Col 29, Line 11, Col 30, "The value 'x' is not accessible from this code location") (Error 39, Line 15, Col 13, Line 15, Col 26, "The value, namespace, type or module 'PrivateModule' is not defined.") ] @@ -109,7 +109,7 @@ module AccessibilityAnnotations_Basic = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 1096, Line 11, Col 9, Line 11, Col 24, "The record, struct or class field 'foo' is not accessible from this code location") + (Error 1096, Line 11, Col 21, Line 11, Col 24, "The record, struct or class field 'foo' is not accessible from this code location") ] //SOURCE=E_PrivateImplicitCtor01.fs SCFLAGS="--test:ErrorRanges" # E_PrivateImplicitCtor01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnTypeMembers/OnTypeMembers.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnTypeMembers/OnTypeMembers.fs index 49c79c2600d..810ae5ecc20 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnTypeMembers/OnTypeMembers.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnTypeMembers/OnTypeMembers.fs @@ -67,12 +67,12 @@ module AccessibilityAnnotations_OnTypeMembers = (Error 491, Line 42, Col 19, Line 42, Col 26, "The member or object constructor 'test2' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") (Error 491, Line 42, Col 29, Line 42, Col 36, "The member or object constructor 'test5' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") (Error 491, Line 42, Col 40, Line 42, Col 47, "The member or object constructor 'test6' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") - (Error 807, Line 42, Col 60, Line 42, Col 67, "Property 'test8' is not readable") + (Error 807, Line 42, Col 62, Line 42, Col 67, "Property 'test8' is not readable") (Error 491, Line 43, Col 1, Line 43, Col 13, "The member or object constructor 'test3' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") (Error 491, Line 44, Col 1, Line 44, Col 13, "The member or object constructor 'test4' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") (Error 491, Line 45, Col 1, Line 45, Col 13, "The member or object constructor 'test5' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") (Error 491, Line 46, Col 1, Line 46, Col 13, "The member or object constructor 'test6' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") - (Error 810, Line 47, Col 1, Line 47, Col 8, "Property 'test7' cannot be set") + (Error 810, Line 47, Col 3, Line 47, Col 8, "Property 'test7' cannot be set") (Error 257, Line 47, Col 1, Line 47, Col 8, "Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'.") ] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs index 40d511a028b..afcce5ec918 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs @@ -97,11 +97,11 @@ module ByrefSafetyAnalysis = (Error 412, Line 178, Col 13, Line 178, Col 24, "A type instantiation involves a byref type. This is not permitted by the rules of Common IL.") (Error 412, Line 183, Col 9, Line 183, Col 20, "A type instantiation involves a byref type. This is not permitted by the rules of Common IL.") (Error 412, Line 187, Col 13, Line 187, Col 14, "A type instantiation involves a byref type. This is not permitted by the rules of Common IL.") - (Error 412, Line 187, Col 17, Line 187, Col 32, "A type instantiation involves a byref type. This is not permitted by the rules of Common IL.") - (Error 425, Line 187, Col 17, Line 187, Col 32, "The type of a first-class function cannot contain byrefs") + (Error 412, Line 187, Col 28, Line 187, Col 32, "A type instantiation involves a byref type. This is not permitted by the rules of Common IL.") + (Error 425, Line 187, Col 28, Line 187, Col 32, "The type of a first-class function cannot contain byrefs") (Error 412, Line 191, Col 13, Line 191, Col 14, "A type instantiation involves a byref type. This is not permitted by the rules of Common IL.") - (Error 412, Line 193, Col 13, Line 193, Col 28, "A type instantiation involves a byref type. This is not permitted by the rules of Common IL.") - (Error 412, Line 198, Col 9, Line 198, Col 24, "A type instantiation involves a byref type. This is not permitted by the rules of Common IL.") + (Error 412, Line 193, Col 24, Line 193, Col 28, "A type instantiation involves a byref type. This is not permitted by the rules of Common IL.") + (Error 412, Line 198, Col 20, Line 198, Col 24, "A type instantiation involves a byref type. This is not permitted by the rules of Common IL.") (Error 3301, Line 201, Col 9, Line 201, Col 15, "The function or method has an invalid return type 'byref * int'. This is not permitted by the rules of Common IL.") (Error 412, Line 203, Col 10, Line 203, Col 15, "A type instantiation involves a byref type. This is not permitted by the rules of Common IL.") (Error 421, Line 203, Col 11, Line 203, Col 12, "The address of the variable 'x' cannot be used at this point") diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs index e5fefa0b7c2..3bae9db5802 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs @@ -115,9 +115,9 @@ module RecordTypes = |> withDiagnostics [ (Warning 464, Line 15, Col 22, Line 15, Col 28, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") (Warning 464, Line 15, Col 35, Line 15, Col 42, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") - (Error 5, Line 17, Col 1, Line 17, Col 5, "This field is not mutable") + (Error 5, Line 17, Col 4, Line 17, Col 5, "This field is not mutable") (Error 1, Line 17, Col 16, Line 17, Col 22, "The type 'float' does not match the type 'decimal'") - (Error 5, Line 18, Col 1, Line 18, Col 5, "This field is not mutable") + (Error 5, Line 18, Col 4, Line 18, Col 5, "This field is not mutable") (Error 1, Line 18, Col 16, Line 18, Col 21, "This expression was expected to have type\n 'float' \nbut here has type\n 'decimal' ") ] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs index 2fd70fab940..244cb8607cc 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs @@ -1792,7 +1792,7 @@ let _x3 = curryN f3 1 2 3 let private iwsamWarnings = [ "--nowarn:3536" ; "--nowarn:3535" ] [] - [] + [] [ int", "ITest.Parse \"42\"", "Parse", 3, 9, 3, 25)>] let ``Direct call to static abstract on interface produces error 3866`` (memberDef: string, call: string, memberName: string, l1, c1, l2, c2) = Fsx $"type ITest =\n {memberDef}\nlet x = {call}" diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs index 7d5db82abde..9498f53905f 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs @@ -124,7 +124,7 @@ module UnionTypes = |> shouldFail |> withDiagnostics [ (Warning 1125, Line 11, Col 29, Line 11, Col 41, "The instantiation of the generic type 'list1' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'list1<_>'.") - (Error 3068, Line 15, Col 10, Line 15, Col 25, "The function or member 'toList' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is 'static member private list1.toList: ('a list1 -> 'a list)'.") + (Error 3068, Line 15, Col 19, Line 15, Col 25, "The function or member 'toList' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is 'static member private list1.toList: ('a list1 -> 'a list)'.") ] //SOURCE=E_Interface_IComparable.fsx SCFLAGS="--test:ErrorRanges" # E_Interface_IComparable.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/Debugger/PortablePdbs.fs b/tests/FSharp.Compiler.ComponentTests/Debugger/PortablePdbs.fs index 5d44d059cf7..cf722e0dbac 100644 --- a/tests/FSharp.Compiler.ComponentTests/Debugger/PortablePdbs.fs +++ b/tests/FSharp.Compiler.ComponentTests/Debugger/PortablePdbs.fs @@ -69,7 +69,7 @@ module Baz = ] ] VerifySequencePoints [ - Line 6, Col 21, Line 6, Col 49 + Line 6, Col 33, Line 6, Col 49 Line 8, Col 26, Line 8, Col 32 Line 16, Col 20, Line 16, Col 22 Line 21, Col 20, Line 21, Col 22 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Literals.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Literals.fs index d2de4a77bf5..38e8bef0ce6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Literals.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Literals.fs @@ -169,7 +169,7 @@ let [] x = System.Int32.MaxValue + 1 |> withResult { Error = Error 3177 Range = { StartLine = 4 - StartColumn = 21 + StartColumn = 34 EndLine = 4 EndColumn = 46 } Message = "This literal expression or attribute argument results in an arithmetic overflow." diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TypeMismatchTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TypeMismatchTests.fs index 337a49d5352..914add221fe 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TypeMismatchTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TypeMismatchTests.fs @@ -367,7 +367,7 @@ let main args = |> typecheck |> shouldFail |> withDiagnostics [ - (Error 1, Line 8, Col 25, Line 8, Col 37, "The tuples have differing lengths of 3 and 2") + (Error 1, Line 8, Col 29, Line 8, Col 37, "The tuples have differing lengths of 3 and 2") ] module ``Not a function`` = diff --git a/tests/FSharp.Compiler.ComponentTests/Interop/RequiredAndInitOnlyProperties.fs b/tests/FSharp.Compiler.ComponentTests/Interop/RequiredAndInitOnlyProperties.fs index 68d8022cc8d..1885328b541 100644 --- a/tests/FSharp.Compiler.ComponentTests/Interop/RequiredAndInitOnlyProperties.fs +++ b/tests/FSharp.Compiler.ComponentTests/Interop/RequiredAndInitOnlyProperties.fs @@ -181,7 +181,7 @@ let main _ = |> compile |> shouldFail |> withDiagnostics [ - Error 810, Line 9, Col 5, Line 9, Col 17, "Init-only property 'GetInit' cannot be set outside the initialization code. See https://aka.ms/fsharp-assigning-values-to-properties-at-initialization" + Error 810, Line 9, Col 10, Line 9, Col 17, "Init-only property 'GetInit' cannot be set outside the initialization code. See https://aka.ms/fsharp-assigning-values-to-properties-at-initialization" ] [] @@ -209,7 +209,7 @@ let main _ = |> compile |> shouldFail |> withDiagnostics [ - Error 810, Line 9, Col 5, Line 9, Col 21, "Cannot call 'set_GetInit' - a setter for init-only property, please use object initialization instead. See https://aka.ms/fsharp-assigning-values-to-properties-at-initialization" + Error 810, Line 9, Col 10, Line 9, Col 21, "Cannot call 'set_GetInit' - a setter for init-only property, please use object initialization instead. See https://aka.ms/fsharp-assigning-values-to-properties-at-initialization" ] [] diff --git a/tests/FSharp.Compiler.ComponentTests/Interop/VisibilityTests.fs b/tests/FSharp.Compiler.ComponentTests/Interop/VisibilityTests.fs index 8bb17ccb8ac..f88577d9e8f 100644 --- a/tests/FSharp.Compiler.ComponentTests/Interop/VisibilityTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Interop/VisibilityTests.fs @@ -163,8 +163,8 @@ type MyFSharpClass () = |> compile |> shouldFail |> withDiagnostics [ - (Error 810, Line 21, Col 9, Line 21, Col 33, "Property 'GetPublicSetPrivate' cannot be set") - (Error 807, Line 28, Col 17, Line 28, Col 41, "Property 'SetPublicGetPrivate' is not readable")] + (Error 810, Line 21, Col 14, Line 21, Col 33, "Property 'GetPublicSetPrivate' cannot be set") + (Error 807, Line 28, Col 22, Line 28, Col 41, "Property 'SetPublicGetPrivate' is not readable")] [] let ``F# class F# non-derived class - access public`` () = @@ -192,4 +192,4 @@ type MyFSharpClass () = |> withReferences [csharpLib] |> compile |> shouldFail - |> withSingleDiagnostic (Error 810, Line 21, Col 9, Line 21, Col 31, "Property 'GetPublicSetPrivate' cannot be set") + |> withSingleDiagnostic (Error 810, Line 21, Col 12, Line 21, Col 31, "Property 'GetPublicSetPrivate' cannot be set") diff --git a/tests/FSharp.Compiler.ComponentTests/Language/DotLambdaTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/DotLambdaTests.fs index 500e03089ca..bc939111cf7 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/DotLambdaTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/DotLambdaTests.fs @@ -326,7 +326,7 @@ let onlyIdC (ids: MyId list) = ids |> List.choose _.IdC |> shouldFail |> withDiagnostics [ (Error 23, Line 7, Col 17, Line 7, Col 20, "The member 'IdA' cannot be defined because the name 'IdA' clashes with the union case 'IdA' in this type or module"); - (Error 812, Line 22, Col 51, Line 22, Col 56, "The syntax 'expr.id' may only be used with record labels, properties and fields"); + (Error 812, Line 22, Col 53, Line 22, Col 56, "The syntax 'expr.id' may only be used with record labels, properties and fields"); (Error 23, Line 17, Col 17, Line 17, Col 20, "The member 'IdC' cannot be defined because the name 'IdC' clashes with the union case 'IdC' in this type or module"); - (Error 812, Line 24, Col 51, Line 24, Col 56, "The syntax 'expr.id' may only be used with record labels, properties and fields") + (Error 812, Line 24, Col 53, Line 24, Col 56, "The syntax 'expr.id' may only be used with record labels, properties and fields") ] \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Language/FixedBindings/FixedBindings.fs b/tests/FSharp.Compiler.ComponentTests/Language/FixedBindings/FixedBindings.fs index 2fba7454498..ec8374a8d57 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/FixedBindings/FixedBindings.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/FixedBindings/FixedBindings.fs @@ -14,7 +14,7 @@ module FixedBindingsTests = |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 5, Col 9, Line 5, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 6, Col 5, Line 6, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 6, Col 15, Line 6, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -26,7 +26,7 @@ module FixedBindingsTests = |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 5, Col 9, Line 5, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 6, Col 5, Line 6, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 6, Col 15, Line 6, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -112,7 +112,7 @@ The type 'char' does not match the type 'byte'""") |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 5, Col 9, Line 5, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 6, Col 5, Line 6, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 6, Col 15, Line 6, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -124,7 +124,7 @@ The type 'char' does not match the type 'byte'""") |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 7, Col 9, Line 7, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 8, Col 5, Line 8, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 8, Col 15, Line 8, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -136,7 +136,7 @@ The type 'char' does not match the type 'byte'""") |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 11, Col 13, Line 11, Col 16, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 12, Col 9, Line 12, Col 22, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 12, Col 19, Line 12, Col 22, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -196,7 +196,7 @@ module ExtendedFixedBindings = |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 5, Col 9, Line 5, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 6, Col 5, Line 6, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 6, Col 15, Line 6, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -209,7 +209,7 @@ module ExtendedFixedBindings = |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 5, Col 9, Line 5, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 6, Col 5, Line 6, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 6, Col 15, Line 6, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -222,7 +222,7 @@ module ExtendedFixedBindings = |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 5, Col 9, Line 5, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 6, Col 5, Line 6, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 6, Col 15, Line 6, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -237,7 +237,7 @@ module ExtendedFixedBindings = |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 8, Col 13, Line 8, Col 16, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 9, Col 9, Line 9, Col 22, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 9, Col 19, Line 9, Col 22, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -250,7 +250,7 @@ module ExtendedFixedBindings = |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 6, Col 9, Line 6, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 7, Col 5, Line 7, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 7, Col 15, Line 7, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] #if NETCOREAPP @@ -264,7 +264,7 @@ module ExtendedFixedBindings = |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 6, Col 9, Line 6, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 7, Col 5, Line 7, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 7, Col 15, Line 7, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] #endif @@ -291,7 +291,7 @@ module ExtendedFixedBindings = |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 9, Col 9, Line 9, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 10, Col 5, Line 10, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 10, Col 15, Line 10, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -304,7 +304,7 @@ module ExtendedFixedBindings = |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 9, Col 9, Line 9, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 10, Col 5, Line 10, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 10, Col 15, Line 10, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -317,7 +317,7 @@ module ExtendedFixedBindings = |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 13, Col 9, Line 13, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 14, Col 5, Line 14, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 14, Col 15, Line 14, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -356,7 +356,7 @@ module ExtendedFixedBindings = |> shouldSucceed |> withDiagnostics [ (Warning 9, Line 11, Col 9, Line 11, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 12, Col 5, Line 12, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 12, Col 15, Line 12, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] [] @@ -410,5 +410,5 @@ The type 'int' does not match the type 'char'") |> shouldFail |> withDiagnostics [ (Warning 9, Line 13, Col 9, Line 13, Col 12, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") - (Warning 9, Line 14, Col 5, Line 14, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") + (Warning 9, Line 14, Col 15, Line 14, Col 18, """Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'.""") ] diff --git a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableCsharpImportTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableCsharpImportTests.fs index d969afc538f..10718f84bc4 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableCsharpImportTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableCsharpImportTests.fs @@ -220,7 +220,7 @@ let ``Consumption of nullable C# - no generics, just strings in methods and fiel |> withDiagnostics [ Error 3261, Line 5, Col 40, Line 5, Col 85, "Nullness warning: The types 'string' and 'string | null' do not have compatible nullability." Error 3261, Line 5, Col 40, Line 5, Col 85, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." - Error 3261, Line 14, Col 34, Line 14, Col 62, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." + Error 3261, Line 14, Col 48, Line 14, Col 62, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." Error 3261, Line 16, Col 35, Line 16, Col 39, "Nullness warning: The type 'string' does not support 'null'." Error 3261, Line 25, Col 85, Line 25, Col 97, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." Error 3261, Line 28, Col 99, Line 28, Col 111, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." diff --git a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs index c36c51b3a15..04ac85be814 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs @@ -67,7 +67,7 @@ let main _args = |> withDiagnostics [ Error 3265, Line 8, Col 13, Line 8, Col 60, "Application of method 'Deserialize' attempted to create a nullable type ('T | null) for '{| x: int |}'. Nullness warnings won't be reported correctly for such types." Error 3265, Line 11, Col 13, Line 11, Col 50, "Application of method 'Deserialize' attempted to create a nullable type ('T | null) for '{| x: int |}'. Nullness warnings won't be reported correctly for such types." - Error 3261, Line 15, Col 14, Line 15, Col 17, "Nullness warning: The types 'R' and 'R | null' do not have compatible nullability."] + Error 3261, Line 15, Col 16, Line 15, Col 17, "Nullness warning: The types 'R' and 'R | null' do not have compatible nullability."] [] let ``Report warning when generic type instance creates a null-disallowed type`` () = @@ -1072,7 +1072,7 @@ myNullReturningFunction myValOfY |> ignore |> shouldFail |> withDiagnostics [Error 3261, Line 17, Col 25, Line 17, Col 34, "Nullness warning: The type 'string' does not support 'null'." - Error 193, Line 19, Col 26, Line 19, Col 45, "The type 'System.DateTime' does not have 'null' as a proper value" + Error 193, Line 19, Col 42, Line 19, Col 45, "The type 'System.DateTime' does not have 'null' as a proper value" Error 1, Line 20, Col 25, Line 20, Col 36, "The type '{| Anon: 'a |}' does not have 'null' as a proper value" Error 1, Line 21, Col 26, Line 21, Col 31, "The type ''a * 'b * 'c' does not have 'null' as a proper value" Error 1, Line 23, Col 25, Line 23, Col 33, "The type 'Y' does not have 'null' as a proper value"] @@ -1335,7 +1335,7 @@ let bar = foo |> Option.ofObj // Should produce FS3262, but did not |> asLibrary |> typeCheckWithStrictNullness |> shouldFail - |> withDiagnostics [Error 3262, Line 4, Col 18, Line 4, Col 30, "Value known to be without null passed to a function meant for nullables: You can create 'Some value' directly instead of 'ofObj', or consider not using an option for this value."] + |> withDiagnostics [Error 3262, Line 4, Col 25, Line 4, Col 30, "Value known to be without null passed to a function meant for nullables: You can create 'Some value' directly instead of 'ofObj', or consider not using an option for this value."] [] let ``Useless null check when used in multi piping`` () = @@ -1347,7 +1347,7 @@ let myFunc whateverArg = |> asLibrary |> typeCheckWithStrictNullness |> shouldFail - |> withDiagnostics [Error 3262, Line 4, Col 30, Line 4, Col 42, "Value known to be without null passed to a function meant for nullables: You can create 'Some value' directly instead of 'ofObj', or consider not using an option for this value."] + |> withDiagnostics [Error 3262, Line 4, Col 37, Line 4, Col 42, "Value known to be without null passed to a function meant for nullables: You can create 'Some value' directly instead of 'ofObj', or consider not using an option for this value."] [] let ``Useless null check when used in more exotic pipes`` () = @@ -1362,9 +1362,9 @@ let pointfree = intToint >> string >> Option.ofObj |> typeCheckWithStrictNullness |> shouldFail |> withDiagnostics - [ Error 3262, Line 3, Col 45, Line 3, Col 57, "Value known to be without null passed to a function meant for nullables: You can create 'Some value' directly instead of 'ofObj', or consider not using an option for this value." + [ Error 3262, Line 3, Col 52, Line 3, Col 57, "Value known to be without null passed to a function meant for nullables: You can create 'Some value' directly instead of 'ofObj', or consider not using an option for this value." Error 3262, Line 4, Col 60, Line 4, Col 61, "Value known to be without null passed to a function meant for nullables: You can create 'Some value' directly instead of 'ofObj', or consider not using an option for this value." - Error 3262, Line 6, Col 39, Line 6, Col 51, "Value known to be without null passed to a function meant for nullables: You can create 'Some value' directly instead of 'ofObj', or consider not using an option for this value."] + Error 3262, Line 6, Col 46, Line 6, Col 51, "Value known to be without null passed to a function meant for nullables: You can create 'Some value' directly instead of 'ofObj', or consider not using an option for this value."] [] let ``Regression: Useless usage in nested calls`` () = @@ -1813,7 +1813,7 @@ let ``Type extension not null constraint rejects nullable type arg at call site` |> typeCheckWithStrictNullness |> shouldFail |> withDiagnostics [ - Error 3261, Line 8, Col 47, Line 8, Col 60, "Nullness warning: The type 'string | null' supports 'null' but a non-null type is expected." + Error 3261, Line 8, Col 55, Line 8, Col 60, "Nullness warning: The type 'string | null' supports 'null' but a non-null type is expected." ] [] diff --git a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableRegressionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableRegressionTests.fs index a7ff6c2e89b..64c6151bdf3 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableRegressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableRegressionTests.fs @@ -42,7 +42,7 @@ let ``Signature conformance`` langVersion checknulls = |> compile |> shouldFail |> withDiagnostics - [Warning 3262, Line 18, Col 48, Line 18, Col 60, "Value known to be without null passed to a function meant for nullables: You can create 'Some value' directly instead of 'ofObj', or consider not using an option for this value." + [Warning 3262, Line 18, Col 55, Line 18, Col 60, "Value known to be without null passed to a function meant for nullables: You can create 'Some value' directly instead of 'ofObj', or consider not using an option for this value." (Warning 3261, Line 4, Col 5, Line 4, Col 10, "Nullness warning: Module 'M' contains val test2: x: (string | null) -> unit but its signature specifies diff --git a/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs index 085cbc3599e..f5f9be3a179 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs @@ -602,7 +602,7 @@ let c = Color.Red |> compile |> shouldFail |> withDiagnostics [ - (Error 101, Line 7, Col 9, Line 7, Col 18, "This construct is deprecated. Use B instead") + (Error 101, Line 7, Col 15, Line 7, Col 18, "This construct is deprecated. Use B instead") ] [] @@ -618,7 +618,7 @@ let c = Color.Red |> compile |> shouldFail |> withDiagnostics [ - (Warning 44, Line 7, Col 9, Line 7, Col 18, "This construct is deprecated. Use B instead") + (Warning 44, Line 7, Col 15, Line 7, Col 18, "This construct is deprecated. Use B instead") ] [] @@ -653,7 +653,7 @@ let c = Color.Red |> compile |> shouldFail |> withDiagnostics [ - (Error 101, Line 8, Col 9, Line 8, Col 18, "This construct is deprecated. Use B instead") + (Error 101, Line 8, Col 15, Line 8, Col 18, "This construct is deprecated. Use B instead") ] [] @@ -670,7 +670,7 @@ let c = Color.Red |> compile |> shouldFail |> withDiagnostics [ - (Warning 44, Line 8, Col 9, Line 8, Col 18, "This construct is deprecated. Use B instead") + (Warning 44, Line 8, Col 15, Line 8, Col 18, "This construct is deprecated. Use B instead") ] [] @@ -889,7 +889,7 @@ type ButtonExtensions = |> compile |> shouldFail |> withDiagnostics [ - (Error 101, Line 17, Col 9, Line 17, Col 19, "This construct is deprecated. Use B instead") + (Error 101, Line 17, Col 16, Line 17, Col 19, "This construct is deprecated. Use B instead") ] [] @@ -1332,10 +1332,10 @@ Class.ObsoleteEvent |> ignore |> compile |> shouldFail |> withDiagnostics [ - (Warning 44, Line 3, Col 1, Line 3, Col 20, "This construct is deprecated. Field is obsolete"); + (Warning 44, Line 3, Col 7, Line 3, Col 20, "This construct is deprecated. Field is obsolete"); (Warning 44, Line 4, Col 7, Line 4, Col 21, "This construct is deprecated. Method is obsolete"); (Warning 44, Line 5, Col 7, Line 5, Col 23, "This construct is deprecated. Property is obsolete") - (Warning 44, Line 6, Col 1, Line 6, Col 20, "This construct is deprecated. Event is obsolete") + (Warning 44, Line 6, Col 7, Line 6, Col 20, "This construct is deprecated. Event is obsolete") ] [] @@ -1371,10 +1371,10 @@ Class.ObsoleteEvent |> ignore |> compile |> shouldFail |> withDiagnostics [ - (Error 101, Line 3, Col 1, Line 3, Col 20, "This construct is deprecated. Field is obsolete"); + (Error 101, Line 3, Col 7, Line 3, Col 20, "This construct is deprecated. Field is obsolete"); (Error 101, Line 4, Col 7, Line 4, Col 21, "This construct is deprecated. Method is obsolete"); (Error 101, Line 5, Col 7, Line 5, Col 23, "This construct is deprecated. Property is obsolete") - (Error 101, Line 6, Col 1, Line 6, Col 20, "This construct is deprecated. Event is obsolete") + (Error 101, Line 6, Col 7, Line 6, Col 20, "This construct is deprecated. Event is obsolete") ] [] diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/E_NoChangeForEvent.fsx.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/E_NoChangeForEvent.fsx.err.bsl index 5a3d39e8aee..0fe4a182e92 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/E_NoChangeForEvent.fsx.err.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/E_NoChangeForEvent.fsx.err.bsl @@ -1,3 +1,3 @@ E_NoChangeForEvent.fsx (9,9)-(9,30) typecheck warning It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value -E_NoChangeForEvent.fsx (10,1)-(10,11) typecheck error This value is not a function and cannot be applied. It has type 'IEvent', which does not accept arguments. -E_NoChangeForEvent.fsx (18,1)-(18,11) typecheck error This value is not a function and cannot be applied. It has type 'IEvent', which does not accept arguments. \ No newline at end of file +E_NoChangeForEvent.fsx (10,3)-(10,11) typecheck error This value is not a function and cannot be applied. It has type 'IEvent', which does not accept arguments. +E_NoChangeForEvent.fsx (18,3)-(18,11) typecheck error This value is not a function and cannot be applied. It has type 'IEvent', which does not accept arguments. \ No newline at end of file diff --git a/tests/fsharp/Compiler/Language/StringInterpolation.fs b/tests/fsharp/Compiler/Language/StringInterpolation.fs index eade5119a44..e4f96546203 100644 --- a/tests/fsharp/Compiler/Language/StringInterpolation.fs +++ b/tests/fsharp/Compiler/Language/StringInterpolation.fs @@ -636,7 +636,7 @@ let xe = $"%A{{1}}" // fake expression (delimiters escaped) """ CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:8.0" |] code - [|(FSharpDiagnosticSeverity.Error, 1, (2, 19, 2, 38), + [|(FSharpDiagnosticSeverity.Error, 1, (2, 33, 2, 38), "The type 'string' is not compatible with any of the types byte,int16,int32,int64,sbyte,uint16,uint32,uint64,nativeint,unativeint, arising from the use of a printf-style format string"); (FSharpDiagnosticSeverity.Error, 1, (3, 19, 3, 20), """This expression was expected to have type diff --git a/tests/fsharp/Compiler/Libraries/Core/NativeInterop/StackallocTests.fs b/tests/fsharp/Compiler/Libraries/Core/NativeInterop/StackallocTests.fs index b01da9cd01e..e9fbacb389b 100644 --- a/tests/fsharp/Compiler/Libraries/Core/NativeInterop/StackallocTests.fs +++ b/tests/fsharp/Compiler/Libraries/Core/NativeInterop/StackallocTests.fs @@ -69,7 +69,7 @@ let _ = NativeInterop.NativePtr.stackalloc 1 """ FSharpDiagnosticSeverity.Error 1 - (4, 9, 4, 43) + (4, 33, 4, 43) "A generic construct requires that the type 'System.Object' is an unmanaged type" [] @@ -82,7 +82,7 @@ let _ = NativeInterop.NativePtr.stackalloc 1 """ FSharpDiagnosticSeverity.Error 1 - (4, 9, 4, 43) + (4, 33, 4, 43) "A generic construct requires that the type 'System.Collections.IEnumerable' is an unmanaged type" [] @@ -95,7 +95,7 @@ let _ = NativeInterop.NativePtr.stackalloc 1 """ FSharpDiagnosticSeverity.Error 1 - (4, 9, 4, 43) + (4, 33, 4, 43) "A generic construct requires that the type 'System.EventHandler' is an unmanaged type" [] @@ -149,7 +149,7 @@ let _ = NativeInterop.NativePtr.stackalloc 1 """ FSharpDiagnosticSeverity.Error 1 - (10, 9, 10, 43) + (10, 33, 10, 43) "A generic construct requires that the type 'C' is an unmanaged type" [] @@ -164,7 +164,7 @@ let _ = NativeInterop.NativePtr.stackalloc 1 """ FSharpDiagnosticSeverity.Error 1 - (6, 9, 6, 43) + (6, 33, 6, 43) "A generic construct requires that the type 'R' is an unmanaged type" [] diff --git a/tests/fsharp/core/auto-widen/preview/test.bsl b/tests/fsharp/core/auto-widen/preview/test.bsl index c17dc66908f..49696054a20 100644 --- a/tests/fsharp/core/auto-widen/preview/test.bsl +++ b/tests/fsharp/core/auto-widen/preview/test.bsl @@ -1,7 +1,7 @@ test.fsx(11,20,11,21): typecheck error FS3388: This expression implicitly converts type 'int' to type 'obj'. See https://aka.ms/fsharp-implicit-convs. -test.fsx(14,20,14,41): typecheck error FS3388: This expression implicitly converts type 'int' to type 'obj'. See https://aka.ms/fsharp-implicit-convs. +test.fsx(14,33,14,41): typecheck error FS3388: This expression implicitly converts type 'int' to type 'obj'. See https://aka.ms/fsharp-implicit-convs. test.fsx(20,21,20,24): typecheck error FS3388: This expression implicitly converts type 'int * int' to type 'obj'. See https://aka.ms/fsharp-implicit-convs. @@ -65,17 +65,17 @@ test.fsx(61,32,61,33): typecheck error FS3389: This expression uses a built-in i test.fsx(61,32,61,33): typecheck error FS3388: This expression implicitly converts type 'int' to type 'float'. See https://aka.ms/fsharp-implicit-convs. -test.fsx(63,22,63,43): typecheck error FS3389: This expression uses a built-in implicit conversion to convert type 'int' to type 'int64'. See https://aka.ms/fsharp-implicit-convs. +test.fsx(63,35,63,43): typecheck error FS3389: This expression uses a built-in implicit conversion to convert type 'int' to type 'int64'. See https://aka.ms/fsharp-implicit-convs. -test.fsx(63,22,63,43): typecheck error FS3388: This expression implicitly converts type 'int' to type 'int64'. See https://aka.ms/fsharp-implicit-convs. +test.fsx(63,35,63,43): typecheck error FS3388: This expression implicitly converts type 'int' to type 'int64'. See https://aka.ms/fsharp-implicit-convs. -test.fsx(64,28,64,49): typecheck error FS3389: This expression uses a built-in implicit conversion to convert type 'int' to type 'int64'. See https://aka.ms/fsharp-implicit-convs. +test.fsx(64,41,64,49): typecheck error FS3389: This expression uses a built-in implicit conversion to convert type 'int' to type 'int64'. See https://aka.ms/fsharp-implicit-convs. -test.fsx(64,28,64,49): typecheck error FS3388: This expression implicitly converts type 'int' to type 'int64'. See https://aka.ms/fsharp-implicit-convs. +test.fsx(64,41,64,49): typecheck error FS3388: This expression implicitly converts type 'int' to type 'int64'. See https://aka.ms/fsharp-implicit-convs. -test.fsx(64,50,64,71): typecheck error FS3389: This expression uses a built-in implicit conversion to convert type 'int' to type 'int64'. See https://aka.ms/fsharp-implicit-convs. +test.fsx(64,63,64,71): typecheck error FS3389: This expression uses a built-in implicit conversion to convert type 'int' to type 'int64'. See https://aka.ms/fsharp-implicit-convs. -test.fsx(64,50,64,71): typecheck error FS3388: This expression implicitly converts type 'int' to type 'int64'. See https://aka.ms/fsharp-implicit-convs. +test.fsx(64,63,64,71): typecheck error FS3388: This expression implicitly converts type 'int' to type 'int64'. See https://aka.ms/fsharp-implicit-convs. test.fsx(67,20,67,23): typecheck error FS3388: This expression implicitly converts type 'int' to type 'obj'. See https://aka.ms/fsharp-implicit-convs. @@ -251,7 +251,7 @@ test.fsx(258,30,258,38): typecheck error FS3388: This expression implicitly conv test.fsx(260,36,260,38): typecheck error FS3388: This expression implicitly converts type 'Numerics.BigInteger' to type 'IComparable'. See https://aka.ms/fsharp-implicit-convs. -test.fsx(263,44,263,63): typecheck error FS3388: This expression implicitly converts type 'string' to type 'IComparable'. See https://aka.ms/fsharp-implicit-convs. +test.fsx(263,58,263,63): typecheck error FS3388: This expression implicitly converts type 'string' to type 'IComparable'. See https://aka.ms/fsharp-implicit-convs. test.fsx(275,35,275,36): typecheck error FS3388: This expression implicitly converts type 'int' to type 'obj'. See https://aka.ms/fsharp-implicit-convs. diff --git a/tests/fsharp/core/quotesDebugInfo/test.fsx b/tests/fsharp/core/quotesDebugInfo/test.fsx index e2bdcd55ce3..201b1b1609c 100644 --- a/tests/fsharp/core/quotesDebugInfo/test.fsx +++ b/tests/fsharp/core/quotesDebugInfo/test.fsx @@ -463,7 +463,7 @@ let f : FSharpFunc`2 = in [DebugRange(452:12 - 452:36)] <{ [DebugRange(452:12 - 452:13)] <{ f }>( - [DebugRange(452:14 - 452:33)] <{ DefaultOf ( + [DebugRange(452:24 - 452:33)] <{ DefaultOf ( ) }> ) diff --git a/tests/fsharp/typeProviders/negTests/EVIL_PROVIDER_GetInvokerExpression_Exception.bsl b/tests/fsharp/typeProviders/negTests/EVIL_PROVIDER_GetInvokerExpression_Exception.bsl index 711a55cb552..d6c05ca27a6 100644 --- a/tests/fsharp/typeProviders/negTests/EVIL_PROVIDER_GetInvokerExpression_Exception.bsl +++ b/tests/fsharp/typeProviders/negTests/EVIL_PROVIDER_GetInvokerExpression_Exception.bsl @@ -1,2 +1,2 @@ -EVIL_PROVIDER_GetInvokerExpression_Exception.fsx(7,9,7,80): typecheck error FS3033: The type provider 'Provider.EvilProviderWhereApplyGetInvokerExpressionRaisesException' reported an error in the context of provided type 'FSharp.EvilProviderWhereGetInvokerExpressionRaisesException.TheType', member 'get_Foo'. The error: deliberate error for testing purposes +EVIL_PROVIDER_GetInvokerExpression_Exception.fsx(7,77,7,80): typecheck error FS3033: The type provider 'Provider.EvilProviderWhereApplyGetInvokerExpressionRaisesException' reported an error in the context of provided type 'FSharp.EvilProviderWhereGetInvokerExpressionRaisesException.TheType', member 'get_Foo'. The error: deliberate error for testing purposes diff --git a/tests/fsharp/typeProviders/negTests/EVIL_PROVIDER_GetInvokerExpression_Null.bsl b/tests/fsharp/typeProviders/negTests/EVIL_PROVIDER_GetInvokerExpression_Null.bsl index b2fc037734e..ef4ffbef3ec 100644 --- a/tests/fsharp/typeProviders/negTests/EVIL_PROVIDER_GetInvokerExpression_Null.bsl +++ b/tests/fsharp/typeProviders/negTests/EVIL_PROVIDER_GetInvokerExpression_Null.bsl @@ -1,2 +1,2 @@ -EVIL_PROVIDER_GetInvokerExpression_Null.fsx(7,9,7,76): typecheck error FS3056: Type provider 'Provider.EvilProviderWhereApplyGetInvokerExpressionReturnsNull' returned null from GetInvokerExpression. +EVIL_PROVIDER_GetInvokerExpression_Null.fsx(7,73,7,76): typecheck error FS3056: Type provider 'Provider.EvilProviderWhereApplyGetInvokerExpressionReturnsNull' returned null from GetInvokerExpression. diff --git a/tests/fsharp/typeProviders/negTests/InvalidInvokerExpression.bsl b/tests/fsharp/typeProviders/negTests/InvalidInvokerExpression.bsl index 1806dc3960b..4e3f4637650 100644 --- a/tests/fsharp/typeProviders/negTests/InvalidInvokerExpression.bsl +++ b/tests/fsharp/typeProviders/negTests/InvalidInvokerExpression.bsl @@ -1,2 +1,2 @@ -InvalidInvokerExpression.fsx(4,9,4,79): typecheck error FS3056: Type provider 'Provider.GoodProviderForNegativeTypeTests1' returned null from GetInvokerExpression. +InvalidInvokerExpression.fsx(4,58,4,79): typecheck error FS3056: Type provider 'Provider.GoodProviderForNegativeTypeTests1' returned null from GetInvokerExpression. diff --git a/tests/fsharp/typeProviders/negTests/neg1.bsl b/tests/fsharp/typeProviders/negTests/neg1.bsl index f4442e42b83..d6d6ed366a2 100644 --- a/tests/fsharp/typeProviders/negTests/neg1.bsl +++ b/tests/fsharp/typeProviders/negTests/neg1.bsl @@ -1,5 +1,5 @@ -neg1.fsx(3,18,3,70): typecheck error FS0193: Type constraint mismatch. The type +neg1.fsx(3,67,3,70): typecheck error FS0193: Type constraint mismatch. The type 'int' is not compatible with type 'string' diff --git a/tests/fsharp/typecheck/sigs/neg10.bsl b/tests/fsharp/typecheck/sigs/neg10.bsl index 1a0f32e060c..6a25f9107a2 100644 --- a/tests/fsharp/typecheck/sigs/neg10.bsl +++ b/tests/fsharp/typecheck/sigs/neg10.bsl @@ -122,29 +122,29 @@ neg10.fs(245,50,245,51): typecheck error FS0193: A type parameter is missing a c neg10.fs(245,17,245,20): typecheck error FS0043: A type parameter is missing a constraint 'when 'b :> C' -neg10.fs(251,49,251,61): typecheck error FS0001: The type ''a -> 'a' does not support the 'equality' constraint because it is a function type +neg10.fs(251,59,251,61): typecheck error FS0001: The type ''a -> 'a' does not support the 'equality' constraint because it is a function type -neg10.fs(252,45,252,57): typecheck error FS0001: The type ''a -> 'a' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface +neg10.fs(252,55,252,57): typecheck error FS0001: The type ''a -> 'a' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface -neg10.fs(253,36,253,48): typecheck error FS0001: The type ''a -> 'a' does not support the 'equality' constraint because it is a function type +neg10.fs(253,46,253,48): typecheck error FS0001: The type ''a -> 'a' does not support the 'equality' constraint because it is a function type neg10.fs(297,22,297,24): typecheck error FS1187: An indexer property must be given at least one argument neg10.fs(298,22,298,24): typecheck error FS1187: An indexer property must be given at least one argument -neg10.fs(299,17,299,24): typecheck error FS0807: Property 'S2' is not readable +neg10.fs(299,22,299,24): typecheck error FS0807: Property 'S2' is not readable -neg10.fs(300,17,300,24): typecheck error FS0807: Property 'S3' is not readable +neg10.fs(300,22,300,24): typecheck error FS0807: Property 'S3' is not readable -neg10.fs(301,17,301,24): typecheck error FS0807: Property 'S4' is not readable +neg10.fs(301,22,301,24): typecheck error FS0807: Property 'S4' is not readable -neg10.fs(303,17,303,22): typecheck error FS0807: Property 'SS2' is not readable +neg10.fs(303,19,303,22): typecheck error FS0807: Property 'SS2' is not readable -neg10.fs(304,17,304,22): typecheck error FS0807: Property 'SS3' is not readable +neg10.fs(304,19,304,22): typecheck error FS0807: Property 'SS3' is not readable -neg10.fs(305,17,305,22): typecheck error FS0807: Property 'SS4' is not readable +neg10.fs(305,19,305,22): typecheck error FS0807: Property 'SS4' is not readable -neg10.fs(316,17,316,28): typecheck error FS0807: Property 'X' is not readable +neg10.fs(316,27,316,28): typecheck error FS0807: Property 'X' is not readable neg10.fs(324,28,324,29): typecheck error FS1187: An indexer property must be given at least one argument diff --git a/tests/fsharp/typecheck/sigs/neg15.bsl b/tests/fsharp/typecheck/sigs/neg15.bsl index e82c0042d11..3961d631255 100644 --- a/tests/fsharp/typecheck/sigs/neg15.bsl +++ b/tests/fsharp/typecheck/sigs/neg15.bsl @@ -1,13 +1,13 @@ -neg15.fs(102,17,102,31): typecheck error FS1094: The value 'privateValue' is not accessible from this code location +neg15.fs(102,19,102,31): typecheck error FS1094: The value 'privateValue' is not accessible from this code location -neg15.fs(103,18,103,43): typecheck error FS1092: The type 'PrivateUnionType' is not accessible from this code location +neg15.fs(103,20,103,43): typecheck error FS1092: The type 'PrivateUnionType' is not accessible from this code location -neg15.fs(106,18,106,66): typecheck error FS1093: The union cases or fields of the type 'UnionTypeWithPrivateRepresentation' are not accessible from this code location +neg15.fs(106,20,106,66): typecheck error FS1093: The union cases or fields of the type 'UnionTypeWithPrivateRepresentation' are not accessible from this code location neg15.fs(107,17,107,41): typecheck error FS0491: The member or object constructor 'PrivateProperty' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. -neg15.fs(108,17,108,45): typecheck error FS0491: The member or object constructor 'PrivateStaticProperty' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. +neg15.fs(108,24,108,45): typecheck error FS0491: The member or object constructor 'PrivateStaticProperty' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. neg15.fs(109,17,109,41): typecheck error FS0491: The member or object constructor 'PrivateMethod' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. @@ -45,17 +45,17 @@ neg15.fs(183,1,183,5): typecheck error FS0491: The member or object constructor neg15.fs(184,1,184,7): typecheck error FS0491: The member or object constructor 'M' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. -neg15.fs(185,1,185,5): typecheck error FS0491: The member or object constructor 'SP' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. +neg15.fs(185,3,185,5): typecheck error FS0491: The member or object constructor 'SP' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. neg15.fs(186,1,186,7): typecheck error FS0491: The member or object constructor 'SM' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. -neg15.fs(187,1,187,6): typecheck error FS1096: The record, struct or class field 'f' is not accessible from this code location +neg15.fs(187,5,187,6): typecheck error FS1096: The record, struct or class field 'f' is not accessible from this code location neg15.fs(188,1,188,6): typecheck error FS0491: The member or object constructor 'P' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. neg15.fs(189,1,189,8): typecheck error FS0491: The member or object constructor 'M' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. -neg15.fs(190,1,190,6): typecheck error FS0491: The member or object constructor 'SP' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. +neg15.fs(190,4,190,6): typecheck error FS0491: The member or object constructor 'SP' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. neg15.fs(191,1,191,8): typecheck error FS0491: The member or object constructor 'SM' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. diff --git a/tests/fsharp/typecheck/sigs/neg17.bsl b/tests/fsharp/typecheck/sigs/neg17.bsl index c09ddb99bb8..189617a26ae 100644 --- a/tests/fsharp/typecheck/sigs/neg17.bsl +++ b/tests/fsharp/typecheck/sigs/neg17.bsl @@ -1,9 +1,9 @@ neg17.fs(84,17,84,33): typecheck error FS0292: The type definitions for type 'PrivateUnionType' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation -neg17b.fs(7,17,7,31): typecheck error FS1094: The value 'privateValue' is not accessible from this code location +neg17b.fs(7,19,7,31): typecheck error FS1094: The value 'privateValue' is not accessible from this code location -neg17b.fs(8,18,8,43): typecheck error FS1092: The type 'PrivateUnionType' is not accessible from this code location +neg17b.fs(8,20,8,43): typecheck error FS1092: The type 'PrivateUnionType' is not accessible from this code location neg17b.fs(11,26,11,41): typecheck error FS0039: The type 'Type' does not define a field, constructor, or member named 'PrivateProperty'. diff --git a/tests/fsharp/typecheck/sigs/neg37_a.bsl b/tests/fsharp/typecheck/sigs/neg37_a.bsl index b1657dda675..3e255b8e5d3 100644 --- a/tests/fsharp/typecheck/sigs/neg37_a.bsl +++ b/tests/fsharp/typecheck/sigs/neg37_a.bsl @@ -1,2 +1,2 @@ -neg37_a.fs(7,26,7,41): typecheck error FS3068: The function or member 'Bar' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is 'static member BBB.Bar: ('T -> unit)'. +neg37_a.fs(7,38,7,41): typecheck error FS3068: The function or member 'Bar' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is 'static member BBB.Bar: ('T -> unit)'. diff --git a/tests/fsharp/typecheck/sigs/neg56_a.bsl b/tests/fsharp/typecheck/sigs/neg56_a.bsl index 7d477679f7b..696fbe5e7cb 100644 --- a/tests/fsharp/typecheck/sigs/neg56_a.bsl +++ b/tests/fsharp/typecheck/sigs/neg56_a.bsl @@ -1,4 +1,4 @@ neg56_a.fs(11,35,11,47): typecheck error FS1125: The instantiation of the generic type 'list1' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. 'list1<_>'. -neg56_a.fs(15,18,15,33): typecheck error FS3068: The function or member 'toList' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is 'static member private list1.toList: ('a list1 -> 'a list)'. +neg56_a.fs(15,27,15,33): typecheck error FS3068: The function or member 'toList' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is 'static member private list1.toList: ('a list1 -> 'a list)'. diff --git a/tests/fsharp/typecheck/sigs/neg56_b.bsl b/tests/fsharp/typecheck/sigs/neg56_b.bsl index 4e844fe5979..ad0570908cc 100644 --- a/tests/fsharp/typecheck/sigs/neg56_b.bsl +++ b/tests/fsharp/typecheck/sigs/neg56_b.bsl @@ -3,6 +3,6 @@ neg56_b.fs(8,36,8,39): typecheck error FS3068: The function or member 'Inf' is u neg56_b.fs(15,37,15,40): typecheck error FS3068: The function or member 'Inf' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is 'static member Foo2.Inf: 'T ref'. -neg56_b.fs(26,13,26,23): typecheck error FS3068: The function or member 'Inf' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is 'static member private Foo.Inf: ('T list -> 'T list)'. +neg56_b.fs(26,20,26,23): typecheck error FS3068: The function or member 'Inf' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is 'static member private Foo.Inf: ('T list -> 'T list)'. -neg56_b.fs(36,13,36,23): typecheck error FS3068: The function or member 'Foo' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is 'static member private Qux.Foo: ('T list -> 'T list)'. +neg56_b.fs(36,20,36,23): typecheck error FS3068: The function or member 'Foo' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is 'static member private Qux.Foo: ('T list -> 'T list)'. diff --git a/tests/fsharp/typecheck/sigs/neg90.bsl b/tests/fsharp/typecheck/sigs/neg90.bsl index d04c6f2b059..7fc5ba3ede1 100644 --- a/tests/fsharp/typecheck/sigs/neg90.bsl +++ b/tests/fsharp/typecheck/sigs/neg90.bsl @@ -3,6 +3,6 @@ neg90.fs(4,9,4,12): typecheck error FS0001: A generic construct requires that th neg90.fs(7,22,7,25): typecheck error FS0039: The type 'foo' is not defined. -neg90.fs(16,9,16,21): typecheck error FS0035: This construct is deprecated: The union type for union case 'Member' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('DU') in the name you are using. +neg90.fs(16,15,16,21): typecheck error FS0035: This construct is deprecated: The union type for union case 'Member' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('DU') in the name you are using. neg90.fs(28,9,28,41): typecheck error FS0035: This construct is deprecated: The record type for the record field 'Field1' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('Record1') in the name you are using. diff --git a/tests/fsharp/typecheck/sigs/neg91.bsl b/tests/fsharp/typecheck/sigs/neg91.bsl index 8cb3e21f836..7ac51180563 100644 --- a/tests/fsharp/typecheck/sigs/neg91.bsl +++ b/tests/fsharp/typecheck/sigs/neg91.bsl @@ -3,13 +3,13 @@ neg91.fs(7,9,7,30): typecheck error FS0896: Enumerations cannot have members neg91.fs(10,10,10,15): typecheck error FS0956: Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. -neg91.fs(24,13,24,16): typecheck error FS1094: The value 'x' is not accessible from this code location +neg91.fs(24,15,24,16): typecheck error FS1094: The value 'x' is not accessible from this code location -neg91.fs(34,13,34,16): typecheck error FS0044: This construct is deprecated. Don't touch me +neg91.fs(34,15,34,16): typecheck error FS0044: This construct is deprecated. Don't touch me -neg91.fs(44,13,44,16): typecheck error FS3003: Don't touch me +neg91.fs(44,15,44,16): typecheck error FS3003: Don't touch me -neg91.fs(54,13,54,16): typecheck error FS0057: This construct is experimental. It was just an experiment!. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. +neg91.fs(54,15,54,16): typecheck error FS0057: This construct is experimental. It was just an experiment!. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. neg91.fs(63,11,63,27): typecheck error FS3191: This literal pattern does not take arguments diff --git a/tests/fsharp/typecheck/sigs/neg_byref_3.bsl b/tests/fsharp/typecheck/sigs/neg_byref_3.bsl index 549f4e523a4..01c5e23d3bd 100644 --- a/tests/fsharp/typecheck/sigs/neg_byref_3.bsl +++ b/tests/fsharp/typecheck/sigs/neg_byref_3.bsl @@ -3,8 +3,8 @@ neg_byref_3.fs(2,5,2,8): typecheck error FS0431: A byref typed value would be st neg_byref_3.fs(2,5,2,8): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. -neg_byref_3.fs(2,11,2,22): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. +neg_byref_3.fs(2,16,2,22): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. neg_byref_3.fs(3,5,3,6): typecheck error FS3301: The function or method has an invalid return type 'byref list -> int'. This is not permitted by the rules of Common IL. -neg_byref_3.fs(3,11,3,22): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. +neg_byref_3.fs(3,16,3,22): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. diff --git a/tests/fsharp/typecheck/sigs/neg_byref_4.bsl b/tests/fsharp/typecheck/sigs/neg_byref_4.bsl index 2fdf027ea71..50539092e90 100644 --- a/tests/fsharp/typecheck/sigs/neg_byref_4.bsl +++ b/tests/fsharp/typecheck/sigs/neg_byref_4.bsl @@ -1,4 +1,4 @@ -neg_byref_4.fs(4,11,4,29): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. +neg_byref_4.fs(4,27,4,29): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. -neg_byref_4.fs(5,11,5,29): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. +neg_byref_4.fs(5,27,5,29): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.