diff --git a/unittests/Support/ErrorOrTest.cpp b/unittests/Support/ErrorOrTest.cpp index 98174e8cd70..8a5b068d479 100644 --- a/unittests/Support/ErrorOrTest.cpp +++ b/unittests/Support/ErrorOrTest.cpp @@ -23,6 +23,9 @@ TEST(ErrorOr, SimpleValue) { EXPECT_TRUE(a); EXPECT_EQ(1, *a); + ErrorOr b = a; + EXPECT_EQ(1, *b); + a = t2(); EXPECT_FALSE(a); EXPECT_EQ(errc::invalid_argument, a.getError());