Skip to content

Commit 37ee1c8

Browse files
author
7sharp9
committed
Make failure an empty readonly collection
Empty collections are much better than exceptions.
1 parent 196b946 commit 37ee1c8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/fsharp/vs/Symbols.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,8 +1411,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
14111411
|> List.map (fun arg -> FSharpParameter(cenv, arg, { Name=None; Attribs= [] }, x.DeclarationLocationOpt, false, false, false))
14121412
|> makeReadOnlyCollection ]
14131413
|> makeReadOnlyCollection
1414-
else
1415-
failwith "not a module let binding or member"
1414+
else makeReadOnlyCollection []
14161415
| Some (ValReprInfo(_typars,curriedArgInfos,_retInfo)) ->
14171416
let tau = v.TauType
14181417
let argtysl,_ = GetTopTauTypeInFSharpForm cenv.g curriedArgInfos tau range0

0 commit comments

Comments
 (0)