-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CreateTupleTypeSymbol shouldn’t reset nullability element types to None if elementNullableAnnotations is a default array. #40348
Conversation
…ne if elementNullableAnnotations is default array. Fixes dotnet#40105.
Assert.True(tuple1.Equals(tuple2, TypeCompareKind.ConsiderEverything)); | ||
|
||
tuple2 = comp.CreateTupleTypeSymbol(elementTypes, elementNullableAnnotations: default); | ||
Assert.True(tuple1.Equals(tuple2, TypeCompareKind.ConsiderEverything)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} [](start = 8, length = 1)
Are we testing cases where elementTypes
has annotations and so does elementNullableAnnotations
? #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we testing cases where elementTypes has annotations and so does elementNullableAnnotations?
I believe existing tests below sufficiently cover these cases.
In reply to: 357434927 [](ancestors = 357434927)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any test where the annotations on elementTypes
are not None
and distinct from elementNullableAnnotations
.
In reply to: 357436843 [](ancestors = 357436843,357434927)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any test where the annotations on elementTypes are not None and distinct from elementNullableAnnotations.
This PR is focused on scenarios where elementNullableAnnotations
is default.
In reply to: 357776096 [](ancestors = 357776096,357436843,357434927)
@cston Do you have more feedback? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (commit 1)
Fixes #40105.