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

GAP fails to enter break loop #3011

Closed
hulpke opened this issue Nov 16, 2018 · 5 comments
Closed

GAP fails to enter break loop #3011

hulpke opened this issue Nov 16, 2018 · 5 comments
Assignees
Labels
kind: bug Issues describing general bugs, and PRs fixing them topic: error handling
Milestone

Comments

@hulpke
Copy link
Contributor

hulpke commented Nov 16, 2018

[in GAP 4.10dev-1462-g06ba3fe of today]

The following function

Fail:=function()
local a,v;
  a:=[1.2,3];
  v:=2;
  v:=a{v};
end;

produces (as expected) an error

Error, List Elements: <positions> must be a dense list of positive integers in
  v := a{v}; at ...

but then does not enter the break loop, but bail out to the main gap> loop.

@hulpke hulpke added kind: bug Issues describing general bugs, and PRs fixing them topic: error handling labels Nov 16, 2018
@markuspf
Copy link
Member

This is probably related (or a duplicate of) #2920

@fingolfin
Copy link
Member

Note quite, this is a regression; there is a break loop in older GAP loops.

@fingolfin
Copy link
Member

It works in GAP up to 4.9, but is broken in GAP 4.10. Probably my fault, I'll submit a fix ASAP.

@fingolfin fingolfin self-assigned this Nov 16, 2018
@hulpke
Copy link
Contributor Author

hulpke commented Nov 16, 2018

@markuspf Yes, thank you. I'll leave this open as it isn't directly interpreted code but in a function where there certainly should be a break loop.

fingolfin added a commit to fingolfin/gap that referenced this issue Nov 16, 2018
Specifically use ErrorMayQuit instead of ErrorQuit in CheckIsPossList and
CheckIsDenseList to ensure this produces a break loop again:

    f:=function()
    local a,v;
      a:=[1.2,3];
      v:=2;
      v:=a{v};
    end;
    f();

Fixes gap-system#3011
@fingolfin
Copy link
Member

Actually, @markuspf is right and this is more or less #2920, sorry about the confusion. Anyway, my PR fixes both.

ChrisJefferson pushed a commit that referenced this issue Nov 17, 2018
Specifically use ErrorMayQuit instead of ErrorQuit in CheckIsPossList and
CheckIsDenseList to ensure this produces a break loop again:

    f:=function()
    local a,v;
      a:=[1.2,3];
      v:=2;
      v:=a{v};
    end;
    f();

Fixes #3011
olexandr-konovalov pushed a commit that referenced this issue Nov 24, 2018
Specifically use ErrorMayQuit instead of ErrorQuit in CheckIsPossList and
CheckIsDenseList to ensure this produces a break loop again:

    f:=function()
    local a,v;
      a:=[1.2,3];
      v:=2;
      v:=a{v};
    end;
    f();

Fixes #3011
@olexandr-konovalov olexandr-konovalov added this to the GAP 4.10.1 milestone Feb 23, 2019
ssiccha pushed a commit to ssiccha/gap that referenced this issue Mar 27, 2019
Specifically use ErrorMayQuit instead of ErrorQuit in CheckIsPossList and
CheckIsDenseList to ensure this produces a break loop again:

    f:=function()
    local a,v;
      a:=[1.2,3];
      v:=2;
      v:=a{v};
    end;
    f();

Fixes gap-system#3011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Issues describing general bugs, and PRs fixing them topic: error handling
Projects
None yet
Development

No branches or pull requests

4 participants