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

@massaExport transformer fails when used with more than one function that are using custom_type #297

Closed
bilboquet opened this issue Jul 28, 2023 · 0 comments · Fixed by #299
Assignees

Comments

@bilboquet
Copy link
Contributor

I created an SC with the generator.
I added

import { u128, u256 } from "as-bignum/assembly";

// @ts-ignore: decorator
@massaExport()
export function test1(arg: u128) : u128 {
  return arg;
}

build, it worked
then I added a second function

// @ts-ignore: decorator
@massaExport()
export function test2(arg: u256) : u256 {
  return arg;
}

The build fails with (most relevant part of the trace):

MassaExport Function: generated 'test1' function's wrapper
contract to compile assembly/contracts/main.ts
Compilation failed: Cannot read properties of undefined (reading '0')
stderr FAILURE TypeError: Cannot read properties of undefined (reading '0')
    at file:///home/jf/workspace/assemblyscript/as/packages/as-transformer/dist/transformers/massaExport.js:42:94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant