Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] inferred fails when mixed with explicit parameter #2712

Open
soraros opened this issue May 17, 2024 · 2 comments
Open

[BUG] inferred fails when mixed with explicit parameter #2712

soraros opened this issue May 17, 2024 · 2 comments
Labels
bug Something isn't working mojo-repo Tag all issues with this label

Comments

@soraros
Copy link
Contributor

soraros commented May 17, 2024

Bug description

As title.

Steps to reproduce

fn main():
    f(1, 1) # error: invalid call to 'f':
 
fn f[inferred T: CollectionElement, U: CollectionElement](x: T, y: U):
    ...

System information

Mojo 2024.5.1705 (6569da05) on Docker, Intel Mac.
@soraros soraros added bug Something isn't working mojo-repo Tag all issues with this label labels May 17, 2024
@soraros
Copy link
Contributor Author

soraros commented May 18, 2024

Another important example which doesn't work:

fn main():
    _rebind[Int](1)

fn _rebind[
    inferred src_type: AnyRegType,
    dest_type: AnyRegType,
](val: src_type) -> dest_type:
    return rebind[dest_type, src_type](val)

Copy link
Collaborator

Fails with new syntax too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

2 participants