Skip to content

Commit b1a7969

Browse files
CopilotT-Gro
andcommitted
Implement fix for voption with optional parameter syntax (?x=)
Based on analysis: 1. CheckExpressions.fs line 9937: Don't wrap caller arg type when SupportValueOptionsAsOptionalParameters feature is enabled 2. MethodCalls.fs CalleeSide branch: Return calledArgTy as-is This allows voption and option types to work with ?x= syntax by not creating double-wrapping when the parameter is already optional-typed. Related to #19074 Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com>
1 parent dd44d9a commit b1a7969

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Compiler/Checking/MethodCalls.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ let AdjustCalledArgTypeForOptionals (infoReader: InfoReader) ad enforceNullableO
379379

380380
// FSharpMethod(?x = arg), optional F#-style argument
381381
| CalleeSide ->
382-
// In this case, the called argument will already have option type
382+
// In this case, the called argument will already have option/voption type
383383
calledArgTy, TypeDirectedConversionUsed.No, None
384384

385385
| NotOptional ->

0 commit comments

Comments
 (0)