Skip to content

fix: improve member signature type parsing for tuples and curried types#173

Draft
alexdarch wants to merge 1 commit intoionide:mainfrom
alexdarch:fix/member-signature-types
Draft

fix: improve member signature type parsing for tuples and curried types#173
alexdarch wants to merge 1 commit intoionide:mainfrom
alexdarch:fix/member-signature-types

Conversation

@alexdarch
Copy link
Copy Markdown
Contributor

@alexdarch alexdarch commented Apr 4, 2026

Summary

  • Add _argument_type subset that excludes compound_type and function_type, used in
    argument_spec so that * and -> in argument position are parsed as separate positional
    arguments rather than tuple/function types
  • Add _curried_return_type subset that excludes function_type, used in curried_spec so
    -> is consumed by the argument repeat rather than parsed as a function return type
  • Add matching conflict declarations to fsharp_signature/grammar.js

Before this fix

abstract member Query : string -> string * string would incorrectly parse string *
string as a tuple-typed argument rather than a tuple return type.

Add _argument_type and _curried_return_type type subsets to correctly
parse member signatures. Before this fix, `string -> string * string`
in a member signature would incorrectly parse `*` as part of a tuple
argument type rather than a tuple return type.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alexdarch alexdarch marked this pull request as draft April 4, 2026 12:11
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.

1 participant