Skip to content

Broken with latest version #1

Closed
@JairusSW

Description

@JairusSW

Just run the example on the readme with the latest version of AssemblyScript and you get this:

$ astral
Compiling assembly/__benches__/tbs.ts
ERROR AS220: Expression must be a compile-time constant.
     :
 192 │ export const baselineIters = memory.data(__astral__sampleSize * sizeof<f64>());
     │                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     └─ in ~lib/__astral__.ts(192,42)

ERROR AS220: Expression must be a compile-time constant.
     :
 193 │ export const baselineTimes = memory.data(__astral__sampleSize * sizeof<f64>());
     │                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     └─ in ~lib/__astral__.ts(193,42)

ERROR TS2322: Type '~lib/string/String' is not assignable to type 'u32'.
   :
 5 │ bench("string split", () => {
   │       ~~~~~~~~~~~~~~
   └─ in assembly/__benches__/tbs.ts(5,7)

FAILURE 3 compile error(s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions