We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8636720 commit dced1caCopy full SHA for dced1ca
test/Interop/SwiftToCxx/functions/swift-functions-errors-execution.cpp
@@ -28,10 +28,8 @@ int main() {
28
Functions::throwFunction();
29
} catch (swift::Error& e) {
30
auto errorVal = e.as<Functions::NaiveErrors>();
31
- if (errorVal) {
32
- assert(errorVal == Functions::NaiveErrors::throwError);
33
- errorVal->getMessage();
34
- }
+ assert(errorVal == Functions::NaiveErrors::throwError);
+ errorVal.getMessage();
35
}
36
try {
37
Functions::throwFunctionWithReturn();
@@ -50,4 +48,4 @@ int main() {
50
48
// CHECK-NEXT: throwError
51
49
// CHECK-NEXT: passThrowFunctionWithReturn
52
// CHECK-NEXT: Exception
53
-// CHECK-NEXT: Test destroyed
+// CHECK-NEXT: Test destroyed
0 commit comments