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

Commit87ebbac

Browse files
dsymeTIHan
authored andcommitted
1 parent7dbfae8 commit87ebbac

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

‎src/fsharp/symbols/Symbols.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) =
475475

476476
member__.IsByRef=
477477
isResolved()&&
478-
tyconRefEq cenv.g cenv.g.byref_tcr entity
478+
isByrefTyconRef cenv.g entity
479479

480480
member__.IsOpaque=
481481
isResolved()&&

‎tests/service/ProjectAnalysisTests.fs‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3811,6 +3811,10 @@ let ``Test Project26 parameter symbols`` () =
38113811
letobjSymbol= wholeProjectResults.GetAllUsesOfAllSymbols()|> Async.RunSynchronously|> Array.find(fun su-> su.Symbol.DisplayName="Class")
38123812
letobjEntity= objSymbol.Symbol:?> FSharpEntity
38133813

3814+
let recisByRef(ty:FSharpType)=
3815+
if ty.IsAbbreviationthen isByRef ty.AbbreviatedType
3816+
else ty.IsNamedType&& ty.NamedEntity.IsByRef
3817+
38143818
// check we can get the CurriedParameterGroups
38153819
letobjMethodsCurriedParameterGroups=
38163820
[for xin objEntity.MembersFunctionsAndValuesdo
@@ -3823,14 +3827,14 @@ let ``Test Project26 parameter symbols`` () =
38233827
if p.IsOptionalArgthenyield"optional"
38243828
}
38253829
|> String.concat","
3826-
yield x.CompiledName, p.Name, p.Type.ToString(), attributeNames]
3830+
yield x.CompiledName, p.Name, p.Type.ToString(),isByRef p.Type,attributeNames]
38273831

38283832
objMethodsCurriedParameterGroups|> shouldEqual
3829-
[("M1", Some"arg1","type 'c","");
3830-
("M1", Some"arg2","type 'd Microsoft.FSharp.Core.option","optional");
3831-
("M2", Some"arg1","type 'a","params");
3832-
("M2", Some"arg2","type 'b","optional");
3833-
("M3", Some"arg","type Microsoft.FSharp.Core.byref<Microsoft.FSharp.Core.int>","out")]
3833+
[("M1", Some"arg1","type 'c",false,"");
3834+
("M1", Some"arg2","type 'd Microsoft.FSharp.Core.option",false,"optional");
3835+
("M2", Some"arg1","type 'a",false,"params");
3836+
("M2", Some"arg2","type 'b",false,"optional");
3837+
("M3", Some"arg","type Microsoft.FSharp.Core.byref<Microsoft.FSharp.Core.int>",true,"out")]
38343838

38353839
// check we can get the ReturnParameter
38363840
letobjMethodsReturnParameter=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp