File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ let AdjustCalledArgTypeForOptionals (g: TcGlobals) enforceNullableOptionalsKnown
189189 // CSharpMethod(x = arg), optional C#-style argument, may have type Nullable<ty>.
190190 // The arg should have type ty. However for backwards compat, we also allow arg to have type Nullable<ty>
191191 | CallerSide _ ->
192- if isNullableTy g calledArgTy && g.langVersion.SupportsFeature LanguageFeature.NullableOptionalInterop then
192+ if isNullableTy g calledArgTy && g.langVersion.SupportsFeature LanguageFeature.NullableOptionalInterop then
193193 // If inference has worked out it's a nullable then use this
194194 if isNullableTy g callerArg.CallerArgumentType then
195195 calledArgTy
@@ -1186,11 +1186,6 @@ let AdjustCallerArgForOptional tcFieldInit eCallerMemberName (infoReader: InfoRe
11861186 let minfo = GetIntrinsicConstructorInfosOfType infoReader m calledArgTy |> List.head
11871187 let callerArgExprCoerced = mkCoerceIfNeeded g calledNonOptTy callerArgTy callerArgExpr
11881188 MakeMethInfoCall amap m minfo [] [ callerArgExprCoerced]
1189- elif isOptionTy g calledArgTy then
1190- // CSharpMethod(x=b) when 'b' has nullable type and 'x' has optional type --> CSharpMethod(Some b.Value)
1191- let calledNonOptTy = destOptionTy g calledArgTy
1192- let callerArgExprCoerced = mkCoerceIfNeeded g calledNonOptTy callerArgTy callerArgExpr
1193- mkSome g ( destNullableTy g callerArgTy) callerArgExprCoerced m
11941189 else
11951190 // CSharpMethod(x=b) --> CSharpMethod(?x=b)
11961191 callerArgExpr
You can’t perform that action at this time.
0 commit comments