allow unselection/clear of Union/Any

This commit is contained in:
Michael Davidsaver committed 2020-07-19 21:07:15 -07:00
1 parent f22715063c
commit 2381f28c73
3 files changed
+19 -2

No files matched your search

+6 -1
View File
@@ -83,11 +83,16 @@ void testAssignUnion()
testEq(val.nameOf(val["->"]), "s");
val = unselect;
testFalse(val["->"].valid());
testThrows<std::invalid_argument>([&val](){
val["->u16"] = "hello";
});
//val = nullptr;
// previous selection succeeds, but assignment fails
testTrue(val["->"].valid());
}
void testName()