-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Unify representation of an implicit Index
indexer over an array and non-array types.
#57918
Unify representation of an implicit Index
indexer over an array and non-array types.
#57918
Conversation
… non-array types.
@jcouv, @dotnet/roslyn-compiler Please review. |
case BoundArrayAccess arrayAccess: | ||
return arrayAccess.Expression.Type; | ||
|
||
case BoundImplicitIndexerAccess { IndexerOrSliceAccess: BoundArrayAccess arrayAccess }: |
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.
nit: Consider commenting: this case is array[int]
and the one above is array[Index/Range]
#Pending
if (makeOffsetInput.ConstantValue is null) | ||
BoundExpression lengthAccess = RewriteLengthAccess(node, receiver); | ||
|
||
// ensure we evaluate the input before accessing length, unless it is an array length |
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.
why is array length different in terms of ordering? #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.
why is array length different in terms of ordering?
Because it is an IL instruction, not a property access. I.e. not observable. There is no change in behavior here, we are doing what we used to do.
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 Thanks (iteration 1)
@dotnet/roslyn-compiler For the second review. |
1 similar comment
@dotnet/roslyn-compiler For the second review. |
@dotnet/roslyn-compiler For the second review. |
No description provided.