@@ -4918,15 +4918,14 @@ type ToStringClass(x) =
49184918 end
49194919do check " Bug1049.customClass" ( string ( ToStringClass( " fred" ))) " fred"
49204920
4921- // BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6597
4922- // [<Struct>]
4923- // type ToStringStruct =
4924- // struct
4925- // val x : int
4926- // new(x) = {x=x}
4927- // override this.ToString() = string this.x
4928- // end
4929- // do check "Bug1049.customStruct" (string (ToStringStruct(123))) "123"
4921+ [<Struct>]
4922+ type ToStringStruct =
4923+ struct
4924+ val x : int
4925+ new ( x) = { x= x}
4926+ override this.ToString () = string this.x
4927+ end
4928+ do check " Bug1049.customStruct" ( string ( ToStringStruct( 123 ))) " 123"
49304929type ToStringEnum =
49314930 | A = 1
49324931 | B = 2
@@ -5426,35 +5425,32 @@ module SetToString = begin
54265425 do check " cewjhnkrveo81p" (( Map.ofList [( 4 , 40 );( 3 , 30 );( 2 , 20 );( 1 , 10 )]) |> sprintf " %A " ) " map [(1, 10); (2, 20); (3, 30); (4, 40)]"
54275426end
54285427
5429- // BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6599
5430-
5431- //(*---------------------------------------------------------------------------
5432- //!* Bug 5816: Unable to define mutually recursive types with mutually recursive generic constraints within FSI
5433- // *--------------------------------------------------------------------------- *)
5434- //module Bug5816 = begin
5435- // type IView<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
5436- // abstract ViewModel : 'vm
5437- // end
5438- // and IViewModel<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
5439- // abstract View : 'v
5440- // end
5441- //end
5442-
5443- // BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6600
5444- //(*---------------------------------------------------------------------------
5445- //!* Bug 5825: Constraints with nested types
5446- // *--------------------------------------------------------------------------- *)
5447- //module Bug5825 = begin
5448- // type I = interface
5449- // abstract member m : unit
5450- // end
5451- // type C() = class
5452- // interface I with
5453- // member this.m = ()
5454- // end
5455- // end
5456- // let f (c : #C) = ()
5457- //end
5428+ (* ---------------------------------------------------------------------------
5429+ !* Bug 5816: Unable to define mutually recursive types with mutually recursive generic constraints within FSI
5430+ *--------------------------------------------------------------------------- *)
5431+ module Bug5816 = begin
5432+ type IView < 'v , 'vm when 'v :> IView < 'v , 'vm > and 'vm :> IViewModel < 'v , 'vm >> = interface
5433+ abstract ViewModel : 'vm
5434+ end
5435+ and IViewModel < 'v , 'vm when 'v :> IView < 'v , 'vm > and 'vm :> IViewModel < 'v , 'vm >> = interface
5436+ abstract View : 'v
5437+ end
5438+ end
5439+
5440+ (* ---------------------------------------------------------------------------
5441+ !* Bug 5825: Constraints with nested types
5442+ *--------------------------------------------------------------------------- *)
5443+ module Bug5825 = begin
5444+ type I = interface
5445+ abstract member m : unit
5446+ end
5447+ type C () = class
5448+ interface I with
5449+ member this.m = ()
5450+ end
5451+ end
5452+ let f ( c : #C ) = ()
5453+ end
54585454
54595455module Bug5981 = begin
54605456 // guard against type variable tokens leaking into the IL stream
0 commit comments