Skip to content

Commit b6242a0

Browse files
committed
Try to work around crash in function signature specialization
1 parent 954a508 commit b6242a0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Sources/SwiftOperators/OperatorTable.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ public struct OperatorTable {
4242
}
4343
}
4444

45+
/// Initialize the operator precedence instance with a given set of
46+
/// operators and precedence groups.
47+
///
48+
/// If any error occurs, it will be thrown.
49+
public init(
50+
precedenceGroups: [PrecedenceGroup],
51+
operators: [Operator]
52+
) throws {
53+
try self.init(precedenceGroups: precedenceGroups, operators: operators) {
54+
throw $0
55+
}
56+
}
57+
4558
/// Record the operator in the given operator array.
4659
private func record(
4760
_ op: Operator,

0 commit comments

Comments
 (0)