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-1007] Unsigned integer types have incorrect max values #4532

Closed
swift-ci opened this issue Mar 21, 2016 · 2 comments
Closed

[SR-1007] Unsigned integer types have incorrect max values #4532

swift-ci opened this issue Mar 21, 2016 · 2 comments
Labels
bug Something isn't working Linux LLDB for Swift

Comments

@swift-ci
Copy link

Previous ID SR-1007
Radar None
Original Reporter zge (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

Swift version 2.2-dev (LLVM 846c513aa9, Clang 71eca7da8e, Swift 96628e41cc).

Ubuntu 14.04.4 LTS, 64-bit.

Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug, Linux
Assignee None
Priority Medium

md5: 0c152f5b9414e29ac9fa85e37af3f6ae

is duplicated by:

  • SR-1138 Unsigned types display as signed in REPL (UInt8, UInt16, UInt32, UInt64)
  • SR-1751 Debugger shows data not matching the type of a variable

Issue Description:

For all unsigned integer types, the max property has a value of -1 instead of a correct positive value. However, when try to print these values, the output IS correct.

For example, in Swift REPL, UInt8.max is evaluated to -1, but print(UInt8.max) will generate the correct output, 255. Same applies to all other unsigned integer types.

How to reproduce:
1, launch Swift REPL
2, type UInt8.max

@belkadan
Copy link

granataenrico (JIRA User), was this a presentation issue we already fixed?

@swift-ci
Copy link
Author

Comment by Enrico Granata (JIRA)

I believe so, yes. I remember an internal report of this, and it should be fixed in trunk.

@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
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 Linux LLDB for Swift
Projects
None yet
Development

No branches or pull requests

2 participants