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

kernel: catch some invalid uses of '~'; add tests #2750

Merged
merged 2 commits into from
Aug 30, 2018

Commits on Aug 27, 2018

  1. kernel: some formatting

    fingolfin committed Aug 27, 2018
    Configuration menu
    Copy the full SHA
    94242b8 View commit details
    Browse the repository at this point in the history
  2. kernel: catch some invalid uses of '~'; add tests

    Also, print a (more) helpful error message.
    
    Before:
    
        gap> ~;
        Error, '~' does not have a value here
        not in any function at *stdin*:1
        gap> x -> ~;
        function( x ) ... end
        gap> x -> (1,~);
        function( x ) ... end
        gap> (1,~);
        Error, '~' does not have a value here
        not in any function at *stdin*:4
    
    After:
    
        gap> ~;
        Syntax error: '~' not allowed here
        ~;
        ^
        gap> x -> ~;
        Syntax error: '~' not allowed here
        x -> ~;
             ^
        gap> x -> (1,~);
        Syntax error: '~' not allowed here
        x -> (1,~);
                ^
        gap> (1,~);
        Syntax error: '~' not allowed here
        (1,~);
           ^
    fingolfin committed Aug 27, 2018
    Configuration menu
    Copy the full SHA
    602abed View commit details
    Browse the repository at this point in the history