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

[Diagnostics]: Rewrite "no subscript members" error #17176

Merged
merged 1 commit into from Jun 13, 2018

Conversation

Projects
None yet
3 participants
@mdiep
Contributor

mdiep commented Jun 13, 2018

• Change name to match names of member diagnostics.

• Explicitly call out that this is a "value of type". This matches the error from non-existent methods and properties.

• Don't call them "subscript members". That term is never used in documentation and "member" doesn't add anything besides confusion.

Before:

 error: type 'Int' has no subscript members
_ = 2[foo: 1]
    ^

After:

error: value of type 'Int' has no subscripts
_ = 2[foo: 1]
    ^

Similar error for a missing method, for comparison:

error: value of type 'Int' has no member 'foo'
_ = 2.foo(1)
    ^ ~~~
[Diagnostics]: Rewrite "no subscript members" error
• Change name to match names of member diagnostics.

• Explicitly call out that this is a "value of type". This matches the error from non-existent methods and properties.

• Don't call them "subscript members". That term is never used in documentation and "member" doesn't add anything besides confusion.
@xedin

xedin approved these changes Jun 13, 2018

LGTM!

@xedin

This comment has been minimized.

Member

xedin commented Jun 13, 2018

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit a18dc11 into apple:master Jun 13, 2018

2 of 3 checks passed

Test and Merge (smoke test) Build started.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform (smoke test)
Details

@mdiep mdiep deleted the mdiep:no-subscript-members-error branch Jun 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment