-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed type visibility when parent is namespace
- Loading branch information
Showing
2 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -826,24 +826,26 @@ module Helpers = | |
| FSharpInlineAnnotation.AlwaysInline | ||
| FSharpInlineAnnotation.AggressiveInline -> true | ||
|
||
let hasOwnSignatureFile (ent: FSharpEntity) = | ||
not ent.IsNamespace | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ncave
Author
Collaborator
|
||
&& ( | ||
match ent.SignatureLocation with | ||
| None -> false | ||
| Some m -> m.FileName.EndsWith(".fsi", StringComparison.Ordinal) | ||
) | ||
|
||
let parentHasSignatureFile (declaringEntity: FSharpEntity option) = | ||
declaringEntity | ||
|> Option.bind (fun p -> p.SignatureLocation) | ||
|> Option.map (fun m -> m.FileName.EndsWith(".fsi", StringComparison.Ordinal)) | ||
|> Option.map (fun ent -> hasOwnSignatureFile ent) | ||
|> Option.defaultValue false | ||
|
||
let topLevelBindingHiddenBySignatureFile (v: FSharpMemberOrFunctionOrValue) = | ||
v.IsModuleValueOrMember | ||
&& not v.HasSignatureFile | ||
&& parentHasSignatureFile v.DeclaringEntity | ||
|
||
let typeIsHiddenBySignatureFile (ent: FSharpEntity) : bool = | ||
let hasOwnSignatureFile = | ||
match ent.SignatureLocation with | ||
| None -> false | ||
| Some m -> m.FileName.EndsWith(".fsi", StringComparison.Ordinal) | ||
|
||
not hasOwnSignatureFile && parentHasSignatureFile ent.DeclaringEntity | ||
let typeIsHiddenBySignatureFile (ent: FSharpEntity) = | ||
not (hasOwnSignatureFile ent) && parentHasSignatureFile ent.DeclaringEntity | ||
|
||
let isNotPrivate (memb: FSharpMemberOrFunctionOrValue) = | ||
if memb.IsCompilerGenerated then | ||
|
Hi @ncave, I'm a little confused by this change.
Why are things different with a namespace?