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

Commitda1a000

Browse files
authored
fix 719 - traverse abstract slots for unsolved (#3273)
* fix 719 - traverse abstract slots for unsolved* fix test
1 parentd7f1358 commitda1a000

File tree

4 files changed

+35
-2
lines changed

4 files changed

+35
-2
lines changed

‎src/fsharp/FindUnsolved.fs‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,13 @@ and accDiscrim cenv env d =
165165
accTypeInst cenv env tys
166166

167167
andaccAttrib cenv env(Attrib(_,_k,args,props,_,_,_m))=
168-
args|> List.iter(fun(AttribExpr(e1,_))-> accExpr cenv env e1)
169-
props|> List.iter(fun(AttribNamedArg(_nm,_ty,_flg,AttribExpr(expr,_)))-> accExpr cenv env expr)
168+
args|> List.iter(fun(AttribExpr(expr1,expr2))->
169+
accExpr cenv env expr1
170+
accExpr cenv env expr2)
171+
props|> List.iter(fun(AttribNamedArg(_nm,ty,_flg,AttribExpr(expr,expr2)))->
172+
accExpr cenv env expr
173+
accExpr cenv env expr2
174+
accTy cenv env ty)
170175

171176
andaccAttribs cenv env attribs= List.iter(accAttrib cenv env) attribs
172177

@@ -199,6 +204,7 @@ let accTyconRecdField cenv env _tycon (rfield:RecdField) =
199204

200205
letaccTycon cenv env(tycon:Tycon)=
201206
accAttribs cenv env tycon.Attribs
207+
abstractSlotValsOfTycons[tycon]|> List.iter(accVal cenv env)
202208
tycon.AllFieldsArray|> Array.iter(accTyconRecdField cenv env tycon)
203209
if tycon.IsUnionTyconthen(* This covers finite unions.*)
204210
tycon.UnionCasesAsList|> List.iter(fun uc->

‎tests/fsharp/core/attributes/test.fsx‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,14 @@ module BugWithOverloadedAttributes =
13331333
[<FooAttribute(value=42)>]
13341334
typeBar=classend
13351335

1336+
moduleBug719b=
1337+
1338+
openTestLibModule.Bug719
1339+
1340+
typeBar=
1341+
interface IFoowith
1342+
member__.Test(?value:int)= value.ToString()
1343+
13361344
(*-------------------------------------------------------------------------
13371345
!* Test passed?
13381346
*-------------------------------------------------------------------------*)

‎tests/fsharp/core/attributes/testlib.fs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,11 @@ module TypeParamAttributesDifferent =
118118
typeThisLibAssembly= X| Y
119119

120120

121+
#if!FX_PORTABLE_OR_NETSTANDARD
122+
moduleBug719=
123+
124+
openSystem.Runtime.InteropServices
125+
126+
typeIFoo=
127+
abstractTest :[<DefaultParameterValueAttribute(null)>]?value:int->string
128+
#endif

‎tests/fsharp/core/attributes/testlib.fsi‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,14 @@ module TypeParamAttributesDifferent =
100100
valx4<[<System.CLSCompliantAttribute(true)>]'T>:'T->'T
101101

102102
typeThisLibAssembly
103+
104+
105+
106+
#if!FX_PORTABLE_OR_NETSTANDARD
107+
moduleBug719=
108+
109+
openSystem.Runtime.InteropServices
110+
111+
typeIFoo=
112+
abstractTest :[<DefaultParameterValueAttribute(null)>]?value:int->string
113+
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp