mys-lang / mys

The Mys programming language - an attempt to create a statically typed Python-like language that produces fast binaries. See https://mys-lang.org for more information.
Other
132 stars 5 forks source link

Overloaded generic function does not work. #25

Open eerimoq opened 3 years ago

eerimoq commented 3 years ago

What did you do?

@generic(T)
def foo(a: T):
    pass

@generic(T)
def foo(a: T, b: T):
    pass

def main():
    foo[u8](1, 2)

What did you expect to see?

Successful compilation.

What did you see instead?

  File "./src/main.mys", line 10
        foo[u8](1, 2)
        ^
CompileError: expected 1 parameter, got 2

Mys version

a172b23dcf6725056d1a02e0c1a9d28880ef3cb0