-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make .Is* discriminated union properties visible #16341
Changes from all commits
3e7a522
ba0a744
a7e8f23
808d5b4
1c176fa
de5dd73
7c0f4dd
453b79b
fd23df7
d861caf
c46df5e
c03e3cf
13891f0
de1b8a1
2b18f4f
a504fa5
c5f8ee0
3323fd7
aadca65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1933,6 +1933,9 @@ module TastDefinitionPrinting = | |
let props = | ||
GetImmediateIntrinsicPropInfosOfType (None, ad) g amap m ty | ||
|> List.filter (fun pinfo -> shouldShow pinfo.ArbitraryValRef) | ||
// Filter out 'IsA' properties which are implied by the union cases since they don't need to be displayed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just for my education - what are some examples of the printed outputs here? As in, are we sure it doesn't ever make sense to show these? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any DU properties you define. |
||
// in any printed outputs | ||
|> List.filter (fun prop -> not prop.IsUnionCaseTester) | ||
|
||
let events = | ||
infoReader.GetEventInfosOfType(None, ad, m, ty) | ||
|
@@ -1960,6 +1963,7 @@ module TastDefinitionPrinting = | |
IsMethInfoAccessible amap m ad minfo && | ||
// Discard method impls such as System.IConvertible.ToBoolean | ||
not (minfo.IsILMethod && minfo.DisplayName.Contains(".")) && | ||
not minfo.IsUnionCaseTester && | ||
not (minfo.DisplayName.Split('.') |> Array.exists isDiscard)) | ||
|
||
let ilFields = | ||
|
@@ -2017,7 +2021,7 @@ module TastDefinitionPrinting = | |
let instanceValLs = | ||
instanceVals | ||
|> List.map (fun f -> layoutRecdField (fun l -> WordL.keywordVal ^^ l) true denv infoReader tcref f) | ||
|
||
let propLs = | ||
props | ||
|> List.collect (fun x -> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should be decopypasted :)