mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-16 16:31:32 +00:00
Fix trampolines not inheriting contextual type arguments
This commit is contained in:
@ -33,3 +33,9 @@ function addI32(a: i32, b: i32): i32 {
|
||||
}
|
||||
|
||||
assert(doAddWithFn<i32>(4, 5, addI32) == 9);
|
||||
|
||||
function makeAndAdd<T>(a: T, b: T, adder: Adder<T> = makeAdder<T>()): T {
|
||||
return adder(a, b);
|
||||
}
|
||||
|
||||
assert(makeAndAdd<i32>(1, 2) == 3);
|
||||
|
Reference in New Issue
Block a user