Skip to content

unhelpful error message when trying to use storage.get<T> with primitives #58

Description

@janedegtiareva

steps to repro:
try to build a contract which contains this line
storage.getPrimitive<i32>("counter")

expected behavior:
some error which references the problematic line in source

actual behavior:
The compiler output is an assertion failure without a reference to a line in source code:

AssertionError: assertion failed
at n.assert (/Users/evgueniadegtiareva/near/NEARStudio/templates/node_modules/assemblyscript/dist/asc.js:1:698370)
at e.asNullable (/Users/evgueniadegtiareva/near/NEARStudio/templates/node_modules/assemblyscript/dist/assemblyscript.js:1:129907)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions