Skip to content

Commit b3493b0

Browse files
author
AlexDenisov
authored
Merge pull request #8 from dsp-testing/alexdenisov/patch-string-processing
Swift: Add a patch for Xcode 13.2
2 parents 092fb17 + 4b293e4 commit b3493b0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Swift 5.5.2/Xcode 13.2 refuses to compile this piece as it is "unable to infer complex closure return type."
2+
3+
diff --git a/Sources/_RegexParser/Utility/TypeConstruction.swift b/Sources/_RegexParser/Utility/TypeConstruction.swift
4+
index 4d1765e..39b4595 100644
5+
--- a/Sources/_RegexParser/Utility/TypeConstruction.swift
6+
+++ b/Sources/_RegexParser/Utility/TypeConstruction.swift
7+
@@ -60,7 +60,7 @@ public enum TypeConstruction {
8+
flags |= 0x10000
9+
}
10+
11+
- let result = elementTypes.withContiguousStorageIfAvailable { elementTypesBuffer in
12+
+ let result = elementTypes.withContiguousStorageIfAvailable { elementTypesBuffer -> (value: Any.Type, state: Int) in
13+
if let labels = labels {
14+
return labels.withCString { labelsPtr in
15+
swift_getTupleTypeMetadata(

0 commit comments

Comments
 (0)