Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vird opened this issue Oct 11, 2019 · 0 comments

Comments

@vird
Copy link

@vird vird commented Oct 11, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.