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

Commitef1fb6b

Browse files
committed
Put Deprecated message into FSComp.txt - relates todotnet#95
1 parentfa5e972 commitef1fb6b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/fsharp/FSComp.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,7 @@ lexfltSeparatorTokensOfPatternMatchMisaligned,"The '|' tokens separating rules o
10221022
1130,nrInvalidFieldLabel,"Invalid field label"
10231023
1132,nrInvalidExpression,"Invalid expression '%s'"
10241024
1133,nrNoConstructorsAvailableForType,"No constructors are available for the type '%s'"
1025+
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.""
10251026
# -----------------------------------------------------------------------------
10261027
# ilwrite.fs errors
10271028
# -----------------------------------------------------------------------------

‎src/fsharp/tc.fs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,8 +1878,7 @@ let rec ApplyUnionCaseOrExn (makerForUnionCase,makerForExnTag) m cenv env overal
18781878

18791879
| Item.UnionCase(ucinfo,showDeprecated) ->
18801880
if showDeprecated then
1881-
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
1882-
warning(Deprecated(message,m))
1881+
warning(Deprecated(FSComp.SR.nrUnionTypeNeedsQualifiedAccess(ucinfo.Name,ucinfo.Tycon.DisplayName) |> snd,m))
18831882

18841883
let ucref = ucinfo.UnionCaseRef
18851884
CheckUnionCaseAttributes cenv.g ucref m |> CommitOperationResult

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp