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

[asl] Prevent use of empty slices on integers and bitvectors. #1016

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

HadrienRenaud
Copy link
Collaborator

This makes it impossible to call a bracket-less getter with brackets.

See the now forbidden tests:

getter f1 => bits(4)
begin
  return '0000';
end

setter f1 = v: bits(4)
begin
  pass;
end

func main () => integer
begin
  // both of the following are forbidden
  let - = f1[];
  f1[] = '';
  
  return 0;
end

@HadrienRenaud HadrienRenaud force-pushed the asl-fix-empty-slice branch 4 times, most recently from a94a385 to 38125bd Compare October 23, 2024 13:44
asllib/error.ml Outdated Show resolved Hide resolved
@HadrienRenaud HadrienRenaud merged commit 0c832f5 into herd:master Oct 24, 2024
3 checks passed
@HadrienRenaud HadrienRenaud deleted the asl-fix-empty-slice branch October 24, 2024 14:49
Roman-Manevich added a commit that referenced this pull request Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants