The T payload; asserts that T is the live case. Use get when the case is not certain.
#import "Extensions/Variant";
id := variant(Variant(s64, string), cast(s64) 5);
assert(unwrap(id, s64) == 5);unwrap :: (v: $V/Variant, $T: Type) -> T
Parameters
- v: $V/Variant
- $T: Type
Returns
- T