@@ -244,6 +244,9 @@ g 1 |> ignore
244244 |> withNoOptimize
245245 |> asExe
246246 |> compileAndRun
247+ |> verifyILContains [ " call int32 Test::g(int32)" ]
248+ |> shouldSucceed
249+ |> verifyILNotPresent [ " Test::'<f>__debug" ]
247250
248251 [<Fact>]
249252 let ``Call 14`` () =
@@ -259,6 +262,9 @@ g 1 2 |> ignore
259262 |> withNoOptimize
260263 |> asExe
261264 |> compileAndRun
265+ |> verifyILContains [ " call int32 Test::'<g>__debug@7'(int32," ]
266+ |> shouldSucceed
267+ |> verifyILNotPresent [ " Test::'<f>__debug" ]
262268
263269 [<Fact>]
264270 let ``Call 15`` () =
@@ -274,6 +280,9 @@ g 1 2 |> ignore
274280 |> withNoOptimize
275281 |> asExe
276282 |> compileAndRun
283+ |> verifyILContains [ " call int32 Test::'<g>__debug@7'(int32," ]
284+ |> shouldSucceed
285+ |> verifyILNotPresent [ " Test::'<f>__debug" ]
277286
278287 [<Fact>]
279288 let ``SRTP 01`` () =
@@ -474,6 +483,9 @@ let main _ =
474483 |> withNoOptimize
475484 |> asExe
476485 |> compileAndRun
486+ |> verifyILContains
487+ [ " call int32 Test::'<add>__debug@8'(int32,"
488+ " call float64 Test::'<add>__debug@9-1'(float64," ]
477489 |> shouldSucceed
478490
479491 [<Fact>]
@@ -551,6 +563,7 @@ let main _ =
551563 |> withNoOptimize
552564 |> asExe
553565 |> compileAndRun
566+ |> verifyILContains [ " call void Test::'<g>__debug@16'(class Test/T)" ]
554567 |> shouldSucceed
555568
556569 [<Fact>]
@@ -580,6 +593,7 @@ let main _ =
580593 |> withNoOptimize
581594 |> asExe
582595 |> compileAndRun
596+ |> verifyILContains [ " Test::'<g>__debug@19'()" ]
583597 |> shouldSucceed
584598
585599 [<Fact>]
@@ -613,6 +627,7 @@ let main _ =
613627 |> withNoOptimize
614628 |> asExe
615629 |> compileAndRun
630+ |> verifyILContains [ " call int32 Test::'<h>__debug@23'(valuetype Test/S`1<int32>)" ]
616631 |> shouldSucceed
617632
618633 [<Fact>]
@@ -636,6 +651,7 @@ let main _ =
636651 |> withNoOptimize
637652 |> asExe
638653 |> compileAndRun
654+ |> verifyILContains [ " call int32 Test::'<h>__debug@13'(valuetype Test/S`1<int32>)" ]
639655 |> shouldSucceed
640656
641657 [<Fact>]
@@ -664,6 +680,7 @@ type U = static member inline F<'a, 'b when 'a: (member M: unit -> unit)>(_a: 'a
664680 |> withNoOptimize
665681 |> asExe
666682 |> compileAndRun
683+ |> verifyILContains [ " Program::'<foo>__debug@10'(class Module/T)" ]
667684 |> shouldSucceed
668685
669686 [<Fact>]
@@ -694,6 +711,7 @@ let main _ =
694711 |> withReferences [ library]
695712 |> asExe
696713 |> compileAndRun
714+ |> verifyILContains [ " Test::'<foo>__debug@8'(int32," ]
697715 |> shouldSucceed
698716
699717 [<Fact>]
@@ -724,6 +742,7 @@ type C = static member inline F<'a, 'b, 'c when C<'a, 'b>>(_a: 'a) = ()
724742 |> withNoOptimize
725743 |> asExe
726744 |> compileAndRun
745+ |> verifyILContains [ " Program::'<foo>__debug@12'(class Program/T)" ]
727746 |> shouldSucceed
728747
729748 [<Fact>]
@@ -747,6 +766,7 @@ let main _ =
747766 |> withNoOptimize
748767 |> asExe
749768 |> compileAndRun
769+ |> verifyILContains [ " call void Test::'<f>__debug@13'(valuetype Test/S&," ]
750770 |> shouldSucceed
751771
752772 [<Fact>]
@@ -781,6 +801,7 @@ let main _ =
781801 |> withReferences [ library]
782802 |> asExe
783803 |> compileAndRun
804+ |> verifyILContains [ " call void Test::'<f>__debug@12'(valuetype Test/S&," ]
784805 |> shouldSucceed
785806
786807 [<Fact>]
@@ -818,6 +839,7 @@ let main _ =
818839 |> withReferences [ library]
819840 |> asExe
820841 |> compileAndRun
842+ |> verifyILContains [ " call void Test::'<g>__debug@12'(valuetype Test/S&," ]
821843 |> shouldSucceed
822844
823845 [<Fact>]
@@ -955,6 +977,7 @@ let inline f () = fInternal ()
955977 |> withNoOptimize
956978 |> asLibrary
957979 |> compile
980+ |> verifyILContains [ " call void Module::'<fInternal>__debug@5'()" ]
958981 |> shouldSucceed
959982
960983 [<Fact>]
@@ -973,6 +996,7 @@ type T() =
973996 |> withNoOptimize
974997 |> asLibrary
975998 |> compile
999+ |> verifyILContains [ " call void Module/T::'<InternalMethod>__debug@9'(class Module/T)" ]
9761000 |> shouldSucceed
9771001
9781002 [<Fact>]
@@ -997,6 +1021,7 @@ let r = Lib.T().G(1)
9971021 |> withNoOptimize
9981022 |> withReferences [ library]
9991023 |> compile
1024+ |> verifyILContains [ " Lib/T::G<int32>(!!0)" ]
10001025 |> shouldSucceed
10011026
10021027
@@ -1026,6 +1051,7 @@ let main _ =
10261051 |> withReferences [ library]
10271052 |> asExe
10281053 |> compileAndRun
1054+ |> verifyILContains [ " call int32 Test::'<addPublic>__debug@6'(int32," ]
10291055 |> shouldSucceed
10301056
10311057 [<Fact>]
@@ -1063,6 +1089,7 @@ let main _ =
10631089 |> withReferences [ library]
10641090 |> asExe
10651091 |> compileAndRun
1092+ |> verifyILContains [ " Test::'<Invoke>__debug@6'(float64)" ]
10661093 |> shouldSucceed
10671094
10681095 [<Fact>]
@@ -1089,6 +1116,7 @@ val inline publicFn: x: int -> int
10891116 |> withDebug
10901117 |> withNoOptimize
10911118 |> asLibrary
1119+ |> withName " Lib"
10921120
10931121 FSharp """
10941122open Lib
@@ -1103,6 +1131,7 @@ let main _ =
11031131 |> withReferences [ library]
11041132 |> asExe
11051133 |> compileAndRun
1134+ |> verifyILContains [ " call int32 [Lib]Lib::publicFn(int32)" ]
11061135 |> shouldSucceed
11071136
11081137 [<Fact>]
@@ -1129,6 +1158,7 @@ val inline publicFn: x: int -> int
11291158 |> withDebug
11301159 |> withNoOptimize
11311160 |> asLibrary
1161+ |> withName " Lib"
11321162
11331163 FSharp """
11341164open Lib
@@ -1143,4 +1173,5 @@ let main _ =
11431173 |> withReferences [ library]
11441174 |> asExe
11451175 |> compileAndRun
1176+ |> verifyILContains [ " call int32 [Lib]Lib::publicFn(int32)" ]
11461177 |> shouldSucceed
0 commit comments