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

Commit32307ff

Browse files
committed
update for methods defined in IL and provided methods
1 parent5e7517b commit32307ff

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

‎src/fsharp/infos.fs‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,10 +1195,15 @@ type MethInfo =
11951195
| ILMeth(g,ilMethInfo,_)->
11961196
[[for pin ilMethInfo.ParamMetadatado
11971197
letisParamArrayArg= TryFindILAttribute g.attrib_ParamArrayAttribute p.CustomAttrs
1198+
letreflArgInfo=
1199+
match TryDecodeILAttribute g g.attrib_ReflectedDefinitionAttribute.TypeRef(Some(g.attrib_ReflectedDefinitionAttribute.TypeRef.Scope)) p.CustomAttrswith
1200+
| Some([ILAttribElem.Bool b],_)-> ReflectedArgInfo.Quote b
1201+
| Some_-> ReflectedArgInfo.Quotefalse
1202+
|_-> ReflectedArgInfo.None
11981203
letisOutArg=(p.IsOut&&not p.IsIn)
11991204
// Note: we get default argument values from VB and other .NET language metadata
12001205
letoptArgInfo= OptionalArgInfo.FromILParameter g amap m ilMethInfo.MetadataScope ilMethInfo.DeclaringTypeInst p
1201-
yield(isParamArrayArg, isOutArg, optArgInfo,ReflectedArgInfo.None)]]
1206+
yield(isParamArrayArg, isOutArg, optArgInfo,reflArgInfo)]]
12021207

12031208
| FSMeth(g,_,vref,_)->
12041209
GetArgInfosOfMember x.IsCSharpStyleExtensionMember g vref
@@ -1223,7 +1228,12 @@ type MethInfo =
12231228
[[for pin mi.PApplyArray((fun mi-> mi.GetParameters()),"GetParameters", m)do
12241229
letisParamArrayArg= p.PUntaint((fun px->(px:> IProvidedCustomAttributeProvider).GetAttributeConstructorArgs(p.TypeProvider.PUntaintNoFailure(id), typeof<System.ParamArrayAttribute>.FullName).IsSome),m)
12251230
letoptArgInfo= OptionalArgInfoOfProvidedParameter amap m p
1226-
yield(isParamArrayArg, p.PUntaint((fun p-> p.IsOut), m), optArgInfo, ReflectedArgInfo.None)]]
1231+
letreflArgInfo=
1232+
match p.PUntaint((fun px->(px:> IProvidedCustomAttributeProvider).GetAttributeConstructorArgs(p.TypeProvider.PUntaintNoFailure(id), typeof<Microsoft.FSharp.Core.ReflectedDefinitionAttribute>.FullName)),m)with
1233+
| Some[ Some(:? boolas b)]-> ReflectedArgInfo.Quote b
1234+
| Some_-> ReflectedArgInfo.Quotefalse
1235+
| None-> ReflectedArgInfo.None
1236+
yield(isParamArrayArg, p.PUntaint((fun p-> p.IsOut), m), optArgInfo, reflArgInfo)]]
12271237
#endif
12281238

12291239

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp