Skip to content

[SR-1464] NSNumber.description is not compatible between OS X and linux #4155

Closed
@norio-nomura

Description

@norio-nomura
Previous ID SR-1464
Radar None
Original Reporter @norio-nomura
Type Bug
Status Resolved
Resolution Done
Environment

swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a
OS X 10.11.4 (15E65)
Ubuntu 14.04

Additional Detail from JIRA
Votes 1
Component/s Foundation
Labels Bug, Linux
Assignee None
Priority Medium

md5: 60bfdbad742f50ecf9595cbf5c19db84

Issue Description:

Using swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a.
On OS X:

Welcome to Apple Swift version 3.0-dev (LLVM dffa09ffd8, Clang 9f0d189820, Swift 1c720b8f84). Type :help for assistance.
  1> import Foundation 
  2> let n = NSNumber(value: 0.001) 
n: NSNumber = Double(0.001)
  3> n.description 
$R0: String = "0.001"
  4>  

On Ubuntu 14.04:

Welcome to Swift version 3.0-dev (LLVM dffa09ffd8, Clang 9f0d189820, Swift 1c720b8f84). Type :help for assistance.
  1> import Foundation
  2> let n = NSNumber(value:0.001)
n: Foundation.NSNumber = {
  Foundation.NSValue = {
    Foundation.NSObject = {}
  }
  _base = {
    info = 5766
    pad = 0
  }
  _pad = 4562254508917369340
}
  3> n.description
$R0: String = ".001"
  4>  

OS X: "0.001"
Linux: ".001"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions