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-4091] Incorrect result shown in REPL for 'UInt8?' #4394

Closed
Bouke opened this issue Feb 27, 2017 · 9 comments
Closed

[SR-4091] Incorrect result shown in REPL for 'UInt8?' #4394

Bouke opened this issue Feb 27, 2017 · 9 comments
Assignees
Labels
bug Something isn't working LLDB for Swift REPL

Comments

@Bouke
Copy link

Bouke commented Feb 27, 2017

Previous ID SR-4091
Radar None
Original Reporter @Bouke
Type Bug
Status Resolved
Resolution Done
Environment

Feb 24, Swift 3.1 dev snapshot

Additional Detail from JIRA
Votes 2
Component/s LLDB for Swift
Labels Bug, REPL
Assignee @dcci
Priority Medium

md5: 019696cf1364b986ef151bb5fd4b0156

is duplicated by:

  • SR-4326 lldb prints strange numbers when interpreting optional unsigned values
  • SR-9703 REPL has incorrect summaries of optional unsigned integers

relates to:

  • SR-11593 REPL incorrectly reports URL as nil

Issue Description:

Welcome to Apple Swift version 3.1-dev (LLVM a7c680da51, Clang 2b4323722b, Swift 7e1648cd24). Type :help for assistance.
  1> UInt8("ff", radix: 16)
$R0: UInt8? = -1
  2> $R0!
$R1: UInt8 = 255
  3> UInt8("ff", radix: 16)!
$R2: UInt8 = 255
  4>
@CodaFi
Copy link
Member

CodaFi commented Feb 28, 2017

This one is an LLDB formatter problem.

@belkadan
Copy link

belkadan commented Mar 1, 2017

We were definitely supposed to have fixed it, though. SR-1007

@belkadan
Copy link

belkadan commented Mar 1, 2017

Ah, the Optional is significant.

@dcci
Copy link
Mannequin

dcci mannequin commented Oct 10, 2019

I'm going to take a look at this one tomorrow. Thanks

@dcci
Copy link
Mannequin

dcci mannequin commented Oct 14, 2019

Tomorrow ended up being 4 days later.

@dcci
Copy link
Mannequin

dcci mannequin commented Oct 14, 2019

This is what I see in the latest snapshot.

Welcome to Swift version 5.1.1-dev (LLVM 6e04008c7f, Swift 7032e652ee).
Type :help for assistance.
  1>  UInt8("ff", radix: 16)
$R0: UInt8? = 255
  2> $R0!
$R1: UInt8 = 255
  3> UInt8("ff", radix: 16)!
$R2: UInt8 = 255

@CodaFi
Copy link
Member

CodaFi commented Oct 14, 2019

@dcci This seems resolved. Do you know what would have changed to fix this?

@dcci
Copy link
Mannequin

dcci mannequin commented Oct 14, 2019

This is also <rdar://problem/37835998> and it was fixed by apple/swift-lldb#1793

@dcci
Copy link
Mannequin

dcci mannequin commented Oct 14, 2019

@CodaFi I guess I just replied to you, Robert 🙂

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
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 REPL
Projects
None yet
Development

No branches or pull requests

3 participants