Skip to content
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

Inlay hints/PatternTypeHintsStage: support match clause #756

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DedSec256
Copy link
Contributor

@DedSec256 DedSec256 commented Oct 31, 2024

{BEB256F4-5DD9-481A-8B66-8929F26EA3BB}

  • FCS update

@DedSec256 DedSec256 marked this pull request as ready for review October 31, 2024 15:01
@auduchinok
Copy link
Member

@DedSec256 Do you think it could make sense to introduce another option, so hints for bindings/parameter declarations could be controlled separately? With both currently defaulting to 'push-to-hint' it doesn't make much difference, but I'm also trying to imagine if somebody could want to make the declaration hints be always shown while keep the 'match' ones in push-to-hint mode.

@DedSec256 DedSec256 force-pushed the ber.a/matchClausePatterns branch from 3297ca0 to 5ce6bfb Compare November 7, 2024 23:26
@@ -41,34 +41,34 @@ let g||(15) = fun x -> ()

type A(x||(16)) =
do
let x||(17) = 3
Copy link
Contributor Author

@DedSec256 DedSec256 Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidentally fixed the case when hints showed for some local bindings even if it was disabled

@DedSec256
Copy link
Contributor Author

DedSec256 commented Nov 7, 2024

Perhaps, we can name it Match clause patterns

image

@auduchinok
Copy link
Member

auduchinok commented Nov 8, 2024

Perhaps, we can name it Match clause patterns

"Clause" sounds like a rather technical term to me. I've never heard it from non-compiler people. Something like "patterns" or "branches" may sound much more user-friendly here, I think?

@DedSec256 DedSec256 requested a review from auduchinok November 8, 2024 13:36
@@ -130,6 +130,21 @@ let (|String|) (x: MyStruct) : string = String(x.myString)

let f1 (x & Int(i) & String(s)) = ()


let _ = function x -> ()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about splitting this test files into smaller ones, so it could be easier to think about unrelated cases separately?

member _.Dispose(): unit = ()

let delimiter (delim1, delim2, value) =
{ new IFormattable with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really a part of match-related test?

If the idea here is to test how different settings work, can these tests be simplified to only include minimal code needed for such tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to suggest we refactor these tests in a separate pull request.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sounds good. Maybe we should merge the refactor first then.

@DedSec256 DedSec256 force-pushed the ber.a/matchClausePatterns branch from 21e091f to 38d2c7e Compare December 7, 2024 22:54
@DedSec256 DedSec256 force-pushed the ber.a/matchClausePatterns branch from 38d2c7e to c476a56 Compare December 16, 2024 19:39
@DedSec256 DedSec256 requested a review from auduchinok December 16, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants