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-13498] Non-descriptive diagnostic when using implicitly unwrapped optional in a tuple #55940

Open
swift-ci opened this issue Sep 4, 2020 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation type checker Area → compiler: Semantic analysis

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Sep 4, 2020

Previous ID SR-13498
Radar rdar://problem/68376694
Original Reporter BrAGuS (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI, TypeChecker
Assignee None
Priority Medium

md5: 8630e048f85585fc6b8460a87f9a3846

Issue Description:

Hi

Why I can't use the unwrapped optional string in tuples?(

typealias studentTuple = (name: String!, vechNumber: String?, mark: Int?)

I have error "Using "!" is not allowed here"

@typesanitizer
Copy link

Implicitly unwrapped optionals are not a first-class type, they are only permitted in certain places. That said, we could improve the diagnostic here (maybe point you to some documentation which describes the places they are allowed?).

@typesanitizer
Copy link

@swift-ci create

@typesanitizer
Copy link

@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
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

2 participants