allow unselection/clear of Union/Any

This commit is contained in:
Michael Davidsaver
2020-07-19 21:07:15 -07:00
parent f22715063c
commit 2381f28c73
3 changed files with 19 additions and 2 deletions
+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()