Lunderberg commented on PR #11973:
URL: https://github.com/apache/tvm/pull/11973#issuecomment-1171671642

   Hmm, perhaps not as straightforward as a change as I had hoped.  It looks 
like there are already cases that implicitly rely on the `PrimExpr` operator 
overloads not being present, and break when these overloads are present.  So 
far, all of the cases I've found are when using the `Integer` subclass.  If the 
`PrimExpr` operator overloads are in scope, then there is ambiguity whether 
`Integer(5) + 10` should convert the `10` into a `PrimExpr` to use `PrimExpr 
operator+(PrimExpr, PrimExpr)`, or whether `Integer(5)` should use the implicit 
conversation to `int64_t` to use the builtin `int64_t operator+(int64_t, 
int64_t)`.
   
   I think this or a similar change would still be useful, as erroneous use of 
`ObjectRef operator==` on a `PrimExpr` could silently change the intended 
meaning of an expression, but it will require also making sure that `Integer` 
maintains its current behavior, regardless of which header files are included.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to