Skip to content

[4.2] SR-1674: NSString.doubleValue doesn't support a few formats supported by Darwin #1930

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

Merged
merged 2 commits into from
Feb 22, 2019

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Feb 19, 2019

  • Don't require a digit before a leading decimal separator.

  • Support exponent specified by 'e' or 'E'.

(cherry picked from commit acb8cf7)

@spevans
Copy link
Contributor Author

spevans commented Feb 19, 2019

@swift-ci test 4.2

@spevans
Copy link
Contributor Author

spevans commented Feb 19, 2019

This broke due to a change made in CI for https://bugs.swift.org/browse/SR-9699 which should have only been applied to branches newer than swift-4.2-branch

cc @weissi @shahmishal

@weissi
Copy link
Contributor

weissi commented Feb 21, 2019

@swift-ci test 4.2

@shahmishal
Copy link
Member

@swift-ci test Linux

1 similar comment
@shahmishal
Copy link
Member

@swift-ci test Linux

@spevans
Copy link
Contributor Author

spevans commented Feb 22, 2019

@swift-ci test 4.2

@weissi
Copy link
Contributor

weissi commented Feb 22, 2019

@spevans this one genuinely failed:

12:20:56 
TestFoundation/TestNSString.swift:258:24: error: 'NSString' initializer is inaccessible due to 'internal' protection level
12:20:56         XCTAssertEqual(NSString(".2").doubleValue, 0.2)
12:20:56                        ^
12:20:56 <unknown>:0: note: 'init' declared here
12:20:56 TestFoundation/TestNSString.swift:259:24: error: 'NSString' initializer is inaccessible due to 'internal' protection level
12:20:56         XCTAssertEqual(NSString("+.2").doubleValue, 0.2)
12:20:56                        ^
12:20:56 <unknown>:0: note: 'init' declared here
12:20:56 TestFoundation/TestNSString.swift:260:24: error: 'NSString' initializer is inaccessible due to 'internal' protection level
12:20:56         XCTAssertEqual(NSString("-.2").doubleValue, -0.2)
12:20:56                        ^
12:20:56 <unknown>:0: note: 'init' declared here
12:20:56 TestFoundation/TestNSString.swift:261:24: error: 'NSString' initializer is inaccessible due to 'internal' protection level
12:20:56         XCTAssertEqual(NSString("1.23015e+3").doubleValue, 1230.15)
12:20:56                        ^
12:20:56 <unknown>:0: note: 'init' declared here
12:20:56 TestFoundation/TestNSString.swift:262:24: error: 'NSString' initializer is inaccessible due to 'internal' protection level
12:20:56         XCTAssertEqual(NSString("12.3015e+02").doubleValue, 1230.15)
12:20:56                        ^
12:20:56 <unknown>:0: note: 'init' declared here
12:20:56 TestFoundation/TestNSString.swift:263:24: error: 'NSString' initializer is inaccessible due to 'internal' protection level
12:20:56         XCTAssertEqual(NSString("+1.23015e+3").doubleValue, 1230.15)

@spevans
Copy link
Contributor Author

spevans commented Feb 22, 2019

Yeah I think its a testable imports issue, I'll look at it for the next release

@spevans
Copy link
Contributor Author

spevans commented Feb 22, 2019

@swift-ci test 4.2

… by Darwin

- Dont require a digit before a leading decimal separator.

- Support exponent specified by 'e' or 'E'.

(cherry picked from commit acb8cf7)
@spevans
Copy link
Contributor Author

spevans commented Feb 22, 2019

@swift-ci test 4.2

1 similar comment
@spevans
Copy link
Contributor Author

spevans commented Feb 22, 2019

@swift-ci test 4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants