erg-lang / erg

A statically typed language compatible with Python
http://erg-lang.org
Apache License 2.0
2.65k stars 55 forks source link

Type error doesn't occur for a function using Add, etc. #278

Closed mtshiba closed 1 year ago

mtshiba commented 1 year ago

Describe the bug?

...

Reproducible code

add x: Int, y = x + y

print! add 1, "a"

Expected result

Type error occured.

Actual result

Traceback (most recent call last): File "test.er", line -1, in File "test.er", line -1, in add TypeError: unsupported operand type(s) for +: 'Nat' and 'Str'

Additional context

No response

Erg version

0.6.0-beta.1

Python version

No response

OS

None