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
189
189
// CSharpMethod(x = arg), optional C#-style argument, may have type Nullable<ty>.
190
190
// The arg should have type ty. However for backwards compat, we also allow arg to have type Nullable<ty>
191
191
| CallerSide _ ->
192
- if isNullableTy g calledArgTy && g.langVersion.SupportsFeature LanguageFeature.NullableOptionalInterop then
192
+ if isNullableTy g calledArgTy && g.langVersion.SupportsFeature LanguageFeature.NullableOptionalInterop then
193
193
// If inference has worked out it's a nullable then use this
194
194
if isNullableTy g callerArg.CallerArgumentType then
195
195
calledArgTy
@@ -1186,11 +1186,6 @@ let AdjustCallerArgForOptional tcFieldInit eCallerMemberName (infoReader: InfoRe
1186
1186
let minfo = GetIntrinsicConstructorInfosOfType infoReader m calledArgTy |> List.head
1187
1187
let callerArgExprCoerced = mkCoerceIfNeeded g calledNonOptTy callerArgTy callerArgExpr
1188
1188
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
1194
1189
else
1195
1190
// CSharpMethod(x=b) --> CSharpMethod(?x=b)
1196
1191
callerArgExpr
You can’t perform that action at this time.
0 commit comments