From 90f4fc80e23e0a07b16b1a38c14be919a7abee5c Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Thu, 15 Dec 2016 17:02:14 +0100 Subject: [PATCH] cleanup --- src/fsharp/NameResolution.fs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fsharp/NameResolution.fs b/src/fsharp/NameResolution.fs index e145ed0ab764..3c91c01043c3 100644 --- a/src/fsharp/NameResolution.fs +++ b/src/fsharp/NameResolution.fs @@ -864,9 +864,9 @@ let rec CollectAtMostOneResult f = function | [] -> NoResultsOrUsefulErrors | [h] -> OneResult (f h) | h :: t -> - match OneResult (f h) with - | Result r when not (isNil r) -> Result r - | r -> AddResults r (CollectAtMostOneResult f t) + match f h with + | Result r -> Result [r] + | Exception e -> AddResults (Exception e) (CollectAtMostOneResult f t) let CollectResults2 atMostOne f = if atMostOne then CollectAtMostOneResult f else CollectResults f