Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Nov 13, 2023
1 parent 6812c7b commit 9fa97d7
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ type MyIndexerClass() =
|> withLangVersionPreview
|> typecheck
|> shouldFail
|> withSingleDiagnostic (Warning 3581, Line 4, Col 14, Line 4, Col 17, "An indexed property's getter and setter must have the same type. Property 'Indexer1' has getter of type 'string' but setter of type 'float'.")
|> withSingleDiagnostic (Warning 3581, Line 3, Col 14, Line 3, Col 22, "An indexed property's getter and setter must have the same type. Property 'Indexer1' has getter of type 'string' but setter of type 'float'.")

[<Fact>]
let ``Indexed2PropertiesSameType_fs preview``() =
Expand All @@ -605,7 +605,7 @@ type MyIndexerClass() =
|> withLangVersionPreview
|> typecheck
|> shouldFail
|> withSingleDiagnostic (Warning 3581, Line 4, Col 14, Line 4, Col 17, "An indexed property's getter and setter must have the same type. Property 'Indexer2' has getter of type 'int' but setter of type 'float'.")
|> withSingleDiagnostic (Warning 3581, Line 3, Col 14, Line 3, Col 22, "An indexed property's getter and setter must have the same type. Property 'Indexer2' has getter of type 'int' but setter of type 'float'.")

[<Fact>]
let ``Indexed3PropertiesSameType_fs preview``() =
Expand All @@ -632,7 +632,7 @@ type MyIndexerClass() =
|> withLangVersionPreview
|> typecheck
|> shouldFail
|> withSingleDiagnostic (Warning 3581, Line 4, Col 14, Line 4, Col 17, "An indexed property's getter and setter must have the same type. Property 'Indexer4' has getter of type 'float' but setter of type 'string'.")
|> withSingleDiagnostic (Warning 3581, Line 3, Col 14, Line 3, Col 22, "An indexed property's getter and setter must have the same type. Property 'Indexer4' has getter of type 'float' but setter of type 'string'.")

[<Fact>]
let ``Indexed5PropertiesSameType_fs preview``() =
Expand All @@ -645,7 +645,7 @@ type MyIndexerClass() =
|> withLangVersionPreview
|> typecheck
|> shouldFail
|> withSingleDiagnostic (Warning 3581, Line 4, Col 14, Line 4, Col 17, "An indexed property's getter and setter must have the same type. Property 'Indexer5' has getter of type 'float' but setter of type 'obj'.")
|> withSingleDiagnostic (Warning 3581, Line 3, Col 14, Line 3, Col 22, "An indexed property's getter and setter must have the same type. Property 'Indexer5' has getter of type 'float' but setter of type 'obj'.")

[<Fact>]
let ``GenericIndexerPropertiesSameType_fs preview``() =
Expand All @@ -667,4 +667,4 @@ type GenericIndexer<'indexerArgs,'indexerOutput,'indexerInput>() =
|> withLangVersionPreview
|> typecheck
|> shouldFail
|> withSingleDiagnostic (Warning 3581, Line 9, Col 27, Line 9, Col 30, "An indexed property's getter and setter must have the same type. Property 'Item' has getter of type ''indexerOutput' but setter of type ''indexerInput'.")
|> withSingleDiagnostic (Warning 3581, Line 9, Col 17, Line 9, Col 21, "An indexed property's getter and setter must have the same type. Property 'Item' has getter of type ''indexerOutput' but setter of type ''indexerInput'.")

0 comments on commit 9fa97d7

Please sign in to comment.