Skip to content

Commit 403fc0c

Browse files
forkidsyme
authored andcommitted
Add type info to error - references #1574 (#1834)
* Add type info to error - references #1574 * Add type info to FS0314 * Add type info to more SignatureConformance errors
1 parent 2f5851a commit 403fc0c

File tree

8 files changed

+97
-87
lines changed

8 files changed

+97
-87
lines changed

src/fsharp/FSComp.txt

Lines changed: 32 additions & 32 deletions
Large diffs are not rendered by default.

src/fsharp/SignatureConformance.fs

Lines changed: 59 additions & 49 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
neg2h.fs(4,6,4,7): typecheck error FS0318: The type definitions in the signature and implementation are not compatible because the abbreviations differ: FSharp.HelloWorld.HelloWorldTypeWithStaticInt32Parameter<2> versus FSharp.HelloWorld.HelloWorldTypeWithStaticInt32Parameter<1>
2+
neg2h.fs(4,6,4,7): typecheck error FS0318: The type definitions for type 'A' in the signature and implementation are not compatible because the abbreviations differ: FSharp.HelloWorld.HelloWorldTypeWithStaticInt32Parameter<2> versus FSharp.HelloWorld.HelloWorldTypeWithStaticInt32Parameter<1>

tests/fsharp/typecheck/sigs/neg17.bsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
neg17.fs(84,17,84,33): typecheck error FS0292: The type definitions in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation
2+
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
33

44
neg17b.fs(7,17,7,31): typecheck error FS1094: The value 'privateValue' is not accessible from this code location
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
neg43.fs(11,6,11,8): typecheck error FS0294: The type definitions in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not
2+
neg43.fs(11,6,11,8): typecheck error FS0294: The type definitions for type 'DU' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
neg57.fs(4,6,4,9): typecheck error FS0314: The type definitions in the signature and implementation are not compatible because the field 'offset' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'.
2+
neg57.fs(4,6,4,9): typecheck error FS0314: The type definitions for type 'Foo' in the signature and implementation are not compatible because the field 'offset' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'.
33

44
neg57.fs(1,8,1,9): typecheck error FS0193: Module 'M' requires a value 'new : unit -> Foo<'T>'

tests/fsharp/typecheck/sigs/neg58.bsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
neg58.fs(5,6,5,9): typecheck error FS0314: The type definitions in the signature and implementation are not compatible because the field 'offset' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'.
2+
neg58.fs(5,6,5,9): typecheck error FS0314: The type definitions for type 'Foo' in the signature and implementation are not compatible because the field 'offset' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'.
33

44
neg58.fs(9,17,9,30): typecheck error FS0034: Module 'FooBarSoftware' contains
55
override Foo.GetEnumerator : unit -> IEnumerator<'T>

tests/fsharpqa/Source/Diagnostics/General/E_ConsiderAddingSealedAttribute01.fsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// #Regression #Diagnostics
2-
//<Expects status="error" span="(4,6-4,7)" id="FS0297">The type definitions in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is\. Consider adding the \[<Sealed>\] attribute to the implementation\.$</Expects>
2+
//<Expects status="error" span="(4,6-4,7)" id="FS0297">The type definitions for type 'T' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is\. Consider adding the \[<Sealed>\] attribute to the implementation\.$</Expects>
33
module M
44
[<Sealed>]
55
type T =

0 commit comments

Comments
 (0)