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-2143] Passing IUO type as parameter of Any.Type does not convert it to Optional type #44751

Open
swift-ci opened this issue Jul 21, 2016 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself standard library Area: Standard library umbrella

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-2143
Radar None
Original Reporter ilyapuchka (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler, Standard Library
Labels Bug
Assignee None
Priority Medium

md5: 5e7e9e54137bdb614b454149b904aa8f

Issue Description:

When IUO type is passed as a parameter of type Any.Type it is not converted to Optional type.

Example:

    let opt = (Int?).self
    let iuo = (Int!).self
    
    func printType(type: Any.Type) {
      print(type)
    }
    
    printType(type: opt) //Optional<Int>
    printType(type: iuo) //ImplicitlyUnwrappedOptional<Int>
@belkadan
Copy link
Contributor

Yeah, we just haven't finished implementing SE-0054 yet.

@swift-ci
Copy link
Collaborator Author

Comment by Jin Wang (JIRA)

Any updates?

@swift-ci
Copy link
Collaborator Author

swift-ci commented Oct 7, 2016

Comment by Ilya Puchka (JIRA)

Still happens in Xcode 8 GM

@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 standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

2 participants