Skip to content

toString does not work in u64 array #680

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

Closed
bowenwang1996 opened this issue Jun 20, 2019 · 2 comments · Fixed by #686
Closed

toString does not work in u64 array #680

bowenwang1996 opened this issue Jun 20, 2019 · 2 comments · Fixed by #686

Comments

@bowenwang1996
Copy link
Contributor

bowenwang1996 commented Jun 20, 2019

Consider the following two functions

export function test(): string {
  let a: u64 = 1;
  return a.toString();
}

export function test1(): string {
  let arr: u64[] = Array.create<u64>(1);
  arr[0] = 1;
  return arr[0].toString();
}

The first one compiles but the second one doesn't and the error is

ERROR TS2339: Property 'toString' does not exist on type 'u64'.

   return arr[0].toString();
                 ~~~~~~~~

Fiddle example here

@bowenwang1996
Copy link
Contributor Author

@dcodeIO is this related to #473?

@dcodeIO
Copy link
Member

dcodeIO commented Jun 20, 2019

Possibly. Either that, or it's missing to pick up the backing U64 class somewhere.

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.

2 participants