Skip to content

Same function index shared with different functions #319

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

Open
clearloop opened this issue Mar 26, 2025 · 0 comments
Open

Same function index shared with different functions #319

clearloop opened this issue Mar 26, 2025 · 0 comments
Labels
wontfix Problems that won't fix atm

Comments

@clearloop
Copy link
Member

clearloop commented Mar 26, 2025

when we got multiple external functions with the same content but different function names, the later ones will override the previous ones in the exports table in our parser, for example

/// addition
#[zink::external]
pub fn foo(x: i32, y: i32) -> i32 {
   x + y
}

/// addition
#[zink::external]
pub fn bar(x: i32, y: i32) -> i32 {
   x + y
}

while this is actually unexpectedly in development, e.g. duplicate code, we ban this behavior directly atm instead of supporting it, feel free to discuss on it!

@clearloop clearloop added the wontfix Problems that won't fix atm label Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Problems that won't fix atm
Projects
None yet
Development

No branches or pull requests

1 participant