Skip to content

unsupported to call class static array field #355

Closed
@LiaoPeng

Description

@LiaoPeng

assemblyscript

class Container {
  static MONTHS_IN_YEAR: i32 = 12;
  static DAYS_IN_MONTH: i32[] = [31, 28, 31];
}
var months = Container.MONTHS_IN_YEAR;
var _days =  Container.DAYS_IN_MONTH[1];

Expected:
The expression var _days = Container.DAYS_IN_MONTH[1]; is ok.

In fact:

ERROR AS100: Operation not supported.
 var _days =  Container.DAYS_IN_MONTH[1];

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