| 26 | } |
| 27 | |
| 28 | const Value* ValueRef::as(const IType& type) const { |
| 29 | auto&& storage = this->storage(); |
| 30 | if (storage->type() != type) { |
| 31 | return nullptr; |
| 32 | } |
| 33 | return static_cast<Value*>(storage.get()); |
| 34 | } |
| 35 | |
| 36 | bool ValueRef::is(const IType& type) const { |
| 37 | return this->storage()->type() == type; |
no test coverage detected