erg-lang / erg

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

Strange error prompt #147

Open C-BJ opened 2 years ago

C-BJ commented 2 years ago

By running add.er in the example folder, you can reproduce it well

image what is %v49?

mtshiba commented 2 years ago

%v## is the name of the variable used internally by the compiler; Add is called as Add(), which is interpreted as a subroutine call. However, Add is not yet implemented as a subroutine (and type).

mtshiba commented 2 years ago

I was just starting to work on a solution to this issue. The solution to this requires a mechanism that allows polymorphic types to be treated as const functions as well, and the implementation of traits. This will take some time.

C-BJ commented 2 years ago

I see