
Aug. 8, 2019
11:43 a.m.
I agree that it should be a SyntaxError as it's a semantic issue regarded to syntax. For instance, we already use SyntaxError for when a `return` statement is outside of a function and I view this as the same sort of error. And I think with an appropriately descriptive message like Ivan pointed out will handle any confusion, especially since this exception will very rarely be caught and if it is it very likely won't be caught _just_ for the walrus operator and no other syntax-related error.