Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update anon records tests
  • Loading branch information
cartermp committed Jun 21, 2019
commit af6bfc9ae3e4729bbd220ac06a8dd1ee27763e9e
4 changes: 2 additions & 2 deletions tests/fsharp/Compiler/Language/AnonRecordTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let rAnon = RefClass<struct {| R: int |}>()
"""
1
(3, 12, 3, 41)
"A generic construct requires that the type 'struct {|R : int|}' have reference semantics, but it does not, i.e. it is a struct"
"A generic construct requires that the type 'struct {| R: int |}' have reference semantics, but it does not, i.e. it is a struct"

[<Test>]
let StructConstraintFail() =
Expand All @@ -43,4 +43,4 @@ let sAnon = StructClass<{| S: int |}>()
"""
1
(3, 12, 3, 37)
"A generic construct requires that the type '{|S : int|}' is a CLI or F# struct type"
"A generic construct requires that the type '{| S: int |}' is a CLI or F# struct type"
8 changes: 4 additions & 4 deletions tests/fsharp/typecheck/sigs/neg113.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ neg113.fs(7,41,7,52): typecheck error FS0001: Two anonymous record types have mi
neg113.fs(10,27,10,55): typecheck error FS0059: The type '{|a : int|}' does not have any proper subtypes and need not be used as the target of a static coercion

neg113.fs(10,27,10,55): typecheck error FS0193: Type constraint mismatch. The type
'{|b : int|}'
'{| b: int |}'
is not compatible with type
'{|a : int|}'
'{| a: int |}'


neg113.fs(13,27,13,62): typecheck error FS0059: The type '{|a : int|}' does not have any proper subtypes and need not be used as the target of a static coercion

neg113.fs(13,27,13,62): typecheck error FS0193: Type constraint mismatch. The type
'{|a : int ; b : int|}'
'{| a: int; b: int |}'
is not compatible with type
'{|a : int|}'
'{| a: int |}'


neg113.fs(18,34,18,36): typecheck error FS0001: The type '('a -> 'a)' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface
Expand Down
8 changes: 4 additions & 4 deletions tests/fsharp/typecheck/sigs/neg_anon_1.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ neg_anon_1.fs(7,41,7,52): typecheck error FS0001: Two anonymous record types hav
neg_anon_1.fs(10,27,10,55): typecheck error FS0059: The type '{|a : int|}' does not have any proper subtypes and need not be used as the target of a static coercion

neg_anon_1.fs(10,27,10,55): typecheck error FS0193: Type constraint mismatch. The type
'{|b : int|}'
'{| b: int |}'
is not compatible with type
'{|a : int|}'
'{| a: int |}'


neg_anon_1.fs(13,27,13,62): typecheck error FS0059: The type '{|a : int|}' does not have any proper subtypes and need not be used as the target of a static coercion

neg_anon_1.fs(13,27,13,62): typecheck error FS0193: Type constraint mismatch. The type
'{|a : int ; b : int|}'
'{| a: int; b: int |}'
is not compatible with type
'{|a : int|}'
'{| a: int |}'


neg_anon_1.fs(18,34,18,36): typecheck error FS0001: The type '('a -> 'a)' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface
Expand Down