Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
List patterns: subsumption checking #53891
List patterns: subsumption checking #53891
Changes from 1 commit
8ddbf28
3a3f72a
a24334d
52e6be5
e3ce4fb
3625d2f
5a359d0
de4f14a
2beb033
0dfd167
ae7b003
787b93d
fa8a663
81d0e31
91dbb3a
f0adefa
e671bd9
0697233
0bb97b1
e5f1d86
cdcd434
242690f
ebd45ea
8ed4ca8
33ca394
eb44915
11ffabd
d79cb4c
7ca1ed7
ee90c56
dfa6b17
389b9d0
ce9e8c4
c82209c
b1d12cd
635080d
67dc48b
79c8fff
50f4b1d
9f38068
840812a
565a972
a20b47a
18cdab3
8d56fa8
a52aba1
24dcece
04d2de7
5c2625b
c86e44f
c5092df
bebe7b0
8b1cead
2ca2b0c
24f607d
3307706
cf73eab
7c63939
6e109de
ee27875
105f74f
ab253f7
aa99ba2
bfeecd6
418e644
f75e52a
2df2a20
18fcbdb
7c13399
b1d3a08
0e7737b
68a9ab6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 find this behavior odd (although it matches the spec we agreed). I'll add an LDM open issue to propose that both be errors. What do you think?
Opened dotnet/csharplang#5137 #Pending
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.
While there's no real-world scenario, I'd agree that doing this for both makes things less confusing in case the second property is added at a later point.
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.
It looks like the spec already implies that both should be errors: "Length or Count properties are assumed to always return a non-negative value, if and only if the type is indexable."
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 didn't mean it that way because "or" implies "either". Should be changed to "and" and we're on the same page.
Will go ahead and remove the symbol check. Best to be confirmed in LDM anyways though.