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

Punishing main #22

Open
AfonsoFGarcia opened this issue Nov 28, 2014 · 0 comments
Open

Punishing main #22

AfonsoFGarcia opened this issue Nov 28, 2014 · 0 comments

Comments

@AfonsoFGarcia
Copy link

After modifying the swear example to make sure that every single function would be deleted, I was faced with the problem that vigil doesn't want to punish the main function. If the main function happens to call functions that were deleted, the main function is a bad girl and must be punished! Instead, this is what happens:

uncaught error from line  4
Traceback (most recent call last):
  File "./vigil", line 94, in <module>
    exec(source)
  File "<string>", line 10, in <module>
  File "./vigil", line 76, in vigil_uncaught
    punish(raise_line, "Raised '%s' which was not caught." % sys.exc_info()[1])
  File "./vigil", line 36, in punish
    source_lines[i] = ''
IndexError: list assignment index out of range

Here is what's on the source file after vigil has punished everything into oblivion.

# This shows what happens when a function fails to keep its oath.

def main():
    innocent_fn()
    innocent_fn()

How can we consider vigil the Batman of programming languages when main is above them all? Justice must be blind and applied to everybody!

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

No branches or pull requests

1 participant