Error related to ellipsis has wrong line number.

asked 2023-11-27 20:58:31 +0100

eodorney gravatar image

I had some long code that boiled down to the following:

test_command = [0..1];
print("hello again");
for i in [0..3:

As you can see, the error is a missing closing bracket in line 4. But if you paste the above code into a file and load it, the Sage interpreter flags a syntax error in line 2, the first ellipsis in the program. As you can imagine, it took a lot of time to find the error because it was nowhere near the reported error location. Is this a bug?

edit retag flag offensive close merge delete