You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
471 B

/*
* V8 and Rhino both allow an unescaped brace to appear literally.
* Technically this seems to be incorrect because Ecmascript RegExp
* syntax does not allow reserved characters like '{' to appear as
* PatternCharacters.
*/
/*---
{
"knownbug": true
}
---*/
/* FIXME: this now tests V8/Rhino behavior, is this desired? */
/*===
4
===*/
try {
var re = eval("/{/");
var res = re.exec('foo {');
print(res.index);
} catch (e) {
print(e);
}