Browse Source

Fix compiler crash on Swift 5.2 when inlining test helper (#1192)

David Evans 4 years ago
parent
commit
ec8e5e0b81
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Tests/GRPCTests/XCTestHelpers.swift

+ 4 - 0
Tests/GRPCTests/XCTestHelpers.swift

@@ -52,6 +52,10 @@ func assertNoThrow<Value>(
 
 // MARK: - Matchers.
 
+// The Swift 5.2 compiler will crash when trying to
+// inline this function if the tests are running in
+// release mode.
+@inline(never)
 func assertThat<Value>(
   _ expression: @autoclosure @escaping () throws -> Value,
   _ matcher: Matcher<Value>,