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-3564] Cannot display String:"OK" when using REPL #4645

Closed
swift-ci opened this issue Jan 6, 2017 · 6 comments
Closed

[SR-3564] Cannot display String:"OK" when using REPL #4645

swift-ci opened this issue Jan 6, 2017 · 6 comments
Labels
bug Something isn't working LLDB for Swift

Comments

@swift-ci
Copy link

swift-ci commented Jan 6, 2017

Previous ID SR-3564
Radar None
Original Reporter gomi_ningen (JIRA User)
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 8
Component/s LLDB for Swift
Labels Bug
Assignee None
Priority Medium

md5: b0bfded3646bbe3e2ca1d3903b871aa6

Issue Description:

Try the following:

% swift
Welcome to Apple Swift version 3.0.1 (swiftlang-800.0.58.6 clang-800.0.42.1). Type :help for assistance.
  1> let ok = "OK"
ok: String = unable to read data
  2> let ng = "NG"
ng: String = "NG"
  3> ok + ng
$R0: String = "OKNG"

also happens on Swift 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1)

@swift-ci
Copy link
Author

swift-ci commented Feb 7, 2017

Comment by Jim Ingham (JIRA)

That is quite odd. It seems specific to assigning the specific string "OK" to a variable. It doesn't matter whether it is initialized to "OK" or whether you assign it afterwards, we fail to print it.

@swift-ci
Copy link
Author

swift-ci commented Feb 8, 2017

Comment by Giampaolo Papotti (JIRA)

Unbelievable![]( We got crazy before realising it's a swift bug)!!

@swift-ci
Copy link
Author

swift-ci commented Feb 8, 2017

Comment by Jim Ingham (JIRA)

Not specific to the REPL, though I guess that's not surprising:

(lldb) expr let $my_var = "OK"
(lldb) expr $my_var
(String) $R0 = unable to read data

@swift-ci
Copy link
Author

Comment by Josh Lieberman (JIRA)

Same thing with the - character:

@ahti
Copy link

ahti commented Jan 9, 2019

This seems to have been fixed at some point. I can't reproduce it using 4.2.1 at least.

Can anyone still come up with a way to reproduce this?

@dcci
Copy link
Mannequin

dcci mannequin commented Jul 25, 2019

The formatter for string has been rewritten at least a couple of times since this was reported, and the bug doesn't reproduce anymore.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 9, 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 LLDB for Swift
Projects
None yet
Development

No branches or pull requests

2 participants