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-7698] String literal enum cases with unicode scalar literals not printed properly #50238

Closed
johnfairh opened this issue May 16, 2018 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@johnfairh
Copy link
Contributor

Previous ID SR-7698
Radar None
Original Reporter @johnfairh
Type Bug
Status Resolved
Resolution Done
Environment

Tip of master.

Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Bug
Assignee @johnfairh
Priority Medium

md5: c75f7d17689ea06904a9119851d689b9

Issue Description:

Given:

public enum Test: String {
    case fine = "f"
    case broken = "\u{1B}"
}

...Xcode quick help fails on the `broken` symbol.

@johnfairh
Copy link
Contributor Author

There's some quoting missing on printing the string literal into the SourceKit XML structures.

@johnfairh
Copy link
Contributor Author

#16746

The code, for any kind of literal, regenerates a form of the parsed expression which could be spelt differently from but is guaranteed equivalent to the original code. For example:
case a = 123_456 => case a = 123456
case b = “{001b}” => case b = “{1B}”
case c = “{66}” => case c = “f”

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 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 A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

1 participant