Skip to content
This repository was archived by the owner on Feb 28, 2018. It is now read-only.
This repository was archived by the owner on Feb 28, 2018. It is now read-only.

User wants int32[] as well as Array<int32> #121

Open

Description

@MaxGraey

How

let arr1: int32[] = new Array<int32>(1);
let arr2: int32[] = new int32[](2); // if possible and make sense
let arr3: int32[] = new Array(3); // implicitly type detection

Activity

  1. dcodeIO commented on Jun 16, 2017

    @dcodeIO
    Contributor

    Sorry, posted here but then noticed that it's the wrong repo ^^

  2. nidin commented on Jun 16, 2017

    @nidin
    Contributor

    😄 btw @dcodeIO is Array type implemented in AssemblyScript

  3. nidin commented on Jun 18, 2017

    @nidin
    Contributor

    @MaxGraey I would simplify

    let arr2: int32[] = new int32[](2);

    to

    let arr2: int32[] = [](2);
  4. MaxGraey commented on Jun 18, 2017

    @MaxGraey
    ContributorAuthor

    I think new keyword should be exists.

    let arr2: int32[] = new [](2);

    The best solution in my opinion (shortest and compatible):

    let arr2 = new int32[](2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions