Skip to content

[SR-2477] NumberFormatter.string(for:) only works with NSNumber #4333

Closed
@swift-ci

Description

@swift-ci
Previous ID SR-2477
Radar None
Original Reporter vadim (JIRA User)
Type Task
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Task, Linux
Assignee @pushkarnk
Priority Medium

md5: 8a45949926d76ca55335b6a0fb493e31

Issue Description:

NumberFormatter.string(for:) does not work with Double, for example.

https://github.com/apple/swift-corelibs-foundation/blob/12f9dd2b8916bb120dff52350ceca54417ebb8ae/Foundation/NSNumberFormatter.swift#L88

guard let number = obj as? NSNumber else { return nil }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions