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-801] TestPOUnwrapping.py - PO for optional class members set to nil are showing up as if 0 or "" #4536

Open
trfiala mannequin opened this issue Feb 23, 2016 · 2 comments
Labels
bug Something isn't working LLDB for Swift

Comments

@trfiala
Copy link
Mannequin

trfiala mannequin commented Feb 23, 2016

Previous ID SR-801
Radar None
Original Reporter @trfiala
Type Bug
Environment

Ubuntu 15.10 x86_64

Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug
Assignee granataenrico (JIRA)
Priority Medium

md5: c9aa07c8aaa4b7beb7162c8ddd4fc6b5

relates to:

  • SR-10931 Optional initialization inconsistent between Optional vs T?

Issue Description:

String and Double optional values intialized to nil are getting POed as:

1> class Foo<T,U> {
var t: T?
var u: U?
init() { t = nil; u = nil }
init(_ x: T, _ y: U) { t = x; u = y }
};(Foo<String,Double>(),Foo<Double,String>(3.14,"hello"))
1> class Foo<T,U> {
2. var t: T?
3. var u: U?
4. init() { t = nil; u = nil }
5. init(_ x: T, _ y: U) { t = x; u = y }
6. };(Foo<String,Double>(),Foo<Double,String>(3.14,"hello"))
$R0: (Foo<String, Double>, Foo<Double, String>) = {
0 = {
t = ""
u = 0
}
1 = {
t = 3.1400000000000001
u = "hello"
}
}

Note the default initializer of the class instance should have had t and u print out as nil.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Feb 23, 2016

This is currently in the merge branch.

@Dante-Broggi
Copy link

Is this resolved, or no longer valid? If either, this should be closed.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working LLDB for Swift
Projects
None yet
Development

No branches or pull requests

1 participant