diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index 1ae2d315076..50a8c9481ec 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -821,7 +821,7 @@ let OutputPhasedErrorR (os: StringBuilder) (err: PhasedDiagnostic) (canSuggestNa let nameOrOneBasedIndexMessage = x.calledArg.NameOpt |> Option.map (fun n -> FSComp.SR.csOverloadCandidateNamedArgumentTypeMismatch n.idText) - |> Option.defaultValue (FSComp.SR.csOverloadCandidateIndexedArgumentTypeMismatch ((snd x.calledArg.Position) + 1)) + |> Option.defaultValue (FSComp.SR.csOverloadCandidateIndexedArgumentTypeMismatch ((Lib.vsnd x.calledArg.Position) + 1)) //snd sprintf " // %s" nameOrOneBasedIndexMessage | _ -> "" diff --git a/src/fsharp/MethodCalls.fs b/src/fsharp/MethodCalls.fs index 829e7b05562..ae37ef45b38 100644 --- a/src/fsharp/MethodCalls.fs +++ b/src/fsharp/MethodCalls.fs @@ -61,7 +61,7 @@ type CallerArg<'T> = /// Represents the information about an argument in the method being called type CalledArg = - { Position: (int * int) + { Position: struct (int * int) IsParamArray : bool OptArgInfo : OptionalArgInfo CallerInfo : CallerInfo @@ -303,7 +303,7 @@ let MakeCalledArgs amap m (minfo: MethInfo) minst = // Mark up the arguments with their position, so we can sort them back into order later let paramDatas = minfo.GetParamDatas(amap, m, minst) paramDatas |> List.mapiSquared (fun i j (ParamData(isParamArrayArg, isInArg, isOutArg, optArgInfo, callerInfoFlags, nmOpt, reflArgInfo, typeOfCalledArg)) -> - { Position=(i,j) + { Position=struct(i,j) IsParamArray=isParamArrayArg OptArgInfo=optArgInfo CallerInfo = callerInfoFlags diff --git a/src/fsharp/lib.fs b/src/fsharp/lib.fs index 596cd1a2f0a..5d8649d561f 100755 --- a/src/fsharp/lib.fs +++ b/src/fsharp/lib.fs @@ -564,3 +564,4 @@ type MaybeLazy<'T> = | Strict x -> x | Lazy x -> x.Force() +let inline vsnd ((_, y): struct('T * 'T)) = y \ No newline at end of file