Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable tests fixed by: #6620 #6624

Merged
merged 1 commit into from
Apr 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 9 additions & 10 deletions tests/fsharp/core/csext/test.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,15 @@ xie.All(fun x -> x > 1)
xie.Average()
x.Average()

// BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6601
//[<Struct>]
//type S(v:int) =
// interface System.Collections.Generic.IEnumerable<int> with
// member x.GetEnumerator() = (Seq.singleton v).GetEnumerator()
// interface System.Collections.IEnumerable with
// member x.GetEnumerator() = ((Seq.singleton v).GetEnumerator() :> System.Collections.IEnumerator)
//
//let s : S = S(3)
//s.Average()
[<Struct>]
type S(v:int) =
interface System.Collections.Generic.IEnumerable<int> with
member x.GetEnumerator() = (Seq.singleton v).GetEnumerator()
interface System.Collections.IEnumerable with
member x.GetEnumerator() = ((Seq.singleton v).GetEnumerator() :> System.Collections.IEnumerator)

let s : S = S(3)
s.Average()


[<Struct>]
Expand Down
72 changes: 34 additions & 38 deletions tests/fsharp/core/libtest/test.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -4918,15 +4918,14 @@ type ToStringClass(x) =
end
do check "Bug1049.customClass" (string (ToStringClass("fred"))) "fred"

// BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6597
// [<Struct>]
// type ToStringStruct =
// struct
// val x : int
// new(x) = {x=x}
// override this.ToString() = string this.x
// end
// do check "Bug1049.customStruct" (string (ToStringStruct(123))) "123"
[<Struct>]
type ToStringStruct =
struct
val x : int
new(x) = {x=x}
override this.ToString() = string this.x
end
do check "Bug1049.customStruct" (string (ToStringStruct(123))) "123"
type ToStringEnum =
| A = 1
| B = 2
Expand Down Expand Up @@ -5426,35 +5425,32 @@ module SetToString = begin
do check "cewjhnkrveo81p" ((Map.ofList [(4,40);(3,30);(2,20);(1,10)]) |> sprintf "%A") "map [(1, 10); (2, 20); (3, 30); (4, 40)]"
end

// BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6599

//(*---------------------------------------------------------------------------
//!* Bug 5816: Unable to define mutually recursive types with mutually recursive generic constraints within FSI
// *--------------------------------------------------------------------------- *)
//module Bug5816 = begin
// type IView<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
// abstract ViewModel : 'vm
// end
// and IViewModel<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
// abstract View : 'v
// end
//end

// BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6600
//(*---------------------------------------------------------------------------
//!* Bug 5825: Constraints with nested types
// *--------------------------------------------------------------------------- *)
//module Bug5825 = begin
// type I = interface
// abstract member m : unit
// end
// type C() = class
// interface I with
// member this.m = ()
// end
// end
// let f (c : #C) = ()
//end
(*---------------------------------------------------------------------------
!* Bug 5816: Unable to define mutually recursive types with mutually recursive generic constraints within FSI
*--------------------------------------------------------------------------- *)
module Bug5816 = begin
type IView<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
abstract ViewModel : 'vm
end
and IViewModel<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
abstract View : 'v
end
end

(*---------------------------------------------------------------------------
!* Bug 5825: Constraints with nested types
*--------------------------------------------------------------------------- *)
module Bug5825 = begin
type I = interface
abstract member m : unit
end
type C() = class
interface I with
member this.m = ()
end
end
let f (c : #C) = ()
end

module Bug5981 = begin
// guard against type variable tokens leaking into the IL stream
Expand Down