@@ -787,6 +787,62 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) =
787787 // SOURCE=AllowNullLiteral01.fs # AllowNullLiteral01.fs
788788 [<Theory; Directory(__ SOURCE_ DIRECTORY__, Includes=[| " AllowNullLiteral01.fs" |]) >]
789789 let ``AllowNullLiteral01 preview`` compilation =
790+ compilation
791+ |> withLangVersionPreview
792+ |> verifyCompile
793+ |> shouldSucceed
794+
795+ // SOURCE= E_VolatileField.fs # E_VolatileField.fs
796+ [<Theory; Directory(__ SOURCE_ DIRECTORY__, Includes=[| " E_VolatileField.fs" |]) >]
797+ let ``E_VolatileField 9.0`` compilation =
798+ compilation
799+ |> withLangVersion90
800+ |> verifyCompile
801+ |> shouldFail
802+ |> withDiagnostics [
803+ ( Error 823 , Line 3 , Col 3 , Line 4 , Col 16 , " The 'VolatileField' attribute may only be used on 'let' bindings in classes" )
804+ ( Error 823 , Line 6 , Col 3 , Line 7 , Col 14 , " The 'VolatileField' attribute may only be used on 'let' bindings in classes" )
805+ ( Error 879 , Line 6 , Col 3 , Line 7 , Col 14 , " Volatile fields must be marked 'mutable' and cannot be thread-static" )
806+ ( Error 823 , Line 9 , Col 3 , Line 10 , Col 9 , " The 'VolatileField' attribute may only be used on 'let' bindings in classes" )
807+ ( Error 879 , Line 9 , Col 3 , Line 10 , Col 9 , " Volatile fields must be marked 'mutable' and cannot be thread-static" )
808+ ( Error 823 , Line 26 , Col 17 , Line 26 , Col 18 , " The 'VolatileField' attribute may only be used on 'let' bindings in classes" )
809+ ( Error 879 , Line 13 , Col 5 , Line 14 , Col 19 , " Volatile fields must be marked 'mutable' and cannot be thread-static" )
810+ ( Error 879 , Line 16 , Col 5 , Line 17 , Col 20 , " Volatile fields must be marked 'mutable' and cannot be thread-static" )
811+ ( Error 879 , Line 19 , Col 5 , Line 20 , Col 11 , " Volatile fields must be marked 'mutable' and cannot be thread-static" )
812+ ( Error 879 , Line 22 , Col 5 , Line 23 , Col 13 , " Volatile fields must be marked 'mutable' and cannot be thread-static" )
813+ ]
814+
815+ // SOURCE=E_VolatileField.fs # E_VolatileField.fs
816+ [<Theory; Directory(__ SOURCE_ DIRECTORY__, Includes=[| " E_VolatileField.fs" |]) >]
817+ let ``E_VolatileField preview`` compilation =
818+ compilation
819+ |> withLangVersionPreview
820+ |> verifyCompile
821+ |> shouldFail
822+ |> withDiagnostics [
823+ ( Error 823 , Line 3 , Col 3 , Line 4 , Col 16 , " The 'VolatileField' attribute may only be used on 'let' bindings in classes" )
824+ ( Error 823 , Line 6 , Col 3 , Line 7 , Col 14 , " The 'VolatileField' attribute may only be used on 'let' bindings in classes" )
825+ ( Error 879 , Line 6 , Col 3 , Line 7 , Col 14 , " Volatile fields must be marked 'mutable' and cannot be thread-static" )
826+ ( Error 823 , Line 9 , Col 3 , Line 10 , Col 9 , " The 'VolatileField' attribute may only be used on 'let' bindings in classes" )
827+ ( Error 879 , Line 9 , Col 3 , Line 10 , Col 9 , " Volatile fields must be marked 'mutable' and cannot be thread-static" )
828+ ( Error 823 , Line 26 , Col 17 , Line 26 , Col 18 , " The 'VolatileField' attribute may only be used on 'let' bindings in classes" )
829+ ( Error 879 , Line 13 , Col 5 , Line 14 , Col 19 , " Volatile fields must be marked 'mutable' and cannot be thread-static" )
830+ ( Error 879 , Line 16 , Col 5 , Line 17 , Col 20 , " Volatile fields must be marked 'mutable' and cannot be thread-static" )
831+ ( Error 879 , Line 19 , Col 5 , Line 20 , Col 11 , " Volatile fields must be marked 'mutable' and cannot be thread-static" )
832+ ( Error 879 , Line 22 , Col 5 , Line 23 , Col 13 , " Volatile fields must be marked 'mutable' and cannot be thread-static" )
833+ ]
834+
835+ // SOURCE= VolatileField01.fs # VolatileField01.fs
836+ [<Theory; Directory(__ SOURCE_ DIRECTORY__, Includes=[| " VolatileField01.fs" |]) >]
837+ let ``VolatileField01 9.0`` compilation =
838+ compilation
839+ |> withLangVersion90
840+ |> verifyCompile
841+ |> shouldSucceed
842+
843+ // SOURCE=VolatileField01.fs # VolatileField01.fs
844+ [<Theory; Directory(__ SOURCE_ DIRECTORY__, Includes=[| " VolatileField01.fs" |]) >]
845+ let ``VolatileField01 preview`` compilation =
790846 compilation
791847 |> withLangVersionPreview
792848 |> verifyCompile
0 commit comments