Skip to content

Commit

Permalink
Add test for DU which is accessed without type but RequiredQualifiedA…
Browse files Browse the repository at this point in the history
…ccess was set - relates to dotnet#95
  • Loading branch information
forki committed Jan 26, 2015
1 parent e8a652e commit fa5e972
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/fsharp/typecheck/sigs/neg90.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ neg90.fs(4,9,4,12): typecheck error FS0001: A generic construct requires that th
neg90.fs(7,22,7,25): typecheck error FS0039: The type 'foo' is not defined

neg90.fs(7,22,7,25): typecheck error FS0039: The type 'foo' is not defined

neg90.fs(16,9,16,21): typecheck error FS0035: This construct is deprecated: The union type for union case 'Member' was definded with the RequireQualifiedAccessAttribute. Include the name of the union type ('DU') in the name you are using.'
8 changes: 8 additions & 0 deletions tests/fsharp/typecheck/sigs/neg90.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@ let _ = foo<Recd>()
// See https://github.com/Microsoft/visualfsharp/issues/38
type [<Measure>] N = foo // foo is undefined
type M2 = float<N>


// See https://github.com/Microsoft/visualfsharp/issues/95
module First =
[<RequireQualifiedAccess>]
type DU = Member of int

let _ = First.Member(0)

0 comments on commit fa5e972

Please sign in to comment.