Skip to content

Uninitialized array method call should throw expection. Access to uninitialized properties should be compile error/warning. #899

Closed
@vird

Description

@vird

Slightly related to #482

export function main(): i32 {
  let res = 0;
  let arr:i32[];// initialized with garbage
  
  for(let i=0;i<10;i++) {
    arr.push(i);
  }
  
  return res;
}

This code throws exception on third iteration

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions