Can't add zero to value with units

amanda_sutherland
amanda_sutherland Member Posts: 14 EDU
This appears to be a bug. 

Comments

  • kevin_o_toole_1
    kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565 image
    Talked with Ilya, we're not going to allow this.

    In the case of `if (foo > 0)` it's a useful shorthand, but when you're initializing a variable, you really want that variable to be the right type for everything you do, and the way to do that is `var foo = 0 * meter`. Operators aren't the only things overloaded by type, so we're not going to make them special.