zink icon indicating copy to clipboard operation
zink copied to clipboard

Same function index shared with different functions

Open clearloop opened this issue 8 months ago • 0 comments

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 avatar Mar 26 '25 08:03 clearloop