Skip to content
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

[SR-3190] Misleading error message: cannot subscript a value of type 'inout [PathPoint]' with optional field #45778

Open
swift-ci opened this issue Nov 12, 2016 · 1 comment
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation improvement type checker Area → compiler: Semantic analysis

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-3190
Radar None
Original Reporter rmann (JIRA User)
Type Improvement

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, DiagnosticsQoI, TypeChecker
Assignee None
Priority Medium

md5: 1e7073afd5cd3139cc5bda61b452b44c

Issue Description:

The attached playground has the following code, and gets this error on the last line. The real problem is that anchorPt is Optional. This is in Xcode 8.1.

@swift-ci
Copy link
Collaborator Author

Comment by Rick M (JIRA)

@belkadan commented on the mailing list:

The error seems to be a little better in master:

<stdin>:20:11: error: cannot convert value of type 'CGPoint?' to expected argument type 'inout CGPoint'
points[0].anchorPt += dv
~~~~~~~~~~^~~~~~~~

but that's still not great.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation improvement type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

1 participant