Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7393d92

Browse files
committed
add tests for val sets
1 parent68555a3 commit7393d92

File tree

3 files changed

+52
-3
lines changed

3 files changed

+52
-3
lines changed

‎tests/fsharp/typecheck/sigs/neg91.bsl‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,11 @@
22
neg91.fs(7,16,7,30): typecheck error FS0896: Enumerations cannot have members
33

44
neg91.fs(10,10,10,15): typecheck error FS0956: Members that extend interface, delegateor enum types must be placedin a module separateto the definition of the type. This module must either have the AutoOpen attributeor be opened explicitly by client codeto bring the extension members into scope.
5+
6+
neg91.fs(24,13,24,16): typecheck error FS1094: The value 'x' isnot accessible from this code location
7+
8+
neg91.fs(34,13,34,16): typecheck error FS0044: This construct is deprecated. Don't touch me
9+
10+
neg91.fs(44,13,44,16): typecheck error FS3003: Don't touch me
11+
12+
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"'.

‎tests/fsharp/typecheck/sigs/neg91.fs‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,44 @@ module T2 =
1212
typeEnum2
1313
with
1414
memberthis.Foo()=1// not ok
15+
16+
moduleTestPrivateSet=
17+
// See https://github.com/Microsoft/visualfsharp/issues/27
18+
moduleA=
19+
let mutableprivatex=0
20+
21+
moduleB=
22+
lettest()=
23+
// let _ = A.x // accessibility error on read, as expected
24+
A.x<-1// but write works!
25+
26+
moduleTestObsoleteSet=
27+
// See https://github.com/Microsoft/visualfsharp/issues/27
28+
moduleA=
29+
[<System.ObsoleteAttribute("Don't touch me")>]
30+
let mutablex=0
31+
32+
moduleB=
33+
lettest()=
34+
A.x<-1
35+
36+
moduleTestCompilerMessgeSet=
37+
// See https://github.com/Microsoft/visualfsharp/issues/27
38+
moduleA=
39+
[<CompilerMessageAttribute("Don't touch me",3003)>]
40+
let mutablex=0
41+
42+
moduleB=
43+
lettest()=
44+
A.x<-1
45+
46+
moduleTestExperimentalSet=
47+
// See https://github.com/Microsoft/visualfsharp/issues/27
48+
moduleA=
49+
[<ExperimentalAttribute("It was just an experiment!")>]
50+
let mutablex=0
51+
52+
moduleB=
53+
lettest()=
54+
A.x<-1
55+

‎tests/test.lst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,6 @@ Misc02fsharp\regression\tuple-bug-1
179179
Misc02fsharp\tools\bundle
180180
Misc02fsharp\tools\eval
181181
Misc02..\testsprivate\fsharp\tools\queries
182-
Misc02fsharp\typecheck\misc
183-
Misc02fsharp\typecheck\sigs
184-
Misc02fsharp\typecheck\full-rank-arrays
182+
Misc02,TypeCheckerfsharp\typecheck\misc
183+
Misc02,TypeCheckerfsharp\typecheck\sigs
184+
Misc02,TypeCheckerfsharp\typecheck\full-rank-arrays

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp