diff --git a/tests/fsharp/typecheck/sigs/neg91.bsl b/tests/fsharp/typecheck/sigs/neg91.bsl index 6fb74c5b67a..afa9650ca45 100644 --- a/tests/fsharp/typecheck/sigs/neg91.bsl +++ b/tests/fsharp/typecheck/sigs/neg91.bsl @@ -2,3 +2,11 @@ neg91.fs(7,16,7,30): typecheck error FS0896: Enumerations cannot have members neg91.fs(10,10,10,15): typecheck error FS0956: Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + +neg91.fs(24,13,24,16): typecheck error FS1094: The value 'x' is not accessible from this code location + +neg91.fs(34,13,34,16): typecheck error FS0044: This construct is deprecated. Don't touch me + +neg91.fs(44,13,44,16): typecheck error FS3003: Don't touch me + +neg91.fs(54,13,54,16): typecheck error FS0057: It was just an experiment!. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. diff --git a/tests/fsharp/typecheck/sigs/neg91.fs b/tests/fsharp/typecheck/sigs/neg91.fs index 0c190619f7e..09cb4849173 100644 --- a/tests/fsharp/typecheck/sigs/neg91.fs +++ b/tests/fsharp/typecheck/sigs/neg91.fs @@ -12,3 +12,44 @@ module T2 = type Enum2 with member this.Foo() = 1 // not ok + +module TestPrivateSet = + // See https://github.com/Microsoft/visualfsharp/issues/27 + module A = + let mutable private x = 0 + + module B = + let test () = + // let _ = A.x // accessibility error on read, as expected + A.x <- 1 // but write works! + +module TestObsoleteSet = + // See https://github.com/Microsoft/visualfsharp/issues/27 + module A = + [] + let mutable x = 0 + + module B = + let test () = + A.x <- 1 + +module TestCompilerMessgeSet = + // See https://github.com/Microsoft/visualfsharp/issues/27 + module A = + [] + let mutable x = 0 + + module B = + let test () = + A.x <- 1 + +module TestExperimentalSet = + // See https://github.com/Microsoft/visualfsharp/issues/27 + module A = + [] + let mutable x = 0 + + module B = + let test () = + A.x <- 1 + diff --git a/tests/test.lst b/tests/test.lst index 423b68aa0c2..049bb1ba13f 100644 --- a/tests/test.lst +++ b/tests/test.lst @@ -179,6 +179,6 @@ Misc02 fsharp\regression\tuple-bug-1 Misc02 fsharp\tools\bundle Misc02 fsharp\tools\eval Misc02 ..\testsprivate\fsharp\tools\queries -Misc02 fsharp\typecheck\misc -Misc02 fsharp\typecheck\sigs -Misc02 fsharp\typecheck\full-rank-arrays +Misc02,TypeChecker fsharp\typecheck\misc +Misc02,TypeChecker fsharp\typecheck\sigs +Misc02,TypeChecker fsharp\typecheck\full-rank-arrays