Skip to content

Conversation

edgarfgp
Copy link
Contributor

@edgarfgp edgarfgp commented Sep 2, 2025

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for using commas as separators in named field patterns for discriminated union cases and exception patterns in F#, alongside the existing semicolon separators. The feature is gated behind the Preview language version and maintains backward compatibility while making pattern syntax consistent with construction syntax.

Key changes:

  • Parser modifications to accept both comma and semicolon separators in named field patterns
  • New diagnostic for inconsistent separator usage within the same pattern
  • Comprehensive test coverage for the new syntax

Reviewed Changes

Copilot reviewed 223 out of 223 changed files in this pull request and generated no comments.

File Description
Multiple .bsl files Updated syntax tree baseline files to reflect new separator representations in AST
Multiple .fs test files Added test cases covering comma-separated named field patterns and mixed separator error cases
Comments suppressed due to low confidence (5)

@edgarfgp edgarfgp closed this Sep 5, 2025
@edgarfgp edgarfgp reopened this Sep 5, 2025
@edgarfgp edgarfgp marked this pull request as ready for review September 8, 2025 20:09
@edgarfgp edgarfgp requested a review from a team as a code owner September 8, 2025 20:09
@edgarfgp edgarfgp force-pushed the allow-comma-as-name-field-separator branch from 3b95dad to a8fe750 Compare September 10, 2025 10:35
@edgarfgp edgarfgp marked this pull request as draft September 13, 2025 14:16
@edgarfgp
Copy link
Contributor Author

Going to split this PR in small ones to make easier to review

# Conflicts:
#	src/Compiler/Checking/CheckRecordSyntaxHelpers.fs
#	src/Compiler/Service/ServiceParseTreeWalk.fs
#	src/Compiler/SyntaxTree/SyntaxTree.fsi
#	src/Compiler/pars.fsy
@edgarfgp edgarfgp closed this Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant