-
Notifications
You must be signed in to change notification settings - Fork 171
Closed
Description
s = "abc"
s = s + 1 # Int type
semantic error: Type mismatch in binary operator; the types must be compatible
--> try.py:8:9
|
8 | s = s + 1
| ^ ^ type mismatch (str and i32)
s = "abc"
s = s + 1.0 # Float type
semantic error: Type mismatch in binary operator; the types must be compatible
--> try.py:8:9
|
8 | s = s + 1.0
| ^ ^^^ type mismatch (str and f64)
s = "abc"
s = s + complex(1,2) # Complex type - error message not uniform with the above types
semantic error: Casting str to complex is not Implemented # How is this str to complex casting anyways ?
--> try.py:8:9
|
8 | s = s + complex(1,2)
| ^
Metadata
Metadata
Assignees
Labels
No labels