Fixing test to check the new realist implementation of dynamic cast

This commit is contained in:
Roberto Rosmaninho
2022-10-21 10:22:30 -03:00
parent 8636720706
commit dced1cae29

View File

@@ -28,10 +28,8 @@ int main() {
Functions::throwFunction();
} catch (swift::Error& e) {
auto errorVal = e.as<Functions::NaiveErrors>();
if (errorVal) {
assert(errorVal == Functions::NaiveErrors::throwError);
errorVal->getMessage();
}
assert(errorVal == Functions::NaiveErrors::throwError);
errorVal.getMessage();
}
try {
Functions::throwFunctionWithReturn();
@@ -50,4 +48,4 @@ int main() {
// CHECK-NEXT: throwError
// CHECK-NEXT: passThrowFunctionWithReturn
// CHECK-NEXT: Exception
// CHECK-NEXT: Test destroyed
// CHECK-NEXT: Test destroyed