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

Commit6f18752

Browse files
committed
moved error message to resources
1 parentf6e469b commit6f18752

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎src/fsharp/FSComp.txt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1328,4 +1328,5 @@ descriptionUnavailable,"(description unavailable...)"
13281328
3176,tcFieldNameIsUsedModeThanOnce,"Named field '%s' is used more than once."
13291329
3176,tcFieldNameConflictsWithGeneratedNameForAnonymousField,"Named field '%s' conflicts with autogenerated name for anonymous field."
13301330
3177,tastConstantExpressionOverflow,"This literal expression or attribute argument results in an arithmetic overflow."
1331-
3178,tcIllegalStructTypeForConstantExpression,"This is not valid literal expression. The [<Literal>] attribute will be ignored."
1331+
3178,tcIllegalStructTypeForConstantExpression,"This is not valid literal expression. The [<Literal>] attribute will be ignored."
1332+
3179,fscSystemRuntimeInteropServicesIsRequired,"System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes."

‎src/fsharp/tc.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8932,15 +8932,15 @@ and TcMethodApplication
89328932
emptyPreBinder,Expr.Const(TcFieldInit mMethExpr fieldInit,mMethExpr,calledArgTy)
89338933
| WrapperForIDispatch ->
89348934
match cenv.g.ilg.traits.SystemRuntimeInteropServicesScopeRef.Value with
8935-
| None -> error(Error((42, "Current .NET profile does not include System.Runtime.InteropServices"), mMethExpr))
8935+
| None -> error(Error(FSComp.SR.fscSystemRuntimeInteropServicesIsRequired(), mMethExpr))
89368936
| Some assemblyRef ->
89378937
let tref = mkILNonGenericBoxedTy(mkILTyRef(assemblyRef, "System.Runtime.InteropServices.DispatchWrapper"))
89388938
let mref = mkILCtorMethSpecForTy(tref,[cenv.g.ilg.typ_Object]).MethodRef
89398939
let expr = Expr.Op(TOp.ILCall(false,false,false,false,CtorValUsedAsSuperInit,false,false,mref,[],[],[cenv.g.obj_ty]),[],[mkDefault(mMethExpr,calledArgTy)],mMethExpr)
89408940
emptyPreBinder,expr
89418941
| WrapperForIUnknown ->
89428942
match cenv.g.ilg.traits.SystemRuntimeInteropServicesScopeRef.Value with
8943-
| None -> error(Error((42, "Current .NET profile does not include System.Runtime.InteropServices"), mMethExpr))
8943+
| None -> error(Error(FSComp.SR.fscSystemRuntimeInteropServicesIsRequired(), mMethExpr))
89448944
| Some assemblyRef ->
89458945
let tref = mkILNonGenericBoxedTy(mkILTyRef(assemblyRef, "System.Runtime.InteropServices.UnknownWrapper"))
89468946
let mref = mkILCtorMethSpecForTy(tref,[cenv.g.ilg.typ_Object]).MethodRef

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp