Skip to content

Commit af63a9a

Browse files
benrimmingtonDavide Italiano
authored andcommitted
[SE-0211] Emoji properties require ICU 57 or later
1 parent 906cbe9 commit af63a9a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

stdlib/public/core/UnicodeScalarProperties.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ extension Unicode.Scalar.Properties {
623623
///
624624
/// This property corresponds to the `Emoji` property in the
625625
/// [Unicode Standard](http://www.unicode.org/versions/latest/).
626+
@available(macOS 10.12.2, iOS 10.2, tvOS 10.1, watchOS 3.1.1, *)
626627
public var isEmoji: Bool {
627628
return _hasBinaryProperty(__swift_stdlib_UCHAR_EMOJI)
628629
}
@@ -639,6 +640,7 @@ extension Unicode.Scalar.Properties {
639640
///
640641
/// This property corresponds to the `Emoji_Presentation` property in the
641642
/// [Unicode Standard](http://www.unicode.org/versions/latest/).
643+
@available(macOS 10.12.2, iOS 10.2, tvOS 10.1, watchOS 3.1.1, *)
642644
public var isEmojiPresentation: Bool {
643645
return _hasBinaryProperty(__swift_stdlib_UCHAR_EMOJI_PRESENTATION)
644646
}
@@ -652,6 +654,7 @@ extension Unicode.Scalar.Properties {
652654
///
653655
/// This property corresponds to the `Emoji_Modifier` property in the
654656
/// [Unicode Standard](http://www.unicode.org/versions/latest/).
657+
@available(macOS 10.12.2, iOS 10.2, tvOS 10.1, watchOS 3.1.1, *)
655658
public var isEmojiModifier: Bool {
656659
return _hasBinaryProperty(__swift_stdlib_UCHAR_EMOJI_MODIFIER)
657660
}
@@ -661,6 +664,7 @@ extension Unicode.Scalar.Properties {
661664
///
662665
/// This property corresponds to the `Emoji_Modifier_Base` property in the
663666
/// [Unicode Standard](http://www.unicode.org/versions/latest/).
667+
@available(macOS 10.12.2, iOS 10.2, tvOS 10.1, watchOS 3.1.1, *)
664668
public var isEmojiModifierBase: Bool {
665669
return _hasBinaryProperty(__swift_stdlib_UCHAR_EMOJI_MODIFIER_BASE)
666670
}

test/stdlib/UnicodeScalarPropertiesTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ UnicodeScalarPropertiesTests.test("properties.booleanProperties") {
8383
expectBooleanProperty(\.changesWhenNFKCCaseFolded, trueFor: "A", falseFor: "!")
8484

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

0 commit comments

Comments
 (0)