-
Notifications
You must be signed in to change notification settings - Fork 790
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move UnitGenericAbstractType To Nunit (#7257)
- Loading branch information
1 parent
8d74566
commit c423de9
Showing
4 changed files
with
28 additions
and
10 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
tests/fsharp/Compiler/ErrorMessages/UnitGenericAbstactType.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. | ||
|
||
namespace FSharp.Compiler.UnitTests | ||
|
||
open NUnit.Framework | ||
open FSharp.Compiler.SourceCodeServices | ||
|
||
[<TestFixture>] | ||
module ``Unit generic abstract Type`` = | ||
|
||
[<Test>] | ||
let ``Unit can not be used as return type of abstract method paramete on return type``() = | ||
CompilerAssert.TypeCheckSingleError | ||
""" | ||
type EDF<'S> = | ||
abstract member Apply : int -> 'S | ||
type SomeEDF () = | ||
interface EDF<unit> with | ||
member this.Apply d = | ||
// [ERROR] The member 'Apply' does not have the correct type to override the corresponding abstract method. | ||
() | ||
""" | ||
FSharpErrorSeverity.Error | ||
17 | ||
(6, 21, 6, 26) | ||
"The member 'Apply : int -> unit' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
tests/fsharpqa/Source/ErrorMessages/UnitGenericAbstractType/E_UnitGenericAbstractType1.fs
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
tests/fsharpqa/Source/ErrorMessages/UnitGenericAbstractType/env.lst
This file was deleted.
Oops, something went wrong.