Very silly small bug

Archives Forums/BlitzMax Bug Reports/Very silly small bug

ziggy(Posted 2008) [#1]
Type MyClass
End Type
Local P:MyClass = New MyClass
Print "Hello" + P

The error messa is Operator ''+'' can only be used with numeric types
This is wrong as it can be used also with strings, maybe replace the error message?
I said it was a stupid bug, but you know...


Ked(Posted 2008) [#2]
I don't think you can add a Type to a String, though.


johnnyfreak(Posted 2008) [#3]
it could print the object id like in java, or if a method "toString" exists, call that method.

Do you agree?


GfK(Posted 2008) [#4]
I don't think you can add a Type to a String, though.
I think the point he was trying to make is that the existing error "Operator + can only be used with numeric types" is incorrect, because it can also be used to concatenate strings.

He's tried adding a type to a string simply to get it to throw the error.