-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-CompilersBugFeature - Nullable Semantic ModelNullable Semantic Model IssuesNullable Semantic Model Issues
Description
See IdentityConversion_NullCoalescingOepration_02. ApplyArgumentConversion is applying the result of the conversion to the underlying BoundNullCoalescingOperator, which isn't what was intended. Original text of the affected part of the test is below.
static void F1(IIn<object>? x1, IIn<object?>? y1)
{
FIn((x1 ?? y1)/*T:IIn<object!>?*/); // This is returning IIn<object?>?
FIn((y1 ?? x1)/*T:IIn<object!>?*/); // This is returning IIn<object?>?
}
static void F3(object? x3, object? y3)
{
FIn((FIn(x3) ?? FIn(y3))/*T:IIn<object?>?*/); // A
if (x3 == null) return;
FIn((FIn(x3) ?? FIn(y3))/*T:IIn<object!>?*/); // B
FIn((FIn(y3) ?? FIn(x3))/*T:IIn<object!>?*/); // C
if (y3 == null) return;
FIn((FIn(x3) ?? FIn(y3))/*T:IIn<object!>?*/); // D
}Metadata
Metadata
Assignees
Labels
Area-CompilersBugFeature - Nullable Semantic ModelNullable Semantic Model IssuesNullable Semantic Model Issues