MeasurementFormatter.string(from:) method not found
Originator: | ole.begemann | ||
Number: | rdar://27591536 | Date Originated: | 28-Jul-2016 07:17 PM |
Status: | Open | Resolved: | |
Product: | Developer Tools | Product Version: | Xcode 8 beta 3 (8S174q) |
Classification: | Other Bug | Reproducible: | Always |
Summary: Xcode does not find the correct MeasurementFormatter.string(from:) method for arguments of type Measurement. Steps to Reproduce: Paste this code into a playground or blank iOS project: import Foundation let distance = Measurement(value: 100, unit: UnitLength.kilometers) let formatter = MeasurementFormatter() let result = formatter.string(from: distance) Expected Results: Code compiles. Actual Results: // error: cannot invoke 'string' with an argument list of type '(from: Measurement<UnitLength>)' Regression: n/a Notes: See the attached playground. This workaround works: let result = formatter.string(for: distance)
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!