zhiics commented on a change in pull request #5314: [RUNTIME][IR] Allow
non-nullable ObjectRef, introduce Optional<T>.
URL: https://github.com/apache/incubator-tvm/pull/5314#discussion_r407260426
##########
File path: include/tvm/ir/attrs.h
##########
@@ -85,6 +85,8 @@ namespace tvm {
*/
template<typename TObjectRef>
inline TObjectRef NullValue() {
+ static_assert(TObjectRef::_type_is_nullable,
+ "Can only value for nullable types");
Review comment:
Please rephrase this error message.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services