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-4546] Need more permissive ExtendedGraphemeClusterLiteral parsing #47123

Closed
dabrahams opened this issue Apr 8, 2017 · 5 comments
Closed
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@dabrahams
Copy link
Collaborator

Previous ID SR-4546
Radar rdar://problem/31521134
Original Reporter @dabrahams
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @milseman
Priority Medium

md5: 33538fd483360d355d1bc4d4d4663c02

is duplicated by:

  • SR-5448 Creating a Character via ExpressibleByExtendedGraphemeClusterLiteral fails with complex emoji

Issue Description:

The compiler currently refuses to recognize some valid single-extended-grapheme-cluster literals as such, which will prevent us from fully supporting Unicode 9 in the standard library. For example, see

// FIXME: the frontend currently prevents us writing this last

@dabrahams
Copy link
Collaborator Author

@swift-ci create

@dabrahams
Copy link
Collaborator Author

The whole idea of strictly checking grapheme cluster boundaries in the compiler is probably bogus, given that the Unicode standard changes and the ICU library in use changes. The right answer, IMO, is for the compiler to accept anything as a Character literal except perhaps a sequence of scalars that includes some of the grapheme breaks we can detect quickly with great certainty of stability, which are currently used to avoid calling into ICU in the standard library, and for the library to do no further validation.

@milseman
Copy link
Mannequin

milseman mannequin commented Jul 24, 2017

4.0 PR #11105

@milseman
Copy link
Mannequin

milseman mannequin commented Jul 26, 2017

The 4.0 part of this is done. Future work includes removing static notions of graphemes in general

@ole
Copy link
Contributor

ole commented Jul 26, 2017

@milseman Fantastic, thanks!

@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. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants