Skip to content

[SE-0211] Emoji properties require ICU 57 or later #19209

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 1 commit into from
Sep 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions stdlib/public/core/UnicodeScalarProperties.swift
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ extension Unicode.Scalar.Properties {
///
/// This property corresponds to the `Emoji` property in the
/// [Unicode Standard](http://www.unicode.org/versions/latest/).
@available(macOS 10.12.2, iOS 10.2, tvOS 10.1, watchOS 3.1.1, *)
public var isEmoji: Bool {
return _hasBinaryProperty(__swift_stdlib_UCHAR_EMOJI)
}
Expand All @@ -639,6 +640,7 @@ extension Unicode.Scalar.Properties {
///
/// This property corresponds to the `Emoji_Presentation` property in the
/// [Unicode Standard](http://www.unicode.org/versions/latest/).
@available(macOS 10.12.2, iOS 10.2, tvOS 10.1, watchOS 3.1.1, *)
public var isEmojiPresentation: Bool {
return _hasBinaryProperty(__swift_stdlib_UCHAR_EMOJI_PRESENTATION)
}
Expand All @@ -652,6 +654,7 @@ extension Unicode.Scalar.Properties {
///
/// This property corresponds to the `Emoji_Modifier` property in the
/// [Unicode Standard](http://www.unicode.org/versions/latest/).
@available(macOS 10.12.2, iOS 10.2, tvOS 10.1, watchOS 3.1.1, *)
public var isEmojiModifier: Bool {
return _hasBinaryProperty(__swift_stdlib_UCHAR_EMOJI_MODIFIER)
}
Expand All @@ -661,6 +664,7 @@ extension Unicode.Scalar.Properties {
///
/// This property corresponds to the `Emoji_Modifier_Base` property in the
/// [Unicode Standard](http://www.unicode.org/versions/latest/).
@available(macOS 10.12.2, iOS 10.2, tvOS 10.1, watchOS 3.1.1, *)
public var isEmojiModifierBase: Bool {
return _hasBinaryProperty(__swift_stdlib_UCHAR_EMOJI_MODIFIER_BASE)
}
Expand Down
2 changes: 1 addition & 1 deletion test/stdlib/UnicodeScalarPropertiesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ UnicodeScalarPropertiesTests.test("properties.booleanProperties") {
expectBooleanProperty(\.changesWhenNFKCCaseFolded, trueFor: "A", falseFor: "!")

#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
if #available(iOS 10.2, *) {
if #available(macOS 10.12.2, iOS 10.2, tvOS 10.1, watchOS 3.1.1, *) {
// U+2708 AIRPLANE
expectBooleanProperty(\.isEmoji, trueFor: "\u{2708}", falseFor: "A")
// U+231A WATCH
Expand Down