Skip to content

Commit

Permalink
Put Deprecated message into FSComp.txt - relates to dotnet#95
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Jan 26, 2015
1 parent fa5e972 commit ef1fb6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/fsharp/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,7 @@ lexfltSeparatorTokensOfPatternMatchMisaligned,"The '|' tokens separating rules o
1130,nrInvalidFieldLabel,"Invalid field label"
1132,nrInvalidExpression,"Invalid expression '%s'"
1133,nrNoConstructorsAvailableForType,"No constructors are available for the type '%s'"
1134,nrUnionTypeNeedsQualifiedAccess,"The union type for union case '%s' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('%s') in the name you are using.""
# -----------------------------------------------------------------------------
# ilwrite.fs errors
# -----------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions src/fsharp/tc.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1878,8 +1878,7 @@ let rec ApplyUnionCaseOrExn (makerForUnionCase,makerForExnTag) m cenv env overal

| Item.UnionCase(ucinfo,showDeprecated) ->
if showDeprecated then
let message = sprintf "The union type for union case '%s' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('%s') in the name you are using.'" ucinfo.Name ucinfo.Tycon.DisplayName
warning(Deprecated(message,m))
warning(Deprecated(FSComp.SR.nrUnionTypeNeedsQualifiedAccess(ucinfo.Name,ucinfo.Tycon.DisplayName) |> snd,m))

let ucref = ucinfo.UnionCaseRef
CheckUnionCaseAttributes cenv.g ucref m |> CommitOperationResult
Expand Down

0 comments on commit ef1fb6b

Please sign in to comment.