Status: Assigned
Owner: [email protected]
CC: [email protected], [email protected], [email protected],
[email protected]
Labels: Type-Bug Priority-Medium
New issue 4194 by [email protected]: Expected error for "function(){ return
() }"
https://code.google.com/p/v8/issues/detail?id=4194
Landing arrow functions caused some flakes and one failure here:
http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/545
The error was in an inspector test that was checking the syntax error for a
function of the form
function foo() { return () }
It was relying on the syntax error to trigger some other things, so we can
just rebaseline, but the point is: what error do we want to show in this
case? Of course the parser is going to be looking for a => after the (),
because that's the only thing that can be there, but the current error
leaves a bit to be desired:
(d8):1: SyntaxError: Unexpected token }
function foo() { return () }
^
SyntaxError: Unexpected token }
There the ^ is pointing at the }.
I note that in general for Check(Token::Foo) we should really be emitting
errors of the form "Unexpected token '}' (expecting instead '=>')" or
something. That would solve this error but it would probably junk a lot of
expectations. I guess the right thing to do is to add a specific error in
this case. Or should we just rebaseline?
Finally, are the flakes worth looking into? If so, how can I get the
output -actual.txt files?
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.