diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index d5c2087765e..0d63d9ba1c4 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -1,5 +1,6 @@ ### Fixed +* Narrow 'No overloads match for method' error range to method name only instead of covering the entire expression. ([Issue #14284](https://github.com/dotnet/fsharp/issues/14284), [PR #19505](https://github.com/dotnet/fsharp/pull/19505)) * Fix DU case names matching IWSAM member names no longer cause duplicate property entries. (Issue [#14321](https://github.com/dotnet/fsharp/issues/14321), [PR #19341](https://github.com/dotnet/fsharp/pull/19341)) * Fix DefaultAugmentation(false) duplicate entry in method table. (Issue [#16565](https://github.com/dotnet/fsharp/issues/16565), [PR #19341](https://github.com/dotnet/fsharp/pull/19341)) * Fix abstract event accessors now have SpecialName flag. (Issue [#5834](https://github.com/dotnet/fsharp/issues/5834), [PR #19341](https://github.com/dotnet/fsharp/pull/19341)) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 635a0dff045..567979ad08a 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -10401,6 +10401,26 @@ and TcMethodApplication let result, errors = ResolveOverloadingForCall denv cenv.css mMethExpr methodName callerArgs ad postArgumentTypeCheckingCalledMethGroup true returnTy + // Narrow the error range for unresolved overloading from the whole expression (mMethExpr) + // to just the method name. For instance calls like T.Instance.Method(""), mItem covers + // the entire "T.Instance.Method" range, so we compute the method-name-only range from + // the end of mItem and the method name length. See https://github.com/dotnet/fsharp/issues/14284. + let errors = + match errors with + | ErrorResult(warns, UnresolvedOverloading(denvErr, callerArgsErr, failure, _mWide)) -> + let mMethodName = + let itemWidth = mItem.EndColumn - mItem.StartColumn + // Only narrow when the range is single-line and the method name fits within it. + // Generic constructors may have internal names longer than the source text + // (e.g., "ImmutableStack`1" vs source "ImmutableStack"). + if mItem.StartLine = mItem.EndLine && methodName.Length < itemWidth then + let startPos = mkPos mItem.EndLine (mItem.EndColumn - methodName.Length) + withStart startPos mItem + else + mItem + ErrorResult(warns, UnresolvedOverloading(denvErr, callerArgsErr, failure, mMethodName)) + | other -> other + match afterResolution, result with | AfterResolution.DoNothing, _ -> () diff --git a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/neg_invalid_constructor.fs.err.bsl b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/neg_invalid_constructor.fs.err.bsl index 960310bbe1c..aaeef693be3 100644 --- a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/neg_invalid_constructor.fs.err.bsl +++ b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/neg_invalid_constructor.fs.err.bsl @@ -1,18 +1,18 @@ -neg_invalid_constructor.fs (3,29)-(3,56) typecheck error A unique overload for method 'ImmutableStack`1' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_invalid_constructor.fs (3,29)-(3,43) typecheck error A unique overload for method 'ImmutableStack`1' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a list Candidates: - new: col: 'b -> ImmutableStack<'a> - private new: items: 'a list -> ImmutableStack<'a> -neg_invalid_constructor.fs (4,93)-(4,111) typecheck error A unique overload for method 'ImmutableStack`1' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_invalid_constructor.fs (4,93)-(4,107) typecheck error A unique overload for method 'ImmutableStack`1' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a list Candidates: - new: col: 'b -> ImmutableStack<'a> - private new: items: 'a list -> ImmutableStack<'a> -neg_invalid_constructor.fs (7,30)-(7,60) typecheck error A unique overload for method 'ImmutableStack`1' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_invalid_constructor.fs (7,30)-(7,44) typecheck error A unique overload for method 'ImmutableStack`1' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a list diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/OverloadResolutionErrorRangeTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/OverloadResolutionErrorRangeTests.fs new file mode 100644 index 00000000000..d8b188979f9 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/OverloadResolutionErrorRangeTests.fs @@ -0,0 +1,99 @@ +module ErrorMessages.OverloadResolutionErrorRangeTests + +open Xunit +open FSharp.Test.Compiler + +// https://github.com/dotnet/fsharp/issues/14284 +[] +let ``Issue 14284 - overload error should cover only method name, not full expression`` () = + FSharp + """ +type T() = + static member Instance = T() + + member _.Method(_: double) = () + member _.Method(_: int) = () + +T.Instance.Method("") + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ (Error 41, Line 8, Col 12, Line 8, Col 18, "No overloads match for method 'Method'. + +Known type of argument: string + +Available overloads: + - member T.Method: double -> unit // Argument at index 1 doesn't match + - member T.Method: int -> unit // Argument at index 1 doesn't match") ] + +// Verify that the error range is narrow also for simple direct method calls +[] +let ``Issue 14284 - overload error for simple static method`` () = + FSharp + """ +type T() = + static member Method(_: double) = () + static member Method(_: int) = () + +T.Method("") + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ (Error 41, Line 6, Col 3, Line 6, Col 9, "No overloads match for method 'Method'. + +Known type of argument: string + +Available overloads: + - static member T.Method: double -> unit // Argument at index 1 doesn't match + - static member T.Method: int -> unit // Argument at index 1 doesn't match") ] + +// Verify that a long expression before the method doesn't widen the error range +[] +let ``Issue 14284 - overload error on chained expression`` () = + FSharp + """ +type T() = + static member Instance = T() + + member _.Next = T() + member _.Method(_: double) = () + member _.Method(_: int) = () + +T.Instance.Next.Next.Method("") + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ (Error 41, Line 9, Col 22, Line 9, Col 28, "No overloads match for method 'Method'. + +Known type of argument: string + +Available overloads: + - member T.Method: double -> unit // Argument at index 1 doesn't match + - member T.Method: int -> unit // Argument at index 1 doesn't match") ] + +// Verify error range with lambda argument +[] +let ``Issue 14284 - overload error with lambda argument`` () = + FSharp + """ +type T() = + static member Instance = T() + + member _.Method(_: double) = () + member _.Method(_: int) = () + +T.Instance.Method(fun () -> "") + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ (Error 41, Line 8, Col 12, Line 8, Col 18, "No overloads match for method 'Method'. + +Known type of argument: (unit -> string) + +Available overloads: + - member T.Method: double -> unit // Argument at index 1 doesn't match + - member T.Method: int -> unit // Argument at index 1 doesn't match") ] diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index f5d1048408e..15ab7cf94b9 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -302,6 +302,7 @@ + diff --git a/tests/FSharp.Compiler.Service.Tests/TypeChecker/TypeCheckerRecoveryTests.fs b/tests/FSharp.Compiler.Service.Tests/TypeChecker/TypeCheckerRecoveryTests.fs index 3f9d13622e6..062ccbeb307 100644 --- a/tests/FSharp.Compiler.Service.Tests/TypeChecker/TypeCheckerRecoveryTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/TypeChecker/TypeCheckerRecoveryTests.fs @@ -39,7 +39,7 @@ Math.Max(a,) dumpDiagnosticNumbers checkResults |> shouldEqual [ "(4,10--4,11)", 3100 "(4,9--4,10)", 39 - "(4,0--4,12)", 41 + "(4,5--4,8)", 41 ] assertHasSymbolUsages ["Max"] checkResults diff --git a/tests/fsharp/Compiler/Language/TypeDirectedConversionTests.fs b/tests/fsharp/Compiler/Language/TypeDirectedConversionTests.fs index 37c8596d3e5..1200b79fcd2 100644 --- a/tests/fsharp/Compiler/Language/TypeDirectedConversionTests.fs +++ b/tests/fsharp/Compiler/Language/TypeDirectedConversionTests.fs @@ -329,7 +329,7 @@ let test2(x: 'T) = [| (FSharpDiagnosticSeverity.Error, 41, - (11, 5, 11, 11), + (11, 7, 11, 8), """A unique overload for method 'A' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'T @@ -341,7 +341,7 @@ Candidates: - static member M.A: n: int -> unit""") (FSharpDiagnosticSeverity.Error, 41, - (19, 5, 19, 12), + (19, 8, 19, 9), """A unique overload for method 'A' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'T @@ -368,7 +368,7 @@ let test(x: 'T) = """ FSharpDiagnosticSeverity.Error 41 - (10, 5, 10, 11) + (10, 7, 10, 8) """A unique overload for method 'A' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'T @@ -495,7 +495,7 @@ let test() = M.A(System.DateTime.UtcNow, 1) """ FSharpDiagnosticSeverity.Error 41 - (6, 14, 6, 44) + (6, 16, 6, 17) """A unique overload for method 'A' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: System.DateTime * int diff --git a/tests/fsharp/conformance/expressions/syntacticsugar/E_Slices01.bsl b/tests/fsharp/conformance/expressions/syntacticsugar/E_Slices01.bsl index 4f092ad8b6c..a4958da7f43 100644 --- a/tests/fsharp/conformance/expressions/syntacticsugar/E_Slices01.bsl +++ b/tests/fsharp/conformance/expressions/syntacticsugar/E_Slices01.bsl @@ -1,5 +1,5 @@ -E_Slices01.fsx(15,9,15,19): typecheck error FS0041: A unique overload for method 'GetSlice' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_Slices01.fsx(15,11,15,19): typecheck error FS0041: A unique overload for method 'GetSlice' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: int * int option * 'a option @@ -15,7 +15,7 @@ Candidates: - member Foo.GetSlice: x: int * y1: int option * y2: float option -> unit - member Foo.GetSlice: x: int * y1: int option * y2: int option -> unit -E_Slices01.fsx(17,9,17,19): typecheck error FS0041: A unique overload for method 'GetSlice' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_Slices01.fsx(17,11,17,19): typecheck error FS0041: A unique overload for method 'GetSlice' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a option * int option * int diff --git a/tests/fsharp/conformance/expressions/type-relatedexpressions/E_RigidTypeAnnotation03.bsl b/tests/fsharp/conformance/expressions/type-relatedexpressions/E_RigidTypeAnnotation03.bsl index 974190e66a3..d66e4829247 100644 --- a/tests/fsharp/conformance/expressions/type-relatedexpressions/E_RigidTypeAnnotation03.bsl +++ b/tests/fsharp/conformance/expressions/type-relatedexpressions/E_RigidTypeAnnotation03.bsl @@ -4,7 +4,7 @@ E_RigidTypeAnnotation03.fsx(17,13,17,16): typecheck error FS0001: This expressio but here has type 'byte' -E_RigidTypeAnnotation03.fsx(17,9,17,25): typecheck error FS0041: No overloads match for method 'M'. +E_RigidTypeAnnotation03.fsx(17,11,17,12): typecheck error FS0041: No overloads match for method 'M'. Known type of argument: sbyte @@ -20,7 +20,7 @@ E_RigidTypeAnnotation03.fsx(18,13,18,19): typecheck error FS0001: This expressio but here has type 'float<'u>' -E_RigidTypeAnnotation03.fsx(18,9,18,30): typecheck error FS0041: No overloads match for method 'M'. +E_RigidTypeAnnotation03.fsx(18,11,18,12): typecheck error FS0041: No overloads match for method 'M'. Known type of argument: float32 @@ -42,7 +42,7 @@ but given a 'decimal' The unit of measure 'N s ^ 2' does not match the unit of measure 'Kg' -E_RigidTypeAnnotation03.fsx(20,9,20,39): typecheck error FS0041: No overloads match for method 'M'. +E_RigidTypeAnnotation03.fsx(20,11,20,12): typecheck error FS0041: No overloads match for method 'M'. Known type of argument: decimal @@ -58,7 +58,7 @@ E_RigidTypeAnnotation03.fsx(21,14,21,18): typecheck error FS0001: This expressio but here has type 'string' -E_RigidTypeAnnotation03.fsx(21,9,21,27): typecheck error FS0041: No overloads match for method 'M'. +E_RigidTypeAnnotation03.fsx(21,11,21,12): typecheck error FS0041: No overloads match for method 'M'. Known type of argument: char diff --git a/tests/fsharp/conformance/inference/E_LeftToRightOverloadResolution01.bsl b/tests/fsharp/conformance/inference/E_LeftToRightOverloadResolution01.bsl index 8d60e94af11..bd02bbc2d1f 100644 --- a/tests/fsharp/conformance/inference/E_LeftToRightOverloadResolution01.bsl +++ b/tests/fsharp/conformance/inference/E_LeftToRightOverloadResolution01.bsl @@ -1,5 +1,5 @@ -E_LeftToRightOverloadResolution01.fsx(7,23,7,51): typecheck error FS0041: A unique overload for method 'WriteLine' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_LeftToRightOverloadResolution01.fsx(7,38,7,47): typecheck error FS0041: A unique overload for method 'WriteLine' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a @@ -18,7 +18,7 @@ Candidates: - System.Console.WriteLine(value: uint32) : unit - System.Console.WriteLine(value: uint64) : unit -E_LeftToRightOverloadResolution01.fsx(9,23,9,51): typecheck error FS0041: A unique overload for method 'WriteLine' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_LeftToRightOverloadResolution01.fsx(9,38,9,47): typecheck error FS0041: A unique overload for method 'WriteLine' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a diff --git a/tests/fsharp/conformance/inference/E_OneTypeVariable03.bsl b/tests/fsharp/conformance/inference/E_OneTypeVariable03.bsl index e46f1757896..8b9f6640f19 100644 --- a/tests/fsharp/conformance/inference/E_OneTypeVariable03.bsl +++ b/tests/fsharp/conformance/inference/E_OneTypeVariable03.bsl @@ -1,5 +1,5 @@ -E_OneTypeVariable03.fsx(60,34,60,44): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_OneTypeVariable03.fsx(60,38,60,39): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * int @@ -7,7 +7,7 @@ Candidates: - static member C23.M: x: 'a * y: 'b -> Two - static member C23.M: x: 'a * y: int -> Three -E_OneTypeVariable03.fsx(61,34,61,45): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_OneTypeVariable03.fsx(61,39,61,40): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * int diff --git a/tests/fsharp/conformance/inference/E_OneTypeVariable03rec.bsl b/tests/fsharp/conformance/inference/E_OneTypeVariable03rec.bsl index 3da07112f80..3151e03e1e0 100644 --- a/tests/fsharp/conformance/inference/E_OneTypeVariable03rec.bsl +++ b/tests/fsharp/conformance/inference/E_OneTypeVariable03rec.bsl @@ -1,5 +1,5 @@ -E_OneTypeVariable03rec.fsx(60,38,60,48): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_OneTypeVariable03rec.fsx(60,42,60,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * int @@ -7,7 +7,7 @@ Candidates: - static member C23.M: x: 'a * y: 'b -> Two - static member C23.M: x: 'a * y: int -> Three -E_OneTypeVariable03rec.fsx(61,38,61,49): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_OneTypeVariable03rec.fsx(61,43,61,44): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * int diff --git a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01.bsl b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01.bsl index bef5539b00a..10104a9f79f 100644 --- a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01.bsl +++ b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01.bsl @@ -1,5 +1,5 @@ -E_TwoDifferentTypeVariables01.fsx(61,33,61,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01.fsx(61,37,61,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -7,7 +7,7 @@ Candidates: - static member C13.M: x: 'a * y: 'a -> One - static member C13.M: x: 'a * y: int -> Three -E_TwoDifferentTypeVariables01.fsx(62,33,62,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01.fsx(62,37,62,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -15,7 +15,7 @@ Candidates: - static member C24.M: x: 'a * y: 'b -> Two - static member C24.M: x: 'a * y: C -> Four -E_TwoDifferentTypeVariables01.fsx(63,33,63,47): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01.fsx(63,37,63,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -23,7 +23,7 @@ Candidates: - static member C13.M: x: 'a * y: 'a -> One - static member C13.M: x: 'a * y: int -> Three -E_TwoDifferentTypeVariables01.fsx(64,33,64,46): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01.fsx(64,37,64,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b diff --git a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01rec.bsl b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01rec.bsl index c00efb90a64..290833eef43 100644 --- a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01rec.bsl +++ b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01rec.bsl @@ -1,5 +1,5 @@ -E_TwoDifferentTypeVariables01rec.fsx(60,37,60,47): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01rec.fsx(60,41,60,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -7,7 +7,7 @@ Candidates: - static member C13.M: x: 'a * y: 'a -> One - static member C13.M: x: 'a * y: int -> Three -E_TwoDifferentTypeVariables01rec.fsx(61,37,61,47): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01rec.fsx(61,41,61,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -15,7 +15,7 @@ Candidates: - static member C24.M: x: 'a * y: 'b -> Two - static member C24.M: x: 'a * y: C -> Four -E_TwoDifferentTypeVariables01rec.fsx(62,37,62,51): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01rec.fsx(62,41,62,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -23,7 +23,7 @@ Candidates: - static member C13.M: x: 'a * y: 'a -> One - static member C13.M: x: 'a * y: int -> Three -E_TwoDifferentTypeVariables01rec.fsx(63,37,63,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01rec.fsx(63,41,63,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b diff --git a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00.bsl b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00.bsl index 9d9d4a60369..9795de8e8a4 100644 --- a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00.bsl +++ b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00.bsl @@ -9,7 +9,7 @@ E_TwoDifferentTypeVariablesGen00.fsx(62,52,62,53): typecheck error FS0064: This E_TwoDifferentTypeVariablesGen00.fsx(62,18,62,21): typecheck error FS0043: The type ''b' does not match the type 'int' -E_TwoDifferentTypeVariablesGen00.fsx(63,45,63,55): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariablesGen00.fsx(63,49,63,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -29,7 +29,7 @@ E_TwoDifferentTypeVariablesGen00.fsx(65,56,65,57): typecheck error FS0064: This E_TwoDifferentTypeVariablesGen00.fsx(65,18,65,21): typecheck error FS0043: The type ''a' does not match the type 'int' -E_TwoDifferentTypeVariablesGen00.fsx(66,45,66,59): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariablesGen00.fsx(66,49,66,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -43,7 +43,7 @@ E_TwoDifferentTypeVariablesGen00.fsx(67,18,67,21): typecheck error FS0064: This E_TwoDifferentTypeVariablesGen00.fsx(67,18,67,21): typecheck error FS0043: The type ''b' does not match the type ''b0' -E_TwoDifferentTypeVariablesGen00.fsx(68,45,68,58): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariablesGen00.fsx(68,49,68,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b diff --git a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00rec.bsl b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00rec.bsl index 99d338ef47a..ea33553fa7e 100644 --- a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00rec.bsl +++ b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00rec.bsl @@ -9,7 +9,7 @@ E_TwoDifferentTypeVariablesGen00rec.fsx(62,52,62,53): typecheck error FS0064: Th E_TwoDifferentTypeVariablesGen00rec.fsx(62,18,62,21): typecheck error FS0043: The type ''b' does not match the type 'int' -E_TwoDifferentTypeVariablesGen00rec.fsx(63,45,63,55): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariablesGen00rec.fsx(63,49,63,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -29,7 +29,7 @@ E_TwoDifferentTypeVariablesGen00rec.fsx(65,56,65,57): typecheck error FS0064: Th E_TwoDifferentTypeVariablesGen00rec.fsx(65,18,65,21): typecheck error FS0043: The type ''a' does not match the type 'int' -E_TwoDifferentTypeVariablesGen00rec.fsx(66,45,66,59): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariablesGen00rec.fsx(66,49,66,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -43,7 +43,7 @@ E_TwoDifferentTypeVariablesGen00rec.fsx(67,18,67,21): typecheck error FS0064: Th E_TwoDifferentTypeVariablesGen00rec.fsx(67,18,67,21): typecheck error FS0043: The type ''b' does not match the type ''b0' -E_TwoDifferentTypeVariablesGen00rec.fsx(68,45,68,58): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariablesGen00rec.fsx(68,49,68,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b diff --git a/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02.bsl b/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02.bsl index d9df255dd5a..be71d64c0e3 100644 --- a/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02.bsl +++ b/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02.bsl @@ -1,5 +1,5 @@ -E_TwoEqualTypeVariables02.fsx(61,33,61,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02.fsx(61,37,61,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -7,7 +7,7 @@ Candidates: - static member C12.M: x: 'a * y: 'a -> One - static member C12.M: x: 'a * y: 'b -> Two -E_TwoEqualTypeVariables02.fsx(62,33,62,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02.fsx(62,37,62,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -15,7 +15,7 @@ Candidates: - static member C14.M: x: 'a * y: 'a -> One - static member C14.M: x: 'a * y: C -> Four -E_TwoEqualTypeVariables02.fsx(63,33,63,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02.fsx(63,37,63,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -23,7 +23,7 @@ Candidates: - static member C24.M: x: 'a * y: 'b -> Two - static member C24.M: x: 'a * y: C -> Four -E_TwoEqualTypeVariables02.fsx(64,33,64,44): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02.fsx(64,38,64,39): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -32,7 +32,7 @@ Candidates: - static member C123.M: x: 'a * y: 'b -> Two - static member C123.M: x: 'a * y: int -> Three -E_TwoEqualTypeVariables02.fsx(65,33,65,45): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02.fsx(65,39,65,40): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -42,7 +42,7 @@ Candidates: - static member C1234.M: x: 'a * y: C -> Four - static member C1234.M: x: 'a * y: int -> Three -E_TwoEqualTypeVariables02.fsx(66,33,66,46): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02.fsx(66,37,66,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a diff --git a/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02rec.bsl b/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02rec.bsl index 9380c2906a8..e1caf5a7791 100644 --- a/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02rec.bsl +++ b/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02rec.bsl @@ -1,5 +1,5 @@ -E_TwoEqualTypeVariables02rec.fsx(60,37,60,47): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02rec.fsx(60,41,60,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -7,7 +7,7 @@ Candidates: - static member C12.M: x: 'a * y: 'a -> One - static member C12.M: x: 'a * y: 'b -> Two -E_TwoEqualTypeVariables02rec.fsx(61,37,61,47): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02rec.fsx(61,41,61,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -15,7 +15,7 @@ Candidates: - static member C14.M: x: 'a * y: 'a -> One - static member C14.M: x: 'a * y: C -> Four -E_TwoEqualTypeVariables02rec.fsx(62,37,62,47): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02rec.fsx(62,41,62,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -23,7 +23,7 @@ Candidates: - static member C24.M: x: 'a * y: 'b -> Two - static member C24.M: x: 'a * y: C -> Four -E_TwoEqualTypeVariables02rec.fsx(63,37,63,48): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02rec.fsx(63,42,63,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -32,7 +32,7 @@ Candidates: - static member C123.M: x: 'a * y: 'b -> Two - static member C123.M: x: 'a * y: int -> Three -E_TwoEqualTypeVariables02rec.fsx(64,37,64,49): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02rec.fsx(64,43,64,44): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -42,7 +42,7 @@ Candidates: - static member C1234.M: x: 'a * y: C -> Four - static member C1234.M: x: 'a * y: int -> Three -E_TwoEqualTypeVariables02rec.fsx(65,37,65,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02rec.fsx(65,41,65,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a diff --git a/tests/fsharp/conformance/lexicalanalysis/E_LessThanDotOpenParen001.bsl b/tests/fsharp/conformance/lexicalanalysis/E_LessThanDotOpenParen001.bsl index 07d69bc5277..0b076cf0e3a 100644 --- a/tests/fsharp/conformance/lexicalanalysis/E_LessThanDotOpenParen001.bsl +++ b/tests/fsharp/conformance/lexicalanalysis/E_LessThanDotOpenParen001.bsl @@ -11,7 +11,7 @@ Available overloads: - static member TestType.(+++) : a: TestType<'T,'S> * b: ('T -> 'S) -> 'T // Argument 'a' doesn't match - static member TestType.(+++) : a: TestType<'T,'S> * b: TestType<'T,'S> -> 'T // Argument 'a' doesn't match -E_LessThanDotOpenParen001.fsx(25,10,25,45): typecheck error FS0041: No overloads match for method 'op_PlusPlusPlus'. +E_LessThanDotOpenParen001.fsx(25,22,25,37): typecheck error FS0041: No overloads match for method 'op_PlusPlusPlus'. Known types of arguments: (string -> int) * TestType @@ -21,7 +21,7 @@ Available overloads: - static member TestType.(+++) : a: TestType<'T,'S> * b: ('T -> 'S) -> 'T // Argument 'a' doesn't match - static member TestType.(+++) : a: TestType<'T,'S> * b: TestType<'T,'S> -> 'T // Argument 'a' doesn't match -E_LessThanDotOpenParen001.fsx(26,10,26,68): typecheck error FS0041: No overloads match for method 'op_PlusPlusPlus'. +E_LessThanDotOpenParen001.fsx(26,22,26,37): typecheck error FS0041: No overloads match for method 'op_PlusPlusPlus'. Known types of arguments: (string -> int) * TestType diff --git a/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass01.bsl b/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass01.bsl index d19330fa22b..d91fe957a84 100644 --- a/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass01.bsl +++ b/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass01.bsl @@ -1,5 +1,5 @@ -E_Clashing_Values_in_AbstractClass01.fsx(22,11,22,16): typecheck error FS0041: A unique overload for method 'X' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_Clashing_Values_in_AbstractClass01.fsx(22,13,22,14): typecheck error FS0041: A unique overload for method 'X' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates: - member Q.X: unit -> decimal - member Q.X: unit -> float diff --git a/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass03.bsl b/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass03.bsl index 756341cd472..db26a73d948 100644 --- a/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass03.bsl +++ b/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass03.bsl @@ -1,5 +1,5 @@ -E_Clashing_Values_in_AbstractClass03.fsx(16,18,16,25): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_Clashing_Values_in_AbstractClass03.fsx(16,21,16,22): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: int @@ -7,7 +7,7 @@ Candidates: - abstract D.M: 'T -> int - abstract D.M: 'U -> string -E_Clashing_Values_in_AbstractClass03.fsx(17,18,17,25): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_Clashing_Values_in_AbstractClass03.fsx(17,21,17,22): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: int diff --git a/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass04.bsl b/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass04.bsl index 89195ec2cc3..5c6906bf787 100644 --- a/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass04.bsl +++ b/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass04.bsl @@ -1,5 +1,5 @@ -E_Clashing_Values_in_AbstractClass04.fsx(16,18,16,25): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_Clashing_Values_in_AbstractClass04.fsx(16,21,16,22): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: int @@ -7,7 +7,7 @@ Candidates: - abstract D.M: 'T -> int - abstract D.M: 'U -> string -E_Clashing_Values_in_AbstractClass04.fsx(17,18,17,25): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_Clashing_Values_in_AbstractClass04.fsx(17,21,17,22): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: int diff --git a/tests/fsharp/core/fsfromfsviacs/compilation.errors.output.bsl b/tests/fsharp/core/fsfromfsviacs/compilation.errors.output.bsl index 4c76cf6f127..14c9a504c56 100644 --- a/tests/fsharp/core/fsfromfsviacs/compilation.errors.output.bsl +++ b/tests/fsharp/core/fsfromfsviacs/compilation.errors.output.bsl @@ -1,10 +1,10 @@ -test.fsx(216,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(216,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(217,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(217,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: x: int @@ -12,7 +12,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(218,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(218,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: y: string @@ -20,7 +20,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(219,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(219,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: x: int option @@ -28,7 +28,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(220,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(220,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: y: string option @@ -36,7 +36,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(221,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(221,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: x: 'a option @@ -44,7 +44,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(222,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(222,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: y: 'a option @@ -52,7 +52,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(223,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(223,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: 'a option @@ -60,7 +60,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(226,42): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(226,52): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a0 @@ -68,12 +68,12 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(228,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(228,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(229,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(229,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: y: string @@ -81,7 +81,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(230,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(230,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: Nullable @@ -89,7 +89,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(231,36): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(231,46): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: float @@ -97,7 +97,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(232,36): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(232,46): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: float option @@ -105,7 +105,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(233,36): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(233,46): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: x: 'a option @@ -113,7 +113,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(234,36): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(234,46): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: 'a option @@ -121,7 +121,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(236,43): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(236,53): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a0 @@ -129,12 +129,12 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(238,34): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(238,44): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(239,34): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(239,44): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: y: string @@ -142,7 +142,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(240,33): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(240,43): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: float @@ -150,7 +150,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(241,34): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(241,44): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: Nullable @@ -158,7 +158,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(242,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(242,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: float @@ -166,7 +166,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(243,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(243,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: float option @@ -174,7 +174,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(244,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(244,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: x: 'a option @@ -182,7 +182,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(245,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(245,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: 'a option @@ -190,7 +190,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(246,42): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(246,52): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a0 @@ -200,7 +200,7 @@ Candidates: test.fsx(248,93): error FS0691: Named arguments must appear after all other arguments -test.fsx(249,88): error FS0041: A unique overload for method 'OverloadedMethodTakingNullables' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(249,98): error FS0041: A unique overload for method 'OverloadedMethodTakingNullables' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: Nullable<'a> * string * Nullable<'b> when 'a: (new: unit -> 'a) and 'a: struct and 'a :> ValueType and 'b: (new: unit -> 'b) and 'b: struct and 'b :> ValueType diff --git a/tests/fsharp/typecheck/overloads/neg_System.Convert.ToString.OverloadList.bsl b/tests/fsharp/typecheck/overloads/neg_System.Convert.ToString.OverloadList.bsl index 090ddf39205..abfd96c8d9c 100644 --- a/tests/fsharp/typecheck/overloads/neg_System.Convert.ToString.OverloadList.bsl +++ b/tests/fsharp/typecheck/overloads/neg_System.Convert.ToString.OverloadList.bsl @@ -1,5 +1,5 @@ -neg_System.Convert.ToString.OverloadList.fsx(1,1,1,31): typecheck error FS0041: No overloads match for method 'ToString'. +neg_System.Convert.ToString.OverloadList.fsx(1,16,1,24): typecheck error FS0041: No overloads match for method 'ToString'. Known types of arguments: char * int @@ -25,7 +25,7 @@ Available overloads: - System.Convert.ToString(value: uint32, provider: System.IFormatProvider) : string // Argument 'value' doesn't match - System.Convert.ToString(value: uint64, provider: System.IFormatProvider) : string // Argument 'value' doesn't match -neg_System.Convert.ToString.OverloadList.fsx(2,1,2,47): typecheck error FS0041: No overloads match for method 'ToString'. +neg_System.Convert.ToString.OverloadList.fsx(2,16,2,24): typecheck error FS0041: No overloads match for method 'ToString'. Known types of arguments: provider: char * value: int diff --git a/tests/fsharp/typecheck/overloads/neg_System.Drawing.Graphics.DrawRectangleOverloadList.bsl b/tests/fsharp/typecheck/overloads/neg_System.Drawing.Graphics.DrawRectangleOverloadList.bsl index cfa6d36b91b..e132b8605c2 100644 --- a/tests/fsharp/typecheck/overloads/neg_System.Drawing.Graphics.DrawRectangleOverloadList.bsl +++ b/tests/fsharp/typecheck/overloads/neg_System.Drawing.Graphics.DrawRectangleOverloadList.bsl @@ -1,5 +1,5 @@ -neg_System.Drawing.Graphics.DrawRectangleOverloadList.fsx(9,1,9,31): typecheck error FS0041: No overloads match for method 'DrawRectangle'. +neg_System.Drawing.Graphics.DrawRectangleOverloadList.fsx(9,3,9,16): typecheck error FS0041: No overloads match for method 'DrawRectangle'. Known types of arguments: Pen * float32 * float32 * float32 * int @@ -7,7 +7,7 @@ Available overloads: - Graphics.DrawRectangle(pen: Pen, x: float32, y: float32, width: float32, height: float32) : unit // Argument 'height' doesn't match - Graphics.DrawRectangle(pen: Pen, x: int, y: int, width: int, height: int) : unit // Argument 'x' doesn't match -neg_System.Drawing.Graphics.DrawRectangleOverloadList.fsx(10,1,10,32): typecheck error FS0041: No overloads match for method 'DrawRectangle'. +neg_System.Drawing.Graphics.DrawRectangleOverloadList.fsx(10,3,10,16): typecheck error FS0041: No overloads match for method 'DrawRectangle'. Known types of arguments: Pen * int * float32 * float32 * decimal diff --git a/tests/fsharp/typecheck/overloads/neg_System.Threading.Tasks.Task.Run.OverloadList.bsl b/tests/fsharp/typecheck/overloads/neg_System.Threading.Tasks.Task.Run.OverloadList.bsl index c004363a8f2..8070f43bad8 100644 --- a/tests/fsharp/typecheck/overloads/neg_System.Threading.Tasks.Task.Run.OverloadList.bsl +++ b/tests/fsharp/typecheck/overloads/neg_System.Threading.Tasks.Task.Run.OverloadList.bsl @@ -1,5 +1,5 @@ -neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(5,11,5,35): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(5,16,5,19): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: (unit -> Task) @@ -7,7 +7,7 @@ Candidates: - Task.Run<'TResult>(``function`` : Func<'TResult>) : Task<'TResult> - Task.Run<'TResult>(``function`` : Func>) : Task<'TResult> -neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(6,11,6,44): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(6,16,6,19): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: Func> @@ -15,7 +15,7 @@ Candidates: - Task.Run<'TResult>(``function`` : Func<'TResult>) : Task<'TResult> - Task.Run<'TResult>(``function`` : Func>) : Task<'TResult> -neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(7,11,7,47): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(7,16,7,19): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: Func> @@ -23,7 +23,7 @@ Candidates: - Task.Run<'TResult>(``function`` : Func<'TResult>) : Task<'TResult> - Task.Run<'TResult>(``function`` : Func>) : Task<'TResult> -neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(8,21,8,57): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(8,26,8,29): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: Func> @@ -31,7 +31,7 @@ Candidates: - Task.Run<'TResult>(``function`` : Func<'TResult>) : Task<'TResult> - Task.Run<'TResult>(``function`` : Func>) : Task<'TResult> -neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(9,11,9,50): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(9,16,9,19): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: Func> @@ -39,7 +39,7 @@ Candidates: - Task.Run<'TResult>(``function`` : Func<'TResult>) : Task<'TResult> - Task.Run<'TResult>(``function`` : Func>) : Task<'TResult> -neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(10,11,10,52): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(10,16,10,19): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: Func> diff --git a/tests/fsharp/typecheck/overloads/neg_generic_known_argument_types.bsl b/tests/fsharp/typecheck/overloads/neg_generic_known_argument_types.bsl index 4b256a7c3b8..bd298dbb742 100644 --- a/tests/fsharp/typecheck/overloads/neg_generic_known_argument_types.bsl +++ b/tests/fsharp/typecheck/overloads/neg_generic_known_argument_types.bsl @@ -1,5 +1,5 @@ -neg_generic_known_argument_types.fsx(9,16,9,49): typecheck error FS0041: A unique overload for method 'Foo' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_generic_known_argument_types.fsx(9,23,9,26): typecheck error FS0041: A unique overload for method 'Foo' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: ^fa * 'fb * 'a * argD: 'c when ^fa: (member X: ^b -> ^b) and ^b: (member BBBB: unit -> unit) diff --git a/tests/fsharp/typecheck/overloads/neg_interface_generics.bsl b/tests/fsharp/typecheck/overloads/neg_interface_generics.bsl index 8cb798d4fa7..c31ed3d0041 100644 --- a/tests/fsharp/typecheck/overloads/neg_interface_generics.bsl +++ b/tests/fsharp/typecheck/overloads/neg_interface_generics.bsl @@ -1,7 +1,7 @@ neg_interface_generics.fsx(14,1,18,2): typecheck error FS0505: The member or object constructor 'Foo' does not take 13073 argument(s). An overload was found taking 1 arguments. -neg_interface_generics.fsx(20,9,20,27): typecheck error FS0041: No overloads match for method 'Foo'. +neg_interface_generics.fsx(20,13,20,16): typecheck error FS0041: No overloads match for method 'Foo'. Known types of arguments: string * XmlReader diff --git a/tests/fsharp/typecheck/overloads/neg_many_many_overloads.bsl b/tests/fsharp/typecheck/overloads/neg_many_many_overloads.bsl index c37fa993868..2563c0c3843 100644 --- a/tests/fsharp/typecheck/overloads/neg_many_many_overloads.bsl +++ b/tests/fsharp/typecheck/overloads/neg_many_many_overloads.bsl @@ -1,5 +1,5 @@ -neg_many_many_overloads.fsx(123,1,123,13): typecheck error FS0041: A unique overload for method 'A' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_many_many_overloads.fsx(123,7,123,8): typecheck error FS0041: A unique overload for method 'A' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a0 when 'a0: null @@ -77,7 +77,7 @@ Candidates: - static member Class.A: a: Task -> Task - static member Class.A: a: string -> string -neg_many_many_overloads.fsx(124,1,124,34): typecheck error FS0041: No overloads match for method 'A'. +neg_many_many_overloads.fsx(124,7,124,8): typecheck error FS0041: No overloads match for method 'A'. Known type of argument: Type @@ -167,7 +167,7 @@ Available overloads: - static member Class.A: a: uint64 -> uint64 // Argument 'a' doesn't match - static member Class.A: a: uint8 -> uint8 // Argument 'a' doesn't match -neg_many_many_overloads.fsx(125,1,125,25): typecheck error FS0041: No overloads match for method 'A'. +neg_many_many_overloads.fsx(125,7,125,8): typecheck error FS0041: No overloads match for method 'A'. Known type of argument: Guid @@ -257,7 +257,7 @@ Available overloads: - static member Class.A: a: uint64 -> uint64 // Argument 'a' doesn't match - static member Class.A: a: uint8 -> uint8 // Argument 'a' doesn't match -neg_many_many_overloads.fsx(126,1,126,48): typecheck error FS0041: No overloads match for method 'A'. +neg_many_many_overloads.fsx(126,7,126,8): typecheck error FS0041: No overloads match for method 'A'. Known type of argument: DayOfWeek diff --git a/tests/fsharp/typecheck/overloads/neg_tupled_arguments.bsl b/tests/fsharp/typecheck/overloads/neg_tupled_arguments.bsl index 33de258632b..480b1f39deb 100644 --- a/tests/fsharp/typecheck/overloads/neg_tupled_arguments.bsl +++ b/tests/fsharp/typecheck/overloads/neg_tupled_arguments.bsl @@ -1,5 +1,5 @@ -neg_tupled_arguments.fsx(6,9,6,31): typecheck error FS0041: No overloads match for method 'A'. +neg_tupled_arguments.fsx(6,11,6,12): typecheck error FS0041: No overloads match for method 'A'. Known types of arguments: (int * (int * string) * int) * int @@ -9,7 +9,7 @@ Available overloads: neg_tupled_arguments.fsx(7,9,7,28): typecheck error FS0503: A member or object constructor 'A' taking 4 arguments is not accessible from this code location. All accessible versions of method 'A' take 2 arguments. -neg_tupled_arguments.fsx(14,9,14,40): typecheck error FS0041: No overloads match for method 'B'. +neg_tupled_arguments.fsx(14,11,14,12): typecheck error FS0041: No overloads match for method 'B'. Known types of arguments: int * int * (int * (int * int * int * (int * int))) * int * int diff --git a/tests/fsharp/typecheck/sigs/neg06.bsl b/tests/fsharp/typecheck/sigs/neg06.bsl index 4e28da2b6d7..e6aeb502105 100644 --- a/tests/fsharp/typecheck/sigs/neg06.bsl +++ b/tests/fsharp/typecheck/sigs/neg06.bsl @@ -108,7 +108,7 @@ neg06.fs(350,13,350,21): typecheck error FS0800: Invalid use of a type name neg06.fs(375,9,375,10): typecheck error FS1197: The parameter 'x' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref'. When used, a byref parameter is implicitly dereferenced. -neg06.fs(382,13,382,19): typecheck error FS0041: A unique overload for method 'M1' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg06.fs(382,15,382,17): typecheck error FS0041: A unique overload for method 'M1' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a diff --git a/tests/fsharp/typecheck/sigs/neg106.bsl b/tests/fsharp/typecheck/sigs/neg106.bsl index feb58523b1f..38c0afcc4c2 100644 --- a/tests/fsharp/typecheck/sigs/neg106.bsl +++ b/tests/fsharp/typecheck/sigs/neg106.bsl @@ -1,7 +1,7 @@ neg106.fs(8,59,8,61): typecheck error FS3230: A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' -neg106.fs(13,18,13,72): typecheck error FS0041: No overloads match for method 'CompareExchange'. +neg106.fs(13,47,13,62): typecheck error FS0041: No overloads match for method 'CompareExchange'. Known types of arguments: inref * int * int @@ -16,7 +16,7 @@ Available overloads: neg106.fs(17,59,17,61): typecheck error FS3236: Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. -neg106.fs(17,14,17,68): typecheck error FS0041: No overloads match for method 'CompareExchange'. +neg106.fs(17,43,17,58): typecheck error FS0041: No overloads match for method 'CompareExchange'. Known types of arguments: inref * int * int @@ -41,7 +41,7 @@ but given a 'inref' The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' -neg106.fs(40,18,40,32): typecheck error FS0041: No overloads match for method 'M'. +neg106.fs(40,20,40,21): typecheck error FS0041: No overloads match for method 'M'. Known types of arguments: string * inref @@ -49,7 +49,7 @@ Available overloads: - static member C.M: a: int * [] x: byref -> unit // Argument 'a' doesn't match - static member C.M: a: string * [] x: byref -> unit // Argument 'x' doesn't match -neg106.fs(41,19,41,31): typecheck error FS0041: No overloads match for method 'M'. +neg106.fs(41,21,41,22): typecheck error FS0041: No overloads match for method 'M'. Known types of arguments: int * inref @@ -172,3 +172,11 @@ neg106.fs(147,34,147,44): typecheck error FS1204: This construct is for use in t neg106.fs(148,34,148,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly neg106.fs(149,34,149,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(146,34,146,47): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(147,34,147,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(148,34,148,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(149,34,149,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly diff --git a/tests/fsharp/typecheck/sigs/neg106.vsbsl b/tests/fsharp/typecheck/sigs/neg106.vsbsl index feb58523b1f..38c0afcc4c2 100644 --- a/tests/fsharp/typecheck/sigs/neg106.vsbsl +++ b/tests/fsharp/typecheck/sigs/neg106.vsbsl @@ -1,7 +1,7 @@ neg106.fs(8,59,8,61): typecheck error FS3230: A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' -neg106.fs(13,18,13,72): typecheck error FS0041: No overloads match for method 'CompareExchange'. +neg106.fs(13,47,13,62): typecheck error FS0041: No overloads match for method 'CompareExchange'. Known types of arguments: inref * int * int @@ -16,7 +16,7 @@ Available overloads: neg106.fs(17,59,17,61): typecheck error FS3236: Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. -neg106.fs(17,14,17,68): typecheck error FS0041: No overloads match for method 'CompareExchange'. +neg106.fs(17,43,17,58): typecheck error FS0041: No overloads match for method 'CompareExchange'. Known types of arguments: inref * int * int @@ -41,7 +41,7 @@ but given a 'inref' The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' -neg106.fs(40,18,40,32): typecheck error FS0041: No overloads match for method 'M'. +neg106.fs(40,20,40,21): typecheck error FS0041: No overloads match for method 'M'. Known types of arguments: string * inref @@ -49,7 +49,7 @@ Available overloads: - static member C.M: a: int * [] x: byref -> unit // Argument 'a' doesn't match - static member C.M: a: string * [] x: byref -> unit // Argument 'x' doesn't match -neg106.fs(41,19,41,31): typecheck error FS0041: No overloads match for method 'M'. +neg106.fs(41,21,41,22): typecheck error FS0041: No overloads match for method 'M'. Known types of arguments: int * inref @@ -172,3 +172,11 @@ neg106.fs(147,34,147,44): typecheck error FS1204: This construct is for use in t neg106.fs(148,34,148,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly neg106.fs(149,34,149,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(146,34,146,47): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(147,34,147,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(148,34,148,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(149,34,149,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly diff --git a/tests/fsharp/typecheck/sigs/neg131.bsl b/tests/fsharp/typecheck/sigs/neg131.bsl index 2319a3914d4..ae9eced1f18 100644 --- a/tests/fsharp/typecheck/sigs/neg131.bsl +++ b/tests/fsharp/typecheck/sigs/neg131.bsl @@ -1,5 +1,5 @@ -neg131.fs(15,9,15,55): typecheck error FS0041: A unique overload for method 'SomeMethod' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg131.fs(15,27,15,37): typecheck error FS0041: A unique overload for method 'SomeMethod' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * ('b -> int) diff --git a/tests/fsharp/typecheck/sigs/neg132.bsl b/tests/fsharp/typecheck/sigs/neg132.bsl index c7d10ed0af0..d3913a2b7c8 100644 --- a/tests/fsharp/typecheck/sigs/neg132.bsl +++ b/tests/fsharp/typecheck/sigs/neg132.bsl @@ -1,5 +1,5 @@ -neg132.fs(15,9,15,55): typecheck error FS0041: A unique overload for method 'SomeMethod' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg132.fs(15,27,15,37): typecheck error FS0041: A unique overload for method 'SomeMethod' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * ('b -> int) diff --git a/tests/fsharp/typecheck/sigs/neg20.bsl b/tests/fsharp/typecheck/sigs/neg20.bsl index 9b965cdbbed..150d59c34b6 100644 --- a/tests/fsharp/typecheck/sigs/neg20.bsl +++ b/tests/fsharp/typecheck/sigs/neg20.bsl @@ -109,7 +109,7 @@ neg20.fs(128,19,128,22): typecheck error FS0001: This expression was expected to but here has type 'obj' -neg20.fs(131,5,131,24): typecheck error FS0041: No overloads match for method 'OM3'. +neg20.fs(131,12,131,15): typecheck error FS0041: No overloads match for method 'OM3'. Known types of arguments: string * obj @@ -145,7 +145,7 @@ neg20.fs(166,13,166,35): typecheck error FS0502: The member or object constructo neg20.fs(167,13,167,31): typecheck error FS0502: The member or object constructor 'M5' takes 2 type argument(s) but is here given 1. The required signature is 'member C.M5<'b,'c> : y: 'a * z: 'b -> int'. -neg20.fs(182,14,182,31): typecheck error FS0041: No overloads match for method 'M'. +neg20.fs(182,17,182,18): typecheck error FS0041: No overloads match for method 'M'. Known types of arguments: string * objnull @@ -158,6 +158,16 @@ neg20.fs(183,29,183,34): typecheck error FS0001: This expression was expected to but here has type 'objnull' +neg20.fs(183,29,183,34): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'objnull' + +neg20.fs(183,35,183,40): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'objnull' + neg20.fs(183,35,183,40): typecheck error FS0001: This expression was expected to have type 'int' but here has type @@ -174,12 +184,22 @@ neg20.fs(184,28,184,33): typecheck error FS0001: This expression was expected to but here has type 'objnull' +neg20.fs(184,28,184,33): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'objnull' + +neg20.fs(184,34,184,39): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'objnull' + neg20.fs(184,34,184,39): typecheck error FS0001: This expression was expected to have type 'int' but here has type 'objnull' -neg20.fs(188,14,188,31): typecheck error FS0041: No overloads match for method 'M'. +neg20.fs(188,17,188,18): typecheck error FS0041: No overloads match for method 'M'. Known types of arguments: string * objnull @@ -192,6 +212,16 @@ neg20.fs(189,29,189,34): typecheck error FS0001: This expression was expected to but here has type 'objnull' +neg20.fs(189,29,189,34): typecheck error FS0001: This expression was expected to have type + 'string' +but here has type + 'objnull' + +neg20.fs(189,35,189,40): typecheck error FS0001: This expression was expected to have type + 'string' +but here has type + 'objnull' + neg20.fs(189,35,189,40): typecheck error FS0001: This expression was expected to have type 'string' but here has type @@ -208,6 +238,16 @@ neg20.fs(190,28,190,33): typecheck error FS0001: This expression was expected to but here has type 'objnull' +neg20.fs(190,28,190,33): typecheck error FS0001: This expression was expected to have type + 'string' +but here has type + 'objnull' + +neg20.fs(190,34,190,39): typecheck error FS0001: This expression was expected to have type + 'string' +but here has type + 'objnull' + neg20.fs(190,34,190,39): typecheck error FS0001: This expression was expected to have type 'string' but here has type @@ -311,6 +351,8 @@ neg20.fs(288,17,288,18): typecheck error FS0038: 'x' is bound twice in this patt neg20.fs(294,5,294,36): typecheck error FS0840: Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. +neg20.fs(294,5,294,36): typecheck error FS0840: Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + neg20.fs(301,8,301,16): typecheck error FS3132: This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. neg20.fs(304,8,304,16): typecheck error FS3132: This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. @@ -327,7 +369,7 @@ neg20.fs(319,8,319,17): typecheck error FS3132: This type definition may not hav neg20.fs(322,8,322,18): typecheck error FS3132: This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. -neg20.fs(335,11,335,24): typecheck error FS0041: A unique overload for method 'String' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg20.fs(335,18,335,24): typecheck error FS0041: A unique overload for method 'String' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a0 @@ -336,7 +378,7 @@ Candidates: - System.String(value: nativeptr) : System.String - System.String(value: nativeptr) : System.String -neg20.fs(336,11,336,22): typecheck error FS0041: A unique overload for method 'Guid' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg20.fs(336,18,336,22): typecheck error FS0041: A unique overload for method 'Guid' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a0 diff --git a/tests/fsharp/typecheck/sigs/neg45.bsl b/tests/fsharp/typecheck/sigs/neg45.bsl index 3ec59a417f6..a83072f761e 100644 --- a/tests/fsharp/typecheck/sigs/neg45.bsl +++ b/tests/fsharp/typecheck/sigs/neg45.bsl @@ -61,7 +61,7 @@ neg45.fs(80,20,80,22): typecheck error FS0340: The signature and implementation neg45.fs(81,35,81,40): typecheck error FS0001: A type parameter is missing a constraint 'when 'T :> System.IComparable' -neg45.fs(89,26,89,40): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg45.fs(89,28,89,29): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: R1 @@ -69,7 +69,7 @@ Candidates: - member D.M: 'a -> 'b - member D.M: 'a -> 'b -neg45.fs(97,26,97,55): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg45.fs(97,28,97,29): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: (R1 * R1) @@ -77,7 +77,7 @@ Candidates: - member D.M: 'a -> 'b - member D.M: 'a -> 'b -neg45.fs(104,26,104,31): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg45.fs(104,28,104,29): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: int diff --git a/tests/fsharp/typecheck/sigs/neg70.vsbsl b/tests/fsharp/typecheck/sigs/neg70.vsbsl index c392fc98985..ee570a41e50 100644 --- a/tests/fsharp/typecheck/sigs/neg70.vsbsl +++ b/tests/fsharp/typecheck/sigs/neg70.vsbsl @@ -1,11 +1,13 @@ neg70.fsx(109,64,109,65): parse error FS0010: Unexpected symbol ')' in binding. Expected incomplete structured construct at or before this point or other token. +neg70.fsx(109,64,109,65): parse error FS0010: Unexpected symbol ')' in binding. Expected incomplete structured construct at or before this point or other token. + neg70.fsx(107,29,107,69): typecheck error FS0507: No accessible member or object constructor named 'Rectangle' takes 0 arguments. Note the call to this member also provides 1 named arguments. neg70.fsx(108,39,108,40): typecheck error FS0039: The value or constructor 'y' is not defined. -neg70.fsx(110,18,110,43): typecheck error FS0041: No overloads match for method 'FillEllipse'. +neg70.fsx(110,20,110,31): typecheck error FS0041: No overloads match for method 'FillEllipse'. Known types of arguments: Brush * (int * bool * bool * bool)